| | |
| | | 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"); |
| | |
| | | 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(); |