出库单编辑计划数量不变问题,库存查询显示问题

This commit is contained in:
秦鸿展
2026-05-12 15:36:04 +08:00
parent 97b4e5028e
commit ff95284448
7 changed files with 213 additions and 5 deletions
@@ -33,6 +33,8 @@ public interface MaterialInventoryMapper extends BaseMapper<MaterialInventory>
public List<MaterialInventoryPO> queryListByWl(MaterialInventoryDO materialInventoryDO);
//查物料库存列表-货主
public List<MaterialInventoryPO> queryListByHz(MaterialInventoryDO materialInventoryDO);
//查物料库存列表-货主+物料(同一物料在不同货主下各一行)
public List<MaterialInventoryPO> queryListByHzWl(MaterialInventoryDO materialInventoryDO);
/**
* @description 批量增加库存
@@ -74,6 +74,8 @@ public class MaterialInventoryImpl extends ServiceImpl<MaterialInventoryMapper,
String queryRule = materialInventoryDO.getQueryRule();
if ("hz".equals(queryRule)) {
return materialInventoryMapper.queryListByHz(materialInventoryDO);
} else if ("hzwl".equals(queryRule)) {
return materialInventoryMapper.queryListByHzWl(materialInventoryDO);
} else if ("wl".equals(queryRule)) {
return materialInventoryMapper.queryListByWl(materialInventoryDO);
} else if ("kw".equals(queryRule)) {
@@ -230,7 +230,7 @@ public class MaterialInventoryDO extends MaterialBaseDO {
@Excel(name = "ExtAttr4", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date extAttr4;
//查询规则 hz:货主,wl:物料,kw:库位,wlkw:物料库位,all:全部
//查询规则 hz:货主,hzwl:货主+物料,wl:物料,kw:库位,wlkw:物料库位,all:全部listAll 传入 hz 时会改为 hzwl
private String queryRule;
@ApiModelProperty("冻结数量大于0条件")
@@ -1649,6 +1649,11 @@ public class StockOutOrderDomainService {
outMaterialDetailDO.setPackCode(materialBaseInfoPO.getPackCode());
outMaterialDetailDO.setPackName(materialBaseInfoPO.getPackName());
// 将出库数量赋值给计划数量
if (outMaterialDetailDO.getOutboundQuantity() != null) {
outMaterialDetailDO.setQuantity(outMaterialDetailDO.getOutboundQuantity());
}
//获取包装详情
/*AjaxResult packDetailResult = systemServiceFeign.getInfoByPackIdAndUnitCode(materialBaseInfoPO.getPackId(), "EA");
if(!"200".equals(String.valueOf(packDetailResult.get("code")))){
@@ -162,7 +162,7 @@ public class MaterialInventoryDTO extends MaterialBaseDTO {
@ApiModelProperty("箱号/卡板号")
@Excel(name = "箱号/卡板号")
private String boxPalletNo;
//查询规则 hz:货主,wl:物料,kw:库位,wlkw:物料库位,all:全部
//查询规则 hz:货主,hzwl:货主+物料,wl:物料,kw:库位,wlkw:物料库位,all:全部materialInventoryApi/listAll hz 时后端按货主+物料分组
private String queryRule;
@ApiModelProperty("净重(KG)")
@@ -128,12 +128,16 @@ public class MaterialInventoryApi extends BaseController {
return tableDataInfo;
}
@ApiOperation("查询物料库存列表不分页")
@ApiOperation("查询物料库存列表不分页queryRule=hz 时按货主+物料分组(同一物料在不同货主各占一行)")
@GetMapping("/listAll")
public TableDataInfo listAll(MaterialInventoryDTO materialInventoryDTO)
{
//转换实体
MaterialInventoryDO materialInventoryDO = materialInventoryAssembler.toDO(materialInventoryDTO);
// 不分页列表按货主查询需按货主+物料汇总分页 /list 仍用 hz 表示仅按货主一行
if ("hz".equals(materialInventoryDO.getQueryRule())) {
materialInventoryDO.setQueryRule("hzwl");
}
List<MaterialInventoryPO> list = materialInventoryApplicationService.queryList(materialInventoryDO);
return getDataTable(list);
}