refactor(sales): 优化 TOC 出库和退货相关代码
- 修正了 SoSaleOutPluginInitializerToC 和 SoSaleReturnPluginInitializerToC 中的变量命名 - 更新了退货入库单总金额的校验提示信息 - 修改了测试用例中的出库单和退货单编号
This commit is contained in:
parent
9bb677bf79
commit
2f67e791df
|
@ -228,7 +228,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
Assert.notNull(endTime, "查询条件,结束时间不能为空!");
|
Assert.notNull(endTime, "查询条件,结束时间不能为空!");
|
||||||
|
|
||||||
// CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr);
|
// CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr);
|
||||||
String tobShop = shopTobOrToCUtil.getCommaShop("TOC");
|
String tocShop = shopTobOrToCUtil.getCommaShop("TOC");
|
||||||
|
|
||||||
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
||||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||||
|
@ -241,7 +241,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
queryOfsSoSaleOutVo.setStatus(900L);
|
queryOfsSoSaleOutVo.setStatus(900L);
|
||||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||||
queryOfsSoSaleOutVo.setPageSize(100L);
|
queryOfsSoSaleOutVo.setPageSize(100L);
|
||||||
queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
queryOfsSoSaleOutVo.setStoreCode(tocShop);
|
||||||
// queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003");
|
// queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003");
|
||||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||||
logger.info("数据返回行数:{}", headerDetailsDtoList.size());
|
logger.info("数据返回行数:{}", headerDetailsDtoList.size());
|
||||||
|
@ -322,7 +322,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
Assert.notNull(code, "O出库单编码不能为空!code is null!");
|
Assert.notNull(code, "O出库单编码不能为空!code is null!");
|
||||||
Assert.notNull(sceneType, "场景类型不能为空!");
|
Assert.notNull(sceneType, "场景类型不能为空!");
|
||||||
|
|
||||||
String tobShop = shopTobOrToCUtil.getCommaShop("TOC");
|
String tocShop = shopTobOrToCUtil.getCommaShop("TOC");
|
||||||
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
||||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||||
|
@ -330,7 +330,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
queryOfsSoSaleOutVo.setStatus(900L);
|
queryOfsSoSaleOutVo.setStatus(900L);
|
||||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||||
queryOfsSoSaleOutVo.setPageSize(100L);
|
queryOfsSoSaleOutVo.setPageSize(100L);
|
||||||
queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
queryOfsSoSaleOutVo.setStoreCode(tocShop);
|
||||||
queryOfsSoSaleOutVo.setCode(code);
|
queryOfsSoSaleOutVo.setCode(code);
|
||||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||||
logger.info("数据返回行数:{}", headerDetailsDtoList.size());
|
logger.info("数据返回行数:{}", headerDetailsDtoList.size());
|
||||||
|
|
|
@ -1508,7 +1508,7 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
//实付金额/实发数量
|
//实付金额/实发数量
|
||||||
Assert.notNull(totalAmount, "退货入库单总金额不能为空 明细行对象:{}", JSON.toJSONString(goodsRertunSonDetailsDto));
|
Assert.notNull(totalAmount, "实退金额不能为空 明细行对象:{}", JSON.toJSONString(goodsRertunSonDetailsDto));
|
||||||
Assert.notNull(goodsRertunSonDetailsDto.getReceivedQty(), "实收数量不能为空 明细行对象:{}", JSON.toJSONString(goodsRertunSonDetailsDto));
|
Assert.notNull(goodsRertunSonDetailsDto.getReceivedQty(), "实收数量不能为空 明细行对象:{}", JSON.toJSONString(goodsRertunSonDetailsDto));
|
||||||
BigDecimal totalPayAmountBigDecimal = new BigDecimal(totalAmount);
|
BigDecimal totalPayAmountBigDecimal = new BigDecimal(totalAmount);
|
||||||
BigDecimal shipQtyBigDecimal = new BigDecimal(goodsRertunSonDetailsDto.getReceivedQty());
|
BigDecimal shipQtyBigDecimal = new BigDecimal(goodsRertunSonDetailsDto.getReceivedQty());
|
||||||
|
|
|
@ -121,7 +121,7 @@ class SoSaleOutPluginInitializerToCTest {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// soSaleOutPluginInitializerToC.startImplementStockByCode("LETS-SH2024091900002878", "stock");
|
// soSaleOutPluginInitializerToC.startImplementStockByCode("LETS-SH2024091900002878", "stock");
|
||||||
soSaleOutPluginInitializerToC.startImplementStockByCode("LETS-SH2024102600009446", "stock");
|
soSaleOutPluginInitializerToC.startImplementStockByCode("LETS-SH2024110400042153", "stock");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class SoSaleReturnPluginInitializerToCTest {
|
||||||
public void startImplement() {
|
public void startImplement() {
|
||||||
// soSaleReturnPluginInitializerToC.startImplement(null, null);
|
// soSaleReturnPluginInitializerToC.startImplement(null, null);
|
||||||
try {
|
try {
|
||||||
String code = "LETS-RE2024092400000148";
|
String code = "LETS-SH2024110500018255";
|
||||||
soSaleReturnPluginInitializerToC.startImplementByCode(code, "stock");
|
soSaleReturnPluginInitializerToC.startImplementByCode(code, "stock");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
Loading…
Reference in New Issue