From bc251e599ba9c3babd5b10b924107c1db427eca1 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Thu, 11 Mar 2021 16:48:35 +0800
Subject: [PATCH] 解决警情分发的接口报错问题
---
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/jingdan/mapper/JingdanMapper.xml | 66 ++++++++++++++++++++-------------
1 files changed, 40 insertions(+), 26 deletions(-)
diff --git a/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/jingdan/mapper/JingdanMapper.xml b/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/jingdan/mapper/JingdanMapper.xml
index e5f8bd3..2c95ae7 100644
--- a/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/jingdan/mapper/JingdanMapper.xml
+++ b/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/jingdan/mapper/JingdanMapper.xml
@@ -20,15 +20,17 @@
<result column="coordinate" property="coordinate"/>
<result column="jd" property="jd"/>
<result column="wd" property="wd"/>
- <result column="addvcd" property="addvcd"/>
+ <result column="district" property="district"/>
+ <result column="province" property="province"/>
+ <result column="city" property="city"/>
<result column="rName" property="rName"/>
<result column="handletype" property="handletype"/>
</resultMap>
<select id="selectJingdanPage" resultMap="jingdanResultMap">
SELECT j.id,j.galarmPeople,j.phoneNumber,j.place,j.content,j.galarmTime,j.waringType,j.deviceNumber,j.type,
- j.handleP,j.handleTime,j.handName,j.level,ST_ASTEXT(j.coordinate) as coordinate,j.jd,j.wd,j.addvcd,j.rName,
- d.addvnm FROM sys_jingdan j LEFT JOIN sys_district d on d.addvcds=j.addvcd where 1=1
+ j.handleP,j.handleTime,j.handName,j.level,j.jd,j.wd,j.district,j.rName,
+ j.province,j.city FROM sys_jingdan j where 1=1
<if test="jingdan.waringType!=null and jingdan.waringType!=''">
and j.waringType=#{jingdan.waringType}
</if>
@@ -38,8 +40,14 @@
<if test="jingdan.endTime!=null and jingdan.endTime!=''">
and j.galarmTime <=#{jingdan.endTime}
</if>
- <if test="jingdan.addvcd!=null and jingdan.addvcd!=''">
- and j.addvcd=#{jingdan.addvcd}
+ <if test="jingdan.district!=null">
+ and j.district like concat('%',#{jingdan.district},'%')
+ </if>
+ <if test="jingdan.province!=null">
+ and j.province like concat('%',#{jingdan.province},'%')
+ </if>
+ <if test="jingdan.city!=null">
+ and j.city like concat('%',#{jingdan.city},'%')
</if>
<if test="jingdan.type!=null and jingdan.type!=''">
and j.type=#{jingdan.type}
@@ -49,8 +57,8 @@
<select id="selectList" resultMap="jingdanResultMap">
SELECT j.id,j.galarmPeople,j.phoneNumber,j.place,j.content,j.galarmTime,j.waringType,j.deviceNumber,j.type,
- j.handleP,j.handleTime,j.handName,j.level,ST_ASTEXT(j.coordinate) as coordinate,j.jd,j.wd,j.addvcd,j.rName,
- d.addvnm FROM sys_jingdan j LEFT JOIN sys_district d on d.addvcds=j.addvcd where 1=1
+ j.handleP,j.handleTime,j.handName,j.level,ST_ASTEXT(j.coordinate) as coordinate,j.jd,j.wd,j.district,j.rName,
+ d.addvnm FROM sys_jingdan j LEFT JOIN sys_district d on d.addvcds=j.district where 1=1
<if test="waringType!=null and waringType!=''">
and j.waringType=#{waringType}
</if>
@@ -60,8 +68,8 @@
<if test="endTime!=null and endTime!=''">
and j.galarmTime <=#{endTime}
</if>
- <if test="addvcd!=null and addvcd!=''">
- and j.addvcd=#{addvcd}
+ <if test="district!=null and district!=''">
+ and j.district=#{district}
</if>
<if test="type!=null and type!=''">
and j.type=#{type}
@@ -70,8 +78,8 @@
<select id="selectdInfo" resultMap="jingdanResultMap">
SELECT j.id,j.galarmPeople,j.phoneNumber,j.place,j.content,j.galarmTime,j.waringType,j.deviceNumber,j.type,
- j.handleP,j.handleTime,j.handName,j.level,ST_ASTEXT(j.coordinate) as coordinate,j.jd,j.wd,j.addvcd,j.rName,j.handletype,
- d.addvnm FROM sys_jingdan j LEFT JOIN sys_district d on d.addvcds=j.addvcd where 1=1
+ j.handleP,j.handleTime,j.handName,j.level,ST_ASTEXT(j.coordinate) as coordinate,j.jd,j.wd,j.district,j.rName,j.handletype,
+ d.addvnm FROM sys_jingdan j LEFT JOIN sys_district d on d.addvcds=j.district where 1=1
<if test="deviceNumber!=null and deviceNumber!=''">
and j.deviceNumber=#{deviceNumber}
</if>
@@ -83,8 +91,8 @@
<!--APP警单列表-->
<select id="selectLists" resultMap="jingdanResultMap">
SELECT j.id,j.galarmPeople,j.phoneNumber,j.place,j.content,j.galarmTime,j.waringType,j.deviceNumber,j.type,
- j.handleP,j.handleTime,j.handName,j.level,ST_ASTEXT(j.coordinate) as coordinate,j.jd,j.wd,j.addvcd,j.rName,j.handletype,
- d.addvnm FROM sys_jingdan j LEFT JOIN sys_district d on d.addvcds=j.addvcd where 1=1
+ j.handleP,j.handleTime,j.handName,j.level,ST_ASTEXT(j.coordinate) as coordinate,j.jd,j.wd,j.district,j.rName,j.handletype,
+ d.addvnm FROM sys_jingdan j LEFT JOIN sys_district d on d.addvcds=j.district where 1=1
<if test="handleP!=null and handleP!=''">
and j.handleP=#{handleP}
</if>
@@ -95,10 +103,10 @@
<!-- <insert id="insert">-->
<!-- insert into sys_jingdan(galarmPeople,phoneNumber,place,content,galarmTime,waringType,deviceNumber,type,-->
-<!-- handleP,handleTime,handName,level,coordinate,jd,wd,addvcd)-->
+<!-- handleP,handleTime,handName,level,coordinate,jd,wd,district)-->
<!-- values (#{galarmPeople},#{phoneNumber},#{place},#{content},#{galarmTime}-->
<!-- ,#{waringType},#{deviceNumber},#{type},#{handleP},#{handleTime},-->
-<!-- #{handName},#{level},POINT(#{jd},#{wd}),#{jd},#{wd},#{addvcd})-->
+<!-- #{handName},#{level},POINT(#{jd},#{wd}),#{jd},#{wd},#{district})-->
<!-- </insert>-->
@@ -140,17 +148,20 @@
<if test="level!=null and level!=''">
level,
</if>
- <if test="coordinate=null and coordinate=''">
- coordinate,
- </if>
<if test="jd!=null and jd!=''">
jd,
</if>
<if test="wd!=null and wd!=''">
wd,
</if>
- <if test="addvcd!=null and addvcd!=''">
- addvcd,
+ <if test="district!=null and district!=''">
+ district,
+ </if>
+ <if test="city!=null and city!=''">
+ city,
+ </if>
+ <if test="province!=null and province!=''">
+ province,
</if>
<if test="rName!=null and rName!=''">
rName,
@@ -201,9 +212,6 @@
<if test="level!=null and level!=''">
#{level},
</if>
- <if test="coordinate=null and coordinate=''">
- coordinate,
- </if>
<if test="jd!=null and wd!=null">
POINT(#{jd},#{wd}),
</if>
@@ -213,8 +221,14 @@
<if test="wd!=null and wd!=''">
#{wd},
</if>
- <if test="addvcd!=null and addvcd!=''">
- #{addvcd},
+ <if test="district!=null and district!=''">
+ #{district},
+ </if>
+ <if test="province!=null and province!=''">
+ #{province},
+ </if>
+ <if test="city!=null and city!=''">
+ #{city},
</if>
<if test="rName!=null and rName!=''">
#{rName},
@@ -227,7 +241,7 @@
</if>
</trim>
</sql>
- <insert id="insert">
+ <insert id="inserts">
insert into sys_jingdan(<include refid="key"/>) values(<include refid="value"/>)
</insert>
--
Gitblit v1.9.3