Commit 30d92b54 authored by lanbaoming's avatar lanbaoming

2024-06-26-4提交

parent 9c2be8ef
...@@ -356,19 +356,30 @@ public class OrderSpecialNeedServiceImpl extends AbstractService<OrderSpecialNee ...@@ -356,19 +356,30 @@ public class OrderSpecialNeedServiceImpl extends AbstractService<OrderSpecialNee
List<OrderSpecialNeedDO> orderSpecialNeedDOS = List<OrderSpecialNeedDO> orderSpecialNeedDOS =
orderSpecialNeedMapper.selectList(OrderSpecialNeedDO::getOrderId, orderSpecialNeedMapper.selectList(OrderSpecialNeedDO::getOrderId,
orderId); orderId);
//垫付的内陆运输费用 getTransFee
if (CollectionUtil.isNotEmpty(orderSpecialNeedDOS)) { if (CollectionUtil.isNotEmpty(orderSpecialNeedDOS)) {
orderSpecialNeedDOS.stream().filter( orderSpecialNeedDOS.stream().filter(
item -> item.getTransFee().compareTo(BigDecimal.ZERO) == 1).forEach(item -> build(item, type)); item -> item.getTransFee().compareTo(BigDecimal.ZERO) == 1).
forEach(item -> build(item, type));
} }
} }
private void build(OrderSpecialNeedDO orderSpecialNeed, int type) { private void build(OrderSpecialNeedDO orderSpecialNeed, int type) {
// 插入应收款 // 插入应收款
// 预付在完成入仓时生成应收 // 预付在完成入仓时生成应收
DictDataRespDTO dictDto = DictFrameworkUtils.getDictDataFromCache("receivable_fee_type", orderSpecialNeed.getAdvanceType()); DictDataRespDTO dictDto =
if (type == 1 && orderSpecialNeed.getPayType() != null && orderSpecialNeed.getPayType() != 4) { DictFrameworkUtils.getDictDataFromCache("receivable_fee_type",
orderSpecialNeed.getAdvanceType());
//付款类型 getPayType 付款类型
/*
if (type == 1 && orderSpecialNeed.getPayType() != null
&& orderSpecialNeed.getPayType() != 4) {*/
if (type == 1 && orderSpecialNeed.getPayType() != null)
{
//完成入仓可多次,故先删除掉已有应收再重新生成 //完成入仓可多次,故先删除掉已有应收再重新生成
if (orderSpecialNeed.getReceivableId() != null && orderSpecialNeed.getReceivableId() > 0L) { if (orderSpecialNeed.getReceivableId() != null &&
orderSpecialNeed.getReceivableId() > 0L) {
receivableService.deleteReceivable(orderSpecialNeed.getReceivableId()); receivableService.deleteReceivable(orderSpecialNeed.getReceivableId());
} }
OrderBackVO order = orderQueryService.getOrder(orderSpecialNeed.getOrderId()); OrderBackVO order = orderQueryService.getOrder(orderSpecialNeed.getOrderId());
...@@ -387,12 +398,16 @@ public class OrderSpecialNeedServiceImpl extends AbstractService<OrderSpecialNee ...@@ -387,12 +398,16 @@ public class OrderSpecialNeedServiceImpl extends AbstractService<OrderSpecialNee
receivableCreateReqVO.setUnitPrice(orderSpecialNeed.getTransFee()); receivableCreateReqVO.setUnitPrice(orderSpecialNeed.getTransFee());
receivableCreateReqVO.setPaymentUser(String.valueOf(order.getDrawee() != 3 ? order.getDrawee() : orderQueryService.customDrawee(OrderConvert.INSTANCE.convert(order), Integer.valueOf(orderSpecialNeed.getAdvanceType())))); receivableCreateReqVO.setPaymentUser(String.valueOf(order.getDrawee() != 3 ? order.getDrawee() : orderQueryService.customDrawee(OrderConvert.INSTANCE.convert(order), Integer.valueOf(orderSpecialNeed.getAdvanceType()))));
receivableCreateReqVO.setFeeSource(3); receivableCreateReqVO.setFeeSource(3);
Long receivableId = receivableService.createReceivable(receivableCreateReqVO); Long receivableId = receivableService.createReceivable(
receivableCreateReqVO);
orderSpecialNeed.setReceivableId(receivableId); orderSpecialNeed.setReceivableId(receivableId);
orderSpecialNeedMapper.updateById(orderSpecialNeed); orderSpecialNeedMapper.updateById(orderSpecialNeed);
} else if (type == 2 && orderSpecialNeed.getPayType() != null && orderSpecialNeed.getPayType() == 4) {
} else if (type == 2 && orderSpecialNeed.getPayType() != null
&& orderSpecialNeed.getPayType() == 4) {
//装柜反审后再审批,故先删除掉已有应收再重新生成 //装柜反审后再审批,故先删除掉已有应收再重新生成
if (orderSpecialNeed.getReceivableId() != null && orderSpecialNeed.getReceivableId() > 0L) { if (orderSpecialNeed.getReceivableId() != null &&
orderSpecialNeed.getReceivableId() > 0L) {
receivableService.deleteReceivable(orderSpecialNeed.getReceivableId()); receivableService.deleteReceivable(orderSpecialNeed.getReceivableId());
} }
OrderBackVO order = orderQueryService.getOrder(orderSpecialNeed.getOrderId()); OrderBackVO order = orderQueryService.getOrder(orderSpecialNeed.getOrderId());
......
...@@ -1156,20 +1156,26 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI ...@@ -1156,20 +1156,26 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
// orderLocationService.batchOrderUpdate(orderLocationCreateReqVOList); // orderLocationService.batchOrderUpdate(orderLocationCreateReqVOList);
// } // }
// 保存特需 // 保存特需 特需应收请求列表
List<OrderSpecialNeedReceivableReqVo> orderSpecialNeedReceivableReqVoList = List<OrderSpecialNeedReceivableReqVo> orderSpecialNeedReceivableReqVoList =
finishReqVO.getOrderSpecialNeedReceivableReqVoList(); finishReqVO.getOrderSpecialNeedReceivableReqVoList();
if (CollectionUtil.isNotEmpty(orderSpecialNeedReceivableReqVoList)) { if (CollectionUtil.isNotEmpty(orderSpecialNeedReceivableReqVoList)) {
List<Long> specialNeedIds = orderSpecialNeedReceivableReqVoList.stream().map(OrderSpecialNeedReceivableReqVo::getId).collect(Collectors.toList()); List<Long> specialNeedIds =
orderSpecialNeedReceivableReqVoList.stream().map(OrderSpecialNeedReceivableReqVo::getId).collect(Collectors.toList());
List<OrderSpecialNeedDO> orderSpecialNeedList = List<OrderSpecialNeedDO> orderSpecialNeedList =
orderSpecialNeedService.getOrderSpecialNeedList(specialNeedIds); orderSpecialNeedService.getOrderSpecialNeedList(specialNeedIds);
orderSpecialNeedList.forEach(orderSpecialNeedDO -> orderSpecialNeedReceivableReqVoList.stream() orderSpecialNeedList.forEach(orderSpecialNeedDO -> orderSpecialNeedReceivableReqVoList.stream()
.filter(t -> t.getId().equals(orderSpecialNeedDO.getId())).findFirst().ifPresent(orderSpecialNeedReceivableReqVo -> { .filter(t -> t.getId().equals(orderSpecialNeedDO.getId())).findFirst().ifPresent(orderSpecialNeedReceivableReqVo -> {
BigDecimal money = orderSpecialNeedReceivableReqVo.getReceivableMoney(); //receivable_money 应收费
Integer currency = orderSpecialNeedReceivableReqVo.getReceivableMoneyCurrency(); BigDecimal money =
String advanceType = orderSpecialNeedDO.getAdvanceType(); orderSpecialNeedReceivableReqVo.getReceivableMoney();
Integer currency =
orderSpecialNeedReceivableReqVo.getReceivableMoneyCurrency();
String advanceType =
orderSpecialNeedDO.getAdvanceType();
//垫付的内陆运输费用
orderSpecialNeedDO.setTransFee(money); orderSpecialNeedDO.setTransFee(money);
orderSpecialNeedDO.setTransCurrency(currency); orderSpecialNeedDO.setTransCurrency(currency);
})); }));
...@@ -1177,9 +1183,14 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI ...@@ -1177,9 +1183,14 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
// 更新 // 更新
orderSpecialNeedService.updateBatchById(orderSpecialNeedList); orderSpecialNeedService.updateBatchById(orderSpecialNeedList);
} }
else
{
}
// 生成特需应收 // 生成特需应收
orderSpecialNeedService.buildSpecialReceivable(orderId, 1); orderSpecialNeedService.buildSpecialReceivable(orderId, 1);
List<OrderWarehouseInDO> orderWarehouseInDOList = List<OrderWarehouseInDO> orderWarehouseInDOList =
orderWarehouseInMapper.selectList(OrderWarehouseInDO::getOrderId, orderWarehouseInMapper.selectList(OrderWarehouseInDO::getOrderId,
orderDO.getOrderId()); orderDO.getOrderId());
......
...@@ -185,8 +185,10 @@ public class ProdConditionParam { ...@@ -185,8 +185,10 @@ public class ProdConditionParam {
@ApiModelProperty(value = "应收运费单价(原始价格(无牌无液无电)+特殊加价+明佣)") @ApiModelProperty(value = "应收运费单价(原始价格(无牌无液无电)+特殊加价+明佣)")
private BigDecimal receivableOneSeaFreight; private BigDecimal receivableOneSeaFreight;
@ApiModelProperty(value = "商品运费单价(成交)") @ApiModelProperty(value = "商品运费单价(成交)")
private BigDecimal oneFreight; private BigDecimal oneFreight;
@ApiModelProperty(value = "商品运费单价(成交)-前端传值转换字段") @ApiModelProperty(value = "商品运费单价(成交)-前端传值转换字段")
private BigDecimal oneSeaFreight; private BigDecimal oneSeaFreight;
......
...@@ -59,7 +59,7 @@ public class ProdLinePriceController { ...@@ -59,7 +59,7 @@ public class ProdLinePriceController {
peek(it -> it.setIsPriced(false)). peek(it -> it.setIsPriced(false)).
collect(Collectors.toList())); collect(Collectors.toList()));
//获取价格信息 lanbm 2024-06-20 添加注释 //获取价格信息
List<ProdConditionParam> prodConditionParams = List<ProdConditionParam> prodConditionParams =
prodCostCalculation.obtainProdLineOnePrice( prodCostCalculation.obtainProdLineOnePrice(
param.getProdConditionParamList(), param.getProdConditionParamList(),
......
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