From 576c52d8d8e6fb1e738380cc5fc101a6a2b0b3a8 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期六, 04 九月 2021 16:00:57 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity

---
 java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml
old mode 100644
new mode 100755
index 4fefdba..d4dab74
--- a/java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml
@@ -131,7 +131,8 @@
         t.repair_materials,t.repair_materials repairMaterials,t.repair_fee,t.repair_fee repairFee,
         rs.repair_type_name repairTypeName,rs.repair_way repairWay,rs.return_visit_flag returnVisitFlag,
         t.repair_obj_type,t.repair_obj_id,t.repair_obj_name,t.repair_obj_type repairObjType,t.repair_obj_id repairObjId,
-        t.repair_obj_name repairObjName,rrv.visit_type visitType,rrv.context visitContext
+        t.repair_obj_name repairObjName,rrv.visit_type visitType,rrv.context visitContext,a.appraise_score appraiseScore,
+        a.door_speed_score doorSpeedScore,a.repairman_service_score repairmanServiceScore
         <if test="staffId != null and staffId != ''">
             ,rru.state repairDispatchState,rru.context repairDispatchContext,td.name repairDispatchStateName
         </if>
@@ -140,11 +141,12 @@
         left join r_repair_setting rs on rs.repair_type = t.repair_type and rs.status_cd = '0'
         left join r_repair_return_visit rrv on t.repair_id = rrv.repair_id and rrv.community_id = t.community_id and
         rrv.status_cd = '0'
+        left join appraise a on a.obj_id = t.repair_id and a.status_cd = '0'
         <if test="staffId != null and staffId != ''">
             ,r_repair_user rru
             ,t_dict td
         </if>
-        where 1 =1
+        where 1 = 1
         <if test="staffId != null and staffId != ''">
             and t.repair_id = rru.repair_id
             and rru.user_id = #{staffId}
@@ -555,11 +557,13 @@
 
     <!-- 鏌ヨ鎶ヤ慨淇℃伅鏁伴噺 add by wuxw 2018-07-03 -->
     <select id="queryStaffFinishRepairsCount" parameterType="Map" resultType="Map">
-        select count(1) count
+        select count(DISTINCT(t.repair_id)) count
         from r_repair_pool t
         left join t_dict d on t.state = d.status_cd and d.table_name = 'r_repair_pool' and d.table_columns = 'state'
         left join r_repair_setting rs on rs.repair_type = t.repair_type and rs.status_cd = '0'
         left join r_repair_user ru on t.repair_id = ru.repair_id and t.status_cd = 0
+        left join t_dict td on rs.return_visit_flag = td.status_cd and td.table_name='r_repair_setting' and
+        td.table_columns='return_visit_flag'
         where 1 =1
         and ru.state in ('10002','10003','10004','10005','10009','11000','12000')
         <if test="staffId != null and staffId != ''">
@@ -607,6 +611,8 @@
         <if test="repairObjId !=null and repairObjId != ''">
             and t.repair_obj_id= #{repairObjId}
         </if>
-        group by ru.staff_id
+        <if test="staffId != null and staffId != ''">
+            group by ru.staff_id
+        </if>
     </select>
 </mapper>

--
Gitblit v1.8.0