From 074f334d060ec7d33d39cdeaae5ed84a2a2dd3a3 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 22 八月 2023 18:20:59 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmMes
---
server/src/main/resources/mappers/PlansExtMapper.xml | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/server/src/main/resources/mappers/PlansExtMapper.xml b/server/src/main/resources/mappers/PlansExtMapper.xml
index f2dd8e4..e48e1b2 100644
--- a/server/src/main/resources/mappers/PlansExtMapper.xml
+++ b/server/src/main/resources/mappers/PlansExtMapper.xml
@@ -123,7 +123,7 @@
<select id="selectByModel" parameterType="doumeemes.dao.ext.dto.QueryPlansExtDTO" resultMap="PlansExtListVO">
SELECT
`a`.*
- ,ifnull(( SELECT sum( b.PLAN_NUM ) FROM workorder b WHERE b.deleted = 0 AND b.PLAN_ID = a.id and b.status = 4 ),0) AS workorderDistributNum
+ , ifnull(( SELECT sum( b.UNQUALIFIED_NUM + QUALIFIED_NUM ) FROM workorder b WHERE b.deleted = 0 AND b.PLAN_ID = a.id and b.status = 4 ),0) AS workorderDistributNum
from plans a
<where>
<if test="id != null">
@@ -298,19 +298,19 @@
left join procedures b on a.PROCEDURE_ID =b.ID
where ( a.`STATUS` in (1,4) or a.`STATUS`=6 and EXISTS(select e.id from workorder_record e where e.PLAN_ID = a.id and TO_DAYS(now())=TO_DAYS(e.CREATE_TIME)))
and a.ROOT_DEPART_ID=#{rootDepartId} and a.DEPART_ID=#{departId}
- and b.DELETED=0 and a.ROOT_DEPART_ID=132
+ and b.DELETED=0
GROUP BY a.PROCEDURE_ID
order by b.SORTNUM
</select>
<select id="selectStatisticsList" parameterType="doumeemes.dao.ext.dto.QueryPlansExtDTO" resultType="doumeemes.dao.business.dto.statistics.ProcedurePlansPageModel">
- select a.status,a.NUM,m.name as categoryName,m.code as materialCode
+ select a.status,a.NUM,m.name as categoryName,m.code as materialCode,m.name as materialName
,(select sum(b.UNQUALIFIED_NUM) from workorder_record b where b.type=1 and b.DELETED=0 and b.PLAN_ID=a.id) as unqualifiedNum
,(select sum(b.QUALIFIED_NUM) from workorder_record b where b.type=1 and b.DELETED=0 and b.PLAN_ID=a.id) as qualifiedNum
FROM `plans` `a`
LEFT JOIN `material_distribute` c ON a.MATERIAL_ID=c.ID
LEFT JOIN `material` m ON c.MATERIAL_ID=m.ID
where (a.status in (1,4) or (a.status=6 and EXISTS(select b.id from workorder_record b where b.type=1 and b.DELETED=0 and b.PLAN_ID=a.id) ))
- and a.deleted=0 and a.ROOT_DEPART_ID=#{rootDepartId} and a.DEPART_ID=#{departId}
+ and a.deleted=0 and a.ROOT_DEPART_ID=#{rootDepartId} and a.DEPART_ID=#{departId} and a.PROCEDURE_ID=#{procedureId}
order by a.CREATE_TIME
</select>
<select id="selectList" parameterType="doumeemes.dao.ext.dto.QueryPlansExtDTO" resultMap="PlansExtListVO">
--
Gitblit v1.9.3