Commit 30d92b54 authored by lanbaoming's avatar lanbaoming

2024-06-26-4提交

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