| | |
| | | String records = httpClientResult.getContent(); |
| | | records = records.replaceAll("\\p{Z}", ""); |
| | | JSONObject jsonObj = JSON.parseObject(records); |
| | | |
| | | records = jsonObj.getString("records"); |
| | | records = records.replaceAll("unit","unitName"); |
| | | records = records.replaceAll("attri2","unitName"); |
| | | records = records.replaceAll("brand","supplierName"); |
| | | records = records.replaceAll("jzgg","specification"); |
| | | records = records.replaceAll("model","specificationDisplayName"); |
| | | records = records.replaceAll("namecn","code"); |
| | |
| | | "}");*/ |
| | | //返回json格式参数 |
| | | String toString = returnJson.toString(); |
| | | System.out.println(toString); |
| | | System.out.println("响应参数分发:"+toString); |
| | | //分发增量数据至异构系统 |
| | | distributeDataToSys(toString,name); |
| | | } |
| | |
| | | "}"); |
| | | //返回json格式参数 |
| | | String toString = returnJson.toString(); |
| | | System.out.println(toString); |
| | | //分发增量数据至异构系统 |
| | | distributeDataToSys(toString,name); |
| | | } |
| | |
| | | String uuid = UUID.randomUUID().toString(); |
| | | try { |
| | | //数据分发 |
| | | httpClientResult = MdmApiUtils.doPostJson(address, jsonParam); |
| | | 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(); |