Commit c6201f86 authored by zhaji's avatar zhaji

Merge branch 'develop' into feature-zhaji

parents 97f1b6c6 7ad56b62
......@@ -83,7 +83,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.getPage(page, tEmployeeInfo));
}
......@@ -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));
}
......@@ -304,10 +304,10 @@ public class TEmployeeInfoController {
@PostMapping("/exportEmployee")
public void exportEmployee(@RequestBody(required = false) TEmployeeInfo employeeInfo, HttpServletResponse response) {
YifuUser user = SecurityUtils.getUser();
if (user != null && Common.isEmpty(user.getId())) {
if (user != null && Common.isNotNull(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);
......@@ -325,10 +325,10 @@ public class TEmployeeInfoController {
@PostMapping("/exportLeaveEmployee")
public void exportLeaveEmployee(@RequestBody(required = false) TEmployeeInfo employeeInfo, HttpServletResponse response) {
YifuUser user = SecurityUtils.getUser();
if (user != null && Common.isEmpty(user.getId())) {
if (user != null && Common.isNotNull(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);
......
......@@ -264,7 +264,7 @@ public class TEmployeeProjectController {
public void export(HttpServletResponse response, @RequestParam(name = "idstr", required = false)String idstr,
@RequestBody List<String> exportFields, EmployeeProjectExportVO projectDTO) {
YifuUser user = SecurityUtils.getUser();
if (user != null && Common.isEmpty(user.getId())) {
if (user != null && Common.isNotNull(user.getId())) {
menuUtil.setAuthSql(user, projectDTO);
}
tEmployeeProjectService.listExportProject(response,projectDTO,idstr,exportFields);
......
......@@ -109,7 +109,7 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
}
// 数据合法情况
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 @@
select
<include refid="baseParam"/>
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
</if>
where a.DELETE_FLAG = '0'
......
......@@ -86,7 +86,7 @@ public class MenuUtil {
, daprArchivesProperties.getAppId(),"/tsettledomain/getSettleDomainIdsByUserId"
, user.getId(), TSettleDomainListVo.class, SecurityConstants.FROM_IN);
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().getDeptIds().isEmpty()) {
for (String deptId : res.getData().getDeptIds()) {
......
......@@ -40,10 +40,10 @@ public class THaveSalaryNoSocialExportVo implements Serializable {
/**
* 员工名称
*/
@Length(max = 32, message = "员工名称不能超过32个字符")
@ExcelAttribute(name = "员工名称", maxLength = 32,needExport=true)
@Schema(description = "员工名称", name = "employeeName")
@ExcelProperty(value = "员工名称")
@Length(max = 32, message = "员工姓名不能超过32个字符")
@ExcelAttribute(name = "员工姓名", maxLength = 32,needExport=true)
@Schema(description = "员工姓名", name = "员工姓名")
@ExcelProperty(value = "员工姓名")
private String employeeName;
/**
* 身份证号
......
......@@ -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));
}
......
package com.yifu.cloud.plus.v1.yifu.social.vo;
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 io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -36,8 +37,8 @@ public class FundHandleExportVo implements Serializable {
/**
* 员工身份证
*/
@ExcelAttribute(name = "员工身份证", errorInfo = "员工身份证不能为空", maxLength = 20,needExport = true)
@ExcelProperty("员工身份证" )
@ExcelAttribute(name = "身份证号", errorInfo = "身份证号不能为空", maxLength = 20,needExport = true)
@ExcelProperty("身份证号" )
private String empIdcard;
/**
* 所属单位
......@@ -89,6 +90,7 @@ public class FundHandleExportVo implements Serializable {
/**
* 公积金起缴日期
*/
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "公积金起缴日期", errorInfo = "公积金起缴日期不能为空",needExport = true)
@ExcelProperty("公积金起缴日期" )
private LocalDateTime providentStart;
......
......@@ -303,7 +303,7 @@ public class UserController {
@Inner
@PostMapping(value = {"/inner/getUserIdByDeptIds"})
public String getUserIdByDeptIds(@RequestBody String deptIds) {
StringBuilder userIds = new StringBuilder("0");
StringBuilder userIds = new StringBuilder("'0'");
if (Common.isNotNull(deptIds)) {
List<SysUser> sysUsers = userService.list(Wrappers.<SysUser>query().lambda().in(SysUser::getDeptId, deptIds));
if (Common.isNotEmpty(sysUsers)){
......
......@@ -108,13 +108,13 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
// 处理权限部门
if (sysDataAuth.getIsDeptAuth() == 1 || 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) {
sql.append(", '").append(dept.getDeptId()).append("'");
}
sql.append("end)");
} else {
sql.append(" or a.create_user in (#deptId) ");
sql.append(" or a.CREATE_BY in (#deptId) ");
}
for (SysDataAuthMenuRel menu : menuDeptList) {
authSqlMap.put(linkId + CommonConstants.DOWN_LINE_STRING + menu.getMenuId(), sql.toString());
......@@ -314,7 +314,7 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
if (menuDeptList == null || menuDeptList.isEmpty()) {
return R.failed("请选择部门关联的菜单!");
} 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) {
sql.append(", '").append(dept.getDeptId()).append("'");
dept.setSysDataAuthId(mainId);
......@@ -322,7 +322,7 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
sql.append("end)");
authDeptRelService.saveOrUpdateBatch(authDeptList);
} else {
sql.append(" or a.create_user in (#deptId) ");
sql.append(" or a.CREATE_BY in (#deptId) ");
}
for (SysDataAuthMenuRel menu : menuDeptList) {
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