|
@@ -9,7 +9,7 @@
|
|
join sys_device sd on sd.serial_no = tbdd.serial_no
|
|
join sys_device sd on sd.serial_no = tbdd.serial_no
|
|
join sys_supplier ss on ss.id = sd.supplier_id
|
|
join sys_supplier ss on ss.id = sd.supplier_id
|
|
where tbs.id = #{serviceId}
|
|
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'
|
|
and tbs.status <![CDATA[ <> ]]> 'CANCEL'
|
|
group by ss.name) t
|
|
group by ss.name) t
|
|
order by t.count desc
|
|
order by t.count desc
|
|
@@ -33,7 +33,7 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="areaDingExceptionReport" resultType="com.qmth.sop.business.bean.report.DingExceptionCountReportBean">
|
|
<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
|
|
from t_b_service tbs
|
|
join t_b_crm tbc on tbc.service_id = tbs.id
|
|
join t_b_crm tbc on tbc.service_id = tbs.id
|
|
join t_b_sop_info tbsi on tbsi.crm_no = tbc.crm_no
|
|
join t_b_sop_info tbsi on tbsi.crm_no = tbc.crm_no
|
|
@@ -49,7 +49,7 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="humanDingExceptionReport" resultType="com.qmth.sop.business.bean.report.DingExceptionCountReportBean">
|
|
<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
|
|
from t_b_service tbs
|
|
join t_b_crm tbc on tbc.service_id = tbs.id
|
|
join t_b_crm tbc on tbc.service_id = tbs.id
|
|
join t_b_sop_info tbsi on tbsi.crm_no = tbc.crm_no
|
|
join t_b_sop_info tbsi on tbsi.crm_no = tbc.crm_no
|