diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsInventoryController.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsInventoryController.java index 606b1da0..56cf06de 100644 --- a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsInventoryController.java +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsInventoryController.java @@ -48,6 +48,17 @@ public class WmsInventoryController extends BaseController { return wmsInventoryService.queryPageList(bo, pageQuery); } + /** + * 查询物料报警 + * @param bo + * @param pageQuery + * @return + */ + @GetMapping("/listInventoryAlarm") + public TableDataInfo listInventoryAlarm(WmsInventoryBo bo, PageQuery pageQuery) { + return wmsInventoryService.listInventoryAlarm(bo, pageQuery); + } + /** * 导出物料库存列表 */ diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/BaseMaterialInfo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/BaseMaterialInfo.java index 4197cbd3..ef3ed849 100644 --- a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/BaseMaterialInfo.java +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/BaseMaterialInfo.java @@ -4,6 +4,8 @@ import org.dromara.common.tenant.core.TenantEntity; import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; import java.util.Date; import java.io.Serial; @@ -156,12 +158,12 @@ public class BaseMaterialInfo extends TenantEntity { /** * 最大库存数量 */ - private Long maxStockAmount; + private BigDecimal maxStockAmount; /** * 最小库存数量 */ - private Long minStockAmount; + private BigDecimal minStockAmount; /** * 安全库存数量 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 b519b362..c582aa9b 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 @@ -95,6 +95,7 @@ public class WmsInventory{ private String warehouseCode;//字段映射 @TableField(exist = false) private String materialCode;//字段映射 + private String warehouseId; } diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/BaseMaterialInfoBo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/BaseMaterialInfoBo.java index a28ef9d8..7705c84d 100644 --- a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/BaseMaterialInfoBo.java +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/BaseMaterialInfoBo.java @@ -8,6 +8,8 @@ import io.github.linpeilie.annotations.AutoMapper; import lombok.Data; import lombok.EqualsAndHashCode; import jakarta.validation.constraints.*; + +import java.math.BigDecimal; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; @@ -158,12 +160,12 @@ public class BaseMaterialInfoBo extends BaseEntity { /** * 最大库存数量 */ - private Long maxStockAmount; + private BigDecimal maxStockAmount; /** * 最小库存数量 */ - private Long minStockAmount; + private BigDecimal minStockAmount; /** * 安全库存数量 diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsInventoryBo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsInventoryBo.java index 4bb13e15..f71fb547 100644 --- a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsInventoryBo.java +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsInventoryBo.java @@ -76,5 +76,6 @@ public class WmsInventoryBo extends BaseEntity { @NotNull(message = "仓库ID不能为空", groups = { AddGroup.class, EditGroup.class }) private Long storeId; private String tenantId; + private String warehouseId; } diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/BaseMaterialInfoVo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/BaseMaterialInfoVo.java index 0ea8c6fe..5e8383b7 100644 --- a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/BaseMaterialInfoVo.java +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/BaseMaterialInfoVo.java @@ -1,5 +1,6 @@ package org.dromara.wms.domain.vo; +import java.math.BigDecimal; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; import org.dromara.wms.domain.BaseMaterialInfo; @@ -201,13 +202,13 @@ public class BaseMaterialInfoVo implements Serializable { * 最大库存数量 */ @ExcelProperty(value = "最大库存数量") - private Long maxStockAmount; + private BigDecimal maxStockAmount; /** * 最小库存数量 */ @ExcelProperty(value = "最小库存数量") - private Long minStockAmount; + private BigDecimal minStockAmount; /** * 安全库存数量 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 4c52d62c..5ea7c588 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 @@ -113,6 +113,9 @@ public class WmsInventoryVo implements Serializable { private String warehouseCode;//字段映射 private String materialCode;//字段映射 + private String warehouseId; + private BigDecimal maxStockAmount; + private BigDecimal minStockAmount; } diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsInventoryMapper.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsInventoryMapper.java index 6dbeab73..2567d15b 100644 --- a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsInventoryMapper.java +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsInventoryMapper.java @@ -3,10 +3,12 @@ package org.dromara.wms.mapper; import org.apache.ibatis.annotations.Param; import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; import org.dromara.wms.domain.WmsInventory; +import org.dromara.wms.domain.bo.WmsInventoryBo; import org.dromara.wms.domain.vo.WmsInventoryVo; import org.springframework.web.bind.annotation.PostMapping; import java.math.BigDecimal; +import java.util.List; /** * 物料库存Mapper接口 @@ -17,4 +19,6 @@ import java.math.BigDecimal; public interface WmsInventoryMapper extends BaseMapperPlus { BigDecimal materailCount(@Param("entity") WmsInventory wmsInventory); + + List listInventoryAlarm(@Param("entity")WmsInventoryBo bo); } 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 b7bc75fc..dc80521f 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 @@ -79,4 +79,6 @@ public interface IWmsInventoryService { int updateWmsInventorys(ArrayList updateList); int deletePlanList(ArrayList ids); + + TableDataInfo listInventoryAlarm(WmsInventoryBo bo, PageQuery pageQuery); } 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 c8591333..13160a21 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 @@ -152,6 +152,17 @@ public class WmsInventoryServiceImpl implements IWmsInventoryService { } + @Override + public TableDataInfo listInventoryAlarm(WmsInventoryBo bo, PageQuery pageQuery) { + List wmsInventoryVos = baseMapper.listInventoryAlarm(bo); + Page page = new Page<>(); + page.setRecords(wmsInventoryVos); + page.setTotal(wmsInventoryVos.size()); + page.setCurrent(pageQuery.getPageNum()); + page.setSize(pageQuery.getPageSize()); + return TableDataInfo.build(page); + } + @Override public int deletePlanList(ArrayList ids) { return baseMapper.deleteByIds(ids); 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 31f7b5f4..6ac278df 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 @@ -13,4 +13,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where x.material_id = #{entity.materialId} + +