md
This commit is contained in:
parent
a610b15185
commit
6732d3c313
@ -1284,42 +1284,43 @@
|
|||||||
and bl_sign!='1' and waybill_status!='40'
|
and bl_sign!='1' and waybill_status!='40'
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
<if test="params.isNeedBatch == null and salesmen == null" >
|
||||||
|
<if test=" params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||||
|
and (
|
||||||
|
|
||||||
<if test="(params.isNeedBatch == null and salesmen == null) and params.privSiteCode != null and params.privSiteCode != '88888'">
|
a.send_site_code in (
|
||||||
and (
|
SELECT t1.site_code FROM (
|
||||||
|
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
||||||
a.send_site_code in (
|
#{params.privSiteCode} ) pd
|
||||||
SELECT t1.site_code FROM (
|
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
||||||
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
UNION
|
||||||
#{params.privSiteCode} ) pd
|
SELECT #{params.privSiteCode} FROM dual
|
||||||
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
|
||||||
UNION
|
|
||||||
SELECT #{params.privSiteCode} FROM dual
|
|
||||||
)
|
|
||||||
or
|
|
||||||
a.dispatch_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
|
|
||||||
)
|
|
||||||
<if test="params.isQueryPrintOrder != null and params.isQueryPrintOrder == 1">
|
|
||||||
or EXISTS (select 1 from emis_tms_scan_record etsr where a.bill_code=etsr.main_bill_code and etsr.scan_site_code=#{params.privSiteCode})
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<if test="custNo != null and custNo != ''">
|
|
||||||
or EXISTS (
|
|
||||||
select 1 from emis_customer_user ecu where a.cust_no=ecu.monthly_pay_code and ecu.owner_site=#{params.privSiteCode}
|
|
||||||
)
|
)
|
||||||
</if>
|
or
|
||||||
|
a.dispatch_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
|
||||||
|
)
|
||||||
|
<if test="params.isQueryPrintOrder != null and params.isQueryPrintOrder == 1">
|
||||||
|
or EXISTS (select 1 from emis_tms_scan_record etsr where a.bill_code=etsr.main_bill_code and etsr.scan_site_code=#{params.privSiteCode})
|
||||||
|
</if>
|
||||||
|
|
||||||
or a.salesmen=#{params.privEmpName}
|
<if test="custNo != null and custNo != ''">
|
||||||
or a.payee=#{params.privEmpName}
|
or EXISTS (
|
||||||
or a.operate_employee_code=#{params.privEmpCode}
|
select 1 from emis_customer_user ecu where a.cust_no=ecu.monthly_pay_code and ecu.owner_site=#{params.privSiteCode}
|
||||||
or a.take_piece_employee_code=#{params.privEmpCode}
|
)
|
||||||
)
|
</if>
|
||||||
|
|
||||||
|
or a.salesmen=#{params.privEmpName}
|
||||||
|
or a.payee=#{params.privEmpName}
|
||||||
|
or a.operate_employee_code=#{params.privEmpCode}
|
||||||
|
or a.take_piece_employee_code=#{params.privEmpCode}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</where>
|
</where>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user