| | |
| | | <?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.taskReliability.dao.TaskPhaseModelDao"> |
| | | <mapper namespace="com.zt.life.modules.mainPart.taskReliability.dao.TaskPhaseModelDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.taskReliability.model.TaskPhaseModel"> |
| | | SELECT a.id as productId, |
| | | a.`NAME` as `system`, |
| | | c.model_name, |
| | | b.model_id, |
| | | b.id |
| | | FROM product_model a |
| | | LEFT JOIN task_phase_model b |
| | | ON b.product_id = a.id |
| | | AND b.phase_id = ${phaseId} |
| | | LEFT JOIN model_rbd c ON c.id = b.model_id |
| | | WHERE a.pid = ${productId} |
| | | AND a.is_delete = 0 |
| | | <select id="getList" resultType="com.zt.life.modules.mainPart.taskReliability.model.TaskPhaseModel"> |
| | | SELECT b.id |
| | | , b.operat_condit_duration_rate |
| | | , a.NAME as operatConditName |
| | | , a.id as operatConditId |
| | | , case |
| | | when b.operat_condit_duration_rate >'0' then 1 |
| | | else 0 end as isCheck |
| | | FROM operat_condit a |
| | | left join task_phase_model b |
| | | on a.id = b.operat_condit_id and b.is_delete = 0 and b.phase_id = ${phaseId} |
| | | WHERE a.IS_DELETE = 0 |
| | | and a.product_id = ${productId} |
| | | order by a.CREATE_DATE |
| | | </select> |
| | | <select id="getListByPhaseId" resultType="com.zt.life.modules.mainPart.taskReliability.model.TaskPhaseModel"> |
| | | SELECT |
| | | a.* |
| | | FROM |
| | | task_phase_model a |
| | | where a.is_delete = 0 |
| | | and a.operat_condit_duration_rate > 0 |
| | | and a.phase_id=#{phaseId} |
| | | </select> |
| | | |
| | | </mapper> |