md
This commit is contained in:
parent
619deac335
commit
718f6090e7
@ -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<EmisCommissionQuote> 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<empCodeArr.length;i++) {
|
||||
EmisCommissionDtl emisCommissionDtl = new EmisCommissionDtl();
|
||||
emisCommissionDtl.setBillCode(waybill.getBillCode());
|
||||
emisCommissionDtl.setFeeType(quoteItem.getFeeType());
|
||||
@ -755,13 +752,12 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
|
||||
emisCommissionDtl.setBillMonth(billMonth);
|
||||
emisCommissionDtl.setMoney(BigDecimal.valueOf(profitMoney));
|
||||
|
||||
emisCommissionDtl.setEmpCode(empCodeArr[i]);
|
||||
emisCommissionDtl.setEmpName(empNameArr[i]);
|
||||
emisCommissionDtl.setEmpCode("-1");
|
||||
emisCommissionDtl.setEmpName(salesmen);
|
||||
|
||||
emisCommissionDtl.setFeeRemark(calcExprStr);
|
||||
|
||||
emisCommissionDtlMapper.insertEmisCommissionDtl(emisCommissionDtl);
|
||||
}
|
||||
}else{
|
||||
log.error("计算提成费用为0");
|
||||
}
|
||||
|
||||
@ -43,18 +43,21 @@
|
||||
<if test="quoteId != null "> and quote_id = #{quoteId}</if>
|
||||
<if test="quoteCode != null and quoteCode != ''"> and quote_code like concat('%', #{quoteCode}, '%')</if>
|
||||
<if test="quoteName != null and quoteName != ''"> and quote_name like concat('%', #{quoteName}, '%')</if>
|
||||
<if test="fromCountry != null and fromCountry != ''"> and FIND_IN_SET(#{fromCountry},from_country)</if>
|
||||
<if test="country != null and country != ''"> and FIND_IN_SET(#{country},country)</if>
|
||||
<if test="fromCountry != null and fromCountry != ''"> and ( FIND_IN_SET(#{fromCountry},from_country) or from_country='-1')</if>
|
||||
<if test="country != null and country != ''"> and ( FIND_IN_SET(#{country},country) or country='-1' ) </if>
|
||||
<if test="feeType != null and feeType != ''"> and fee_type=#{feeType}</if>
|
||||
<if test="calcType != null and calcType != ''"> and calc_type=#{calcType}</if>
|
||||
<if test="postType != null and postType != ''"> and post_type=#{postType}</if>
|
||||
<if test="transType != null and transType != ''"> and trans_type=#{transType}</if>
|
||||
<if test="blOpen != null and blOpen != ''"> and bl_open=#{blOpen}</if>
|
||||
<if test="empCode != null and empCode != ''"> and emp_code=#{empCode}</if>
|
||||
<if test="empName != null and empName != ''"> and emp_name like concat('%', #{empName}, '%')</if>
|
||||
<if test="empCode != null and empCode != ''"> and ( FIND_IN_SET(#{empCode},emp_code) or emp_code='-1')</if>
|
||||
<if test="empName != null and empName != ''"> and ( FIND_IN_SET(#{empName},emp_name) or emp_name='全部') </if>
|
||||
|
||||
<if test="transLineCode != null and transLineCode != ''"> and trans_line_code=#{transLineCode} </if>
|
||||
<if test="prodCode != null and prodCode != ''"> and FIND_IN_SET(#{prodCode},prod_code) </if>
|
||||
|
||||
<if test="params.sendDate != null ">
|
||||
and start_date <![CDATA[ <= ]]> now() and end_date <![CDATA[ > ]]> now() and bl_open='1'
|
||||
and start_date <![CDATA[ <= ]]> #{params.sendDate} and end_date <![CDATA[ > ]]> #{params.sendDate} and bl_open='1'
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user