fix(sales): 修复 ToC 销售出库单实付金额相关问题
- 添加测试用的 TODO 注释 - 修正应收金额的计算逻辑 - 更新错误提示信息 - 调整优惠金额的赋值逻辑- 更新测试用例中的订单编号
This commit is contained in:
parent
6e21435828
commit
08b74914be
|
@ -1094,6 +1094,11 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
List<SaleorderRequestDto> saleorderRequestDtoList = new ArrayList<>();
|
List<SaleorderRequestDto> saleorderRequestDtoList = new ArrayList<>();
|
||||||
saleorderRequestDtoList.add(saleorderRequestDto);
|
saleorderRequestDtoList.add(saleorderRequestDto);
|
||||||
|
|
||||||
|
//TODO 测试
|
||||||
|
if (true) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Map<String, List<SaleorderRequestDto>> stringStringMap = new HashMap<>();
|
Map<String, List<SaleorderRequestDto>> stringStringMap = new HashMap<>();
|
||||||
stringStringMap.put("saleorder", saleorderRequestDtoList);
|
stringStringMap.put("saleorder", saleorderRequestDtoList);
|
||||||
SoSaleResultRootDto soSaleResultRootDto = sendU8CTOCOrder(JSON.toJSONString(stringStringMap));
|
SoSaleResultRootDto soSaleResultRootDto = sendU8CTOCOrder(JSON.toJSONString(stringStringMap));
|
||||||
|
@ -1701,9 +1706,9 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
BigDecimal totalPayAmountBigDecimal = new BigDecimal(totalPayAmount);
|
BigDecimal totalPayAmountBigDecimal = new BigDecimal(totalPayAmount);
|
||||||
totalPayAmount = totalPayAmountBigDecimal.multiply(new BigDecimal(sonDetailsDto.getShipQty())).setScale(2, BigDecimal.ROUND_HALF_UP).stripTrailingZeros().toPlainString();
|
totalPayAmount = totalPayAmountBigDecimal.multiply(new BigDecimal(sonDetailsDto.getShipQty())).setScale(2, BigDecimal.ROUND_HALF_UP).stripTrailingZeros().toPlainString();
|
||||||
}
|
}
|
||||||
Assert.notNull(totalPayAmount, "实发数量不能为空 销售出库单编码:{} 出库单明细主键:{}", header.getCode(), sonDetailsDto.getId());
|
Assert.notNull(totalPayAmount, "应收金额不能为空(应收金额=实付金额+达人优惠+支付优惠+平台优惠) 销售出库单编码:{} 出库单明细主键:{}", header.getCode(), sonDetailsDto.getId());
|
||||||
Assert.notNull(sonDetailsDto.getShipQty(), "实发数量不能为空 销售出库单编码:{} 出库单明细主键:{}", header.getCode(), sonDetailsDto.getId());
|
Assert.notNull(sonDetailsDto.getShipQty(), "实发数量不能为空 销售出库单编码:{} 出库单明细主键:{}", header.getCode(), sonDetailsDto.getId());
|
||||||
BigDecimal totalPayAmountBigDecimal = new BigDecimal(sonDetailsDto.getTotalPayAmount());
|
BigDecimal totalPayAmountBigDecimal = new BigDecimal(totalPayAmount);
|
||||||
BigDecimal shipQtyBigDecimal = new BigDecimal(sonDetailsDto.getShipQty());
|
BigDecimal shipQtyBigDecimal = new BigDecimal(sonDetailsDto.getShipQty());
|
||||||
|
|
||||||
groupTotalPayAmount = groupTotalPayAmount.add(totalPayAmountBigDecimal);
|
groupTotalPayAmount = groupTotalPayAmount.add(totalPayAmountBigDecimal);
|
||||||
|
@ -3409,10 +3414,10 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sonDetailsDtoList.get(0).setVdef4(platformDiscountsBigDecimal.stripTrailingZeros().toPlainString());
|
sonDetailsDtoList.get(0).setVdef4(platformDiscountsBigDecimal.stripTrailingZeros().toPlainString());//平台
|
||||||
sonDetailsDtoList.get(0).setVdef5(payDiscountsBigDecimal.stripTrailingZeros().toPlainString());
|
sonDetailsDtoList.get(0).setVdef5(payDiscountsBigDecimal.stripTrailingZeros().toPlainString());//支付
|
||||||
sonDetailsDtoList.get(0).setVdef6(expertDiscountsBigDecimal.stripTrailingZeros().toPlainString());
|
sonDetailsDtoList.get(0).setVdef6(expertDiscountsBigDecimal.stripTrailingZeros().toPlainString());//达人
|
||||||
sonDetailsDtoList.get(0).setVdef7(merchantDiscountsBigDecimal.stripTrailingZeros().toPlainString());
|
sonDetailsDtoList.get(0).setVdef7(merchantDiscountsBigDecimal.stripTrailingZeros().toPlainString());//商家
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -121,7 +121,7 @@ class SoSaleOutPluginInitializerToCTest {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// soSaleOutPluginInitializerToC.startImplementStockByCode("LETS-SH2024091900002878", "stock");
|
// soSaleOutPluginInitializerToC.startImplementStockByCode("LETS-SH2024091900002878", "stock");
|
||||||
soSaleOutPluginInitializerToC.startImplementStockByCode("LETS-SH2024110500013375", "stock");
|
soSaleOutPluginInitializerToC.startImplementStockByCode("LETS-SH2024102600009446", "stock");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue