md
This commit is contained in:
parent
d011c1fced
commit
1e6720499a
@ -172,17 +172,20 @@
|
||||
<!--获取签收异常扫描统计数据-->
|
||||
|
||||
<select id="queryScanStatList" parameterType="EmisTmsScanRecord" resultMap="ScanStatDataInfoResult">
|
||||
select t1.scan_site_code,t1.scan_count,t2.sign_count,round(round(t2.sign_count/t1.scan_count,3)*100,1) as sign_rate
|
||||
select t1.scan_site_code,t1.scan_count,t2.sign_count,round(round(ifnull(t2.sign_count,0)/t1.scan_count,3)*100,1) as sign_rate
|
||||
from (
|
||||
select a.scan_site_code ,count(DISTINCT a.main_bill_code) as scan_count
|
||||
from emis_tms_scan_record a,emis_waybill b
|
||||
where a.del_flag='0' and b.del_flag='0' and a.main_bill_code=b.bill_code
|
||||
and a.scan_type=#{scanType}
|
||||
and b.bill_code not in (
|
||||
select bill_code from emis_waybill_problem_info ewpi where ewpi.`problem_type` in(151,173,170)
|
||||
)
|
||||
and a.scan_type=#{scanType}
|
||||
|
||||
<if test="scanType != null and scanType == '20'">
|
||||
and a.scan_site_code=b.send_site_code
|
||||
</if>
|
||||
|
||||
|
||||
<if test="scanSiteCode != null and scanSiteCode != ''"> and a.scan_site_code=#{scanSiteCode}</if>
|
||||
<if test="preOrNextStationCode != null and preOrNextStationCode != ''"> and a.pre_or_next_station_code=#{preOrNextStationCode}</if>
|
||||
<if test="scanManCode != null and scanManCode != ''"> and a.scan_man_code=#{scanManCode}</if>
|
||||
@ -199,11 +202,14 @@
|
||||
)
|
||||
</if>
|
||||
GROUP BY a.scan_site_code
|
||||
) t1,
|
||||
) t1 left join
|
||||
(
|
||||
select a.scan_site_code ,count(DISTINCT a.main_bill_code) as sign_count
|
||||
from emis_tms_scan_record a,emis_waybill b
|
||||
where a.del_flag='0' and b.del_flag='0' and a.main_bill_code=b.bill_code and b.bl_sign='1'
|
||||
and b.bill_code not in (
|
||||
select bill_code from emis_waybill_problem_info ewpi where ewpi.`problem_type` in(151,173,170)
|
||||
)
|
||||
and a.scan_type=#{scanType}
|
||||
<if test="scanType != null and scanType == '20'">
|
||||
and a.scan_site_code=b.send_site_code
|
||||
@ -226,7 +232,7 @@
|
||||
</if>
|
||||
GROUP BY a.scan_site_code
|
||||
) t2
|
||||
where t1.scan_site_code=t2.scan_site_code
|
||||
on t1.scan_site_code=t2.scan_site_code
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user