From 664db98c9e8595ce4dd636a27f480e3a08b81ff5 Mon Sep 17 00:00:00 2001 From: xyc <jc_xiong@hotmail.com> Date: 星期五, 21 二月 2025 11:13:51 +0800 Subject: [PATCH] 新增可忽略的维修时间 --- modules/mainPart/src/main/resources/mapper/taskReliability/OperatConditModelDao.xml | 43 ++++++++++++++++++++++++++++--------------- 1 files changed, 28 insertions(+), 15 deletions(-) diff --git a/modules/mainPart/src/main/resources/mapper/taskReliability/OperatConditModelDao.xml b/modules/mainPart/src/main/resources/mapper/taskReliability/OperatConditModelDao.xml index e2c4543..ebfe0a8 100644 --- a/modules/mainPart/src/main/resources/mapper/taskReliability/OperatConditModelDao.xml +++ b/modules/mainPart/src/main/resources/mapper/taskReliability/OperatConditModelDao.xml @@ -23,27 +23,16 @@ ON b.product_id = a.id AND b.operat_condit_id = ${operatConditId} LEFT JOIN model_rbd c ON c.id = b.model_id - WHERE a.id in ( - SELECT DATA.id - FROM ( - SELECT @ids as ids, - (SELECT @ids := GROUP_CONCAT(id) - FROM product_model - WHERE FIND_IN_SET(pid, @ids) - ) as cids - FROM product_model - WHERE @ids IS NOT NULL AND @ids := ${productId} - ) id, - product_model DATA - WHERE FIND_IN_SET(DATA.id, ID.ids) - ) + Where + a.ship_id = ${productId} and a.product_type in (4, 3, 2, 10) AND a.is_delete = 0 + ORDER BY a.product_type, a.sort </select> <select id="getModelList" resultType="com.zt.life.modules.mainPart.taskReliability.model.ModelRbd"> select * from model_rbd - where product_id = ${productId} + where ship_id = ${productId} and is_delete = 0 </select> <select id="getModelNodes" resultType="com.zt.life.modules.mainPart.taskReliability.model.ModelNodes"> @@ -52,4 +41,28 @@ group by model_id </select> + <select id="getGKModelTrees" resultType="com.zt.life.modules.mainPart.taskReliability.model.OperatConditModel"> + select + a.* + FROM + operat_condit_model a + inner join operat_condit b on b.id=a.operat_condit_id + where + a.is_delete = 0 + and b.is_delete = 0 + <if test="productId!=null"> + and b.product_id=#{productId} + </if> + ORDER BY a.operat_condit_id, a.product_id + </select> + <select id="getGKModelAssembled" resultType="com.zt.life.modules.mainPart.taskReliability.model.OperatConditModel"> + select + a.* + FROM + operat_condit_model a + where + a.is_delete = 0 + and a.is_disabled = 0 + and a.operat_condit_id=#{gkId} + </select> </mapper> -- Gitblit v1.9.1