diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisWaybillController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisWaybillController.java index cf044a520..03d96652f 100644 --- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisWaybillController.java +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisWaybillController.java @@ -733,6 +733,9 @@ public class EmisWaybillController extends EmisBaseController if( "1".equals(waybillStatType)){ list = emisWaybillService.selectWaitGotOrderList(queryEmisWaybill); } + else if( "3".equals(waybillStatType) || "4".equals(waybillStatType) ){ + list = emisWaybillService.selectOrderList(queryEmisWaybill); + } else { list = emisWaybillService.selectEmisWaybillList(queryEmisWaybill); } diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml index 0dbc9c940..89690acec 100644 --- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml @@ -892,21 +892,7 @@ and a.create_site=#{createSite} and a.update_site=#{updateSite} - - and a.waybill_status='0' and a.order_status='0' - - - and a.waybill_status!='0' and a.order_status='1' - - - - and a.waybill_status!='0' - - - - - and a.bill_code in ( @@ -920,6 +906,42 @@ ) + + + 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} ) + ) + + + + and a.waybill_status!='0' and a.order_status!='2' + and ( + a.operate_employee_code=#{params.privEmpCode} + or a.take_piece_employee_code=#{params.privEmpCode} + or a.register_man_code=#{params.privEmpCode} + ) + + + + and a.order_status='2' + and ( + a.operate_employee_code=#{params.privEmpCode} + or a.take_piece_employee_code=#{params.privEmpCode} + ) + + + + + and a.order_status='3'and exists ( + select 1 from emis_waybill_change_to ewcto where a.bill_code=ewcto.bill_code and ewcto.change_from=#{params.privEmpCode} + ) + + and a.order_date = ]]> #{params.beginOrderDate} @@ -948,13 +970,12 @@ - and a.send_date = ]]> #{params.beginDate} + and a.create_time = ]]> #{params.beginDate} - and a.send_date #{params.endDate} + and a.create_time #{params.endDate} - and a.send_date = ]]> #{params.beginSendDate} @@ -1719,11 +1740,6 @@ and a.create_site=#{createSite} and a.update_site=#{updateSite} - - - and a.waybill_status='0' and a.order_status in('0','1') - - 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} ) @@ -1737,16 +1753,39 @@ + + 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} ) + ) + + - and a.waybill_status!='0' and a.order_status='1' + and a.waybill_status!='0' and a.order_status!='2' + and ( + a.operate_employee_code=#{params.privEmpCode} + or a.take_piece_employee_code=#{params.privEmpCode} + or a.register_man_code=#{params.privEmpCode} + ) - and a.waybill_status!='0' + and a.order_status='2' + and ( + a.operate_employee_code=#{params.privEmpCode} + or a.take_piece_employee_code=#{params.privEmpCode} + ) + - + and a.order_status='3'and exists ( + select 1 from emis_waybill_change_to ewcto where a.bill_code=ewcto.bill_code and ewcto.change_from=#{params.privEmpCode} + )