每次重发时,更新erp返回的错误参数信息

master
zpl 3 years ago
parent 7718f271c3
commit 97ccae111e

@ -64,10 +64,11 @@ public class IntegrationLogServiceImpl extends ServiceImpl<IntegrationLogMapper,
struOut.setMsg(""); struOut.setMsg("");
outs[0] = struOut; outs[0] = struOut;
TableOfZprodordconfStruOutHolder outHolder = new TableOfZprodordconfStruOutHolder(outs); TableOfZprodordconfStruOutHolder outHolder = new TableOfZprodordconfStruOutHolder(outs);
String message = "";
try { try {
ERPAPI.erpWebService().zmesProdordconf(inHolder, outHolder); ERPAPI.erpWebService().zmesProdordconf(inHolder, outHolder);
String status = outHolder.value[1].getRet(); String status = outHolder.value[1].getRet();
String message = outHolder.value[1].getMsg(); message = outHolder.value[1].getMsg();
if (!status.equals("S")) { if (!status.equals("S")) {
throw new BaseException("ERP接口返回错误消息:" + message); throw new BaseException("ERP接口返回错误消息:" + message);
} }
@ -77,6 +78,10 @@ public class IntegrationLogServiceImpl extends ServiceImpl<IntegrationLogMapper,
updateById(byId); updateById(byId);
} catch (RemoteException e) { } catch (RemoteException e) {
throw new BaseException("ERP接口错误: " + e.getMessage()); throw new BaseException("ERP接口错误: " + e.getMessage());
} finally {
byId.setRequestDateTime(LocalDateTime.now());
byId.setResultMessage(message);
updateById(byId);
} }
} }

Loading…
Cancel
Save