安全履职的职位bug修改和考勤权限

This commit is contained in:
guoshengxiong 2024-05-23 13:41:12 +08:00
parent c05ab50c5e
commit c4fad709f7
5 changed files with 14 additions and 10 deletions

View File

@ -85,6 +85,7 @@ public class DataScopeHandler implements DataPermissionHandler {
private HashMap<String, String> getFieldEnterpriseTables() { private HashMap<String, String> getFieldEnterpriseTables() {
HashMap<String, String> tables = new HashMap<>(); HashMap<String, String> tables = new HashMap<>();
tables.put("worker_info", "enterprise_id"); tables.put("worker_info", "enterprise_id");
tables.put("team_info", "enterprise_id");
tables.put("department_info", "enterprise_id"); tables.put("department_info", "enterprise_id");
tables.put("xz_task_progress_content", "enterprise_id"); tables.put("xz_task_progress_content", "enterprise_id");
tables.put("xz_task_progress_alarm", "enterprise_id"); tables.put("xz_task_progress_alarm", "enterprise_id");
@ -95,7 +96,6 @@ public class DataScopeHandler implements DataPermissionHandler {
tables.put("inspect_task_record", "enterprise_id"); tables.put("inspect_task_record", "enterprise_id");
tables.put("xz_security_inspect_task_record", "enterprise_id"); tables.put("xz_security_inspect_task_record", "enterprise_id");
tables.put("xz_security_quality_inspection_record", "enterprise_id"); tables.put("xz_security_quality_inspection_record", "enterprise_id");
tables.put("team_info", "enterprise_id");
if (!environmentUtil.isBaise()) { if (!environmentUtil.isBaise()) {
tables.put("car_info", "enterprise_id"); tables.put("car_info", "enterprise_id");
tables.put("enterprise_info", "id"); tables.put("enterprise_info", "id");

View File

@ -269,6 +269,7 @@ public class WorkerInfo implements Serializable {
*/ */
@Excel(name = "职务类型", width = 15) @Excel(name = "职务类型", width = 15)
@ApiModelProperty(value = "职务类型") @ApiModelProperty(value = "职务类型")
@Deprecated
private java.lang.String jobType; private java.lang.String jobType;
/** /**
* 职务 * 职务

View File

@ -2,6 +2,7 @@ package com.zhgd.xmgl.modules.worker.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.annotation.DataScope;
import com.zhgd.jeecg.common.mybatis.EntityMap; import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.base.entity.vo.TrendOneVo; import com.zhgd.xmgl.base.entity.vo.TrendOneVo;
import com.zhgd.xmgl.entity.vo.NumberTimeTableVo; import com.zhgd.xmgl.entity.vo.NumberTimeTableVo;
@ -24,6 +25,7 @@ import java.util.Map;
*/ */
@Mapper @Mapper
@Repository @Repository
@DataScope(includeTable = {"worker_info", "enterprise_info"})
public interface WorkerAttendanceMapper extends BaseMapper<WorkerAttendance> { public interface WorkerAttendanceMapper extends BaseMapper<WorkerAttendance> {
List<EntityMap> viewDayAttendanceList(Map<String, Object> map); List<EntityMap> viewDayAttendanceList(Map<String, Object> map);

View File

@ -73,6 +73,7 @@ public interface WorkerInfoMapper extends BaseMapper<WorkerInfo> {
List<EntityMap> selectExportExcelWorkerInfo(Map<String, Object> map); List<EntityMap> selectExportExcelWorkerInfo(Map<String, Object> map);
@DataScope(includeTable = "enterprise_info")
List<EntityMap> selectProjectEnterpriseList(Map<String, Object> map); List<EntityMap> selectProjectEnterpriseList(Map<String, Object> map);
List<Map<String, Object>> selectEnterpriseAttendanceWorkerCount(Map<String, Object> map); List<Map<String, Object>> selectEnterpriseAttendanceWorkerCount(Map<String, Object> map);

View File

@ -830,20 +830,20 @@
t.enterprise_name, t.enterprise_name,
count(*) as inServiceNum, count(*) as inServiceNum,
ifnull(sum(if(t1.person_sn is null,1,0)),0) as notPerformNum, ifnull(sum(if(t1.person_sn is null,1,0)),0) as notPerformNum,
ifnull(sum(if(wi.job_type=50,1,0)),0) as xmjlInServiceNum, ifnull(sum(if(wi.job_name=50,1,0)),0) as xmjlInServiceNum,
ifnull(sum(if(wi.job_type=50 and t1.person_sn is null,1,0)),0) as xmjlNotPerformNum, ifnull(sum(if(wi.job_name=50 and t1.person_sn is null,1,0)),0) as xmjlNotPerformNum,
ifnull(sum(if(wi.job_type=44,1,0)),0) as aqyInServiceNum, ifnull(sum(if(wi.job_name=44,1,0)),0) as aqyInServiceNum,
ifnull(sum(if(wi.job_type=44 and t1.person_sn is null,1,0)),0) as aqyNotPerformNum, ifnull(sum(if(wi.job_name=44 and t1.person_sn is null,1,0)),0) as aqyNotPerformNum,
ifnull(sum(if(wi.job_type=46,1,0)),0) as zlyInServiceNum, ifnull(sum(if(wi.job_name=46,1,0)),0) as zlyInServiceNum,
ifnull(sum(if(wi.job_type=46 and t1.person_sn is null,1,0)),0) as zlyNotPerformNum, ifnull(sum(if(wi.job_name=46 and t1.person_sn is null,1,0)),0) as zlyNotPerformNum,
ifnull(sum(if(wi.job_type=37,1,0)),0) as jlInServiceNum, ifnull(sum(if(wi.job_name=37,1,0)),0) as jlInServiceNum,
ifnull(sum(if(wi.job_type=37 and t1.person_sn is null,1,0)),0) as jlNotPerformNum ifnull(sum(if(wi.job_name=37 and t1.person_sn is null,1,0)),0) as jlNotPerformNum
from enterprise_info t from enterprise_info t
join worker_info wi on wi.enterprise_id=t.id join worker_info wi on wi.enterprise_id=t.id
left join (select person_sn from worker_attendance where project_sn=#{param.projectSn} left join (select person_sn from worker_attendance where project_sn=#{param.projectSn}
and create_time >= CURRENT_DATE and create_time >= CURRENT_DATE
group by person_sn) t1 on t1.person_sn=wi.person_sn group by person_sn) t1 on t1.person_sn=wi.person_sn
where wi.project_sn=#{param.projectSn} AND wi.inService_type = 1 where wi.project_sn=#{param.projectSn} AND wi.inService_type = 1
group by t.id group by t.id
</select> </select>
</mapper> </mapper>