songhuangfeng123
2022-07-21 73bec5d5d03df5855eb74c8144934541efc8eecd
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">