|
@@ -7,17 +7,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<resultMap type="TSifOverview" id="TSifOverviewResult">
|
|
<resultMap type="TSifOverview" id="TSifOverviewResult">
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
<result property="sifNo" column="sif_no" />
|
|
<result property="sifNo" column="sif_no" />
|
|
|
|
+ <result property="plant" column="plant" />
|
|
|
|
+ <result property="sifTag" column="sif_tag" />
|
|
<result property="deviation" column="deviation" />
|
|
<result property="deviation" column="deviation" />
|
|
- <result property="sheNo" column="she_no" />
|
|
|
|
- <result property="cac" column="cac" />
|
|
|
|
- <result property="requriedSil" column="requried_sil" />
|
|
|
|
- <result property="sensors" column="sensors" />
|
|
|
|
- <result property="sVoting" column="s_voting" />
|
|
|
|
- <result property="finalElements" column="final_elements" />
|
|
|
|
- <result property="fVoting" column="f_voting" />
|
|
|
|
- <result property="action" column="action" />
|
|
|
|
- <result property="achievedSil" column="achieved_sil" />
|
|
|
|
- <result property="pfdCr" column="pfd_cr" />
|
|
|
|
|
|
+ <result property="riskAnalysis" column="risk_analysis" />
|
|
|
|
+ <result property="causeConsequence" column="cause_consequence" />
|
|
|
|
+ <result property="requiredSil" column="required_sil" />
|
|
|
|
+ <result property="acheievedSil" column="acheieved_sil" />
|
|
|
|
+ <result property="ver" column="ver" />
|
|
|
|
+ <result property="pfdavg" column="pfdavg" />
|
|
|
|
+ <result property="remarks" column="remarks" />
|
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
|
+ <result property="createrCode" column="creater_code" />
|
|
|
|
+ <result property="createdate" column="createdate" />
|
|
|
|
+ <result property="updaterCode" column="updater_code" />
|
|
|
|
+ <result property="updatedate" column="updatedate" />
|
|
|
|
+ <result property="deptId" column="dept_id" />
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <resultMap type="TSifVo" id="TSifVoResult">
|
|
|
|
+ <result property="id" column="id" />
|
|
|
|
+ <result property="sifNo" column="sif_no" />
|
|
|
|
+ <result property="plant" column="plant" />
|
|
|
|
+ <result property="sifTag" column="sif_tag" />
|
|
|
|
+ <result property="deviation" column="deviation" />
|
|
|
|
+ <result property="riskAnalysis" column="risk_analysis" />
|
|
|
|
+ <result property="causeConsequence" column="cause_consequence" />
|
|
|
|
+ <result property="requiredSil" column="required_sil" />
|
|
|
|
+ <result property="acheievedSil" column="acheieved_sil" />
|
|
|
|
+ <result property="ver" column="ver" />
|
|
|
|
+ <result property="pfdavg" column="pfdavg" />
|
|
|
|
+ <result property="sensorTag" column="sensor_tag" />
|
|
|
|
+ <result property="type" column="type" />
|
|
|
|
+ <result property="service" column="service" />
|
|
|
|
+ <result property="votingQ" column="voting_q" />
|
|
|
|
+ <result property="condition" column="condition" />
|
|
|
|
+ <result property="mainPti" column="main_pti" />
|
|
|
|
+ <result property="finalElementTag" column="final_element_tag" />
|
|
|
|
+ <result property="votingH" column="voting_h" />
|
|
|
|
+ <result property="aciton" column="aciton" />
|
|
|
|
+ <result property="filter" column="filter" />
|
|
<result property="remarks" column="remarks" />
|
|
<result property="remarks" column="remarks" />
|
|
<result property="delFlag" column="del_flag" />
|
|
<result property="delFlag" column="del_flag" />
|
|
<result property="createrCode" column="creater_code" />
|
|
<result property="createrCode" column="creater_code" />
|
|
@@ -28,30 +57,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTSifOverviewVo">
|
|
<sql id="selectTSifOverviewVo">
|
|
- select id, sif_no, deviation, she_no, cac, requried_sil, sensors, s_voting, final_elements, f_voting, action, achieved_sil, pfd_cr, remarks, del_flag, creater_code, createdate, updater_code, updatedate, dept_id from t_sif_overview
|
|
|
|
|
|
+ select id, sif_no, plant, sif_tag, deviation, risk_analysis, cause_consequence, required_sil, acheieved_sil, ver, pfdavg, remarks, del_flag, creater_code, createdate, updater_code, updatedate, dept_id from t_sif_overview
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
- <select id="selectTSifOverviewList" parameterType="TSifOverview" resultMap="TSifOverviewResult">
|
|
|
|
- <include refid="selectTSifOverviewVo"/>
|
|
|
|
- <where>
|
|
|
|
|
|
+ <sql id="selectTSifVoVo">
|
|
|
|
+ SELECT a.id, a.sif_no, a.plant, a.sif_tag, a.deviation, a.risk_analysis, a.cause_consequence, a.required_sil, a.acheieved_sil, a.ver, a.pfdavg, a.remarks, a.del_flag, a.creater_code, a.createdate, a.updater_code, a.updatedate, a.dept_id, b.sensor_tag, b.type, b.service, b.voting_q, b.`condition`, b.main_pti, b.final_element_tag, b.voting_h, b.aciton, b.`filter` FROM t_sif_overview a LEFT JOIN t_sis_record b on a.id=b.sis_id
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <select id="selectTSifOverviewList" parameterType="TSifOverview" resultMap="TSifVoResult">
|
|
|
|
+ <include refid="selectTSifVoVo"/>
|
|
|
|
+ <where>
|
|
<if test="sifNo != null and sifNo != ''"> and sif_no = #{sifNo}</if>
|
|
<if test="sifNo != null and sifNo != ''"> and sif_no = #{sifNo}</if>
|
|
|
|
+ <if test="plant != null and plant != ''"> and plant = #{plant}</if>
|
|
|
|
+ <if test="sifTag != null and sifTag != ''"> and sif_tag = #{sifTag}</if>
|
|
<if test="deviation != null and deviation != ''"> and deviation = #{deviation}</if>
|
|
<if test="deviation != null and deviation != ''"> and deviation = #{deviation}</if>
|
|
- <if test="sheNo != null and sheNo != ''"> and she_no = #{sheNo}</if>
|
|
|
|
- <if test="cac != null and cac != ''"> and cac = #{cac}</if>
|
|
|
|
- <if test="requriedSil != null and requriedSil != ''"> and requried_sil = #{requriedSil}</if>
|
|
|
|
- <if test="sensors != null and sensors != ''"> and sensors = #{sensors}</if>
|
|
|
|
- <if test="sVoting != null and sVoting != ''"> and s_voting = #{sVoting}</if>
|
|
|
|
- <if test="finalElements != null and finalElements != ''"> and final_elements = #{finalElements}</if>
|
|
|
|
- <if test="fVoting != null and fVoting != ''"> and f_voting = #{fVoting}</if>
|
|
|
|
- <if test="action != null and action != ''"> and action = #{action}</if>
|
|
|
|
- <if test="achievedSil != null and achievedSil != ''"> and achieved_sil = #{achievedSil}</if>
|
|
|
|
- <if test="pfdCr != null and pfdCr != ''"> and pfd_cr = #{pfdCr}</if>
|
|
|
|
- <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
|
|
|
- <if test="createrCode != null and createrCode != ''"> and creater_code = #{createrCode}</if>
|
|
|
|
- <if test="createdate != null "> and createdate = #{createdate}</if>
|
|
|
|
- <if test="updaterCode != null and updaterCode != ''"> and updater_code = #{updaterCode}</if>
|
|
|
|
- <if test="updatedate != null "> and updatedate = #{updatedate}</if>
|
|
|
|
- <if test="deptId != null "> and dept_id = #{deptId}</if>
|
|
|
|
|
|
+ <if test="riskAnalysis != null and riskAnalysis != ''"> and risk_analysis = #{riskAnalysis}</if>
|
|
|
|
+ <if test="causeConsequence != null and causeConsequence != ''"> and cause_consequence = #{causeConsequence}</if>
|
|
|
|
+ <if test="requiredSil != null and requiredSil != ''"> and required_sil = #{requiredSil}</if>
|
|
|
|
+ <if test="acheievedSil != null and acheievedSil != ''"> and acheieved_sil = #{acheievedSil}</if>
|
|
|
|
+ <if test="ver != null and ver != ''"> and ver = #{ver}</if>
|
|
|
|
+ <if test="pfdavg != null and pfdavg != ''"> and pfdavg = #{pfdavg}</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -64,17 +90,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
insert into t_sif_overview
|
|
insert into t_sif_overview
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="sifNo != null">sif_no,</if>
|
|
<if test="sifNo != null">sif_no,</if>
|
|
|
|
+ <if test="plant != null">plant,</if>
|
|
|
|
+ <if test="sifTag != null">sif_tag,</if>
|
|
<if test="deviation != null">deviation,</if>
|
|
<if test="deviation != null">deviation,</if>
|
|
- <if test="sheNo != null">she_no,</if>
|
|
|
|
- <if test="cac != null">cac,</if>
|
|
|
|
- <if test="requriedSil != null">requried_sil,</if>
|
|
|
|
- <if test="sensors != null">sensors,</if>
|
|
|
|
- <if test="sVoting != null">s_voting,</if>
|
|
|
|
- <if test="finalElements != null">final_elements,</if>
|
|
|
|
- <if test="fVoting != null">f_voting,</if>
|
|
|
|
- <if test="action != null">action,</if>
|
|
|
|
- <if test="achievedSil != null">achieved_sil,</if>
|
|
|
|
- <if test="pfdCr != null">pfd_cr,</if>
|
|
|
|
|
|
+ <if test="riskAnalysis != null">risk_analysis,</if>
|
|
|
|
+ <if test="causeConsequence != null">cause_consequence,</if>
|
|
|
|
+ <if test="requiredSil != null">required_sil,</if>
|
|
|
|
+ <if test="acheievedSil != null">acheieved_sil,</if>
|
|
|
|
+ <if test="ver != null">ver,</if>
|
|
|
|
+ <if test="pfdavg != null">pfdavg,</if>
|
|
<if test="remarks != null">remarks,</if>
|
|
<if test="remarks != null">remarks,</if>
|
|
<if test="delFlag != null">del_flag,</if>
|
|
<if test="delFlag != null">del_flag,</if>
|
|
<if test="createrCode != null">creater_code,</if>
|
|
<if test="createrCode != null">creater_code,</if>
|
|
@@ -85,17 +109,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="sifNo != null">#{sifNo},</if>
|
|
<if test="sifNo != null">#{sifNo},</if>
|
|
|
|
+ <if test="plant != null">#{plant},</if>
|
|
|
|
+ <if test="sifTag != null">#{sifTag},</if>
|
|
<if test="deviation != null">#{deviation},</if>
|
|
<if test="deviation != null">#{deviation},</if>
|
|
- <if test="sheNo != null">#{sheNo},</if>
|
|
|
|
- <if test="cac != null">#{cac},</if>
|
|
|
|
- <if test="requriedSil != null">#{requriedSil},</if>
|
|
|
|
- <if test="sensors != null">#{sensors},</if>
|
|
|
|
- <if test="sVoting != null">#{sVoting},</if>
|
|
|
|
- <if test="finalElements != null">#{finalElements},</if>
|
|
|
|
- <if test="fVoting != null">#{fVoting},</if>
|
|
|
|
- <if test="action != null">#{action},</if>
|
|
|
|
- <if test="achievedSil != null">#{achievedSil},</if>
|
|
|
|
- <if test="pfdCr != null">#{pfdCr},</if>
|
|
|
|
|
|
+ <if test="riskAnalysis != null">#{riskAnalysis},</if>
|
|
|
|
+ <if test="causeConsequence != null">#{causeConsequence},</if>
|
|
|
|
+ <if test="requiredSil != null">#{requiredSil},</if>
|
|
|
|
+ <if test="acheievedSil != null">#{acheievedSil},</if>
|
|
|
|
+ <if test="ver != null">#{ver},</if>
|
|
|
|
+ <if test="pfdavg != null">#{pfdavg},</if>
|
|
<if test="remarks != null">#{remarks},</if>
|
|
<if test="remarks != null">#{remarks},</if>
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
<if test="createrCode != null">#{createrCode},</if>
|
|
<if test="createrCode != null">#{createrCode},</if>
|
|
@@ -110,17 +132,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
update t_sif_overview
|
|
update t_sif_overview
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="sifNo != null">sif_no = #{sifNo},</if>
|
|
<if test="sifNo != null">sif_no = #{sifNo},</if>
|
|
|
|
+ <if test="plant != null">plant = #{plant},</if>
|
|
|
|
+ <if test="sifTag != null">sif_tag = #{sifTag},</if>
|
|
<if test="deviation != null">deviation = #{deviation},</if>
|
|
<if test="deviation != null">deviation = #{deviation},</if>
|
|
- <if test="sheNo != null">she_no = #{sheNo},</if>
|
|
|
|
- <if test="cac != null">cac = #{cac},</if>
|
|
|
|
- <if test="requriedSil != null">requried_sil = #{requriedSil},</if>
|
|
|
|
- <if test="sensors != null">sensors = #{sensors},</if>
|
|
|
|
- <if test="sVoting != null">s_voting = #{sVoting},</if>
|
|
|
|
- <if test="finalElements != null">final_elements = #{finalElements},</if>
|
|
|
|
- <if test="fVoting != null">f_voting = #{fVoting},</if>
|
|
|
|
- <if test="action != null">action = #{action},</if>
|
|
|
|
- <if test="achievedSil != null">achieved_sil = #{achievedSil},</if>
|
|
|
|
- <if test="pfdCr != null">pfd_cr = #{pfdCr},</if>
|
|
|
|
|
|
+ <if test="riskAnalysis != null">risk_analysis = #{riskAnalysis},</if>
|
|
|
|
+ <if test="causeConsequence != null">cause_consequence = #{causeConsequence},</if>
|
|
|
|
+ <if test="requiredSil != null">required_sil = #{requiredSil},</if>
|
|
|
|
+ <if test="acheievedSil != null">acheieved_sil = #{acheievedSil},</if>
|
|
|
|
+ <if test="ver != null">ver = #{ver},</if>
|
|
|
|
+ <if test="pfdavg != null">pfdavg = #{pfdavg},</if>
|
|
<if test="remarks != null">remarks = #{remarks},</if>
|
|
<if test="remarks != null">remarks = #{remarks},</if>
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
<if test="createrCode != null">creater_code = #{createrCode},</if>
|
|
<if test="createrCode != null">creater_code = #{createrCode},</if>
|