fix(sales): 修复 ToB 销售出库初始化报错问题
- 在 SoSaleOutPluginInitializerToB 类中,添加了对 splitDateAndPush 方法的异常捕获处理 - 优化了错误日志的输出,提高了异常处理的健壮性 - 在 SoSaleOutPluginInitializerToC 类中,添加了注释以提高代码可读性 - 在测试类 SoSaleOutPluginInitializerToBTest 中,更新了测试用例以覆盖新的异常处理逻辑
This commit is contained in:
parent
ba44b5a4ef
commit
01222942a4
|
@ -2240,11 +2240,15 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
String indexStr = params[i];
|
||||
String[] split = indexStr.split(",");
|
||||
logger.info("splitDateAndPush方法正在执行主要的逻辑 开始时间:{} 结束时间:{}", split[0], split[1]);
|
||||
try {
|
||||
if (sceneType.equals(STOCK)) {
|
||||
startImplementByStockTime(split[0], split[1]);
|
||||
} else if (sceneType.equals(TRAN)) {
|
||||
startImplementByTranTime(split[0], split[1]);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("splitDateAndPush循环报错!", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -65,7 +65,7 @@ public class SoSaleOutPluginInitializerToBTest {
|
|||
// }
|
||||
|
||||
// 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-SH2024092600000009","stock");
|
||||
|
@ -79,11 +79,12 @@ public class SoSaleOutPluginInitializerToBTest {
|
|||
// soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024101700000270");
|
||||
|
||||
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");
|
||||
|
||||
// String aaa = "LETS-SH2024102300043720";
|
||||
// soSaleOutPluginInitializerToB.startImplementByCode(aaa, "stock");
|
||||
soSaleOutPluginInitializerToB.startImplementByTranTime("2024-10-23 00:00:00", "2024-10-23 23:59:59");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue