From 34b27eabd2528c70baa5002834a6fd70c250d7e5 Mon Sep 17 00:00:00 2001 From: rcx <3084692334@qq.com> Date: Mon, 7 Sep 2026 14:18:34 +0800 Subject: [PATCH 01/29] =?UTF-8?q?fix(oms):=20=E5=87=BA=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E8=A1=8C=E7=BA=A7=E5=BF=85=E5=A1=AB=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C+=E9=A1=B5=E7=AD=BE=E8=A7=A3=E6=9E=90=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E5=AE=8C=E6=95=B4=E5=A0=86=E6=A0=88=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 一、行级必填校验(ReservationStockInOrderImpl) - 入库导入:新增校验空【產品編號】/空【支/件数】的明细行,给出明确提示 - 出库导入:新增校验空【支/件数】的明细行 - 修复原因:明细行件数为空时 new BigDecimal(null) 抛无信息的 NullPointerException,页面只显示 页签[x]:java.lang.NullPointerException 无法定位 二、页签解析失败完整堆栈日志 - 出/入库多页签解析第一阶段捕获异常时,将完整堆栈打入服务端日志(LOGGER.error),便于远程定位页签内具体报错行号 --- .../ReservationStockInOrderImpl.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/persistence/ReservationStockInOrderImpl.java b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/persistence/ReservationStockInOrderImpl.java index 6a2bc7e5a..837b754b5 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/persistence/ReservationStockInOrderImpl.java +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/persistence/ReservationStockInOrderImpl.java @@ -336,6 +336,12 @@ public class ReservationStockInOrderImpl extends ServiceImpl Date: Mon, 7 Sep 2026 14:25:29 +0800 Subject: [PATCH 02/29] =?UTF-8?q?=E5=8F=91=20=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mhd/system/api/WmsServiceFeign.java | 2 +- .../java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java index b25ecbef5..ceaf3780b 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java @@ -21,7 +21,7 @@ import java.util.Map; * @description: TODO * @date 2024/5/10 8:58 **/ -@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE, url = "http://10.33.0.109:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE,url = "http://10.33.0.109:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface WmsServiceFeign { /** diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java index 89a3a6114..b8db7365f 100644 --- a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java @@ -26,7 +26,7 @@ import java.io.InputStream; import java.util.List; import java.util.Map; -@FeignClient(value = "mhd-third-party-service",url = "http://10.33.0.129:8012",configuration = FeignAutoConfiguration.class) +@FeignClient(value = "mhd-third-party-service",url = "http://10.33.0.129:8012", configuration = FeignAutoConfiguration.class) public interface ThirdPartyServiceFeign { //查询当前组织所有三方接口信息 From 98b5ce81cce700ebb617117e1e00fe1c6f897195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E9=B8=BF=E5=B1=95?= <18031053041@163.com> Date: Mon, 7 Sep 2026 14:28:29 +0800 Subject: [PATCH 03/29] =?UTF-8?q?=E5=A7=94=E6=89=98=E6=96=B9=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../interfaces/facade/UserShipperAPI.java | 32 ++++++++ .../interfaces/vo/UserShipperExportVO.java | 73 +++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 mhd-user-center/src/main/java/com/mhd/user/interfaces/vo/UserShipperExportVO.java diff --git a/mhd-user-center/src/main/java/com/mhd/user/interfaces/facade/UserShipperAPI.java b/mhd-user-center/src/main/java/com/mhd/user/interfaces/facade/UserShipperAPI.java index 41ae750a4..78b243ee1 100644 --- a/mhd-user-center/src/main/java/com/mhd/user/interfaces/facade/UserShipperAPI.java +++ b/mhd-user-center/src/main/java/com/mhd/user/interfaces/facade/UserShipperAPI.java @@ -3,6 +3,7 @@ package com.mhd.user.interfaces.facade; import com.github.pagehelper.PageHelper; import com.mhd.common.core.domain.entity.R; import com.mhd.common.core.utils.bean.BeanUtils; +import com.mhd.common.core.utils.poi.ExcelUtil; import com.mhd.common.log.annotation.Log; import com.mhd.common.log.enums.BusinessType; import com.mhd.common.security.utils.SecurityUtils; @@ -24,6 +25,7 @@ import com.mhd.user.application.service.WechatMiniAppService; import com.mhd.user.interfaces.dto.updateDTO.SettlementInfoUpdateDTO; import com.mhd.user.interfaces.vo.SettlementInfoQueryVo; import com.mhd.user.interfaces.vo.ShipperMasterDataSyncTimeVo; +import com.mhd.user.interfaces.vo.UserShipperExportVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; @@ -31,6 +33,9 @@ import org.springframework.format.annotation.DateTimeFormat; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.net.URLEncoder; import java.util.*; @Api(tags = "用户中台管理-托运人管理") @@ -128,6 +133,33 @@ public class UserShipperAPI extends BaseController { return getDataTable(list); } + @Log(title = "托运人管理-导出", description ="导出托运人列表",businessType = BusinessType.EXPORT) + @ApiOperation("导出托运人列表") + @GetMapping(value = "/exportUserShipper", produces = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") + public void exportUserShipper(UserShipperDTO userShipperDTO, HttpServletResponse response) throws IOException { + //转换实体 + UserShipperDO userShipperDO = userShipperAssember.toUserShipperDO(userShipperDTO); + //查询全量(不分页),复用列表查询逻辑(含数据权限过滤) + List list = userShipperApplicationService.userShipperList(userShipperDO); + + List exportList = new ArrayList<>(); + if (list != null) { + for (UserShipperPo po : list) { + UserShipperExportVO vo = new UserShipperExportVO(); + BeanUtils.copyProperties(po, vo); + exportList.add(vo); + } + } + + //设置下载头,防止浏览器乱码 + String fileName = URLEncoder.encode("托运人列表", "UTF-8").replaceAll("\\+", "%20"); + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setCharacterEncoding("utf-8"); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + + ExcelUtil util = new ExcelUtil<>(UserShipperExportVO.class); + util.exportExcel(response, exportList, "托运人列表"); + } @ApiOperation("查询托运人列表统计表单") @GetMapping("/userShipperCount") diff --git a/mhd-user-center/src/main/java/com/mhd/user/interfaces/vo/UserShipperExportVO.java b/mhd-user-center/src/main/java/com/mhd/user/interfaces/vo/UserShipperExportVO.java new file mode 100644 index 000000000..dd5f4633a --- /dev/null +++ b/mhd-user-center/src/main/java/com/mhd/user/interfaces/vo/UserShipperExportVO.java @@ -0,0 +1,73 @@ +package com.mhd.user.interfaces.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.mhd.common.core.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 托运人(委托方)列表导出对象 + * + * @author gen + */ +@Data +@ApiModel(value = "托运人列表导出对象", description = "托运人列表导出对象") +public class UserShipperExportVO { + + @Excel(name = "登录账号", sort = 1, width = 20) + @ApiModelProperty(value = "登录账号") + private String userAccount; + + @Excel(name = "公司名称", sort = 2, width = 30) + @ApiModelProperty(value = "公司名称") + private String shipperEnterpriseName; + + @Excel(name = "联系人", sort = 3, width = 15) + @ApiModelProperty(value = "联系人") + private String emergencyContactName; + + @Excel(name = "联系电话", sort = 4, width = 18) + @ApiModelProperty(value = "联系电话") + private String emergencyContactPhone; + + @Excel(name = "地址", sort = 5, width = 30) + @ApiModelProperty(value = "企业注册地址") + private String shipperEnterpriseAddress; + + @Excel(name = "详细地址", sort = 6, width = 30) + @ApiModelProperty(value = "详细地址") + private String userAreaAddressShipper; + + @Excel(name = "备注", sort = 7, width = 25) + @ApiModelProperty(value = "备注") + private String remark; + + @Excel(name = "结算币种", sort = 8, width = 12) + @ApiModelProperty(value = "结算币种") + private String settlementCurrency; + + @Excel(name = "信用额度", sort = 9, width = 15) + @ApiModelProperty(value = "信用额度(授权额度)") + private BigDecimal authorizedQuota; + + @Excel(name = "信用占用", sort = 10, width = 15) + @ApiModelProperty(value = "信用占用") + private BigDecimal authorizedUsedAmount; + + @Excel(name = "信用余额", sort = 11, width = 15) + @ApiModelProperty(value = "信用余额") + private BigDecimal creditAmount; + + @Excel(name = "客户协议", sort = 12, width = 12) + @ApiModelProperty(value = "客户协议数量") + private BigDecimal agreementCount; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @Excel(name = "最近同步信用时间", sort = 13, width = 22, dateFormat = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "最近同步信用时间") + private Date limitTime; +} From 9e1c5d857009d41cfba1d203db9b93c5868ab778 Mon Sep 17 00:00:00 2001 From: rcx <3084692334@qq.com> Date: Mon, 7 Sep 2026 15:44:44 +0800 Subject: [PATCH 04/29] =?UTF-8?q?fix(oms):=20=E9=A2=84=E7=BA=A6=E5=8D=95?= =?UTF-8?q?=E4=B8=8B=E5=8F=91=E4=B8=8D=E5=86=8D=E6=8E=A8=E9=80=81WMS?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=89=A7=E8=A1=8C=E5=8D=95=E4=B8=8B?= =?UTF-8?q?=E5=8F=91=E5=90=8EWMS=E5=87=BA=E7=8E=B0=E9=A2=84=E7=BA=A6?= =?UTF-8?q?=E5=8D=95+=E6=89=A7=E8=A1=8C=E5=8D=95=E4=B8=A4=E5=BC=A0?= =?UTF-8?q?=E5=8D=95=EF=BC=9B=E4=B8=89=E4=B8=AA=E4=B8=8B=E5=8F=91=E5=85=A5?= =?UTF-8?q?=E5=8F=A3=E8=A1=A5=E5=85=85=E8=BD=AF=E5=88=A0=E5=8D=95=E6=8B=A6?= =?UTF-8?q?=E6=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExecutionStockInOrderDomainService.java | 8 ++- .../ReservationStockInOrderDomainService.java | 62 +++++-------------- 2 files changed, 24 insertions(+), 46 deletions(-) diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/executionStockInOrder/service/ExecutionStockInOrderDomainService.java b/mhd_oms/src/main/java/com/mhd/oms/domain/executionStockInOrder/service/ExecutionStockInOrderDomainService.java index 2264a05da..20f5c398c 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/domain/executionStockInOrder/service/ExecutionStockInOrderDomainService.java +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/executionStockInOrder/service/ExecutionStockInOrderDomainService.java @@ -613,9 +613,15 @@ public class ExecutionStockInOrderDomainService { } // 入参去重:同一请求内重复ID会导致同一执行单被多次推送WMS List distinctInOrderIds = inOrderIds.stream().distinct().collect(Collectors.toList()); + // 只校验有效单据:已删除(软删)执行单混入ID(过期页面提交)时在此拦截, + // 此前list/getById均不过滤del_flag,软删单照样被推到WMS形成"幽灵单" List checkOrders = stockInOrderService.list( new QueryWrapper().lambda() - .in(ExecutionStockInOrder::getInOrderId, distinctInOrderIds)); + .in(ExecutionStockInOrder::getInOrderId, distinctInOrderIds) + .eq(ExecutionStockInOrder::getDelFlag, 1)); + if (checkOrders.size() != distinctInOrderIds.size()) { + throw new ServiceException("下发失败:存在已删除的单据,请刷新后重新选择"); + } for (ExecutionStockInOrder order : checkOrders) { if (order.getIssueTime() != null) { throw new ServiceException("下发失败:单据[" + order.getInOrderNumber() + "]已下发,不可重复下发;如需重新下发请先取消下发"); diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderDomainService.java b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderDomainService.java index e08614aaa..5f30c94c7 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderDomainService.java +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderDomainService.java @@ -525,9 +525,14 @@ public class ReservationStockInOrderDomainService { if (inOrderIds == null || inOrderIds.isEmpty()) { throw new ServiceException("下发失败:未选择单据"); } + // 只校验有效单据:软删单混入ID(过期页面提交)时在此拦截 List checkOrders = stockInOrderService.list( new QueryWrapper().lambda() - .in(ReservationStockInOrder::getInOrderId, inOrderIds)); + .in(ReservationStockInOrder::getInOrderId, inOrderIds) + .eq(ReservationStockInOrder::getDelFlag, 1)); + if (checkOrders.size() != inOrderIds.stream().distinct().count()) { + throw new ServiceException("下发失败:存在已删除的单据,请刷新后重新选择"); + } for (ReservationStockInOrder order : checkOrders) { // 校验1:必须已审核(issueStatus==2 表示审核成功) if (order.getIssueStatus() == null || order.getIssueStatus() != 2) { @@ -560,50 +565,12 @@ public class ReservationStockInOrderDomainService { .set(ReservationStockInOrder::getUpdateTime, new Date()) .in(ReservationStockInOrder::getInOrderId, stockInOrderDO.getInOrderIds())); - //todo下发推送到wms - for (Long inOrderId : inOrderIds) { - ReservationStockInOrder byId = stockInOrderService.getById(inOrderId); - StockInOrder stockInOrder = new StockInOrder(); - BeanUtils.copyProperties(byId, stockInOrder, "inOrderId"); - stockInOrder.setOmsStockInOrderId(String.valueOf(byId.getInOrderId())); + // 业务链路(2026-09与业务确认,生产验证):预约单下发→生成执行单→执行单下发时才推送WMS。 + // 预约单下发此前会先把预约单自身推到WMS(omsInOrderAdd/omsInOrderAddDetail),执行单下发又推一次, + // 导致WMS入库管理出现预约单号(R260907001)+执行单号(RK260907001)两张单、仓库收两道货。 + // 已移除预约单的WMS推送,WMS推送唯一入口收敛到 ExecutionStockInOrderDomainService.issueOrder。 + // 历史已推送的预约单数据由"取消下发"(cancelIssueOrder→omsCancelInOrder,幂等)负责清理。 - try { - //WMS保存结果必须校验:此前接口返回void、Feign降级被静默吞掉,OMS标记已下发但WMS无数据/缺明细, - //收货流程无从进行(流程阻断);失败抛错回滚下发标记,WMS侧幂等(主单/明细判重),重下发安全 - AjaxResult addResult = wmsServiceFeign.omsInOrderAdd(stockInOrder); // 推主单 - if (addResult == null || !"200".equals(String.valueOf(addResult.get("code")))) { - throw new ServiceException("下发到WMS失败:入库单[" + stockInOrder.getInOrderNumber() + "]保存主单失败:" - + (addResult == null ? "WMS服务不可用或已降级" : addResult.get("msg"))); - } - - String inOrderNumber = stockInOrder.getInOrderNumber(); - List materialDetailList = materialDetailService.list( - new QueryWrapper().lambda() - .eq(ReservationInMaterialDetail::getInOrderNumber, inOrderNumber) - .eq(ReservationInMaterialDetail::getDelFlag, 1)); - List inMaterialDetailList = new ArrayList<>(); - for (ReservationInMaterialDetail reservationInMaterialDetail : materialDetailList) { - InMaterialDetail inMaterialDetail = new InMaterialDetail(); - BeanUtils.copyProperties(reservationInMaterialDetail, inMaterialDetail, "materialDetailId"); - inMaterialDetail.setOmsInMaterialDetail(String.valueOf(reservationInMaterialDetail.getMaterialDetailId())); - // 过期日期为空且饮用日期有值时,用饮用日期补齐过期日期(食品业务饮用日期即效期), - // 确保下发WMS后入库/收货/库存链路的过期日期能正常回显 - if (inMaterialDetail.getExpiryDate() == null && inMaterialDetail.getDrinkDate() != null) { - inMaterialDetail.setExpiryDate(inMaterialDetail.getDrinkDate()); - } - inMaterialDetailList.add(inMaterialDetail); - } - AjaxResult detailResult = wmsServiceFeign.omsInOrderAddDetail(inMaterialDetailList); // 推明细(会触发WMS自动审核) - if (detailResult == null || !"200".equals(String.valueOf(detailResult.get("code")))) { - throw new ServiceException("下发到WMS失败:入库单[" + inOrderNumber + "]保存明细失败:" - + (detailResult == null ? "WMS服务不可用或已降级" : detailResult.get("msg"))); - } - log.info("下发到WMS成功,单据号:{}", byId.getInOrderNumber()); - } catch (Exception e) { - log.error("下发到WMS失败,单据号:{}", byId.getInOrderNumber(), e); - throw new ServiceException("下发到WMS失败:" + e.getMessage()); - } - } //todo下发推送到入库业务单 for (Long inOrderId : inOrderIds) { // Long inOrderId = stockInOrderDO.getInOrderId(); @@ -801,9 +768,14 @@ public class ReservationStockInOrderDomainService { if (inOrderIds == null || inOrderIds.isEmpty()) { throw new ServiceException("执行失败:未选择单据"); } + // 只校验有效单据:软删单混入ID(过期页面提交)时在此拦截(与 issueOrder 校验口径一致) List checkOrders = stockInOrderService.list( new QueryWrapper().lambda() - .in(ReservationStockInOrder::getInOrderId, inOrderIds)); + .in(ReservationStockInOrder::getInOrderId, inOrderIds) + .eq(ReservationStockInOrder::getDelFlag, 1)); + if (checkOrders.size() != inOrderIds.stream().distinct().count()) { + throw new ServiceException("执行失败:存在已删除的单据,请刷新后重新选择"); + } for (ReservationStockInOrder order : checkOrders) { if (order.getIssueTime() != null) { throw new ServiceException("执行失败:单据[" + order.getInOrderNumber() + "]已下发,不可重复执行;如需重新下发请先取消下发"); From acbf7c9fdfadda1d4cc934a4ee9fd07082318bda Mon Sep 17 00:00:00 2001 From: rcx <3084692334@qq.com> Date: Mon, 7 Sep 2026 16:56:17 +0800 Subject: [PATCH 05/29] =?UTF-8?q?fix:=20=E9=80=80=E8=B4=A7=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E5=8D=95=E4=B8=8B=E5=8F=91=E6=97=B6=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95=E7=B1=BB=E5=9E=8B=E8=A2=AB=E5=9B=BA?= =?UTF-8?q?=E5=AE=9A=E5=86=99=E6=88=90=E6=99=AE=E9=80=9A=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReservationStockInOrderDomainService.java | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderDomainService.java b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderDomainService.java index bd8852799..8fbe068b6 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderDomainService.java +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderDomainService.java @@ -620,9 +620,16 @@ public class ReservationStockInOrderDomainService { // 执行单"运输业务单号"列永远显示入库业务单号(未选运输也显示) BeanUtils.copyProperties(byId, reservationStockInOrder,"inOrderId","issueStatus","issueTime","issueId","issueName","reservationAuditId","reservationAuditName","reservationAuditTime","businessOrderNo","businessNumber","tmsOrderNumber"); reservationStockInOrder.setIssueStatus(0); - reservationStockInOrder.setOrderTypeCode("pu_tong_ru_ku"); - reservationStockInOrder.setOrderTypeName("普通入库"); - reservationStockInOrder.setBusinessType("pu_tong_ru_ku"); + // 退货入库单下发时类型跟随预约单,避免执行入库单被固定写成普通入库 + if ("tui_huo_ru_ku".equals(byId.getOrderTypeCode()) || "退货入库".equals(byId.getOrderTypeName())) { + reservationStockInOrder.setOrderTypeCode("tui_huo_ru_ku"); + reservationStockInOrder.setOrderTypeName("退货入库"); + reservationStockInOrder.setBusinessType("tui_huo_ru_ku"); + } else { + reservationStockInOrder.setOrderTypeCode("pu_tong_ru_ku"); + reservationStockInOrder.setOrderTypeName("普通入库"); + reservationStockInOrder.setBusinessType("pu_tong_ru_ku"); + } reservationStockInOrder.setReservationOrderSource("客户预约"); reservationStockInOrder.setWarehouseId(warehouseId); if (warehouseId == null || warehouseId == 0L){ @@ -851,9 +858,16 @@ public class ReservationStockInOrderDomainService { // 运输业务单号不直接从业务单头复制,避免历史已取消运输单号残留下发到执行单 BeanUtils.copyProperties(byId, reservationStockInOrder,"inOrderId","issueStatus","issueTime","issueId","issueName","reservationAuditId","reservationAuditName","reservationAuditTime","businessOrderNo","businessNumber","tmsOrderNumber"); reservationStockInOrder.setIssueStatus(0); - reservationStockInOrder.setOrderTypeCode("pu_tong_ru_ku"); - reservationStockInOrder.setOrderTypeName("普通入库"); - reservationStockInOrder.setBusinessType("pu_tong_ru_ku"); + // 退货入库单下发时类型跟随预约单,避免执行入库单被固定写成普通入库 + if ("tui_huo_ru_ku".equals(byId.getOrderTypeCode()) || "退货入库".equals(byId.getOrderTypeName())) { + reservationStockInOrder.setOrderTypeCode("tui_huo_ru_ku"); + reservationStockInOrder.setOrderTypeName("退货入库"); + reservationStockInOrder.setBusinessType("tui_huo_ru_ku"); + } else { + reservationStockInOrder.setOrderTypeCode("pu_tong_ru_ku"); + reservationStockInOrder.setOrderTypeName("普通入库"); + reservationStockInOrder.setBusinessType("pu_tong_ru_ku"); + } reservationStockInOrder.setReservationOrderSource("客户预约"); reservationStockInOrder.setWarehouseId(warehouseId); // reservationStockInOrder.setOrganizationId(orgId); From 0ace96ea9ff1325236daad72c8d7d2e7d5b54753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=A5=8E=E5=85=B4?= <2220574228@qq.com> Date: Mon, 7 Sep 2026 17:06:27 +0800 Subject: [PATCH 06/29] =?UTF-8?q?=E6=81=A2=E5=A4=8Dxxl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mhd_wms/pom.xml | 10 +-- .../HandoverTaskOrderApplicationService.java | 12 +-- .../java/com/mhd/wms/util/XxlJobConfig.java | 82 +++++++++---------- 3 files changed, 52 insertions(+), 52 deletions(-) diff --git a/mhd_wms/pom.xml b/mhd_wms/pom.xml index cc6b6b9f1..3bd995c8b 100644 --- a/mhd_wms/pom.xml +++ b/mhd_wms/pom.xml @@ -80,11 +80,11 @@ opencc4j 1.8.1 - - com.xuxueli - xxl-job-core - 2.4.0 - + + + + + com.mhd diff --git a/mhd_wms/src/main/java/com/mhd/wms/application/service/handoverTaskOrder/HandoverTaskOrderApplicationService.java b/mhd_wms/src/main/java/com/mhd/wms/application/service/handoverTaskOrder/HandoverTaskOrderApplicationService.java index 1bae47fdf..f9a22003e 100644 --- a/mhd_wms/src/main/java/com/mhd/wms/application/service/handoverTaskOrder/HandoverTaskOrderApplicationService.java +++ b/mhd_wms/src/main/java/com/mhd/wms/application/service/handoverTaskOrder/HandoverTaskOrderApplicationService.java @@ -208,9 +208,9 @@ public class HandoverTaskOrderApplicationService { public Boolean completeHandover(HandoverTaskOrderDO handoverTaskOrderDO){ Boolean result = handoverTaskOrderDomainService.completeHandover(handoverTaskOrderDO); List clearoutParamDOs = handoverTaskOrderDomainService.getLastClearoutParamDOs(); - for (MaterialInventoryParamDO paramDO : clearoutParamDOs) { - materialInventoryApplicationService.pushBillingRecordClearout(paramDO.getMaterialInventoryId(), paramDO.getQuantity()); - } +// for (MaterialInventoryParamDO paramDO : clearoutParamDOs) { +// materialInventoryApplicationService.pushBillingRecordClearout(paramDO.getMaterialInventoryId(), paramDO.getQuantity()); +// } return result; } @@ -309,9 +309,9 @@ public class HandoverTaskOrderApplicationService { completeDO.setBillingJson(handoverTaskOrderDO.getBillingJson()); handoverTaskOrderDomainService.completeHandover(completeDO); List clearoutParamDOs = handoverTaskOrderDomainService.getLastClearoutParamDOs(); - for (MaterialInventoryParamDO paramDO : clearoutParamDOs) { - materialInventoryApplicationService.pushBillingRecordClearout(paramDO.getMaterialInventoryId(), paramDO.getQuantity()); - } +// for (MaterialInventoryParamDO paramDO : clearoutParamDOs) { +// materialInventoryApplicationService.pushBillingRecordClearout(paramDO.getMaterialInventoryId(), paramDO.getQuantity()); +// } } } } diff --git a/mhd_wms/src/main/java/com/mhd/wms/util/XxlJobConfig.java b/mhd_wms/src/main/java/com/mhd/wms/util/XxlJobConfig.java index 9627d0e7b..e17d38a46 100644 --- a/mhd_wms/src/main/java/com/mhd/wms/util/XxlJobConfig.java +++ b/mhd_wms/src/main/java/com/mhd/wms/util/XxlJobConfig.java @@ -9,46 +9,46 @@ import org.springframework.context.annotation.Configuration; /** * XXL-JOB 配置类 */ -@Configuration +//@Configuration public class XxlJobConfig { - private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class); - - @Value("${xxl.job.admin.addresses}") - private String adminAddresses; - - @Value("${xxl.job.accessToken}") - private String accessToken; - - @Value("${xxl.job.executor.appname}") - private String appname; - - @Value("${xxl.job.executor.address}") - private String address; - - @Value("${xxl.job.executor.ip}") - private String ip; - - @Value("${xxl.job.executor.port}") - private int port; - - @Value("${xxl.job.executor.logpath}") - private String logPath; - - @Value("${xxl.job.executor.logretentiondays}") - private int logRetentionDays; - - @Bean - public XxlJobSpringExecutor xxlJobExecutor() { - logger.info(">>>>>>>>>>> xxl-job config init."); - XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor(); - xxlJobSpringExecutor.setAdminAddresses(adminAddresses); - xxlJobSpringExecutor.setAppname(appname); - xxlJobSpringExecutor.setAddress(address); - xxlJobSpringExecutor.setIp(ip); - xxlJobSpringExecutor.setPort(port); - xxlJobSpringExecutor.setAccessToken(accessToken); - xxlJobSpringExecutor.setLogPath(logPath); - xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays); - return xxlJobSpringExecutor; - } +// private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class); +// +// @Value("${xxl.job.admin.addresses}") +// private String adminAddresses; +// +// @Value("${xxl.job.accessToken}") +// private String accessToken; +// +// @Value("${xxl.job.executor.appname}") +// private String appname; +// +// @Value("${xxl.job.executor.address}") +// private String address; +// +// @Value("${xxl.job.executor.ip}") +// private String ip; +// +// @Value("${xxl.job.executor.port}") +// private int port; +// +// @Value("${xxl.job.executor.logpath}") +// private String logPath; +// +// @Value("${xxl.job.executor.logretentiondays}") +// private int logRetentionDays; +// +// @Bean +// public XxlJobSpringExecutor xxlJobExecutor() { +// logger.info(">>>>>>>>>>> xxl-job config init."); +// XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor(); +// xxlJobSpringExecutor.setAdminAddresses(adminAddresses); +// xxlJobSpringExecutor.setAppname(appname); +// xxlJobSpringExecutor.setAddress(address); +// xxlJobSpringExecutor.setIp(ip); +// xxlJobSpringExecutor.setPort(port); +// xxlJobSpringExecutor.setAccessToken(accessToken); +// xxlJobSpringExecutor.setLogPath(logPath); +// xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays); +// return xxlJobSpringExecutor; +// } } \ No newline at end of file From 7ed34df81e4d11d53912ab36ae0bf980724d1060 Mon Sep 17 00:00:00 2001 From: rcx <3084692334@qq.com> Date: Mon, 7 Sep 2026 17:07:16 +0800 Subject: [PATCH 07/29] =?UTF-8?q?=E5=8F=9130?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mhd/system/api/BmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/OmsServiceFeign.java | 2 +- .../main/java/com/mhd/system/api/WlhyServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/WmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/YmsServiceFeign.java | 2 +- .../com/mhd/common/core/feign/ThirdPartyServiceFeign.java | 2 +- .../oms/infrastructure/feign/ThirdPartyServiceFeign.java | 2 +- mhd_oms/src/main/resources/bootstrap.yml | 8 ++++---- mhd_wms/src/main/resources/bootstrap.yml | 8 ++++---- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java index 6889c728b..00e656a88 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java @@ -19,7 +19,7 @@ import java.util.Set; /** * bms财务结算系统feign调用接口 */ -@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.33.0.109:8012",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.102.192.3:8012",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface BmsServiceFeign { 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 8a7006304..e9418197a 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 @@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestBody; import java.util.List; import java.util.concurrent.CompletableFuture; -@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.33.0.99:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.102.192.4:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface OmsServiceFeign { diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java index ba9a45148..e4a817238 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java @@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; -@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.33.0.129:8014",configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.102.192.30:8014",configuration = FeignAutoConfiguration.class) public interface WlhyServiceFeign { /** diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java index ceaf3780b..0da262497 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java @@ -21,7 +21,7 @@ import java.util.Map; * @description: TODO * @date 2024/5/10 8:58 **/ -@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE,url = "http://10.33.0.109:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE,url = "http://10.102.192.3:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface WmsServiceFeign { /** diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java index beba5b1af..12571141a 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java @@ -9,7 +9,7 @@ import com.mhd.system.api.feign.FeignAutoConfiguration; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; -@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,url = "http://10.33.0.99:8018",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,url = "http://10.102.192.4:8018",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface YmsServiceFeign { /** diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java index b8db7365f..94e7ade76 100644 --- a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java @@ -26,7 +26,7 @@ import java.io.InputStream; import java.util.List; import java.util.Map; -@FeignClient(value = "mhd-third-party-service",url = "http://10.33.0.129:8012", configuration = FeignAutoConfiguration.class) +@FeignClient(value = "mhd-third-party-service",url = "http://10.102.192.30:8012", configuration = FeignAutoConfiguration.class) public interface ThirdPartyServiceFeign { //查询当前组织所有三方接口信息 diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java index 376500b1c..26c5c12b9 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java @@ -22,7 +22,7 @@ import java.util.Map; /** * 三方服务 Feign */ -@FeignClient(contextId = "thirdPartyServiceFeign",url = "http://10.33.0.129:8012", value = ServiceNameConstants.THIRDPARTY_CENTER, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "thirdPartyServiceFeign",url = "http://10.102.192.30:8012", value = ServiceNameConstants.THIRDPARTY_CENTER, configuration = FeignAutoConfiguration.class) public interface ThirdPartyServiceFeign { //查询当前组织所有三方接口信息 diff --git a/mhd_oms/src/main/resources/bootstrap.yml b/mhd_oms/src/main/resources/bootstrap.yml index 88471e390..ee058f0f6 100644 --- a/mhd_oms/src/main/resources/bootstrap.yml +++ b/mhd_oms/src/main/resources/bootstrap.yml @@ -18,15 +18,15 @@ spring: discovery: # server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 - server-addr: 10.33.0.129:6010 -# server-addr: 10.102.192.30:6848 +# server-addr: 10.33.0.129:6010 + server-addr: 10.102.192.30:6848 username: nacos password: manhuoda@2023 config: # server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 - server-addr: 10.33.0.129:6010 -# server-addr: 10.102.192.30:6848 +# server-addr: 10.33.0.129:6010 + server-addr: 10.102.192.30:6848 username: nacos password: manhuoda@2023 #线上正式环境 diff --git a/mhd_wms/src/main/resources/bootstrap.yml b/mhd_wms/src/main/resources/bootstrap.yml index 39eb710cb..fc7380c20 100644 --- a/mhd_wms/src/main/resources/bootstrap.yml +++ b/mhd_wms/src/main/resources/bootstrap.yml @@ -14,18 +14,18 @@ spring: nacos: discovery: # server-addr: 127.0.0.1:8848 - server-addr: 10.33.0.129:6010 +# server-addr: 10.33.0.129:6010 # 线上测试环境配置 容器名+端口号 -# server-addr: 10.102.192.30:6848 + server-addr: 10.102.192.30:6848 username: nacos password: manhuoda@2023 #线上正式环境 # server-addr: 10.102.192.105:6848 config: # server-addr: 127.0.0.1:8848 - server-addr: 10.33.0.129:6010 +# server-addr: 10.33.0.129:6010 # 线上测试环境配置 容器名+端口号 -# server-addr: 10.102.192.30:6848 + server-addr: 10.102.192.30:6848 username: nacos password: manhuoda@2023 #线上正式环境 From 7742d11d1ca6f366590c4bdc5a0dc5b8d03a5550 Mon Sep 17 00:00:00 2001 From: rcx <3084692334@qq.com> Date: Mon, 7 Sep 2026 17:15:05 +0800 Subject: [PATCH 08/29] =?UTF-8?q?=E5=8F=9131?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mhd/system/api/BmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/OmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/WlhyServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/WmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/YmsServiceFeign.java | 2 +- .../com/mhd/common/core/feign/ThirdPartyServiceFeign.java | 2 +- .../mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java | 2 +- mhd_oms/src/main/resources/bootstrap.yml | 4 ++-- mhd_wms/src/main/resources/bootstrap.yml | 4 ++-- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java index 00e656a88..93cb610ff 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java @@ -19,7 +19,7 @@ import java.util.Set; /** * bms财务结算系统feign调用接口 */ -@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.102.192.3:8012",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.102.192.32:8012",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface BmsServiceFeign { 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 e9418197a..4ef3bed80 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 @@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestBody; import java.util.List; import java.util.concurrent.CompletableFuture; -@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.102.192.4:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.102.192.33:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface OmsServiceFeign { diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java index e4a817238..d976fcc98 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java @@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; -@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.102.192.30:8014",configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.102.192.31:8014",configuration = FeignAutoConfiguration.class) public interface WlhyServiceFeign { /** diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java index 0da262497..9016575f6 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java @@ -21,7 +21,7 @@ import java.util.Map; * @description: TODO * @date 2024/5/10 8:58 **/ -@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE,url = "http://10.102.192.3:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE,url = "http://10.102.192.32:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface WmsServiceFeign { /** diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java index 12571141a..750ed853e 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java @@ -9,7 +9,7 @@ import com.mhd.system.api.feign.FeignAutoConfiguration; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; -@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,url = "http://10.102.192.4:8018",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,url = "http://10.102.192.33:8018",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface YmsServiceFeign { /** diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java index 94e7ade76..48bf17cd1 100644 --- a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java @@ -26,7 +26,7 @@ import java.io.InputStream; import java.util.List; import java.util.Map; -@FeignClient(value = "mhd-third-party-service",url = "http://10.102.192.30:8012", configuration = FeignAutoConfiguration.class) +@FeignClient(value = "mhd-third-party-service",url = "http://10.102.192.31:8012", configuration = FeignAutoConfiguration.class) public interface ThirdPartyServiceFeign { //查询当前组织所有三方接口信息 diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java index 26c5c12b9..b54559ade 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java @@ -22,7 +22,7 @@ import java.util.Map; /** * 三方服务 Feign */ -@FeignClient(contextId = "thirdPartyServiceFeign",url = "http://10.102.192.30:8012", value = ServiceNameConstants.THIRDPARTY_CENTER, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "thirdPartyServiceFeign",url = "http://10.102.192.31:8012", value = ServiceNameConstants.THIRDPARTY_CENTER, configuration = FeignAutoConfiguration.class) public interface ThirdPartyServiceFeign { //查询当前组织所有三方接口信息 diff --git a/mhd_oms/src/main/resources/bootstrap.yml b/mhd_oms/src/main/resources/bootstrap.yml index ee058f0f6..542b6bce7 100644 --- a/mhd_oms/src/main/resources/bootstrap.yml +++ b/mhd_oms/src/main/resources/bootstrap.yml @@ -19,14 +19,14 @@ spring: # server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 # server-addr: 10.33.0.129:6010 - server-addr: 10.102.192.30:6848 + server-addr: 10.102.192.31:6848 username: nacos password: manhuoda@2023 config: # server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 # server-addr: 10.33.0.129:6010 - server-addr: 10.102.192.30:6848 + server-addr: 10.102.192.31:6848 username: nacos password: manhuoda@2023 #线上正式环境 diff --git a/mhd_wms/src/main/resources/bootstrap.yml b/mhd_wms/src/main/resources/bootstrap.yml index fc7380c20..e8f169bf2 100644 --- a/mhd_wms/src/main/resources/bootstrap.yml +++ b/mhd_wms/src/main/resources/bootstrap.yml @@ -16,7 +16,7 @@ spring: # server-addr: 127.0.0.1:8848 # server-addr: 10.33.0.129:6010 # 线上测试环境配置 容器名+端口号 - server-addr: 10.102.192.30:6848 + server-addr: 10.102.192.31:6848 username: nacos password: manhuoda@2023 #线上正式环境 @@ -25,7 +25,7 @@ spring: # server-addr: 127.0.0.1:8848 # server-addr: 10.33.0.129:6010 # 线上测试环境配置 容器名+端口号 - server-addr: 10.102.192.30:6848 + server-addr: 10.102.192.31:6848 username: nacos password: manhuoda@2023 #线上正式环境 From 1a80f715dd1cad636ce0d15d82c6f58a0bef5f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=A5=8E=E5=85=B4?= <2220574228@qq.com> Date: Mon, 7 Sep 2026 17:16:11 +0800 Subject: [PATCH 09/29] =?UTF-8?q?=E6=81=A2=E5=A4=8Dxxl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mhd_wms/pom.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mhd_wms/pom.xml b/mhd_wms/pom.xml index 3bd995c8b..cc6b6b9f1 100644 --- a/mhd_wms/pom.xml +++ b/mhd_wms/pom.xml @@ -80,11 +80,11 @@ opencc4j 1.8.1 - - - - - + + com.xuxueli + xxl-job-core + 2.4.0 + com.mhd From 6d7be15d97a95a6d9e6fc7825d508082d8c626f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=A5=8E=E5=85=B4?= <2220574228@qq.com> Date: Mon, 7 Sep 2026 17:23:01 +0800 Subject: [PATCH 10/29] =?UTF-8?q?=E5=8F=9131?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mhd/system/api/BmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/OmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/WlhyServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/WmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/YmsServiceFeign.java | 2 +- .../com/mhd/common/core/feign/ThirdPartyServiceFeign.java | 2 +- .../mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java | 2 +- mhd_oms/src/main/resources/bootstrap.yml | 4 ++-- mhd_wms/src/main/resources/bootstrap.yml | 4 ++-- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java index 00e656a88..93cb610ff 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java @@ -19,7 +19,7 @@ import java.util.Set; /** * bms财务结算系统feign调用接口 */ -@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.102.192.3:8012",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.102.192.32:8012",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface BmsServiceFeign { 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 e9418197a..4ef3bed80 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 @@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestBody; import java.util.List; import java.util.concurrent.CompletableFuture; -@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.102.192.4:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.102.192.33:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface OmsServiceFeign { diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java index e4a817238..d976fcc98 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java @@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; -@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.102.192.30:8014",configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.102.192.31:8014",configuration = FeignAutoConfiguration.class) public interface WlhyServiceFeign { /** diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java index 0da262497..9016575f6 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java @@ -21,7 +21,7 @@ import java.util.Map; * @description: TODO * @date 2024/5/10 8:58 **/ -@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE,url = "http://10.102.192.3:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE,url = "http://10.102.192.32:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface WmsServiceFeign { /** diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java index 12571141a..750ed853e 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java @@ -9,7 +9,7 @@ import com.mhd.system.api.feign.FeignAutoConfiguration; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; -@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,url = "http://10.102.192.4:8018",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,url = "http://10.102.192.33:8018",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface YmsServiceFeign { /** diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java index 94e7ade76..48bf17cd1 100644 --- a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java @@ -26,7 +26,7 @@ import java.io.InputStream; import java.util.List; import java.util.Map; -@FeignClient(value = "mhd-third-party-service",url = "http://10.102.192.30:8012", configuration = FeignAutoConfiguration.class) +@FeignClient(value = "mhd-third-party-service",url = "http://10.102.192.31:8012", configuration = FeignAutoConfiguration.class) public interface ThirdPartyServiceFeign { //查询当前组织所有三方接口信息 diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java index 26c5c12b9..b54559ade 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java @@ -22,7 +22,7 @@ import java.util.Map; /** * 三方服务 Feign */ -@FeignClient(contextId = "thirdPartyServiceFeign",url = "http://10.102.192.30:8012", value = ServiceNameConstants.THIRDPARTY_CENTER, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "thirdPartyServiceFeign",url = "http://10.102.192.31:8012", value = ServiceNameConstants.THIRDPARTY_CENTER, configuration = FeignAutoConfiguration.class) public interface ThirdPartyServiceFeign { //查询当前组织所有三方接口信息 diff --git a/mhd_oms/src/main/resources/bootstrap.yml b/mhd_oms/src/main/resources/bootstrap.yml index ee058f0f6..542b6bce7 100644 --- a/mhd_oms/src/main/resources/bootstrap.yml +++ b/mhd_oms/src/main/resources/bootstrap.yml @@ -19,14 +19,14 @@ spring: # server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 # server-addr: 10.33.0.129:6010 - server-addr: 10.102.192.30:6848 + server-addr: 10.102.192.31:6848 username: nacos password: manhuoda@2023 config: # server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 # server-addr: 10.33.0.129:6010 - server-addr: 10.102.192.30:6848 + server-addr: 10.102.192.31:6848 username: nacos password: manhuoda@2023 #线上正式环境 diff --git a/mhd_wms/src/main/resources/bootstrap.yml b/mhd_wms/src/main/resources/bootstrap.yml index fc7380c20..e8f169bf2 100644 --- a/mhd_wms/src/main/resources/bootstrap.yml +++ b/mhd_wms/src/main/resources/bootstrap.yml @@ -16,7 +16,7 @@ spring: # server-addr: 127.0.0.1:8848 # server-addr: 10.33.0.129:6010 # 线上测试环境配置 容器名+端口号 - server-addr: 10.102.192.30:6848 + server-addr: 10.102.192.31:6848 username: nacos password: manhuoda@2023 #线上正式环境 @@ -25,7 +25,7 @@ spring: # server-addr: 127.0.0.1:8848 # server-addr: 10.33.0.129:6010 # 线上测试环境配置 容器名+端口号 - server-addr: 10.102.192.30:6848 + server-addr: 10.102.192.31:6848 username: nacos password: manhuoda@2023 #线上正式环境 From 976ab715af09d7ee0bfbb73e4ddc795a0cbcfbfb Mon Sep 17 00:00:00 2001 From: rcx <3084692334@qq.com> Date: Mon, 7 Sep 2026 18:02:10 +0800 Subject: [PATCH 11/29] =?UTF-8?q?=E5=8F=9130?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mhd/system/api/BmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/OmsServiceFeign.java | 2 +- .../main/java/com/mhd/system/api/WlhyServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/WmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/YmsServiceFeign.java | 2 +- .../com/mhd/common/core/feign/ThirdPartyServiceFeign.java | 2 +- .../oms/infrastructure/feign/ThirdPartyServiceFeign.java | 2 +- mhd_wms/src/main/resources/bootstrap.yml | 8 ++++---- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java index 6889c728b..00e656a88 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java @@ -19,7 +19,7 @@ import java.util.Set; /** * bms财务结算系统feign调用接口 */ -@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.33.0.109:8012",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.102.192.3:8012",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface BmsServiceFeign { 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 8a7006304..e9418197a 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 @@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestBody; import java.util.List; import java.util.concurrent.CompletableFuture; -@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.33.0.99:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.102.192.4:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface OmsServiceFeign { diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java index ba9a45148..e4a817238 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java @@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; -@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.33.0.129:8014",configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.102.192.30:8014",configuration = FeignAutoConfiguration.class) public interface WlhyServiceFeign { /** diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java index ceaf3780b..0da262497 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java @@ -21,7 +21,7 @@ import java.util.Map; * @description: TODO * @date 2024/5/10 8:58 **/ -@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE,url = "http://10.33.0.109:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE,url = "http://10.102.192.3:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface WmsServiceFeign { /** diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java index beba5b1af..12571141a 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java @@ -9,7 +9,7 @@ import com.mhd.system.api.feign.FeignAutoConfiguration; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; -@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,url = "http://10.33.0.99:8018",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,url = "http://10.102.192.4:8018",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface YmsServiceFeign { /** diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java index b8db7365f..94e7ade76 100644 --- a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java @@ -26,7 +26,7 @@ import java.io.InputStream; import java.util.List; import java.util.Map; -@FeignClient(value = "mhd-third-party-service",url = "http://10.33.0.129:8012", configuration = FeignAutoConfiguration.class) +@FeignClient(value = "mhd-third-party-service",url = "http://10.102.192.30:8012", configuration = FeignAutoConfiguration.class) public interface ThirdPartyServiceFeign { //查询当前组织所有三方接口信息 diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java index 376500b1c..26c5c12b9 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java @@ -22,7 +22,7 @@ import java.util.Map; /** * 三方服务 Feign */ -@FeignClient(contextId = "thirdPartyServiceFeign",url = "http://10.33.0.129:8012", value = ServiceNameConstants.THIRDPARTY_CENTER, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "thirdPartyServiceFeign",url = "http://10.102.192.30:8012", value = ServiceNameConstants.THIRDPARTY_CENTER, configuration = FeignAutoConfiguration.class) public interface ThirdPartyServiceFeign { //查询当前组织所有三方接口信息 diff --git a/mhd_wms/src/main/resources/bootstrap.yml b/mhd_wms/src/main/resources/bootstrap.yml index 39eb710cb..fc7380c20 100644 --- a/mhd_wms/src/main/resources/bootstrap.yml +++ b/mhd_wms/src/main/resources/bootstrap.yml @@ -14,18 +14,18 @@ spring: nacos: discovery: # server-addr: 127.0.0.1:8848 - server-addr: 10.33.0.129:6010 +# server-addr: 10.33.0.129:6010 # 线上测试环境配置 容器名+端口号 -# server-addr: 10.102.192.30:6848 + server-addr: 10.102.192.30:6848 username: nacos password: manhuoda@2023 #线上正式环境 # server-addr: 10.102.192.105:6848 config: # server-addr: 127.0.0.1:8848 - server-addr: 10.33.0.129:6010 +# server-addr: 10.33.0.129:6010 # 线上测试环境配置 容器名+端口号 -# server-addr: 10.102.192.30:6848 + server-addr: 10.102.192.30:6848 username: nacos password: manhuoda@2023 #线上正式环境 From a38e28bb97ef4d6a391869107bee9ed3768bb4d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=A5=8E=E5=85=B4?= <2220574228@qq.com> Date: Mon, 7 Sep 2026 18:57:51 +0800 Subject: [PATCH 12/29] =?UTF-8?q?=E9=80=80=E8=B4=A7=E5=85=A5=E5=BA=93;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/ReservationStockInOrderApplicationService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderApplicationService.java b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderApplicationService.java index b84d86932..801e6acf8 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderApplicationService.java +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderApplicationService.java @@ -1948,7 +1948,11 @@ public class ReservationStockInOrderApplicationService { } stockInOrderDO.setOrderTypeName(documentTypeData.getDictLabel()); } - + String businessType = stockInOrderDO.getBusinessType(); + if ("tui_huo_ru_ku".equals(businessType)) { + stockInOrderDO.setOrderTypeCode("tui_huo_ru_ku"); + stockInOrderDO.setOrderTypeName("退货入库"); + } //翻译优先级别类型 if (StringUtils.isNotBlank(stockInOrderDO.getPriorityLevelCode())){ AjaxResult priorityLevelResult = systemServiceFeign.selectListByDictType(DictCode.PRIORITY_LEVEL.getCode()); From 34718741391d9adaeb7a2aeb55e0d02381672a50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=A5=8E=E5=85=B4?= <2220574228@qq.com> Date: Mon, 7 Sep 2026 18:58:33 +0800 Subject: [PATCH 13/29] =?UTF-8?q?=E9=80=80=E8=B4=A7=E5=85=A5=E5=BA=93;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mhd_oms/src/main/resources/bootstrap.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mhd_oms/src/main/resources/bootstrap.yml b/mhd_oms/src/main/resources/bootstrap.yml index 542b6bce7..ee058f0f6 100644 --- a/mhd_oms/src/main/resources/bootstrap.yml +++ b/mhd_oms/src/main/resources/bootstrap.yml @@ -19,14 +19,14 @@ spring: # server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 # server-addr: 10.33.0.129:6010 - server-addr: 10.102.192.31:6848 + server-addr: 10.102.192.30:6848 username: nacos password: manhuoda@2023 config: # server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 # server-addr: 10.33.0.129:6010 - server-addr: 10.102.192.31:6848 + server-addr: 10.102.192.30:6848 username: nacos password: manhuoda@2023 #线上正式环境 From 361a91d70186d26a855db82bae52a6297b983bd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=A5=8E=E5=85=B4?= <2220574228@qq.com> Date: Mon, 7 Sep 2026 19:02:39 +0800 Subject: [PATCH 14/29] =?UTF-8?q?=E5=8F=9131?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mhd/system/api/BmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/OmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/WlhyServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/WmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/YmsServiceFeign.java | 2 +- .../com/mhd/common/core/feign/ThirdPartyServiceFeign.java | 2 +- .../mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java | 2 +- mhd_oms/src/main/resources/bootstrap.yml | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java index 00e656a88..93cb610ff 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java @@ -19,7 +19,7 @@ import java.util.Set; /** * bms财务结算系统feign调用接口 */ -@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.102.192.3:8012",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.102.192.32:8012",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface BmsServiceFeign { 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 e9418197a..4ef3bed80 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 @@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestBody; import java.util.List; import java.util.concurrent.CompletableFuture; -@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.102.192.4:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.102.192.33:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface OmsServiceFeign { diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java index e4a817238..d976fcc98 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java @@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; -@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.102.192.30:8014",configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.102.192.31:8014",configuration = FeignAutoConfiguration.class) public interface WlhyServiceFeign { /** diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java index 0da262497..9016575f6 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java @@ -21,7 +21,7 @@ import java.util.Map; * @description: TODO * @date 2024/5/10 8:58 **/ -@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE,url = "http://10.102.192.3:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE,url = "http://10.102.192.32:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface WmsServiceFeign { /** diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java index 12571141a..750ed853e 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java @@ -9,7 +9,7 @@ import com.mhd.system.api.feign.FeignAutoConfiguration; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; -@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,url = "http://10.102.192.4:8018",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,url = "http://10.102.192.33:8018",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface YmsServiceFeign { /** diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java index 94e7ade76..48bf17cd1 100644 --- a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java @@ -26,7 +26,7 @@ import java.io.InputStream; import java.util.List; import java.util.Map; -@FeignClient(value = "mhd-third-party-service",url = "http://10.102.192.30:8012", configuration = FeignAutoConfiguration.class) +@FeignClient(value = "mhd-third-party-service",url = "http://10.102.192.31:8012", configuration = FeignAutoConfiguration.class) public interface ThirdPartyServiceFeign { //查询当前组织所有三方接口信息 diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java index 26c5c12b9..b54559ade 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java @@ -22,7 +22,7 @@ import java.util.Map; /** * 三方服务 Feign */ -@FeignClient(contextId = "thirdPartyServiceFeign",url = "http://10.102.192.30:8012", value = ServiceNameConstants.THIRDPARTY_CENTER, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "thirdPartyServiceFeign",url = "http://10.102.192.31:8012", value = ServiceNameConstants.THIRDPARTY_CENTER, configuration = FeignAutoConfiguration.class) public interface ThirdPartyServiceFeign { //查询当前组织所有三方接口信息 diff --git a/mhd_oms/src/main/resources/bootstrap.yml b/mhd_oms/src/main/resources/bootstrap.yml index ee058f0f6..542b6bce7 100644 --- a/mhd_oms/src/main/resources/bootstrap.yml +++ b/mhd_oms/src/main/resources/bootstrap.yml @@ -19,14 +19,14 @@ spring: # server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 # server-addr: 10.33.0.129:6010 - server-addr: 10.102.192.30:6848 + server-addr: 10.102.192.31:6848 username: nacos password: manhuoda@2023 config: # server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 # server-addr: 10.33.0.129:6010 - server-addr: 10.102.192.30:6848 + server-addr: 10.102.192.31:6848 username: nacos password: manhuoda@2023 #线上正式环境 From 5d748a9ac6998fdf9b12df7de109e9943acf6460 Mon Sep 17 00:00:00 2001 From: rcx <3084692334@qq.com> Date: Tue, 8 Sep 2026 09:28:27 +0800 Subject: [PATCH 15/29] =?UTF-8?q?fix(oms):=20=E5=85=A5=E5=BA=93=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E5=8D=95=E6=96=B0=E5=A2=9E=E6=97=B6=E7=94=A8businessT?= =?UTF-8?q?ype=E5=9B=9E=E5=A1=AB=E5=8D=95=E6=8D=AE=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E9=80=80=E8=B4=A7=E5=8D=95=E8=A2=AB?= =?UTF-8?q?=E5=86=99=E6=88=90=E6=99=AE=E9=80=9A=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/ExecutionStockInOrderAssembler.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/executionStockInOrder/service/ExecutionStockInOrderAssembler.java b/mhd_oms/src/main/java/com/mhd/oms/domain/executionStockInOrder/service/ExecutionStockInOrderAssembler.java index b8150096d..efe87076d 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/domain/executionStockInOrder/service/ExecutionStockInOrderAssembler.java +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/executionStockInOrder/service/ExecutionStockInOrderAssembler.java @@ -92,9 +92,14 @@ public class ExecutionStockInOrderAssembler { stockInOrderDO.setCreateTime(new Date()); stockInOrderDO.setDelFlag(1); // 新增入库单时,如果入库单类型为空,默认设置为普通入库 - String orderTypeCode = stockInOrderDO.getOrderTypeCode(); - if (orderTypeCode == null || orderTypeCode.trim().length() == 0) { - stockInOrderDO.setOrderTypeCode("pu_tong_ru_ku"); + // 前端新增只传业务类型(businessType)不传单据类型时,先用业务类型回填单据类型编码, + // 否则退货单会被兜底成pu_tong_ru_ku,再被setDataDict按字典反查覆盖成"普通入库" + if (stockInOrderDO.getOrderTypeCode() == null || stockInOrderDO.getOrderTypeCode().trim().length() == 0) { + if (stockInOrderDO.getBusinessType() != null && stockInOrderDO.getBusinessType().trim().length() > 0) { + stockInOrderDO.setOrderTypeCode(stockInOrderDO.getBusinessType().trim()); + } else { + stockInOrderDO.setOrderTypeCode("pu_tong_ru_ku"); + } } String orderTypeName = stockInOrderDO.getOrderTypeName(); if (orderTypeName == null || orderTypeName.trim().length() == 0) { From 06202b652adb6343ff64003d4783faaf1462a58a Mon Sep 17 00:00:00 2001 From: rcx <3084692334@qq.com> Date: Tue, 8 Sep 2026 09:32:47 +0800 Subject: [PATCH 16/29] =?UTF-8?q?=E5=8F=91=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mhd/system/api/BmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/OmsServiceFeign.java | 2 +- .../main/java/com/mhd/system/api/WlhyServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/WmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/YmsServiceFeign.java | 2 +- .../com/mhd/common/core/feign/ThirdPartyServiceFeign.java | 2 +- .../oms/infrastructure/feign/ThirdPartyServiceFeign.java | 2 +- mhd_oms/src/main/resources/bootstrap.yml | 8 ++++---- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java index 93cb610ff..6889c728b 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java @@ -19,7 +19,7 @@ import java.util.Set; /** * bms财务结算系统feign调用接口 */ -@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.102.192.32:8012",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.33.0.109:8012",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface BmsServiceFeign { 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 4ef3bed80..8a7006304 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 @@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestBody; import java.util.List; import java.util.concurrent.CompletableFuture; -@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.102.192.33:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.33.0.99:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface OmsServiceFeign { diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java index d976fcc98..ba9a45148 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java @@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; -@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.102.192.31:8014",configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.33.0.129:8014",configuration = FeignAutoConfiguration.class) public interface WlhyServiceFeign { /** diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java index 9016575f6..ceaf3780b 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java @@ -21,7 +21,7 @@ import java.util.Map; * @description: TODO * @date 2024/5/10 8:58 **/ -@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE,url = "http://10.102.192.32:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE,url = "http://10.33.0.109:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface WmsServiceFeign { /** diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java index 750ed853e..beba5b1af 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java @@ -9,7 +9,7 @@ import com.mhd.system.api.feign.FeignAutoConfiguration; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; -@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,url = "http://10.102.192.33:8018",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,url = "http://10.33.0.99:8018",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface YmsServiceFeign { /** diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java index 48bf17cd1..b8db7365f 100644 --- a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java @@ -26,7 +26,7 @@ import java.io.InputStream; import java.util.List; import java.util.Map; -@FeignClient(value = "mhd-third-party-service",url = "http://10.102.192.31:8012", configuration = FeignAutoConfiguration.class) +@FeignClient(value = "mhd-third-party-service",url = "http://10.33.0.129:8012", configuration = FeignAutoConfiguration.class) public interface ThirdPartyServiceFeign { //查询当前组织所有三方接口信息 diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java index b54559ade..49f1ebafb 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java @@ -22,7 +22,7 @@ import java.util.Map; /** * 三方服务 Feign */ -@FeignClient(contextId = "thirdPartyServiceFeign",url = "http://10.102.192.31:8012", value = ServiceNameConstants.THIRDPARTY_CENTER, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "thirdPartyServiceFeign",url = "http://10.33.0.129:8012", value = ServiceNameConstants.THIRDPARTY_CENTER, configuration = FeignAutoConfiguration.class) public interface ThirdPartyServiceFeign { //查询当前组织所有三方接口信息 diff --git a/mhd_oms/src/main/resources/bootstrap.yml b/mhd_oms/src/main/resources/bootstrap.yml index 542b6bce7..8751e75da 100644 --- a/mhd_oms/src/main/resources/bootstrap.yml +++ b/mhd_oms/src/main/resources/bootstrap.yml @@ -18,15 +18,15 @@ spring: discovery: # server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 -# server-addr: 10.33.0.129:6010 - server-addr: 10.102.192.31:6848 + server-addr: 10.33.0.129:6010 +# server-addr: 10.102.192.31:6848 username: nacos password: manhuoda@2023 config: # server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 -# server-addr: 10.33.0.129:6010 - server-addr: 10.102.192.31:6848 + server-addr: 10.33.0.129:6010 +# server-addr: 10.102.192.31:6848 username: nacos password: manhuoda@2023 #线上正式环境 From a496fc235b8dc4bc00b9a1ecc7e56de812efe9df Mon Sep 17 00:00:00 2001 From: rcx <3084692334@qq.com> Date: Tue, 8 Sep 2026 10:53:23 +0800 Subject: [PATCH 17/29] =?UTF-8?q?fix(oms):=20=E6=96=B0=E5=A2=9E/=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=85=A5=E5=BA=93=E5=8D=95=E4=BB=A5=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=B8=BA=E5=87=86=E5=90=8C=E6=AD=A5=E5=8D=95?= =?UTF-8?q?=E6=8D=AE=E7=B1=BB=E5=9E=8B=EF=BC=8C=E4=BF=AE=E5=A4=8D=E9=80=80?= =?UTF-8?q?=E8=B4=A7=E5=85=A5=E5=BA=93=E8=A2=AB=E5=86=99=E6=88=90=E6=99=AE?= =?UTF-8?q?=E9=80=9A=E5=85=A5=E5=BA=93=E5=8F=8A=E7=BC=96=E8=BE=91=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExecutionStockInOrderAssembler.java | 20 +++++++++---------- ...rvationStockInOrderApplicationService.java | 5 ----- .../ReservationStockInOrderAssembler.java | 15 +++++++++----- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/executionStockInOrder/service/ExecutionStockInOrderAssembler.java b/mhd_oms/src/main/java/com/mhd/oms/domain/executionStockInOrder/service/ExecutionStockInOrderAssembler.java index efe87076d..062359a10 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/domain/executionStockInOrder/service/ExecutionStockInOrderAssembler.java +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/executionStockInOrder/service/ExecutionStockInOrderAssembler.java @@ -78,6 +78,16 @@ public class ExecutionStockInOrderAssembler { // 最后使用username(账号)作为兜底 userRealName = loginUser.getUsername(); } + // 单据类型跟随业务类型:页面唯一的类型选择项是"业务类型"(只提交businessType), + // 编辑时前端回显提交的orderTypeCode/orderTypeName是旧值,若以回显值为准会导致编辑改类型不生效; + // 系统内businessType与orderTypeCode同值域(pu_tong_ru_ku/tui_huo_ru_ku),以businessType为准保持三者一致 + if (stockInOrderDO.getBusinessType() != null && stockInOrderDO.getBusinessType().trim().length() > 0) { + stockInOrderDO.setOrderTypeCode(stockInOrderDO.getBusinessType().trim()); + } else if (stockInOrderDTO.getInOrderId() == null + && (stockInOrderDO.getOrderTypeCode() == null || stockInOrderDO.getOrderTypeCode().trim().length() == 0)) { + // 仅新增且无业务类型时兜底普通入库;编辑时两字段都为空则不覆盖(updateById跳过null字段) + stockInOrderDO.setOrderTypeCode("pu_tong_ru_ku"); + } if(stockInOrderDTO.getInOrderId() != null){ stockInOrderDO.setUpdateBy(userId); stockInOrderDO.setUpdateByName(userRealName); @@ -91,16 +101,6 @@ public class ExecutionStockInOrderAssembler { stockInOrderDO.setCreateByName(userRealName); stockInOrderDO.setCreateTime(new Date()); stockInOrderDO.setDelFlag(1); - // 新增入库单时,如果入库单类型为空,默认设置为普通入库 - // 前端新增只传业务类型(businessType)不传单据类型时,先用业务类型回填单据类型编码, - // 否则退货单会被兜底成pu_tong_ru_ku,再被setDataDict按字典反查覆盖成"普通入库" - if (stockInOrderDO.getOrderTypeCode() == null || stockInOrderDO.getOrderTypeCode().trim().length() == 0) { - if (stockInOrderDO.getBusinessType() != null && stockInOrderDO.getBusinessType().trim().length() > 0) { - stockInOrderDO.setOrderTypeCode(stockInOrderDO.getBusinessType().trim()); - } else { - stockInOrderDO.setOrderTypeCode("pu_tong_ru_ku"); - } - } String orderTypeName = stockInOrderDO.getOrderTypeName(); if (orderTypeName == null || orderTypeName.trim().length() == 0) { stockInOrderDO.setOrderTypeName("普通入库单"); diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderApplicationService.java b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderApplicationService.java index 801e6acf8..9e5049c8f 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderApplicationService.java +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderApplicationService.java @@ -1948,11 +1948,6 @@ public class ReservationStockInOrderApplicationService { } stockInOrderDO.setOrderTypeName(documentTypeData.getDictLabel()); } - String businessType = stockInOrderDO.getBusinessType(); - if ("tui_huo_ru_ku".equals(businessType)) { - stockInOrderDO.setOrderTypeCode("tui_huo_ru_ku"); - stockInOrderDO.setOrderTypeName("退货入库"); - } //翻译优先级别类型 if (StringUtils.isNotBlank(stockInOrderDO.getPriorityLevelCode())){ AjaxResult priorityLevelResult = systemServiceFeign.selectListByDictType(DictCode.PRIORITY_LEVEL.getCode()); diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderAssembler.java b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderAssembler.java index c82183cd1..2c47a724a 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderAssembler.java +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderAssembler.java @@ -78,6 +78,16 @@ public class ReservationStockInOrderAssembler { // 最后使用username(账号)作为兜底 userRealName = loginUser.getUsername(); } + // 单据类型跟随业务类型:页面唯一的类型选择项是"业务类型"(只提交businessType), + // 编辑时前端回显提交的orderTypeCode/orderTypeName是旧值,若以回显值为准会导致编辑改类型不生效; + // 系统内businessType与orderTypeCode同值域(pu_tong_ru_ku/tui_huo_ru_ku),以businessType为准保持三者一致 + if (stockInOrderDO.getBusinessType() != null && stockInOrderDO.getBusinessType().trim().length() > 0) { + stockInOrderDO.setOrderTypeCode(stockInOrderDO.getBusinessType().trim()); + } else if (stockInOrderDTO.getInOrderId() == null + && (stockInOrderDO.getOrderTypeCode() == null || stockInOrderDO.getOrderTypeCode().trim().length() == 0)) { + // 仅新增且无业务类型时兜底普通入库;编辑时两字段都为空则不覆盖(updateById跳过null字段) + stockInOrderDO.setOrderTypeCode("pu_tong_ru_ku"); + } if(stockInOrderDTO.getInOrderId() != null){ stockInOrderDO.setUpdateBy(userId); stockInOrderDO.setUpdateByName(userRealName); @@ -91,11 +101,6 @@ public class ReservationStockInOrderAssembler { stockInOrderDO.setCreateByName(userRealName); stockInOrderDO.setCreateTime(new Date()); stockInOrderDO.setDelFlag(1); - // 新增入库单时,如果入库单类型为空,默认设置为普通入库 - String orderTypeCode = stockInOrderDO.getOrderTypeCode(); - if (orderTypeCode == null || orderTypeCode.trim().length() == 0) { - stockInOrderDO.setOrderTypeCode("pu_tong_ru_ku"); - } String orderTypeName = stockInOrderDO.getOrderTypeName(); if (orderTypeName == null || orderTypeName.trim().length() == 0) { stockInOrderDO.setOrderTypeName("普通入库单"); From 6c6a491ff86c049857d47a04a92c00bbb129ffb2 Mon Sep 17 00:00:00 2001 From: rcx <3084692334@qq.com> Date: Tue, 8 Sep 2026 13:37:43 +0800 Subject: [PATCH 18/29] =?UTF-8?q?feat(oms/wms):=20WMS=E4=B8=8A=E6=9E=B6?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=9B=9E=E4=BC=A0OMS=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E5=8D=95=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E7=8A=B6=E6=80=81=E4=B8=8D=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - WMS上架推进入库状态后回传OMS(OmsServiceFeign新增returnInResult) - OMS回传接收加固:无登录上下文判空、已入库同步issueStatus=4 - 已入库联动同步预约入库单(入库业务单)状态 --- .../com/mhd/system/api/OmsServiceFeign.java | 5 + .../RemoteOmsFeignFallbackFactory.java | 5 + .../ExecutionStockInOrderDomainService.java | 99 ++++++++++++++++--- .../service/StockShelfOrderDomainService.java | 15 ++- 4 files changed, 108 insertions(+), 16 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 8a7006304..7c4b7082f 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 @@ -12,6 +12,7 @@ import org.springframework.scheduling.annotation.Async; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; import java.util.List; import java.util.concurrent.CompletableFuture; @@ -28,6 +29,10 @@ public interface OmsServiceFeign { @PostMapping(value = "/reservationStockInOrderApi/pushInOrderDetail") public AjaxResult pushInOrderDetail(@RequestBody InMaterialDetailTZPD inMaterialDetail); + @ApiOperation("wms回传入库结果:按入库单号同步入库状态(3-收货中 4-上架中 5-已入库)到OMS入库业务单,type非1为入库") + @GetMapping(value = "/executionStockInOrderApi/returnResult") + public AjaxResult returnInResult(@RequestParam("orderNumber") String orderNumber, @RequestParam("status") Long status, @RequestParam("type") String type); + @ApiOperation("wms推送入库单") @PostMapping(value = "/reservationStockOutOrderApi/pushOutOrder") 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 891442eb4..09958e3b8 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 @@ -41,6 +41,11 @@ public class RemoteOmsFeignFallbackFactory implements FallbackFactory().lambda() - .set(ExecutionStockOutOrder::getStatus, status) - .set(ExecutionStockOutOrder::getUpdateBy, loginUser.getUserid()) - .set(ExecutionStockOutOrder::getUpdateByName, userRealName) - .set(ExecutionStockOutOrder::getUpdateTime, new Date()) - .in(ExecutionStockOutOrder::getOutOrderNumber, orderNumber)); + LambdaUpdateWrapper wrapper = new LambdaUpdateWrapper() + .set(ExecutionStockOutOrder::getStatus, status); + if (updateBy != null) { + wrapper.set(ExecutionStockOutOrder::getUpdateBy, updateBy) + .set(ExecutionStockOutOrder::getUpdateByName, userRealName) + .set(ExecutionStockOutOrder::getUpdateTime, new Date()); + } + wrapper.in(ExecutionStockOutOrder::getOutOrderNumber, orderNumber); + return stockOutOrderService.update(null, wrapper); } else { - return stockInOrderService.update(null, new UpdateWrapper().lambda() - .set(ExecutionStockInOrder::getStatus, status) - .set(ExecutionStockInOrder::getUpdateBy, loginUser.getUserid()) - .set(ExecutionStockInOrder::getUpdateByName, userRealName) - .set(ExecutionStockInOrder::getUpdateTime, new Date()) - .in(ExecutionStockInOrder::getInOrderNumber, orderNumber)); + LambdaUpdateWrapper wrapper = new LambdaUpdateWrapper() + .set(ExecutionStockInOrder::getStatus, status); + // 已入库(5)时同步issueStatus=4,供前端"入库执行单"列表入库状态列展示"已入库" + if (status != null && status == 5L) { + wrapper.set(ExecutionStockInOrder::getIssueStatus, 4); + } + if (updateBy != null) { + wrapper.set(ExecutionStockInOrder::getUpdateBy, updateBy) + .set(ExecutionStockInOrder::getUpdateByName, userRealName) + .set(ExecutionStockInOrder::getUpdateTime, new Date()); + } + wrapper.in(ExecutionStockInOrder::getInOrderNumber, orderNumber); + boolean updated = stockInOrderService.update(null, wrapper); + // 同步预约入库单(前端"入库业务单"列表)状态 + syncReservationStatus(orderNumber, status, updateBy, userRealName); + return updated; + } + } + + /** + * 入库执行单状态回传后同步预约入库单: + * 执行单通过business_in_order_number关联预约单,已入库(5)且该预约单名下关联执行单全部完成时, + * 预约单同步置为已入库;同步失败只记日志,不影响执行单状态更新结果 + */ + private void syncReservationStatus(String orderNumber, Long status, Long updateBy, String userRealName) { + try { + if (status == null || status != 5L) { + return; + } + ExecutionStockInOrder execution = stockInOrderService.getOne(new QueryWrapper().lambda() + .eq(ExecutionStockInOrder::getInOrderNumber, orderNumber) + .eq(ExecutionStockInOrder::getDelFlag, 1) + .last("limit 1")); + if (execution == null || execution.getBusinessInOrderNumber() == null + || execution.getBusinessInOrderNumber().trim().isEmpty()) { + return; + } + // 多仓库拆单时存在多个关联执行单,全部已入库才同步预约单 + long unfinished = stockInOrderService.count(new QueryWrapper().lambda() + .eq(ExecutionStockInOrder::getBusinessInOrderNumber, execution.getBusinessInOrderNumber()) + .eq(ExecutionStockInOrder::getDelFlag, 1) + .and(w -> w.isNull(ExecutionStockInOrder::getStatus).or().lt(ExecutionStockInOrder::getStatus, 5))); + if (unfinished > 0) { + log.info("预约入库单[{}]名下仍有{}张执行单未完成,暂不同步已入库状态", execution.getBusinessInOrderNumber(), unfinished); + return; + } + LambdaUpdateWrapper reservationWrapper = new LambdaUpdateWrapper() + .set(ReservationStockInOrder::getStatus, 5) + // issueStatus=4 为前端"入库业务单"列表入库状态列的"已入库"展示值 + .set(ReservationStockInOrder::getIssueStatus, 4); + if (updateBy != null) { + reservationWrapper.set(ReservationStockInOrder::getUpdateBy, updateBy) + .set(ReservationStockInOrder::getUpdateByName, userRealName) + .set(ReservationStockInOrder::getUpdateTime, new Date()); + } + reservationWrapper.in(ReservationStockInOrder::getInOrderNumber, execution.getBusinessInOrderNumber()); + reservationStockInOrderService.update(reservationWrapper); + log.info("预约入库单[{}]已同步为已入库", execution.getBusinessInOrderNumber()); + } catch (Exception e) { + log.warn("同步预约入库单状态失败: orderNumber={}, status={}", orderNumber, status, e); } } diff --git a/mhd_wms/src/main/java/com/mhd/wms/domain/stockShelfOrder/service/StockShelfOrderDomainService.java b/mhd_wms/src/main/java/com/mhd/wms/domain/stockShelfOrder/service/StockShelfOrderDomainService.java index 8c52ff32f..0e07bbf81 100644 --- a/mhd_wms/src/main/java/com/mhd/wms/domain/stockShelfOrder/service/StockShelfOrderDomainService.java +++ b/mhd_wms/src/main/java/com/mhd/wms/domain/stockShelfOrder/service/StockShelfOrderDomainService.java @@ -810,8 +810,21 @@ public class StockShelfOrderDomainService { stockInOrder.setUpdateBy(loginUser.getUserid()); stockInOrder.setUpdateByName(loginUser.getUsername()); stockInOrder.setUpdateTime(new Date()); - return stockInOrderService.update(stockInOrder, + boolean updated = stockInOrderService.update(stockInOrder, new QueryWrapper().lambda().eq(StockInOrder::getInOrderNumber, stockShelfOrderPO.getInOrderNumber())); + if (updated) { + // 上架推进入库状态(4-上架中/5-已入库)后回传OMS入库业务单,保证OMS入库状态与WMS一致; + // OMS不可用或回传失败只记日志,不影响WMS上架主流程 + try { + AjaxResult notifyResult = omsServiceFeign.returnInResult(stockShelfOrderPO.getInOrderNumber(), Long.valueOf(status), "0"); + if (notifyResult == null || !"200".equals(String.valueOf(notifyResult.get("code")))) { + log.warn("回传OMS入库状态失败: orderNumber={}, status={}, result={}", stockShelfOrderPO.getInOrderNumber(), status, notifyResult); + } + } catch (Exception e) { + log.warn("回传OMS入库状态异常: orderNumber={}, status={}", stockShelfOrderPO.getInOrderNumber(), status, e); + } + } + return updated; } /** * @description 完成上架 From 32364baba8898969076c74e9e07c45e92c98caee Mon Sep 17 00:00:00 2001 From: rcx <3084692334@qq.com> Date: Tue, 8 Sep 2026 13:38:54 +0800 Subject: [PATCH 19/29] =?UTF-8?q?=E5=8F=91=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mhd_wms/src/main/resources/bootstrap.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mhd_wms/src/main/resources/bootstrap.yml b/mhd_wms/src/main/resources/bootstrap.yml index fc7380c20..39eb710cb 100644 --- a/mhd_wms/src/main/resources/bootstrap.yml +++ b/mhd_wms/src/main/resources/bootstrap.yml @@ -14,18 +14,18 @@ spring: nacos: discovery: # server-addr: 127.0.0.1:8848 -# server-addr: 10.33.0.129:6010 + server-addr: 10.33.0.129:6010 # 线上测试环境配置 容器名+端口号 - server-addr: 10.102.192.30:6848 +# server-addr: 10.102.192.30:6848 username: nacos password: manhuoda@2023 #线上正式环境 # server-addr: 10.102.192.105:6848 config: # server-addr: 127.0.0.1:8848 -# server-addr: 10.33.0.129:6010 + server-addr: 10.33.0.129:6010 # 线上测试环境配置 容器名+端口号 - server-addr: 10.102.192.30:6848 +# server-addr: 10.102.192.30:6848 username: nacos password: manhuoda@2023 #线上正式环境 From 178b7697af0c451223d60b847d5d03f89bfe52aa Mon Sep 17 00:00:00 2001 From: rcx <3084692334@qq.com> Date: Tue, 8 Sep 2026 15:08:00 +0800 Subject: [PATCH 20/29] =?UTF-8?q?fix(oms):=20=E5=87=BA=E5=BA=93=E5=8D=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8totalOutboundQuantity=E6=81=92=E4=B8=BAnull?= =?UTF-8?q?=EF=BC=8CqueryList=E6=94=B9=E4=B8=BASQL=E6=B1=87=E6=80=BB?= =?UTF-8?q?=E4=B8=80=E7=BA=A7=E6=98=8E=E7=BB=86=E5=87=BA=E5=BA=93=E6=95=B0?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原Java循环逐单调getInfoChildren汇总(N+1)被注释后无赋值导致恒为null;改为关联子查询coalesce(sum(outbound_quantity),0),仅统计level=1且del_flag=1,口径与详情页一致;/list与/list1共用同一语句同时生效,无需DDL --- .../ReservationStockOutOrderMapper.xml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mhd_oms/src/main/resources/mapper/reservationStockOutOrder/ReservationStockOutOrderMapper.xml b/mhd_oms/src/main/resources/mapper/reservationStockOutOrder/ReservationStockOutOrderMapper.xml index a933ca2bf..ad3073c4f 100644 --- a/mhd_oms/src/main/resources/mapper/reservationStockOutOrder/ReservationStockOutOrderMapper.xml +++ b/mhd_oms/src/main/resources/mapper/reservationStockOutOrder/ReservationStockOutOrderMapper.xml @@ -116,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -405,7 +406,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + + + - + - + + + + @@ -102,6 +145,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ORDER BY 1 DESC + + + From a3c0f15e39a910732010665046909ab88e15677a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E9=B8=BF=E5=B1=95?= <18031053041@163.com> Date: Wed, 9 Sep 2026 15:19:29 +0800 Subject: [PATCH 28/29] 30 --- mhd-bi/src/main/resources/bootstrap.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mhd-bi/src/main/resources/bootstrap.yml b/mhd-bi/src/main/resources/bootstrap.yml index fa1d95e1a..2572662c1 100644 --- a/mhd-bi/src/main/resources/bootstrap.yml +++ b/mhd-bi/src/main/resources/bootstrap.yml @@ -19,14 +19,14 @@ spring: # username: nacos # password: manhuoda@2023 #线上正式环境 - server-addr: 10.102.192.31:6848 + server-addr: 10.102.192.30:6848 username: nacos password: manhuoda@2023 config: # server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 # server-addr: 10.33.0.129:6010 - server-addr: 10.102.192.31:6848 + server-addr: 10.102.192.30:6848 username: nacos password: manhuoda@2023 #线上正式环境 From f02a2d52f2fa4d18c02b50d106f17aceda9f7694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E9=B8=BF=E5=B1=95?= <18031053041@163.com> Date: Wed, 9 Sep 2026 16:24:05 +0800 Subject: [PATCH 29/29] =?UTF-8?q?OMS=E8=B0=83=E6=95=B4=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessDocumentOrderAdjustService.java | 554 ++++++++++++++++++ .../entity/BusinessDocumentOrder.java | 5 +- .../entity/BusinessDocumentOrderAdjust.java | 93 +++ .../BusinessDocumentOrderAdjustMapper.java | 12 + .../BusinessDocumentOrderAdjustDetail.java | 173 ++++++ ...sinessDocumentOrderAdjustDetailMapper.java | 12 + .../BusinessDocumentOrderAdjustAuditDTO.java | 24 + .../BusinessDocumentOrderAdjustDTO.java | 37 ++ .../BusinessDocumentOrderAdjustQueryDTO.java | 36 ++ .../BusinessDocumentOrderAdjustRecordDTO.java | 59 ++ .../BusinessDocumentOrderApi.java | 65 ++ 11 files changed, 1069 insertions(+), 1 deletion(-) create mode 100644 mhd_oms/src/main/java/com/mhd/oms/application/service/businessDocumentOrder/BusinessDocumentOrderAdjustService.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrderAdjust/entity/BusinessDocumentOrderAdjust.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrderAdjust/repository/mapper/BusinessDocumentOrderAdjustMapper.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrderAdjustDetail/entity/BusinessDocumentOrderAdjustDetail.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrderAdjustDetail/repository/mapper/BusinessDocumentOrderAdjustDetailMapper.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/businessDocumentOrderAdjust/BusinessDocumentOrderAdjustAuditDTO.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/businessDocumentOrderAdjust/BusinessDocumentOrderAdjustDTO.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/businessDocumentOrderAdjust/BusinessDocumentOrderAdjustQueryDTO.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/businessDocumentOrderAdjust/BusinessDocumentOrderAdjustRecordDTO.java diff --git a/mhd_oms/src/main/java/com/mhd/oms/application/service/businessDocumentOrder/BusinessDocumentOrderAdjustService.java b/mhd_oms/src/main/java/com/mhd/oms/application/service/businessDocumentOrder/BusinessDocumentOrderAdjustService.java new file mode 100644 index 000000000..44ce3ebbe --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/application/service/businessDocumentOrder/BusinessDocumentOrderAdjustService.java @@ -0,0 +1,554 @@ +package com.mhd.oms.application.service.businessDocumentOrder; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.mhd.common.core.exception.ServiceException; +import com.mhd.common.core.web.domain.AjaxResult; +import com.mhd.common.security.utils.SecurityUtils; +import com.mhd.oms.domain.businessDocumentOrder.entity.BusinessDocumentOrder; +import com.mhd.oms.domain.businessDocumentOrder.repository.mapper.BusinessDocumentOrderMapper; +import com.mhd.oms.domain.businessDocumentOrderAdjust.entity.BusinessDocumentOrderAdjust; +import com.mhd.oms.domain.businessDocumentOrderAdjust.repository.mapper.BusinessDocumentOrderAdjustMapper; +import com.mhd.oms.domain.businessDocumentOrderAdjustDetail.entity.BusinessDocumentOrderAdjustDetail; +import com.mhd.oms.domain.businessDocumentOrderAdjustDetail.repository.mapper.BusinessDocumentOrderAdjustDetailMapper; +import com.mhd.oms.domain.businessOrderAccount.BusinessOrderAccount; +import com.mhd.oms.domain.businessOrderAccount.repository.mapper.BusinessOrderAccountMapper; +import com.mhd.oms.domain.executeOrder.entity.ExecuteOrder; +import com.mhd.oms.domain.executeOrder.repository.mapper.ExecuteOrderMapper; +import com.mhd.oms.interfaces.dto.businessDocumentOrderAdjust.BusinessDocumentOrderAdjustAuditDTO; +import com.mhd.oms.interfaces.dto.businessDocumentOrderAdjust.BusinessDocumentOrderAdjustDTO; +import com.mhd.oms.interfaces.dto.businessDocumentOrderAdjust.BusinessDocumentOrderAdjustQueryDTO; +import com.mhd.oms.interfaces.dto.businessDocumentOrderAdjust.BusinessDocumentOrderAdjustRecordDTO; +import com.mhd.system.api.WlhyServiceFeign; +import com.mhd.system.api.model.LoginUser; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 运输业务单「订单调整」应用服务 + * + * 规则(定稿): + * 1. 每次调整都生成:1 条主记录 + 1 条明细快照 + * 2. 费用数据源 = 前端回传的费用明细 business_order_account(feeDetailList); + * 主表金额 deliveryFreight 为其 amount 合计(冗余汇总,后端自动算)。 + * 3. 是否需审核:一旦任一「金额」发生变化 + * = feeDetailList 明细 amount 变化,或主表金额列变化 -> 走业务主管审核; + * 否则(仅改非金额字段) -> 直通。 + * 4. 涉及金额提交 -> 仅把业务单 review_status 置为「调整待审核(3)」;主记录 AUDIT_STATUS=0(待审核); + * 不更新业务单数据,不影响其它状态(order_status / execute_status 不动)。 + * 5. 审核通过 -> 覆盖业务单(金额) + 替换费用明细;review_status 一律置为 1(已审核), + * 不影响 order_status / execute_status。 + * 审核驳回 -> 不更新业务单数据,review_status 还原为调整前值(主记录 before_review_status),可再次调整。 + * 6. 直通(未改金额) -> 覆盖业务单可编辑字段 + deliveryFreight(明细合计),并替换 business_order_account + * (逻辑删旧 is_delete=1 + 插新 is_delete=0);不改动任何审核/执行状态。 + * 7. 前端以 amountChanged 告知是否改金额(默认前端判定);未传时后端兜底比对。 + * + * 说明:review_status 原枚举 0未审/1通过/2驳回,新增 3=调整待审核;不改变原有用例。 + * + * @author dev + * @date 2026-09-09 + */ +@Slf4j +@Service +public class BusinessDocumentOrderAdjustService { + + private static final Integer AUDIT_WAIT = 0; // 调整记录:待审核 + private static final Integer AUDIT_PASS = 1; // 调整记录:审核通过 + private static final Integer AUDIT_REJECT = 2; // 调整记录:驳回 + + /** 主表金额(费用)字段,任一变化触发审核 */ + private static final List FEE_FIELDS = Arrays.asList( + "deliveryFreight", "collectedFreight", "uncollectedFreight", "collectLessFreight", + "transportationUnitPrice", "infoFee", "freightUnitPrice", "cargoInsuranceAmount", + "freightCharges", "freightFee", "unloadingFee", "customsFee", "shortageFee", + "miscellaneousFee", "otherFee", "detentionFee"); + + /** 不允许被前端调整覆盖的系统字段 */ + private static final List PROTECTED_FIELDS = Arrays.asList( + "id", "goodsNumber", + "orderStatus", "reviewStatus", "reviewId", "review", "reviewTime", "reviewOpinion", + "salesManager", "auditStatus", "auditBy", "auditTime", + "executeStatus", "executeId", "executeTime", "executor", + "executeOrderId", "executeOrderNumber", "adjustStatus", + "isDelete", "delFlag", "createBy", "createByName", "createTime", + "updateBy", "updateByName", "updateTime", + "pushStatus", "pushTime", "pushBy", "pushByName", + "reviseApplyType", "reviseApplyStatus", "reviseApplyBy", "reviseApplyByName", + "reviseApplyReason", "reviseApplyTime", + "reservationOrderId", "reservationOrderNumber", + "mainOrderId", "mainOrderNum", "mergeOrderId", "mergeOrderNum", + "splicingOrderType", "splicingStatus", "deliveryProgress", + "orgId", "orgName", "organizationId", "organizationName", "topOrganizationId", + "realCreateBy", "realCreateName", "createCompanyId", "createUserId", + "szwlUserId" + ); + + @Autowired + private BusinessDocumentOrderMapper businessDocumentOrderMapper; + + @Autowired + private BusinessOrderAccountMapper businessOrderAccountMapper; + + @Autowired + private BusinessDocumentOrderAdjustMapper adjustMapper; + + @Autowired + private BusinessDocumentOrderAdjustDetailMapper adjustDetailMapper; + + @Autowired + private ExecuteOrderMapper executeOrderMapper; + + @Autowired + private WlhyServiceFeign wlhyServiceFeign; + + /** + * 提交调整 + * 返回 data = [是否需审核, 调整记录ID] + */ + @Transactional(rollbackFor = Exception.class) + public AjaxResult adjust(BusinessDocumentOrderAdjustDTO dto) { + if (dto == null || dto.getOrder() == null || dto.getOrder().getId() == null) { + throw new ServiceException("参数错误:缺少业务单ID(order.id)"); + } + BusinessDocumentOrder dbOrder = businessDocumentOrderMapper.selectById(dto.getOrder().getId()); + if (ObjectUtil.isNull(dbOrder)) { + throw new ServiceException("业务单不存在或已被删除"); + } + BusinessDocumentOrder front = dto.getOrder(); + + // 1. 当前库中费用明细 + List dbFeeList = businessOrderAccountMapper.selectList( + new LambdaQueryWrapper() + .eq(BusinessOrderAccount::getOrderId, dbOrder.getId()) + .eq(BusinessOrderAccount::getIsDelete, 0)); + + // 2. 调整后的费用明细(前端);为 null 则视为保持库中不变 + List newFeeList = dto.getFeeDetailList(); + + // 3. 生成"调整后"业务单对象:DB原值 + 前端可编辑字段覆盖(忽略null) + BusinessDocumentOrder afterOrder = buildAfterOrder(dbOrder, front); + + // 4. 若提供了费用明细,则 deliveryFreight(合计)=明细 amount 之和,并联动到 afterOrder + boolean hasFeeDetail = newFeeList != null && !newFeeList.isEmpty(); + if (hasFeeDetail) { + BigDecimal sum = sumAmount(newFeeList); + afterOrder.setDeliveryFreight(sum); + } + + // 5. 判定是否修改了金额:以前端 amountChanged 为准(前端整单回传已自行判定); + // 若前端未传则后端兜底比对(主表金额列 或 明细 amount 变化) + boolean amountChanged; + if (dto.getAmountChanged() != null) { + amountChanged = dto.getAmountChanged(); + } else { + amountChanged = isAmountChanged(dbOrder, front, hasFeeDetail, dbFeeList, newFeeList); + } + + // 6. 写主记录 + LoginUser loginUser = SecurityUtils.getLoginUser(); + Date now = new Date(); + BusinessDocumentOrderAdjust adjust = buildAdjust(dbOrder, loginUser, now, amountChanged, dto.getAdjustReason()); + adjustMapper.insert(adjust); + + // 7. 写明细快照(调整后业务单整行 + 费用明细JSON) + BusinessDocumentOrderAdjustDetail detail = new BusinessDocumentOrderAdjustDetail(); + copySnapshot(afterOrder, detail); + if (hasFeeDetail) { + detail.setFeeDetailJson(JSONUtil.toJsonStr(newFeeList)); + } + detail.setAdjustId(adjust.getId()); + detail.setOrderId(dbOrder.getId()); + detail.setGoodsNumber(dbOrder.getGoodsNumber()); + detail.setCreateBy(adjust.getAdjustBy()); + detail.setCreateName(adjust.getAdjustByName()); + detail.setCreateTime(now); + detail.setDelFlag(1); + adjustDetailMapper.insert(detail); + + if (!amountChanged) { + // 8a. 直通:覆盖主表可编辑字段(含 deliveryFreight 合计) + 替换费用明细;不改动任何审核/执行状态 + saveOrderAndFee(dbOrder.getId(), afterOrder, hasFeeDetail ? newFeeList : dbFeeList, loginUser, now, false, null); + updateAdjustPass(adjust.getId(), adjust.getAdjustBy(), adjust.getAdjustByName(), now, null); + syncTmsAsync(dbOrder.getGoodsNumber(), afterOrder); + } else { + // 8b. 涉及金额:仅把业务单 review_status 置为"调整待审核(3)",其余状态(exec/orderStatus)不动,不更新业务单数据 + BusinessDocumentOrder statusOnly = new BusinessDocumentOrder(); + statusOnly.setId(dbOrder.getId()); + statusOnly.setReviewStatus(3L); // 调整待审核 + businessDocumentOrderMapper.updateById(statusOnly); + } + + return AjaxResult.success(new Object[]{amountChanged, adjust.getId()}); + } + + /** + * 调整记录列表(管理页:查全部,可选按订单/业务单号/审核状态等筛选,配合分页使用) + */ + public List listAdjustRecord(BusinessDocumentOrderAdjustQueryDTO query) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper() + .eq(BusinessDocumentOrderAdjust::getDelFlag, 1); + + // ===== 组织隔离(参考业务单 queryList 口径) ===== + LoginUser loginUser = SecurityUtils.getLoginUser(); + if (loginUser != null && loginUser.getUserPo() != null) { + Long loginOrgId = loginUser.getUserPo().getOrganizationId(); + Long loginTopOrgId = loginUser.getUserPo().getTopOrganizationId(); + // 一级组织非1(集团)时,按一级组织过滤(可看本一级组织下所有) + if (loginTopOrgId != null && loginTopOrgId != 1) { + wrapper.eq(BusinessDocumentOrderAdjust::getTopOrgId, String.valueOf(loginTopOrgId)); + } else if (loginOrgId != null) { + // 否则按当前组织过滤;若查询方显式指定了 organizationId 则以其为准 + Long effOrgId = (query != null && query.getOrganizationId() != null) + ? query.getOrganizationId() : loginOrgId; + if (effOrgId != null) { + wrapper.eq(BusinessDocumentOrderAdjust::getOrgId, String.valueOf(effOrgId)); + } + } + } else if (query != null && query.getOrganizationId() != null) { + wrapper.eq(BusinessDocumentOrderAdjust::getOrgId, String.valueOf(query.getOrganizationId())); + } + + if (query != null) { + if (query.getOrderId() != null) { + wrapper.eq(BusinessDocumentOrderAdjust::getOrderId, query.getOrderId()); + } + if (StrUtil.isNotBlank(query.getGoodsNumber())) { + wrapper.like(BusinessDocumentOrderAdjust::getGoodsNumber, query.getGoodsNumber()); + } + if (query.getIsAudit() != null) { + wrapper.eq(BusinessDocumentOrderAdjust::getIsAudit, query.getIsAudit()); + } + if (query.getAuditStatus() != null) { + wrapper.eq(BusinessDocumentOrderAdjust::getAuditStatus, query.getAuditStatus()); + } + if (StrUtil.isNotBlank(query.getAdjustByName())) { + wrapper.like(BusinessDocumentOrderAdjust::getAdjustByName, query.getAdjustByName()); + } + } + wrapper.orderByDesc(BusinessDocumentOrderAdjust::getAdjustTime); + List list = adjustMapper.selectList(wrapper); + return list.stream().map(a -> { + BusinessDocumentOrderAdjustRecordDTO vo = new BusinessDocumentOrderAdjustRecordDTO(); + BeanUtil.copyProperties(a, vo); + return vo; + }).collect(Collectors.toList()); + } + + /** + * 按业务单查询调整记录(供订单详情页"调整记录"Tab用) + */ + public List listAdjustRecordByOrder(Long orderId) { + BusinessDocumentOrderAdjustQueryDTO query = new BusinessDocumentOrderAdjustQueryDTO(); + query.setOrderId(orderId); + return listAdjustRecord(query); + } + + /** + * 调整记录详情(主记录 + 调整后明细快照) + */ + public BusinessDocumentOrderAdjustRecordDTO getAdjustRecord(Long adjustId) { + BusinessDocumentOrderAdjust adjust = adjustMapper.selectById(adjustId); + if (adjust == null) { + throw new ServiceException("调整记录不存在"); + } + BusinessDocumentOrderAdjustRecordDTO vo = new BusinessDocumentOrderAdjustRecordDTO(); + BeanUtil.copyProperties(adjust, vo); + BusinessDocumentOrderAdjustDetail detail = adjustDetailMapper.selectOne( + new LambdaQueryWrapper() + .eq(BusinessDocumentOrderAdjustDetail::getAdjustId, adjustId) + .eq(BusinessDocumentOrderAdjustDetail::getDelFlag, 1) + .last("LIMIT 1")); + vo.setDetail(detail); + return vo; + } + + /** + * 调整审核(通过/驳回),业务主管操作 + */ + @Transactional(rollbackFor = Exception.class) + public AjaxResult auditAdjust(BusinessDocumentOrderAdjustAuditDTO auditDTO) { + if (auditDTO == null || auditDTO.getAdjustId() == null) { + throw new ServiceException("参数错误:缺少调整记录ID"); + } + BusinessDocumentOrderAdjust adjust = adjustMapper.selectById(auditDTO.getAdjustId()); + if (adjust == null) { + throw new ServiceException("调整记录不存在"); + } + if (adjust.getAuditStatus() == null || adjust.getAuditStatus() != AUDIT_WAIT) { + throw new ServiceException("该调整记录非待审核状态,无法审核"); + } + Integer result = auditDTO.getAuditResult(); + if (result == null || (result != AUDIT_PASS && result != AUDIT_REJECT)) { + throw new ServiceException("审核结果非法"); + } + + LoginUser loginUser = SecurityUtils.getLoginUser(); + String auditBy = loginUser != null ? String.valueOf(loginUser.getUserid()) : null; + String auditByName = loginUser != null && loginUser.getWlhyLoginUser() != null ? loginUser.getWlhyLoginUser().getRealname() : null; + Date now = new Date(); + + if (result == AUDIT_PASS) { + BusinessDocumentOrder order = businessDocumentOrderMapper.selectById(adjust.getOrderId()); + if (ObjectUtil.isNull(order)) { + throw new ServiceException("业务单不存在"); + } + BusinessDocumentOrderAdjustDetail detail = adjustDetailMapper.selectOne( + new LambdaQueryWrapper() + .eq(BusinessDocumentOrderAdjustDetail::getAdjustId, adjust.getId()) + .eq(BusinessDocumentOrderAdjustDetail::getDelFlag, 1) + .last("LIMIT 1")); + + // 还原调整后业务单(从JSON整行快照) + BusinessDocumentOrder snapshot = null; + if (detail != null && StrUtil.isNotBlank(detail.getOrderSnapshotJson())) { + try { + snapshot = JSONUtil.toBean(detail.getOrderSnapshotJson(), BusinessDocumentOrder.class); + } catch (Exception e) { + log.warn("解析调整快照JSON失败", e); + } + } + BusinessDocumentOrder toSave = new BusinessDocumentOrder(); + toSave.setId(order.getId()); + if (snapshot != null) { + BeanUtil.copyProperties(snapshot, toSave, CopyOptions.create().setIgnoreNullValue(true) + .setIgnoreProperties(toArray())); + } else if (detail != null) { + BeanUtil.copyProperties(detail, toSave, CopyOptions.create().setIgnoreNullValue(true) + .setIgnoreProperties(toArray())); + } + + // 还原调整后费用明细(从 feeDetailJson) + List newFeeList = new ArrayList<>(); + if (detail != null && StrUtil.isNotBlank(detail.getFeeDetailJson())) { + try { + newFeeList = JSONUtil.toList(detail.getFeeDetailJson(), BusinessOrderAccount.class); + } catch (Exception e) { + log.warn("解析调整费用明细JSON失败", e); + } + } + // 若快照中有明细合计则保证 deliveryFreight 一致 + if (!newFeeList.isEmpty()) { + toSave.setDeliveryFreight(sumAmount(newFeeList)); + } + // 审核通过后 review_status 一律置为 1(已审核);不影响 order_status / execute_status + toSave.setReviewStatus(1L); + // 覆盖业务单 + 替换费用明细 + saveOrderAndFee(order.getId(), toSave, newFeeList, loginUser, now, false, null); + + updateAdjustPass(adjust.getId(), auditBy, auditByName, now, auditDTO.getAuditRemark()); + syncTmsAsync(order.getGoodsNumber(), toSave); + } else { + adjust.setAuditStatus(AUDIT_REJECT); + adjust.setAuditBy(auditBy); + adjust.setAuditByName(auditByName); + adjust.setAuditTime(now); + adjust.setAuditRemark(auditDTO.getAuditRemark()); + adjust.setUpdateBy(auditBy); + adjust.setUpdateTime(now); + adjustMapper.updateById(adjust); + + // 驳回:不更新业务单数据,仅把 review_status 还原为调整前值(不影响其它状态) + BusinessDocumentOrder statusOnly = new BusinessDocumentOrder(); + statusOnly.setId(adjust.getOrderId()); + statusOnly.setReviewStatus(adjust.getBeforeReviewStatus() == null ? 0L : adjust.getBeforeReviewStatus()); + businessDocumentOrderMapper.updateById(statusOnly); + } + return AjaxResult.success(); + } + + // ===================================================== + // 私有工具 + // ===================================================== + + private BusinessDocumentOrder buildAfterOrder(BusinessDocumentOrder dbOrder, BusinessDocumentOrder front) { + BusinessDocumentOrder after = new BusinessDocumentOrder(); + BeanUtil.copyProperties(dbOrder, after, CopyOptions.create().setIgnoreNullValue(true)); + BeanUtil.copyProperties(front, after, CopyOptions.create().setIgnoreNullValue(true) + .setIgnoreProperties(toArray())); + after.setId(dbOrder.getId()); + return after; + } + + private BusinessDocumentOrderAdjust buildAdjust(BusinessDocumentOrder dbOrder, LoginUser u, Date now, + boolean amountChanged, String reason) { + BusinessDocumentOrderAdjust adjust = new BusinessDocumentOrderAdjust(); + adjust.setOrderId(dbOrder.getId()); + adjust.setGoodsNumber(dbOrder.getGoodsNumber()); + adjust.setAdjustBy(u != null ? String.valueOf(u.getUserid()) : null); + adjust.setAdjustByName(u != null && u.getWlhyLoginUser() != null ? u.getWlhyLoginUser().getRealname() : null); + adjust.setAdjustTime(now); + adjust.setAdjustReason(reason); + adjust.setIsAudit(amountChanged ? 1 : 0); + adjust.setAuditStatus(amountChanged ? AUDIT_WAIT : AUDIT_PASS); + adjust.setBeforeReviewStatus(dbOrder.getReviewStatus()); + // 组织信息:参考业务单口径,取当前登录用户所属组织(调整人归属) + if (u != null && u.getUserPo() != null) { + if (u.getUserPo().getOrganizationId() != null) { + adjust.setOrgId(String.valueOf(u.getUserPo().getOrganizationId())); + } else { + adjust.setOrgId(dbOrder.getOrgId()); + } + if (u.getUserPo().getTopOrganizationId() != null) { + adjust.setTopOrgId(String.valueOf(u.getUserPo().getTopOrganizationId())); + } else if (dbOrder.getTopOrganizationId() != null) { + adjust.setTopOrgId(String.valueOf(dbOrder.getTopOrganizationId())); + } + } else { + adjust.setOrgId(dbOrder.getOrgId()); + if (dbOrder.getTopOrganizationId() != null) { + adjust.setTopOrgId(String.valueOf(dbOrder.getTopOrganizationId())); + } + } + adjust.setCreateBy(adjust.getAdjustBy()); + adjust.setCreateName(adjust.getAdjustByName()); + adjust.setCreateTime(now); + adjust.setDelFlag(1); + return adjust; + } + + /** + * 是否修改了金额:主表金额列变化 或 明细 amount 变化 + */ + private boolean isAmountChanged(BusinessDocumentOrder dbOrder, BusinessDocumentOrder front, + boolean hasFeeDetail, List dbFeeList, + List newFeeList) { + // a) 主表金额列比对 + boolean mainChanged = FEE_FIELDS.stream().anyMatch(field -> { + Object newVal = BeanUtil.getFieldValue(front, field); + if (newVal == null) { + return false; + } + Object oldVal = BeanUtil.getFieldValue(dbOrder, field); + BigDecimal old = oldVal == null ? BigDecimal.ZERO : (BigDecimal) oldVal; + BigDecimal now = (BigDecimal) newVal; + return old.compareTo(now) != 0; + }); + if (mainChanged) { + return true; + } + // b) 若前端未传明细,则只看主表;若传了明细,比较明细金额 + if (!hasFeeDetail) { + return false; + } + // 明细合计对比 + BigDecimal oldSum = sumAmount(dbFeeList); + BigDecimal newSum = sumAmount(newFeeList); + return oldSum.compareTo(newSum) != 0; + } + + private BigDecimal sumAmount(List list) { + BigDecimal sum = BigDecimal.ZERO; + if (list == null) { + return sum; + } + for (BusinessOrderAccount acc : list) { + if (acc.getAmount() != null) { + sum = sum.add(acc.getAmount()); + } + } + return sum; + } + + /** + * 覆盖业务单可编辑字段 + 替换费用明细(逻辑删旧 + 插新) + */ + /** + * 覆盖业务单可编辑字段 + 替换费用明细(逻辑删旧 + 插新) + * @param restoreReview 是否还原审核状态(审核通过/驳回后 true;直通 false 不改任何审核状态) + * @param beforeReviewStatus 调整前 review_status,用于还原 + */ + private void saveOrderAndFee(Long orderId, BusinessDocumentOrder toSave, + List newFeeList, + LoginUser loginUser, Date now, + boolean restoreReview, Long beforeReviewStatus) { + if (restoreReview) { + // 仅还原 review_status 到调整前值;不影响 order_status / execute_status 等其它状态 + toSave.setReviewStatus(beforeReviewStatus == null ? 0L : beforeReviewStatus); + } + businessDocumentOrderMapper.updateById(toSave); + + // 逻辑删旧明细 + List oldFeeList = businessOrderAccountMapper.selectList( + new LambdaQueryWrapper() + .eq(BusinessOrderAccount::getOrderId, orderId) + .eq(BusinessOrderAccount::getIsDelete, 0)); + if (oldFeeList != null) { + for (BusinessOrderAccount oldAcc : oldFeeList) { + oldAcc.setIsDelete(1); + oldAcc.setUpdateBy(loginUser != null ? String.valueOf(loginUser.getUserid()) : null); + oldAcc.setUpdateTime(now); + businessOrderAccountMapper.updateById(oldAcc); + } + } + // 插新明细 + if (newFeeList != null && !newFeeList.isEmpty()) { + for (BusinessOrderAccount acc : newFeeList) { + acc.setId(IdUtil.randomUUID()); + acc.setOrderId(String.valueOf(orderId)); + acc.setIsDelete(0); + acc.setCreateBy(loginUser != null ? String.valueOf(loginUser.getUserid()) : null); + acc.setCreateTime(now); + businessOrderAccountMapper.insert(acc); + } + } + } + + private void copySnapshot(BusinessDocumentOrder order, BusinessDocumentOrderAdjustDetail detail) { + BeanUtil.copyProperties(order, detail, CopyOptions.create().setIgnoreNullValue(true) + .setIgnoreProperties("id", "adjustId", "orderId", "createBy", "createName", + "createTime", "updateBy", "updateTime", "delFlag", + "orderSnapshotJson", "feeDetailJson")); + try { + detail.setOrderSnapshotJson(JSONUtil.toJsonStr(order)); + } catch (Exception e) { + log.warn("生成调整快照JSON失败", e); + } + } + + private void updateAdjustPass(Long adjustId, String auditBy, String auditByName, Date auditTime, String remark) { + BusinessDocumentOrderAdjust adjust = new BusinessDocumentOrderAdjust(); + adjust.setId(adjustId); + adjust.setAuditStatus(AUDIT_PASS); + adjust.setAuditBy(auditBy); + adjust.setAuditByName(auditByName); + adjust.setAuditTime(auditTime); + adjust.setAuditRemark(remark); + adjust.setUpdateBy(auditBy); + adjust.setUpdateTime(auditTime); + adjustMapper.updateById(adjust); + } + + private String[] toArray() { + return PROTECTED_FIELDS.toArray(new String[0]); + } + + private void syncTmsAsync(String goodsNumber, BusinessDocumentOrder after) { + try { + List executeOrders = executeOrderMapper.selectList( + new LambdaQueryWrapper() + .eq(ExecuteOrder::getGoodsNumber, goodsNumber) + .eq(ExecuteOrder::getDelFlag, 1)); + if (executeOrders == null || executeOrders.isEmpty()) { + return; + } + log.info("业务单[{}]调整完成,关联执行单[{}]。如需回写TMS请接入TMS改费Feign。", goodsNumber, + executeOrders.stream().map(ExecuteOrder::getGoodsNumber).collect(Collectors.toList())); + } catch (Exception e) { + log.error("同步TMS失败,不影响主流程", e); + } + } +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrder/entity/BusinessDocumentOrder.java b/mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrder/entity/BusinessDocumentOrder.java index 5734bedad..823941199 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrder/entity/BusinessDocumentOrder.java +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrder/entity/BusinessDocumentOrder.java @@ -659,7 +659,7 @@ public class BusinessDocumentOrder extends BaseVOEntity{ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Date documentDate; - @ApiModelProperty( "审核状态 0-未审核 1-审核通过 2-已驳回") + @ApiModelProperty( "审核状态 0-未审核 1-审核通过 2-已驳回 3-调整待审核") private Long reviewStatus; @ApiModelProperty("审核时间") @@ -825,4 +825,7 @@ public class BusinessDocumentOrder extends BaseVOEntity{ @ApiModelProperty("车次") @Excel(name = "车次") private String shuttleNo; + + @ApiModelProperty("业务单调整状态 0-无 1-调整待审核 2-调整驳回 3-调整已通过") + private Integer adjustStatus; } diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrderAdjust/entity/BusinessDocumentOrderAdjust.java b/mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrderAdjust/entity/BusinessDocumentOrderAdjust.java new file mode 100644 index 000000000..d84a978e3 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrderAdjust/entity/BusinessDocumentOrderAdjust.java @@ -0,0 +1,93 @@ +package com.mhd.oms.domain.businessDocumentOrderAdjust.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 运输业务单 调整主记录 + * + * @author dev + * @date 2026-09-09 + */ +@Data +@TableName("business_document_order_adjust") +public class BusinessDocumentOrderAdjust implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主键") + @TableId(type = IdType.ASSIGN_ID) + private Long id; + + @ApiModelProperty("业务单ID") + private Long orderId; + + @ApiModelProperty("业务单号") + private String goodsNumber; + + @ApiModelProperty("调整人账号") + private String adjustBy; + + @ApiModelProperty("调整人姓名") + private String adjustByName; + + @ApiModelProperty("调整时间") + private Date adjustTime; + + @ApiModelProperty("调整原因") + private String adjustReason; + + @ApiModelProperty("是否需要审核 0-否 1-是") + private Integer isAudit; + + @ApiModelProperty("调整前业务单审核状态(review_status原值,用于调整审核通过/驳回后还原,避免影响其它)") + private Long beforeReviewStatus; + + @ApiModelProperty("审核状态 0-待审核 1-审核通过 2-驳回") + private Integer auditStatus; + + @ApiModelProperty("审核人账号") + private String auditBy; + + @ApiModelProperty("审核人姓名") + private String auditByName; + + @ApiModelProperty("审核时间") + private Date auditTime; + + @ApiModelProperty("审核/驳回意见") + private String auditRemark; + + @ApiModelProperty("组织ID") + private String orgId; + + @ApiModelProperty("一级组织ID") + private String topOrgId; + + @ApiModelProperty("创建人") + private String createBy; + + @ApiModelProperty("创建人姓名") + private String createName; + + @ApiModelProperty("创建时间") + private Date createTime; + + @ApiModelProperty("更新人") + private String updateBy; + + @ApiModelProperty("更新人姓名") + private String updateName; + + @ApiModelProperty("更新时间") + private Date updateTime; + + @ApiModelProperty("删除标记 1-正常 0-删除") + private Integer delFlag; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrderAdjust/repository/mapper/BusinessDocumentOrderAdjustMapper.java b/mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrderAdjust/repository/mapper/BusinessDocumentOrderAdjustMapper.java new file mode 100644 index 000000000..ac740249a --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrderAdjust/repository/mapper/BusinessDocumentOrderAdjustMapper.java @@ -0,0 +1,12 @@ +package com.mhd.oms.domain.businessDocumentOrderAdjust.repository.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.mhd.oms.domain.businessDocumentOrderAdjust.entity.BusinessDocumentOrderAdjust; +import org.apache.ibatis.annotations.Mapper; + +/** + * 运输业务单 调整主记录 Mapper + */ +@Mapper +public interface BusinessDocumentOrderAdjustMapper extends BaseMapper { +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrderAdjustDetail/entity/BusinessDocumentOrderAdjustDetail.java b/mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrderAdjustDetail/entity/BusinessDocumentOrderAdjustDetail.java new file mode 100644 index 000000000..178d53c4b --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrderAdjustDetail/entity/BusinessDocumentOrderAdjustDetail.java @@ -0,0 +1,173 @@ +package com.mhd.oms.domain.businessDocumentOrderAdjustDetail.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * 运输业务单 调整明细(调整后业务单整行快照) + * + * @author dev + * @date 2026-09-09 + */ +@Data +@TableName("business_document_order_adjust_detail") +public class BusinessDocumentOrderAdjustDetail implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主键") + @TableId(type = IdType.ASSIGN_ID) + private Long id; + + @ApiModelProperty("关联调整主记录ID") + private Long adjustId; + + @ApiModelProperty("业务单ID") + private Long orderId; + + @ApiModelProperty("业务单号") + private String goodsNumber; + + @ApiModelProperty("货物类型ID") + private String goodsTypeId; + + @ApiModelProperty("货物名称") + private String goodsName; + + @ApiModelProperty("车型") + private String carType; + + @ApiModelProperty("装货地") + private String loadingName; + + @ApiModelProperty("装货地址") + private String loadingAddress; + + @ApiModelProperty("装货时间") + private Date loadingDate; + + @ApiModelProperty("卸货地") + private String unloadName; + + @ApiModelProperty("卸货地址") + private String unloadAddress; + + @ApiModelProperty("卸货时间") + private Date unloadingData; + + @ApiModelProperty("发货人") + private String freighterName; + + @ApiModelProperty("装货电话") + private String loadingPhone; + + @ApiModelProperty("收货人") + private String dischargerName; + + @ApiModelProperty("卸货电话") + private String unloadPhone; + + @ApiModelProperty("备注") + private String remarks; + + @ApiModelProperty("线路") + private String route; + + @ApiModelProperty("单据日期") + private Date documentDate; + + @ApiModelProperty("组织ID") + private String orgId; + + @ApiModelProperty("组织ID") + private Long organizationId; + + @ApiModelProperty("组织名称") + private String organizationName; + + @ApiModelProperty("一级组织ID") + private Long topOrganizationId; + + // ==================== 金额/费用快照 ==================== + @ApiModelProperty("发货运费") + private BigDecimal deliveryFreight; + + @ApiModelProperty("已收运费") + private BigDecimal collectedFreight; + + @ApiModelProperty("未收运费") + private BigDecimal uncollectedFreight; + + @ApiModelProperty("少收运费") + private BigDecimal collectLessFreight; + + @ApiModelProperty("运费单价(元/吨)") + private BigDecimal transportationUnitPrice; + + @ApiModelProperty("信息费") + private BigDecimal infoFee; + + @ApiModelProperty("计费单价") + private BigDecimal freightUnitPrice; + + @ApiModelProperty("货物保险金额") + private BigDecimal cargoInsuranceAmount; + + @ApiModelProperty("运费") + private BigDecimal freightCharges; + + @ApiModelProperty("运费") + private BigDecimal freightFee; + + @ApiModelProperty("卸货费") + private BigDecimal unloadingFee; + + @ApiModelProperty("报关费") + private BigDecimal customsFee; + + @ApiModelProperty("差货费") + private BigDecimal shortageFee; + + @ApiModelProperty("杂费") + private BigDecimal miscellaneousFee; + + @ApiModelProperty("其他费用") + private BigDecimal otherFee; + + @ApiModelProperty("滞车费") + private BigDecimal detentionFee; + + @ApiModelProperty("税率") + private BigDecimal taxRate; + + @ApiModelProperty("创建人") + private String createBy; + + @ApiModelProperty("创建人姓名") + private String createName; + + @ApiModelProperty("创建时间") + private Date createTime; + + @ApiModelProperty("更新人") + private String updateBy; + + @ApiModelProperty("更新时间") + private Date updateTime; + + @ApiModelProperty("删除标记 1-正常 0-删除") + private Integer delFlag; + + @ApiModelProperty("调整后业务单整行JSON快照(用于全字段精确还原)") + private String orderSnapshotJson; + + @ApiModelProperty("调整后费用明细JSON快照(business_order_account列表)") + private String feeDetailJson; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrderAdjustDetail/repository/mapper/BusinessDocumentOrderAdjustDetailMapper.java b/mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrderAdjustDetail/repository/mapper/BusinessDocumentOrderAdjustDetailMapper.java new file mode 100644 index 000000000..ca694765f --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/businessDocumentOrderAdjustDetail/repository/mapper/BusinessDocumentOrderAdjustDetailMapper.java @@ -0,0 +1,12 @@ +package com.mhd.oms.domain.businessDocumentOrderAdjustDetail.repository.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.mhd.oms.domain.businessDocumentOrderAdjustDetail.entity.BusinessDocumentOrderAdjustDetail; +import org.apache.ibatis.annotations.Mapper; + +/** + * 运输业务单 调整明细 Mapper + */ +@Mapper +public interface BusinessDocumentOrderAdjustDetailMapper extends BaseMapper { +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/businessDocumentOrderAdjust/BusinessDocumentOrderAdjustAuditDTO.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/businessDocumentOrderAdjust/BusinessDocumentOrderAdjustAuditDTO.java new file mode 100644 index 000000000..f2db85d7d --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/businessDocumentOrderAdjust/BusinessDocumentOrderAdjustAuditDTO.java @@ -0,0 +1,24 @@ +package com.mhd.oms.interfaces.dto.businessDocumentOrderAdjust; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * 运输业务单 调整 审核入参 + */ +@Data +public class BusinessDocumentOrderAdjustAuditDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("调整记录ID(必传)") + private Long adjustId; + + @ApiModelProperty("审核结果 1-通过 2-驳回") + private Integer auditResult; + + @ApiModelProperty("审核/驳回意见") + private String auditRemark; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/businessDocumentOrderAdjust/BusinessDocumentOrderAdjustDTO.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/businessDocumentOrderAdjust/BusinessDocumentOrderAdjustDTO.java new file mode 100644 index 000000000..911af0260 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/businessDocumentOrderAdjust/BusinessDocumentOrderAdjustDTO.java @@ -0,0 +1,37 @@ +package com.mhd.oms.interfaces.dto.businessDocumentOrderAdjust; + +import com.mhd.oms.domain.businessDocumentOrder.entity.BusinessDocumentOrder; +import com.mhd.oms.domain.businessOrderAccount.BusinessOrderAccount; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 运输业务单 调整提交入参 + * + * 前端整单回传 business_document_order 全部字段 + 费用明细 business_order_account: + * - amountChanged=true (本次修改了金额) -> 需要业务主管审核 + * - amountChanged=false (仅改其它字段) -> 无需审核,直接更新 + * + * order: 前端把「调整后」业务单整单字段回传(含 id 定位;deliveryFreight 合计可由后端按明细自动算)。 + * feeDetailList: 调整后费用明细(business_order_account),其 amount 之和 = 主表 deliveryFreight。 + */ +@Data +public class BusinessDocumentOrderAdjustDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("调整后业务单(整单字段,含 id 定位;金额合计 deliveryFreight 可由后端按明细自动算)") + private BusinessDocumentOrder order; + + @ApiModelProperty("调整后费用明细(business_order_account),amount 之和作为主表 deliveryFreight 合计") + private List feeDetailList; + + @ApiModelProperty("是否修改了金额(前端判定传入):true-需审核,false-直通") + private Boolean amountChanged; + + @ApiModelProperty("调整原因") + private String adjustReason; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/businessDocumentOrderAdjust/BusinessDocumentOrderAdjustQueryDTO.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/businessDocumentOrderAdjust/BusinessDocumentOrderAdjustQueryDTO.java new file mode 100644 index 000000000..c421705f8 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/businessDocumentOrderAdjust/BusinessDocumentOrderAdjustQueryDTO.java @@ -0,0 +1,36 @@ +package com.mhd.oms.interfaces.dto.businessDocumentOrderAdjust; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * 运输业务单 调整记录 查询条件(管理列表用,可不按订单、查全部) + */ +@Data +public class BusinessDocumentOrderAdjustQueryDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("业务单号(模糊)") + private String goodsNumber; + + @ApiModelProperty("业务单ID") + private Long orderId; + + @ApiModelProperty("是否需要审核 0-否 1-是") + private Integer isAudit; + + @ApiModelProperty("审核状态 0-待审核 1-审核通过 2-驳回") + private Integer auditStatus; + + @ApiModelProperty("调整人姓名(模糊)") + private String adjustByName; + + @ApiModelProperty("所属组织ID(调整人/业务单所属组织)") + private Long organizationId; + + @ApiModelProperty("一级组织ID(组织隔离用)") + private Long topOrganizationId; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/businessDocumentOrderAdjust/BusinessDocumentOrderAdjustRecordDTO.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/businessDocumentOrderAdjust/BusinessDocumentOrderAdjustRecordDTO.java new file mode 100644 index 000000000..1a5a73888 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/businessDocumentOrderAdjust/BusinessDocumentOrderAdjustRecordDTO.java @@ -0,0 +1,59 @@ +package com.mhd.oms.interfaces.dto.businessDocumentOrderAdjust; + +import com.mhd.oms.domain.businessDocumentOrderAdjustDetail.entity.BusinessDocumentOrderAdjustDetail; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 运输业务单 调整记录(主记录) 列表/详情返回 VO + */ +@Data +public class BusinessDocumentOrderAdjustRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主记录ID") + private Long id; + + @ApiModelProperty("业务单ID") + private Long orderId; + + @ApiModelProperty("业务单号") + private String goodsNumber; + + @ApiModelProperty("调整人账号") + private String adjustBy; + + @ApiModelProperty("调整人姓名") + private String adjustByName; + + @ApiModelProperty("调整时间") + private Date adjustTime; + + @ApiModelProperty("调整原因") + private String adjustReason; + + @ApiModelProperty("是否需要审核 0-否 1-是") + private Integer isAudit; + + @ApiModelProperty("审核状态 0-待审核 1-审核通过 2-驳回") + private Integer auditStatus; + + @ApiModelProperty("审核人账号") + private String auditBy; + + @ApiModelProperty("审核人姓名") + private String auditByName; + + @ApiModelProperty("审核时间") + private Date auditTime; + + @ApiModelProperty("审核/驳回意见") + private String auditRemark; + + @ApiModelProperty("调整后整行快照明细(详情查询时带出)") + private BusinessDocumentOrderAdjustDetail detail; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/businessDocumentOrder/BusinessDocumentOrderApi.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/businessDocumentOrder/BusinessDocumentOrderApi.java index abce60fdb..217435c2d 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/businessDocumentOrder/BusinessDocumentOrderApi.java +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/businessDocumentOrder/BusinessDocumentOrderApi.java @@ -10,7 +10,12 @@ import org.springframework.web.bind.annotation.*; import com.mhd.oms.interfaces.dto.businessDocumentOrder.BusinessDocumentOrderDTO; import com.mhd.oms.domain.businessDocumentOrder.repository.todo.BusinessDocumentOrderDO; import com.mhd.oms.domain.businessDocumentOrder.repository.po.BusinessDocumentOrderPO; +import com.mhd.oms.application.service.businessDocumentOrder.BusinessDocumentOrderAdjustService; import com.mhd.oms.application.service.businessDocumentOrder.BusinessDocumentOrderApplicationService; +import com.mhd.oms.interfaces.dto.businessDocumentOrderAdjust.BusinessDocumentOrderAdjustAuditDTO; +import com.mhd.oms.interfaces.dto.businessDocumentOrderAdjust.BusinessDocumentOrderAdjustDTO; +import com.mhd.oms.interfaces.dto.businessDocumentOrderAdjust.BusinessDocumentOrderAdjustQueryDTO; +import com.mhd.oms.interfaces.dto.businessDocumentOrderAdjust.BusinessDocumentOrderAdjustRecordDTO; import com.mhd.oms.interfaces.assembler.businessDocumentOrder.BusinessDocumentOrderAssembler; import com.github.pagehelper.PageHelper; import javax.annotation.Resource; @@ -33,6 +38,9 @@ public class BusinessDocumentOrderApi extends BaseController{ @Resource private BusinessDocumentOrderAssembler businessDocumentOrderAssembler; + @Resource + private BusinessDocumentOrderAdjustService businessDocumentOrderAdjustService; + /** * 分页查询【业务单】列表 */ @@ -161,7 +169,64 @@ public class BusinessDocumentOrderApi extends BaseController{ } } + /** + * 订单调整 - 提交调整 + * 若修改了金额字段则进入调整待审核,否则直通更新 + */ + @ApiOperation("订单调整 - 提交调整") + @PostMapping("/adjust") + public AjaxResult adjust(@RequestBody BusinessDocumentOrderAdjustDTO adjustDTO) { + try { + return businessDocumentOrderAdjustService.adjust(adjustDTO); + } catch (Exception e) { + e.printStackTrace(); + return AjaxResult.error(e.getMessage()); + } + } + /** + * 订单调整 - 调整记录列表(查全部,可分页/按业务单号或审核状态筛选) + */ + @ApiOperation("订单调整 - 调整记录列表") + @GetMapping("/listAdjustRecord") + public TableDataInfo listAdjustRecord(BusinessDocumentOrderAdjustQueryDTO query, + @RequestParam(value = "pageNo", required = false, defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize", required = false, defaultValue = "20") Integer pageSize) { + PageHelper.startPage(pageNo, pageSize); + List list = businessDocumentOrderAdjustService.listAdjustRecord(query); + return getDataTable(list); + } + /** + * 订单调整 - 按业务单查询调整记录(供订单详情页展示) + */ + @ApiOperation("订单调整 - 按业务单查询调整记录") + @GetMapping("/listAdjustRecordByOrder/{orderId}") + public AjaxResult listAdjustRecordByOrder(@PathVariable("orderId") Long orderId) { + return AjaxResult.success(businessDocumentOrderAdjustService.listAdjustRecordByOrder(orderId)); + } + + /** + * 订单调整 - 调整记录详情 + */ + @ApiOperation("订单调整 - 调整记录详情") + @GetMapping("/getAdjustRecord/{adjustId}") + public AjaxResult getAdjustRecord(@PathVariable("adjustId") Long adjustId) { + return AjaxResult.success(businessDocumentOrderAdjustService.getAdjustRecord(adjustId)); + } + + /** + * 订单调整 - 审核(通过/驳回) + */ + @ApiOperation("订单调整 - 审核") + @PostMapping("/auditAdjust") + public AjaxResult auditAdjust(@RequestBody BusinessDocumentOrderAdjustAuditDTO auditDTO) { + try { + return businessDocumentOrderAdjustService.auditAdjust(auditDTO); + } catch (Exception e) { + e.printStackTrace(); + return AjaxResult.error(e.getMessage()); + } + } }