Commit 7310ec54 authored by 鲁鑫's avatar 鲁鑫

供应商修改

parent 57fe48c0
......@@ -145,7 +145,7 @@ function loadSuppliersPayListGrid() {
},
},
{
display: "考虑的付款方式清单", name: "zwels", width: 140, minWidth: 60, type: "String", align: "left",
display: "考虑的付款方式清单", name: "zwelsTextView", width: 140, minWidth: 60, type: "String", align: "left",
editor: {
type: 'dictionary',
data: {name: 'zwels'},
......
......@@ -2,6 +2,7 @@ package com.huigou.topsun.sap.suppliers.application.impl;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
......@@ -354,13 +355,13 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
suppliersInfoVos.add(suppliersInfoVo);
try {
String result = defaultHttpClient.execute(suppliersInfoVos, url);
List<SapResult> sapResultList = objectMapper.readValue(result, new TypeReference<List<SapResult>>() {
});
List<SapResult> sapResultList = JSONObject.parseArray(result, SapResult.class);
SapResult sapResult = sapResultList.get(0);
resultMap.put("sequence", resultMap.get("row"));
sapMutualEpLogApplication.saveSapMutualEpLog(resultMap);
if ("S".equals(sapResult.getTYPE())) {
suppliersInfo.setPartner(sapResult.getMESSAGE_V1());
resultMap.put("type", sapResult.getTYPE());
resultMap.put("message", sapResult.getMESSAGE());
suppliersInfoRepository.save(suppliersInfo);
} else {
throw new RuntimeException("数据传输失败,请稍后手动重试!" + sapResult.getMESSAGE());
......@@ -368,8 +369,9 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
} catch (Exception e) {
resultMap.put("type", "E");
resultMap.put("message", e.getMessage());
sapMutualEpLogApplication.saveSapMutualEpLog(resultMap);
throw new RuntimeException("数据传输失败请检查数据后重试!" + e.getMessage());
} finally {
sapMutualEpLogApplication.saveSapMutualEpLog(resultMap);
}
......
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