diff --git a/zt-module-erp/zt-module-erp-api/src/main/java/com/zt/plat/module/erp/api/dto/dto071/ItemList071.java b/zt-module-erp/zt-module-erp-api/src/main/java/com/zt/plat/module/erp/api/dto/dto071/ItemList071.java index c254f375..27d28b68 100644 --- a/zt-module-erp/zt-module-erp-api/src/main/java/com/zt/plat/module/erp/api/dto/dto071/ItemList071.java +++ b/zt-module-erp/zt-module-erp-api/src/main/java/com/zt/plat/module/erp/api/dto/dto071/ItemList071.java @@ -27,7 +27,7 @@ public class ItemList071 implements Serializable { @Schema(description = "计量单位", requiredMode = Schema.RequiredMode.REQUIRED) private String entry_uom; - @Schema(description = "采购订单号(采购订单收货时需要)", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "采购订单号(采购订单收货时需要:sap订单号)", requiredMode = Schema.RequiredMode.REQUIRED) private String po_number; @Schema(description = "采购订单行号(采购订单收货时需要)", requiredMode = Schema.RequiredMode.REQUIRED) diff --git a/zt-module-erp/zt-module-erp-server/src/main/java/com/zt/plat/module/erp/utils/ErpConfig.java b/zt-module-erp/zt-module-erp-server/src/main/java/com/zt/plat/module/erp/utils/ErpConfig.java index 9e5b4565..53c8f193 100644 --- a/zt-module-erp/zt-module-erp-server/src/main/java/com/zt/plat/module/erp/utils/ErpConfig.java +++ b/zt-module-erp/zt-module-erp-server/src/main/java/com/zt/plat/module/erp/utils/ErpConfig.java @@ -17,8 +17,6 @@ import org.springframework.web.client.RestTemplate; import java.nio.charset.StandardCharsets; import java.util.*; -import java.util.concurrent.ConcurrentHashMap; - import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception; import static com.zt.plat.module.erp.enums.ErrorCodeConstants.*; import static dm.jdbc.util.DriverUtil.log; @@ -70,7 +68,7 @@ public class ErpConfig { throw exception(ERP_NOT_EXISTS); } - Map resMap = new ConcurrentHashMap<>(); + Map resMap = new HashMap<>(); JSONObject jsonResponse = JSON.parseObject(responseBody); if (jsonResponse == null) { throw exception(ERP_NOT_JSON_EXISTS); @@ -82,7 +80,7 @@ public class ErpConfig { if (succeed && "S".equals(dataObject.getString("E_FLAG"))) { String flag = "S"; JSONArray E_RESP = dataObject.containsKey("E_DATA") ? dataObject.getJSONArray("E_DATA") : null; - String E_MSG = dataObject.containsKey("E_MSG") ? dataObject.getString("E_MSG") : ""; + String E_MSG = dataObject.containsKey("E_MSG") ? dataObject.getString("E_MSG") : null; resMap.put("E_RESP", E_RESP); resMap.put("resStr", E_MSG); resMap.put("flag", flag); @@ -147,12 +145,16 @@ public class ErpConfig { throw exception(ERP_NOT_JSON_EXISTS); } - Map resMap = new ConcurrentHashMap<>(); + Map resMap = new HashMap<>(); boolean succeed = jsonResponse.getBoolean("succeed"); JSONObject data = jsonResponse.getJSONObject("data"); + String msg = jsonResponse.getString("msg"); if (data == null) { + resMap.put("E_RESP", null); + resMap.put("resStr", msg); + resMap.put("flag", "E"); log.error("SAP接口返回值为空," + jsonResponse.getString("msg")); - throw exception(ERP_NOT_EXISTS); + //throw exception(ERP_NOT_EXISTS); } else if (succeed && "S".equals(data.getString("E_FLAG"))) { String flag = "S"; String E_RESP = data.containsKey("E_RESP") ? data.getString("E_RESP") : null;