diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCommissionProfitServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCommissionProfitServiceImpl.java index c241a2a4f..04ab29208 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCommissionProfitServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCommissionProfitServiceImpl.java @@ -674,9 +674,6 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements * @param waybill */ private void calcSalesProfit(EmisWaybill waybill){ - String pickUpMethod=waybill.getPickupMethod(); - String takePieceEmployeeCode=waybill.getTakePieceEmployeeCode(); - String operateEmployeeCode=waybill.getOperateEmployeeCode(); String salesmen=waybill.getSalesmen(); String billMonth= DateUtils.parseDateToStr(DateUtils.YYYY_MM,waybill.getSendDate()); String country=waybill.getReceiveCountry(); @@ -686,7 +683,10 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements emisCommissionQuote.setPostType("1"); emisCommissionQuote.setCountry(country); emisCommissionQuote.setFromCountry(fromCountry); -// emisCommissionQuote.setEmpCode(); + + emisCommissionQuote.setEmpName(salesmen); + emisCommissionQuote.getParams().put("sendDate",waybill.getSendDate()); + // 获取提成方案 List listQuote = emisCommissionQuoteMapper.selectEmisCommissionQuoteList(emisCommissionQuote); if(!CollectionUtils.isEmpty(listQuote)){ @@ -745,9 +745,6 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements // 插入提成 if(BigDecimal.valueOf(profitMoney).compareTo(BigDecimal.ZERO)>0) { - String[] empCodeArr = empCode.split(","); - String[] empNameArr = empName.split(","); - for(int i=0;i and quote_id = #{quoteId} and quote_code like concat('%', #{quoteCode}, '%') and quote_name like concat('%', #{quoteName}, '%') - and FIND_IN_SET(#{fromCountry},from_country) - and FIND_IN_SET(#{country},country) + and ( FIND_IN_SET(#{fromCountry},from_country) or from_country='-1') + and ( FIND_IN_SET(#{country},country) or country='-1' ) and fee_type=#{feeType} and calc_type=#{calcType} and post_type=#{postType} and trans_type=#{transType} and bl_open=#{blOpen} - and emp_code=#{empCode} - and emp_name like concat('%', #{empName}, '%') + and ( FIND_IN_SET(#{empCode},emp_code) or emp_code='-1') + and ( FIND_IN_SET(#{empName},emp_name) or emp_name='全部') + + and trans_line_code=#{transLineCode} + and FIND_IN_SET(#{prodCode},prod_code) - and start_date now() and end_date ]]> now() and bl_open='1' + and start_date #{params.sendDate} and end_date ]]> #{params.sendDate} and bl_open='1'