From ba2a88b235360c8bea43f1c3adc90df84f437576 Mon Sep 17 00:00:00 2001 From: jiaosong <jiaosong6760@dingtalk.com> Date: 星期三, 23 八月 2023 11:48:04 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- server/src/main/resources/mappers/WorkorderRecordExtMapper.xml | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/src/main/resources/mappers/WorkorderRecordExtMapper.xml b/server/src/main/resources/mappers/WorkorderRecordExtMapper.xml index 0b73dbf..e24c1d8 100644 --- a/server/src/main/resources/mappers/WorkorderRecordExtMapper.xml +++ b/server/src/main/resources/mappers/WorkorderRecordExtMapper.xml @@ -490,9 +490,9 @@ </select> <select id="getUserProduceTopData" parameterType="doumeemes.dao.ext.dto.QueryWorkorderRecordExtDTO" resultType="doumeemes.dao.business.dto.statistics.UserProduceTopModel"> - SELECT sum(a.num) as doneNum,b.user_id as userId,b.`NAME` as userName,b.PHONE + SELECT sum(a.QUALIFIED_NUM) as doneNum,b.user_id as userId,b.`NAME` as userName,b.PHONE from workorder_record a - left join company_user b on b.DELETED=0 and b.user_id=a.CREATE_USER + left join company_user b on b.DELETED=0 and b.user_id=a.CREATE_USER and b.root_depart_id=a.root_depart_id left join workorder c on a.WORKORDER_ID=c.id where to_days(a.create_time)=to_days(now()) and a.deleted=0 and a.ROOT_DEPART_ID=#{rootDepartId} and a.DEPART_ID=#{departId} and c.status=4 <if test="procedureId != null"> @@ -526,7 +526,7 @@ <if test="procedureId != null"> AND a.`PROCEDURE_ID` = #{procedureId} </if> - GROUP BY TO_DAYS(d.ID ) + GROUP BY b.CATEGORY_ID order by unqualifiedNum desc limit 6 </select> @@ -537,7 +537,7 @@ from workorder_record a left join material_distribute b on a.MATERIAL_ID=b.ID left join material c on b.MATERIAL_ID=c.ID - left join company_user d on d.DELETED=0 and d.user_id=a.CREATE_USER + left join company_user d on d.DELETED=0 and d.user_id=a.CREATE_USER and d.root_depart_id=a.root_depart_id left JOIN workorder e on e.id=a.WORKORDER_ID where a.DELETED = 0 AND a.ROOT_DEPART_ID=#{rootDepartId} and a.DEPART_ID=#{departId} AND e.`STATUS` = 4 <if test="procedureId != null"> -- Gitblit v1.9.3