fix: 分润列表,权限恢复之前模式。
This commit is contained in:
@@ -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)) {
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user