Commit 0e786af8 authored by zhaobiyan's avatar zhaobiyan

Merge branch 'dev' into 'master'

实时计价接口对入仓数据做参数转换

See merge request !6
parents 052ea5fd 28f34692
......@@ -8,6 +8,7 @@ import cn.iocoder.yudao.module.product.component.ProdCostCalculation;
import cn.iocoder.yudao.module.product.dto.CalculationCostResultDto;
import cn.iocoder.yudao.module.product.param.ConditionParam;
import cn.iocoder.yudao.module.product.param.ProdConditionParam;
import cn.iocoder.yudao.module.product.param.WarehouseInInfoParam;
import cn.iocoder.yudao.module.product.service.coupon.CouponService;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
......@@ -52,7 +53,15 @@ public class ProdLinePriceController {
// 前端实时计价时需要将订单的固定价格参数进行格式化,转为未定价,否则不会去查询当前实时价格
param.setProdConditionParamList(param.getProdConditionParamList().stream().peek(it->{
it.setIsPriced(false);
it.setPackages(Arrays.asList(Objects.isNull(it.getWarehouseInInfoVO()) ? it.getUnit().split(StrUtil.COMMA) : it.getWarehouseInInfoVO().getUnits().split(StrUtil.COMMA)));
WarehouseInInfoParam warehouseInInfoVO = it.getWarehouseInInfoVO();
if (Objects.nonNull(warehouseInInfoVO)){
it.setPackages(Arrays.asList(warehouseInInfoVO.getUnits().split(StrUtil.COMMA)));
it.setVolume(warehouseInInfoVO.getVolume());
it.setWeight(warehouseInInfoVO.getWeight());
it.setQuantity(warehouseInInfoVO.getQuantityAll());
}else {
it.setPackages(Arrays.asList(it.getUnit().split(StrUtil.COMMA)));
}
}).collect(Collectors.toList()));
List<ProdConditionParam> prodConditionParams = prodCostCalculation.obtainProdLineOnePrice(param.getProdConditionParamList(), "",
Objects.nonNull(param.getCustomsType()) ? param.getCustomsType() : 1, param.getCustomerId(),
......
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