“mitao”
2026-04-01 147416cbf4810dfb16a6211c6b594a640e623553
fix:委托方端项目列表查询
3个文件已修改
38 ■■■■■ 已修改文件
ruoyi-system/src/main/java/com/ruoyi/system/query/ErrorListQuery.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DeviceUsageServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/DeviceUsageMapper.xml 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/query/ErrorListQuery.java
@@ -31,4 +31,6 @@
    private String endTime;
    @ApiModelProperty("内容")
    private String content;
    @ApiModelProperty("隐患等级")
    private Integer level;
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DeviceUsageServiceImpl.java
@@ -290,7 +290,7 @@
//                List<Record> recordList = records.stream().filter(e -> taskIds.contains(e.getCheckTaskId())).toList();
//                Record record = recordList.stream().max(Comparator.comparing(Record::getCreateTime)).orElse(null);
                if (task1 != null && task1.getState() == 3) {
                if (task1 != null && (task1.getState() == 3 || Integer.valueOf(7).equals(task1.getState()))) {
                    deviceListVo.setCheckTime(task1.getDate().atStartOfDay());
                    deviceListVo.setCheckResult("已检查");
                } else {
ruoyi-system/src/main/resources/mapper/system/DeviceUsageMapper.xml
@@ -146,7 +146,7 @@
        <if test="query.projectId != null">
            and t2.project_id = #{query.projectId}
        </if>
        <if test="query.state ==4 ">
        <if test="query.state ==0 ">
            and t1.error_review_id is null
        </if>
        <if test="query.state ==1 ">
@@ -209,7 +209,7 @@
        <if test="query.projectId != null">
            and t2.project_id = #{query.projectId}
        </if>
        <if test="query.state ==4 ">
        <if test="query.state == 0">
            and t1.error_review_id is null
        </if>
        <if test="query.state ==1 ">
@@ -227,8 +227,19 @@
            or
            t5.name like CONCAT('%', #{query.content}, '%')
            or
            t5.description like CONCAT('%', #{query.content}, '%')
            or
            t1.remark like CONCAT('%', #{query.content}, '%')
            )
        </if>
        <if test="query.level != null">
            and t1.level = #{query.level}
        </if>
        <if test="query.startTime != null and query.startTime !='' ">
            and t1.create_time &gt;= #{query.startTime}
        </if>
        <if test="query.endTime != null and query.endTime !='' ">
            and #{query.endTime} &gt;= t1.create_time
        </if>
        order by t1.create_time desc
    </select>
@@ -256,16 +267,16 @@
        <if test="query.projectId != null">
            and t2.project_id = #{query.projectId}
        </if>
        <if test="query.state ==4 ">
        <if test="query.state == 0 ">
            and t1.error_review_id is null
        </if>
        <if test="query.state ==1 ">
        <if test="query.state == 1 ">
            and t6.state = 0
        </if>
        <if test="query.state ==2 ">
        <if test="query.state == 2 ">
            and t6.state = 1
        </if>
        <if test="query.state ==3 ">
        <if test="query.state == 3 ">
            and t6.state = 2
        </if>
@@ -274,9 +285,20 @@
            or
            t5.name like CONCAT('%', #{query.content}, '%')
            or
            t5.description like CONCAT('%', #{query.content}, '%')
            or
            t1.remark like CONCAT('%', #{query.content}, '%')
            )
        </if>
        <if test="query.level != null">
            and t1.level = #{query.level}
        </if>
        <if test="query.startTime != null and query.startTime !='' ">
            and t1.create_time &gt;= #{query.startTime}
        </if>
        <if test="query.endTime != null and query.endTime !='' ">
            and #{query.endTime} &gt;= t1.create_time
        </if>
        order by t1.create_time desc
    </select>