| | |
| | | <result column="update_report_data_time" property="updateReportDataTime"/> |
| | | <result column="report_switch" property="reportSwitch"/> |
| | | <result column="check_content" property="checkContent"/> |
| | | <result column="work_type" property="workType"/> |
| | | <result column="task_num" property="taskNum"/> |
| | | </resultMap> |
| | | |
| | | <insert id="savePreventRiskControlMeasure" parameterType="com.ruoyi.doublePrevention.entity.PreventRiskControlMeasure"> |
| | |
| | | <if test="updateReportDataTime != null ">update_report_data_time,</if> |
| | | <if test="reportSwitch != null ">report_switch,</if> |
| | | <if test="checkContent != null ">check_content,</if> |
| | | <if test="workType != null and workType != ''">work_type,</if> |
| | | <if test="taskNum != null and taskNum != ''">task_num,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="uuid != null ">#{uuid},</if> |
| | |
| | | <if test="updateReportDataTime != null ">#{updateReportDataTime},</if> |
| | | <if test="reportSwitch != null ">#{reportSwitch},</if> |
| | | <if test="checkContent != null ">#{checkContent},</if> |
| | | <if test="workType != null and workType != ''">#{work_type},</if> |
| | | <if test="taskNum != null and taskNum != ''">#{task_num},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="checkContent != null"> |
| | | check_content = #{checkContent}, |
| | | </if> |
| | | <if test="workType != null and workType != ''"> |
| | | work_type = #{workType}, |
| | | </if> |
| | | <if test="taskNum != null and taskNum != ''"> |
| | | task_num = #{taskNum}, |
| | | </if> |
| | | </set> |
| | | where id = #{id} and delete_status = 0 |
| | | </update> |
| | |
| | | select * from prevent_risk_control_measure |
| | | where id = #{id} and delete_status = 0 |
| | | </select> |
| | | |
| | | <select id="getPreventRiskControlMeasureByControlMeasureCode" resultMap="BaseResultMap"> |
| | | select * from prevent_risk_control_measure |
| | | <where> |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="listRiskEvenByCondition" resultMap="BaseResultMap"> |
| | | <select id="listRiskControlMeasureByCondition" resultMap="BaseResultMap"> |
| | | select * from prevent_risk_control_measure |
| | | <where> |
| | | delete_status = 0 |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="listRiskControlMeasure" resultMap="BaseResultMap"> |
| | | select * from prevent_risk_control_measure where delete_status = 0 |
| | | order by risk_event_id |
| | | </select> |
| | | |
| | | <select id="getPreventRiskControlMeasureByUuid" resultMap="BaseResultMap"> |
| | | select * from prevent_risk_control_measure |
| | | where delete_status = 0 and uuid = #{riskMeasureId} |
| | | </select> |
| | | |
| | | |
| | | |
| | | <!-- List<PreventRiskControlMeasure> listReportMeasure();--> |
| | | <select id="listReportMeasure" resultMap="BaseResultMap"> |
| | | select * from prevent_risk_control_measure |
| | | where report_switch = 0 and delete_status = 0 and (update_report_data_time > report_time or report_time is null) |
| | | </select> |
| | | |
| | | <!-- int updateMeasureReportStatus(HandlerReportParam handlerReportParam);--> |
| | | <update id="updateMeasureReportStatus" > |
| | | update prevent_risk_control_measure set |
| | | report_status = #{reportStatus}, |
| | | report_time = #{reportTime} |
| | | where id = #{id} |
| | | </update> |
| | | </mapper> |