1.添加权限的尝试
This commit is contained in:
parent
45ecb4c3ee
commit
11537e79a3
|
|
@ -19,6 +19,7 @@ import com.bonus.common.security.annotation.RequiresPermissions;
|
|||
import com.bonus.common.security.annotation.RequiresPermissionsOrInnerAuth;
|
||||
import com.bonus.system.api.domain.SysRole;
|
||||
import com.bonus.system.api.domain.SysUser;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
|
@ -28,8 +29,11 @@ import org.springframework.web.multipart.MultipartFile;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.bonus.bmw.utils.OwnPermissionUtil.dealWithPermission;
|
||||
|
||||
/**
|
||||
* 人员合同
|
||||
*
|
||||
|
|
@ -54,6 +58,11 @@ public class BmWorkerContractController extends BaseController {
|
|||
@SysLog(title = "合同管理", businessType = OperaType.QUERY, logType = 0, module = "施工人员->红绿灯管理->合同管理", details = "查询合同列表")
|
||||
public TableDataInfo list(BmWorkerContract o) {
|
||||
try {
|
||||
Map<String,Integer> map=dealWithPermission();
|
||||
if(!map.isEmpty()){
|
||||
// 3. 将 map 中的值复制到 o 对象中
|
||||
BeanUtils.copyProperties(map, o);
|
||||
}
|
||||
startPage();
|
||||
List<BmWorkerContract> list = service.selectContractList(o);
|
||||
return getDataTable(list);
|
||||
|
|
|
|||
|
|
@ -26,8 +26,11 @@ import org.springframework.web.multipart.MultipartFile;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.bonus.bmw.utils.OwnPermissionUtil.dealWithPermission;
|
||||
|
||||
/**
|
||||
* 人员离场
|
||||
*
|
||||
|
|
@ -52,6 +55,11 @@ public class PmWorkerExitController extends BaseController {
|
|||
@SysLog(title = "人员出场管理", businessType = OperaType.QUERY, logType = 0, module = "施工人员->出入场管理->人员出场管理", details = "查询人员出场列表")
|
||||
public TableDataInfo list(PmWorkerDto o) {
|
||||
try {
|
||||
Map<String,Integer> map=dealWithPermission();
|
||||
if(!map.isEmpty()){
|
||||
// 3. 将 map 中的值复制到 o 对象中
|
||||
BeanUtils.copyProperties(map, o);
|
||||
}
|
||||
startPage();
|
||||
List<PmWorker> list = service.selectWorkList(o);
|
||||
return getDataTable(list);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ public class PmWorkerDto {
|
|||
*/
|
||||
private String phone;
|
||||
/**
|
||||
* 权限相关
|
||||
* 项目名称
|
||||
*/
|
||||
private Integer proId;
|
||||
|
|
@ -68,4 +69,16 @@ public class PmWorkerDto {
|
|||
private String exitWay;
|
||||
|
||||
|
||||
/**
|
||||
* 权限相关
|
||||
* 分公司编号
|
||||
*/
|
||||
private Integer subComId;
|
||||
|
||||
/**
|
||||
* 权限相关
|
||||
* 组织编号
|
||||
*/
|
||||
private Integer orgId;
|
||||
|
||||
}
|
||||
|
|
@ -145,5 +145,7 @@ public class BmWorkerContract {
|
|||
private Integer proId;
|
||||
private Integer teamId;
|
||||
private Integer subId;
|
||||
private Integer subComId;
|
||||
private Integer orgId;
|
||||
|
||||
}
|
||||
|
|
@ -65,6 +65,7 @@
|
|||
pm_worker pw
|
||||
LEFT JOIN bm_worker_ein_msg bwem ON bwem.worker_id = pw.id
|
||||
LEFT JOIN bm_worker_contract bwc ON pw.id = bwc.worker_id AND bwc.is_active = 1
|
||||
LEFT JOIN pm_project pp on pp.id = bwem.pro_id
|
||||
WHERE pw.is_active = 1
|
||||
<if test="name != null">
|
||||
AND pw.`name` LIKE CONCAT('%', #{name}, '%')
|
||||
|
|
@ -92,6 +93,13 @@
|
|||
AND bwc.id IS NULL
|
||||
</if>
|
||||
</if>
|
||||
<!-- 权限相关 -->
|
||||
<if test="subComId != null and subComId != ''">
|
||||
AND pp.sub_com_id = #{subComId}
|
||||
</if>
|
||||
<if test="orgId != null and orgId != ''">
|
||||
AND pp.org_id = #{orgId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectContractListByWorkerId" resultMap="BaseResultMap">
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@
|
|||
bwepr.exit_time
|
||||
FROM
|
||||
pm_worker pw
|
||||
LEFT JOIN bm_worker_ein_pro_record bwepr ON pw.id = bwepr.worker_id
|
||||
LEFT JOIN bm_worker_ein_pro_record bwepr ON pw.id = bwepr.worker_id
|
||||
LEFT JOIN pm_project pp on pp.id = bwepr.pro_id
|
||||
WHERE
|
||||
pw.is_active = 1 And bwepr.is_last = 1
|
||||
<if test="name != null and name != ''">
|
||||
|
|
@ -74,6 +75,13 @@
|
|||
<if test="isUploadFile != null and isUploadFile != ''">
|
||||
AND bwepr.is_upload_file = #{isUploadFile}
|
||||
</if>
|
||||
<!-- 权限相关 -->
|
||||
<if test="subComId != null and subComId != ''">
|
||||
AND pp.sub_com_id = #{subComId}
|
||||
</if>
|
||||
<if test="orgId != null and orgId != ''">
|
||||
AND pp.org_id = #{orgId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<delete id="deleteEinMsgByWorkerId">
|
||||
|
|
|
|||
Loading…
Reference in New Issue