| | |
| | | </resultMap> |
| | | |
| | | <select id="selectAccidentReportList" resultMap="AccidentReportInfoPageDOResult"> |
| | | select id,`accident_express_id`,`accident_type`,`accident_grade` , status from accident_report where del_flag = 0 |
| | | <if test="query.status != null and query.status != ''">and `status` = #{query.status}</if> |
| | | SELECT |
| | | a.id, |
| | | a.`accident_express_id`, |
| | | a.`accident_type`, |
| | | a.`accident_grade`, |
| | | a.`status`, |
| | | b.accident_name as accidentName, |
| | | b.accident_department_id as accidentDepartmentId, |
| | | b.occurrence_place as occurrencePlace, |
| | | b.occurrence_time as occurrenceTime |
| | | FROM |
| | | accident_report a |
| | | LEFT JOIN accident_express b ON a.accident_express_id = b.id |
| | | WHERE |
| | | a.del_flag = 0 |
| | | <if test="query.status != null and query.status != ''">and a.`status` = #{query.status}</if> |
| | | </select> |
| | | |
| | | <insert id="addAccidentReport" parameterType="com.gkhy.safePlatform.incidentManage.entity.AccidentReportInfo" |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectAccidentReportById" resultMap="AccidentReportInfoDetailDOResult"> |
| | | select id ,status ,`accident_express_id`,`accident_type`,`accident_grade`,`economic_loss`,minor_injury_num ,serious_injury_num , |
| | | `death_num`,`accident_cause`,`report_deadline`,`accident_level`,accident_delay_apply ,comprehensive_analysis_direct , |
| | | `comprehensive_analysis_indirect`,`rectification_measures`,`accident_handling`,`fill_in_user_uid`,fill_in_time, |
| | | `relevant_personnel_records`,`other_materials` |
| | | from accident_report |
| | | where del_flag = 0 and id = #{id} |
| | | SELECT |
| | | a.id, |
| | | a.STATUS, |
| | | a.`accident_express_id`, |
| | | a.`accident_type`, |
| | | a.`accident_grade`, |
| | | a.`economic_loss`, |
| | | a.minor_injury_num, |
| | | a.serious_injury_num, |
| | | a.`death_num`, |
| | | a.`accident_cause`, |
| | | a.`report_deadline`, |
| | | a.`accident_level`, |
| | | a.accident_delay_apply, |
| | | a.comprehensive_analysis_direct, |
| | | a.`comprehensive_analysis_indirect`, |
| | | a.`rectification_measures`, |
| | | a.`accident_handling`, |
| | | a.`fill_in_user_uid`, |
| | | a.fill_in_time, |
| | | a.`relevant_personnel_records`, |
| | | a.`other_materials`, |
| | | b.accident_name AS accidentName, |
| | | b.accident_department_id AS accidentDepartmentId, |
| | | b.occurrence_place AS occurrencePlace, |
| | | b.occurrence_time AS occurrenceTime |
| | | FROM |
| | | accident_report a |
| | | LEFT JOIN accident_express b ON a.accident_express_id = b.id |
| | | WHERE del_flag = 0 and id = #{id} |
| | | </select> |
| | | |
| | | <update id="updateAccidentReport" parameterType="com.gkhy.safePlatform.incidentManage.entity.AccidentReportInfo"> |