md
This commit is contained in:
parent
d9fd384b44
commit
b6ec3ca8b8
@ -85,6 +85,9 @@ public class EmisCommonToolsController extends EmisBaseController
|
||||
|
||||
Map orderMap=emisBaseService.getWaybillStatMap(emisWaybill);
|
||||
|
||||
|
||||
// tba.waitGotCount,tbb.hasDoCount,tbc.hasCancelCount,tbd.hasChangeToCount
|
||||
|
||||
Map orderStatMap = new HashMap();
|
||||
int waitTakeNum=(int)orderMap.getOrDefault("waitDoNum",0);
|
||||
int takeNum=(int)orderMap.getOrDefault("hasDoNum",0);
|
||||
|
||||
@ -1192,10 +1192,16 @@
|
||||
|
||||
|
||||
<if test="params.waybillStatType != null and params.waybillStatType == 1">
|
||||
and a.waybill_status='0' and a.order_status='0'
|
||||
and a.order_type='0'
|
||||
and a.waybill_status='0'
|
||||
and a.order_status in('0','3')
|
||||
and (
|
||||
a.take_piece_employee_code=#{params.privEmpCode}
|
||||
or (a.pickup_method in('1','3') and a.operate_employee_code is null )
|
||||
or (a.operate_employee_code=#{params.privEmpCode} )
|
||||
)
|
||||
</if>
|
||||
|
||||
|
||||
<if test="params.waybillStatType != null and params.waybillStatType == 2">
|
||||
and a.waybill_status!='0' and a.order_status!='2'
|
||||
and (
|
||||
@ -2056,7 +2062,9 @@
|
||||
SELECT #{params.privSiteCode} FROM dual
|
||||
)
|
||||
and (
|
||||
a.take_piece_employee_code=#{params.privEmpCode} or (a.take_piece_employee_code is null)
|
||||
a.take_piece_employee_code=#{params.privEmpCode}
|
||||
or (a.pickup_method in('1','3') and a.operate_employee_code is null )
|
||||
or (a.operate_employee_code=#{params.privEmpCode} )
|
||||
)
|
||||
)
|
||||
</if>
|
||||
@ -2073,11 +2081,18 @@
|
||||
where a.del_flag='0'
|
||||
and a.waybill_status!='0'
|
||||
and a.order_status!='2'
|
||||
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and a.send_site_code in (
|
||||
SELECT t1.site_code FROM (
|
||||
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
||||
#{params.privSiteCode} ) pd
|
||||
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
||||
UNION
|
||||
SELECT #{params.privSiteCode} FROM dual
|
||||
)
|
||||
and (
|
||||
(a.operate_employee_code is not null and a.operate_employee_code=#{params.privEmpCode} )
|
||||
or (a.take_piece_employee_code is not null and a.take_piece_employee_code=#{params.privEmpCode} )
|
||||
a.operate_employee_code=#{params.privEmpCode}
|
||||
or a.take_piece_employee_code=#{params.privEmpCode}
|
||||
or a.register_man_code=#{params.privEmpCode}
|
||||
)
|
||||
</if>
|
||||
@ -2094,12 +2109,19 @@
|
||||
where a.del_flag='0'
|
||||
and a.order_status='2'
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and (
|
||||
(a.operate_employee_code is not null and a.operate_employee_code=#{params.privEmpCode} )
|
||||
or
|
||||
(a.take_piece_employee_code is not null and a.take_piece_employee_code=#{params.privEmpCode} )
|
||||
and a.send_site_code in (
|
||||
SELECT t1.site_code FROM (
|
||||
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
||||
#{params.privSiteCode} ) pd
|
||||
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
||||
UNION
|
||||
SELECT #{params.privSiteCode} FROM dual
|
||||
)
|
||||
and (
|
||||
a.operate_employee_code=#{params.privEmpCode}
|
||||
or a.take_piece_employee_code=#{params.privEmpCode}
|
||||
or a.register_man_code=#{params.privEmpCode}
|
||||
)
|
||||
|
||||
</if>
|
||||
<if test="params.beginDate != null and params.beginDate != ''">
|
||||
and a.send_date <![CDATA[ >= ]]> #{params.beginDate}
|
||||
@ -2114,6 +2136,15 @@
|
||||
where a.del_flag='0'
|
||||
and a.order_status='3'
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and a.send_site_code in (
|
||||
SELECT t1.site_code FROM (
|
||||
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
||||
#{params.privSiteCode} ) pd
|
||||
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
||||
UNION
|
||||
SELECT #{params.privSiteCode} FROM dual
|
||||
)
|
||||
|
||||
and exists (
|
||||
select 1 from emis_waybill_change_to ewcto where a.bill_code=ewcto.bill_code and ewcto.change_from=#{params.privEmpCode}
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user