| | |
| | | <select id="getBySafetySelfInspectionId" resultMap="BaseResultMap"> |
| | | select * from safety_self_inspection_item where valid_flag = 1 and safety_self_inspection_id=#{safetySelfInspectionId} |
| | | </select> |
| | | <select id="getBySafetySelfInspectionId2" resultType="com.gk.hotwork.Domain.SafetySelfInspectionItem"> |
| | | SELECT |
| | | ss.* , |
| | | si.element_a, |
| | | si.element_b, |
| | | si.element_c |
| | | FROM |
| | | safety_self_inspection_item ss |
| | | LEFT JOIN safety_inspection_item si on si.id = ss.safety_inspection_item_id |
| | | WHERE |
| | | ss.valid_flag = 1 |
| | | and ss.safety_self_inspection_id = #{safetySelfInspectionId} |
| | | </select> |
| | | |
| | | <update id="deleteById"> |
| | | update safety_self_inspection_item set |
| | |
| | | b.enterprise_standard AS enterpriseStandard, |
| | | b.review_method AS reviewMethod, |
| | | b.veto AS veto, |
| | | b.element_c as elementC, |
| | | c.id AS elementA, |
| | | c.NAME AS elementAName, |
| | | c.weight AS elementAWeight, |
| | |
| | | FROM safety_self_inspection_item WHERE valid_flag = 1 |
| | | |
| | | </select> |
| | | <update id="updateBatch"> |
| | | <foreach collection="itemList" item="item" index="index" open="" close="" separator=";"> |
| | | update safety_self_inspection_item |
| | | set |
| | | expert_ids=#{item.expertIds}, |
| | | expert_names=#{item.expertNames}, |
| | | update_time=#{item.updateTime}, |
| | | update_by=#{item.updateBy} |
| | | where id=#{item.id} |
| | | </foreach> |
| | | |
| | | </update> |
| | | |
| | | |
| | | </mapper> |