| | |
| | | <if test="accidentHandling != null and accidentHandling != ''">accident_handling,</if> |
| | | <if test="fillInUserUid != null ">fill_in_user_uid,</if> |
| | | <if test="fillInTime != null ">fill_in_time,</if> |
| | | <if test="fillInUserName != null and fillInUserName != ''">fill_in_user_name,</if> |
| | | <if test="relevantPersonnelRecords != null and relevantPersonnelRecords != ''">relevant_personnel_records,</if> |
| | | <if test="otherMaterials != null and otherMaterials != ''">other_materials,</if> |
| | | </trim> |
| | |
| | | <if test="accidentHandling != null and accidentHandling != ''">#{accidentHandling},</if> |
| | | <if test="fillInUserUid != null ">#{fillInUserUid},</if> |
| | | <if test="fillInTime != null ">#{fillInTime},</if> |
| | | <if test="fillInUserName != null and fillInUserName != ''">#{fillInUserName},</if> |
| | | <if test="relevantPersonnelRecords != null and relevantPersonnelRecords != ''">#{relevantPersonnelRecords},</if> |
| | | <if test="otherMaterials != null and otherMaterials != ''">#{otherMaterials},</if> |
| | | </trim> |
| | |
| | | <result column="rectification_measures" property="rectificationMeasures"/> |
| | | <result column="accident_handling" property="accidentHandling"/> |
| | | <result column="fill_in_user_uid" property="fillInUserUid"/> |
| | | <result column="fill_in_user_name" property="fillInUserName"/> |
| | | <result column="fill_in_time" property="fillInTime"/> |
| | | <result column="relevant_personnel_records" property="relevantPersonnelRecords"/> |
| | | <result column="other_materials" property="otherMaterials"/> |
| | |
| | | a.`accident_handling`, |
| | | a.`fill_in_user_uid`, |
| | | a.fill_in_time, |
| | | a.fill_in_user_name, |
| | | a.`relevant_personnel_records`, |
| | | a.`other_materials`, |
| | | b.accident_name AS accidentName, |
| | |
| | | <if test="accidentHandling != null and accidentHandling != ''">accident_handling = #{accidentHandling},</if> |
| | | <if test="fillInUserUid != null ">fill_in_user_uid = #{fillInUserUid},</if> |
| | | <if test="fillInTime != null ">fill_in_time = #{fillInTime},</if> |
| | | <if test="fillInUserName != null and fillInUserName != ''">fill_in_user_name = #{fillInUserName},</if> |
| | | <if test="relevantPersonnelRecords != null and relevantPersonnelRecords != ''">relevant_personnel_records = #{relevantPersonnelRecords},</if> |
| | | <if test="otherMaterials != null and otherMaterials != ''">other_materials = #{otherMaterials},</if> |
| | | </trim> |
| | |
| | | <update id="deleteAccidentReportById"> |
| | | update accident_report set del_flag = 1 where id = #{id} |
| | | </update> |
| | | |
| | | |
| | | <resultMap type="com.gkhy.safePlatform.incidentManage.entity.AccidentReportCount" |
| | | id="emergencyDrillExecuteCountChart"> |
| | | <result column="num" property="num"/> |
| | | <result column="name" property="name"/> |
| | | <result column="minorInjuryNum" property="minorInjuryNum"/> |
| | | <result column="seriousInjuryNum" property="seriousInjuryNum"/> |
| | | <result column="deathNum" property="deathNum"/> |
| | | <result column="economicLoss" property="economicLoss"/> |
| | | </resultMap> |
| | | <select id="selectByTimeAndType" resultMap="emergencyDrillExecuteCountChart"> |
| | | SELECT |
| | | a.accident_level AS `name`, |
| | | count( 0 ) AS num, |
| | | sum( economic_loss ) AS economicLoss, |
| | | sum( minor_injury_num ) AS minorInjuryNum, |
| | | sum( serious_injury_num ) AS seriousInjuryNum, |
| | | sum( death_num ) AS deathNum |
| | | FROM |
| | | `accident_report` a |
| | | WHERE |
| | | del_flag = 0 |
| | | AND a.gmt_create <![CDATA[ >= ]]> #{query.startTime} |
| | | AND a.gmt_create <![CDATA[ <= ]]> #{query.endTime} |
| | | <if test="query.level != null and query.level != ''" >and b.drill_level = #{query.level}</if> |
| | | GROUP BY |
| | | accident_level |
| | | </select> |
| | | </mapper> |