md
This commit is contained in:
parent
3fad394521
commit
ef95ea5298
@ -186,11 +186,11 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
|
||||
billCodeInStr=WaybillHelper.formatQueryValue(billCodeInStr);
|
||||
String[] billCodeArrTmp = billCodeInStr.split(",");
|
||||
Set<String> billCodeSet = new HashSet();
|
||||
Set<String> billCodeSet = new HashSet<String>();
|
||||
for(int i = 0 ; i < billCodeArrTmp.length ; i++){
|
||||
billCodeSet.add(billCodeArrTmp[i]);
|
||||
}
|
||||
String billCodeArr[] = billCodeSet.toArray();
|
||||
String billCodeArr[] = (String[]) billCodeSet.toArray();
|
||||
|
||||
|
||||
// 合包和拆包需单独处理
|
||||
|
||||
@ -1097,6 +1097,13 @@
|
||||
<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.salesmen=#{params.privEmpName}
|
||||
or a.payee=#{params.privEmpName}
|
||||
or a.operate_employee_code=#{params.privEmpCode}
|
||||
@ -1271,8 +1278,12 @@
|
||||
<where>
|
||||
a.del_flag='0' and a.order_status !='0' and a.order_status!='2'
|
||||
<if test="id != null "> and a.id = #{id}</if>
|
||||
|
||||
<if test="orderSn != null and orderSn != ''"> and ( FIND_IN_SET(`order_sn`,#{orderSn}) or order_sn like concat('%', #{orderSn}, '%') ) </if>
|
||||
<if test="billCode != null and billCode != ''"> and ( FIND_IN_SET(`bill_code`,#{billCode}) or bill_code like concat('%', #{billCode}, '%') ) </if>
|
||||
|
||||
<if test="billCode != null and billCode != ''">
|
||||
and ( FIND_IN_SET(`bill_code`,#{billCode}) or bill_code like concat('%', #{billCode}, '%') )
|
||||
</if>
|
||||
|
||||
<if test="custOrderId != null and custOrderId != ''"> and cust_order_id=#{custOrderId}</if>
|
||||
<if test="billCodeSub != null and billCodeSub != ''"> and bill_code_sub like concat('%', #{billCodeSub}, '%')</if>
|
||||
@ -1431,6 +1442,19 @@
|
||||
and a.waybill_status='0' and a.order_status='0'
|
||||
</if>
|
||||
|
||||
<if test="params.problemQueryType != null and params.problemQueryType == 1 and params.problemQueryIds != null and params.problemQueryIds !=''">
|
||||
and a.bill_code in (
|
||||
select bill_code from emis_waybill_problem_info ewpi where ewpi.del_flag='0' and FIND_IN_SET( ewpi.`problem_type`, #{params.problemQueryIds} )
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="params.problemQueryType != null and params.problemQueryType == 2 and params.problemQueryIds != null and params.problemQueryIds !=''">
|
||||
and a.bill_code not in (
|
||||
select bill_code from emis_waybill_problem_info ewpi where ewpi.del_flag='0' and FIND_IN_SET( ewpi.`problem_type`, #{params.problemQueryIds} )
|
||||
)
|
||||
</if>
|
||||
|
||||
|
||||
<if test="params.waybillStatType != null and params.waybillStatType == 2">
|
||||
and a.waybill_status!='0' and a.order_status='1'
|
||||
</if>
|
||||
@ -1443,16 +1467,20 @@
|
||||
|
||||
</if>
|
||||
|
||||
<if test="params.problemQueryType != null and params.problemQueryType == 1 and params.problemQueryIds != null and params.problemQueryIds !=''">
|
||||
and a.bill_code in (
|
||||
select bill_code from emis_waybill_problem_info ewpi where ewpi.del_flag='0' and FIND_IN_SET( ewpi.`problem_type`, #{params.problemQueryIds} )
|
||||
)
|
||||
|
||||
<if test="params.beginOrderDate != null and params.beginOrderDate != ''">
|
||||
and a.order_date <![CDATA[ >= ]]> #{params.beginOrderDate}
|
||||
</if>
|
||||
<if test="params.endOrderDate != null and params.endOrderDate != ''">
|
||||
and a.order_date <![CDATA[ <= ]]> #{params.endOrderDate}
|
||||
</if>
|
||||
|
||||
<if test="params.problemQueryType != null and params.problemQueryType == 2 and params.problemQueryIds != null and params.problemQueryIds !=''">
|
||||
and a.bill_code not in (
|
||||
select bill_code from emis_waybill_problem_info ewpi where ewpi.del_flag='0' and FIND_IN_SET( ewpi.`problem_type`, #{params.problemQueryIds} )
|
||||
)
|
||||
<if test="payee != null and payee != ''">
|
||||
and a.payee=#{payee}
|
||||
</if>
|
||||
|
||||
<if test="salesmen != null and salesmen != '' " >
|
||||
and a.salesmen=#{salesmen}
|
||||
</if>
|
||||
|
||||
|
||||
@ -1495,7 +1523,7 @@
|
||||
</if>
|
||||
|
||||
<if test="params.isNeedPack != null and params.isNeedPack == 1">
|
||||
and a.bill_code not in( select etp.bill_code from emis_tms_pack_dtl etp where etp.del_flag='0' )
|
||||
and not EXISTS ( select 1 from emis_tms_pack_dtl etp where etp.del_flag='0' and etp.main_bill_code=a.bill_code )
|
||||
and a.trans_line_type in(
|
||||
select line_code from emis_trans_line etl where etl.trans_type=1
|
||||
)
|
||||
@ -1530,18 +1558,16 @@
|
||||
UNION
|
||||
SELECT #{params.privSiteCode} FROM dual
|
||||
)
|
||||
or
|
||||
a.sign_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.salesmen=#{params.privEmpName}
|
||||
or a.payee=#{params.privEmpName}
|
||||
or a.operate_employee_code=#{params.privEmpCode}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user