refactor(sales): 优化客商管理档案匹配逻辑
- 在 SoSaleOutPluginInitializerToB 和 SoSaleReturnPluginInitializerToB 类中 - 更新了客商管理档案查询失败时的错误信息,增加了客商名称和公司名称 - 修改了测试用例中的订单号
This commit is contained in:
parent
962e43791a
commit
715ac072db
|
@ -1132,7 +1132,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
bdCumandocEntity1.setPkCubasdoc(fuzzyQueryCustomers.getPkCubasdoc());
|
||||
List<BdCumandocEntity> bdCumandocEntityList = iBdCumandocDao.query(bdCumandocEntity1);
|
||||
if (bdCumandocEntityList == null || bdCumandocEntityList.size() == 0) {
|
||||
Assert.state(false, "根据客商基本档案主键{},没有办法查询到客商管理档案", fuzzyQueryCustomers.getPkCubasdoc());
|
||||
Assert.state(false, "根据客商基本档案主键{} 客商名称:{},无法匹配到公司:{} 对应的客商管理档案", fuzzyQueryCustomers.getPkCubasdoc(), fuzzyQueryCustomers.getCustname(), bdCorpEntityList.get(0).getUnitname());
|
||||
}
|
||||
|
||||
//查找平台
|
||||
|
@ -1693,7 +1693,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
bdCumandocEntity1.setPkCubasdoc(fuzzyQueryCustomers.getPkCubasdoc());
|
||||
List<BdCumandocEntity> bdCumandocEntityList = iBdCumandocDao.query(bdCumandocEntity1);
|
||||
if (bdCumandocEntityList == null || bdCumandocEntityList.size() == 0) {
|
||||
Assert.state(false, "根据客商基本档案主键{},无法匹配到客商管理档案", fuzzyQueryCustomers.getPkCubasdoc());
|
||||
Assert.state(false, "根据客商基本档案主键{} 客商名称:{},无法匹配到公司:{} 对应的客商管理档案", fuzzyQueryCustomers.getPkCubasdoc(), fuzzyQueryCustomers.getCustname(), bdCorpEntityList.get(0).getUnitname());
|
||||
} else if (bdCumandocEntityList.size() >= 2) {
|
||||
Assert.state(false, "根据客商基本档案主键{},匹配到{}哥客商管理档案", fuzzyQueryCustomers.getPkCubasdoc(), bdCumandocEntityList.size());
|
||||
}
|
||||
|
|
|
@ -1076,7 +1076,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
|
|||
bdCumandocEntity1.setCustflags(ProfilesActiveConstant.CUSTOMER);
|
||||
List<BdCumandocEntity> bdCumandocEntityList = iBdCumandocDao.query(bdCumandocEntity1);
|
||||
if (bdCumandocEntityList == null || bdCumandocEntityList.size() == 0) {
|
||||
Assert.state(false, "根据客商基本档案主键{},没有办法查询到客商管理档案", fuzzyQueryCustomers.getPkCubasdoc());
|
||||
Assert.state(false, "根据客商基本档案主键{} 客商名称:{},无法匹配到公司:{} 对应的客商管理档案", fuzzyQueryCustomers.getPkCubasdoc(), fuzzyQueryCustomers.getCustname(), bdCorpEntityList.get(0).getUnitname());
|
||||
}
|
||||
|
||||
//查找平台
|
||||
|
@ -1391,7 +1391,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
|
|||
bdCumandocEntity1.setCustflags(ProfilesActiveConstant.CUSTOMER);
|
||||
List<BdCumandocEntity> bdCumandocEntityList = iBdCumandocDao.query(bdCumandocEntity1);
|
||||
if (bdCumandocEntityList == null || bdCumandocEntityList.size() == 0) {
|
||||
Assert.state(false, "根据客商基本档案主键{},没有办法查询到客商管理档案", fuzzyQueryCustomers.getPkCubasdoc());
|
||||
Assert.state(false, "根据客商基本档案主键{} 客商名称:{},无法匹配到公司:{} 对应的客商管理档案", fuzzyQueryCustomers.getPkCubasdoc(), fuzzyQueryCustomers.getCustname(), bdCorpEntityList.get(0).getUnitname());
|
||||
}
|
||||
|
||||
//查找平台
|
||||
|
|
|
@ -88,7 +88,7 @@ public class SoSaleOutPluginInitializerToBTest {
|
|||
|
||||
// soSaleOutPluginInitializerToB.startImplementByStockTime("2024-10-31 14:48:41", "2024-10-31 14:48:41");
|
||||
|
||||
soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024103000021968","stock");
|
||||
soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024110500018124", "stock");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue