liujie
2026-01-29 2dee667a20caf3dca8e62f326bc9b141ef73ca2d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.ProjectMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.system.model.Project">
        <id column="id" property="id" />
        <result column="create_time" property="createTime" />
        <result column="deleted" property="deleted" />
        <result column="name" property="name" />
        <result column="update_time" property="updateTime" />
        <result column="address_info" property="addressInfo" />
        <result column="branch_company" property="branchCompany" />
        <result column="construction_company_info" property="constructionCompanyInfo" />
        <result column="construction_license" property="constructionLicense" />
        <result column="department_path" property="departmentPath" />
        <result column="development_company_info" property="developmentCompanyInfo" />
        <result column="item_code" property="itemCode" />
        <result column="project_cost" property="projectCost" />
        <result column="supervisor_company_info" property="supervisorCompanyInfo" />
        <result column="type" property="type" />
        <result column="usage_type" property="usageType" />
        <result column="creator_id" property="creatorId" />
        <result column="client_id" property="clientId" />
        <result column="permission" property="permission" />
    </resultMap>
    <select id="getDeviceDetailCheckList" resultType="com.ruoyi.system.vo.DeviceDetailCheckListVo">
            select t1.id,t2.name planName,t2.type planType,t1.date checkTime,t1.system_fuzzy fuzzyScore,t1.system_score score,t3.risk_level riskLevel,
                   t3.contain_device_res ,t3.contain_system_res,t2.id planId
            from task t1
            left join plan t2 on t1.plan_id = t2.id
            left join eval_result t3 on t1.id = t3.check_task_id
            where t1.project_id = #{query.projectId}
            <if test="query.planName != null and query.planName != ''">
                and t2.name like concat('%',#{query.planName},'%')
            </if>
            <if test="query.planType != null">
                and t2.type = #{query.planType}
            </if>
            <if test="query.startTime != null and query.startTime != ''">
                and t1.date >= #{query.startTime}
            </if>
            <if test="query.endTime != null and query.endTime != ''">
                and  #{query.endTime} >=t1.date
            </if>
            GROUP BY t2.id
            order by t1.date desc
 
 
    </select>
 
</mapper>