demand: TMS系统 - 签收管理 - 签收异常对比-运输方式为空运且清关方式为自清自提的运单默认已签收
committer: heyu
This commit is contained in:
parent
8e60cdeab1
commit
2c6efb973c
@ -165,11 +165,13 @@
|
||||
select bill_code from emis_waybill_problem_info ewpi where ewpi.del_flag='0' and ewpi.`problem_type` in(151,173,170)
|
||||
)-->
|
||||
<select id="queryScanStatList" parameterType="EmisTmsScanRecord" resultMap="ScanStatDataInfoResult">
|
||||
select tbA.scan_site_code ,count(tbA.bill_code) as scan_count,sum(if(tbA.bl_sign=1,1,0)) as sign_count,round(round(ifnull(sum(if(tbA.bl_sign=1,1,0)),0)/count(tbA.bill_code),3)*100,1) as sign_rate
|
||||
select tbA.scan_site_code ,count(tbA.bill_code) as scan_count,sum(if(tbA.bl_sign=1 or (tbA.customs_clear=2 and tbA.trans_type=2),1,0)) as sign_count,round(round(ifnull(sum(if(tbA.bl_sign=1 or (tbA.customs_clear=2 and tbA.trans_type=2),1,0)),0)/count(tbA.bill_code),3)*100,1) as sign_rate
|
||||
from (
|
||||
select DISTINCT a.scan_site_code,b.bill_code , b.bl_sign
|
||||
from emis_tms_scan_record a,emis_waybill b
|
||||
where a.del_flag='0' and b.del_flag='0' and a.bill_code=b.bill_code
|
||||
select DISTINCT a.scan_site_code,b.bill_code , b.bl_sign, b.customs_clear, k.trans_type
|
||||
from emis_tms_scan_record a
|
||||
inner join emis_waybill b on a.bill_code=b.bill_code
|
||||
left join emis_trans_line k on b.trans_line_type=k.line_code and k.del_flag='0'
|
||||
where a.del_flag='0' and b.del_flag='0'
|
||||
and not EXISTS (
|
||||
select 1 from emis_waybill_problem_info ewpi where ewpi.bill_code=b.bill_code and ewpi.del_flag='0' and ewpi.`problem_type` in(151,173,170)
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user