md
This commit is contained in:
parent
3dfef50536
commit
3de5779fc2
@ -461,7 +461,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
public void calcSettledWeight(EmisWaybill emisWaybill) throws CalcException {
|
public void calcSettledWeight(EmisWaybill emisWaybill) throws CalcException {
|
||||||
|
|
||||||
if (
|
if (
|
||||||
StringUtils.isAnyEmpty(emisWaybill.getProductType(), emisWaybill.getTransLineType())
|
StringUtils.isEmpty(emisWaybill.getProductType())
|
||||||
|| emisWaybill.getBillWeight() == null
|
|| emisWaybill.getBillWeight() == null
|
||||||
|| emisWaybill.getTotalVolume() == null
|
|| emisWaybill.getTotalVolume() == null
|
||||||
)
|
)
|
||||||
@ -473,12 +473,17 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
double billWeight=emisWaybill.getBillWeight().doubleValue();
|
double billWeight=emisWaybill.getBillWeight().doubleValue();
|
||||||
double totalVolume=emisWaybill.getTotalVolume().doubleValue();
|
double totalVolume=emisWaybill.getTotalVolume().doubleValue();
|
||||||
|
|
||||||
|
// 获取产品信息
|
||||||
|
EmisTransProduct emisTransProduct = getTransProductByCode(emisWaybill.getProductType());
|
||||||
|
|
||||||
// 获取泡重比,计算体积重量
|
// 获取泡重比,计算体积重量
|
||||||
EmisTransLine emisTransLine= getTransLineByCode(emisWaybill.getTransLineType());
|
EmisTransLine emisTransLine= getTransLineByCode(emisTransProduct.getTransLineCode());
|
||||||
|
|
||||||
double volumeWeight=0.0D;
|
double volumeWeight=0.0D;
|
||||||
if(!StringUtils.isEmpty(emisTransLine.getMeterRate())) {
|
if(!StringUtils.isEmpty(emisTransLine.getMeterRate())) {
|
||||||
volumeWeight=totalVolume * (1000000 / Double.valueOf(emisTransLine.getMeterRate()));
|
volumeWeight=totalVolume * (1000000 / Double.valueOf(emisTransLine.getMeterRate()));
|
||||||
|
}else{
|
||||||
|
volumeWeight=billWeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
emisWaybill.setVolumeWeight(BigDecimal.valueOf(volumeWeight));
|
emisWaybill.setVolumeWeight(BigDecimal.valueOf(volumeWeight));
|
||||||
@ -486,7 +491,6 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
double maxWeight = Math.max(billWeight,volumeWeight);
|
double maxWeight = Math.max(billWeight,volumeWeight);
|
||||||
|
|
||||||
// 取重方式
|
// 取重方式
|
||||||
EmisTransProduct emisTransProduct = getTransProductByCode(emisWaybill.getProductType());
|
|
||||||
String carryType=emisTransProduct.getCarryType();
|
String carryType=emisTransProduct.getCarryType();
|
||||||
|
|
||||||
double setteldWeight = WaybillHelper.calcSettledWeight(maxWeight,carryType);
|
double setteldWeight = WaybillHelper.calcSettledWeight(maxWeight,carryType);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user