新购入库查询修改

This commit is contained in:
bonus 2025-06-16 15:42:35 +08:00
parent 4f133288a3
commit 141248aebc
1 changed files with 5 additions and 7 deletions

View File

@ -223,13 +223,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt.type_name AS materialModel,
pcd.check_num AS purchaseNum,
pcd.check_num AS checkNum,
pcd.bind_num AS bindNum,
ifnull(pcd.bind_num,0) AS bindNum,
pcd.type_id as typeId,
mt.unit_name AS unitName,
ms.supplier AS supplierName,
pcd.production_time AS productDate,
mt.manage_type AS manageType,
pcd.`status` AS STATUS,
pcd.`status` ,
pm.ma_code AS maCode,
pm.out_fac_code AS outFacCode,
pm.qr_code AS qrCode
@ -242,15 +242,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN ma_supplier_info ms ON pcd.supplier_id = ms.supplier_id
LEFT JOIN bm_qrcode_info pm on pcd.task_id = pm.task_id and pm.type_id = pcd.type_id
where 1 = 1
<if test="typeId != null and typeId != ''">
<if test="typeId != null ">
AND mt.type_id = #{typeId}
</if>
<if test="supplierId != null and supplierId != ''">
<if test="supplierId != null ">
AND ms.supplier_id = #{supplierId}
</if>
<if test="productDate != null and productDate != ''">
<![CDATA[ AND DATE_FORMAT( pcd.production_time, '%Y-%m-%d' ) = #{productDate} ]]>
</if>
<if test="taskId != null">
AND pcd.task_id = #{taskId}
</if>