feat: 「库存管理」-「库存查询」增加按货主/物料查询

- 实现按(货主 + 物料 + 仓库 + 包装单位)组合聚合逻辑,更新日期取组内最新时间
This commit is contained in:
rcx
2026-08-07 15:08:05 +08:00
parent 0f26cd3d0d
commit cb136a19b4
3 changed files with 58 additions and 5 deletions
@@ -38,6 +38,8 @@ public interface MaterialInventoryMapper extends BaseMapper<MaterialInventory>
public List<MaterialInventoryPO> queryListByHz(MaterialInventoryDO materialInventoryDO);
//查物料库存列表-货主+物料(同一物料在不同货主下各一行)
public List<MaterialInventoryPO> queryListByHzWl(MaterialInventoryDO materialInventoryDO);
//查物料库存列表-按货主+物料+仓库(库存查询第三个页签,update_time 取合并后最大值)
public List<MaterialInventoryPO> queryListByHzWlUnit(MaterialInventoryDO materialInventoryDO);
/**
* @description 批量增加库存
@@ -77,17 +77,19 @@ public class MaterialInventoryImpl extends ServiceImpl<MaterialInventoryMapper,
String queryRule = materialInventoryDO.getQueryRule();
if ("hz".equals(queryRule)) {
return materialInventoryMapper.queryListByHz(materialInventoryDO);
} else if ("hzwl".equals(queryRule)) {
} else if ("hzwl".equals(queryRule)) { // 货主查询
return materialInventoryMapper.queryListByHzWl(materialInventoryDO);
} else if ("wl".equals(queryRule)) {
} else if ("wl".equals(queryRule)) { // 物料查询
return materialInventoryMapper.queryListByWl(materialInventoryDO);
} else if ("kw".equals(queryRule)) {
return materialInventoryMapper.queryListByKw(materialInventoryDO);
} else if ("wlkw".equals(queryRule)) {
} else if ("wlkw".equals(queryRule)) { // 物料/库位查询
return materialInventoryMapper.queryListByWlKw(materialInventoryDO);
} else if ("wlExpiry".equals(queryRule)) {
} else if ("wlExpiry".equals(queryRule)) { // 物料/过期日期查询
return materialInventoryMapper.queryListByWlExpiry(materialInventoryDO);
} else if ("all".equals(queryRule)) {
} else if("hzwlunit".equals(queryRule)){ // 货主/物料查询
return materialInventoryMapper.queryListByHzWlUnit(materialInventoryDO);
}else if ("all".equals(queryRule)) { // 全部查询
return materialInventoryMapper.queryList(materialInventoryDO);
} else {
//不传返回全部