feat(warehouse): 优化仓库管理模块的用户信息显示
- 在入库记录查询中关联用户表以显示操作员昵称 - 在出库记录查询中关联用户表以显示操作员昵称 - 在采购到货记录中关联用户表以显示申请人、验收人等昵称 - 在采购申请中关联用户表以显示申请人昵称并支持按昵称搜索 - 在库存盘点记录中关联用户表以显示检查人和确认人昵称 - 在系统公告中关联用户表以显示创建人和更新人昵称 - 在操作日志中关联用户表以显示操作员昵称 - 移除已废弃的OpenAI配置项 - 优化SQL查询中的字段别名和表关联逻辑
This commit is contained in:
parent
2ea0df3e1b
commit
79773cc96e
@ -150,8 +150,3 @@ agent:
|
|||||||
model: ${AGENT_MODEL_NAME:Qwen/Qwen3.8-27B-FP8}
|
model: ${AGENT_MODEL_NAME:Qwen/Qwen3.8-27B-FP8}
|
||||||
timeout-ms: ${AGENT_MODEL_TIMEOUT_MS:8000}
|
timeout-ms: ${AGENT_MODEL_TIMEOUT_MS:8000}
|
||||||
max-output-tokens: ${AGENT_MODEL_MAX_OUTPUT_TOKENS:512}
|
max-output-tokens: ${AGENT_MODEL_MAX_OUTPUT_TOKENS:512}
|
||||||
# 图片批量导入仍使用支持视觉输入的远程模型。
|
|
||||||
openai:
|
|
||||||
base-url: ${OPENAI_BASE_URL:http://192.168.28.10:18080}
|
|
||||||
api-key: ${OPENAI_API_KEY:sk-dd185946191d42eaa54892dec488bf7b54cad2d7433aee8aac7a017365b0829d}
|
|
||||||
model: ${OPENAI_MODEL:gpt-5.5}
|
|
||||||
|
|||||||
@ -18,29 +18,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectNoticeVo">
|
<sql id="selectNoticeVo">
|
||||||
select notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content, status, create_by, create_time, update_by, update_time, remark
|
select sn.notice_id, sn.notice_title, sn.notice_type, cast(sn.notice_content as char) as notice_content,
|
||||||
from sys_notice
|
sn.status, coalesce(cu.nick_name, sn.create_by) as create_by, sn.create_time,
|
||||||
|
coalesce(uu.nick_name, sn.update_by) as update_by, sn.update_time, sn.remark
|
||||||
|
from sys_notice sn
|
||||||
|
left join sys_user cu on cu.user_name = sn.create_by
|
||||||
|
left join sys_user uu on uu.user_name = sn.update_by
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectNoticeById" parameterType="Long" resultMap="SysNoticeResult">
|
<select id="selectNoticeById" parameterType="Long" resultMap="SysNoticeResult">
|
||||||
<include refid="selectNoticeVo"/>
|
<include refid="selectNoticeVo"/>
|
||||||
where notice_id = #{noticeId}
|
where sn.notice_id = #{noticeId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult">
|
<select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult">
|
||||||
<include refid="selectNoticeVo"/>
|
<include refid="selectNoticeVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="noticeTitle != null and noticeTitle != ''">
|
<if test="noticeTitle != null and noticeTitle != ''">
|
||||||
AND notice_title like concat('%', #{noticeTitle}, '%')
|
AND sn.notice_title like concat('%', #{noticeTitle}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="noticeType != null and noticeType != ''">
|
<if test="noticeType != null and noticeType != ''">
|
||||||
AND notice_type = #{noticeType}
|
AND sn.notice_type = #{noticeType}
|
||||||
</if>
|
</if>
|
||||||
<if test="createBy != null and createBy != ''">
|
<if test="createBy != null and createBy != ''">
|
||||||
AND create_by like concat('%', #{createBy}, '%')
|
AND (sn.create_by like concat('%', #{createBy}, '%')
|
||||||
|
OR cu.nick_name like concat('%', #{createBy}, '%'))
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by notice_id desc
|
order by sn.notice_id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertNotice" parameterType="SysNotice">
|
<insert id="insertNotice" parameterType="SysNotice">
|
||||||
@ -87,4 +92,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -25,8 +25,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectOperLogVo">
|
<sql id="selectOperLogVo">
|
||||||
select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time, cost_time
|
select sol.oper_id, sol.title, sol.business_type, sol.method, sol.request_method, sol.operator_type,
|
||||||
from sys_oper_log
|
coalesce(su.nick_name, sol.oper_name) as oper_name, sol.dept_name, sol.oper_url, sol.oper_ip,
|
||||||
|
sol.oper_location, sol.oper_param, sol.json_result, sol.status, sol.error_msg, sol.oper_time, sol.cost_time
|
||||||
|
from sys_oper_log sol
|
||||||
|
left join sys_user su on su.user_name = sol.oper_name
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<insert id="insertOperlog" parameterType="SysOperLog">
|
<insert id="insertOperlog" parameterType="SysOperLog">
|
||||||
@ -38,34 +41,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<include refid="selectOperLogVo"/>
|
<include refid="selectOperLogVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="operIp != null and operIp != ''">
|
<if test="operIp != null and operIp != ''">
|
||||||
AND oper_ip like concat('%', #{operIp}, '%')
|
AND sol.oper_ip like concat('%', #{operIp}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="title != null and title != ''">
|
<if test="title != null and title != ''">
|
||||||
AND title like concat('%', #{title}, '%')
|
AND sol.title like concat('%', #{title}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="businessType != null">
|
<if test="businessType != null">
|
||||||
AND business_type = #{businessType}
|
AND sol.business_type = #{businessType}
|
||||||
</if>
|
</if>
|
||||||
<if test="businessTypes != null and businessTypes.length > 0">
|
<if test="businessTypes != null and businessTypes.length > 0">
|
||||||
AND business_type in
|
AND sol.business_type in
|
||||||
<foreach collection="businessTypes" item="businessType" open="(" separator="," close=")">
|
<foreach collection="businessTypes" item="businessType" open="(" separator="," close=")">
|
||||||
#{businessType}
|
#{businessType}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
AND status = #{status}
|
AND sol.status = #{status}
|
||||||
</if>
|
</if>
|
||||||
<if test="operName != null and operName != ''">
|
<if test="operName != null and operName != ''">
|
||||||
AND oper_name like concat('%', #{operName}, '%')
|
AND (sol.oper_name like concat('%', #{operName}, '%')
|
||||||
|
OR su.nick_name like concat('%', #{operName}, '%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
AND oper_time >= #{params.beginTime}
|
AND sol.oper_time >= #{params.beginTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
AND oper_time <= #{params.endTime}
|
AND sol.oper_time <= #{params.endTime}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by oper_id desc
|
order by sol.oper_id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<delete id="deleteOperLogByIds" parameterType="Long">
|
<delete id="deleteOperLogByIds" parameterType="Long">
|
||||||
@ -77,11 +81,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<select id="selectOperLogById" parameterType="Long" resultMap="SysOperLogResult">
|
<select id="selectOperLogById" parameterType="Long" resultMap="SysOperLogResult">
|
||||||
<include refid="selectOperLogVo"/>
|
<include refid="selectOperLogVo"/>
|
||||||
where oper_id = #{operId}
|
where sol.oper_id = #{operId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="cleanOperLog">
|
<update id="cleanOperLog">
|
||||||
truncate table sys_oper_log
|
truncate table sys_oper_log
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -31,11 +31,15 @@
|
|||||||
<sql id="selectInRecordVo">
|
<sql id="selectInRecordVo">
|
||||||
select ir.id, ir.in_no, ir.area_id, ir.product_id, ir.purchase_request_id, ir.arrival_id, ir.source_no,
|
select ir.id, ir.in_no, ir.area_id, ir.product_id, ir.purchase_request_id, ir.arrival_id, ir.source_no,
|
||||||
ir.in_type, ir.in_num, ir.in_status,
|
ir.in_type, ir.in_num, ir.in_status,
|
||||||
ir.operator, ir.in_operator, ir.confirm_time, ir.remark, ir.create_time, ir.update_time,
|
coalesce(operator_user.nick_name, ir.operator) as operator,
|
||||||
|
coalesce(in_user.nick_name, ir.in_operator) as in_operator,
|
||||||
|
ir.confirm_time, ir.remark, ir.create_time, ir.update_time,
|
||||||
wa.area_code, wa.area_name, pi.product_code, pi.product_name, pi.brand, pi.category, pi.spec, pi.unit
|
wa.area_code, wa.area_name, pi.product_code, pi.product_name, pi.brand, pi.category, pi.spec, pi.unit
|
||||||
from in_record ir
|
from in_record ir
|
||||||
left join warehouse_area wa on wa.id = ir.area_id
|
left join warehouse_area wa on wa.id = ir.area_id
|
||||||
left join product_info pi on pi.id = ir.product_id
|
left join product_info pi on pi.id = ir.product_id
|
||||||
|
left join sys_user operator_user on operator_user.user_name = ir.operator
|
||||||
|
left join sys_user in_user on in_user.user_name = ir.in_operator
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectInRecordList" parameterType="InRecord" resultMap="InRecordResult">
|
<select id="selectInRecordList" parameterType="InRecord" resultMap="InRecordResult">
|
||||||
@ -51,7 +55,9 @@
|
|||||||
<if test="spec != null and spec != ''">and pi.spec like concat('%', #{spec}, '%')</if>
|
<if test="spec != null and spec != ''">and pi.spec like concat('%', #{spec}, '%')</if>
|
||||||
<if test="inType != null">and ir.in_type = #{inType}</if>
|
<if test="inType != null">and ir.in_type = #{inType}</if>
|
||||||
<if test="inStatus != null">and ir.in_status = #{inStatus}</if>
|
<if test="inStatus != null">and ir.in_status = #{inStatus}</if>
|
||||||
<if test="inOperator != null and inOperator != ''">and ir.in_operator like concat('%', #{inOperator}, '%')</if>
|
<if test="inOperator != null and inOperator != ''">
|
||||||
|
and coalesce(in_user.nick_name, ir.in_operator) like concat('%', #{inOperator}, '%')
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by ir.id desc
|
order by ir.id desc
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -27,11 +27,16 @@
|
|||||||
|
|
||||||
<sql id="selectOutRecordVo">
|
<sql id="selectOutRecordVo">
|
||||||
select orr.id, orr.out_no, orr.area_id, orr.product_id, orr.out_type, orr.out_num,
|
select orr.id, orr.out_no, orr.area_id, orr.product_id, orr.out_type, orr.out_num,
|
||||||
orr.source_no, orr.operator, orr.out_operator, orr.out_time, orr.remark, orr.create_time, orr.update_time,
|
orr.source_no,
|
||||||
|
coalesce(operator_user.nick_name, orr.operator) as operator,
|
||||||
|
coalesce(out_user.nick_name, orr.out_operator) as out_operator,
|
||||||
|
orr.out_time, orr.remark, orr.create_time, orr.update_time,
|
||||||
wa.area_code, wa.area_name, pi.product_code, pi.product_name, pi.brand, pi.category, pi.spec, pi.unit
|
wa.area_code, wa.area_name, pi.product_code, pi.product_name, pi.brand, pi.category, pi.spec, pi.unit
|
||||||
from out_record orr
|
from out_record orr
|
||||||
left join warehouse_area wa on wa.id = orr.area_id
|
left join warehouse_area wa on wa.id = orr.area_id
|
||||||
left join product_info pi on pi.id = orr.product_id
|
left join product_info pi on pi.id = orr.product_id
|
||||||
|
left join sys_user operator_user on operator_user.user_name = orr.operator
|
||||||
|
left join sys_user out_user on out_user.user_name = orr.out_operator
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectOutRecordList" parameterType="OutRecord" resultMap="OutRecordResult">
|
<select id="selectOutRecordList" parameterType="OutRecord" resultMap="OutRecordResult">
|
||||||
@ -46,7 +51,9 @@
|
|||||||
<if test="category != null and category != ''">and pi.category like concat('%', #{category}, '%')</if>
|
<if test="category != null and category != ''">and pi.category like concat('%', #{category}, '%')</if>
|
||||||
<if test="spec != null and spec != ''">and pi.spec like concat('%', #{spec}, '%')</if>
|
<if test="spec != null and spec != ''">and pi.spec like concat('%', #{spec}, '%')</if>
|
||||||
<if test="outType != null">and orr.out_type = #{outType}</if>
|
<if test="outType != null">and orr.out_type = #{outType}</if>
|
||||||
<if test="outOperator != null and outOperator != ''">and orr.out_operator like concat('%', #{outOperator}, '%')</if>
|
<if test="outOperator != null and outOperator != ''">
|
||||||
|
and coalesce(out_user.nick_name, orr.out_operator) like concat('%', #{outOperator}, '%')
|
||||||
|
</if>
|
||||||
<if test="sourceNo != null and sourceNo != ''">and orr.source_no like concat('%', #{sourceNo}, '%')</if>
|
<if test="sourceNo != null and sourceNo != ''">and orr.source_no like concat('%', #{sourceNo}, '%')</if>
|
||||||
</where>
|
</where>
|
||||||
order by orr.id desc
|
order by orr.id desc
|
||||||
|
|||||||
@ -33,14 +33,24 @@
|
|||||||
|
|
||||||
<sql id="selectPurchaseArrivalVo">
|
<sql id="selectPurchaseArrivalVo">
|
||||||
select pa.id, pa.arrival_no, pa.purchase_request_id, pa.arrival_quantity, pa.arrival_date,
|
select pa.id, pa.arrival_no, pa.purchase_request_id, pa.arrival_quantity, pa.arrival_date,
|
||||||
pa.acceptance_status, pa.acceptance_remark, pa.accepted_by, pa.accepted_time,
|
pa.acceptance_status, pa.acceptance_remark,
|
||||||
pa.pre_accept_purchase_status, pa.revoked_by, pa.revoked_time, pa.revoke_remark,
|
coalesce(accepted_user.nick_name, pa.accepted_by) as accepted_by, pa.accepted_time,
|
||||||
pa.remark, pa.create_by, pa.create_time, pa.update_by, pa.update_time,
|
pa.pre_accept_purchase_status,
|
||||||
pr.request_no, pr.applicant_id, pr.applicant_name, pr.product_id,
|
coalesce(revoked_user.nick_name, pa.revoked_by) as revoked_by,
|
||||||
|
pa.revoked_time, pa.revoke_remark, pa.remark,
|
||||||
|
coalesce(created_user.nick_name, pa.create_by) as create_by, pa.create_time,
|
||||||
|
coalesce(updated_user.nick_name, pa.update_by) as update_by, pa.update_time,
|
||||||
|
pr.request_no, pr.applicant_id,
|
||||||
|
coalesce(applicant_user.nick_name, pr.applicant_name) as applicant_name, pr.product_id,
|
||||||
pi.product_code, pr.material_name, pr.material_brand, pr.material_params, pr.unit
|
pi.product_code, pr.material_name, pr.material_brand, pr.material_params, pr.unit
|
||||||
from purchase_arrival pa
|
from purchase_arrival pa
|
||||||
join purchase_request pr on pr.id = pa.purchase_request_id
|
join purchase_request pr on pr.id = pa.purchase_request_id
|
||||||
left join product_info pi on pi.id = pr.product_id
|
left join product_info pi on pi.id = pr.product_id
|
||||||
|
left join sys_user applicant_user on applicant_user.user_id = pr.applicant_id
|
||||||
|
left join sys_user accepted_user on accepted_user.user_name = pa.accepted_by collate utf8mb4_unicode_ci
|
||||||
|
left join sys_user revoked_user on revoked_user.user_name = pa.revoked_by collate utf8mb4_unicode_ci
|
||||||
|
left join sys_user created_user on created_user.user_name = pa.create_by collate utf8mb4_unicode_ci
|
||||||
|
left join sys_user updated_user on updated_user.user_name = pa.update_by collate utf8mb4_unicode_ci
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectPurchaseArrivalList" parameterType="Long" resultMap="PurchaseArrivalResult">
|
<select id="selectPurchaseArrivalList" parameterType="Long" resultMap="PurchaseArrivalResult">
|
||||||
@ -54,7 +64,16 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectPurchaseArrivalByIdForUpdate" parameterType="Long" resultMap="PurchaseArrivalResult">
|
<select id="selectPurchaseArrivalByIdForUpdate" parameterType="Long" resultMap="PurchaseArrivalResult">
|
||||||
<include refid="selectPurchaseArrivalVo"/> where pa.id = #{id} for update
|
select pa.id, pa.arrival_no, pa.purchase_request_id, pa.arrival_quantity, pa.arrival_date,
|
||||||
|
pa.acceptance_status, pa.acceptance_remark, pa.accepted_by, pa.accepted_time,
|
||||||
|
pa.pre_accept_purchase_status, pa.revoked_by, pa.revoked_time, pa.revoke_remark,
|
||||||
|
pa.remark, pa.create_by, pa.create_time, pa.update_by, pa.update_time,
|
||||||
|
pr.request_no, pr.applicant_id, pr.applicant_name, pr.product_id,
|
||||||
|
pi.product_code, pr.material_name, pr.material_brand, pr.material_params, pr.unit
|
||||||
|
from purchase_arrival pa
|
||||||
|
join purchase_request pr on pr.id = pa.purchase_request_id
|
||||||
|
left join product_info pi on pi.id = pr.product_id
|
||||||
|
where pa.id = #{id} for update
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectActiveQuantityByRequestId" parameterType="Long" resultType="java.math.BigDecimal">
|
<select id="selectActiveQuantityByRequestId" parameterType="Long" resultType="java.math.BigDecimal">
|
||||||
|
|||||||
@ -38,7 +38,8 @@
|
|||||||
|
|
||||||
<sql id="selectPurchaseRequestVo">
|
<sql id="selectPurchaseRequestVo">
|
||||||
select pr.id, pr.request_no, pr.product_id, pr.purchase_batch_id, pr.material_name, pr.material_brand, pr.category, pr.material_params,
|
select pr.id, pr.request_no, pr.product_id, pr.purchase_batch_id, pr.material_name, pr.material_brand, pr.category, pr.material_params,
|
||||||
pr.purchase_link, pr.quantity, pr.unit, pr.expected_date, pr.applicant_id, pr.applicant_name,
|
pr.purchase_link, pr.quantity, pr.unit, pr.expected_date, pr.applicant_id,
|
||||||
|
coalesce(applicant_user.nick_name, pr.applicant_name) as applicant_name,
|
||||||
pr.purchase_status, pr.purchase_batch_no, pr.progress_remark, pr.remark,
|
pr.purchase_status, pr.purchase_batch_no, pr.progress_remark, pr.remark,
|
||||||
pr.create_by, pr.create_time, pr.update_by, pr.update_time,
|
pr.create_by, pr.create_time, pr.update_by, pr.update_time,
|
||||||
pi.product_code, pi.product_name, pi.brand as product_brand,
|
pi.product_code, pi.product_name, pi.brand as product_brand,
|
||||||
@ -48,6 +49,7 @@
|
|||||||
greatest(pr.quantity - coalesce(pa.accepted_quantity, 0) - coalesce(pa.pending_quantity, 0), 0) as remaining_quantity
|
greatest(pr.quantity - coalesce(pa.accepted_quantity, 0) - coalesce(pa.pending_quantity, 0), 0) as remaining_quantity
|
||||||
from purchase_request pr
|
from purchase_request pr
|
||||||
left join product_info pi on pi.id = pr.product_id
|
left join product_info pi on pi.id = pr.product_id
|
||||||
|
left join sys_user applicant_user on applicant_user.user_id = pr.applicant_id
|
||||||
left join (
|
left join (
|
||||||
select purchase_request_id,
|
select purchase_request_id,
|
||||||
sum(case when acceptance_status = 1 then arrival_quantity else 0 end) as accepted_quantity,
|
sum(case when acceptance_status = 1 then arrival_quantity else 0 end) as accepted_quantity,
|
||||||
@ -68,7 +70,10 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="category != null and category != ''">and pr.category like concat('%', #{category}, '%')</if>
|
<if test="category != null and category != ''">and pr.category like concat('%', #{category}, '%')</if>
|
||||||
<if test="applicantId != null">and pr.applicant_id = #{applicantId}</if>
|
<if test="applicantId != null">and pr.applicant_id = #{applicantId}</if>
|
||||||
<if test="applicantName != null and applicantName != ''">and pr.applicant_name like concat('%', #{applicantName}, '%')</if>
|
<if test="applicantName != null and applicantName != ''">
|
||||||
|
and (pr.applicant_name like concat('%', #{applicantName}, '%')
|
||||||
|
or applicant_user.nick_name like concat('%', #{applicantName}, '%'))
|
||||||
|
</if>
|
||||||
<if test="purchaseStatus != null">and pr.purchase_status = #{purchaseStatus}</if>
|
<if test="purchaseStatus != null">and pr.purchase_status = #{purchaseStatus}</if>
|
||||||
<if test="purchaseBatchNo != null and purchaseBatchNo != ''">and pr.purchase_batch_no like concat('%', #{purchaseBatchNo}, '%')</if>
|
<if test="purchaseBatchNo != null and purchaseBatchNo != ''">and pr.purchase_batch_no like concat('%', #{purchaseBatchNo}, '%')</if>
|
||||||
</where>
|
</where>
|
||||||
|
|||||||
@ -28,11 +28,16 @@
|
|||||||
|
|
||||||
<sql id="selectStockCheckRecordVo">
|
<sql id="selectStockCheckRecordVo">
|
||||||
select scr.id, scr.check_no, scr.area_id, scr.product_id, scr.book_num, scr.real_num, scr.diff_num,
|
select scr.id, scr.check_no, scr.area_id, scr.product_id, scr.book_num, scr.real_num, scr.diff_num,
|
||||||
scr.check_status, scr.check_user, scr.confirm_user, scr.confirm_time, scr.reason, scr.create_time, scr.update_time,
|
scr.check_status,
|
||||||
|
coalesce(check_user.nick_name, scr.check_user) as check_user,
|
||||||
|
coalesce(confirm_user.nick_name, scr.confirm_user) as confirm_user,
|
||||||
|
scr.confirm_time, scr.reason, scr.create_time, scr.update_time,
|
||||||
wa.area_code, wa.area_name, pi.product_code, pi.product_name, pi.brand, pi.category, pi.spec, pi.unit
|
wa.area_code, wa.area_name, pi.product_code, pi.product_name, pi.brand, pi.category, pi.spec, pi.unit
|
||||||
from stock_check_record scr
|
from stock_check_record scr
|
||||||
left join warehouse_area wa on wa.id = scr.area_id
|
left join warehouse_area wa on wa.id = scr.area_id
|
||||||
left join product_info pi on pi.id = scr.product_id
|
left join product_info pi on pi.id = scr.product_id
|
||||||
|
left join sys_user check_user on check_user.user_name = scr.check_user
|
||||||
|
left join sys_user confirm_user on confirm_user.user_name = scr.confirm_user
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectStockCheckRecordList" parameterType="StockCheckRecord" resultMap="StockCheckRecordResult">
|
<select id="selectStockCheckRecordList" parameterType="StockCheckRecord" resultMap="StockCheckRecordResult">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user