fix: 分润列表,权限恢复之前模式。

This commit is contained in:
tianyongbao
2026-06-04 11:13:11 +08:00
parent 1e73d7e8ee
commit f463982ebd
3 changed files with 11 additions and 58 deletions

View File

@@ -91,16 +91,6 @@ public class BasicProfitSharingRecordServiceImpl extends ServiceImpl<BasicProfit
}
// 兼容前端params[beginTime]/params[endTime]传参方式
Map<String, Object> params = basicProfitSharingRecord.getParams();
String scopeType = (String) params.get("scopeType");
Long scopeDeptId = (Long) params.get("scopeDeptId");
if (StringUtils.isNotNull(scopeDeptId)) {
if ("deptAndChild".equals(scopeType)) {
queryWrapper.inSql(BasicProfitSharingRecord::getDeptId,
"SELECT dept_id FROM sys_dept WHERE dept_id = " + scopeDeptId + " OR find_in_set(" + scopeDeptId + ", ancestors)");
} else if ("dept".equals(scopeType)) {
queryWrapper.eq(BasicProfitSharingRecord::getDeptId, scopeDeptId);
}
}
String beginTime = (String) params.get("beginTime");
String endTime = (String) params.get("endTime");
if (StringUtils.isNotEmpty(beginTime) && StringUtils.isNotEmpty(endTime)) {

View File

@@ -27,10 +27,7 @@
<if test="userId != null">
AND user_id = #{userId}
</if>
<if test="deptId != null and params.scopeType == 'dept'">
and dept_id = #{deptId}
</if>
<if test="deptId != null and (params.scopeType == null or params.scopeType == 'deptAndChild')">
<if test="deptId != null">
and dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = #{deptId} or find_in_set( #{deptId} , ancestors ))
</if>
</where>