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 2f0fe6053..51ad599be 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
@@ -292,7 +292,7 @@ public class InventoryAdjustmentRecordDomainService {
//推送oms库存调整记录
try{
// 当仓库启用 oms 才进行推送
- if (warehousePO.getIsEnable() == 1) {
+ if (ObjectUtil.isNotNull(warehousePO) && warehousePO.getIsEnable() == 1) {
Boolean pushSuccess = pushOms(materialInventory, inventoryAdjustmentRecordDO);
if (!pushSuccess) {
throw new ServiceException("库存调整推送OMS失败,请稍后重试");
diff --git a/mhd_wms/src/main/resources/mapper/materialInventory/MaterialInventoryMapper.xml b/mhd_wms/src/main/resources/mapper/materialInventory/MaterialInventoryMapper.xml
index 8656e711d..25a2173a3 100644
--- a/mhd_wms/src/main/resources/mapper/materialInventory/MaterialInventoryMapper.xml
+++ b/mhd_wms/src/main/resources/mapper/materialInventory/MaterialInventoryMapper.xml
@@ -458,8 +458,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
@@ -531,28 +531,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- a.shipper_id, a.shipper_code, a.shipper_name,
- b.material_base_info_id, b.material_code, b.material_name, b.SPECIFICATION_MODEL,
- a.warehouse_id, a.warehouse_code, a.warehouse_name,
- a.organization_id, a.organization_name, a.top_organization_id,
- MAX(b.material_type) AS material_type,
- MAX(b.material_type_name) AS material_type_name,
- MAX(b.bar_code) AS bar_code,
- MAX(nvl(a.unit_name, b.unit_name)) AS unit_name,
- 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,
- 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,
- IFNULL(SUM(a.area), 0) AS area,
- IFNULL(SUM(a.NET_WEIGHT), 0) AS NET_WEIGHT,
- IFNULL(SUM(a.GROSS_WEIGHT), 0) AS GROSS_WEIGHT,
- IFNULL(SUM(a.VOLUME), 0) AS VOLUME,
- MIN(a.create_time) AS create_time, -- 新增:首次入库时间
- MAX(a.update_time) AS update_time,
- CASE WHEN IFNULL(SUM(a.inventory_quantity), 0) = 0 THEN 1 ELSE 0 END AS sort_order
+ 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_code) AS material_code,
+ MAX(b.material_name) AS material_name,
+ MAX(b.SPECIFICATION_MODEL) AS SPECIFICATION_MODEL,
+ a.warehouse_id,
+ MAX(a.warehouse_code) AS warehouse_code,
+ MAX(a.warehouse_name) AS warehouse_name,
+ a.organization_id,
+ MAX(a.organization_name) AS organization_name,
+ a.top_organization_id,
+ MAX(b.material_type) AS material_type,
+ MAX(b.material_type_name) AS material_type_name,
+ MAX(b.bar_code) AS bar_code,
+ MAX(nvl(a.unit_name, b.unit_name)) AS unit_name,
+ 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,
+ 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,
+ IFNULL(SUM(a.area), 0) AS area,
+ IFNULL(SUM(a.NET_WEIGHT), 0) AS NET_WEIGHT,
+ IFNULL(SUM(a.GROSS_WEIGHT), 0) AS GROSS_WEIGHT,
+ IFNULL(SUM(a.VOLUME), 0) AS VOLUME,
+ MIN(a.create_time) AS create_time,
+ MAX(a.update_time) AS update_time,
+ CASE WHEN IFNULL(SUM(a.inventory_quantity), 0) = 0 THEN 1 ELSE 0 END AS sort_order