From 373229a4165ea1bcf97c25ad10d0813a493ff3d1 Mon Sep 17 00:00:00 2001
From: jiask <1069621233@qq.com>
Date: Tue, 20 Jan 2026 16:29:18 +0800
Subject: [PATCH] =?UTF-8?q?jsk=20=20=E5=87=BA=E5=BA=93=E5=8F=B0=E8=B4=A6?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=20=E5=88=86=E5=85=AC=E5=8F=B8-=E9=A2=86?=
=?UTF-8?q?=E7=94=A8=E5=8D=95=E4=BD=8D-=E5=B7=A5=E7=A8=8B=E5=90=8D?=
=?UTF-8?q?=E7=A7=B0=20=20=E8=BF=87=E6=BB=A4=E6=9D=A1=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../basic/domain/report/LeaseOutInfo.java | 4 +++
.../mapper/material/basic/BmReportMapper.xml | 34 +++++++++++++++++++
.../material/clz/MaterialMachineMapper.xml | 2 +-
.../mapper/material/common/SelectMapper.xml | 2 +-
4 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/report/LeaseOutInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/report/LeaseOutInfo.java
index 855f83a8..06bc8195 100644
--- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/report/LeaseOutInfo.java
+++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/report/LeaseOutInfo.java
@@ -97,4 +97,8 @@ public class LeaseOutInfo {
@ApiModelProperty(value = "用户id")
private Long userId;
+
+ private String leaseUnitId;
+ private String leaseProjectId;
+ private String impUnitName;
}
diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmReportMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmReportMapper.xml
index 8ab3f7f8..221a4b65 100644
--- a/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmReportMapper.xml
+++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmReportMapper.xml
@@ -260,6 +260,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND mtm.user_id = #{userId}
+
+ AND bu.unit_id = #{leaseUnitId}
+
+
+ AND bp.pro_id = #{leaseProjectId}
+
+
+ AND bp.imp_unit in (
+ select dept_id from sys_dept where dept_id=#{impUnitName}
+ union
+ select dept_id from sys_dept where parent_id=#{impUnitName}
+ union
+ select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id=#{impUnitName})
+ union
+ select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id=#{impUnitName}))
+ )
+
@@ -314,6 +331,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND mtm.user_id = #{userId}
+
+ AND bu.unit_id = #{leaseUnitId}
+
+
+ AND bp.pro_id = #{leaseProjectId}
+
+
+ AND bp.imp_unit in (
+ select dept_id from sys_dept where dept_id=#{impUnitName}
+ union
+ select dept_id from sys_dept where parent_id=#{impUnitName}
+ union
+ select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id=#{impUnitName})
+ union
+ select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id in (select dept_id from sys_dept where parent_id=#{impUnitName}))
+ )
+
diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml
index c094b0a4..ad81cfc6 100644
--- a/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml
+++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml
@@ -1629,7 +1629,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"