fix(sales): 修复 ToB 销售出库初始化报错问题
- 在 SoSaleOutPluginInitializerToB 类中,添加了对 splitDateAndPush 方法的异常捕获处理 - 优化了错误日志的输出,提高了异常处理的健壮性 - 在 SoSaleOutPluginInitializerToC 类中,添加了注释以提高代码可读性 - 在测试类 SoSaleOutPluginInitializerToBTest 中,更新了测试用例以覆盖新的异常处理逻辑
This commit is contained in:
parent
ba44b5a4ef
commit
01222942a4
|
@ -1749,7 +1749,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
||||||
|
|
||||||
orderOutTobHeaderDto.setHeader(header);
|
orderOutTobHeaderDto.setHeader(header);
|
||||||
orderOutTobHeaderDto.setDetails(details);
|
orderOutTobHeaderDto.setDetails(details);
|
||||||
|
|
||||||
BeanUtil.copyPropertiesV2(header, orderOutTobHeaderDto);
|
BeanUtil.copyPropertiesV2(header, orderOutTobHeaderDto);
|
||||||
orderOutTobHeaderDtoArrayList.add(orderOutTobHeaderDto);
|
orderOutTobHeaderDtoArrayList.add(orderOutTobHeaderDto);
|
||||||
//成功,进入下一个环节
|
//成功,进入下一个环节
|
||||||
|
@ -2240,10 +2240,14 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
||||||
String indexStr = params[i];
|
String indexStr = params[i];
|
||||||
String[] split = indexStr.split(",");
|
String[] split = indexStr.split(",");
|
||||||
logger.info("splitDateAndPush方法正在执行主要的逻辑 开始时间:{} 结束时间:{}", split[0], split[1]);
|
logger.info("splitDateAndPush方法正在执行主要的逻辑 开始时间:{} 结束时间:{}", split[0], split[1]);
|
||||||
if (sceneType.equals(STOCK)) {
|
try {
|
||||||
startImplementByStockTime(split[0], split[1]);
|
if (sceneType.equals(STOCK)) {
|
||||||
} else if (sceneType.equals(TRAN)) {
|
startImplementByStockTime(split[0], split[1]);
|
||||||
startImplementByTranTime(split[0], split[1]);
|
} else if (sceneType.equals(TRAN)) {
|
||||||
|
startImplementByTranTime(split[0], split[1]);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("splitDateAndPush循环报错!", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1411,7 +1411,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
} else {
|
} else {
|
||||||
logger.info("queryBasicArchives方法headerDetailsDtoList.size为0");
|
logger.info("queryBasicArchives方法headerDetailsDtoList.size为0");
|
||||||
}
|
}
|
||||||
|
|
||||||
//批量把错误写入到日志信息表
|
//批量把错误写入到日志信息表
|
||||||
if (errorHeaderDetailsDtoDtoList.size() > 0) {
|
if (errorHeaderDetailsDtoDtoList.size() > 0) {
|
||||||
if (sceneType.equals("stock")) {
|
if (sceneType.equals("stock")) {
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class SoSaleOutPluginInitializerToBTest {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// try {
|
// try {
|
||||||
//// soSaleOutPluginInitializerToB.startImplementByTranTime("2024-09-12 14:04:00","2024-09-12 14:12:00");
|
// soSaleOutPluginInitializerToB.startImplementByTranTime("2024-09-12 14:04:00","2024-09-12 14:12:00");
|
||||||
//// soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024092000000003", "stock");
|
//// soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024092000000003", "stock");
|
||||||
//
|
//
|
||||||
// soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024092600000009","stock");
|
// soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024092600000009","stock");
|
||||||
|
@ -79,11 +79,12 @@ public class SoSaleOutPluginInitializerToBTest {
|
||||||
// soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024101700000270");
|
// soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024101700000270");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024101800025544", "tran");
|
// soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024102300053750", "tran");
|
||||||
// soSaleOutPluginInitializerToB.startImplementByStockTime("2024-10-23 16:09:59", "2024-10-23 16:10:01");
|
// soSaleOutPluginInitializerToB.startImplementByStockTime("2024-10-23 16:09:59", "2024-10-23 16:10:01");
|
||||||
|
|
||||||
// String aaa = "LETS-SH2024102300043720";
|
// String aaa = "LETS-SH2024102300043720";
|
||||||
// soSaleOutPluginInitializerToB.startImplementByCode(aaa, "stock");
|
// soSaleOutPluginInitializerToB.startImplementByCode(aaa, "stock");
|
||||||
|
soSaleOutPluginInitializerToB.startImplementByTranTime("2024-10-23 00:00:00", "2024-10-23 23:59:59");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue