From 4a295a4ec0f0d7db8412b04c91b8b3c8b59b68e5 Mon Sep 17 00:00:00 2001 From: aikai Date: Wed, 18 Jun 2025 17:33:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(smartfactory):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=8A=9F=E8=83=BD=E5=92=8C=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=87=86=E7=A1=AE=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在处理组列表查询中添加删除标记过滤,确保只返回未删除的数据- 修复处理组汇总数据查询中的规格名称获取问题 - 新增根据 ID 获取处理组信息的查询方法 --- .../handlinggroup/HandlingGroupMapper.xml | 39 ++++++++++++------- .../HandlingSpecificationsMapper.xml | 14 +++++++ 2 files changed, 39 insertions(+), 14 deletions(-) diff --git a/zn-module-smartfactory/zn-module-smartfactory-biz/src/main/resources/mapper/handlinggroup/HandlingGroupMapper.xml b/zn-module-smartfactory/zn-module-smartfactory-biz/src/main/resources/mapper/handlinggroup/HandlingGroupMapper.xml index cbfb387e..6a3911ac 100644 --- a/zn-module-smartfactory/zn-module-smartfactory-biz/src/main/resources/mapper/handlinggroup/HandlingGroupMapper.xml +++ b/zn-module-smartfactory/zn-module-smartfactory-biz/src/main/resources/mapper/handlinggroup/HandlingGroupMapper.xml @@ -12,11 +12,13 @@ - + @@ -68,16 +71,16 @@ SUM( a.amount ) AS totalAmount, sum( a.total_count ) AS totalNum, JSON_ARRAYAGG( - JSON_OBJECT( - 'handlingSpecificationsId', a.handling_specifications_id, - 'totalCount', a.total_count, - 'amount', a.amount, - 'handlingSpecificationsName', ( - SELECT hs.specifications_name - FROM sf_handling_specifications as hs - WHERE hs.id = a.handling_specifications_id - ) - ) + JSON_OBJECT( + 'handlingSpecificationsId', a.handling_specifications_id, + 'totalCount', a.total_count, + 'amount', a.amount, + 'handlingSpecificationsName', ( + SELECT hs.specifications_name + FROM sf_handling_specifications as hs + WHERE hs.id = a.handling_specifications_id + ) + ) ) AS specificationDetails FROM sf_handling_group_amount_specifications AS a @@ -87,7 +90,6 @@ a.deleted = 0 and b.deleted = 0 - and c.deleted = 0 and a.factory_id = #{vo.factoryId} @@ -131,4 +133,13 @@ a.date_str, a.handling_group_id + diff --git a/zn-module-smartfactory/zn-module-smartfactory-biz/src/main/resources/mapper/handlingspecifications/HandlingSpecificationsMapper.xml b/zn-module-smartfactory/zn-module-smartfactory-biz/src/main/resources/mapper/handlingspecifications/HandlingSpecificationsMapper.xml index 360f1da0..6e8998af 100644 --- a/zn-module-smartfactory/zn-module-smartfactory-biz/src/main/resources/mapper/handlingspecifications/HandlingSpecificationsMapper.xml +++ b/zn-module-smartfactory/zn-module-smartfactory-biz/src/main/resources/mapper/handlingspecifications/HandlingSpecificationsMapper.xml @@ -51,4 +51,18 @@ +