From e4774798a4187595daa0ff0ca035ccd9dfef0629 Mon Sep 17 00:00:00 2001 From: "zangch@mesnac.com" Date: Fri, 5 Sep 2025 16:24:13 +0800 Subject: [PATCH] =?UTF-8?q?feat(wms):=20=E5=85=B3=E8=81=94=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=89=A9=E6=96=99=E4=BF=9D=E8=B4=A8=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 WmsInventory 模型中添加 maxParkingTime 字段 - 更新 WmsInventoryMapper.xml 中的查询语句,包含 max_parking_time 列- 修改 WmsInventoryServiceImpl 中的查询方法,获取物料最大停放时间 - 在 WmsInventoryVo 中添加 maxParkingTime 字段,用于前端展示 --- .../src/main/java/org/dromara/wms/domain/WmsInventory.java | 7 +++++++ .../java/org/dromara/wms/domain/vo/WmsInventoryVo.java | 5 +++++ .../dromara/wms/service/impl/WmsInventoryServiceImpl.java | 4 ++-- .../src/main/resources/mapper/wms/WmsInventoryMapper.xml | 7 +++++++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsInventory.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsInventory.java index 1f5651c8..08d28788 100644 --- a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsInventory.java +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsInventory.java @@ -119,4 +119,11 @@ public class WmsInventory { @TableField(exist = false) private String materialUnit;//字段映射 + /** + * 最大停放时间(wms用天) + */ + @TableField(exist = false) + private Long maxParkingTime; + + } diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsInventoryVo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsInventoryVo.java index 059bfedf..06fe26e0 100644 --- a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsInventoryVo.java +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsInventoryVo.java @@ -135,4 +135,9 @@ public class WmsInventoryVo implements Serializable { * 仓库名称 */ private String warehouseName; + + /** + * 最大停放时间(wms用天) + */ + private Long maxParkingTime; } diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsInventoryServiceImpl.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsInventoryServiceImpl.java index 4a44a576..6e7f3ace 100644 --- a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsInventoryServiceImpl.java +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsInventoryServiceImpl.java @@ -85,7 +85,7 @@ public class WmsInventoryServiceImpl implements IWmsInventoryService { .selectAll(WmsInventory.class) // 关联表查询物料 - .select(BaseMaterialInfo::getMaterialCode, BaseMaterialInfo::getMaterialName) + .select(BaseMaterialInfo::getMaterialCode, BaseMaterialInfo::getMaterialName, BaseMaterialInfo::getMaxParkingTime) .leftJoin(BaseMaterialInfo.class, BaseMaterialInfo::getMaterialId, WmsInventory::getMaterialId) // 关联表查询物料大类名称 .select(BaseMaterialCategory::getMaterialCategoryName) @@ -113,7 +113,7 @@ public class WmsInventoryServiceImpl implements IWmsInventoryService { .selectAll(WmsInventory.class) // 关联表查询物料 - .select(BaseMaterialInfo::getMaterialCode, BaseMaterialInfo::getMaterialName) + .select(BaseMaterialInfo::getMaterialCode, BaseMaterialInfo::getMaterialName, BaseMaterialInfo::getMaxParkingTime) .leftJoin(BaseMaterialInfo.class, BaseMaterialInfo::getMaterialId, WmsInventory::getMaterialId) // 关联表查询物料大类名称 .select(BaseMaterialCategory::getMaterialCategoryName) diff --git a/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsInventoryMapper.xml b/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsInventoryMapper.xml index 1ff1c5e0..201afa4d 100644 --- a/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsInventoryMapper.xml +++ b/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsInventoryMapper.xml @@ -29,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" MAX(c.warehouse_name) warehouse_name, MAX(b.material_code) material_code, MAX(b.material_name) material_name, + MAX(b.max_parking_time) max_parking_time, MAX(x.lock_state) lock_state, MAX(x.material_categories) material_categories, MAX(x.location_code) locationCode, @@ -70,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" MAX(b.max_stock_amount) max_stock_amount, MAX(b.material_code) material_code, MAX(b.material_name) material_name, + MAX(b.max_parking_time) max_parking_time, -- MAX(x.material_categories) material_categories, -- MAX(bmc.material_category_name) material_category_name, MAX(x.lock_state) lock_state @@ -158,6 +160,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bmi.material_name, bmi.material_spec, bmi.material_unit, + bmi.max_parking_time, wbw.warehouse_code, wbw.warehouse_name, wbw.warehouse_id, @@ -212,6 +215,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bmi.material_name, bmi.material_spec, bmi.material_unit, + bmi.max_parking_time, wbw.warehouse_code, wbw.warehouse_name, woo.warehouse_id, @@ -270,6 +274,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" icr.material_name, bmi.material_spec, bmi.material_unit, + bmi.max_parking_time, '' as warehouse_code, '' as warehouse_name, NULL as warehouse_id @@ -321,6 +326,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bmi.material_name, bmi.material_spec, bmi.material_unit, + bmi.max_parking_time, wbw.warehouse_code, wbw.warehouse_name, ro.warehouse_id, @@ -376,6 +382,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bmi.material_name, bmi.material_spec, bmi.material_unit, + bmi.max_parking_time, '' as warehouse_code, '' as warehouse_name, NULL as warehouse_id