Commit 28f34692 authored by 332784038@qq.com's avatar 332784038@qq.com

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

parent e5ae6af7
...@@ -8,6 +8,7 @@ import cn.iocoder.yudao.module.product.component.ProdCostCalculation; ...@@ -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.dto.CalculationCostResultDto;
import cn.iocoder.yudao.module.product.param.ConditionParam; import cn.iocoder.yudao.module.product.param.ConditionParam;
import cn.iocoder.yudao.module.product.param.ProdConditionParam; 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 cn.iocoder.yudao.module.product.service.coupon.CouponService;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -52,7 +53,15 @@ public class ProdLinePriceController { ...@@ -52,7 +53,15 @@ public class ProdLinePriceController {
// 前端实时计价时需要将订单的固定价格参数进行格式化,转为未定价,否则不会去查询当前实时价格 // 前端实时计价时需要将订单的固定价格参数进行格式化,转为未定价,否则不会去查询当前实时价格
param.setProdConditionParamList(param.getProdConditionParamList().stream().peek(it->{ param.setProdConditionParamList(param.getProdConditionParamList().stream().peek(it->{
it.setIsPriced(false); 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())); }).collect(Collectors.toList()));
List<ProdConditionParam> prodConditionParams = prodCostCalculation.obtainProdLineOnePrice(param.getProdConditionParamList(), "", List<ProdConditionParam> prodConditionParams = prodCostCalculation.obtainProdLineOnePrice(param.getProdConditionParamList(), "",
Objects.nonNull(param.getCustomsType()) ? param.getCustomsType() : 1, param.getCustomerId(), 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