|
|
@@ -2848,12 +2848,14 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
|
|
|
(new BigDecimal(arr[1]).divide(new BigDecimal("10"), MathContext.DECIMAL32)
|
|
|
.setScale(2, RoundingMode.HALF_UP)));
|
|
|
order.setFundingAmount(actualFundingAmount);
|
|
|
+ order.setPrimaryFundingAmount(actualFundingAmount);
|
|
|
BigDecimal primaryBondAmount = order.getSalesAmount().multiply(
|
|
|
(new BigDecimal(arr[0]).divide(new BigDecimal("10"), MathContext.DECIMAL32)
|
|
|
.setScale(2, RoundingMode.HALF_UP)));
|
|
|
BigDecimal primaryFundingAmount = order.getSalesAmount().multiply(
|
|
|
(new BigDecimal(arr[1]).divide(new BigDecimal("10"), MathContext.DECIMAL32)
|
|
|
.setScale(2, RoundingMode.HALF_UP)));
|
|
|
+ pjpfFunding.setPrimaryFundingAmount(pjpfFunding.getPrimaryFundingAmount().add(actualFundingAmount).subtract(primaryFundingAmount));
|
|
|
pjpfFunding.setSurplusFundingAmount(pjpfFunding.getSurplusFundingAmount().add(actualFundingAmount).subtract(primaryFundingAmount));
|
|
|
pjpfFunding.setBondAmount(pjpfFunding.getBondAmount().add(actualBondAmount).subtract(primaryBondAmount));
|
|
|
pjpfFunding.setPaidAlreadyBondAmount(pjpfFunding.getPaidAlreadyBondAmount().add(actualBondAmount).subtract(primaryBondAmount));
|
|
|
@@ -2942,6 +2944,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
|
|
|
(new BigDecimal(arr[1]).divide(new BigDecimal("10"), MathContext.DECIMAL32)
|
|
|
.setScale(2, RoundingMode.HALF_UP)));
|
|
|
order.setFundingAmount(primaryFundingAmount);
|
|
|
+ order.setPrimaryFundingAmount(actualFundingAmount);
|
|
|
+ pjpfFunding.setPrimaryFundingAmount(pjpfFunding.getPrimaryFundingAmount().subtract(actualFundingAmount).add(primaryFundingAmount));
|
|
|
pjpfFunding.setSurplusFundingAmount(pjpfFunding.getSurplusFundingAmount().subtract(actualFundingAmount).add(primaryFundingAmount));
|
|
|
pjpfFunding.setBondAmount(pjpfFunding.getBondAmount().subtract(actualBondAmount).add(primaryBondAmount));
|
|
|
pjpfFunding.setPaidAlreadyBondAmount(pjpfFunding.getPaidAlreadyBondAmount().subtract(actualBondAmount).add(primaryBondAmount));
|
|
|
@@ -3018,7 +3022,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
|
|
|
.eq(PjOrderItems::getPid, pjOrder.getId());
|
|
|
List<PjOrderItems> itemsList = orderItemsService.list(itemsLambdaQueryWrapper);
|
|
|
long count = itemsList.stream().filter(e -> ObjectUtils.isNotNull(financingBrand) && financingBrand.contains(e.getBrandName())).count();
|
|
|
- if (count > 1) {
|
|
|
+ if (count > 0) {
|
|
|
if ("审核提交".equals(order.getTaskWhetherAdopt())) {
|
|
|
throw new RuntimeException("任务已提交审核");
|
|
|
} else if ("审核中".equals(order.getTaskWhetherAdopt())) {
|
|
|
@@ -3665,7 +3669,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
|
|
|
order.setSalesAmount(new BigDecimal("0.00"));
|
|
|
order.setTotalMoney(new BigDecimal("0.00"));
|
|
|
}
|
|
|
- } else if (order.getBsType().equals(OrderTypeEnum.PURCHASE.getType())) {
|
|
|
+ }
|
|
|
+ else if (order.getBsType().equals(OrderTypeEnum.PURCHASE.getType())) {
|
|
|
//采购
|
|
|
if (ObjectUtils.isNotNull(order.getStorageId())) {
|
|
|
order.setStorageName(storageDescMapper.selectById(order.getStorageId()).getCname());
|
|
|
@@ -3782,7 +3787,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
|
|
|
order.setSalesAmount(new BigDecimal("0.00"));
|
|
|
order.setTotalMoney(new BigDecimal("0.00"));
|
|
|
}
|
|
|
- } else if (order.getBsType().equals(OrderTypeEnum.FINANCING.getType())) {
|
|
|
+ }
|
|
|
+ else if (order.getBsType().equals(OrderTypeEnum.FINANCING.getType())) {
|
|
|
//仓库名称
|
|
|
if (ObjectUtils.isNotNull(order.getStorageId())) {
|
|
|
order.setStorageName(storageDescMapper.selectById(order.getStorageId()).getCname());
|
|
|
@@ -3911,6 +3917,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
|
|
|
.setScale(2, RoundingMode.HALF_UP);
|
|
|
order.setBondAmount(bondAmount);
|
|
|
order.setFundingAmount(fundingAmount);
|
|
|
+ order.setPrimaryFundingAmount(fundingAmount);
|
|
|
}
|
|
|
order.setActualPaymentStatus(3);
|
|
|
order.setPaymentAmountTl(order.getTotalMoney());
|