权限修改

This commit is contained in:
方亮 2025-11-18 18:21:37 +08:00
parent da92d52ab1
commit 6a1b1b92a4
6 changed files with 34 additions and 2 deletions

View File

@ -62,6 +62,14 @@ public class NoSignalTeamAttendController {
String roleLevel = SecurityUtils.getLoginUser().getSysUser().getRoleLevel();
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)) {
Map<String, Object> params = request.getParams();
String subId1 = (String) params.get("subId");

View File

@ -43,6 +43,13 @@ public class NoSignalTeamSetUpController {
String roleLevel = SecurityUtils.getLoginUser().getSysUser().getRoleLevel();
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)) {
Map<String, Object> params = request.getParams();
String subId1 = (String) params.get("subId");

View File

@ -10,6 +10,7 @@ import com.bonus.common.core.table.PageTableResponse;
import com.bonus.common.log.annotation.Log;
import com.bonus.common.log.enums.BusinessType;
import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.common.security.utils.SecurityUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@ -32,6 +33,13 @@ public class PersonTrainController {
@Log(title = "人员培训-list查询", businessType = BusinessType.SELECT)
@RequiresPermissions("sys:personTrain:query")
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() {
@Override
public int count(PageTableRequest request) {

View File

@ -72,6 +72,9 @@
<if test="params.subId != null and params.subId !='' ">
AND bs.id = #{params.subId}
</if>
<if test="params.orgId != null and params.orgId != ''">
AND bp.company_id = #{params.orgId}
</if>
<if test="params.keyWord != null and params.keyWord != '' ">
and (
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)
VALUE(#{idNumber},NOW(),#{proId},#{subId},#{teamId},#{postId},'-1',#{contractId})
</insert>
</mapper>
</mapper>

View File

@ -70,6 +70,9 @@
<if test="params.subId != null and params.subId !='' ">
AND bs.id = #{params.subId}
</if>
<if test="params.orgId != null and params.orgId != ''">
AND bp.company_id = #{params.orgId}
</if>
<if test="params.keyWord != null and params.keyWord != '' ">
and (
bp.`name` like concat('%', #{params.keyWord}, '%') or

View File

@ -28,6 +28,9 @@
<if test="params.employmentType != null and params.employmentType != ''">
and locate (#{params.employmentType},bw.worker_type)
</if>
<if test="params.orgId != null and params.orgId != ''">
AND bp.company_id = #{params.orgId}
</if>
ORDER BY
bw.ein_status DESC,
bw.id_number DESC
@ -64,4 +67,4 @@
where id_number = #{idNumber}
</update>
</mapper>
</mapper>