xuhy
2025-07-02 30c0554918d4d97c1983563623cd881951fc10a2
大屏地图
3个文件已添加
7个文件已修改
459 ■■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DataStatisticsController.java 311 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTaskMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/model/TLocation.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/query/DataStatisticsQuery.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/query/PointDetailQuery.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/TTaskCleanService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTaskCleanServiceImpl.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/vo/system/TLocationStatisticsVO.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/vo/system/TLocationTaskListVO.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TTaskMapper.xml 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DataStatisticsController.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
@@ -12,17 +13,19 @@
import com.ruoyi.system.query.DataStatisticsQuery;
import com.ruoyi.system.query.DataStatisticsRankQuery;
import com.ruoyi.system.query.InsepectorListQuery;
import com.ruoyi.system.query.PointDetailQuery;
import com.ruoyi.system.service.*;
import com.ruoyi.system.vo.system.AnalysisUnqualifiedCleaningDetailVO;
import com.ruoyi.system.vo.system.AnalysisUnqualifiedCleaningVO;
import com.ruoyi.system.vo.system.DataStatisticsRankVO;
import com.ruoyi.system.vo.system.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.util.CollectionUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.*;
@@ -955,5 +958,307 @@
        return R.ok(result);
    }
    @ApiOperation(value = "点位巡检热力图-数量统计")
    @PostMapping(value = "/pointInspectionHeatStatistics")
    public R<Map<String, Object>> pointInspectionHeatStatistics(@RequestBody DataStatisticsQuery query) {
        Map<String, Object> map = new HashMap<>();
        Integer deptType = tokenService.getLoginUser().getUser().getDeptType();
        String deptId = tokenService.getLoginUser().getUser().getDeptId();
        Long userId = tokenService.getLoginUser().getUserId();
        LambdaQueryWrapper<TTask> wrapper = new LambdaQueryWrapper<>();
        Map<String, Date> yearDate = DateUtils.getYearDate(new Date());
        String startTime = new SimpleDateFormat("yyyy-MM-dd").format(yearDate.get("first"));
        String endTime = new SimpleDateFormat("yyyy-MM-dd").format(yearDate.get("last"));
        wrapper.between(TTask::getImplementTime, startTime, endTime);
        List<TTask> list;
        if (userId != 1L) {
            // 查询点位类型
            if(StringUtils.isNotEmpty(query.getLocationTypeId())){
                // 查询点位
                List<TLocation> locationList = locationService.list(Wrappers.lambdaQuery(TLocation.class)
                        .in(TLocation::getLocationType, query.getLocationTypeId()));
                if(!CollectionUtils.isEmpty(locationList)){
                    List<String> locationIds = locationList.stream().map(TLocation::getId).collect(Collectors.toList());
                    wrapper.in(TTask::getLocationId, locationIds);
                }
                map.put("totalLocationNum", locationList.size());
            }
            List<TTask> taskList = new ArrayList<>();
            if (deptType == 1) {
                // 项目部人员
                if(CollectionUtils.isEmpty(query.getProjectId())){
                    List<String> projectIds = new ArrayList<>();
                    projectIds.add(deptId);
                    query.setProjectId(projectIds);
                }
            }else {
                // 公司人员
                // 查询自己的任务列表
                taskList = taskCleanService.list(Wrappers.lambdaQuery(TTask.class)
                        .eq(TTask::getPatrolInspector, userId));
                if(CollectionUtils.isEmpty(query.getProjectId())){
                    // 查询所有项目部的任务列表
                    List<TProjectDept> tProjectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                            .eq(TProjectDept::getStatus, 1)
                            .ne(TProjectDept::getParentId, 0));
                    if(!CollectionUtils.isEmpty(tProjectDeptList)){
                        List<String> projectIds = tProjectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList());
                        query.setProjectId(projectIds);
                    }
                }
            }
            // 查询片区
            if(!CollectionUtils.isEmpty(query.getProjectId())){
                wrapper.in(TTask::getProjectId, query.getProjectId());
                // 查询点位数
                List<TLocation> locationList = locationService.list(Wrappers.lambdaQuery(TLocation.class)
                        .in(TLocation::getProjectId, query.getProjectId()));
                map.put("totalLocationNum", locationList.size());
            }
            list = taskCleanService.list(wrapper);
            if(CollectionUtils.isEmpty(list)){
                return R.ok();
            }
            if(!CollectionUtils.isEmpty(taskList)){
                list.addAll(taskList);
            }
        }else {
            // 超级管理员
            // 查询点位类型
            if(StringUtils.isNotEmpty(query.getLocationTypeId())){
                // 查询点位
                List<TLocation> locationList = locationService.list(Wrappers.lambdaQuery(TLocation.class)
                        .in(TLocation::getLocationType, query.getLocationTypeId()));
                if(!CollectionUtils.isEmpty(locationList)){
                    List<String> locationIds = locationList.stream().map(TLocation::getId).collect(Collectors.toList());
                    wrapper.in(TTask::getLocationId, locationIds);
                }
                map.put("totalLocationNum", locationList.size());
            }
            // 超级管理员 查询所有的任务列表
            List<TTask> taskList = taskCleanService.list(Wrappers.lambdaQuery(TTask.class));
            if(CollectionUtils.isEmpty(query.getProjectId())){
                // 查询所有项目部的任务列表
                List<TProjectDept> tProjectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                        .eq(TProjectDept::getStatus, 1)
                        .ne(TProjectDept::getParentId, 0));
                if(!CollectionUtils.isEmpty(tProjectDeptList)){
                    List<String> projectIds = tProjectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList());
                    query.setProjectId(projectIds);
                }
            }
            // 查询片区
            if(!CollectionUtils.isEmpty(query.getProjectId())){
                wrapper.in(TTask::getProjectId, query.getProjectId());
                List<TLocation> locationList = locationService.list(Wrappers.lambdaQuery(TLocation.class)
                        .in(TLocation::getProjectId, query.getProjectId()));
                map.put("totalLocationNum", locationList.size());
            }
            list = taskCleanService.list(wrapper);
            if(CollectionUtils.isEmpty(list)){
                return R.ok();
            }
            if(!CollectionUtils.isEmpty(taskList)){
                list.addAll(taskList);
            }
        }
        // 查询任务相关数据
        // 总计任务数
        map.put("totalTaskNum", list.size());
        // 片区数量
        map.put("totalProjectNum", query.getProjectId().size());
        // 巡检员数
        Integer totalEmployeeNum = sysUserService.selectUserCount(query.getProjectId(),deptType);
        if (deptType != 1) {
            totalEmployeeNum = totalEmployeeNum + 1;
        }
        map.put("totalEmployeeNum", totalEmployeeNum);
        // 合格率
        // 匹配任务详情查看合格数量
        List<TTask> tasks = list.stream().filter(task -> task.getStatus() != 1 && task.getStatus() != 2).collect(Collectors.toList());
        if(CollectionUtils.isEmpty(tasks)){
            map.put("qualifiedRate",BigDecimal.ZERO);
            return R.ok(map);
        }
        List<String> taskIds = tasks.stream().map(TTask::getId).collect(Collectors.toList());
        List<TTaskDetail> taskDetails = tTaskDetailService.list(Wrappers.lambdaQuery(TTaskDetail.class)
                .in(TTaskDetail::getTaskId, taskIds)
                .orderByDesc(TTaskDetail::getCreateTime));
        int qualifiedWarn = 0;
        for (TTask task : list) {
            TTaskDetail tTaskDetail = taskDetails.stream().filter(taskDetail -> taskDetail.getTaskId().equals(task.getId())).findFirst().orElse(null);
            if(Objects.nonNull(tTaskDetail)){
                if(Objects.nonNull(tTaskDetail.getClearStatus()) && tTaskDetail.getClearStatus() == 1){
                    qualifiedWarn++;
                }
            }
        }
        map.put("qualifiedRate", new BigDecimal(qualifiedWarn).divide(new BigDecimal(tasks.size()), 2, RoundingMode.HALF_UP));
        return R.ok(map);
    }
    @ApiOperation(value = "点位巡检热力图-点位地图")
    @PostMapping(value = "/pointInspectionHeatMap")
    public R<List<TLocation>> pointInspectionHeatMap(@RequestBody DataStatisticsQuery query) {
        Integer deptType = tokenService.getLoginUser().getUser().getDeptType();
        String deptId = tokenService.getLoginUser().getUser().getDeptId();
        Long userId = tokenService.getLoginUser().getUserId();
        LambdaQueryWrapper<TLocation> wrapper = new LambdaQueryWrapper<>();
        Map<String, Date> yearDate = DateUtils.getYearDate(new Date());
        String startTime = new SimpleDateFormat("yyyy-MM-dd").format(yearDate.get("first"));
        String endTime = new SimpleDateFormat("yyyy-MM-dd").format(yearDate.get("last"));
        wrapper.between(TLocation::getCreateTime, startTime, endTime);
        // 查询点位类型
        if(StringUtils.isNotEmpty(query.getLocationTypeId())){
            // 查询点位
            wrapper.in(TLocation::getLocationType, query.getLocationTypeId());
        }
        if(StringUtils.isNotEmpty(query.getLocationNameOrCode())){
            wrapper.and(e->e.like(TLocation::getLocationName, query.getLocationNameOrCode()).or()
                    .like(TLocation::getLocationCode, query.getLocationNameOrCode()));
        }
        if (userId != 1L) {
            if (deptType == 1) {
                // 项目部人员
                if(CollectionUtils.isEmpty(query.getProjectId())){
                    List<String> projectIds = new ArrayList<>();
                    projectIds.add(deptId);
                    query.setProjectId(projectIds);
                }
            }else {
                // 公司人员
                if(CollectionUtils.isEmpty(query.getProjectId())){
                    // 查询所有项目部的任务列表
                    List<TProjectDept> tProjectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                            .eq(TProjectDept::getStatus, 1)
                            .ne(TProjectDept::getParentId, 0));
                    if(!CollectionUtils.isEmpty(tProjectDeptList)){
                        List<String> projectIds = tProjectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList());
                        query.setProjectId(projectIds);
                    }
                }
            }
        }else {
            // 超级管理员
            if(CollectionUtils.isEmpty(query.getProjectId())){
                // 查询所有项目部的任务列表
                List<TProjectDept> tProjectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                        .eq(TProjectDept::getStatus, 1)
                        .ne(TProjectDept::getParentId, 0));
                if(!CollectionUtils.isEmpty(tProjectDeptList)){
                    List<String> projectIds = tProjectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList());
                    query.setProjectId(projectIds);
                }
            }
        }
        // 查询片区
        if(!CollectionUtils.isEmpty(query.getProjectId())){
            wrapper.in(TLocation::getProjectId, query.getProjectId());
        }
        // 查询点位
        List<TLocation> locationList = locationService.list(wrapper);
        if(CollectionUtils.isEmpty(locationList)){
            return R.ok(locationList);
        }
        List<String> locationIds = locationList.stream().map(TLocation::getId).collect(Collectors.toList());
        // 查询任务
        List<TTask> tasks = taskCleanService.list(Wrappers.lambdaQuery(TTask.class)
                .in(TTask::getLocationId, locationIds));
        for (TLocation tLocation : locationList) {
            long count = tasks.stream().filter(task -> task.getLocationId().equals(tLocation.getId())).count();
            tLocation.setTaskNum(count);
        }
        return R.ok(locationList);
    }
    @ApiOperation(value = "点位巡检热力图-点位详情和统计")
    @PostMapping(value = "/pointInspectionHeatDetailStatistics")
    public R<TLocationStatisticsVO> pointInspectionHeatDetailStatistics(@Validated @RequestBody PointDetailQuery query) {
        TLocation location = locationService.getById(query.getLocationId());
        TLocationStatisticsVO locationStatisticsVO = new TLocationStatisticsVO();
        BeanUtils.copyProperties(location, locationStatisticsVO);
        List<TTask> list = taskCleanService.list(Wrappers.lambdaQuery(TTask.class)
                .eq(TTask::getLocationId, query.getLocationId()));
        // 总数
        locationStatisticsVO.setTotalInspection(list.size());
        // 完成数
        long completeInspection = list.stream().filter(task -> task.getStatus() == 6).count();
        locationStatisticsVO.setCompleteInspection(completeInspection);
        // 合格率
        List<TTask> tasks = list.stream().filter(task -> task.getStatus() != 1 && task.getStatus() != 2).collect(Collectors.toList());
        if(CollectionUtils.isEmpty(tasks)){
            locationStatisticsVO.setPassRate(new BigDecimal(0));
            return R.ok(locationStatisticsVO);
        }
        List<String> taskIds = tasks.stream().map(TTask::getId).collect(Collectors.toList());
        List<TTaskDetail> taskDetails = tTaskDetailService.list(Wrappers.lambdaQuery(TTaskDetail.class)
                .in(TTaskDetail::getTaskId, taskIds)
                .orderByDesc(TTaskDetail::getCreateTime));
        int qualifiedWarn = 0;
        for (TTask task : list) {
            TTaskDetail tTaskDetail = taskDetails.stream().filter(taskDetail -> taskDetail.getTaskId().equals(task.getId())).findFirst().orElse(null);
            if(Objects.nonNull(tTaskDetail)){
                if(Objects.nonNull(tTaskDetail.getClearStatus()) && tTaskDetail.getClearStatus() == 1){
                    qualifiedWarn++;
                }
            }
        }
        locationStatisticsVO.setPassRate(new BigDecimal(qualifiedWarn).divide(new BigDecimal(tasks.size()), 2, RoundingMode.HALF_UP));
        return R.ok(locationStatisticsVO);
    }
    @ApiOperation(value = "点位巡检热力图-点位详情任务列表")
    @PostMapping(value = "/pointInspectionHeatDetailTaskList")
    public R<PageInfo<TLocationTaskListVO>> pointInspectionHeatDetailTaskList(@Validated @RequestBody PointDetailQuery query) {
        if(StringUtils.isNotBlank(query.getDeptName())){
            List<TProjectDept> projectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                    .like(TProjectDept::getProjectName, query.getDeptName()));
            List<String> projectIds = projectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList());
            List<TDept> deptList = deptService.list(Wrappers.lambdaQuery(TDept.class)
                    .like(TDept::getDeptName, query.getDeptName()));
            List<String> deptIds = deptList.stream().map(TDept::getId).collect(Collectors.toList());
            projectIds.addAll(deptIds);
            if (projectIds.isEmpty()){
                projectIds.add("-1");
            }
            query.setProjectIds(projectIds);
        }
        PageInfo<TLocationTaskListVO> pageInfo = taskCleanService.pointInspectionHeatDetailTaskList(query);
        return R.ok(pageInfo);
    }
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTaskMapper.java
@@ -6,10 +6,12 @@
import com.ruoyi.system.applet.vo.TaskUserListVO;
import com.ruoyi.system.model.TTask;
import com.ruoyi.system.query.LocationListTaskQuery;
import com.ruoyi.system.query.PointDetailQuery;
import com.ruoyi.system.query.TaskListQuery;
import com.ruoyi.system.query.TaskProgressQuery;
import com.ruoyi.system.vo.system.LocationListTaskVO;
import com.ruoyi.system.vo.system.ProgressListVO;
import com.ruoyi.system.vo.system.TLocationTaskListVO;
import com.ruoyi.system.vo.system.TaskListVO;
import org.apache.ibatis.annotations.Param;
@@ -39,4 +41,6 @@
    List<ProgressListVO> taskProgress(@Param("query")TaskProgressQuery query, @Param("pageInfo")PageInfo<ProgressListVO> pageInfo);
    List<ProgressListVO> taskProgressExport(@Param("query")TaskProgressQuery query);
    List<TLocationTaskListVO> pointInspectionHeatDetailTaskList(@Param("query")PointDetailQuery query, @Param("pageInfo")PageInfo<TLocationTaskListVO> pageInfo);
}
ruoyi-system/src/main/java/com/ruoyi/system/model/TLocation.java
@@ -77,5 +77,9 @@
    @TableField("location_lat_end")
    private String locationLatEnd;
    @ApiModelProperty(value = "任务数量")
    @TableField(exist = false)
    private long taskNum=0;
}
ruoyi-system/src/main/java/com/ruoyi/system/query/DataStatisticsQuery.java
@@ -17,4 +17,7 @@
    @ApiModelProperty(value = "点位类型id")
    private String locationTypeId;
    @ApiModelProperty(value = "点位搜索  热力图使用")
    private String locationNameOrCode;
}
ruoyi-system/src/main/java/com/ruoyi/system/query/PointDetailQuery.java
New file
@@ -0,0 +1,31 @@
package com.ruoyi.system.query;
import com.ruoyi.common.core.domain.BasePage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
@Data
@ApiModel(value = "点位详情查询参数Query")
public class PointDetailQuery extends BasePage {
    @NotNull(message = "点位id不能为空")
    @ApiModelProperty(value = "点位id 详情使用")
    private String locationId;
    @ApiModelProperty(value = "部门名称 详情使用列表使用")
    private String deptName;
    @ApiModelProperty(value = "开始时间(yyyy-MM-dd) 详情使用列表使用")
    private String startTime;
    @ApiModelProperty(value = "结束时间(yyyy-MM-dd) 详情使用列表使用")
    private String endTime;
    @ApiModelProperty(value = "部门id集合 前端忽略")
    private List<String> projectIds;
}
ruoyi-system/src/main/java/com/ruoyi/system/service/TTaskCleanService.java
@@ -5,9 +5,11 @@
import com.ruoyi.system.applet.query.TaskUserListQuery;
import com.ruoyi.system.applet.vo.TaskUserListVO;
import com.ruoyi.system.model.TTask;
import com.ruoyi.system.query.PointDetailQuery;
import com.ruoyi.system.query.TaskListQuery;
import com.ruoyi.system.query.TaskProgressQuery;
import com.ruoyi.system.vo.system.ProgressListVO;
import com.ruoyi.system.vo.system.TLocationTaskListVO;
import com.ruoyi.system.vo.system.TaskListVO;
import java.util.List;
@@ -39,4 +41,10 @@
    PageInfo<ProgressListVO> taskProgress(TaskProgressQuery query);
    List<ProgressListVO> taskProgressExport(TaskProgressQuery query);
    /**
     * 点位巡检热力图-点位详情任务列表
     * @param query
     * @return
     */
    PageInfo<TLocationTaskListVO> pointInspectionHeatDetailTaskList(PointDetailQuery query);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTaskCleanServiceImpl.java
