| | |
| | | <insert id="insertBatch" useGeneratedKeys="true" keyProperty="id"> |
| | | INSERT INTO internal_audit_check_catalogue ( |
| | | check_id, |
| | | catalogue_Id |
| | | catalogue_Id, |
| | | point_key |
| | | ) VALUES |
| | | <foreach collection="catalogues" item="item" separator=","> |
| | | ( |
| | | #{item.checkId}, |
| | | #{item.catalogueId} |
| | | #{item.catalogueId}, |
| | | #{item.pointKey} |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | | <insert id="saveBatch"> |
| | | INSERT INTO internal_audit_check_catalogue ( |
| | | check_id, |
| | | catalogue_Id, |
| | | point_key, |
| | | find |
| | | ) VALUES |
| | | <foreach collection="list" item="item" separator=","> |
| | | ( |
| | | #{item.checkId}, |
| | | #{item.catalogueId}, |
| | | #{item.pointKey}, |
| | | #{item.find} |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | | <update id="updatebyCheckId"> |
| | | update internal_audit_check_catalogue set del_flag =1 where check_id = #{id} |
| | | </update> |
| | | <update id="updateCheckCatalogues"> |
| | | <foreach collection="list" item="item" separator=";"> |
| | | UPDATE internal_audit_check_catalogue |
| | | <set> |
| | | <if test="item.pointKey != null">`point_key` = #{item.pointKey},</if> |
| | | <if test="item.find != null">`find` = #{item.find},</if> |
| | | <if test="item.result != null">`result` = #{item.result},</if> |
| | | </set> |
| | | WHERE `id` = #{item.id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | <select id="selectByCheckIds" resultType="com.gkhy.exam.system.domain.InternalAuditCheckCatalogue"> |
| | |
| | | iacc.`id`, |
| | | iacc.`check_id`, |
| | | iacc.`catalogue_id`, |
| | | c.number, |
| | | c.mess, |
| | | iacc.`point_key`, |
| | | iacc.`find`, |
| | | iacc.`result`, |
| | | c.`clause_num` as number, |
| | | c.`name` as mess, |
| | | iacc.`del_flag` |
| | | FROM |
| | | `internal_audit_check_catalogue` iacc |
| | | LEFT JOIN catalogue c ON iacc.catalogue_id = c.id |
| | | LEFT JOIN sys_clause_management c ON iacc.catalogue_id = c.id |
| | | WHERE iacc.check_id IN |
| | | <foreach collection="checkIds" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | AND iacc.del_flag = 0 |
| | | ORDER BY |
| | | CAST( SUBSTRING_INDEX( number, '.', 1 ) AS UNSIGNED ) ASC, |
| | | CAST( IFNULL( SUBSTRING_INDEX( SUBSTRING_INDEX( number, '.', 2 ), '.', - 1 ), 0 ) AS UNSIGNED ) ASC, |
| | | CAST( IFNULL( SUBSTRING_INDEX( SUBSTRING_INDEX( number, '.', 3 ), '.', - 1 ), 0 ) AS UNSIGNED ) ASC; |
| | | </select> |
| | | </mapper> |