分析预警添加工程id

This commit is contained in:
方亮 2026-01-23 13:34:47 +08:00
parent 073781ea38
commit 15c6c37726
3 changed files with 21 additions and 14 deletions

View File

@ -41,4 +41,6 @@ public class SjNewWorkerWarnVo {
*/ */
private String remark; private String remark;
private String bidCode;
private String proName;
} }

View File

@ -15,8 +15,8 @@
<insert id="addWarnData"> <insert id="addWarnData">
insert into sj_new_worker_warn( insert into sj_new_worker_warn(
tx_time, tx_type, content, tx_time, tx_type, content,
data_type, remark, create_time, measure_data,file_path data_type, remark, create_time, measure_data,file_path, project_id
)values (#{txTime},#{txType},#{content},#{dataType},#{remark},now(),#{measureData},#{filePath}) )values (#{txTime},#{txType},#{content},#{dataType},#{remark},now(),#{measureData},#{filePath},#{bidCode})
</insert> </insert>
<update id="updateData"> <update id="updateData">
update sj_new_worker_analysic set update sj_new_worker_analysic set
@ -29,7 +29,7 @@
<update id="updateWarnData"> <update id="updateWarnData">
update sj_new_worker_warn set update sj_new_worker_warn set
tx_time=#{txTime}, tx_type=#{txType}, content=#{content}, tx_time=#{txTime}, tx_type=#{txType}, content=#{content},
data_type=#{dataType}, remark=#{remark} data_type=#{dataType}, remark=#{remark}, project_id= #{bidCode}
where id=#{id} where id=#{id}
</update> </update>
<delete id="deleteData"> <delete id="deleteData">
@ -54,10 +54,12 @@
</where> </where>
</select> </select>
<select id="getWarnList" resultType="com.securitycontrol.entity.background.vo.SjNewWorkerWarnVo"> <select id="getWarnList" resultType="com.securitycontrol.entity.background.vo.SjNewWorkerWarnVo">
select id, tx_time txTime, tx_type txType, select id, tx_time txTime, tx_type txType,
content content, data_type dataType,remark remark, content, data_type dataType,remark,
create_time createTime, measure_data measureData, file_path filePath create_time createTime, measure_data measureData, file_path filePath,
from sj_new_worker_warn project_id bidCode, pro_name proName
from sj_new_worker_warn sjb
left join tb_project tp on sjb.project_id=tp.bid_code
<where > <where >
<if test="txType!=null and txType!=''"> <if test="txType!=null and txType!=''">
and tx_type like concat('%',#{txType},'%') and tx_type like concat('%',#{txType},'%')

View File

@ -32,9 +32,10 @@
</insert> </insert>
<insert id="addAsyncWarnList"> <insert id="addAsyncWarnList">
insert into sj_new_zylll_warn( insert into sj_new_zylll_warn(
tx_time, tx_type,content, tx_time, tx_type,content,data_type, remark, create_time,
data_type, remark, create_time, measure_data,file_path measure_data,file_path,project_id
)values (#{txTime},#{txType},#{content},#{dataType},#{remark},now(),#{measureData},#{filePath}) )values (#{txTime},#{txType},#{content},#{dataType},#{remark},now(),
#{measureData},#{filePath},#{bidCode})
</insert> </insert>
<insert id="addFaultData"> <insert id="addFaultData">
insert into sj_new_fault_record ( insert into sj_new_fault_record (
@ -60,7 +61,7 @@
<update id="updateAsyncWarnList"> <update id="updateAsyncWarnList">
update sj_new_zylll_warn set update sj_new_zylll_warn set
tx_time=#{txTime}, tx_type=#{txType},content=#{content}, tx_time=#{txTime}, tx_type=#{txType},content=#{content},
data_type=#{dataType}, remark=#{remark} data_type=#{dataType}, remark=#{remark},project_id = #{bidCode}
where id=#{id} where id=#{id}
</update> </update>
<update id="updateFaultData"> <update id="updateFaultData">
@ -216,9 +217,11 @@
</select> </select>
<select id="getAsyncWarnList" resultType="com.securitycontrol.entity.background.vo.SjNewZylllWarnVo"> <select id="getAsyncWarnList" resultType="com.securitycontrol.entity.background.vo.SjNewZylllWarnVo">
select id, tx_time txTime, tx_type txType, select id, tx_time txTime, tx_type txType,
content content, data_type dataType, remark, content content, data_type dataType, remark,
create_time createTime, measure_data measureData, file_path filePath create_time createTime, measure_data measureData, file_path filePath,
FROM sj_new_zylll_warn bid_code bidCode, pro_name proName
FROM sj_new_zylll_warn sjb
left join tb_project tp on sjb.project_id=tp.bid_code
<where> <where>
<if test="keyWord!=null and keyWord!=''"> <if test="keyWord!=null and keyWord!=''">
and ( and (