diff --git a/mhd_wms/src/main/java/com/mhd/wms/domain/inventoryAdjustmentRecord/service/InventoryAdjustmentRecordDomainService.java b/mhd_wms/src/main/java/com/mhd/wms/domain/inventoryAdjustmentRecord/service/InventoryAdjustmentRecordDomainService.java index 51ad599be..482c92cfc 100644 --- a/mhd_wms/src/main/java/com/mhd/wms/domain/inventoryAdjustmentRecord/service/InventoryAdjustmentRecordDomainService.java +++ b/mhd_wms/src/main/java/com/mhd/wms/domain/inventoryAdjustmentRecord/service/InventoryAdjustmentRecordDomainService.java @@ -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()); diff --git a/mhd_wms/src/main/java/com/mhd/wms/domain/materialInventory/repository/persistence/MaterialInventoryImpl.java b/mhd_wms/src/main/java/com/mhd/wms/domain/materialInventory/repository/persistence/MaterialInventoryImpl.java index a536436ce..ee83c4cd7 100644 --- a/mhd_wms/src/main/java/com/mhd/wms/domain/materialInventory/repository/persistence/MaterialInventoryImpl.java +++ b/mhd_wms/src/main/java/com/mhd/wms/domain/materialInventory/repository/persistence/MaterialInventoryImpl.java @@ -78,7 +78,8 @@ public class MaterialInventoryImpl extends ServiceImpl - GROUP BY a.MATERIAL_BASE_INFO_ID,a.WAREHOUSE_ID,a.STORAGE_SECTION_ID,a.STORAGE_LOCATION_ID order by sort_order, a.update_time desc + GROUP BY a.SHIPPER_ID,a.MATERIAL_BASE_INFO_ID,a.WAREHOUSE_ID,a.STORAGE_SECTION_ID,a.STORAGE_LOCATION_ID order by sort_order, a.update_time desc @@ -534,7 +534,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" a.shipper_id, MAX(a.shipper_code) AS shipper_code, MAX(a.shipper_name) AS shipper_name, - b.material_base_info_id, + MAX(b.material_base_info_id) AS material_base_info_id, MAX(b.material_code) AS material_code, MAX(b.material_name) AS material_name, MAX(b.SPECIFICATION_MODEL) AS SPECIFICATION_MODEL, @@ -551,7 +551,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" MAX(b.pack_id) AS pack_id, MAX(b.pack_code) AS pack_code, MAX(b.pack_name) AS pack_name, - MAX(a.unit) AS unit, + MAX(a.unit) AS unit, IFNULL(SUM(a.freeze_quantity), 0) AS freeze_quantity, IFNULL(SUM(a.inventory_quantity), 0) AS inventory_quantity, IFNULL(SUM(a.allocation_quantity), 0) AS allocation_quantity, @@ -580,7 +580,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" GROUP BY a.shipper_id, - b.material_base_info_id, + b.material_code, a.warehouse_id, a.organization_id, a.top_organization_id ORDER BY sort_order, MAX(a.update_time) DESC @@ -596,7 +596,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - GROUP BY a.SHIPPER_ID order by sort_order, a.update_time desc + GROUP BY a.SHIPPER_ID, a.WAREHOUSE_ID order by sort_order, a.update_time desc