dbs
2024-12-12 83e0034ab5f729afeb2c25e328d63fda31ff01e1
src/main/java/com/itstyle/mdm/utils/MdmUtils.java
@@ -50,6 +50,7 @@
                String records = httpClientResult.getContent();
                records = records.replaceAll("\\p{Z}", "");
                JSONObject jsonObj = JSON.parseObject(records);
                records = jsonObj.getString("records");
                records = records.replaceAll("attri2","unitName");
                records = records.replaceAll("brand","supplierName");
@@ -144,7 +145,17 @@
                String uuid = UUID.randomUUID().toString();
                try {
                    //数据分发
                    if("MES系统".equals(sysName)){
                        //处理json为MES系统想要的格式
                        jsonParam=MdmApiUtils.getMesJson(jsonParam);
                        //拼接webservice
                        String xmlStr=MdmApiUtils.getMesSoapBody(jsonParam);
                        //请求webservice
                        httpClientResult = MdmApiUtils.doPostXmlJson(address, xmlStr);
                    }else{
                    httpClientResult = MdmApiUtils.doPostJson(address, jsonParam);
                    }
                    //响应结果
                    String content = httpClientResult.getContent();
                    int code = httpClientResult.getCode();