From 2a6c0b5cefd70e2828e87d6ade3d5f36f723ad7f Mon Sep 17 00:00:00 2001
From: songhuangfeng123 <shf18767906695@163.com>
Date: 星期二, 26 七月 2022 16:48:06 +0800
Subject: [PATCH] 应急队伍一览接口
---
incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/WorkInjuryDeclarationInfoMapper.xml | 42 +++++++++++++++++++++++++++++++++++-------
1 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/WorkInjuryDeclarationInfoMapper.xml b/incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/WorkInjuryDeclarationInfoMapper.xml
index e2dfa75..169bef9 100644
--- a/incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/WorkInjuryDeclarationInfoMapper.xml
+++ b/incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/WorkInjuryDeclarationInfoMapper.xml
@@ -16,9 +16,21 @@
</resultMap>
<select id="selectWorkInjuryDeclarationList" resultMap="WorkInjuryDeclarationInfoPageDOResult">
- select id,`declare_user_name`,`declare_department_id`,`accident_express_id` ,work_injury_type ,declare_date ,visit_hospital
- from work_injury_declaration where del_flag = 0
- <if test="query.accidentExpressId != null">and `accident_express_id` = #{query.accidentExpressId}</if>
+ SELECT
+ a.id,
+ a.`declare_user_name`,
+ a.`declare_department_id`,
+ a.`accident_express_id`,
+ a.work_injury_type,
+ a.declare_date,
+ a.visit_hospital,
+ b.accident_name AS accidentName
+ FROM
+ work_injury_declaration a
+ LEFT JOIN accident_express b ON a.accident_express_id = b.id
+ WHERE
+ a.del_flag = 0
+ <if test="query.accidentExpressId != null">and a.`accident_express_id` = #{query.accidentExpressId}</if>
</select>
<insert id="addWorkInjuryDeclaration" parameterType="com.gkhy.safePlatform.incidentManage.entity.WorkInjuryDeclarationInfo"
@@ -84,10 +96,26 @@
</resultMap>
<select id="selectWorkInjuryDeclarationById" resultMap="WorkInjuryDeclarationInfoDetailDOResult">
- select id ,declare_user_name ,`declare_user_gender`,`declare_department_id`,`accident_express_id`,`work_injury_type`,declare_date ,lost_time ,
- `visit_hospital`,`visit_result`,`matters_needing_attention`,`complete_materials`,remark
- from work_injury_declaration
- where del_flag = 0 and id = #{id}
+ SELECT
+ a.id,
+ a.declare_user_name,
+ a.`declare_user_gender`,
+ a.`declare_department_id`,
+ a.`accident_express_id`,
+ a.`work_injury_type`,
+ a.declare_date,
+ a.lost_time,
+ a.`visit_hospital`,
+ a.`visit_result`,
+ a.`matters_needing_attention`,
+ a.`complete_materials`,
+ a.remark,
+ b.accident_name AS accidentName,
+ b.occurrence_time AS occurrenceTime
+ FROM
+ work_injury_declaration a
+ LEFT JOIN accident_express b ON a.accident_express_id = b.id
+ WHERE del_flag = 0 and id = #{id}
</select>
<update id="updateWorkInjuryDeclaration" parameterType="com.gkhy.safePlatform.incidentManage.entity.WorkInjuryDeclarationInfo">
--
Gitblit v1.9.2