Commit cab64f29 authored by hongguangwu's avatar hongguangwu

1.7.22-权限

parent 93cce868
...@@ -103,4 +103,7 @@ public class ContractAlertSearchVo extends TEmpContractAlert { ...@@ -103,4 +103,7 @@ public class ContractAlertSearchVo extends TEmpContractAlert {
@TableField(exist = false) @TableField(exist = false)
@Schema(description = "前端客服") @Schema(description = "前端客服")
private String customerUserLoginname; private String customerUserLoginname;
@Schema(description = "列表类型 1 待办 2监控 3入职确认信息")
private String type;
} }
...@@ -68,6 +68,7 @@ public class TEmpContractAlertController { ...@@ -68,6 +68,7 @@ public class TEmpContractAlertController {
@Operation(description = "自动化合同续签待办查询") @Operation(description = "自动化合同续签待办查询")
@GetMapping("/autoPage") @GetMapping("/autoPage")
public R<IPage<ContractAlertAutoVo>> getTEmpContractAlertAutoPage(Page<TEmpContractAlert> page, ContractAlertSearchVo tEmpContractAlert) { public R<IPage<ContractAlertAutoVo>> getTEmpContractAlertAutoPage(Page<TEmpContractAlert> page, ContractAlertSearchVo tEmpContractAlert) {
setAuth(tEmpContractAlert);
//默认开启自动化的 //默认开启自动化的
tEmpContractAlert.setAutoFlag(CommonConstants.ZERO_STRING); tEmpContractAlert.setAutoFlag(CommonConstants.ZERO_STRING);
return R.ok(tEmpContractAlertService.getTEmpContractAlertAutoPage(page,tEmpContractAlert)); return R.ok(tEmpContractAlertService.getTEmpContractAlertAutoPage(page,tEmpContractAlert));
...@@ -103,6 +104,7 @@ public class TEmpContractAlertController { ...@@ -103,6 +104,7 @@ public class TEmpContractAlertController {
ContractAlertSearchVo tEmpContractAlert = new ContractAlertSearchVo(); ContractAlertSearchVo tEmpContractAlert = new ContractAlertSearchVo();
//默认开启自动化的 //默认开启自动化的
tEmpContractAlert.setAutoFlag(CommonConstants.ZERO_STRING); tEmpContractAlert.setAutoFlag(CommonConstants.ZERO_STRING);
setAuth(tEmpContractAlert);
return R.ok(tEmpContractAlertService.getTEmpContractAlertAutoCount(tEmpContractAlert)); return R.ok(tEmpContractAlertService.getTEmpContractAlertAutoCount(tEmpContractAlert));
} }
......
...@@ -1110,9 +1110,12 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM ...@@ -1110,9 +1110,12 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
searchVo.setAuthSql(null); searchVo.setAuthSql(null);
return; return;
} }
if (Common.isNotNull(searchVo.getType()) && !CommonConstants.TWO_STRING.equals(searchVo.getType())) {
// 非待办监控,走原逻辑,待办监控,走权限配置
//非管理员及SSC 走前端客服查询逻辑 //非管理员及SSC 走前端客服查询逻辑
searchVo.setCsLoginName(user.getUsername()); searchVo.setCsLoginName(user.getUsername());
} }
}
public boolean haveRole(YifuUser user, long roleId) { public boolean haveRole(YifuUser user, long roleId) {
List<Long> roleList = user.getClientRoleMap().get(ClientNameConstants.CLIENT_MVP); List<Long> roleList = user.getClientRoleMap().get(ClientNameConstants.CLIENT_MVP);
for (Long role : roleList) { for (Long role : roleList) {
......
...@@ -359,6 +359,9 @@ ...@@ -359,6 +359,9 @@
<if test="tEmpContractAlert.autoFlag != null and tEmpContractAlert.autoFlag.trim() != ''"> <if test="tEmpContractAlert.autoFlag != null and tEmpContractAlert.autoFlag.trim() != ''">
AND a.AUTO_FLAG = #{tEmpContractAlert.autoFlag} AND a.AUTO_FLAG = #{tEmpContractAlert.autoFlag}
</if> </if>
<if test="tEmpContractAlert.authSql != null and tEmpContractAlert.authSql.trim() != ''">
${tEmpContractAlert.authSql}
</if>
</if> </if>
</sql> </sql>
<!--tEmpContractAlert简单分页查询--> <!--tEmpContractAlert简单分页查询-->
......
...@@ -24,8 +24,8 @@ import com.yifu.cloud.plus.v1.csp.service.EmployeeRegistrationLeaveService; ...@@ -24,8 +24,8 @@ import com.yifu.cloud.plus.v1.csp.service.EmployeeRegistrationLeaveService;
import com.yifu.cloud.plus.v1.csp.vo.BatchSureLeaveVo; import com.yifu.cloud.plus.v1.csp.vo.BatchSureLeaveVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveSearchVo; import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveSearchVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveTableVo; import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveTableVo;
import com.yifu.cloud.plus.v1.csp.vo.ErrorInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; 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.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
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.BaseServiceParamListVO; import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseServiceParamListVO;
...@@ -161,6 +161,9 @@ public class EmployeeRegistrationLeaveController { ...@@ -161,6 +161,9 @@ public class EmployeeRegistrationLeaveController {
private void setLeaveBaseAuth(EmployeeRegistrationLeaveSearchVo searchVo) { private void setLeaveBaseAuth(EmployeeRegistrationLeaveSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo); menuUtil.setAuthSql(user, searchVo);
if (Common.isNotNull(searchVo.getAuthSql()) && searchVo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
searchVo.setAuthSql(searchVo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "b.dept_id"));
}
} }
/** /**
......
...@@ -372,6 +372,10 @@ ...@@ -372,6 +372,10 @@
AND a.emp_project_id = #{employeeRegistrationLeave.empProjectId} AND a.emp_project_id = #{employeeRegistrationLeave.empProjectId}
</if> </if>
<if test="employeeRegistrationLeave.authSql != null and employeeRegistrationLeave.authSql.trim() != ''">
${employeeRegistrationLeave.authSql}
</if>
</if> </if>
</sql> </sql>
......
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