权限修改
This commit is contained in:
parent
da92d52ab1
commit
6a1b1b92a4
|
|
@ -62,6 +62,14 @@ public class NoSignalTeamAttendController {
|
||||||
|
|
||||||
String roleLevel = SecurityUtils.getLoginUser().getSysUser().getRoleLevel();
|
String roleLevel = SecurityUtils.getLoginUser().getSysUser().getRoleLevel();
|
||||||
String subId = SecurityUtils.getLoginUser().getSysUser().getSubId();
|
String subId = SecurityUtils.getLoginUser().getSysUser().getSubId();
|
||||||
|
|
||||||
|
String orgIdStr = SecurityUtils.getLoginUser().getSysUser().getOrgId();
|
||||||
|
|
||||||
|
//不单独去查所有的公司了,只放行一个公司
|
||||||
|
if(!"1".equals(orgIdStr)){
|
||||||
|
request.getParams().put("orgId", orgIdStr);
|
||||||
|
}
|
||||||
|
|
||||||
if ("4".equals(roleLevel)) {
|
if ("4".equals(roleLevel)) {
|
||||||
Map<String, Object> params = request.getParams();
|
Map<String, Object> params = request.getParams();
|
||||||
String subId1 = (String) params.get("subId");
|
String subId1 = (String) params.get("subId");
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,13 @@ public class NoSignalTeamSetUpController {
|
||||||
|
|
||||||
String roleLevel = SecurityUtils.getLoginUser().getSysUser().getRoleLevel();
|
String roleLevel = SecurityUtils.getLoginUser().getSysUser().getRoleLevel();
|
||||||
String subId = SecurityUtils.getLoginUser().getSysUser().getSubId();
|
String subId = SecurityUtils.getLoginUser().getSysUser().getSubId();
|
||||||
|
String orgIdStr = SecurityUtils.getLoginUser().getSysUser().getOrgId();
|
||||||
|
|
||||||
|
//不单独去查所有的公司了,只放行一个公司
|
||||||
|
if(!"1".equals(orgIdStr)){
|
||||||
|
request.getParams().put("orgId", orgIdStr);
|
||||||
|
}
|
||||||
|
|
||||||
if("4".equals(roleLevel)) {
|
if("4".equals(roleLevel)) {
|
||||||
Map<String, Object> params = request.getParams();
|
Map<String, Object> params = request.getParams();
|
||||||
String subId1 = (String) params.get("subId");
|
String subId1 = (String) params.get("subId");
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import com.bonus.common.core.table.PageTableResponse;
|
||||||
import com.bonus.common.log.annotation.Log;
|
import com.bonus.common.log.annotation.Log;
|
||||||
import com.bonus.common.log.enums.BusinessType;
|
import com.bonus.common.log.enums.BusinessType;
|
||||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
@ -32,6 +33,13 @@ public class PersonTrainController {
|
||||||
@Log(title = "人员培训-list查询", businessType = BusinessType.SELECT)
|
@Log(title = "人员培训-list查询", businessType = BusinessType.SELECT)
|
||||||
@RequiresPermissions("sys:personTrain:query")
|
@RequiresPermissions("sys:personTrain:query")
|
||||||
public PageTableResponse getPersonTrainList(PageTableRequest request) {
|
public PageTableResponse getPersonTrainList(PageTableRequest request) {
|
||||||
|
|
||||||
|
String orgIdStr = SecurityUtils.getLoginUser().getSysUser().getOrgId();
|
||||||
|
//不单独去查所有的公司了,只放行一个公司
|
||||||
|
if(!"1".equals(orgIdStr)){
|
||||||
|
request.getParams().put("orgId", orgIdStr);
|
||||||
|
}
|
||||||
|
|
||||||
return new PageTableHandler(new PageTableHandler.CountHandler() {
|
return new PageTableHandler(new PageTableHandler.CountHandler() {
|
||||||
@Override
|
@Override
|
||||||
public int count(PageTableRequest request) {
|
public int count(PageTableRequest request) {
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,9 @@
|
||||||
<if test="params.subId != null and params.subId !='' ">
|
<if test="params.subId != null and params.subId !='' ">
|
||||||
AND bs.id = #{params.subId}
|
AND bs.id = #{params.subId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="params.orgId != null and params.orgId != ''">
|
||||||
|
AND bp.company_id = #{params.orgId}
|
||||||
|
</if>
|
||||||
<if test="params.keyWord != null and params.keyWord != '' ">
|
<if test="params.keyWord != null and params.keyWord != '' ">
|
||||||
and (
|
and (
|
||||||
bp.`name` like concat('%', #{params.keyWord}, '%') or
|
bp.`name` like concat('%', #{params.keyWord}, '%') or
|
||||||
|
|
@ -323,4 +326,4 @@
|
||||||
(id_number,ein_time,project_id,sub_id,team_id,post_id,exit_status,contract_id)
|
(id_number,ein_time,project_id,sub_id,team_id,post_id,exit_status,contract_id)
|
||||||
VALUE(#{idNumber},NOW(),#{proId},#{subId},#{teamId},#{postId},'-1',#{contractId})
|
VALUE(#{idNumber},NOW(),#{proId},#{subId},#{teamId},#{postId},'-1',#{contractId})
|
||||||
</insert>
|
</insert>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,9 @@
|
||||||
<if test="params.subId != null and params.subId !='' ">
|
<if test="params.subId != null and params.subId !='' ">
|
||||||
AND bs.id = #{params.subId}
|
AND bs.id = #{params.subId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="params.orgId != null and params.orgId != ''">
|
||||||
|
AND bp.company_id = #{params.orgId}
|
||||||
|
</if>
|
||||||
<if test="params.keyWord != null and params.keyWord != '' ">
|
<if test="params.keyWord != null and params.keyWord != '' ">
|
||||||
and (
|
and (
|
||||||
bp.`name` like concat('%', #{params.keyWord}, '%') or
|
bp.`name` like concat('%', #{params.keyWord}, '%') or
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,9 @@
|
||||||
<if test="params.employmentType != null and params.employmentType != ''">
|
<if test="params.employmentType != null and params.employmentType != ''">
|
||||||
and locate (#{params.employmentType},bw.worker_type)
|
and locate (#{params.employmentType},bw.worker_type)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="params.orgId != null and params.orgId != ''">
|
||||||
|
AND bp.company_id = #{params.orgId}
|
||||||
|
</if>
|
||||||
ORDER BY
|
ORDER BY
|
||||||
bw.ein_status DESC,
|
bw.ein_status DESC,
|
||||||
bw.id_number DESC
|
bw.id_number DESC
|
||||||
|
|
@ -64,4 +67,4 @@
|
||||||
where id_number = #{idNumber}
|
where id_number = #{idNumber}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue