Commit 7ad56b62 authored by hongguangwu's avatar hongguangwu

档案相关权限-优化

parent 2bf67aba
...@@ -304,7 +304,7 @@ public class TEmployeeInfoController { ...@@ -304,7 +304,7 @@ public class TEmployeeInfoController {
@PostMapping("/exportEmployee") @PostMapping("/exportEmployee")
public void exportEmployee(@RequestBody(required = false) TEmployeeInfo employeeInfo, HttpServletResponse response) { public void exportEmployee(@RequestBody(required = false) TEmployeeInfo employeeInfo, HttpServletResponse response) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (user != null && Common.isEmpty(user.getId())) { if (user != null && Common.isNotNull(user.getId())) {
menuUtil.setAuthSql(user, employeeInfo); menuUtil.setAuthSql(user, employeeInfo);
if (Common.isNotNull(employeeInfo.getAuthSql()) && employeeInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) { if (Common.isNotNull(employeeInfo.getAuthSql()) && employeeInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
employeeInfo.setAuthSql(employeeInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "b.DEPT_ID")); employeeInfo.setAuthSql(employeeInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "b.DEPT_ID"));
...@@ -325,7 +325,7 @@ public class TEmployeeInfoController { ...@@ -325,7 +325,7 @@ public class TEmployeeInfoController {
@PostMapping("/exportLeaveEmployee") @PostMapping("/exportLeaveEmployee")
public void exportLeaveEmployee(@RequestBody(required = false) TEmployeeInfo employeeInfo, HttpServletResponse response) { public void exportLeaveEmployee(@RequestBody(required = false) TEmployeeInfo employeeInfo, HttpServletResponse response) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (user != null && Common.isEmpty(user.getId())) { if (user != null && Common.isNotNull(user.getId())) {
menuUtil.setAuthSql(user, employeeInfo); menuUtil.setAuthSql(user, employeeInfo);
if (Common.isNotNull(employeeInfo.getAuthSql()) && employeeInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) { if (Common.isNotNull(employeeInfo.getAuthSql()) && employeeInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
employeeInfo.setAuthSql(employeeInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "b.DEPT_ID")); employeeInfo.setAuthSql(employeeInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "b.DEPT_ID"));
......
...@@ -264,7 +264,7 @@ public class TEmployeeProjectController { ...@@ -264,7 +264,7 @@ public class TEmployeeProjectController {
public void export(HttpServletResponse response, @RequestParam(name = "idstr", required = false)String idstr, public void export(HttpServletResponse response, @RequestParam(name = "idstr", required = false)String idstr,
@RequestBody List<String> exportFields, EmployeeProjectExportVO projectDTO) { @RequestBody List<String> exportFields, EmployeeProjectExportVO projectDTO) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (user != null && Common.isEmpty(user.getId())) { if (user != null && Common.isNotNull(user.getId())) {
menuUtil.setAuthSql(user, projectDTO); menuUtil.setAuthSql(user, projectDTO);
} }
tEmployeeProjectService.listExportProject(response,projectDTO,idstr,exportFields); tEmployeeProjectService.listExportProject(response,projectDTO,idstr,exportFields);
......
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