jinlin
2024-07-30 481b82866b1714f79dc35ecf2bc26436b027954e
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
53
54
55
56
57
58
<?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.zt.life.modules.mainPart.taskReliability.dao.SimulatAssessDao">
 
    <select id="getList" resultType="com.zt.life.modules.mainPart.taskReliability.model.SimulatAssess">
        select *
        from simulat_assess
        where product_id = ${productId}
          and task_model_id = ${taskModelId}
          and IS_DELETE = 0
        order by name desc
    </select>
    <select id="getNumById" resultType="java.lang.Integer">
        select COUNT(*)
        from simulat_assess
        where product_id = ${productId}
          and task_model_id = ${taskModelId}
          and IS_DELETE = 0
    </select>
    <select id="getParams" resultType="com.zt.life.modules.mainPart.taskReliability.model.SimulatAssess">
        select a.sampl_period, a.simulat_frequency
        from simulat_assess a
        where a.id = ${id}
          and a.task_model_id = ${taskModelId}
          and a.IS_DELETE = 0
    </select>
    <select id="getChildren" resultType="com.zt.life.modules.mainPart.taskReliability.dto.ProductStatusDto">
        select * from (
                          SELECT f.id,f.name, 0 as sort
                          FROM product_model f
                          WHERE f.id = 1813102074724945921
                            AND f.is_delete = 0
                          union
                          SELECT f.id,f.name,f.sort
                          FROM `task_phase` a,
                               task_phase_model b,
                               operat_condit c,
                               operat_condit_model d,
                               model_rbd_node e,
                               product_model f
                          WHERE a.task_id = ${taskId}
                            and d.product_id = ${productId}
                            AND a.is_delete = 0
                            AND b.is_delete = 0
                            AND c.id = b.operat_condit_id
                            AND c.is_delete = 0
                            AND d.operat_condit_id = c.id
                            AND d.is_delete = 0
                            AND e.model_id = d.model_id
                            AND e.is_delete = 0
                            AND f.id = e.node_id
                            AND f.is_delete = 0
                          GROUP BY f.id,f.name,f.sort
                      ) as f
        ORDER BY f.sort
    </select>
</mapper>