Commit ba8b04e1 authored by zhengyi's avatar zhengyi

Merge branch 'inquiry-zhengyi' into dev

parents f5ab3539 0f61b1e6
......@@ -1033,7 +1033,7 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
throw exception(FREIGHT_UNIT_NOT_NULL);
}
orderItemDO.setSeaFreightVolume(channelPrice.getFreightUnitId());
if (channelPrice.getCharging() == 0){
if (channelPrice.getCharging() == 0) {
if (Objects.isNull(channelPrice.getClearanceCurrencyId())) {
throw exception(CLEARANCE_CURRENCY_NOT_NULL);
}
......@@ -1043,7 +1043,7 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
}
orderItemDO.setClearanceFreightVolume(channelPrice.getClearanceUnitId());
}
}else {
} else {
// TODO 如果原订单商品价格非未报价,则不采用前端传值的货币单位、计量单位、收费方式、是否预付等参数,以原有参数为准
channelPrice.setCharging(orderItemDO.getCharging());
channelPrice.setIsPayAdvance(Objects.nonNull(orderItemDO.getIsPayAdvance()) && orderItemDO.getIsPayAdvance() == 1);
......@@ -1073,14 +1073,23 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
priceParam.setFreightCurrencyId(orderItemDO.getSeaFreightCurrency());
priceParam.setClearanceCurrencyId(orderItemDO.getClearanceFreightCurrency());
inquiryPriceParams.add(priceParam);
if (orderItemDO.getOneSeaFreight().compareTo(BigDecimal.ZERO) == 0) {
ApplyInfoVO applyInfo = new ApplyInfoVO();
applyInfo.setName(orderItemDO.getProdTitleZh() + "计费方式");
applyInfo.setNewValue(channelPrice.getCharging() == 1 ? "全包价" : "运费+清关费");
applyInfoVOList.add(applyInfo);
applyInfo = new ApplyInfoVO();
applyInfo.setName(orderItemDO.getProdTitleZh() + "是否预付");
applyInfo.setNewValue(channelPrice.getIsPayAdvance() ? "是" : "否");
applyInfoVOList.add(applyInfo);
}
ApplyInfoVO applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName(orderItemDO.getProdTitleZh() + (channelPrice.getCharging() == 1 ? "全包价" : "运费"));
String freightCurrency = (null == allCurrency.get(orderItemDO.getSeaFreightCurrency()) ? "" : allCurrency.get(orderItemDO.getSeaFreightCurrency()).getFuhao());
String freightUnit = (null == allUnit.get(orderItemDO.getSeaFreightVolume().intValue()) ? "" : allUnit.get(orderItemDO.getSeaFreightVolume().intValue()).getFuhao());
if (orderItemDO.getOneSeaFreight().compareTo(BigDecimal.ZERO) > 0) {
applyInfoVO.setOrgValue(orderItemDO.getOneSeaFreight() + freightCurrency + "/" + freightUnit);
}
applyInfoVO.setNewValue(channelPrice.getFreightFee() + freightCurrency + "/" + freightUnit);
applyInfoVOList.add(applyInfoVO);
......@@ -1089,7 +1098,9 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
applyInfoVO.setName(orderItemDO.getProdTitleZh() + "清关费");
String clearanceCurrency = (null == allCurrency.get(orderItemDO.getClearanceFreightCurrency()) ? "" : allCurrency.get(orderItemDO.getClearanceFreightCurrency()).getFuhao());
String clearanceUnit = (null == allUnit.get(orderItemDO.getClearanceFreightVolume().intValue()) ? "" : allUnit.get(orderItemDO.getClearanceFreightVolume().intValue()).getFuhao());
if (orderItemDO.getOneClearanceFreight().compareTo(BigDecimal.ZERO) > 0) {
applyInfoVO.setOrgValue(orderItemDO.getOneClearanceFreight() + clearanceCurrency + "/" + clearanceUnit);
}
applyInfoVO.setNewValue((null == channelPrice.getClearanceFee() ? "" : channelPrice.getClearanceFee()) + clearanceCurrency + "/" + clearanceUnit);
applyInfoVOList.add(applyInfoVO);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment