Commit db2b27d3 authored by 刘学辉's avatar 刘学辉

物料/产品接口数据的修改2

parent a815b1cc
...@@ -403,22 +403,23 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA ...@@ -403,22 +403,23 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
String result = defaultHttpClient.execute(mapList, url); String result = defaultHttpClient.execute(mapList, url);
List<Map<String, Object>> resultList = objectMapper.readValue(result, new TypeReference<List<Map<String, Object>>>() { List<Map<String, Object>> resultList = objectMapper.readValue(result, new TypeReference<List<Map<String, Object>>>() {
}); });
resultMap = resultList.get(0); Map<String, Object> backMap = resultList.get(0);
resultMap.put("businessType", busiType); // resultMap.put("businessType", busiType);
resultMap.put("businessId", prodApplyBaseInfo.getId()); // resultMap.put("parameter", JSON.toJSONString(map));
if ("S".equals(resultMap.get("TYPE"))) { // resultMap.put("businessId", prodApplyBaseInfo.getId());
if ("S".equals(backMap.get("TYPE"))) {
resultMap.put("type", "S"); resultMap.put("type", "S");
resultMap.put("message", applyDept.getMatnr()+resultMap.get("MESSAGE")); resultMap.put("message", applyDept.getMatnr()+":"+backMap.get("MESSAGE"));
if (!"product".equals(prodApplyBaseInfo.getKind())) { if (!"product".equals(prodApplyBaseInfo.getKind())) {
applyDept.setMatnr((String) map.get("MESSAGE_V1")); applyDept.setMatnr((String) backMap.get("MESSAGE_V1"));
} }
nonProdApplyDeptApplication.save(applyDept); nonProdApplyDeptApplication.save(applyDept);
} else { } else {
throw new RuntimeException("数据传输失败,请稍后手动重试!" + resultMap.get("MESSAGE")); throw new RuntimeException("数据传输失败,请稍后手动重试!" + backMap.get("MESSAGE"));
} }
} catch (Exception e) { } catch (Exception e) {
resultMap.put("type", "E"); resultMap.put("type", "E");
resultMap.put("message", e.getMessage()); resultMap.put("message",applyDept.getMatnr()+":"+e.getMessage());
//sapMutualEpLogApplication.saveSapMutualEpLog(resultMap); //sapMutualEpLogApplication.saveSapMutualEpLog(resultMap);
throw new RuntimeException("数据传输失败请检查数据后重试!" + e.getMessage()); throw new RuntimeException("数据传输失败请检查数据后重试!" + e.getMessage());
} finally { } finally {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment