xyc
2025-02-21 664db98c9e8595ce4dd636a27f480e3a08b81ff5
modules/mainPart/src/main/resources/mapper/taskReliability/SimulatAssessDao.xml
@@ -27,18 +27,19 @@
    <select id="getChildren" resultType="com.zt.life.modules.mainPart.taskReliability.dto.ProductStatusDto">
        select *
        from (
                 SELECT f.id, f.name, 0 as sort
                 SELECT f.id, f.name, 0 as sort, 1 as sameSbNum,f.product_type
                 FROM product_model f
                 WHERE f.id = ${productId}
                   AND f.is_delete = 0
                 union
                 SELECT f.id, f.name, f.sort
                 SELECT f.id, f.name, f.sort, g.basic_unit_num as sameSbNum,f.product_type
                 FROM `task_phase` a,
                      task_phase_model b,
                      operat_condit c,
                      operat_condit_model d,
                      model_rbd_node e,
                      product_model f
                      product_model f,
                      param_data g
                 WHERE a.task_id = ${taskId}
                   and d.product_id = ${productId}
                   AND a.is_delete = 0
@@ -51,6 +52,8 @@
                   AND e.is_delete = 0
                   AND f.id = e.node_id
                   AND f.is_delete = 0
                   AND g.product_id = f.id
                   AND g.is_delete = 0
                 GROUP BY f.id, f.name, f.sort
             ) as f
        ORDER BY f.sort
@@ -65,7 +68,7 @@
    </select>
    <select id="getTimeDiagram" resultType="com.zt.life.modules.mainPart.taskReliability.model.TimeDiagram">
        select *
        from time_diagram
        from time_diagram_temp
        where is_delete = 0
        <if test="projectId!=null and projectId!=''">
            and PROJECT_ID = #{projectId}
@@ -186,4 +189,59 @@
        order by CREATE_DATE desc
        limit 1
    </select>
    <select id="getModel" resultType="com.zt.life.modules.mainPart.taskReliability.model.OperatConditModel">
        SELECT d.product_id,
               d.model_id,
               e.content
        FROM task a,
             task_phase b,
             `task_phase_model` c,
             operat_condit_model d,
             model_rbd e
        WHERE a.id = ${taskId}
          AND a.IS_DELETE = 0
          AND b.task_id = a.id
          AND b.IS_DELETE = 0
          AND c.phase_id = b.id
          AND c.operat_condit_duration_rate > 0
          AND c.IS_DELETE = 0
          AND d.operat_condit_id = c.operat_condit_id
          AND d.IS_DELETE = 0
          AND e.id = d.model_id
          AND e.IS_DELETE = 0
    </select>
    <select id="getNode" resultType="com.zt.life.modules.mainPart.taskReliability.dto.verifyDto">
        SELECT c.`NAME`,
               c.id,
               b.task_mtbcf_regulate as mtbf
        FROM `model_rbd_node` a,
             param_data b,
             product_model c
        WHERE a.node_id = c.id
          and a.model_id = ${modelId}
          AND c.id = b.product_id
          AND a.is_delete = 0
          AND b.is_delete = 0
          AND c.is_delete = 0
    </select>
    <select id="getVoteNum" resultType="java.lang.Integer">
        select vote_num
        from algorithm
        where is_delete = 0
          and model_id = ${modelId}
          and model_type = 'vote'
          and vote_num is not null
        limit 1
    </select>
    <select id="getProcessList" resultType="com.zt.life.modules.mainPart.taskReliability.model.SimulatAssess">
        select *
        from simulat_assess
        where IS_DELETE = 0
          and pid is not null
        <if test="isAlive">
          and process_is_alive=1
        </if>
        order by process_start_time desc
    </select>
</mapper>