76 lines
3.3 KiB
XML
76 lines
3.3 KiB
XML
<?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.sercurityControl.proteam.supplement.mapper.RiskWarningAndEarlyDisposalMapper">
|
|
<insert id="addData">
|
|
INSERT INTO t_risk_warning_early_disposal(proName, ticketName, riskGrade, number, jobLeader, jobSite,
|
|
jobGx, workingTeamName, riskCb, manageControl,
|
|
supplementMeasure, important, yjDate, changeTerm, changeContent,
|
|
status, upload_id)
|
|
VALUES (#{proName}, #{ticketName}, #{riskGrade}, #{number}, #{jobLeader}, #{jobSite}, #{jobGx},
|
|
#{workingTeamName}, #{riskCb}, #{manageControl}, #{supplementMeasure}, #{important}, #{yjDate},
|
|
#{changeTerm}, #{changeContent}, #{status}, #{uploadId})
|
|
</insert>
|
|
|
|
<update id="updateData">
|
|
update t_risk_warning_early_disposal
|
|
set changeContent=#{changeContent},
|
|
path=#{path}
|
|
WHERE id = #{id}
|
|
</update>
|
|
|
|
<select id="getList" resultType="com.sercurityControl.proteam.supplement.domain.vo.RiskWarningAndEarlyDisposalVo">
|
|
SELECT
|
|
*
|
|
FROM
|
|
t_risk_warning_early_disposal
|
|
WHERE
|
|
is_active=1
|
|
<if test="proName!=null and proName!=''">
|
|
and proName LIKE CONCAT('%',#{proName},'%')
|
|
</if>
|
|
<if test="riskLevel!=null and riskLevel!=''">
|
|
AND riskGrade = #{riskLevel}
|
|
</if>
|
|
ORDER BY update_time DESC
|
|
</select>
|
|
|
|
<!--风险整改分析-整改详情-->
|
|
<select id="getRiskRectDetail"
|
|
resultType="com.sercurityControl.proteam.supplement.domain.vo.RiskRectDetailVo">
|
|
SELECT tnv.id,
|
|
tnv.ticket_no AS ticketNo,
|
|
jjt.ticket_name AS ticketName,
|
|
tnv.pro_name AS proName,
|
|
tnv.risk_level AS riskLevel,
|
|
tnv.child_type AS childType,
|
|
jjcmi.work_manage AS workManager,
|
|
jjcmi.work_manage_phone AS workManagerPhone,
|
|
jjcmi.work_gx AS gx,
|
|
jjcmi.work_site AS workSite,
|
|
tnv.create_time AS time,
|
|
tnv.level_id AS levelId
|
|
FROM t_notice_voi tnv
|
|
LEFT JOIN jj_class_metting_info jjcmi ON tnv.class_id = jjcmi.class_id
|
|
LEFT JOIN jj_ticket jjt ON tnv.ticket_no = jjt.ticket_no
|
|
WHERE tnv.id = #{id}
|
|
</select>
|
|
<!--查询整改内容、整改照片-->
|
|
<select id="getRectImgPath" resultType="java.lang.String">
|
|
<if test="type == 1">
|
|
SELECT rect_explain FROM t_notice_voi_rect WHERE noti_id = #{id} ORDER BY create_time DESC LIMIT 1
|
|
</if>
|
|
<if test="type == 2">
|
|
SELECT image_path
|
|
FROM t_notice_voi_photo
|
|
WHERE rect_id = (SELECT id FROM t_notice_voi_rect WHERE noti_id = #{id} ORDER BY create_time DESC LIMIT 1)
|
|
AND noti_id = #{id} AND image_type IN ('2','3')
|
|
</if>
|
|
</select>
|
|
<select id="getDetailById"
|
|
resultType="com.sercurityControl.proteam.supplement.domain.vo.RiskWarningAndEarlyDisposalVo">
|
|
SELECT *
|
|
FROM t_risk_warning_early_disposal
|
|
WHERE is_active = 1
|
|
and id = #{id}
|
|
</select>
|
|
</mapper> |