Преглед изворни кода

修改分页插件依赖,由于依赖的问题分页插件依赖失效

пре 5 година
родитељ
комит
6f57ca98f8

+ 2 - 0
cloud-model/src/main/resources/mapper/MouldMapper.xml

@@ -131,6 +131,7 @@
             </if>
             <if test="userVO.mouleMap == -1">
                 AND tbmp.lng IS NOT NULL and tbmp.lat IS NOT NULL
+                AND tbp.is_delete = 0
             </if>
         </where>
     </select>
@@ -170,6 +171,7 @@
             </if>
             <if test="userVO.mouleMap == -1">
                 AND tbmp.lng IS NOT NULL and tbmp.lat IS NOT NULL
+                AND tbp.is_delete = 0
             </if>
             <if test="userVO.type == 0">
                 AND tbm.equipment_id is not null

+ 1 - 1
cloud-socket/src/com/js/kbt/UserTempGenConfig.xml

@@ -11,7 +11,7 @@
     <javaModelGenerator targetPackage="com.js.kbt.model" targetProject="cloud-socket" />
     <sqlMapGenerator targetPackage="com.js.kbt.mapper" targetProject="cloud-socket" />
     <javaClientGenerator targetPackage="com.js.kbt.mapper" targetProject="cloud-socket" type="XMLMAPPER" />
-    <table schema="cloud_model_test" tableName="rec_data_log" >
+    <table schema="cloud_model" tableName="lon_lat_record" >
     	<generatedKey column="id" identity="true" sqlStatement="SELECT LAST_INSERT_ID()"/>
     </table>
 <!--     <table schema="cloud_model" tableName="tb_mould_equipment" > -->

+ 75 - 0
cloud-socket/src/com/js/kbt/mapper/LonLatRecordMapper.java

