From 828b70ff3f33c3b826f86174a522ff4738026f00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=B8=E7=86=9F=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Wed, 31 Dec 2025 10:35:44 +0800 Subject: [PATCH] 1 --- .../controller/LabelQueryController.java | 21 +++++++++++++++++++ .../service/impl/LabelQueryServiceImpl.java | 1 + .../mapper/transit/TransitMapper.xml | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gaotao/modules/warehouse/controller/LabelQueryController.java b/src/main/java/com/gaotao/modules/warehouse/controller/LabelQueryController.java index 2c77983..f0f2523 100644 --- a/src/main/java/com/gaotao/modules/warehouse/controller/LabelQueryController.java +++ b/src/main/java/com/gaotao/modules/warehouse/controller/LabelQueryController.java @@ -9,6 +9,8 @@ import com.gaotao.modules.base.service.ReportLabelListService; import com.gaotao.modules.handlingunit.dao.HandlingUnitMapper; import com.gaotao.modules.handlingunit.entity.dto.HandlingUnitDto; import com.gaotao.modules.warehouse.service.LabelQueryService; +import com.gaotao.modules.warehouse.entity.Location; +import com.gaotao.modules.transit.dao.TransitMapper; import com.gaotao.modules.sys.controller.AbstractController; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -35,6 +37,9 @@ public class LabelQueryController extends AbstractController { @Autowired private PrintTaskService printTaskService; + @Autowired + private TransitMapper transitMapper; + /** * 分页查询HandlingUnit标签信息 */ @@ -194,4 +199,20 @@ public class LabelQueryController extends AbstractController { } } + /** + * @Description 根据库位ID查询库位信息(获取仓库编码)- rqrq + * @Title getLocationByLocationId + * @param params 参数(包含site和locationId) + * @return R + * @author rqrq + * @date 2025/12/31 + */ + @PostMapping("getLocationByLocationId") + public R getLocationByLocationId(@RequestBody Map params) throws Exception { + String site = (String) params.get("site"); + String locationId = (String) params.get("locationId"); + Location location = transitMapper.getLocationByLocationId(locationId, site); + return R.ok().put("row", location); + } + } diff --git a/src/main/java/com/gaotao/modules/warehouse/service/impl/LabelQueryServiceImpl.java b/src/main/java/com/gaotao/modules/warehouse/service/impl/LabelQueryServiceImpl.java index 8dc8a44..67150d4 100644 --- a/src/main/java/com/gaotao/modules/warehouse/service/impl/LabelQueryServiceImpl.java +++ b/src/main/java/com/gaotao/modules/warehouse/service/impl/LabelQueryServiceImpl.java @@ -177,6 +177,7 @@ public class LabelQueryServiceImpl implements LabelQueryService { handlingUnit.setEngChgLevel(dto.getEngChgLevel()); handlingUnit.setQty(dto.getQty()); handlingUnit.setInStockFlag(dto.getInStockFlag()); + handlingUnit.setAvailabilityControlId(dto.getAvailabilityControlId()); // AvailabilityControlId - rqrq handlingUnit.setModifiedDate(new Date()); handlingUnit.setModifiedBy("SYSTEM"); diff --git a/src/main/resources/mapper/transit/TransitMapper.xml b/src/main/resources/mapper/transit/TransitMapper.xml index 400f8c4..9b3581b 100644 --- a/src/main/resources/mapper/transit/TransitMapper.xml +++ b/src/main/resources/mapper/transit/TransitMapper.xml @@ -85,7 +85,7 @@ Active as active, locationGroupId, locationType - FROM location WITH (NOLOCK) + FROM location WHERE LocationID = #{locationId} AND Site = #{site}