From 1c0aa438fd0d7188ea1bb5f5f41403784e6aecb9 Mon Sep 17 00:00:00 2001
From: nnnjjj123 <494715143@qq.com>
Date: Tue, 02 Feb 2021 15:29:44 +0800
Subject: [PATCH] 1.接口调整,权限

---
 blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml |   34 ++++++++++++++++++++++++++++++----
 1 files changed, 30 insertions(+), 4 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 ea812e9..ac657fa 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
@@ -47,7 +47,6 @@
         <result column="ownerId" property="ownerId"/>
         <result column="devicestate" property="devicestate"/>
         <result column="stime" property="stime"/>
-        <result column="coordinate" property="coordinate"/>
         <result column="parent_id" property="parentId"/>
         <result column="jd" property="jd"/>
         <result column="wd" property="wd"/>
@@ -61,9 +60,8 @@
 
 
     <select id="selectEquipmentPage" resultMap="equipmentResultMap">
-        select id,deviceName,deviceNumber,deviceType,ownership,ownerId,devicestate,stime,ST_ASTEXT (coordinate ) AS
-        coordinate,dtype,heartbeat,expireTime,pay,
-        parent_id,
+        select id,deviceName,deviceNumber,deviceType,ownership,ownerId,devicestate,stime,dtype,heartbeat,expireTime,pay,
+        parent_id,district,province,city,
         jd ,
         wd ,
         street,
@@ -75,6 +73,17 @@
         <if test="equipment.addvcd!=null">
             and addvcd=#{equipment.addvcd}
         </if>
+
+        <if test="equipment.district!=null">
+            and district like concat('%',#{equipment.district},'%')
+        </if>
+        <if test="equipment.province!=null">
+            and province like concat('%',#{equipment.province},'%')
+        </if>
+        <if test="equipment.city!=null">
+            and city like concat('%',#{equipment.city},'%')
+        </if>
+
         <if test="equipment.devicestate!=null">
             and devicestate =#{equipment.devicestate}
         </if>
@@ -82,6 +91,14 @@
         <if test="equipment.dtype!=null">
             and dtype=#{equipment.dtype}
         </if>
+
+        <if test="childList!=null and childList.size>0">
+            and deviceNumber in
+            <foreach collection="childList" index="index" item="item" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+
     </select>
 
     <!--新增-->
@@ -93,6 +110,15 @@
           select id, parent_id, deviceName as title, id as "value", id as "key" from sys_equipment
     </select>
 
+    <select id="listAll" resultMap="equipmentResultMap">
+          select id,deviceName,deviceNumber,deviceType,ownership,ownerId,devicestate,stime,dtype,heartbeat,expireTime,pay,
+        parent_id,
+        jd ,
+        wd ,
+        street,
+        addvcd,pay,expireTime from sys_equipment
+    </select>
+
 
     <select id="lazyList" resultMap="deptVOResultMap">
         SELECT dept.id,dept.deviceName,dept.deviceNumber,dept.deviceType,dept.ownership,

--
Gitblit v1.9.3