Commit bb72e948 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/develop' into develop

parents 4e7f54a3 4fd22658
......@@ -41,6 +41,9 @@ public class MenuUtil {
// 菜单id
String menuId = entity.getMId();
if (Common.isEmpty(menuId)) {
menuId = entity.getMenuInfo();
}
if (Common.isNotNull(menuId)) {
String linkId = user.getId();
int linkType = 1; // 用户
......
......@@ -64,13 +64,21 @@ public class BaseEntity implements Serializable {
@TableField(fill = FieldFill.INSERT_UPDATE)
@ExcelIgnore
private LocalDateTime updateTime;
/**
* 菜单ID 获取查询权限使用
*/
@ExcelIgnore
@TableField(exist = false)
@ExcelIgnore
private String mId;
/**
* 菜单ID 获取导出权限使用
*/
@TableField(exist = false)
@ExcelIgnore
private String menuInfo;
/**
* 权限sql
*/
......
......@@ -2,10 +2,15 @@ package com.yifu.cloud.plus.v1.yifu.salary.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.DateUtil;
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.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary;
import com.yifu.cloud.plus.v1.yifu.salary.service.SysMessageSalaryService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalarySearchVo;
......@@ -31,7 +36,7 @@ import javax.servlet.http.HttpServletResponse;
public class SysMessageSalaryController {
private final SysMessageSalaryService sysMessageSalaryService;
private final MenuUtil menuUtil;
/**
* 简单分页查询
* @param page 分页对象
......@@ -41,6 +46,11 @@ public class SysMessageSalaryController {
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<SysMessageSalary>> getSysMessageSalaryPage(Page<SysMessageSalary> page, SysMessageSalary sysMessageSalary) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, sysMessageSalary);
if (Common.isNotNull(sysMessageSalary.getAuthSql()) && sysMessageSalary.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
sysMessageSalary.setAuthSql(sysMessageSalary.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.DEPART_ID"));
}
return new R<>(sysMessageSalaryService.getSysMessageSalaryPage(page, sysMessageSalary));
}
......@@ -115,6 +125,11 @@ public class SysMessageSalaryController {
@PostMapping("/export")
public void export(HttpServletResponse response,
@RequestBody SysMessageSalarySearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
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, "a.DEPART_ID"));
}
sysMessageSalaryService.listExport(response,searchVo);
}
......
......@@ -4,8 +4,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.TConfigSalary;
import com.yifu.cloud.plus.v1.yifu.salary.service.TConfigSalaryService;
import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants;
......@@ -33,7 +38,7 @@ import java.util.List;
public class TConfigSalaryController {
private final TConfigSalaryService tConfigSalaryService;
private final MenuUtil menuUtil;
/**
* @param settleDepart 结算主体id
* @Description: 获取结算主体下的配置信息
......@@ -64,6 +69,11 @@ public class TConfigSalaryController {
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TConfigSalary>> getTConfigSalaryPage(Page<TConfigSalary> page, TConfigSalary tConfigSalary) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tConfigSalary);
if (Common.isNotNull(tConfigSalary.getAuthSql()) && tConfigSalary.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
tConfigSalary.setAuthSql(tConfigSalary.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.DEPART_ID"));
}
return tConfigSalaryService.getTConfigSalaryPage(page, tConfigSalary);
}
......
......@@ -20,8 +20,13 @@ package com.yifu.cloud.plus.v1.yifu.salary.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.TDeptSee;
import com.yifu.cloud.plus.v1.yifu.salary.service.TDeptSeeService;
import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants;
......@@ -49,7 +54,7 @@ public class TDeptSeeController {
private final TDeptSeeService tDeptSeeService;
private final MenuUtil menuUtil;
/**
* 简单分页查询
*
......@@ -60,6 +65,11 @@ public class TDeptSeeController {
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TDeptSee>> getTDeptSeePage(Page<TDeptSee> page, TDeptSeeSearchVo tDeptSee) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tDeptSee);
if (Common.isNotNull(tDeptSee.getAuthSql()) && tDeptSee.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
tDeptSee.setAuthSql(tDeptSee.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.ID"));
}
return new R<>(tDeptSeeService.getTDeptSeePage(page, tDeptSee));
}
......
......@@ -2,10 +2,15 @@ package com.yifu.cloud.plus.v1.yifu.salary.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.DateUtil;
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.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.service.THaveSalaryNosocialService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialSearchVo;
......@@ -35,7 +40,7 @@ import javax.validation.Valid;
public class THaveSalaryNosocialController {
private final THaveSalaryNosocialService tHaveSalaryNosocialService;
private final MenuUtil menuUtil;
/**
* 简单分页查询
*
......@@ -46,6 +51,11 @@ public class THaveSalaryNosocialController {
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<THaveSalaryNosocial>> getTHaveSalaryNosocialPage(Page<THaveSalaryNosocial> page, THaveSalaryNosocial tHaveSalaryNosocial) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tHaveSalaryNosocial);
if (Common.isNotNull(tHaveSalaryNosocial.getAuthSql()) && tHaveSalaryNosocial.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
tHaveSalaryNosocial.setAuthSql(tHaveSalaryNosocial.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN_ID"));
}
return new R<>(tHaveSalaryNosocialService.getTHaveSalaryNosocialPage(page, tHaveSalaryNosocial));
}
......@@ -129,6 +139,11 @@ public class THaveSalaryNosocialController {
@PostMapping("/export")
public void export(HttpServletResponse response,
@RequestBody THaveSalaryNosocialSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
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, "a.SETTLE_DOMAIN_ID"));
}
tHaveSalaryNosocialService.listExport(response,searchVo);
}
......
......@@ -23,8 +23,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
......@@ -61,6 +64,7 @@ public class TSalaryAccountController {
private final TSalaryAccountItemService tSalaryAccountItemService;
private final MenuUtil menuUtil;
/**
* 简单分页查询
......@@ -73,6 +77,8 @@ public class TSalaryAccountController {
@GetMapping("/page")
public R<IPage<TSalaryAccount>> getTSalaryAccountPage(Page<TSalaryAccount> page, TSalaryAccountSearchVo tSalaryAccount) {
tSalaryAccount.setDeleteFlag(CommonConstants.ZERO_INT);
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tSalaryAccount);
return new R<>(tSalaryAccountService.getTSalaryAccountPage(page, tSalaryAccount));
}
......@@ -153,6 +159,8 @@ public class TSalaryAccountController {
@PostMapping("/export")
@PreAuthorize("@pms.hasPermission('salary_tsalaryaccount-export')")
public void export(HttpServletResponse response, @RequestBody TSalaryAccountSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
tSalaryAccountService.listExport(response, searchVo);
}
......
......@@ -19,8 +19,13 @@ package com.yifu.cloud.plus.v1.yifu.salary.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryEmployeeService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo;
......@@ -49,6 +54,7 @@ public class TSalaryEmployeeController {
private final TSalaryEmployeeService tSalaryEmployeeService;
private final MenuUtil menuUtil;
/**
* 简单分页查询
......@@ -60,6 +66,11 @@ public class TSalaryEmployeeController {
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TSalaryEmployee>> getTSalaryEmployeePage(Page<TSalaryEmployee> page, TSalaryEmployeeSearchVo tSalaryEmployee) {
YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) {
return R.failed(CommonConstants.PLEASE_LOG_IN);
}
menuUtil.setAuthSql(user, tSalaryEmployee);
return new R<>(tSalaryEmployeeService.getTSalaryEmployeePage(page, tSalaryEmployee));
}
......@@ -140,6 +151,10 @@ public class TSalaryEmployeeController {
@PostMapping("/export")
@PreAuthorize("@pms.hasPermission('salary_tsalaryemployee-export')")
public void export(HttpServletResponse response, @RequestBody TSalaryEmployeeSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
if (user != null && Common.isNotNull(user.getId())) {
menuUtil.setAuthSql(user, searchVo);
}
tSalaryEmployeeService.listExport(response, searchVo);
}
}
......@@ -80,7 +80,9 @@ public class TSalaryStandardController {
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TSalaryStandard>> getTSalaryStandardPage(Page<TSalaryStandard> page, TSalaryStandardSearchVo tSalaryStandard) {
YifuUser user = SecurityUtils.getUser();
tSalaryStandard.setDeleteFlag(CommonConstants.ZERO_INT);
menuUtil.setAuthSql(user, tSalaryStandard);
return new R<>(tSalaryStandardService.getTSalaryStandardPage(page, tSalaryStandard));
}
......@@ -134,6 +136,10 @@ public class TSalaryStandardController {
@PostMapping("/export")
//@PreAuthorize("@pms.hasPermission('salary_tsalarystandard-export')")
public void export(HttpServletResponse response, @RequestBody TSalaryStandardSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
if (user != null && Common.isNotNull(user.getId())) {
menuUtil.setAuthSql(user, searchVo);
}
tSalaryStandardService.listExport(response, searchVo);
}
......
......@@ -33,6 +33,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.check.entity.TCheckBankNo;
import com.yifu.cloud.plus.v1.check.entity.TCheckMobile;
import com.yifu.cloud.plus.v1.check.vo.CheckBankNoVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCertRecord;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
......@@ -159,11 +160,15 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
if (Common.isNotNull(idList)) {
wrapper.in(TSalaryEmployee::getId, idList);
}
if (Common.isNotNull(searchVo.getAuthSql())) {
wrapper.last(searchVo.getAuthSql());
}
return baseMapper.selectCount(wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(TSalaryEmployeeSearchVo entity) {
LambdaQueryWrapper<TSalaryEmployee> wrapper = Wrappers.lambdaQuery();
wrapper.ne(TSalaryEmployee::getId,CommonConstants.ZERO_STRING);
if (ArrayUtil.isNotEmpty(entity.getCreateTimes())) {
wrapper.ge(TSalaryEmployee::getCreateTime, entity.getCreateTimes()[0])
.le(TSalaryEmployee::getCreateTime,
......
......@@ -130,8 +130,11 @@
FROM sys_message_salary a
left join t_feed_back b on a.ID=b.RELATE_ID
<where>
<include refid="sysMessageSalarySql"/>
<include refid="sysMessageSalary_where"/>
<include refid="sysMessageSalarySql"/>
<include refid="sysMessageSalary_where"/>
<if test="sysMessageSalary.authSql != null and sysMessageSalary.authSql.trim() != ''">
${sysMessageSalary.authSql}
</if>
order by a.CREATE_TIME desc
</where>
</select>
......@@ -300,6 +303,9 @@
1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=2) or (b.id is null))
<include refid="export_sql"/>
<if test="sysMessageSalary != null">
<if test="sysMessageSalary.authSql != null and sysMessageSalary.authSql.trim() != ''">
${sysMessageSalary.authSql}
</if>
<if test="sysMessageSalary.limitStart != null">
limit #{sysMessageSalary.limitStart},#{sysMessageSalary.limitEnd}
</if>
......@@ -316,6 +322,9 @@
<where>
1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=2) or (b.id is null))
<include refid="export_sql"/>
<if test="sysMessageSalary.authSql != null and sysMessageSalary.authSql.trim() != ''">
${sysMessageSalary.authSql}
</if>
</where>
</select>
<sql id="export_sql">
......
......@@ -75,6 +75,9 @@
#{param}
</foreach>
</if>
<if test="tConfigSalary.authSql != null and tConfigSalary.authSql.trim() != ''">
${tConfigSalary.authSql}
</if>
</where>
order by CREATE_TIME DESC
</select>
......
......@@ -84,6 +84,9 @@
<where>
1=1
<include refid="tDeptSee_where"/>
<if test="tDeptSee.authSql != null and tDeptSee.authSql.trim() != ''">
${tDeptSee.authSql}
</if>
order by a.CREATE_TIME DESC
</where>
</select>
......
......@@ -156,6 +156,9 @@
AND b.REASON_TYPE = #{tHaveSalaryNosocial.reasonType}
</if>
<include refid="tHaveSalaryNosocial_where"/>
<if test="tHaveSalaryNosocial.authSql != null and tHaveSalaryNosocial.authSql.trim() != ''">
${tHaveSalaryNosocial.authSql}
</if>
</where>
</select>
......@@ -166,6 +169,9 @@
<where>
1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=1) or (b.id is null))
<include refid="tHaveSalaryNosocial_where"/>
<if test="tHaveSalaryNosocial.authSql != null and tHaveSalaryNosocial.authSql.trim() != ''">
${tHaveSalaryNosocial.authSql}
</if>
<!--数据权限判断-->
<if test="settleDomainVos != null">
<if test="settleDomainVos.size() > 0">
......@@ -219,6 +225,9 @@
1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=1) or (b.id is null))
<include refid="export_where"/>
<if test="tHaveSalaryNosocial != null">
<if test="tHaveSalaryNosocial.authSql != null and tHaveSalaryNosocial.authSql.trim() != ''">
${tHaveSalaryNosocial.authSql}
</if>
<if test="tHaveSalaryNosocial.limitStart != null">
limit #{tHaveSalaryNosocial.limitStart},#{tHaveSalaryNosocial.limitEnd}
</if>
......@@ -233,6 +242,9 @@
<where>
1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=1) or (b.id is null))
<include refid="export_where"/>
<if test="tHaveSalaryNosocial.authSql != null and tHaveSalaryNosocial.authSql.trim() != ''">
${tHaveSalaryNosocial.authSql}
</if>
</where>
</select>
<sql id="export_where">
......
......@@ -352,6 +352,9 @@
<where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
<include refid="tSalaryAccount_where"/>
<if test="tSalaryAccount.authSql != null and tSalaryAccount.authSql.trim() != ''">
${tSalaryAccount.authSql}
</if>
</where>
order by a.CREATE_TIME desc
</select>
......@@ -546,6 +549,9 @@
<where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
<include refid="where_export"/>
<if test="searchVo.authSql != null and searchVo.authSql.trim() != ''">
${searchVo.authSql}
</if>
ORDER BY a.CREATE_TIME desc
<if test="searchVo != null">
<if test="searchVo.limitStart != null">
......@@ -582,6 +588,9 @@
<where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
<include refid="where_export"/>
<if test="searchVo.authSql != null and searchVo.authSql.trim() != ''">
${searchVo.authSql}
</if>
</where>
</select>
<sql id="where_export">
......
......@@ -184,6 +184,9 @@
<where>
1=1
<include refid="where_export"/>
<if test="tSalaryEmployee.authSql != null and tSalaryEmployee.authSql.trim() != ''">
${tSalaryEmployee.authSql}
</if>
ORDER BY a.CREATE_TIME DESC
</where>
<if test="tSalaryEmployee != null">
......
......@@ -269,6 +269,9 @@
<!-- 薪资是否可查看 0 是 1否-->
and (d.CAN_SEE = 0 OR d.id is null)
<include refid="tSalaryStandard_where"/>
<if test="tSalaryStandard.authSql != null and tSalaryStandard.authSql.trim() != ''">
${tSalaryStandard.authSql}
</if>
</where>
ORDER BY a.CREATE_TIME desc
</select>
......@@ -347,6 +350,9 @@
<where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
<include refid="where_export"/>
<if test="searchVo.authSql != null and searchVo.authSql.trim() != ''">
${searchVo.authSql}
</if>
ORDER BY a.CREATE_TIME desc
<if test="searchVo != null">
<if test="searchVo.limitStart != null">
......@@ -364,6 +370,9 @@
<where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
<include refid="where_export"/>
<if test="searchVo.authSql != null and searchVo.authSql.trim() != ''">
${searchVo.authSql}
</if>
</where>
</select>
<sql id="where_page">
......
......@@ -331,7 +331,8 @@ public class UserController {
public String getUserIdByDeptIds(@RequestBody String deptIds) {
StringBuilder userIds = new StringBuilder("'0'");
if (Common.isNotNull(deptIds)) {
List<SysUser> sysUsers = userService.list(Wrappers.<SysUser>query().lambda().in(SysUser::getDeptId, deptIds));
List<String> list = Common.initStrToList(deptIds, ",");
List<SysUser> sysUsers = userService.list(Wrappers.<SysUser>query().lambda().in(SysUser::getDeptId, list));
if (Common.isNotEmpty(sysUsers)){
for (SysUser u:sysUsers){
userIds.append(",'").append(u.getUserId()).append("'");
......
......@@ -108,9 +108,9 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
// 处理权限部门
if (sysDataAuth.getIsDeptAuth() == 1 || sysDataAuth.getIsDeptAuth() == 2) {
if (sysDataAuth.getIsDeptAuth() == 2) {
sql.append(" or a.CREATE_BY in (start'0' ");
sql.append(" or a.CREATE_BY in (start0");
for (SysDataAuthDeptRel dept : authDeptList) {
sql.append(", '").append(dept.getDeptId()).append("'");
sql.append(",").append(dept.getDeptId());
}
sql.append("end)");
} else {
......@@ -314,9 +314,9 @@ 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_BY in (start'0' ");
sql.append(" or a.CREATE_BY in (start0");
for (SysDataAuthDeptRel dept : authDeptList) {
sql.append(", '").append(dept.getDeptId()).append("'");
sql.append(",").append(dept.getDeptId());
dept.setSysDataAuthId(mainId);
}
sql.append("end)");
......
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