From d5b43ef0da42eaf50a08ce17e5fd3351eeb26a5e Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sat, 20 Mar 2021 14:10:19 +0800
Subject: [PATCH] 违禁品筛选条件去除,警情统计接口修改
---
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml | 47 ++++++++++++++++++++++++++++++++++-------------
1 files changed, 34 insertions(+), 13 deletions(-)
diff --git a/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml b/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml
index ac657fa..46e9ac8 100644
--- a/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml
+++ b/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml
@@ -27,6 +27,8 @@
<result column="province" property="province"/>
<result column="city" property="city"/>
<result column="district" property="district"/>
+ <result column="state" property="state"/>
+ <result column="reason" property="reason"/>
</resultMap>
<resultMap id="treeNodeResultMap" type="org.springblade.core.tool.node.TreeNode">
@@ -60,18 +62,28 @@
<select id="selectEquipmentPage" resultMap="equipmentResultMap">
- select id,deviceName,deviceNumber,deviceType,ownership,ownerId,devicestate,stime,dtype,heartbeat,expireTime,pay,
- parent_id,district,province,city,
- jd ,
- wd ,
- street,
- addvcd,pay,expireTime from sys_equipment where 1=1
+ select equipment.id,equipment.deviceName,equipment.deviceNumber,equipment.deviceType,equipment.ownership
+ ,equipment.ownerId,equipment.devicestate,equipment.stime,equipment.dtype,equipment.heartbeat,equipment.expireTime,
+ equipment.parent_id,equipment.district,equipment.province,equipment.city,equipment.serialNumber,equipment.channelNumber,
+ equipment.jd ,
+ equipment.wd ,
+ equipment.state,equipment.reason,
+ equipment.street,catalog.pid,
+ equipment.addvcd,equipment.pay,equipment.expireTime from sys_equipment equipment
+ left join sys_catalog catalog on catalog.eqid = equipment.deviceNumber
+
+ where 1=1
+
<if test="equipment.deviceName!=null">
and (deviceName like concat('%',#{equipment.deviceName},'%') or deviceNumber like
concat('%',#{equipment.deviceName},'%'))
</if>
- <if test="equipment.addvcd!=null">
- and addvcd=#{equipment.addvcd}
+
+ <if test="equipment.beginTime!=null and equipment.beginTime!=''">
+ and expireTime>=#{equipment.beginTime}
+ </if>
+ <if test="equipment.endTime!=null and equipment.endTime!=''">
+ and expireTime<=#{equipment.endTime}
</if>
<if test="equipment.district!=null">
@@ -115,7 +127,7 @@
parent_id,
jd ,
wd ,
- street,
+ street,state,reason,
addvcd,pay,expireTime from sys_equipment
</select>
@@ -183,9 +195,9 @@
parameterType="org.springblade.jfpt.equipment.entity.Equipment">
SELECT
dept.id,dept.deviceName,dept.deviceNumber,dept.deviceType,dept.ownership,
- dept.ownerId,dept.devicestate,dept.stime,
- ST_ASTEXT(dept.coordinate) as coordinate,dept.dtype,dept.expireTime,dept.heartbeat,
- dept.parent_id,dept.jd,dept.wd,dept.street,u.yname,d.addvnm,dept.addvcd,
+ dept.ownerId,dept.devicestate,dept.stime,dept.district,dept.province,dept.city,
+ ST_ASTEXT(dept.coordinate) as coordinate,dept.dtype,dept.expireTime,dept.heartbeat, dept.state,dept.reason,
+ dept.parent_id,dept.jd,dept.wd,dept.street,u.yname,d.addvnm,dept.addvcd,dept.serialNumber,dept.channelNumber,
(
SELECT
CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
@@ -200,7 +212,7 @@
</select>
<select id="selectList" resultMap="deptVOResultMap">
- SELECT e.id,e.deviceName,e.deviceNumber,e.deviceType,e.ownership,
+ SELECT e.id,e.deviceName,e.deviceNumber,e.deviceType,e.ownership,e.state,e.reason,
e.ownerId,e.devicestate,e.stime,e.street as streeName,
ST_ASTEXT(e.coordinate) as coordinate,e.dtype,
e.parent_id,e.jd,e.wd,e.addvcd,
@@ -229,6 +241,7 @@
dept.parent_id,
dept.jd,
dept.wd,
+ dept.state,dept.reason,
dept.street AS streeName,
u.yname,
dept.addvcd,
@@ -245,4 +258,12 @@
update sys_equipment SET heartbeat=#{heartbeat} where deviceNumber=#{deviceNumber}
</update>
+ <update id="updateexpireTime">
+ update sys_equipment SET expireTime=#{expireTime} where deviceNumber=#{deviceNumber}
+ </update>
+
+ <update id="updateExstate">
+ update sys_equipment SET state=#{state},reason=#{reason} where deviceNumber=#{deviceNumber}
+ </update>
+
</mapper>
--
Gitblit v1.9.3