From 4df461673ff8b350df032429c07bc973a3b83c7f Mon Sep 17 00:00:00 2001
From: xyc <jc_xiong@hotmail.com>
Date: 星期五, 02 八月 2024 09:58:35 +0800
Subject: [PATCH] 修改仿真后台

---
 modules/mainPart/src/main/resources/mapper/taskReliability/SimulatAssessDao.xml |   62 +++++++++++++++++++++++++------
 1 files changed, 50 insertions(+), 12 deletions(-)

diff --git a/modules/mainPart/src/main/resources/mapper/taskReliability/SimulatAssessDao.xml b/modules/mainPart/src/main/resources/mapper/taskReliability/SimulatAssessDao.xml
index 06f1274..81f5f6a 100644
--- a/modules/mainPart/src/main/resources/mapper/taskReliability/SimulatAssessDao.xml
+++ b/modules/mainPart/src/main/resources/mapper/taskReliability/SimulatAssessDao.xml
@@ -4,17 +4,55 @@
 <mapper namespace="com.zt.life.modules.mainPart.taskReliability.dao.SimulatAssessDao">
 
     <select id="getList" resultType="com.zt.life.modules.mainPart.taskReliability.model.SimulatAssess">
-        select a.*
-        from simulat_assess a
-        <where>
-            a.is_delete = 0
-            <if test="whereSql!=null">
-                and ${whereSql}
-            </if>
-        </where>
-        <if test="orderBySql!=null">
-            ORDER BY ${orderBySql}
-        </if>
+        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>

--
Gitblit v1.9.1