wangliang il y a 8 mois
Parent
commit
f1dbe5ff4f

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

@@ -9,7 +9,7 @@
         join sys_device sd on sd.serial_no = tbdd.serial_no
         join sys_supplier ss on ss.id = sd.supplier_id
         where tbs.id = #{serviceId}
-        and ss.`type` = 'DEVICE' and tbdd.status = 'USING'
+        and ss.`type` = 'DEVICE' and tbdd.status in ('USING','IN','TRANSFER','TRANSFER_SIGN')
         and tbs.status <![CDATA[ <> ]]> 'CANCEL'
         group by ss.name) t
         order by t.count desc
@@ -33,7 +33,7 @@
     </select>
 
     <select id="areaDingExceptionReport" resultType="com.qmth.sop.business.bean.report.DingExceptionCountReportBean">
-        select * from(select distinct su.real_name as areaManagerName,sum(case when tbd.sign_in_time is null or tbd.sign_out_time is null then 1 else 0 end) as count
+        select * from(select distinct su.real_name as areaManagerName,sum(case when tbd.sign_in_time is null or tbd.sign_out_time is null or tbd.sign_in_address = '(补卡)' or tbd.sign_out_address = '(补卡)' then 1 else 0 end) as count
         from t_b_service tbs
         join t_b_crm tbc on tbc.service_id = tbs.id
         join t_b_sop_info tbsi on tbsi.crm_no = tbc.crm_no
@@ -49,7 +49,7 @@
     </select>
 
     <select id="humanDingExceptionReport" resultType="com.qmth.sop.business.bean.report.DingExceptionCountReportBean">
-        select * from(select distinct ss.name as humanSupplierName,sum(case when tbd.sign_in_time is null or tbd.sign_out_time is null then 1 else 0 end) as count
+        select * from(select distinct ss.name as humanSupplierName,sum(case when tbd.sign_in_time is null or tbd.sign_out_time is null or tbd.sign_in_address = '(补卡)' or tbd.sign_out_address = '(补卡)' then 1 else 0 end) as count
           from t_b_service tbs
                    join t_b_crm tbc on tbc.service_id = tbs.id
                    join t_b_sop_info tbsi on tbsi.crm_no = tbc.crm_no