Explorar o código

fix: 考勤提交服务单元状态限制

caozixuan hai 1 ano
pai
achega
35fc081ad3

+ 3 - 0
sop-business/src/main/resources/mapper/TBDingMapper.xml

@@ -39,6 +39,7 @@
             LEFT JOIN sys_supplier s ON s.id = us.supplier_id
             LEFT JOIN sys_supplier s ON s.id = us.supplier_id
 
 
             <where>
             <where>
+                AND bs.status = 'PUBLISH'
                 <if test="serviceId != null and serviceId != ''">
                 <if test="serviceId != null and serviceId != ''">
                     and d.service_id = #{serviceId}
                     and d.service_id = #{serviceId}
                 </if>
                 </if>
@@ -106,7 +107,9 @@
         LEFT JOIN t_b_user_archives_supplier us ON us.user_archives_id = ua.id
         LEFT JOIN t_b_user_archives_supplier us ON us.user_archives_id = ua.id
         LEFT JOIN t_b_crm crm ON crm.crm_no = d.crm_no
         LEFT JOIN t_b_crm crm ON crm.crm_no = d.crm_no
         LEFT JOIN sys_custom c ON c.id = crm.custom_id
         LEFT JOIN sys_custom c ON c.id = crm.custom_id
+        LEFT JOIN t_b_service bs ON bs.id = d.service_id
         <where>
         <where>
+            AND bs.status = 'PUBLISH'
             <if test="serviceId != null and serviceId != ''">
             <if test="serviceId != null and serviceId != ''">
                 and d.service_id = #{serviceId}
                 and d.service_id = #{serviceId}
             </if>
             </if>

+ 4 - 0
sop-business/src/main/resources/mapper/TBDingSubmitMapper.xml

@@ -40,6 +40,7 @@
                  tbc.lead_id AS regionManagerId,
                  tbc.lead_id AS regionManagerId,
                  tbc.region_coordinator_id AS coordinatorId,
                  tbc.region_coordinator_id AS coordinatorId,
                  tbs.update_time AS serviceUpdateTime,
                  tbs.update_time AS serviceUpdateTime,
+                 tbs.status AS serviceStatus,
                  tbc.update_time AS crmUpdateTime,
                  tbc.update_time AS crmUpdateTime,
                  tbd.sign_in_exception_count + tbd.sign_out_exception_count AS dingExceptionCount
                  tbd.sign_in_exception_count + tbd.sign_out_exception_count AS dingExceptionCount
              FROM
              FROM
@@ -91,6 +92,7 @@
                      LEFT JOIN t_f_flow_approve tffa ON tffa.flow_id = tfcfe.flow_id
                      LEFT JOIN t_f_flow_approve tffa ON tffa.flow_id = tfcfe.flow_id
                      ) main
                      ) main
         <where>
         <where>
+            AND main.serviceStatus = 'PUBLISH'
             <if test="serviceUnitId != null">
             <if test="serviceUnitId != null">
                 AND main.serviceUnitId = #{serviceUnitId}
                 AND main.serviceUnitId = #{serviceUnitId}
             </if>
             </if>
@@ -190,6 +192,7 @@
                  tbc.lead_id AS regionManagerId,
                  tbc.lead_id AS regionManagerId,
                  tbc.region_coordinator_id AS coordinatorId,
                  tbc.region_coordinator_id AS coordinatorId,
                  tbs.update_time AS serviceUpdateTime,
                  tbs.update_time AS serviceUpdateTime,
+                 tbs.status AS serviceStatus,
                  tbc.update_time AS crmUpdateTime,
                  tbc.update_time AS crmUpdateTime,
                  tbd.sign_in_exception_count + tbd.sign_out_exception_count AS dingExceptionCount
                  tbd.sign_in_exception_count + tbd.sign_out_exception_count AS dingExceptionCount
              FROM
              FROM
@@ -241,6 +244,7 @@
                      LEFT JOIN t_f_flow_approve tffa ON tffa.flow_id = tfcfe.flow_id
                      LEFT JOIN t_f_flow_approve tffa ON tffa.flow_id = tfcfe.flow_id
                 ) main
                 ) main
         <where>
         <where>
+            AND main.serviceStatus = 'PUBLISH'
             <if test="serviceUnitId != null">
             <if test="serviceUnitId != null">
                 AND main.serviceUnitId = #{serviceUnitId}
                 AND main.serviceUnitId = #{serviceUnitId}
             </if>
             </if>

+ 2 - 2
sop-business/src/main/resources/mapper/TBUserArchivesAllocationMapper.xml

@@ -77,7 +77,7 @@
                                 WHERE
                                 WHERE
                                     sr.type = 'ASSISTANT_ENGINEER'
                                     sr.type = 'ASSISTANT_ENGINEER'
                                 GROUP BY tbuaa.crm_no) assistantR ON assistantR.crm_no = tbc.crm_no
                                 GROUP BY tbuaa.crm_no) assistantR ON assistantR.crm_no = tbc.crm_no
-            WHERE tbs.status != 'CANCEL') result
+            WHERE tbs.status = 'PUBLISH') result
         <where>
         <where>
             <if test="serviceUnitId != null">
             <if test="serviceUnitId != null">
                 AND result.serviceUnitId = #{serviceUnitId}
                 AND result.serviceUnitId = #{serviceUnitId}
@@ -190,7 +190,7 @@
                                 WHERE
                                 WHERE
                                     sr.type = 'ASSISTANT_ENGINEER'
                                     sr.type = 'ASSISTANT_ENGINEER'
                                 GROUP BY tbuaa.crm_no) assistantR ON assistantR.crm_no = tbc.crm_no
                                 GROUP BY tbuaa.crm_no) assistantR ON assistantR.crm_no = tbc.crm_no
-             WHERE tbs.status != 'CANCEL') result
+             WHERE tbs.status = 'PUBLISH') result
         <where>
         <where>
             <if test="serviceUnitId != null">
             <if test="serviceUnitId != null">
                 AND result.serviceUnitId = #{serviceUnitId}
                 AND result.serviceUnitId = #{serviceUnitId}