123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
- <mapper namespace="com.zhyc.xps.aqpt.mapper.EntDangerMapper">
- <resultMap id="DangerDtoResultMap" type="com.zhyc.xps.aqpt.dto.EntDangerDto">
- <result column="oc_id" property="ocId" jdbcType="BIGINT" /><!--单位ID-->
- <result column="danger_id" property="dangerId" jdbcType="BIGINT" /><!--隐患ID-->
- <result column="danger_source" property="dangerSource" jdbcType="BIGINT" /><!--隐患来源-->
- <result column="danger_code" property="dangerCode" jdbcType="VARCHAR" /><!--编码-->
- <result column="danger_title" property="dangerTitle" jdbcType="VARCHAR" /><!--标题-->
- <result column="danger_desc" property="dangerDesc" jdbcType="VARCHAR" /><!--说明-->
- <result column="danger_cat_id" property="dangerCatId" jdbcType="BIGINT" /><!--类别ID-->
- <result column="danger_cat_title" property="dangerCatTitle" jdbcType="VARCHAR" />
- <result column="danger_level" property="dangerLevel" jdbcType="BIGINT" /><!--隐患级别-->
- <result column="danger_deadline" property="dangerDeadLine" jdbcType="DATE" /><!--整改限期-->
- <result column="finish_time" property="finishTime" jdbcType="DATE" /><!--最终完成时间-->
- <result column="risk_point_id" property="riskPointId" jdbcType="BIGINT" /><!--风险点-->
- <result column="risk_point_title" property="riskPointTitle" jdbcType="VARCHAR" />
- <result column="hazard_id" property="hazardId" jdbcType="BIGINT" /><!--危险源-->
- <result column="hazard_title" property="hazardTitle" jdbcType="VARCHAR" /><!--危险源名称-->
- <result column="risk_id" property="riskId" jdbcType="BIGINT" /><!--风险ID-->
- <result column="risk_title" property="riskTitle" jdbcType="VARCHAR" /><!--危险源名称-->
- <result column="measure_id" property="measureId" jdbcType="BIGINT" /><!--措施ID-->
- <result column="submit_group_id" property="submitGroupId" jdbcType="BIGINT" /><!--提交人部门-->
- <result column="submit_position_id" property="submitPositionId" jdbcType="BIGINT" /><!--提交人岗位-->
- <result column="submit_account_id" property="submitAccountId" jdbcType="BIGINT" /><!--提交人ID-->
- <result column="submit_group_name" property="submitGroupName" jdbcType="VARCHAR" /><!--提交人部门名称-->
- <result column="submit_position_name" property="submitPositionName" jdbcType="VARCHAR" /><!--提交人岗位名称-->
- <result column="submit_account_name" property="submitAccountName" jdbcType="VARCHAR" /><!--提交人名称-->
- <result column="submit_time" property="submitTime" jdbcType="DATE" /><!--提交时间-->
- <result column="submit_remark" property="submitRemark" jdbcType="VARCHAR" /><!--提交说明-->
- <result column="review_group_id" property="reviewGroupId" jdbcType="BIGINT" /><!--Review部门-->
- <result column="review_position_id" property="reviewPositionId" jdbcType="BIGINT" /><!--Review岗位-->
- <result column="review_account_id" property="reviewAccountId" jdbcType="BIGINT" /><!--ReviewID-->
- <result column="review_group_name" property="reviewGroupName" jdbcType="VARCHAR" /><!--Review部门名称-->
- <result column="review_position_name" property="reviewPositionName" jdbcType="VARCHAR" /><!--Review岗位名称-->
- <result column="review_account_name" property="reviewAccountName" jdbcType="VARCHAR" /><!--Review名称-->
- <result column="review_time" property="reviewTime" jdbcType="DATE" /><!--Review时间-->
- <result column="review_remark" property="reviewRemark" jdbcType="VARCHAR" /><!--Review意见-->
- <result column="rectify_group_id" property="rectifyGroupId" jdbcType="BIGINT" /><!--整改人部门-->
- <result column="rectify_position_id" property="rectifyPositionId" jdbcType="BIGINT" /><!--整改人岗位-->
- <result column="rectify_account_id" property="rectifyAccountId" jdbcType="BIGINT" /><!--整改人ID-->
- <result column="rectify_group_name" property="rectifyGroupName" jdbcType="VARCHAR" /><!--整改人部门名称-->
- <result column="rectify_position_name" property="rectifyPositionName" jdbcType="VARCHAR" /><!--整改人岗位名称-->
- <result column="rectify_account_name" property="rectifyAccountName" jdbcType="VARCHAR" /><!--整改人名称-->
- <result column="rectify_time" property="rectifyTime" jdbcType="DATE" /><!--整改时间-->
- <result column="danger_reason" property="dangerReason" jdbcType="VARCHAR" /><!--原因分析-->
- <result column="rectify_cat" property="rectifyCat" jdbcType="BIGINT" /><!--整改类别-->
- <result column="rectify_measure" property="rectifyMeasure" jdbcType="VARCHAR" /><!--整改措施-->
- <result column="rectify_remark" property="rectifyRemark" jdbcType="VARCHAR" /><!--整改说明-->
- <result column="accept_group_id" property="acceptGroupId" jdbcType="BIGINT" /><!--验收人部门-->
- <result column="accept_position_id" property="acceptPositionId" jdbcType="BIGINT" /><!--验收人岗位-->
- <result column="accept_account_id" property="acceptAccountId" jdbcType="BIGINT" /><!--验收人ID-->
- <result column="accept_group_name" property="acceptGroupName" jdbcType="VARCHAR" /><!--验收人部门名称-->
- <result column="accept_position_name" property="acceptPositionName" jdbcType="VARCHAR" /><!--验收人岗位名称-->
- <result column="accept_account_name" property="acceptAccountName" jdbcType="VARCHAR" /><!--验收人名称-->
- <result column="accept_time" property="acceptTime" jdbcType="DATE" /><!--验收时间-->
- <result column="scene_photo" property="scenePhoto" jdbcType="VARCHAR" /><!--第1个现场照片-->
- <result column="scene_icon" property="sceneIcon" jdbcType="VARCHAR" /><!--第1个现场照片缩略图-->
- <result column="status" property="status" jdbcType="BIGINT" /><!--状态-->
- <result column="accept_remark" property="acceptRemark" jdbcType="VARCHAR" /><!--验收意见-->
- <result column="wf_def_id" property="wfDefId" jdbcType="BIGINT" />
- <result column="wf_ins_id" property="wfInsId" jdbcType="BIGINT" />
- <result column="cur_activity_ins_id" property="curActivityInsId" jdbcType="BIGINT" />
- <result column="cur_activity_code" property="curActivityCode" jdbcType="VARCHAR" />
- <result column="cur_activity_title" property="curActivityTitle" jdbcType="VARCHAR" />
- <result column="cur_activity_begin_time" property="curActivityBeginTime" jdbcType="TIMESTAMP"/>
- <result column="cur_form_code" property="curFormCode" jdbcType="VARCHAR" />
- <result column="cur_group_id" property="curGroupId" jdbcType="BIGINT" />
- <result column="cur_position_id" property="curPositionId" jdbcType="BIGINT" />
- <result column="cur_account_id" property="curAccountId" jdbcType="BIGINT" />
- <result column="cur_group_name" property="curGroupName" jdbcType="VARCHAR" />
- <result column="cur_position_name" property="curPositionName" jdbcType="VARCHAR" />
- <result column="cur_account_name" property="curAccountName" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="DangerDto_Cols">
- A.oc_id,
- A.danger_id,
- A.danger_code,
- A.danger_title,
- A.danger_cat_id,
- B.danger_cat_title,
- A.danger_level,
- A.danger_deadline,
- A.finish_time,
- A.danger_source,
- A.danger_desc,
- A.scene_photo,
- A.scene_icon,
- A.risk_point_id,
- C.risk_point_title,
- A.hazard_id,
- A.hazard_title,
- A.risk_id,
- A.risk_title,
- A.measure_id,
- A.submit_group_id,
- A.submit_position_id,
- A.submit_account_id,
- A.submit_group_name,
- A.submit_position_name,
- A.submit_account_name,
- A.submit_time,
- A.submit_remark,
- A.review_group_id,
- A.review_position_id,
- A.review_account_id,
- A.review_group_name,
- A.review_position_name,
- A.review_account_name,
- A.review_time,
- A.review_remark,
- A.rectify_group_id,
- A.rectify_position_id,
- A.rectify_account_id,
- A.rectify_group_name,
- A.rectify_position_name,
- A.rectify_account_name,
- A.rectify_time,
- A.danger_reason,
- A.rectify_cat,
- A.rectify_measure,
- A.rectify_remark,
- A.status,
- A.accept_group_id,
- A.accept_position_id,
- A.accept_account_id,
- A.accept_group_name,
- A.accept_position_name,
- A.accept_account_name,
- A.accept_time,
- A.accept_remark,
- W.wf_def_id,
- W.wf_ins_id,
- W.cur_activity_title,
- W.cur_activity_code,
- W.cur_form_code,
- W.cur_activity_ins_id,
- W.cur_group_id,
- W.cur_activity_begin_time,
- W.cur_group_id,
- W.cur_group_name,
- W.cur_position_id,
- W.cur_position_name,
- W.cur_account_id,
- W.cur_account_name
- </sql>
- <!--基于ID查询-->
- <select id="getById" resultMap="DangerDtoResultMap">
- SELECT
- <include refid="DangerDto_Cols"/>
- FROM ent_danger AS A
- LEFT JOIN ent_danger_cat AS B ON (A.oc_id = B.oc_id AND A.danger_cat_id = B.danger_cat_id )
- LEFT JOIN ent_risk_point AS C ON (A.oc_id = C.oc_id AND A.risk_point_id = C.risk_point_id )
- LEFT JOIN wf_ins AS W ON (A.oc_id = W.oc_id AND A.danger_id = W.wf_ins_id )
- WHERE A.deleted_flag = 0 AND A.oc_id = #{ocId ,jdbcType=BIGINT}
- <if test="dangerId != null">
- AND A.danger_id = #{dangerId ,jdbcType=BIGINT}
- </if>
- </select>
- <!--分页查询-->
- <select id="getByPage" parameterType="java.util.Map" resultMap="DangerDtoResultMap">
- SELECT
- <include refid="DangerDto_Cols"/>
- FROM ent_danger AS A
- LEFT JOIN ent_danger_cat AS B ON (A.oc_id = B.oc_id AND A.danger_cat_id = B.danger_cat_id )
- LEFT JOIN ent_risk_point AS C ON (A.oc_id = C.oc_id AND A.risk_point_id = C.risk_point_id )
- LEFT JOIN s_group AS E ON (A.oc_id = E.oc_id AND A.submit_group_id = E.group_id )
- LEFT JOIN s_group AS F ON (A.oc_id = F.oc_id AND A.review_group_id = F.group_id )
- LEFT JOIN s_group AS G ON (A.oc_id = G.oc_id AND A.rectify_group_id = G.group_id )
- LEFT JOIN s_group AS H ON (A.oc_id = H.oc_id AND A.accept_group_id = H.group_id )
- LEFT JOIN wf_ins AS W ON (A.oc_id = W.oc_id AND A.danger_id = W.wf_ins_id )
- LEFT JOIN s_group AS X ON (W.oc_id = X.oc_id AND W.cur_group_id = X.group_id )
- WHERE A.deleted_flag = 0 AND A.oc_id = #{ocId ,jdbcType=BIGINT}
- <if test="dangerId != null">
- AND A.danger_id = #{dangerId ,jdbcType=BIGINT}
- </if>
- <if test="dangerCatId != null">
- AND A.danger_cat_id = #{dangerCatId ,jdbcType=BIGINT}
- </if>
- <if test="keywords != null and keywords != ''">
- AND A.danger_title like "%"#{keywords}"%"
- </if>
- <if test="submitAccountId != null">
- AND A.submit_account_id = #{submitAccountId ,jdbcType=BIGINT}
- </if>
- <if test="curAccountId != null">
- AND W.cur_account_id = #{curAccountId ,jdbcType=BIGINT}
- </if>
- <if test="status != null">
- AND A.status = #{status ,jdbcType=BIGINT}
- </if>
- <if test="curGroupNodeLeft != null and curGroupNodeRight != null">
- <![CDATA[
- AND X.node_left >= #{curGroupNodeLeft, jdbcType=BIGINT}
- AND X.node_right <= #{curGroupNodeRight, jdbcType=BIGINT}
- ]]>
- </if>
- <if test="submitGroupNodeLeft != null and submitGroupNodeRight != null">
- <![CDATA[
- AND E.node_left >= #{submitGroupNodeLeft, jdbcType=BIGINT}
- AND E.node_right <= #{submitGroupNodeRight, jdbcType=BIGINT}
- ]]>
- </if>
- <if test="reviewGroupNodeLeft != null and reviewGroupNodeRight != null">
- <![CDATA[
- AND F.node_left >= #{reviewGroupNodeLeft, jdbcType=BIGINT}
- AND F.node_right <= #{reviewGroupNodeRight, jdbcType=BIGINT}
- ]]>
- </if>
- <if test="rectifyGroupNodeLeft != null and rectifyGroupNodeRight != null">
- <![CDATA[
- AND G.node_left >= #{rectifyGroupNodeLeft, jdbcType=BIGINT}
- AND G.node_right <= #{rectifyGroupNodeRight, jdbcType=BIGINT}
- ]]>
- </if>
- <if test="acceptGroupNodeLeft != null and acceptGroupNodeRight != null">
- <![CDATA[
- AND H.node_left >= #{acceptGroupNodeLeft, jdbcType=BIGINT}
- AND H.node_right <= #{acceptGroupNodeRight, jdbcType=BIGINT}
- ]]>
- </if>
- <if test="handleAccountId != null">
- AND (
- A.review_account_id = #{handleAccountId ,jdbcType=BIGINT}
- OR
- A.rectify_account_id = #{handleAccountId ,jdbcType=BIGINT}
- OR
- A.accept_account_id = #{handleAccountId ,jdbcType=BIGINT}
- )
- </if>
- <if test="startSubmitTime != null and endSubmitTime != null">
- <![CDATA[
- AND A.submit_time >= #{startSubmitTime, jdbcType=TIMESTAMP}
- AND A.submit_time <= #{endSubmitTime, jdbcType=TIMESTAMP}
- ]]>
- </if>
- ORDER BY A.submit_time DESC
- </select>
- <!--列表查询-->
- <select id="getByList" parameterType="java.util.Map" resultMap="DangerDtoResultMap">
- SELECT
- <include refid="DangerDto_Cols"/>
- FROM ent_danger AS A
- LEFT JOIN ent_danger_cat AS B ON (A.oc_id = B.oc_id AND A.danger_cat_id = B.danger_cat_id )
- LEFT JOIN ent_risk_point AS C ON (A.oc_id = C.oc_id AND A.risk_point_id = C.risk_point_id )
- LEFT JOIN s_group AS E ON (A.oc_id = E.oc_id AND A.submit_group_id = E.group_id )
- LEFT JOIN s_group AS F ON (A.oc_id = F.oc_id AND A.review_group_id = F.group_id )
- LEFT JOIN s_group AS G ON (A.oc_id = G.oc_id AND A.rectify_group_id = G.group_id )
- LEFT JOIN s_group AS H ON (A.oc_id = H.oc_id AND A.accept_group_id = H.group_id )
- LEFT JOIN wf_ins AS W ON (A.oc_id = W.oc_id AND A.danger_id = W.wf_ins_id )
- LEFT JOIN s_group AS X ON (W.oc_id = X.oc_id AND W.cur_group_id = X.group_id )
- WHERE A.deleted_flag = 0
- AND A.oc_id = #{ocId ,jdbcType=BIGINT}
- <if test="dangerId != null">
- AND A.danger_id = #{dangerId ,jdbcType=BIGINT}
- </if>
- <if test="dangerCatId != null">
- AND A.danger_cat_id = #{dangerCatId ,jdbcType=BIGINT}
- </if>
- <if test="keywords != null and keywords != ''">
- AND A.danger_title like "%"#{keyword}"%"
- </if>
- <if test="submitAccountId != null">
- AND A.submit_account_id = #{submitAccountId ,jdbcType=BIGINT}
- </if>
- <if test="status != null">
- AND A.status = #{status ,jdbcType=BIGINT}
- </if>
- <if test="curAccountId != null">
- AND W.cur_account_id = #{curAccountId ,jdbcType=BIGINT}
- </if>
- <if test="curGroupNodeLeft != null and curGroupNodeRight != null">
- <![CDATA[
- AND X.node_left >= #{curGroupNodeLeft, jdbcType=BIGINT}
- AND X.node_right <= #{curGroupNodeRight, jdbcType=BIGINT}
- ]]>
- </if>
- <if test="submitGroupNodeLeft != null and submitGroupNodeRight != null">
- <![CDATA[
- AND E.node_left >= #{submitGroupNodeLeft, jdbcType=BIGINT}
- AND E.node_right <= #{submitGroupNodeRight, jdbcType=BIGINT}
- ]]>
- </if>
- <if test="reviewGroupNodeLeft != null and reviewGroupNodeRight != null">
- <![CDATA[
- AND F.node_left >= #{reviewGroupNodeLeft, jdbcType=BIGINT}
- AND F.node_right <= #{reviewGroupNodeRight, jdbcType=BIGINT}
- ]]>
- </if>
- <if test="rectifyGroupNodeLeft != null and rectifyGroupNodeRight != null">
- <![CDATA[
- AND G.node_left >= #{rectifyGroupNodeLeft, jdbcType=BIGINT}
- AND G.node_right <= #{rectifyGroupNodeRight, jdbcType=BIGINT}
- ]]>
- </if>
- <if test="acceptGroupNodeLeft != null and acceptGroupNodeRight != null">
- <![CDATA[
- AND H.node_left >= #{acceptGroupNodeLeft, jdbcType=BIGINT}
- AND H.node_right <= #{acceptGroupNodeRight, jdbcType=BIGINT}
- ]]>
- </if>
- <if test="startSubmitTime != null and endSubmitTime != null">
- <![CDATA[
- AND A.submit_time >= #{startSubmitTime, jdbcType=TIMESTAMP}
- AND A.submit_time <= #{endSubmitTime, jdbcType=TIMESTAMP}
- ]]>
- </if>
- <if test="handleAccountId != null">
- AND (
- A.review_account_id = #{handleAccountId ,jdbcType=BIGINT}
- OR
- A.rectify_account_id = #{handleAccountId ,jdbcType=BIGINT}
- OR
- A.accept_account_id = #{handleAccountId ,jdbcType=BIGINT}
- )
- </if>
- ORDER BY A.submit_time DESC
- </select>
- <!--新增-->
- <insert id="create" parameterType="com.zhyc.xps.aqpt.entity.EntDanger">
- INSERT INTO ent_danger
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="ocId != null">
- oc_id,
- </if>
- <if test="groupId != null">
- group_id,
- </if>
- <if test="dangerId != null">
- danger_id,
- </if>
- <if test="dangerCode != null and dangerCode != ''">
- danger_code,
- </if>
- <if test="dangerTitle != null and dangerTitle != ''">
- danger_title,
- </if>
- <if test="dangerDesc != null and dangerDesc != ''">
- danger_desc,
- </if>
- <if test="dangerCatId != null">
- danger_cat_id,
- </if>
- <if test="dangerLevel!= null">
- danger_level,
- </if>
- <if test="status != null">
- status,
- </if>
- <if test="dangerDeadLine != null">
- danger_deadline,
- </if>
- <if test="submitGroupId != null">
- submit_group_id,
- </if>
- <if test="submitPositionId != null">
- submit_position_id,
- </if>
- <if test="submitAccountId != null">
- submit_account_id,
- </if>
- <if test="submitGroupName != null">
- submit_group_name,
- </if>
- <if test="submitPositionName != null">
- submit_position_name,
- </if>
- <if test="submitAccountName != null">
- submit_account_name,
- </if>
- <if test="submitTime != null">
- submit_time,
- </if>
- <if test="submitRemark != null and submitRemark != ''">
- submit_remark,
- </if>
- <if test="dangerSource != null">
- danger_source,
- </if>
- <if test="riskPointId != null">
- risk_point_id,
- </if>
- <if test="hazardId != null">
- hazard_id,
- </if>
- <if test="hazardTitle != null and hazardTitle != ''">
- hazard_title,
- </if>
- <if test="riskId != null">
- risk_id,
- </if>
- <if test="riskTitle != null and riskTitle != ''">
- risk_title,
- </if>
- <if test="measureId != null">
- measure_id,
- </if>
- <if test="measureContent != null and measureContent!=''">
- measure_content,
- </if>
- <if test="scenePhoto != null and scenePhoto!=''">
- scene_photo,
- </if>
- <if test="sceneIcon != null and sceneIcon!=''">
- scene_icon,
- </if>
- <if test="createdBy != null">
- created_by,
- </if>
- <if test="createdAt != null">
- created_at,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="ocId != null">
- #{ocId ,jdbcType=BIGINT},
- </if>
- <if test="groupId != null">
- #{groupId ,jdbcType=BIGINT},
- </if>
- <if test="dangerId != null">
- #{dangerId ,jdbcType=BIGINT},
- </if>
- <if test="dangerCode != null and dangerCode != ''">
- #{dangerCode ,jdbcType=VARCHAR},
- </if>
- <if test="dangerTitle != null and dangerTitle != ''">
- #{dangerTitle ,jdbcType=VARCHAR},
- </if>
- <if test="dangerDesc != null and dangerDesc != ''">
- #{dangerDesc ,jdbcType=VARCHAR},
- </if>
- <if test="dangerCatId != null">
- #{dangerCatId ,jdbcType=BIGINT},
- </if>
- <if test="dangerLevel!= null">
- #{dangerLevel ,jdbcType=BIGINT},
- </if>
- <if test="status != null">
- #{status ,jdbcType=BIGINT},
- </if>
- <if test="dangerDeadLine != null">
- #{dangerDeadLine ,jdbcType=DATE},
- </if>
- <if test="submitGroupId != null">
- #{submitGroupId ,jdbcType=BIGINT},
- </if>
- <if test="submitPositionId != null">
- #{submitPositionId ,jdbcType=BIGINT},
- </if>
- <if test="submitAccountId != null">
- #{submitAccountId ,jdbcType=BIGINT},
- </if>
- <if test="submitGroupName != null">
- #{submitGroupName ,jdbcType=VARCHAR},
- </if>
- <if test="submitPositionName != null">
- #{submitPositionName ,jdbcType=VARCHAR},
- </if>
- <if test="submitAccountName != null">
- #{submitAccountName ,jdbcType=VARCHAR},
- </if>
- <if test="submitTime != null">
- #{submitTime ,jdbcType=DATE},
- </if>
- <if test="submitRemark != null and submitRemark != ''">
- #{submitRemark ,jdbcType=VARCHAR},
- </if>
- <if test="dangerSource != null">
- #{dangerSource ,jdbcType=BIGINT},
- </if>
- <if test="riskPointId != null">
- #{riskPointId ,jdbcType=BIGINT},
- </if>
- <if test="hazardId != null">
- #{hazardId ,jdbcType=BIGINT},
- </if>
- <if test="hazardTitle != null and hazardTitle != ''">
- #{hazardTitle ,jdbcType=VARCHAR},
- </if>
- <if test="riskId != null">
- #{riskId ,jdbcType=BIGINT},
- </if>
- <if test="riskTitle != null and riskTitle != ''">
- #{riskTitle ,jdbcType=VARCHAR},
- </if>
- <if test="measureId != null">
- #{measureId ,jdbcType=BIGINT},
- </if>
- <if test="measureContent != null and measureContent!=''">
- #{measureContent ,jdbcType=VARCHAR},
- </if>
- <if test="scenePhoto != null and scenePhoto!=''">
- #{scenePhoto ,jdbcType=VARCHAR},
- </if>
- <if test="sceneIcon != null and sceneIcon!=''">
- #{sceneIcon ,jdbcType=VARCHAR},
- </if>
- <if test="createdBy != null">
- #{createdBy ,jdbcType=BIGINT},
- </if>
- <if test="createdAt != null">
- #{createdAt ,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <!--Update-->
- <update id="update" parameterType="com.zhyc.xps.aqpt.entity.EntDanger">
- UPDATE ent_danger
- <trim suffixOverrides=",">
- <set>
- <if test="groupId != null">
- group_id = #{groupId ,jdbcType=BIGINT},
- </if>
- <if test="dangerCode != null and dangerCode != ''">
- danger_code = #{dangerCode ,jdbcType=VARCHAR},
- </if>
- <if test="dangerTitle != null and dangerTitle != ''">
- danger_title = #{dangerTitle, jdbcType=VARCHAR},
- </if>
- <if test="dangerDesc != null and dangerDesc != ''">
- danger_desc = #{dangerDesc, jdbcType=VARCHAR},
- </if>
- <if test="dangerCatId != null">
- danger_cat_id = #{dangerCatId ,jdbcType=BIGINT},
- </if>
- <if test="dangerLevel!= null">
- danger_level = #{dangerLevel ,jdbcType=BIGINT},
- </if>
- <if test="status != null">
- status = #{status ,jdbcType=BIGINT},
- </if>
- <if test="dangerDeadLine != null">
- danger_deadline = #{dangerDeadLine ,jdbcType=DATE},
- </if>
- <if test="submitGroupId != null">
- submit_group_id = #{submitGroupId ,jdbcType=BIGINT},
- </if>
- <if test="submitPositionId != null">
- submit_position_id = #{submitPositionId ,jdbcType=BIGINT},
- </if>
- <if test="submitAccountId != null">
- submit_account_id = #{submitAccountId ,jdbcType=BIGINT},
- </if>
- <if test="submitGroupName != null and submitGroupName !=''">
- submit_group_name = #{submitGroupName ,jdbcType=VARCHAR},
- </if>
- <if test="submitPositionName != null and submitPositionName != ''">
- submit_position_name = #{submitPositionName ,jdbcType=VARCHAR},
- </if>
- <if test="submitAccountName != null and submitAccountName != ''">
- submit_account_name = #{submitAccountName ,jdbcType=VARCHAR},
- </if>
- <if test="submitTime != null">
- submit_time = #{submitTime ,jdbcType=DATE},
- </if>
- <if test="submitRemark != null and submitRemark != ''">
- submit_remark = #{submitRemark ,jdbcType=VARCHAR},
- </if>
- <if test="reviewGroupId != null">
- review_group_id = #{reviewGroupId ,jdbcType=BIGINT},
- </if>
- <if test="reviewPositionId != null">
- review_position_id = #{reviewPositionId ,jdbcType=BIGINT},
- </if>
- <if test="reviewAccountId != null">
- review_account_id = #{reviewAccountId ,jdbcType=BIGINT},
- </if>
- <if test="reviewGroupName != null and reviewGroupName != ''">
- review_group_name = #{reviewGroupName ,jdbcType=VARCHAR},
- </if>
- <if test="reviewPositionName != null and reviewPositionName !=''">
- review_position_name = #{reviewPositionName ,jdbcType=VARCHAR},
- </if>
- <if test="reviewAccountName != null and reviewAccountName !=''">
- review_account_name = #{reviewAccountName ,jdbcType=VARCHAR},
- </if>
- <if test="reviewTime != null">
- review_time = #{reviewTime ,jdbcType=DATE},
- </if>
- <if test="reviewRemark != null and reviewRemark != ''">
- review_remark = #{reviewRemark ,jdbcType=VARCHAR},
- </if>
- <if test="rectifyGroupId != null">
- rectify_group_id = #{rectifyGroupId ,jdbcType=BIGINT},
- </if>
- <if test="rectifyPositionId != null">
- rectify_position_id = #{rectifyPositionId ,jdbcType=BIGINT},
- </if>
- <if test="rectifyAccountId != null">
- rectify_account_id = #{rectifyAccountId ,jdbcType=BIGINT},
- </if>
- <if test="rectifyGroupName != null and rectifyGroupName !=''">
- rectify_group_name = #{rectifyGroupName ,jdbcType=VARCHAR},
- </if>
- <if test="rectifyPositionName != null and rectifyPositionName !=''">
- rectify_position_name = #{rectifyPositionName ,jdbcType=VARCHAR},
- </if>
- <if test="rectifyAccountName != null and rectifyAccountName !=''">
- rectify_account_name = #{rectifyAccountName ,jdbcType=VARCHAR},
- </if>
- <if test="dangerReason != null and dangerReason != ''">
- danger_reason = #{dangerReason, jdbcType=VARCHAR},
- </if>
- <if test="rectifyCat != null and rectifyCat != ''">
- rectify_cat = #{rectifyCat ,jdbcType=BIGINT},
- </if>
- <if test="rectifyMeasure != null and rectifyMeasure != ''">
- rectify_measure = #{rectifyMeasure, jdbcType=VARCHAR},
- </if>
- <if test="rectifyTime != null">
- rectify_time = #{rectifyTime ,jdbcType=DATE},
- </if>
- <if test="rectifyRemark != null and rectifyRemark != ''">
- rectify_remark = #{rectifyRemark, jdbcType=VARCHAR},
- </if>
- <if test="acceptGroupId != null">
- accept_group_id = #{acceptGroupId ,jdbcType=BIGINT},
- </if>
- <if test="acceptPositionId != null">
- accept_position_id = #{acceptPositionId ,jdbcType=BIGINT},
- </if>
- <if test="acceptAccountId != null">
- accept_account_id = #{acceptAccountId ,jdbcType=BIGINT},
- </if>
- <if test="acceptGroupName != null and acceptGroupName !=''">
- accept_group_name = #{acceptGroupName ,jdbcType=VARCHAR},
- </if>
- <if test="acceptPositionName != null and acceptPositionName !=''">
- accept_position_name = #{acceptPositionName ,jdbcType=VARCHAR},
- </if>
- <if test="acceptAccountName != null and acceptAccountName !=''">
- accept_account_name = #{acceptAccountName ,jdbcType=VARCHAR},
- </if>
- <if test="acceptTime != null">
- accept_time = #{acceptTime ,jdbcType=DATE},
- </if>
- <if test="acceptRemark != null and acceptRemark != ''">
- accept_remark = #{acceptRemark ,jdbcType=VARCHAR},
- </if>
- <if test="scenePhoto != null and scenePhoto!=''">
- scene_phone = #{scenePhoto ,jdbcType=VARCHAR},
- </if>
- <if test="sceneIcon != null and sceneIcon!=''">
- scene_icon = #{sceneIcon ,jdbcType=VARCHAR},
- </if>
- <if test="updatedBy != null ">
- updated_by = #{updatedBy ,jdbcType=BIGINT},
- </if>
- <if test="updatedAt != null">
- updated_at = #{updatedAt ,jdbcType=TIMESTAMP},
- </if>
- </set>
- </trim>
- WHERE oc_id = #{ocId ,jdbcType=BIGINT}
- AND danger_id = #{dangerId ,jdbcType=BIGINT}
- </update>
- <!--删除-->
- <update id="delete" parameterType="java.util.Map">
- UPDATE ent_danger
- <trim suffixOverrides=",">
- <set>
- <if test="deletedFlag != null">
- deleted_flag = #{deletedFlag ,jdbcType=BIGINT},
- </if>
- <if test="deletedTime != null">
- deleted_time = #{deletedTime ,jdbcType=VARCHAR},
- </if>
- <if test="deletedBy != null">
- deleted_by = #{deletedBy ,jdbcType=BIGINT},
- </if>
- </set>
- </trim>
- WHERE oc_id = #{ocId ,jdbcType=BIGINT}
- <if test="dangerCatId != null">
- AND danger_cat_id = #{dangerCatId ,jdbcType=BIGINT}
- </if>
- <if test="dangerId != null">
- AND danger_id = #{dangerId ,jdbcType=BIGINT}
- </if>
- </update>
- </mapper>
|