Merge branch 'dev-ty1.2' into dev

This commit is contained in:
zhaoqing
2026-08-08 15:12:27 +08:00
3 changed files with 30 additions and 29 deletions
@@ -3,7 +3,7 @@ package com.mhd.wms.domain.inventoryAdjustmentRecord.service;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.aliyun.oss.ServiceException;
import com.mhd.common.core.exception.ServiceException;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.mhd.common.core.constant.SnowFlakeConstants;
import com.mhd.common.core.domain.po.UserPo;
@@ -175,7 +175,7 @@ public class InventoryAdjustmentRecordDomainService {
}
materialInventory.setAllocationQuantity(materialInventory.getAllocationQuantity().subtract(inventoryAdjustmentRecordDO.getAdjustQuantity()));
if (materialInventory.getAllocationQuantity().compareTo(BigDecimal.ZERO) < 0) {
throw new ServiceException("可用数量调整之后不能小于0");
throw new ServiceException("调整之后可用数量不能小于0");
}
}
inventoryAdjustmentRecord.setInventoryAfterQuantity(materialInventory.getInventoryQuantity());
@@ -231,7 +231,7 @@ public class InventoryAdjustmentRecordDomainService {
}
materialInventory.setAllocationQuantity(materialInventory.getAllocationQuantity().subtract(inventoryAdjustmentRecordDO.getAdjustQuantity()));
if (materialInventory.getAllocationQuantity().compareTo(BigDecimal.ZERO) < 0) {
throw new ServiceException("可用数量调整之后不能小于0");
throw new ServiceException("调整之后可用数量不能小于0");
}
inventoryAdjustmentRecord.setInventoryAfterQuantity(materialInventory.getInventoryQuantity());
inventoryAdjustmentRecord.setAllocationAfterQuantity(materialInventory.getAllocationQuantity());
@@ -78,7 +78,8 @@ public class MaterialInventoryImpl extends ServiceImpl<MaterialInventoryMapper,
if ("hz".equals(queryRule)) {
return materialInventoryMapper.queryListByHz(materialInventoryDO);
} else if ("hzwl".equals(queryRule)) { // 货主查询
return materialInventoryMapper.queryListByHzWl(materialInventoryDO);
return materialInventoryMapper.queryListByHz(materialInventoryDO);
// return materialInventoryMapper.queryListByHzWl(materialInventoryDO);
} else if ("wl".equals(queryRule)) { // 物料查询
return materialInventoryMapper.queryListByWl(materialInventoryDO);
} else if ("kw".equals(queryRule)) {