From 26ebef24f023a80f5be5ff27c93585f70688f6ee Mon Sep 17 00:00:00 2001 From: jinlin <jinlin> Date: 星期二, 22 十月 2024 14:45:39 +0800 Subject: [PATCH] 关于修改可靠性产品重复 --- modules/mainPart/src/main/resources/mapper/taskReliability/TaskDao.xml | 83 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 83 insertions(+), 0 deletions(-) diff --git a/modules/mainPart/src/main/resources/mapper/taskReliability/TaskDao.xml b/modules/mainPart/src/main/resources/mapper/taskReliability/TaskDao.xml new file mode 100644 index 0000000..3c8ebf3 --- /dev/null +++ b/modules/mainPart/src/main/resources/mapper/taskReliability/TaskDao.xml @@ -0,0 +1,83 @@ +<?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.TaskDao"> + + <select id="getList" resultType="com.zt.life.modules.mainPart.taskReliability.model.Task"> + select a.* + FROM + task a + <where> + a.is_delete = 0 + and a.product_id=${productId} + <if test="whereSql!=null"> + and ${whereSql} + </if> + </where> + <if test="orderBySql!=null"> + ORDER BY ${orderBySql} + </if> + </select> + <select id="getTaskList" resultType="com.zt.life.modules.mainPart.taskReliability.model.Task"> + select a.id,a.task_name as name + from task a + where + a.is_delete = 0 + and a.product_id=${productId} + </select> + + <select id="getTasks" resultType="com.zt.life.modules.mainPart.taskReliability.model.Task"> + select + a.* + FROM + task a + where + a.is_delete = 0 + <if test="productId!=null"> + and a.product_id=${productId} + </if> + <if test="taskId!=null"> + and a.id=${taskId} + </if> + ORDER BY a.task_sort + </select> + <select id="getTaskPhases" resultType="com.zt.life.modules.mainPart.taskReliability.model.TaskPhase"> + select + b.* + FROM + task a + inner join task_phase b on b.task_id=a.id + where + a.is_delete = 0 + and b.is_delete = 0 + <if test="productId!=null"> + and a.product_id=${productId} + </if> + <if test="taskId!=null"> + and a.id=${taskId} + </if> + ORDER BY a.task_sort, b.phase_sort + </select> + <select id="getTaskPhaseModels" resultType="com.zt.life.modules.mainPart.taskReliability.model.TaskPhaseModel"> + select + c.* + FROM + task a + inner join task_phase b on b.task_id=a.id + inner join task_phase_model c on c.phase_id=b.id + inner join operat_condit d on d.id=c.operat_condit_id + where + a.is_delete = 0 + and b.is_delete = 0 + and c.is_delete = 0 + and d.is_delete = 0 + <if test="productId!=null"> + and a.product_id=${productId} + and d.product_id=${productId} + </if> + <if test="taskId!=null"> + and a.id=${taskId} + </if> + ORDER BY a.task_sort, b.phase_sort + </select> +</mapper> -- Gitblit v1.9.1