erp客商主、物料查询没数据直接返回

This commit is contained in:
liss
2025-10-20 15:46:10 +08:00
parent 6bed3e7102
commit 26e3fba2a6
2 changed files with 3 additions and 3 deletions

View File

@@ -140,7 +140,7 @@ public class ErpCustomerServiceImpl implements ErpCustomerService {
dataArrayALL.addAll(dataArray); dataArrayALL.addAll(dataArray);
} }
if (dataArrayALL.isEmpty()) { if (dataArrayALL.isEmpty()) {
throw exception(ERP_CUSTOMER_NOT_EXISTS); return;
} }
// 2. 处理数据,区分新增和更新 // 2. 处理数据,区分新增和更新

View File

@@ -200,8 +200,8 @@ public class ErpMaterialServiceImpl implements ErpMaterialService {
// 1. 调用ERP接口获取数据 // 1. 调用ERP接口获取数据
HashMap<String, Object> dataFromERP = erpConfig.fetchDataFromERP(funcnr, req); HashMap<String, Object> dataFromERP = erpConfig.fetchDataFromERP(funcnr, req);
JSONArray dataArray = (JSONArray) dataFromERP.get("E_RESP"); JSONArray dataArray = (JSONArray) dataFromERP.get("E_RESP");
if (CollUtil.isEmpty(dataArray)) { if (dataArray == null || dataArray.isEmpty()) {
throw exception(ERP_MATERIAL_NOT_EXISTS); return;
} }
// 2. 处理公司数据,区分新增和更新 // 2. 处理公司数据,区分新增和更新