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 0d9af2de..1f5651c8 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 @@ -90,9 +90,17 @@ public class WmsInventory { */ @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; + + + /** + * 仓库名称 + */ + @TableField(exist = false) + private String warehouseName; @TableField(exist = false) private String warehouseCode;//字段映射 + private String materialCode; @TableField(exist = false) private String materialName;//字段映射 @@ -106,6 +114,8 @@ public class WmsInventory { */ @TableField(exist = false) private String materialCategoryName;//字段映射 + + @TableField(exist = false) private String materialUnit;//字段映射 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 eb9f8246..059bfedf 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 @@ -117,6 +117,7 @@ public class WmsInventoryVo implements Serializable { private String unitName;//字段映射 private String materialUnit;//字段映射 private String warehouseId; + private BigDecimal maxStockAmount; private BigDecimal minStockAmount; @@ -129,4 +130,9 @@ public class WmsInventoryVo implements Serializable { // 移库库位 private String newLocationCode; + + /** + * 仓库名称 + */ + private String warehouseName; } diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsInventoryService.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsInventoryService.java index 713fe963..12e7cc28 100644 --- a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsInventoryService.java +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsInventoryService.java @@ -82,6 +82,16 @@ public interface IWmsInventoryService { TableDataInfo listInventoryAlarm(WmsInventoryBo bo, PageQuery pageQuery); + /** + * 根据库位编码和物料类型查询库存列表 + * 用于盘点任务中按物料类型过滤库存 + * + * @param locationCode 库位编码 + * @param materialTypeId 物料类型ID + * @return 库存列表 + */ + List queryInventoryByLocationAndMaterialType(String locationCode, Long materialTypeId); + /** * 根据批次码查询库存 * @param batchCode 批次码 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 5e2c5937..2bc4d5da 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 @@ -88,6 +88,9 @@ public class WmsInventoryServiceImpl implements IWmsInventoryService { // 关联表查询物料大类名称 .select(BaseMaterialCategory::getMaterialCategoryName) .leftJoin(BaseMaterialCategory.class, BaseMaterialCategory::getMaterialCategoryId, WmsInventory::getMaterialCategoryId) + // 关联表查询仓库 + .select(WmsBaseWarehouse::getWarehouseCode, WmsBaseWarehouse::getWarehouseName) + .leftJoin(WmsBaseWarehouse.class, WmsBaseWarehouse::getWarehouseId, WmsInventory::getStoreId) .eq(bo.getInventoryId() != null, WmsInventory::getInventoryId, bo.getInventoryId()) .eq(StringUtils.isNotBlank(bo.getBatchCode()), WmsInventory::getBatchCode, bo.getBatchCode()) @@ -114,7 +117,7 @@ public class WmsInventoryServiceImpl implements IWmsInventoryService { .select(BaseMaterialCategory::getMaterialCategoryName) .leftJoin(BaseMaterialCategory.class, BaseMaterialCategory::getMaterialCategoryId, WmsInventory::getMaterialCategoryId) // 关联表查询仓库 - .select(WmsBaseWarehouse::getWarehouseCode) + .select(WmsBaseWarehouse::getWarehouseCode, WmsBaseWarehouse::getWarehouseName) .leftJoin(WmsBaseWarehouse.class, WmsBaseWarehouse::getWarehouseId, WmsInventory::getStoreId); lqw.eq(bo.getInventoryId() != null, WmsInventory::getInventoryId, bo.getInventoryId());