Commit 652607c8 authored by hongguangwu's avatar hongguangwu

档案相关权限-优化

parent cd1e1717
......@@ -107,7 +107,7 @@ public class TEmployeeInfoController {
}
menuUtil.setAuthSql(user, tEmployeeInfo);
if (Common.isNotNull(tEmployeeInfo.getAuthSql()) && tEmployeeInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
tEmployeeInfo.setAuthSql(tEmployeeInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "b.id"));
tEmployeeInfo.setAuthSql(tEmployeeInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "b.DEPT_ID"));
}
return R.ok(tEmployeeInfoService.getLeavePage(page, tEmployeeInfo));
}
......@@ -307,7 +307,7 @@ public class TEmployeeInfoController {
if (user != null && Common.isEmpty(user.getId())) {
menuUtil.setAuthSql(user, employeeInfo);
if (Common.isNotNull(employeeInfo.getAuthSql()) && employeeInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
employeeInfo.setAuthSql(employeeInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "b.id"));
employeeInfo.setAuthSql(employeeInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "b.DEPT_ID"));
}
}
tEmployeeInfoService.exportEmployee(employeeInfo, response);
......@@ -328,7 +328,7 @@ public class TEmployeeInfoController {
if (user != null && Common.isEmpty(user.getId())) {
menuUtil.setAuthSql(user, employeeInfo);
if (Common.isNotNull(employeeInfo.getAuthSql()) && employeeInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
employeeInfo.setAuthSql(employeeInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "b.id"));
employeeInfo.setAuthSql(employeeInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "b.DEPT_ID"));
}
}
tEmployeeInfoService.exportLeaveEmployee(employeeInfo, response);
......
......@@ -23,6 +23,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard;
......@@ -52,7 +53,7 @@ import java.util.Date;
public class TSalaryStandardController {
private final TSalaryStandardService tSalaryStandardService;
private final MenuUtil menuUtil;
/**
* 简单分页查询-申请
*
......@@ -64,6 +65,8 @@ public class TSalaryStandardController {
@GetMapping("/pageApply")
public R<IPage<TSalaryStandard>> getTSalaryStandardPageApply(Page<TSalaryStandard> page, TSalaryStandardSearchVo tSalaryStandard) {
tSalaryStandard.setDeleteFlag(CommonConstants.ZERO_INT);
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tSalaryStandard);
return new R<>(tSalaryStandardService.getTSalaryStandardPageApply(page, tSalaryStandard));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment