Commit c6201f86 authored by zhaji's avatar zhaji

Merge branch 'develop' into feature-zhaji

parents 97f1b6c6 7ad56b62
...@@ -83,7 +83,7 @@ public class TEmployeeInfoController { ...@@ -83,7 +83,7 @@ public class TEmployeeInfoController {
} }
menuUtil.setAuthSql(user, tEmployeeInfo); menuUtil.setAuthSql(user, tEmployeeInfo);
if (Common.isNotNull(tEmployeeInfo.getAuthSql()) && tEmployeeInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) { 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.getPage(page, tEmployeeInfo)); return R.ok(tEmployeeInfoService.getPage(page, tEmployeeInfo));
} }
...@@ -107,7 +107,7 @@ public class TEmployeeInfoController { ...@@ -107,7 +107,7 @@ public class TEmployeeInfoController {
} }
menuUtil.setAuthSql(user, tEmployeeInfo); menuUtil.setAuthSql(user, tEmployeeInfo);
if (Common.isNotNull(tEmployeeInfo.getAuthSql()) && tEmployeeInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) { 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)); return R.ok(tEmployeeInfoService.getLeavePage(page, tEmployeeInfo));
} }
...@@ -304,10 +304,10 @@ public class TEmployeeInfoController { ...@@ -304,10 +304,10 @@ 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.id")); employeeInfo.setAuthSql(employeeInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "b.DEPT_ID"));
} }
} }
tEmployeeInfoService.exportEmployee(employeeInfo, response); tEmployeeInfoService.exportEmployee(employeeInfo, response);
...@@ -325,10 +325,10 @@ public class TEmployeeInfoController { ...@@ -325,10 +325,10 @@ 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.id")); employeeInfo.setAuthSql(employeeInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "b.DEPT_ID"));
} }
} }
tEmployeeInfoService.exportLeaveEmployee(employeeInfo, response); tEmployeeInfoService.exportLeaveEmployee(employeeInfo, response);
......
...@@ -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);
......
...@@ -109,7 +109,7 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T ...@@ -109,7 +109,7 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
} }
// 数据合法情况 // 数据合法情况
insertExcel(excel,emp); insertExcel(excel,emp);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS,CommonConstants.GREEN));
} }
} }
......
...@@ -491,7 +491,7 @@ ...@@ -491,7 +491,7 @@
select select
<include refid="baseParam"/> <include refid="baseParam"/>
from t_employee_info a from t_employee_info a
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.contains('b.id') "> <if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.contains('b.DEPT_ID') ">
left join t_employee_project b on a.id=b.EMP_ID left join t_employee_project b on a.id=b.EMP_ID
</if> </if>
where a.DELETE_FLAG = '0' where a.DELETE_FLAG = '0'
......
...@@ -86,7 +86,7 @@ public class MenuUtil { ...@@ -86,7 +86,7 @@ public class MenuUtil {
, daprArchivesProperties.getAppId(),"/tsettledomain/getSettleDomainIdsByUserId" , daprArchivesProperties.getAppId(),"/tsettledomain/getSettleDomainIdsByUserId"
, user.getId(), TSettleDomainListVo.class, SecurityConstants.FROM_IN); , user.getId(), TSettleDomainListVo.class, SecurityConstants.FROM_IN);
StringBuilder deptStr = new StringBuilder(); StringBuilder deptStr = new StringBuilder();
if (res != null && CommonConstants.SUCCESS != res.getCode() if (res != null && CommonConstants.SUCCESS == res.getCode()
&& res.getData() != null && res.getData().getDeptIds() != null && res.getData() != null && res.getData().getDeptIds() != null
&& !res.getData().getDeptIds().isEmpty()) { && !res.getData().getDeptIds().isEmpty()) {
for (String deptId : res.getData().getDeptIds()) { for (String deptId : res.getData().getDeptIds()) {
......
...@@ -40,10 +40,10 @@ public class THaveSalaryNoSocialExportVo implements Serializable { ...@@ -40,10 +40,10 @@ public class THaveSalaryNoSocialExportVo implements Serializable {
/** /**
* 员工名称 * 员工名称
*/ */
@Length(max = 32, message = "员工名称不能超过32个字符") @Length(max = 32, message = "员工姓名不能超过32个字符")
@ExcelAttribute(name = "员工名称", maxLength = 32,needExport=true) @ExcelAttribute(name = "员工姓名", maxLength = 32,needExport=true)
@Schema(description = "员工名称", name = "employeeName") @Schema(description = "员工姓名", name = "员工姓名")
@ExcelProperty(value = "员工名称") @ExcelProperty(value = "员工姓名")
private String employeeName; private String employeeName;
/** /**
* 身份证号 * 身份证号
......
...@@ -23,6 +23,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; ...@@ -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.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; 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.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.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard;
...@@ -52,7 +53,7 @@ import java.util.Date; ...@@ -52,7 +53,7 @@ import java.util.Date;
public class TSalaryStandardController { public class TSalaryStandardController {
private final TSalaryStandardService tSalaryStandardService; private final TSalaryStandardService tSalaryStandardService;
private final MenuUtil menuUtil;
/** /**
* 简单分页查询-申请 * 简单分页查询-申请
* *
...@@ -64,6 +65,8 @@ public class TSalaryStandardController { ...@@ -64,6 +65,8 @@ public class TSalaryStandardController {
@GetMapping("/pageApply") @GetMapping("/pageApply")
public R<IPage<TSalaryStandard>> getTSalaryStandardPageApply(Page<TSalaryStandard> page, TSalaryStandardSearchVo tSalaryStandard) { public R<IPage<TSalaryStandard>> getTSalaryStandardPageApply(Page<TSalaryStandard> page, TSalaryStandardSearchVo tSalaryStandard) {
tSalaryStandard.setDeleteFlag(CommonConstants.ZERO_INT); tSalaryStandard.setDeleteFlag(CommonConstants.ZERO_INT);
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tSalaryStandard);
return new R<>(tSalaryStandardService.getTSalaryStandardPageApply(page, tSalaryStandard)); return new R<>(tSalaryStandardService.getTSalaryStandardPageApply(page, tSalaryStandard));
} }
......
package com.yifu.cloud.plus.v1.yifu.social.vo; package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
...@@ -36,8 +37,8 @@ public class FundHandleExportVo implements Serializable { ...@@ -36,8 +37,8 @@ public class FundHandleExportVo implements Serializable {
/** /**
* 员工身份证 * 员工身份证
*/ */
@ExcelAttribute(name = "员工身份证", errorInfo = "员工身份证不能为空", maxLength = 20,needExport = true) @ExcelAttribute(name = "身份证号", errorInfo = "身份证号不能为空", maxLength = 20,needExport = true)
@ExcelProperty("员工身份证" ) @ExcelProperty("身份证号" )
private String empIdcard; private String empIdcard;
/** /**
* 所属单位 * 所属单位
...@@ -89,6 +90,7 @@ public class FundHandleExportVo implements Serializable { ...@@ -89,6 +90,7 @@ public class FundHandleExportVo implements Serializable {
/** /**
* 公积金起缴日期 * 公积金起缴日期
*/ */
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "公积金起缴日期", errorInfo = "公积金起缴日期不能为空",needExport = true) @ExcelAttribute(name = "公积金起缴日期", errorInfo = "公积金起缴日期不能为空",needExport = true)
@ExcelProperty("公积金起缴日期" ) @ExcelProperty("公积金起缴日期" )
private LocalDateTime providentStart; private LocalDateTime providentStart;
......
...@@ -303,7 +303,7 @@ public class UserController { ...@@ -303,7 +303,7 @@ public class UserController {
@Inner @Inner
@PostMapping(value = {"/inner/getUserIdByDeptIds"}) @PostMapping(value = {"/inner/getUserIdByDeptIds"})
public String getUserIdByDeptIds(@RequestBody String deptIds) { public String getUserIdByDeptIds(@RequestBody String deptIds) {
StringBuilder userIds = new StringBuilder("0"); StringBuilder userIds = new StringBuilder("'0'");
if (Common.isNotNull(deptIds)) { if (Common.isNotNull(deptIds)) {
List<SysUser> sysUsers = userService.list(Wrappers.<SysUser>query().lambda().in(SysUser::getDeptId, deptIds)); List<SysUser> sysUsers = userService.list(Wrappers.<SysUser>query().lambda().in(SysUser::getDeptId, deptIds));
if (Common.isNotEmpty(sysUsers)){ if (Common.isNotEmpty(sysUsers)){
......
...@@ -108,13 +108,13 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa ...@@ -108,13 +108,13 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
// 处理权限部门 // 处理权限部门
if (sysDataAuth.getIsDeptAuth() == 1 || sysDataAuth.getIsDeptAuth() == 2) { if (sysDataAuth.getIsDeptAuth() == 1 || sysDataAuth.getIsDeptAuth() == 2) {
if (sysDataAuth.getIsDeptAuth() == 2) { if (sysDataAuth.getIsDeptAuth() == 2) {
sql.append(" or a.create_user in (start'0' "); sql.append(" or a.CREATE_BY in (start'0' ");
for (SysDataAuthDeptRel dept : authDeptList) { for (SysDataAuthDeptRel dept : authDeptList) {
sql.append(", '").append(dept.getDeptId()).append("'"); sql.append(", '").append(dept.getDeptId()).append("'");
} }
sql.append("end)"); sql.append("end)");
} else { } else {
sql.append(" or a.create_user in (#deptId) "); sql.append(" or a.CREATE_BY in (#deptId) ");
} }
for (SysDataAuthMenuRel menu : menuDeptList) { for (SysDataAuthMenuRel menu : menuDeptList) {
authSqlMap.put(linkId + CommonConstants.DOWN_LINE_STRING + menu.getMenuId(), sql.toString()); authSqlMap.put(linkId + CommonConstants.DOWN_LINE_STRING + menu.getMenuId(), sql.toString());
...@@ -314,7 +314,7 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa ...@@ -314,7 +314,7 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
if (menuDeptList == null || menuDeptList.isEmpty()) { if (menuDeptList == null || menuDeptList.isEmpty()) {
return R.failed("请选择部门关联的菜单!"); return R.failed("请选择部门关联的菜单!");
} else if (sysDataAuth.getIsDeptAuth() == 2) { } else if (sysDataAuth.getIsDeptAuth() == 2) {
sql.append(" or a.create_user in (start'0' "); sql.append(" or a.CREATE_BY in (start'0' ");
for (SysDataAuthDeptRel dept : authDeptList) { for (SysDataAuthDeptRel dept : authDeptList) {
sql.append(", '").append(dept.getDeptId()).append("'"); sql.append(", '").append(dept.getDeptId()).append("'");
dept.setSysDataAuthId(mainId); dept.setSysDataAuthId(mainId);
...@@ -322,7 +322,7 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa ...@@ -322,7 +322,7 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
sql.append("end)"); sql.append("end)");
authDeptRelService.saveOrUpdateBatch(authDeptList); authDeptRelService.saveOrUpdateBatch(authDeptList);
} else { } else {
sql.append(" or a.create_user in (#deptId) "); sql.append(" or a.CREATE_BY in (#deptId) ");
} }
for (SysDataAuthMenuRel menu : menuDeptList) { for (SysDataAuthMenuRel menu : menuDeptList) {
authSqlMap.put(linkId + CommonConstants.DOWN_LINE_STRING + menu.getMenuId(), sql.toString()); authSqlMap.put(linkId + CommonConstants.DOWN_LINE_STRING + menu.getMenuId(), sql.toString());
......
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