refactor(purchase): 优化采购退货、采购订单和采购入库单的错误提示信息

- 修改了 ProxyPurchaseReturn、ProxyPurchaseWarehousOrder 和 ProxyPurchaseWarehousWarehouse 类中的错误提示信息
- 新的错误提示信息更加具体,包含了客商名称和公司名称
- 优化了错误提示的逻辑,分别针对无法找到客商管理档案和存在多个客商管理档案的情况
- 更新了测试用例中的订单编号
This commit is contained in:
liuy 2024-11-05 14:48:03 +08:00
parent 36c5da2cf5
commit d282ed1f6a
4 changed files with 7 additions and 7 deletions

View File

@ -673,9 +673,9 @@ public class ProxyPurchaseReturn 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.getCustshortname(), bdCorpEntityList.get(0).getUnitname());
} else if (bdCumandocEntityList.size() >= 2) {
Assert.state(false, "根据客商基本档案主键{},匹配到多个客商管理档案", fuzzyQueryCustomers.getPkCubasdoc());
Assert.state(false, "客商:{} 公司:{} 存在多个对应关系!", fuzzyQueryCustomers.getCustshortname(), bdCorpEntityList.get(0).getUnitname());
}
// 2024年8月20日 23:51:56 收货库存组织应该是通过收货公司查询得出收货库存组织目前收货公司和采购公司保持一致那么就以采购公司带出这个逻辑已经和佳妮确认

View File

@ -663,9 +663,9 @@ public class ProxyPurchaseWarehousOrder 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.getCustshortname(), bdCorpEntityList.get(0).getUnitname());
} else if (bdCumandocEntityList.size() >= 2) {
Assert.state(false, "根据客商基本档案主键{},匹配到多个客商管理档案", fuzzyQueryCustomers.getPkCubasdoc());
Assert.state(false, "客商:{} 公司:{} 存在多个对应关系!", fuzzyQueryCustomers.getCustshortname(), bdCorpEntityList.get(0).getUnitname());
}
// 2024年8月20日 23:51:56 收货库存组织应该是通过收货公司查询得出收货库存组织目前收货公司和采购公司保持一致那么就以采购公司带出这个逻辑已经和佳妮确认

View File

@ -679,9 +679,9 @@ public class ProxyPurchaseWarehousWarehouse 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.getCustshortname(), bdCorpEntityList.get(0).getUnitname());
} else if (bdCumandocEntityList.size() >= 2) {
Assert.state(false, "根据客商基本档案主键{},匹配到多个客商管理档案", fuzzyQueryCustomers.getPkCubasdoc());
Assert.state(false, "客商:{} 公司:{} 存在多个对应关系!", fuzzyQueryCustomers.getCustshortname(), bdCorpEntityList.get(0).getUnitname());
}
// 2024年8月20日 23:51:56 收货库存组织应该是通过收货公司查询得出收货库存组织目前收货公司和采购公司保持一致那么就以采购公司带出这个逻辑已经和佳妮确认

View File

@ -26,6 +26,6 @@ public class ProxyPurchaseWarehousWarehouseTest {
@Test
public void startImplementByCode() {
proxyPurchaseWarehousWarehouse.startImplementByCode("LETS-RE2024080100000051");
proxyPurchaseWarehousWarehouse.startImplementByCode("LETS-RE2024102400000074");
}
}