Merge branch 'master' of http://git.xdadan.loc/tanex/emis-service
This commit is contained in:
commit
75ea8c1cce
@ -36,7 +36,6 @@ package com.xdadan.erp.emis.service;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections.MapUtils;
|
import org.apache.commons.collections.MapUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.text.WordUtils;
|
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -261,9 +260,7 @@ public class EmisBaseService {
|
|||||||
String newSettleType=getWaybillSettleType(newBill);
|
String newSettleType=getWaybillSettleType(newBill);
|
||||||
|
|
||||||
// 结算方式相同,判断增加的额度是否在范围内
|
// 结算方式相同,判断增加的额度是否在范围内
|
||||||
if (oldSettleType.equals(newSettleType) &&
|
if (oldSettleType.equals(newSettleType) && checkOperator(oldBill, newBill, newSettleType)) {
|
||||||
(oldBill.getPayee().equals(newBill.getPayee()) ||
|
|
||||||
oldBill.getCustNo().equals(newBill.getCustNo()))) {
|
|
||||||
BigDecimal changeMoney=newBill.getFreight().subtract(oldBill.getFreight());
|
BigDecimal changeMoney=newBill.getFreight().subtract(oldBill.getFreight());
|
||||||
if(changeMoney.compareTo(BigDecimal.ZERO)>0){
|
if(changeMoney.compareTo(BigDecimal.ZERO)>0){
|
||||||
if("2".equals(newSettleType)){
|
if("2".equals(newSettleType)){
|
||||||
@ -349,6 +346,13 @@ public class EmisBaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean checkOperator(EmisWaybill oldBill, EmisWaybill newBill, String newSettleType) {
|
||||||
|
if ("2".equals(newSettleType)) {
|
||||||
|
return oldBill.getCustNo().equals(newBill.getCustNo());
|
||||||
|
}
|
||||||
|
return oldBill.getPayee().equals(newBill.getPayee());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算并返回销售临时额度总额
|
* 计算并返回销售临时额度总额
|
||||||
* tempCreditMoney = creditMoney + tempCreditMoneyAdjust
|
* tempCreditMoney = creditMoney + tempCreditMoneyAdjust
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user