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"