@@ -0,0 +1,75 @@
+package com.js.kbt.mapper;
+
+import com.js.kbt.model.LonLatRecord;
+import com.js.kbt.model.LonLatRecordExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface LonLatRecordMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	long countByExample(LonLatRecordExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	int deleteByExample(LonLatRecordExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	int insert(LonLatRecord record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	int insertSelective(LonLatRecord record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	List<LonLatRecord> selectByExample(LonLatRecordExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	LonLatRecord selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	int updateByExampleSelective(@Param("record") LonLatRecord record, @Param("example") LonLatRecordExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	int updateByExample(@Param("record") LonLatRecord record, @Param("example") LonLatRecordExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	int updateByPrimaryKeySelective(LonLatRecord record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	int updateByPrimaryKey(LonLatRecord record);
+}

+ 316 - 0
cloud-socket/src/com/js/kbt/mapper/LonLatRecordMapper.xml

@@ -0,0 +1,316 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.js.kbt.mapper.LonLatRecordMapper">
+  <resultMap id="BaseResultMap" type="com.js.kbt.model.LonLatRecord">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 31 14:14:27 CST 2019.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="lng" jdbcType="VARCHAR" property="lng" />
+    <result column="lat" jdbcType="VARCHAR" property="lat" />
+    <result column="gprs_lac" jdbcType="VARCHAR" property="gprsLac" />
+    <result column="gprs_ci" jdbcType="VARCHAR" property="gprsCi" />
+    <result column="mcc" jdbcType="VARCHAR" property="mcc" />
+    <result column="mnc" jdbcType="VARCHAR" property="mnc" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 31 14:14:27 CST 2019.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 31 14:14:27 CST 2019.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 31 14:14:27 CST 2019.
+    -->
+    id, lng, lat, gprs_lac, gprs_ci, mcc, mnc
+  </sql>
+  <select id="selectByExample" parameterType="com.js.kbt.model.LonLatRecordExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 31 14:14:27 CST 2019.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from lon_lat_record
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 31 14:14:27 CST 2019.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from lon_lat_record
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 31 14:14:27 CST 2019.
+    -->
+    delete from lon_lat_record
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.js.kbt.model.LonLatRecordExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 31 14:14:27 CST 2019.
+    -->
+    delete from lon_lat_record
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.js.kbt.model.LonLatRecord">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 31 14:14:27 CST 2019.
+    -->
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into lon_lat_record (lng, lat, gprs_lac, 
+      gprs_ci, mcc, mnc)
+    values (#{lng,jdbcType=VARCHAR}, #{lat,jdbcType=VARCHAR}, #{gprsLac,jdbcType=VARCHAR}, 
+      #{gprsCi,jdbcType=VARCHAR}, #{mcc,jdbcType=VARCHAR}, #{mnc,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.js.kbt.model.LonLatRecord">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 31 14:14:27 CST 2019.
+    -->
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into lon_lat_record
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="lng != null">
+        lng,
+      </if>
+      <if test="lat != null">
+        lat,
+      </if>
+      <if test="gprsLac != null">
+        gprs_lac,
+      </if>
+      <if test="gprsCi != null">
+        gprs_ci,
+      </if>
+      <if test="mcc != null">
+        mcc,
+      </if>
+      <if test="mnc != null">
+        mnc,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="lng != null">
+        #{lng,jdbcType=VARCHAR},
+      </if>
+      <if test="lat != null">
+        #{lat,jdbcType=VARCHAR},
+      </if>
+      <if test="gprsLac != null">
+        #{gprsLac,jdbcType=VARCHAR},
+      </if>
+      <if test="gprsCi != null">
+        #{gprsCi,jdbcType=VARCHAR},
+      </if>
+      <if test="mcc != null">
+        #{mcc,jdbcType=VARCHAR},
+      </if>
+      <if test="mnc != null">
+        #{mnc,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.js.kbt.model.LonLatRecordExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 31 14:14:27 CST 2019.
+    -->
+    select count(*) from lon_lat_record
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 31 14:14:27 CST 2019.
+    -->
+    update lon_lat_record
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.lng != null">
+        lng = #{record.lng,jdbcType=VARCHAR},
+      </if>
+      <if test="record.lat != null">
+        lat = #{record.lat,jdbcType=VARCHAR},
+      </if>
+      <if test="record.gprsLac != null">
+        gprs_lac = #{record.gprsLac,jdbcType=VARCHAR},
+      </if>
+      <if test="record.gprsCi != null">
+        gprs_ci = #{record.gprsCi,jdbcType=VARCHAR},
+      </if>
+      <if test="record.mcc != null">
+        mcc = #{record.mcc,jdbcType=VARCHAR},
+      </if>
+      <if test="record.mnc != null">
+        mnc = #{record.mnc,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 31 14:14:27 CST 2019.
+    -->
+    update lon_lat_record
+    set id = #{record.id,jdbcType=INTEGER},
+      lng = #{record.lng,jdbcType=VARCHAR},
+      lat = #{record.lat,jdbcType=VARCHAR},
+      gprs_lac = #{record.gprsLac,jdbcType=VARCHAR},
+      gprs_ci = #{record.gprsCi,jdbcType=VARCHAR},
+      mcc = #{record.mcc,jdbcType=VARCHAR},
+      mnc = #{record.mnc,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.js.kbt.model.LonLatRecord">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 31 14:14:27 CST 2019.
+    -->
+    update lon_lat_record
+    <set>
+      <if test="lng != null">
+        lng = #{lng,jdbcType=VARCHAR},
+      </if>
+      <if test="lat != null">
+        lat = #{lat,jdbcType=VARCHAR},
+      </if>
+      <if test="gprsLac != null">
+        gprs_lac = #{gprsLac,jdbcType=VARCHAR},
+      </if>
+      <if test="gprsCi != null">
+        gprs_ci = #{gprsCi,jdbcType=VARCHAR},
+      </if>
+      <if test="mcc != null">
+        mcc = #{mcc,jdbcType=VARCHAR},
+      </if>
+      <if test="mnc != null">
+        mnc = #{mnc,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.js.kbt.model.LonLatRecord">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Oct 31 14:14:27 CST 2019.
+    -->
+    update lon_lat_record
+    set lng = #{lng,jdbcType=VARCHAR},
+      lat = #{lat,jdbcType=VARCHAR},
+      gprs_lac = #{gprsLac,jdbcType=VARCHAR},
+      gprs_ci = #{gprsCi,jdbcType=VARCHAR},
+      mcc = #{mcc,jdbcType=VARCHAR},
+      mnc = #{mnc,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 168 - 0
cloud-socket/src/com/js/kbt/model/LonLatRecord.java

@@ -0,0 +1,168 @@
+package com.js.kbt.model;
+
+import java.util.Date;
+
+public class LonLatRecord {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column lon_lat_record.id
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column lon_lat_record.lng
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	private String lng;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column lon_lat_record.lat
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	private String lat;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column lon_lat_record.gprs_lac
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	private String gprsLac;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column lon_lat_record.gprs_ci
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	private String gprsCi;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column lon_lat_record.mcc
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	private String mcc;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column lon_lat_record.mnc
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	private String mnc;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column lon_lat_record.id
+	 * @return  the value of lon_lat_record.id
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column lon_lat_record.id
+	 * @param id  the value for lon_lat_record.id
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column lon_lat_record.lng
+	 * @return  the value of lon_lat_record.lng
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public String getLng() {
+		return lng;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column lon_lat_record.lng
+	 * @param lng  the value for lon_lat_record.lng
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public void setLng(String lng) {
+		this.lng = lng;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column lon_lat_record.lat
+	 * @return  the value of lon_lat_record.lat
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public String getLat() {
+		return lat;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column lon_lat_record.lat
+	 * @param lat  the value for lon_lat_record.lat
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public void setLat(String lat) {
+		this.lat = lat;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column lon_lat_record.gprs_lac
+	 * @return  the value of lon_lat_record.gprs_lac
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public String getGprsLac() {
+		return gprsLac;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column lon_lat_record.gprs_lac
+	 * @param gprsLac  the value for lon_lat_record.gprs_lac
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public void setGprsLac(String gprsLac) {
+		this.gprsLac = gprsLac;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column lon_lat_record.gprs_ci
+	 * @return  the value of lon_lat_record.gprs_ci
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public String getGprsCi() {
+		return gprsCi;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column lon_lat_record.gprs_ci
+	 * @param gprsCi  the value for lon_lat_record.gprs_ci
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public void setGprsCi(String gprsCi) {
+		this.gprsCi = gprsCi;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column lon_lat_record.mcc
+	 * @return  the value of lon_lat_record.mcc
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public String getMcc() {
+		return mcc;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column lon_lat_record.mcc
+	 * @param mcc  the value for lon_lat_record.mcc
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public void setMcc(String mcc) {
+		this.mcc = mcc;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column lon_lat_record.mnc
+	 * @return  the value of lon_lat_record.mnc
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public String getMnc() {
+		return mnc;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column lon_lat_record.mnc
+	 * @param mnc  the value for lon_lat_record.mnc
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public void setMnc(String mnc) {
+		this.mnc = mnc;
+	}
+}

+ 742 - 0
cloud-socket/src/com/js/kbt/model/LonLatRecordExample.java

@@ -0,0 +1,742 @@
+package com.js.kbt.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class LonLatRecordExample {
+    /**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	protected String orderByClause;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	protected boolean distinct;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	protected List<Criteria> oredCriteria;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public LonLatRecordExample() {
+		oredCriteria = new ArrayList<Criteria>();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public void setOrderByClause(String orderByClause) {
+		this.orderByClause = orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public String getOrderByClause() {
+		return orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public void setDistinct(boolean distinct) {
+		this.distinct = distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public boolean isDistinct() {
+		return distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public List<Criteria> getOredCriteria() {
+		return oredCriteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public void or(Criteria criteria) {
+		oredCriteria.add(criteria);
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public Criteria or() {
+		Criteria criteria = createCriteriaInternal();
+		oredCriteria.add(criteria);
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public Criteria createCriteria() {
+		Criteria criteria = createCriteriaInternal();
+		if (oredCriteria.size() == 0) {
+			oredCriteria.add(criteria);
+		}
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	protected Criteria createCriteriaInternal() {
+		Criteria criteria = new Criteria();
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public void clear() {
+		oredCriteria.clear();
+		orderByClause = null;
+		distinct = false;
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	protected abstract static class GeneratedCriteria {
+		protected List<Criterion> criteria;
+
+		protected GeneratedCriteria() {
+			super();
+			criteria = new ArrayList<Criterion>();
+		}
+
+		public boolean isValid() {
+			return criteria.size() > 0;
+		}
+
+		public List<Criterion> getAllCriteria() {
+			return criteria;
+		}
+
+		public List<Criterion> getCriteria() {
+			return criteria;
+		}
+
+		protected void addCriterion(String condition) {
+			if (condition == null) {
+				throw new RuntimeException("Value for condition cannot be null");
+			}
+			criteria.add(new Criterion(condition));
+		}
+
+		protected void addCriterion(String condition, Object value, String property) {
+			if (value == null) {
+				throw new RuntimeException("Value for " + property + " cannot be null");
+			}
+			criteria.add(new Criterion(condition, value));
+		}
+
+		protected void addCriterion(String condition, Object value1, Object value2, String property) {
+			if (value1 == null || value2 == null) {
+				throw new RuntimeException("Between values for " + property + " cannot be null");
+			}
+			criteria.add(new Criterion(condition, value1, value2));
+		}
+
+		public Criteria andIdIsNull() {
+			addCriterion("id is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIsNotNull() {
+			addCriterion("id is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdEqualTo(Integer value) {
+			addCriterion("id =", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotEqualTo(Integer value) {
+			addCriterion("id <>", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThan(Integer value) {
+			addCriterion("id >", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+			addCriterion("id >=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThan(Integer value) {
+			addCriterion("id <", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThanOrEqualTo(Integer value) {
+			addCriterion("id <=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIn(List<Integer> values) {
+			addCriterion("id in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotIn(List<Integer> values) {
+			addCriterion("id not in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdBetween(Integer value1, Integer value2) {
+			addCriterion("id between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotBetween(Integer value1, Integer value2) {
+			addCriterion("id not between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andLngIsNull() {
+			addCriterion("lng is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andLngIsNotNull() {
+			addCriterion("lng is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andLngEqualTo(String value) {
+			addCriterion("lng =", value, "lng");
+			return (Criteria) this;
+		}
+
+		public Criteria andLngNotEqualTo(String value) {
+			addCriterion("lng <>", value, "lng");
+			return (Criteria) this;
+		}
+
+		public Criteria andLngGreaterThan(String value) {
+			addCriterion("lng >", value, "lng");
+			return (Criteria) this;
+		}
+
+		public Criteria andLngGreaterThanOrEqualTo(String value) {
+			addCriterion("lng >=", value, "lng");
+			return (Criteria) this;
+		}
+
+		public Criteria andLngLessThan(String value) {
+			addCriterion("lng <", value, "lng");
+			return (Criteria) this;
+		}
+
+		public Criteria andLngLessThanOrEqualTo(String value) {
+			addCriterion("lng <=", value, "lng");
+			return (Criteria) this;
+		}
+
+		public Criteria andLngLike(String value) {
+			addCriterion("lng like", value, "lng");
+			return (Criteria) this;
+		}
+
+		public Criteria andLngNotLike(String value) {
+			addCriterion("lng not like", value, "lng");
+			return (Criteria) this;
+		}
+
+		public Criteria andLngIn(List<String> values) {
+			addCriterion("lng in", values, "lng");
+			return (Criteria) this;
+		}
+
+		public Criteria andLngNotIn(List<String> values) {
+			addCriterion("lng not in", values, "lng");
+			return (Criteria) this;
+		}
+
+		public Criteria andLngBetween(String value1, String value2) {
+			addCriterion("lng between", value1, value2, "lng");
+			return (Criteria) this;
+		}
+
+		public Criteria andLngNotBetween(String value1, String value2) {
+			addCriterion("lng not between", value1, value2, "lng");
+			return (Criteria) this;
+		}
+
+		public Criteria andLatIsNull() {
+			addCriterion("lat is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andLatIsNotNull() {
+			addCriterion("lat is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andLatEqualTo(String value) {
+			addCriterion("lat =", value, "lat");
+			return (Criteria) this;
+		}
+
+		public Criteria andLatNotEqualTo(String value) {
+			addCriterion("lat <>", value, "lat");
+			return (Criteria) this;
+		}
+
+		public Criteria andLatGreaterThan(String value) {
+			addCriterion("lat >", value, "lat");
+			return (Criteria) this;
+		}
+
+		public Criteria andLatGreaterThanOrEqualTo(String value) {
+			addCriterion("lat >=", value, "lat");
+			return (Criteria) this;
+		}
+
+		public Criteria andLatLessThan(String value) {
+			addCriterion("lat <", value, "lat");
+			return (Criteria) this;
+		}
+
+		public Criteria andLatLessThanOrEqualTo(String value) {
+			addCriterion("lat <=", value, "lat");
+			return (Criteria) this;
+		}
+
+		public Criteria andLatLike(String value) {
+			addCriterion("lat like", value, "lat");
+			return (Criteria) this;
+		}
+
+		public Criteria andLatNotLike(String value) {
+			addCriterion("lat not like", value, "lat");
+			return (Criteria) this;
+		}
+
+		public Criteria andLatIn(List<String> values) {
+			addCriterion("lat in", values, "lat");
+			return (Criteria) this;
+		}
+
+		public Criteria andLatNotIn(List<String> values) {
+			addCriterion("lat not in", values, "lat");
+			return (Criteria) this;
+		}
+
+		public Criteria andLatBetween(String value1, String value2) {
+			addCriterion("lat between", value1, value2, "lat");
+			return (Criteria) this;
+		}
+
+		public Criteria andLatNotBetween(String value1, String value2) {
+			addCriterion("lat not between", value1, value2, "lat");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsLacIsNull() {
+			addCriterion("gprs_lac is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsLacIsNotNull() {
+			addCriterion("gprs_lac is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsLacEqualTo(String value) {
+			addCriterion("gprs_lac =", value, "gprsLac");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsLacNotEqualTo(String value) {
+			addCriterion("gprs_lac <>", value, "gprsLac");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsLacGreaterThan(String value) {
+			addCriterion("gprs_lac >", value, "gprsLac");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsLacGreaterThanOrEqualTo(String value) {
+			addCriterion("gprs_lac >=", value, "gprsLac");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsLacLessThan(String value) {
+			addCriterion("gprs_lac <", value, "gprsLac");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsLacLessThanOrEqualTo(String value) {
+			addCriterion("gprs_lac <=", value, "gprsLac");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsLacLike(String value) {
+			addCriterion("gprs_lac like", value, "gprsLac");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsLacNotLike(String value) {
+			addCriterion("gprs_lac not like", value, "gprsLac");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsLacIn(List<String> values) {
+			addCriterion("gprs_lac in", values, "gprsLac");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsLacNotIn(List<String> values) {
+			addCriterion("gprs_lac not in", values, "gprsLac");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsLacBetween(String value1, String value2) {
+			addCriterion("gprs_lac between", value1, value2, "gprsLac");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsLacNotBetween(String value1, String value2) {
+			addCriterion("gprs_lac not between", value1, value2, "gprsLac");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsCiIsNull() {
+			addCriterion("gprs_ci is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsCiIsNotNull() {
+			addCriterion("gprs_ci is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsCiEqualTo(String value) {
+			addCriterion("gprs_ci =", value, "gprsCi");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsCiNotEqualTo(String value) {
+			addCriterion("gprs_ci <>", value, "gprsCi");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsCiGreaterThan(String value) {
+			addCriterion("gprs_ci >", value, "gprsCi");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsCiGreaterThanOrEqualTo(String value) {
+			addCriterion("gprs_ci >=", value, "gprsCi");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsCiLessThan(String value) {
+			addCriterion("gprs_ci <", value, "gprsCi");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsCiLessThanOrEqualTo(String value) {
+			addCriterion("gprs_ci <=", value, "gprsCi");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsCiLike(String value) {
+			addCriterion("gprs_ci like", value, "gprsCi");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsCiNotLike(String value) {
+			addCriterion("gprs_ci not like", value, "gprsCi");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsCiIn(List<String> values) {
+			addCriterion("gprs_ci in", values, "gprsCi");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsCiNotIn(List<String> values) {
+			addCriterion("gprs_ci not in", values, "gprsCi");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsCiBetween(String value1, String value2) {
+			addCriterion("gprs_ci between", value1, value2, "gprsCi");
+			return (Criteria) this;
+		}
+
+		public Criteria andGprsCiNotBetween(String value1, String value2) {
+			addCriterion("gprs_ci not between", value1, value2, "gprsCi");
+			return (Criteria) this;
+		}
+
+		public Criteria andMccIsNull() {
+			addCriterion("mcc is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andMccIsNotNull() {
+			addCriterion("mcc is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andMccEqualTo(String value) {
+			addCriterion("mcc =", value, "mcc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMccNotEqualTo(String value) {
+			addCriterion("mcc <>", value, "mcc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMccGreaterThan(String value) {
+			addCriterion("mcc >", value, "mcc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMccGreaterThanOrEqualTo(String value) {
+			addCriterion("mcc >=", value, "mcc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMccLessThan(String value) {
+			addCriterion("mcc <", value, "mcc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMccLessThanOrEqualTo(String value) {
+			addCriterion("mcc <=", value, "mcc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMccLike(String value) {
+			addCriterion("mcc like", value, "mcc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMccNotLike(String value) {
+			addCriterion("mcc not like", value, "mcc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMccIn(List<String> values) {
+			addCriterion("mcc in", values, "mcc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMccNotIn(List<String> values) {
+			addCriterion("mcc not in", values, "mcc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMccBetween(String value1, String value2) {
+			addCriterion("mcc between", value1, value2, "mcc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMccNotBetween(String value1, String value2) {
+			addCriterion("mcc not between", value1, value2, "mcc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMncIsNull() {
+			addCriterion("mnc is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andMncIsNotNull() {
+			addCriterion("mnc is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andMncEqualTo(String value) {
+			addCriterion("mnc =", value, "mnc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMncNotEqualTo(String value) {
+			addCriterion("mnc <>", value, "mnc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMncGreaterThan(String value) {
+			addCriterion("mnc >", value, "mnc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMncGreaterThanOrEqualTo(String value) {
+			addCriterion("mnc >=", value, "mnc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMncLessThan(String value) {
+			addCriterion("mnc <", value, "mnc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMncLessThanOrEqualTo(String value) {
+			addCriterion("mnc <=", value, "mnc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMncLike(String value) {
+			addCriterion("mnc like", value, "mnc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMncNotLike(String value) {
+			addCriterion("mnc not like", value, "mnc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMncIn(List<String> values) {
+			addCriterion("mnc in", values, "mnc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMncNotIn(List<String> values) {
+			addCriterion("mnc not in", values, "mnc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMncBetween(String value1, String value2) {
+			addCriterion("mnc between", value1, value2, "mnc");
+			return (Criteria) this;
+		}
+
+		public Criteria andMncNotBetween(String value1, String value2) {
+			addCriterion("mnc not between", value1, value2, "mnc");
+			return (Criteria) this;
+		}
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table lon_lat_record
+	 * @mbg.generated  Thu Oct 31 14:14:27 CST 2019
+	 */
+	public static class Criterion {
+		private String condition;
+		private Object value;
+		private Object secondValue;
+		private boolean noValue;
+		private boolean singleValue;
+		private boolean betweenValue;
+		private boolean listValue;
+		private String typeHandler;
+
+		public String getCondition() {
+			return condition;
+		}
+
+		public Object getValue() {
+			return value;
+		}
+
+		public Object getSecondValue() {
+			return secondValue;
+		}
+
+		public boolean isNoValue() {
+			return noValue;
+		}
+
+		public boolean isSingleValue() {
+			return singleValue;
+		}
+
+		public boolean isBetweenValue() {
+			return betweenValue;
+		}
+
+		public boolean isListValue() {
+			return listValue;
+		}
+
+		public String getTypeHandler() {
+			return typeHandler;
+		}
+
+		protected Criterion(String condition) {
+			super();
+			this.condition = condition;
+			this.typeHandler = null;
+			this.noValue = true;
+		}
+
+		protected Criterion(String condition, Object value, String typeHandler) {
+			super();
+			this.condition = condition;
+			this.value = value;
+			this.typeHandler = typeHandler;
+			if (value instanceof List<?>) {
+				this.listValue = true;
+			} else {
+				this.singleValue = true;
+			}
+		}
+
+		protected Criterion(String condition, Object value) {
+			this(condition, value, null);
+		}
+
+		protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+			super();
+			this.condition = condition;
+			this.value = value;
+			this.secondValue = secondValue;
+			this.typeHandler = typeHandler;
+			this.betweenValue = true;
+		}
+
+		protected Criterion(String condition, Object value, Object secondValue) {
+			this(condition, value, secondValue, null);
+		}
+	}
+
+	/**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table lon_lat_record
+     *
+     * @mbg.generated do_not_delete_during_merge Thu Oct 31 13:45:53 CST 2019
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+}

+ 34 - 10
cloud-socket/src/com/js/kbt/socket/UserHandler.java

@@ -13,6 +13,7 @@ import org.apache.log4j.Logger;
 import org.springframework.stereotype.Service;
 
 import com.alibaba.fastjson.JSONObject;
+import com.js.kbt.mapper.LonLatRecordMapper;
 import com.js.kbt.mapper.MouldCycleRuntimeMapper;
 import com.js.kbt.mapper.MouldDownPacketMapper;
 import com.js.kbt.mapper.MouldHistoryMapper;
@@ -24,6 +25,8 @@ import com.js.kbt.mapper.TbFactoryMapper;
 import com.js.kbt.mapper.TbMouldEquipmentMapper;
 import com.js.kbt.mapper.TbMouldMapper;
 import com.js.kbt.mapper.TimeCalibrationRecordMapper;
+import com.js.kbt.model.LonLatRecord;
+import com.js.kbt.model.LonLatRecordExample;
 import com.js.kbt.model.MouldCycleRuntime;
 import com.js.kbt.model.MouldCycleRuntimeExample;
 import com.js.kbt.model.MouldDownPacket;
@@ -77,6 +80,8 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
     private SensorThresholdMapper sensorThresholdMapper;
 	@Resource
 	private RecDataLogMapper recDataLogMapper;
+	@Resource
+	private LonLatRecordMapper lonLatRecordMapper;
 	
 
 	@Override
@@ -159,17 +164,36 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 		item.setAlarm(Integer.decode("0x" + input.substring(64 * 2, 65 * 2)));
 		String str = input.substring(65 * 2, 69 * 2);
 		item.setRunCnt(reverseParseHex(str));
-		// 根据基站lac和ci获取经纬度
-		String api = "http://api.cellocation.com:81/cell/?mcc=460&mnc=0&lac=" + item.getGprsLac() + "&ci="
-				+ item.getGprsCi() + "&output=json";
-		String resp = com.js.kbt.util.HttpRequest.sendGet(api, null);
-		JSONObject json = JSONObject.parseObject(resp);
-		if (json != null && json.getInteger("errcode") == 0) {
-			item.setLng(json.getDouble("lon") + "");
-			item.setLat(json.getDouble("lat") + "");
-		} else {
-			logger.error("调用基站解析平台出错: " + resp);
+		LonLatRecordExample rExp = new LonLatRecordExample();
+		rExp.createCriteria()
+		.andMccEqualTo("460").andMncEqualTo("0").andGprsCiEqualTo(item.getGprsCi()).andGprsLacEqualTo(item.getGprsLac());
+		List<LonLatRecord> lRList = lonLatRecordMapper.selectByExample(rExp);
+		if(lRList.size()>0){
+			LonLatRecord lonLatRecord = lRList.get(0);
+			item.setLng(lonLatRecord.getLng());
+			item.setLat(lonLatRecord.getLat());
+		}else{
+			// 根据基站lac和ci获取经纬度
+			String api = "http://api.cellocation.com:81/cell/?mcc=460&mnc=0&lac=" + item.getGprsLac() + "&ci="
+					+ item.getGprsCi() + "&output=json";
+			String resp = com.js.kbt.util.HttpRequest.sendGet(api, null);
+			JSONObject json = JSONObject.parseObject(resp);
+			if (json != null && json.getInteger("errcode") == 0) {
+				item.setLng(json.getDouble("lon") + "");
+				item.setLat(json.getDouble("lat") + "");
+			} else {
+				logger.error("调用基站解析平台出错: " + resp);
+			}
+			LonLatRecord latRecord = new LonLatRecord();
+			latRecord.setGprsCi(item.getGprsCi());
+			latRecord.setMcc("460");
+			latRecord.setMnc("0");
+			latRecord.setGprsLac(item.getGprsLac());
+			latRecord.setLat(item.getLat());
+			latRecord.setLng(item.getLng());
+			lonLatRecordMapper.insertSelective(latRecord);
 		}
+		
 		String crcStr = input.substring(input.length() - 4);
 		item.setCrcCode("" + reverseParseHex(crcStr));
 		// 找寻上一条最新记录

+ 2 - 0
target/classes/main/resources/mapper/MouldMapper.xml

@@ -131,6 +131,7 @@
             </if>
             <if test="userVO.mouleMap == -1">
                 AND tbmp.lng IS NOT NULL and tbmp.lat IS NOT NULL
+                AND tbp.is_delete = 0
             </if>
         </where>
     </select>
@@ -170,6 +171,7 @@
             </if>
             <if test="userVO.mouleMap == -1">
                 AND tbmp.lng IS NOT NULL and tbmp.lat IS NOT NULL
+                AND tbp.is_delete = 0
             </if>
             <if test="userVO.type == 0">
                 AND tbm.equipment_id is not null