From 12d9d86a4236a4b8e80d5f1f4563d1212264364e Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Wed, 14 Jan 2026 14:06:09 +0800 Subject: [PATCH] =?UTF-8?q?2026-01-14=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shopOrder/ProductionReportMapper.xml | 21 ++++++++++++-- .../resources/mapper/sys/SystemLogDao.xml | 4 +-- .../warehouse/LabelTransactionLogMapper.xml | 28 +++++++++++-------- 3 files changed, 37 insertions(+), 16 deletions(-) diff --git a/src/main/resources/mapper/shopOrder/ProductionReportMapper.xml b/src/main/resources/mapper/shopOrder/ProductionReportMapper.xml index c58f1ba..377ec4c 100644 --- a/src/main/resources/mapper/shopOrder/ProductionReportMapper.xml +++ b/src/main/resources/mapper/shopOrder/ProductionReportMapper.xml @@ -261,8 +261,12 @@ B.StartDate as date1, B.ReportDate as date2, B.Reportedby, - (CASE WHEN ISNULL(A.status , '*') = '*' THEN '在制品' else a.status end) as roll_type , - (CASE WHEN B.RollNo IS NOT NULL THEN '已消耗' WHEN ISNULL(A.status , '*') != '*' THEN '待入库' ELSE '未消耗' END) AS final_status, + RollType, + (CASE WHEN RollType ='删除卷' THEN '删除卷' + WHEN RollType ]]> '删除卷' AND B.RollNo IS NOT NULL THEN '已消耗' + WHEN RollType ]]> '删除卷' AND ISNULL(A.status, '*') = '*' AND B.RollNo IS NULL THEN '未消耗' + WHEN RollType ]]> '删除卷' AND ISNULL(A.status, '*') != '*' THEN '待入库' ELSE '' + END) AS finalStatus, B.HistType, a.partNo, p.PartDescription AS partDesc, @@ -326,6 +330,12 @@ AND p.Spec like '%'+#{spec}+'%' + + AND A.RollNo like '%'+#{rollNo}+'%' + + + AND A.RollType = #{rollType} + ORDER BY A.CreatedDate DESC @@ -357,6 +367,7 @@ AND CAST(A.CreatedOpsItemNo AS VARCHAR) like '%'+CAST(#{createdOpsItemNo} AS VARCHAR)+'%' + AND B.OrderNo like '%'+#{consumeOrderNo}+'%' @@ -375,6 +386,12 @@ AND p.Spec like '%'+#{spec}+'%' + + AND A.RollNo like '%'+#{rollNo}+'%' + + + AND A.RollType = #{rollType} + \ No newline at end of file diff --git a/src/main/resources/mapper/sys/SystemLogDao.xml b/src/main/resources/mapper/sys/SystemLogDao.xml index 0c5b5d6..82b9adc 100644 --- a/src/main/resources/mapper/sys/SystemLogDao.xml +++ b/src/main/resources/mapper/sys/SystemLogDao.xml @@ -36,7 +36,7 @@ a.site in (select site from AccessSite where userID = #{userName}) OR a.site = '*' and a.bu_no in (select bu_no from AccessBu where username = #{userName}) OR a.bu_no = '*' - and type <> 'Interface' + and a.type ]]> 'Interface' AND a.interface_name LIKE '%' + #{interfaceName} + '%' @@ -89,7 +89,7 @@ a.site in (select site from AccessSite where userID = #{userName}) OR a.site = '*' and a.bu_no in (select bu_no from AccessBu where username = #{userName}) OR a.bu_no = '*' - and type <> 'Interface' + and a.type ]]> 'Interface' AND a.interface_name LIKE '%' + #{interfaceName} + '%' diff --git a/src/main/resources/mapper/warehouse/LabelTransactionLogMapper.xml b/src/main/resources/mapper/warehouse/LabelTransactionLogMapper.xml index f339814..f112db2 100644 --- a/src/main/resources/mapper/warehouse/LabelTransactionLogMapper.xml +++ b/src/main/resources/mapper/warehouse/LabelTransactionLogMapper.xml @@ -17,6 +17,8 @@ a.roll_qty AS rollQty, a.batch_no AS batchNo, a.part_no AS partNo, + d.PartDescription as partDesc, + d.Spec AS spec, a.warehouse_id as warehouseId, b.WareHouseName as warehouseName, a.location_id as locationId, @@ -30,6 +32,7 @@ FROM StockTransactionLog as a LEFT JOIN WareHouse as b ON a.site = b.site AND a.bu_no = b.bu_no AND a.warehouse_id = b.WareHouseID LEFT JOIN Location as c ON a.site = c.site AND a.bu_no = c.bu_no AND a.location_id = c.LocationID + left join part as d on a.site = d.site and a.part_no = d.PartNo WHERE a.site IN (SELECT site FROM AccessSite WHERE userID = #{query.userName}) AND a.bu_no IN (SELECT bu_no FROM AccessBu WHERE username = #{query.userName}) @@ -44,12 +47,11 @@ AND a.part_no LIKE '%' + #{query.partNo} + '%' - - AND EXISTS ( - SELECT 1 FROM Part p - WHERE p.site = a.site AND p.bu_no = a.bu_no AND p.PartNo = a.part_no - AND p.PartSpecification LIKE '%' + #{query.partSpec} + '%' - ) + + AND d.PartDescription LIKE '%' + #{query.partDesc} + '%' + + + AND d.Spec LIKE '%' + #{query.spec} + '%' AND a.document_no LIKE '%' + #{query.documentNo} + '%' @@ -77,6 +79,9 @@