From b98dcee35252cb105df1077fad1a521ee3b077b3 Mon Sep 17 00:00:00 2001 From: zhaoqing <1670883518@qq.com> Date: Thu, 28 May 2026 15:43:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E5=8F=A3=E4=BB=93=E5=8D=95=E6=8E=A8?= =?UTF-8?q?=E9=80=81-Log=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mhd/system/api/OmsServiceFeign.java | 8 +++++ .../com/mhd/system/api/domain/GwLogDTO.java | 2 -- .../RemoteOmsFeignFallbackFactory.java | 10 +++++++ .../oms/interfaces/dto/gwLog/GwLogDTO.java | 27 +++++++++++++++++ .../oms/interfaces/facade/gwLog/GwLogApi.java | 8 ++--- .../StockShelfOrderApplicationService.java | 30 ++++++++++++++++++- 6 files changed, 78 insertions(+), 7 deletions(-) diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/OmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/OmsServiceFeign.java index bff924986..d8064498d 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/OmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/OmsServiceFeign.java @@ -45,4 +45,12 @@ public interface OmsServiceFeign { @ApiOperation("查询企业国别列表-新增物料时显示下拉框数据") @GetMapping("/erpCountryApi/countryList") public AjaxResult getCountryList(ErpCountryDTO erpCountryDTO); + + @ApiOperation("保存gwlog") + @PostMapping("/gwLogApi/saveGwLog") + AjaxResult insertGwLog(@RequestBody GwLogDTO gwLogDTO); + + @ApiOperation("修改gwlog") + @PostMapping("/gwLogApi/updateGwLog") + AjaxResult updateGwLog(@RequestBody GwLogDTO gwLogDTO); } \ No newline at end of file diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/GwLogDTO.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/GwLogDTO.java index 893a222ca..d036a0669 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/GwLogDTO.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/GwLogDTO.java @@ -51,6 +51,4 @@ public class GwLogDTO { @ApiModelProperty("创建时间") private Date createTime; - @ApiModelProperty("删除标记:1-正常,0-删除") - private Integer delFlag; } diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteOmsFeignFallbackFactory.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteOmsFeignFallbackFactory.java index 86cf16e0c..96a00e504 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteOmsFeignFallbackFactory.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteOmsFeignFallbackFactory.java @@ -68,6 +68,16 @@ public class RemoteOmsFeignFallbackFactory implements FallbackFactorydata = (Map)insertResult.get("data"); + gwLogId = ((Number)data.get("id")).longValue(); + } + + }catch(Exception e){ + log.error("保存Gwlog失败:{}",e.getMessage()); + } updatePushStatus(id, 2, new Date(), pushBy,pushByName); @@ -2710,13 +2720,31 @@ public class StockShelfOrderApplicationService { failCount++; failMsg.append("id:").append(id).append("失败;"); } + if (gwLogId != null){ + gwLogDTO.setLogId(gwLogId); + try{ + AjaxResult updateResult = omsServiceFeign.updateGwLog(gwLogDTO); + }catch (Exception e){ + log.error("更新GwLog失败:{}",e.getMessage()); + } + } // gwLogMapper.updateById(gwLog); + response.close(); } catch (IOException e) { gwLogDTO.setStatus(3); gwLogDTO.setErrorMsg(e.getMessage()); gwLogDTO.setResponseBody("请求异常:" + e.getMessage()); // gwLogMapper.updateById(gwLog); + if (gwLogId != null){ + gwLogDTO.setLogId(gwLogId); + try{ + AjaxResult updateResult = omsServiceFeign.updateGwLog(gwLogDTO); + }catch (Exception ex){ + log.error("更新GwLog失败:{}",ex.getMessage()); + } + } + updatePushStatus(id, 4, new Date(), pushBy,pushByName); failCount++; failMsg.append("id:").append(id).append("异常:").append(e.getMessage()).append(";");