From 2a33823ef22a6fbc369e85967a7c122498fbe9ce 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, 6 Jul 2026 20:45:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E5=8A=A1=E6=8E=A8=E9=80=81=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MaterialPushRecordApi.java | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/materialPushRecord/MaterialPushRecordApi.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/materialPushRecord/MaterialPushRecordApi.java index 2d034c3de..c3df2a409 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/materialPushRecord/MaterialPushRecordApi.java +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/materialPushRecord/MaterialPushRecordApi.java @@ -1,13 +1,17 @@ package com.mhd.oms.interfaces.facade.materialPushRecord; import com.mhd.common.core.web.domain.AjaxResult; +import com.mhd.oms.domain.businessDocumentOrder.entity.BusinessDocumentOrder; +import com.mhd.oms.domain.businessDocumentOrder.repository.mapper.BusinessDocumentOrderMapper; import com.mhd.oms.domain.materialPushRecord.service.MaterialPushRecordService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.util.LinkedHashMap; import java.util.List; +import java.util.Map; @Api(tags = "物料推送记录") @RestController @@ -17,10 +21,27 @@ public class MaterialPushRecordApi { @Resource private MaterialPushRecordService materialPushRecordService; + @Resource + private BusinessDocumentOrderMapper businessDocumentOrderMapper; + @ApiOperation("批量查询物料推送数据(先按orderId查单证推送快照,再按物料id查推送快照,最后调WMS)") @GetMapping("/getBatchByIds") public AjaxResult getBatchByIds(@RequestParam("materialBaseInfoIds") List materialBaseInfoIds, @RequestParam("orderId") Long orderId) { - return AjaxResult.success(materialPushRecordService.getBatchByIds(materialBaseInfoIds, orderId)); + // 查询订单的境内货源地、最终目的国 + String domesticSourcePlace = ""; + String destinationCountry = ""; + if (orderId != null) { + BusinessDocumentOrder order = businessDocumentOrderMapper.selectById(orderId); + if (order != null) { + domesticSourcePlace = order.getDomesticSourcePlace() != null ? order.getDomesticSourcePlace() : ""; + destinationCountry = order.getDestinationCountry() != null ? order.getDestinationCountry() : ""; + } + } + Map result = new LinkedHashMap<>(); + result.put("tableData", materialPushRecordService.getBatchByIds(materialBaseInfoIds, orderId)); + result.put("domesticSourcePlace", domesticSourcePlace); + result.put("destinationCountry", destinationCountry); + return AjaxResult.success(result); } }