diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationMaterialInventory/service/ReservationMaterialInventoryApplicationService.java b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationMaterialInventory/service/ReservationMaterialInventoryApplicationService.java
index e8b061636..fe6184862 100644
--- a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationMaterialInventory/service/ReservationMaterialInventoryApplicationService.java
+++ b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationMaterialInventory/service/ReservationMaterialInventoryApplicationService.java
@@ -57,15 +57,16 @@ public class ReservationMaterialInventoryApplicationService {
LoginUser loginUser = SecurityUtils.getLoginUser();
if (loginUser != null && loginUser.getUserPo() != null) {
Long loginTopOrgId = loginUser.getUserPo().getTopOrganizationId();
- Long userOrganizationId = loginUser.getUserPo().getOrganizationId();
- boolean isTopOrgUser = userOrganizationId != null && userOrganizationId.equals(loginTopOrgId);
// 出库预约-添加货物:按一级组织(租户)过滤;委托方(货主)叠加货主维度查自己的货
+ // 委托方判定以"挂货主企业"为准,不再按组织层级判定,
+ // 避免二级组织(谷丰2842/仓码2841等)运营人员被误判为委托方、强制按本人userId过滤导致查不到库存
materialInventoryDO.setOrganizationId(null);
if (loginTopOrgId != null && loginTopOrgId != 1) {
materialInventoryDO.setTopOrganizationId(loginTopOrgId);
}
- if (!isTopOrgUser && materialInventoryDO.getShipperId() == null) {
+ boolean isShipperUser = StringUtils.isNotBlank(loginUser.getUserPo().getShipperEnterpriseName());
+ if (isShipperUser && materialInventoryDO.getShipperId() == null) {
materialInventoryDO.setShipperId(loginUser.getUserPo().getUserId());
}
}
diff --git a/mhd_oms/src/main/resources/mapper/executionStockInOrder/ExecutionStockInOrderMapper.xml b/mhd_oms/src/main/resources/mapper/executionStockInOrder/ExecutionStockInOrderMapper.xml
index 1caf7aa6c..e241f6801 100644
--- a/mhd_oms/src/main/resources/mapper/executionStockInOrder/ExecutionStockInOrderMapper.xml
+++ b/mhd_oms/src/main/resources/mapper/executionStockInOrder/ExecutionStockInOrderMapper.xml
@@ -229,7 +229,12 @@
and a.notice_number = #{noticeNumber}
- and a.in_order_number = #{inOrderNumber}
+ and a.in_order_number like concat('%', #{inOrderNumber}, '%')
+
+
+
+ and (a.business_in_order_number like concat('%', #{businessInOrderNumber}, '%')
+ or a.in_order_number like concat('%', #{businessInOrderNumber}, '%'))
and a.status = #{status}
@@ -451,11 +456,10 @@
and a.RESERVATION_ORDER_SOURCE = #{reservationOrderSource}
+
- and a.BUSINESS_NUMBER = #{businessNumber}
-
-
- and a.create_by_name like concat('%', #{createByName}, '%')
+ and (a.business_in_order_number like concat('%', #{businessNumber}, '%')
+ or a.in_order_number like concat('%', #{businessNumber}, '%'))
and a.storage_time >= #{storageTimeStart}
diff --git a/mhd_oms/src/main/resources/mapper/reservationMaterialInventory/MaterialInventoryMapper.xml b/mhd_oms/src/main/resources/mapper/reservationMaterialInventory/MaterialInventoryMapper.xml
index 63fd13a93..8e11d236b 100644
--- a/mhd_oms/src/main/resources/mapper/reservationMaterialInventory/MaterialInventoryMapper.xml
+++ b/mhd_oms/src/main/resources/mapper/reservationMaterialInventory/MaterialInventoryMapper.xml
@@ -88,15 +88,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
- and b.shipper_id = #{shipperId}
-
-
- and b.shipper_code like concat('%', #{shipperCode}, '%')
-
-
- and b.shipper_name like concat('%', #{shipperName}, '%')
-
and b.material_code = #{materialCode}
@@ -123,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and b.material_type_name like concat('%', #{materialTypeName}, '%')
- and (b.shipper_code like concat('%', #{shipperInfo}, '%') or b.shipper_name like concat('%', #{shipperInfo}, '%'))
+ and (a.shipper_code like concat('%', #{shipperInfo}, '%') or a.shipper_name like concat('%', #{shipperInfo}, '%'))
and (b.material_code = #{materialInfo} or b.material_name like concat('%', #{materialInfo}, '%') or b.bar_code = #{materialInfo})
@@ -175,9 +166,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and a.warehouse_id = #{warehouseId}
+
and a.shipper_id = #{shipperId}
+
+ and a.shipper_code like concat('%', #{shipperCode}, '%')
+
+
+ and a.shipper_name like concat('%', #{shipperName}, '%')
+
and a.warehouse_code = #{warehouseCode}