From 3c02cf8bdc8181a1f8fc09bdd2608c7b004f942d Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 20 十一月 2024 11:52:19 +0800
Subject: [PATCH] 避免下发页面的新增导致的重复工单
---
ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml | 54 ++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 48 insertions(+), 6 deletions(-)
diff --git a/ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml
index cd9b458..0b266b3 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml
@@ -80,6 +80,9 @@
<if test="query.pointName != null and query.pointName != ''">
AND typ.point_name like concat('%', #{query.pointName}, '%')
</if>
+ <if test="query.unitId != null">
+ AND typ.unit_id = #{query.unitId}
+ </if>
</where>
</select>
@@ -257,13 +260,9 @@
<if test="point.pointName != null and point.pointName != ''">
point_name = #{point.pointName},
</if>
- <if test="point.unitId != null">
+ <if test="needUpdateUnit != null and needUpdateUnit">
unit_id = #{point.unitId},
- </if>
- <if test="point.startTime != null">
start_time = #{point.startTime},
- </if>
- <if test="point.endTime != null">
end_time = #{point.endTime},
</if>
province_tag = #{point.provinceTag},
@@ -358,5 +357,48 @@
serial_number, province_tag, important_tag, important_command_image_tag, dept_tag
</select>
-
+ <select id="selectToCount" resultType="com.ycl.platform.domain.vo.YwPointVO">
+ select p.* from t_yw_point p
+ left join t_monitor m on p.serial_number = m.serial_number
+ <where>
+ p.examine_status = 1 and m.camera_fun_type like concat('%',#{examineCategory},'%')
+ <if test="examineTag == 0">
+ and p.province_tag = 1
+ </if>
+ <if test="examineTag == 2">
+ and p.dept_tag = 1
+ </if>
+ </where>
+ </select>
+ <update id="myUpdateById">
+ update t_yw_point
+ <set>
+ <if test="pointName !=null and pointName !=''">
+ point_name = #{pointName},
+ </if>
+ <if test="updateTime !=null">
+ update_time = #{updateTime},
+ </if>
+ <if test="deptId !=null">
+ dept_id = #{deptId},
+ </if>
+ <if test="provinceTag !=null">
+ province_tag = #{provinceTag},
+ </if>
+ <if test="importantTag !=null">
+ important_tag = #{importantTag},
+ </if>
+ <if test="importantCommandImageTag !=null">
+ important_command_image_tag = #{importantCommandImageTag},
+ </if>
+ <if test="deptTag !=null">
+ dept_tag = #{deptTag},
+ </if>
+ unit_id = #{unitId},
+ start_time = #{startTime},
+ end_time = #{endTime},
+ remark = #{remark},
+ </set>
+ where id =#{id}
+ </update>
</mapper>
--
Gitblit v1.8.0