@@ -1,6 +1,7 @@
package com.ruoyi.system.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.common.core.domain.BaseModel;
@@ -10,10 +11,12 @@
import com.ruoyi.system.applet.vo.TaskUserListVO;
import com.ruoyi.system.mapper.*;
import com.ruoyi.system.model.*;
import com.ruoyi.system.query.PointDetailQuery;
import com.ruoyi.system.query.TaskListQuery;
import com.ruoyi.system.query.TaskProgressQuery;
import com.ruoyi.system.service.TTaskCleanService;
import com.ruoyi.system.vo.system.ProgressListVO;
import com.ruoyi.system.vo.system.TLocationTaskListVO;
import com.ruoyi.system.vo.system.TaskListVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -127,5 +130,28 @@
        return list;
    }
    @Override
    public PageInfo<TLocationTaskListVO> pointInspectionHeatDetailTaskList(PointDetailQuery query) {
        PageInfo<TLocationTaskListVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
        List<TLocationTaskListVO> list = this.baseMapper.pointInspectionHeatDetailTaskList(query,pageInfo);
        List<TDept> deptList = deptMapper.selectList(Wrappers.lambdaQuery(TDept.class));
        List<TProjectDept> projectDeptList = projectDeptMapper.selectList(Wrappers.lambdaQuery(TProjectDept.class));
        for (TLocationTaskListVO tLocationTaskListVO : list) {
            if(tLocationTaskListVO.getDeptType()==1){
                projectDeptList.stream().filter(e -> e.getId().equals(tLocationTaskListVO.getDeptId())).findFirst().ifPresent(e -> {
                    tLocationTaskListVO.setDeptName(e.getProjectName());
                });
            }else {
                deptList.stream().filter(e -> e.getId().equals(tLocationTaskListVO.getDeptId())).findFirst().ifPresent(e -> {
                    tLocationTaskListVO.setDeptName(e.getDeptName());
                });
            }
        }
        pageInfo.setRecords(list);
        return pageInfo;
    }
}
ruoyi-system/src/main/java/com/ruoyi/system/vo/system/TLocationStatisticsVO.java
New file
@@ -0,0 +1,24 @@
package com.ruoyi.system.vo.system;
import com.ruoyi.system.model.TLocation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@Data
@ApiModel(value = "TLocationStatisticsVO对象", description = "点位统计")
public class TLocationStatisticsVO extends TLocation {
    @ApiModelProperty(value = "总计巡检")
    private Integer totalInspection;
    @ApiModelProperty(value = "已完成次数")
    private Long completeInspection;
    @ApiModelProperty(value = "合格率")
    private BigDecimal passRate;
}
ruoyi-system/src/main/java/com/ruoyi/system/vo/system/TLocationTaskListVO.java
New file
@@ -0,0 +1,27 @@
package com.ruoyi.system.vo.system;
import com.ruoyi.system.model.TTask;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "TLocationTaskListVO对象", description = "点位任务列表")
public class TLocationTaskListVO extends TTask {
    @ApiModelProperty(value = "部门名称")
    private String deptName;
    @ApiModelProperty(value = "巡检员名称")
    private String nickName;
    @ApiModelProperty(value = "手机号")
    private String phoneNumber;
    @ApiModelProperty(value = "部门类型")
    private Integer deptType;
    @ApiModelProperty(value = "部门Id")
    private String deptId;
}
ruoyi-system/src/main/resources/mapper/system/TTaskMapper.xml
@@ -194,5 +194,26 @@
        group by t1.user_id,t1.template_id
    </select>
    <select id="pointInspectionHeatDetailTaskList" resultType="com.ruoyi.system.vo.system.TLocationTaskListVO">
        select t1.*,t2.nick_name as nickName,t2.phonenumber AS phoneNumber,t2.deptName,t2.deptId
        from t_task t1
        left join sys_user t2 on t1.user_id = t2.user_id
        <where>
            <if test="query.locationId != null and query.locationId != ''">
                and t1.location_id = #{query.locationId}
            </if>
            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
                and t1.implement_time between #{query.startTime} and #{query.endTime}
            </if>
            <if test="query.projectIds != null and query.projectIds.size()>0">
                and t2.deptId IN
                <foreach collection="query.projectIds" separator="," item="id" open="(" close=")">
                    #{id}
                </foreach>
            </if>
            and t1.`disabled` = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
         order by t1.implement_time desc
    </select>
</mapper>