md
This commit is contained in:
parent
722c36a6b7
commit
31789e174d
@ -569,7 +569,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
if (
|
if (
|
||||||
StringUtils.isEmpty(emisWaybill.getProductType())
|
StringUtils.isEmpty(emisWaybill.getProductType())
|
||||||
|| emisWaybill.getBillWeight() == null
|
|| emisWaybill.getBillWeight() == null
|
||||||
|| emisWaybill.getTotalVolume() == null
|
|| emisWaybill.getVolumeWeight() == null
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -577,34 +577,17 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
}
|
}
|
||||||
|
|
||||||
double billWeight=emisWaybill.getBillWeight().doubleValue();
|
double billWeight=emisWaybill.getBillWeight().doubleValue();
|
||||||
double totalVolume=emisWaybill.getTotalVolume().doubleValue();
|
double volumeWeight=emisWaybill.getVolumeWeight().doubleValue();
|
||||||
|
|
||||||
// 获取产品信息
|
// 获取产品信息
|
||||||
EmisTransProduct emisTransProduct = getTransProductByCode(emisWaybill.getProductType());
|
EmisTransProduct emisTransProduct = getTransProductByCode(emisWaybill.getProductType());
|
||||||
|
// 两者取大
|
||||||
// 获取泡重比,计算体积重量
|
|
||||||
EmisTransLine emisTransLine= getTransLineByCode(emisTransProduct.getTransLineCode());
|
|
||||||
|
|
||||||
double volumeWeight=0.0D;
|
|
||||||
if(!StringUtils.isEmpty(emisTransLine.getMeterRate())) {
|
|
||||||
volumeWeight=totalVolume * (1000000 / Double.valueOf(emisTransLine.getMeterRate()));
|
|
||||||
DecimalFormat df = new DecimalFormat("#.#####");
|
|
||||||
volumeWeight= Double.parseDouble(df.format(volumeWeight));
|
|
||||||
}else{
|
|
||||||
volumeWeight=billWeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
emisWaybill.setVolumeWeight(BigDecimal.valueOf(volumeWeight));
|
|
||||||
// 两则取大
|
|
||||||
double maxWeight = Math.max(billWeight,volumeWeight);
|
double maxWeight = Math.max(billWeight,volumeWeight);
|
||||||
|
|
||||||
// 取重方式
|
// 取重方式
|
||||||
String carryType=emisTransProduct.getCarryType();
|
String carryType=emisTransProduct.getCarryType();
|
||||||
|
|
||||||
double setteldWeight = WaybillHelper.calcSettledWeight(maxWeight,carryType);
|
double setteldWeight = WaybillHelper.calcSettledWeight(maxWeight,carryType);
|
||||||
emisWaybill.setSettlementWeight(BigDecimal.valueOf(setteldWeight));
|
emisWaybill.setSettlementWeight(BigDecimal.valueOf(setteldWeight));
|
||||||
emisWaybill.setMeterType(emisTransLine.getMeterRate());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user