Browse Source

修改运行次数的字段到主表,提高查询效率

seyason 5 years ago
parent
commit
2217c12148

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

@@ -90,7 +90,7 @@
         tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbc.company_name companyName,tbco.company_name produceCompany,tbm.pre_update_id,
         tbp.manager mangerName,tbco.company_address area,tbm.oc_cycle oc_cycle,tbp.manager_id managerId,tbmp.equipment_name equipmentName,
         tbmp.equipment_no equipmentNo,tbm.setting_life setting_life,tbp.owner_company_name ownerCompanyName,tbm.run_times run_times,
-        tbmp.lng,tbmp.lat,tbmp.stage,(SELECT open_time FROM `mould_history_time` WHERE equipment_no=equipmentNo ORDER BY open_time DESC LIMIT 1) lastopentime
+        tbmp.lng,tbmp.lat,tbmp.stage,tbmp.lastopentime
         ,tbmp.curhill_number hillNumber,tbmp.curtemperature temperature
         from
         tb_mould tbm
@@ -140,7 +140,7 @@
         tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbc.company_name companyName,tbm.holes,tbm.pre_update_id,tbco.company_name produceCompany,
         tbp.manager mangerName,tbco.company_address area,tbm.oc_cycle oc_cycle,tbm.creator_id creator_id,tbmp.equipment_name equipmentName,
         tbmp.equipment_no equipmentNo,tbm.setting_life setting_life,tbp.owner_company_name ownerCompanyName,tbm.run_times run_times,
-        tbmp.lng,tbmp.lat,tbmp.stage,(SELECT open_time FROM `mould_history_time` WHERE equipment_no=equipmentNo ORDER BY open_time DESC LIMIT 1) lastopentime,
+        tbmp.lng,tbmp.lat,tbmp.stage,tbmp.lastopentime,
         tbmp.curhill_number hillNumber,
         tbmp.curtemperature temperature
         from

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

@@ -1,76 +1,76 @@
-package com.js.kbt.mapper;
-
-import com.js.kbt.model.TbMouldEquipment;
-import com.js.kbt.model.TbMouldEquipmentExample;
-import java.util.List;
-import org.apache.ibatis.annotations.Param;
-
-public interface TbMouldEquipmentMapper {
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	long countByExample(TbMouldEquipmentExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	int deleteByExample(TbMouldEquipmentExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	int deleteByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	int insert(TbMouldEquipment record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	int insertSelective(TbMouldEquipment record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	List<TbMouldEquipment> selectByExample(TbMouldEquipmentExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	TbMouldEquipment selectByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	int updateByExampleSelective(@Param("record") TbMouldEquipment record,
-			@Param("example") TbMouldEquipmentExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	int updateByExample(@Param("record") TbMouldEquipment record, @Param("example") TbMouldEquipmentExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	int updateByPrimaryKeySelective(TbMouldEquipment record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	int updateByPrimaryKey(TbMouldEquipment record);
+package com.js.kbt.mapper;
+
+import com.js.kbt.model.TbMouldEquipment;
+import com.js.kbt.model.TbMouldEquipmentExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface TbMouldEquipmentMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	long countByExample(TbMouldEquipmentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	int deleteByExample(TbMouldEquipmentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	int insert(TbMouldEquipment record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	int insertSelective(TbMouldEquipment record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	List<TbMouldEquipment> selectByExample(TbMouldEquipmentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	TbMouldEquipment selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	int updateByExampleSelective(@Param("record") TbMouldEquipment record,
+			@Param("example") TbMouldEquipmentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	int updateByExample(@Param("record") TbMouldEquipment record, @Param("example") TbMouldEquipmentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	int updateByPrimaryKeySelective(TbMouldEquipment record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	int updateByPrimaryKey(TbMouldEquipment record);
 }

+ 490 - 474
cloud-socket/src/com/js/kbt/mapper/TbMouldEquipmentMapper.xml

@@ -1,475 +1,491 @@
-<?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.TbMouldEquipmentMapper">
-  <resultMap id="BaseResultMap" type="com.js.kbt.model.TbMouldEquipment">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 19:24:40 CST 2019.
-    -->
-    <id column="id" jdbcType="INTEGER" property="id" />
-    <result column="equipment_name" jdbcType="VARCHAR" property="equipmentName" />
-    <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
-    <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
-    <result column="use_life" jdbcType="INTEGER" property="useLife" />
-    <result column="belong_company_id" jdbcType="INTEGER" property="belongCompanyId" />
-    <result column="equipment_no" jdbcType="VARCHAR" property="equipmentNo" />
-    <result column="is_use" jdbcType="INTEGER" property="isUse" />
-    <result column="hill_number" jdbcType="VARCHAR" property="hillNumber" />
-    <result column="lng" jdbcType="DOUBLE" property="lng" />
-    <result column="lat" jdbcType="DOUBLE" property="lat" />
-    <result column="temperature" jdbcType="INTEGER" property="temperature" />
-    <result column="agent" jdbcType="VARCHAR" property="agent" />
-    <result column="stage" jdbcType="INTEGER" property="stage" />
-    <result column="sim" jdbcType="VARCHAR" property="sim" />
-    <result column="curhill_number" jdbcType="VARCHAR" property="curhillNumber" />
-    <result column="curtemperature" jdbcType="INTEGER" property="curtemperature" />
-  </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 Mon Oct 28 19:24:40 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 Mon Oct 28 19:24:40 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 Mon Oct 28 19:24:40 CST 2019.
-    -->
-    id, equipment_name, start_time, end_time, use_life, belong_company_id, equipment_no, 
-    is_use, hill_number, lng, lat, temperature, agent, stage, sim, curhill_number, curtemperature
-  </sql>
-  <select id="selectByExample" parameterType="com.js.kbt.model.TbMouldEquipmentExample" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 19:24:40 CST 2019.
-    -->
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from tb_mould_equipment
-    <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 Mon Oct 28 19:24:40 CST 2019.
-    -->
-    select 
-    <include refid="Base_Column_List" />
-    from tb_mould_equipment
-    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 Mon Oct 28 19:24:40 CST 2019.
-    -->
-    delete from tb_mould_equipment
-    where id = #{id,jdbcType=INTEGER}
-  </delete>
-  <delete id="deleteByExample" parameterType="com.js.kbt.model.TbMouldEquipmentExample">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 19:24:40 CST 2019.
-    -->
-    delete from tb_mould_equipment
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.js.kbt.model.TbMouldEquipment">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 19:24:40 CST 2019.
-    -->
-    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
-      SELECT LAST_INSERT_ID()
-    </selectKey>
-    insert into tb_mould_equipment (equipment_name, start_time, end_time, 
-      use_life, belong_company_id, equipment_no, 
-      is_use, hill_number, lng, 
-      lat, temperature, agent, 
-      stage, sim, curhill_number, 
-      curtemperature)
-    values (#{equipmentName,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, 
-      #{useLife,jdbcType=INTEGER}, #{belongCompanyId,jdbcType=INTEGER}, #{equipmentNo,jdbcType=VARCHAR}, 
-      #{isUse,jdbcType=INTEGER}, #{hillNumber,jdbcType=VARCHAR}, #{lng,jdbcType=DOUBLE}, 
-      #{lat,jdbcType=DOUBLE}, #{temperature,jdbcType=INTEGER}, #{agent,jdbcType=VARCHAR}, 
-      #{stage,jdbcType=INTEGER}, #{sim,jdbcType=VARCHAR}, #{curhillNumber,jdbcType=VARCHAR}, 
-      #{curtemperature,jdbcType=INTEGER})
-  </insert>
-  <insert id="insertSelective" parameterType="com.js.kbt.model.TbMouldEquipment">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 19:24:40 CST 2019.
-    -->
-    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
-      SELECT LAST_INSERT_ID()
-    </selectKey>
-    insert into tb_mould_equipment
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="equipmentName != null">
-        equipment_name,
-      </if>
-      <if test="startTime != null">
-        start_time,
-      </if>
-      <if test="endTime != null">
-        end_time,
-      </if>
-      <if test="useLife != null">
-        use_life,
-      </if>
-      <if test="belongCompanyId != null">
-        belong_company_id,
-      </if>
-      <if test="equipmentNo != null">
-        equipment_no,
-      </if>
-      <if test="isUse != null">
-        is_use,
-      </if>
-      <if test="hillNumber != null">
-        hill_number,
-      </if>
-      <if test="lng != null">
-        lng,
-      </if>
-      <if test="lat != null">
-        lat,
-      </if>
-      <if test="temperature != null">
-        temperature,
-      </if>
-      <if test="agent != null">
-        agent,
-      </if>
-      <if test="stage != null">
-        stage,
-      </if>
-      <if test="sim != null">
-        sim,
-      </if>
-      <if test="curhillNumber != null">
-        curhill_number,
-      </if>
-      <if test="curtemperature != null">
-        curtemperature,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="equipmentName != null">
-        #{equipmentName,jdbcType=VARCHAR},
-      </if>
-      <if test="startTime != null">
-        #{startTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="endTime != null">
-        #{endTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="useLife != null">
-        #{useLife,jdbcType=INTEGER},
-      </if>
-      <if test="belongCompanyId != null">
-        #{belongCompanyId,jdbcType=INTEGER},
-      </if>
-      <if test="equipmentNo != null">
-        #{equipmentNo,jdbcType=VARCHAR},
-      </if>
-      <if test="isUse != null">
-        #{isUse,jdbcType=INTEGER},
-      </if>
-      <if test="hillNumber != null">
-        #{hillNumber,jdbcType=VARCHAR},
-      </if>
-      <if test="lng != null">
-        #{lng,jdbcType=DOUBLE},
-      </if>
-      <if test="lat != null">
-        #{lat,jdbcType=DOUBLE},
-      </if>
-      <if test="temperature != null">
-        #{temperature,jdbcType=INTEGER},
-      </if>
-      <if test="agent != null">
-        #{agent,jdbcType=VARCHAR},
-      </if>
-      <if test="stage != null">
-        #{stage,jdbcType=INTEGER},
-      </if>
-      <if test="sim != null">
-        #{sim,jdbcType=VARCHAR},
-      </if>
-      <if test="curhillNumber != null">
-        #{curhillNumber,jdbcType=VARCHAR},
-      </if>
-      <if test="curtemperature != null">
-        #{curtemperature,jdbcType=INTEGER},
-      </if>
-    </trim>
-  </insert>
-  <select id="countByExample" parameterType="com.js.kbt.model.TbMouldEquipmentExample" resultType="java.lang.Long">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 19:24:40 CST 2019.
-    -->
-    select count(*) from tb_mould_equipment
-    <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 Mon Oct 28 19:24:40 CST 2019.
-    -->
-    update tb_mould_equipment
-    <set>
-      <if test="record.id != null">
-        id = #{record.id,jdbcType=INTEGER},
-      </if>
-      <if test="record.equipmentName != null">
-        equipment_name = #{record.equipmentName,jdbcType=VARCHAR},
-      </if>
-      <if test="record.startTime != null">
-        start_time = #{record.startTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.endTime != null">
-        end_time = #{record.endTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.useLife != null">
-        use_life = #{record.useLife,jdbcType=INTEGER},
-      </if>
-      <if test="record.belongCompanyId != null">
-        belong_company_id = #{record.belongCompanyId,jdbcType=INTEGER},
-      </if>
-      <if test="record.equipmentNo != null">
-        equipment_no = #{record.equipmentNo,jdbcType=VARCHAR},
-      </if>
-      <if test="record.isUse != null">
-        is_use = #{record.isUse,jdbcType=INTEGER},
-      </if>
-      <if test="record.hillNumber != null">
-        hill_number = #{record.hillNumber,jdbcType=VARCHAR},
-      </if>
-      <if test="record.lng != null">
-        lng = #{record.lng,jdbcType=DOUBLE},
-      </if>
-      <if test="record.lat != null">
-        lat = #{record.lat,jdbcType=DOUBLE},
-      </if>
-      <if test="record.temperature != null">
-        temperature = #{record.temperature,jdbcType=INTEGER},
-      </if>
-      <if test="record.agent != null">
-        agent = #{record.agent,jdbcType=VARCHAR},
-      </if>
-      <if test="record.stage != null">
-        stage = #{record.stage,jdbcType=INTEGER},
-      </if>
-      <if test="record.sim != null">
-        sim = #{record.sim,jdbcType=VARCHAR},
-      </if>
-      <if test="record.curhillNumber != null">
-        curhill_number = #{record.curhillNumber,jdbcType=VARCHAR},
-      </if>
-      <if test="record.curtemperature != null">
-        curtemperature = #{record.curtemperature,jdbcType=INTEGER},
-      </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 Mon Oct 28 19:24:40 CST 2019.
-    -->
-    update tb_mould_equipment
-    set id = #{record.id,jdbcType=INTEGER},
-      equipment_name = #{record.equipmentName,jdbcType=VARCHAR},
-      start_time = #{record.startTime,jdbcType=TIMESTAMP},
-      end_time = #{record.endTime,jdbcType=TIMESTAMP},
-      use_life = #{record.useLife,jdbcType=INTEGER},
-      belong_company_id = #{record.belongCompanyId,jdbcType=INTEGER},
-      equipment_no = #{record.equipmentNo,jdbcType=VARCHAR},
-      is_use = #{record.isUse,jdbcType=INTEGER},
-      hill_number = #{record.hillNumber,jdbcType=VARCHAR},
-      lng = #{record.lng,jdbcType=DOUBLE},
-      lat = #{record.lat,jdbcType=DOUBLE},
-      temperature = #{record.temperature,jdbcType=INTEGER},
-      agent = #{record.agent,jdbcType=VARCHAR},
-      stage = #{record.stage,jdbcType=INTEGER},
-      sim = #{record.sim,jdbcType=VARCHAR},
-      curhill_number = #{record.curhillNumber,jdbcType=VARCHAR},
-      curtemperature = #{record.curtemperature,jdbcType=INTEGER}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.js.kbt.model.TbMouldEquipment">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 19:24:40 CST 2019.
-    -->
-    update tb_mould_equipment
-    <set>
-      <if test="equipmentName != null">
-        equipment_name = #{equipmentName,jdbcType=VARCHAR},
-      </if>
-      <if test="startTime != null">
-        start_time = #{startTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="endTime != null">
-        end_time = #{endTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="useLife != null">
-        use_life = #{useLife,jdbcType=INTEGER},
-      </if>
-      <if test="belongCompanyId != null">
-        belong_company_id = #{belongCompanyId,jdbcType=INTEGER},
-      </if>
-      <if test="equipmentNo != null">
-        equipment_no = #{equipmentNo,jdbcType=VARCHAR},
-      </if>
-      <if test="isUse != null">
-        is_use = #{isUse,jdbcType=INTEGER},
-      </if>
-      <if test="hillNumber != null">
-        hill_number = #{hillNumber,jdbcType=VARCHAR},
-      </if>
-      <if test="lng != null">
-        lng = #{lng,jdbcType=DOUBLE},
-      </if>
-      <if test="lat != null">
-        lat = #{lat,jdbcType=DOUBLE},
-      </if>
-      <if test="temperature != null">
-        temperature = #{temperature,jdbcType=INTEGER},
-      </if>
-      <if test="agent != null">
-        agent = #{agent,jdbcType=VARCHAR},
-      </if>
-      <if test="stage != null">
-        stage = #{stage,jdbcType=INTEGER},
-      </if>
-      <if test="sim != null">
-        sim = #{sim,jdbcType=VARCHAR},
-      </if>
-      <if test="curhillNumber != null">
-        curhill_number = #{curhillNumber,jdbcType=VARCHAR},
-      </if>
-      <if test="curtemperature != null">
-        curtemperature = #{curtemperature,jdbcType=INTEGER},
-      </if>
-    </set>
-    where id = #{id,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.js.kbt.model.TbMouldEquipment">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 19:24:40 CST 2019.
-    -->
-    update tb_mould_equipment
-    set equipment_name = #{equipmentName,jdbcType=VARCHAR},
-      start_time = #{startTime,jdbcType=TIMESTAMP},
-      end_time = #{endTime,jdbcType=TIMESTAMP},
-      use_life = #{useLife,jdbcType=INTEGER},
-      belong_company_id = #{belongCompanyId,jdbcType=INTEGER},
-      equipment_no = #{equipmentNo,jdbcType=VARCHAR},
-      is_use = #{isUse,jdbcType=INTEGER},
-      hill_number = #{hillNumber,jdbcType=VARCHAR},
-      lng = #{lng,jdbcType=DOUBLE},
-      lat = #{lat,jdbcType=DOUBLE},
-      temperature = #{temperature,jdbcType=INTEGER},
-      agent = #{agent,jdbcType=VARCHAR},
-      stage = #{stage,jdbcType=INTEGER},
-      sim = #{sim,jdbcType=VARCHAR},
-      curhill_number = #{curhillNumber,jdbcType=VARCHAR},
-      curtemperature = #{curtemperature,jdbcType=INTEGER}
-    where id = #{id,jdbcType=INTEGER}
-  </update>
+<?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.TbMouldEquipmentMapper">
+  <resultMap id="BaseResultMap" type="com.js.kbt.model.TbMouldEquipment">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="equipment_name" jdbcType="VARCHAR" property="equipmentName" />
+    <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
+    <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
+    <result column="use_life" jdbcType="INTEGER" property="useLife" />
+    <result column="belong_company_id" jdbcType="INTEGER" property="belongCompanyId" />
+    <result column="equipment_no" jdbcType="VARCHAR" property="equipmentNo" />
+    <result column="is_use" jdbcType="INTEGER" property="isUse" />
+    <result column="hill_number" jdbcType="VARCHAR" property="hillNumber" />
+    <result column="lng" jdbcType="DOUBLE" property="lng" />
+    <result column="lat" jdbcType="DOUBLE" property="lat" />
+    <result column="temperature" jdbcType="INTEGER" property="temperature" />
+    <result column="agent" jdbcType="VARCHAR" property="agent" />
+    <result column="stage" jdbcType="INTEGER" property="stage" />
+    <result column="sim" jdbcType="VARCHAR" property="sim" />
+    <result column="curhill_number" jdbcType="VARCHAR" property="curhillNumber" />
+    <result column="curtemperature" jdbcType="INTEGER" property="curtemperature" />
+    <result column="lastopentime" jdbcType="TIMESTAMP" property="lastopentime" />
+  </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 Sun Mar 29 17:48:51 CST 2020.
+    -->
+    <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 Sun Mar 29 17:48:51 CST 2020.
+    -->
+    <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 Sun Mar 29 17:48:51 CST 2020.
+    -->
+    id, equipment_name, start_time, end_time, use_life, belong_company_id, equipment_no, 
+    is_use, hill_number, lng, lat, temperature, agent, stage, sim, curhill_number, curtemperature, 
+    lastopentime
+  </sql>
+  <select id="selectByExample" parameterType="com.js.kbt.model.TbMouldEquipmentExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from tb_mould_equipment
+    <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 Sun Mar 29 17:48:51 CST 2020.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from tb_mould_equipment
+    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 Sun Mar 29 17:48:51 CST 2020.
+    -->
+    delete from tb_mould_equipment
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.js.kbt.model.TbMouldEquipmentExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+    -->
+    delete from tb_mould_equipment
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.js.kbt.model.TbMouldEquipment">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+    -->
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into tb_mould_equipment (equipment_name, start_time, end_time, 
+      use_life, belong_company_id, equipment_no, 
+      is_use, hill_number, lng, 
+      lat, temperature, agent, 
+      stage, sim, curhill_number, 
+      curtemperature, lastopentime)
+    values (#{equipmentName,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, 
+      #{useLife,jdbcType=INTEGER}, #{belongCompanyId,jdbcType=INTEGER}, #{equipmentNo,jdbcType=VARCHAR}, 
+      #{isUse,jdbcType=INTEGER}, #{hillNumber,jdbcType=VARCHAR}, #{lng,jdbcType=DOUBLE}, 
+      #{lat,jdbcType=DOUBLE}, #{temperature,jdbcType=INTEGER}, #{agent,jdbcType=VARCHAR}, 
+      #{stage,jdbcType=INTEGER}, #{sim,jdbcType=VARCHAR}, #{curhillNumber,jdbcType=VARCHAR}, 
+      #{curtemperature,jdbcType=INTEGER}, #{lastopentime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.js.kbt.model.TbMouldEquipment">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+    -->
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into tb_mould_equipment
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="equipmentName != null">
+        equipment_name,
+      </if>
+      <if test="startTime != null">
+        start_time,
+      </if>
+      <if test="endTime != null">
+        end_time,
+      </if>
+      <if test="useLife != null">
+        use_life,
+      </if>
+      <if test="belongCompanyId != null">
+        belong_company_id,
+      </if>
+      <if test="equipmentNo != null">
+        equipment_no,
+      </if>
+      <if test="isUse != null">
+        is_use,
+      </if>
+      <if test="hillNumber != null">
+        hill_number,
+      </if>
+      <if test="lng != null">
+        lng,
+      </if>
+      <if test="lat != null">
+        lat,
+      </if>
+      <if test="temperature != null">
+        temperature,
+      </if>
+      <if test="agent != null">
+        agent,
+      </if>
+      <if test="stage != null">
+        stage,
+      </if>
+      <if test="sim != null">
+        sim,
+      </if>
+      <if test="curhillNumber != null">
+        curhill_number,
+      </if>
+      <if test="curtemperature != null">
+        curtemperature,
+      </if>
+      <if test="lastopentime != null">
+        lastopentime,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="equipmentName != null">
+        #{equipmentName,jdbcType=VARCHAR},
+      </if>
+      <if test="startTime != null">
+        #{startTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="endTime != null">
+        #{endTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="useLife != null">
+        #{useLife,jdbcType=INTEGER},
+      </if>
+      <if test="belongCompanyId != null">
+        #{belongCompanyId,jdbcType=INTEGER},
+      </if>
+      <if test="equipmentNo != null">
+        #{equipmentNo,jdbcType=VARCHAR},
+      </if>
+      <if test="isUse != null">
+        #{isUse,jdbcType=INTEGER},
+      </if>
+      <if test="hillNumber != null">
+        #{hillNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="lng != null">
+        #{lng,jdbcType=DOUBLE},
+      </if>
+      <if test="lat != null">
+        #{lat,jdbcType=DOUBLE},
+      </if>
+      <if test="temperature != null">
+        #{temperature,jdbcType=INTEGER},
+      </if>
+      <if test="agent != null">
+        #{agent,jdbcType=VARCHAR},
+      </if>
+      <if test="stage != null">
+        #{stage,jdbcType=INTEGER},
+      </if>
+      <if test="sim != null">
+        #{sim,jdbcType=VARCHAR},
+      </if>
+      <if test="curhillNumber != null">
+        #{curhillNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="curtemperature != null">
+        #{curtemperature,jdbcType=INTEGER},
+      </if>
+      <if test="lastopentime != null">
+        #{lastopentime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.js.kbt.model.TbMouldEquipmentExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+    -->
+    select count(*) from tb_mould_equipment
+    <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 Sun Mar 29 17:48:51 CST 2020.
+    -->
+    update tb_mould_equipment
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.equipmentName != null">
+        equipment_name = #{record.equipmentName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.startTime != null">
+        start_time = #{record.startTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.endTime != null">
+        end_time = #{record.endTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.useLife != null">
+        use_life = #{record.useLife,jdbcType=INTEGER},
+      </if>
+      <if test="record.belongCompanyId != null">
+        belong_company_id = #{record.belongCompanyId,jdbcType=INTEGER},
+      </if>
+      <if test="record.equipmentNo != null">
+        equipment_no = #{record.equipmentNo,jdbcType=VARCHAR},
+      </if>
+      <if test="record.isUse != null">
+        is_use = #{record.isUse,jdbcType=INTEGER},
+      </if>
+      <if test="record.hillNumber != null">
+        hill_number = #{record.hillNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="record.lng != null">
+        lng = #{record.lng,jdbcType=DOUBLE},
+      </if>
+      <if test="record.lat != null">
+        lat = #{record.lat,jdbcType=DOUBLE},
+      </if>
+      <if test="record.temperature != null">
+        temperature = #{record.temperature,jdbcType=INTEGER},
+      </if>
+      <if test="record.agent != null">
+        agent = #{record.agent,jdbcType=VARCHAR},
+      </if>
+      <if test="record.stage != null">
+        stage = #{record.stage,jdbcType=INTEGER},
+      </if>
+      <if test="record.sim != null">
+        sim = #{record.sim,jdbcType=VARCHAR},
+      </if>
+      <if test="record.curhillNumber != null">
+        curhill_number = #{record.curhillNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="record.curtemperature != null">
+        curtemperature = #{record.curtemperature,jdbcType=INTEGER},
+      </if>
+      <if test="record.lastopentime != null">
+        lastopentime = #{record.lastopentime,jdbcType=TIMESTAMP},
+      </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 Sun Mar 29 17:48:51 CST 2020.
+    -->
+    update tb_mould_equipment
+    set id = #{record.id,jdbcType=INTEGER},
+      equipment_name = #{record.equipmentName,jdbcType=VARCHAR},
+      start_time = #{record.startTime,jdbcType=TIMESTAMP},
+      end_time = #{record.endTime,jdbcType=TIMESTAMP},
+      use_life = #{record.useLife,jdbcType=INTEGER},
+      belong_company_id = #{record.belongCompanyId,jdbcType=INTEGER},
+      equipment_no = #{record.equipmentNo,jdbcType=VARCHAR},
+      is_use = #{record.isUse,jdbcType=INTEGER},
+      hill_number = #{record.hillNumber,jdbcType=VARCHAR},
+      lng = #{record.lng,jdbcType=DOUBLE},
+      lat = #{record.lat,jdbcType=DOUBLE},
+      temperature = #{record.temperature,jdbcType=INTEGER},
+      agent = #{record.agent,jdbcType=VARCHAR},
+      stage = #{record.stage,jdbcType=INTEGER},
+      sim = #{record.sim,jdbcType=VARCHAR},
+      curhill_number = #{record.curhillNumber,jdbcType=VARCHAR},
+      curtemperature = #{record.curtemperature,jdbcType=INTEGER},
+      lastopentime = #{record.lastopentime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.js.kbt.model.TbMouldEquipment">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+    -->
+    update tb_mould_equipment
+    <set>
+      <if test="equipmentName != null">
+        equipment_name = #{equipmentName,jdbcType=VARCHAR},
+      </if>
+      <if test="startTime != null">
+        start_time = #{startTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="endTime != null">
+        end_time = #{endTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="useLife != null">
+        use_life = #{useLife,jdbcType=INTEGER},
+      </if>
+      <if test="belongCompanyId != null">
+        belong_company_id = #{belongCompanyId,jdbcType=INTEGER},
+      </if>
+      <if test="equipmentNo != null">
+        equipment_no = #{equipmentNo,jdbcType=VARCHAR},
+      </if>
+      <if test="isUse != null">
+        is_use = #{isUse,jdbcType=INTEGER},
+      </if>
+      <if test="hillNumber != null">
+        hill_number = #{hillNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="lng != null">
+        lng = #{lng,jdbcType=DOUBLE},
+      </if>
+      <if test="lat != null">
+        lat = #{lat,jdbcType=DOUBLE},
+      </if>
+      <if test="temperature != null">
+        temperature = #{temperature,jdbcType=INTEGER},
+      </if>
+      <if test="agent != null">
+        agent = #{agent,jdbcType=VARCHAR},
+      </if>
+      <if test="stage != null">
+        stage = #{stage,jdbcType=INTEGER},
+      </if>
+      <if test="sim != null">
+        sim = #{sim,jdbcType=VARCHAR},
+      </if>
+      <if test="curhillNumber != null">
+        curhill_number = #{curhillNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="curtemperature != null">
+        curtemperature = #{curtemperature,jdbcType=INTEGER},
+      </if>
+      <if test="lastopentime != null">
+        lastopentime = #{lastopentime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.js.kbt.model.TbMouldEquipment">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+    -->
+    update tb_mould_equipment
+    set equipment_name = #{equipmentName,jdbcType=VARCHAR},
+      start_time = #{startTime,jdbcType=TIMESTAMP},
+      end_time = #{endTime,jdbcType=TIMESTAMP},
+      use_life = #{useLife,jdbcType=INTEGER},
+      belong_company_id = #{belongCompanyId,jdbcType=INTEGER},
+      equipment_no = #{equipmentNo,jdbcType=VARCHAR},
+      is_use = #{isUse,jdbcType=INTEGER},
+      hill_number = #{hillNumber,jdbcType=VARCHAR},
+      lng = #{lng,jdbcType=DOUBLE},
+      lat = #{lat,jdbcType=DOUBLE},
+      temperature = #{temperature,jdbcType=INTEGER},
+      agent = #{agent,jdbcType=VARCHAR},
+      stage = #{stage,jdbcType=INTEGER},
+      sim = #{sim,jdbcType=VARCHAR},
+      curhill_number = #{curhillNumber,jdbcType=VARCHAR},
+      curtemperature = #{curtemperature,jdbcType=INTEGER},
+      lastopentime = #{lastopentime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
 </mapper>

+ 420 - 397
cloud-socket/src/com/js/kbt/model/TbMouldEquipment.java

@@ -1,398 +1,421 @@
-package com.js.kbt.model;
-
-import java.util.Date;
-
-public class TbMouldEquipment {
-
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.id
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	private Integer id;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.equipment_name
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	private String equipmentName;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.start_time
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	private Date startTime;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.end_time
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	private Date endTime;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.use_life
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	private Integer useLife;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.belong_company_id
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	private Integer belongCompanyId;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.equipment_no
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	private String equipmentNo;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.is_use
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	private Integer isUse;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.hill_number
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	private String hillNumber;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.lng
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	private Double lng;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.lat
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	private Double lat;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.temperature
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	private Integer temperature;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.agent
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	private String agent;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.stage
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	private Integer stage;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.sim
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	private String sim;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.curhill_number
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	private String curhillNumber;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.curtemperature
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	private Integer curtemperature;
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.id
-	 * @return  the value of tb_mould_equipment.id
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public Integer getId() {
-		return id;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.id
-	 * @param id  the value for tb_mould_equipment.id
-	 * @mbg.generated  Mon Oct 28 19:24:40 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 tb_mould_equipment.equipment_name
-	 * @return  the value of tb_mould_equipment.equipment_name
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public String getEquipmentName() {
-		return equipmentName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.equipment_name
-	 * @param equipmentName  the value for tb_mould_equipment.equipment_name
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public void setEquipmentName(String equipmentName) {
-		this.equipmentName = equipmentName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.start_time
-	 * @return  the value of tb_mould_equipment.start_time
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public Date getStartTime() {
-		return startTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.start_time
-	 * @param startTime  the value for tb_mould_equipment.start_time
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public void setStartTime(Date startTime) {
-		this.startTime = startTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.end_time
-	 * @return  the value of tb_mould_equipment.end_time
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public Date getEndTime() {
-		return endTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.end_time
-	 * @param endTime  the value for tb_mould_equipment.end_time
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public void setEndTime(Date endTime) {
-		this.endTime = endTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.use_life
-	 * @return  the value of tb_mould_equipment.use_life
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public Integer getUseLife() {
-		return useLife;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.use_life
-	 * @param useLife  the value for tb_mould_equipment.use_life
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public void setUseLife(Integer useLife) {
-		this.useLife = useLife;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.belong_company_id
-	 * @return  the value of tb_mould_equipment.belong_company_id
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public Integer getBelongCompanyId() {
-		return belongCompanyId;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.belong_company_id
-	 * @param belongCompanyId  the value for tb_mould_equipment.belong_company_id
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public void setBelongCompanyId(Integer belongCompanyId) {
-		this.belongCompanyId = belongCompanyId;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.equipment_no
-	 * @return  the value of tb_mould_equipment.equipment_no
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public String getEquipmentNo() {
-		return equipmentNo;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.equipment_no
-	 * @param equipmentNo  the value for tb_mould_equipment.equipment_no
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public void setEquipmentNo(String equipmentNo) {
-		this.equipmentNo = equipmentNo;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.is_use
-	 * @return  the value of tb_mould_equipment.is_use
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public Integer getIsUse() {
-		return isUse;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.is_use
-	 * @param isUse  the value for tb_mould_equipment.is_use
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public void setIsUse(Integer isUse) {
-		this.isUse = isUse;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.hill_number
-	 * @return  the value of tb_mould_equipment.hill_number
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public String getHillNumber() {
-		return hillNumber;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.hill_number
-	 * @param hillNumber  the value for tb_mould_equipment.hill_number
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public void setHillNumber(String hillNumber) {
-		this.hillNumber = hillNumber;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.lng
-	 * @return  the value of tb_mould_equipment.lng
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public Double getLng() {
-		return lng;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.lng
-	 * @param lng  the value for tb_mould_equipment.lng
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public void setLng(Double lng) {
-		this.lng = lng;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.lat
-	 * @return  the value of tb_mould_equipment.lat
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public Double getLat() {
-		return lat;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.lat
-	 * @param lat  the value for tb_mould_equipment.lat
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public void setLat(Double lat) {
-		this.lat = lat;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.temperature
-	 * @return  the value of tb_mould_equipment.temperature
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public Integer getTemperature() {
-		return temperature;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.temperature
-	 * @param temperature  the value for tb_mould_equipment.temperature
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public void setTemperature(Integer temperature) {
-		this.temperature = temperature;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.agent
-	 * @return  the value of tb_mould_equipment.agent
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public String getAgent() {
-		return agent;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.agent
-	 * @param agent  the value for tb_mould_equipment.agent
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public void setAgent(String agent) {
-		this.agent = agent;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.stage
-	 * @return  the value of tb_mould_equipment.stage
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public Integer getStage() {
-		return stage;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.stage
-	 * @param stage  the value for tb_mould_equipment.stage
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public void setStage(Integer stage) {
-		this.stage = stage;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.sim
-	 * @return  the value of tb_mould_equipment.sim
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public String getSim() {
-		return sim;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.sim
-	 * @param sim  the value for tb_mould_equipment.sim
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public void setSim(String sim) {
-		this.sim = sim;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.curhill_number
-	 * @return  the value of tb_mould_equipment.curhill_number
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public String getCurhillNumber() {
-		return curhillNumber;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.curhill_number
-	 * @param curhillNumber  the value for tb_mould_equipment.curhill_number
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public void setCurhillNumber(String curhillNumber) {
-		this.curhillNumber = curhillNumber;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.curtemperature
-	 * @return  the value of tb_mould_equipment.curtemperature
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public Integer getCurtemperature() {
-		return curtemperature;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.curtemperature
-	 * @param curtemperature  the value for tb_mould_equipment.curtemperature
-	 * @mbg.generated  Mon Oct 28 19:24:40 CST 2019
-	 */
-	public void setCurtemperature(Integer curtemperature) {
-		this.curtemperature = curtemperature;
-	}
+package com.js.kbt.model;
+
+import java.util.Date;
+
+public class TbMouldEquipment {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.id
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.equipment_name
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	private String equipmentName;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.start_time
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	private Date startTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.end_time
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	private Date endTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.use_life
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	private Integer useLife;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.belong_company_id
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	private Integer belongCompanyId;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.equipment_no
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	private String equipmentNo;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.is_use
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	private Integer isUse;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.hill_number
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	private String hillNumber;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.lng
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	private Double lng;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.lat
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	private Double lat;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.temperature
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	private Integer temperature;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.agent
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	private String agent;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.stage
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	private Integer stage;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.sim
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	private String sim;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.curhill_number
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	private String curhillNumber;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.curtemperature
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	private Integer curtemperature;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.lastopentime
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	private Date lastopentime;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.id
+	 * @return  the value of tb_mould_equipment.id
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.id
+	 * @param id  the value for tb_mould_equipment.id
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.equipment_name
+	 * @return  the value of tb_mould_equipment.equipment_name
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public String getEquipmentName() {
+		return equipmentName;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.equipment_name
+	 * @param equipmentName  the value for tb_mould_equipment.equipment_name
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public void setEquipmentName(String equipmentName) {
+		this.equipmentName = equipmentName;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.start_time
+	 * @return  the value of tb_mould_equipment.start_time
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public Date getStartTime() {
+		return startTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.start_time
+	 * @param startTime  the value for tb_mould_equipment.start_time
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public void setStartTime(Date startTime) {
+		this.startTime = startTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.end_time
+	 * @return  the value of tb_mould_equipment.end_time
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public Date getEndTime() {
+		return endTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.end_time
+	 * @param endTime  the value for tb_mould_equipment.end_time
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public void setEndTime(Date endTime) {
+		this.endTime = endTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.use_life
+	 * @return  the value of tb_mould_equipment.use_life
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public Integer getUseLife() {
+		return useLife;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.use_life
+	 * @param useLife  the value for tb_mould_equipment.use_life
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public void setUseLife(Integer useLife) {
+		this.useLife = useLife;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.belong_company_id
+	 * @return  the value of tb_mould_equipment.belong_company_id
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public Integer getBelongCompanyId() {
+		return belongCompanyId;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.belong_company_id
+	 * @param belongCompanyId  the value for tb_mould_equipment.belong_company_id
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public void setBelongCompanyId(Integer belongCompanyId) {
+		this.belongCompanyId = belongCompanyId;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.equipment_no
+	 * @return  the value of tb_mould_equipment.equipment_no
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public String getEquipmentNo() {
+		return equipmentNo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.equipment_no
+	 * @param equipmentNo  the value for tb_mould_equipment.equipment_no
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public void setEquipmentNo(String equipmentNo) {
+		this.equipmentNo = equipmentNo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.is_use
+	 * @return  the value of tb_mould_equipment.is_use
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public Integer getIsUse() {
+		return isUse;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.is_use
+	 * @param isUse  the value for tb_mould_equipment.is_use
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public void setIsUse(Integer isUse) {
+		this.isUse = isUse;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.hill_number
+	 * @return  the value of tb_mould_equipment.hill_number
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public String getHillNumber() {
+		return hillNumber;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.hill_number
+	 * @param hillNumber  the value for tb_mould_equipment.hill_number
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public void setHillNumber(String hillNumber) {
+		this.hillNumber = hillNumber;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.lng
+	 * @return  the value of tb_mould_equipment.lng
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public Double getLng() {
+		return lng;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.lng
+	 * @param lng  the value for tb_mould_equipment.lng
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public void setLng(Double lng) {
+		this.lng = lng;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.lat
+	 * @return  the value of tb_mould_equipment.lat
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public Double getLat() {
+		return lat;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.lat
+	 * @param lat  the value for tb_mould_equipment.lat
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public void setLat(Double lat) {
+		this.lat = lat;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.temperature
+	 * @return  the value of tb_mould_equipment.temperature
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public Integer getTemperature() {
+		return temperature;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.temperature
+	 * @param temperature  the value for tb_mould_equipment.temperature
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public void setTemperature(Integer temperature) {
+		this.temperature = temperature;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.agent
+	 * @return  the value of tb_mould_equipment.agent
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public String getAgent() {
+		return agent;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.agent
+	 * @param agent  the value for tb_mould_equipment.agent
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public void setAgent(String agent) {
+		this.agent = agent;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.stage
+	 * @return  the value of tb_mould_equipment.stage
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public Integer getStage() {
+		return stage;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.stage
+	 * @param stage  the value for tb_mould_equipment.stage
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public void setStage(Integer stage) {
+		this.stage = stage;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.sim
+	 * @return  the value of tb_mould_equipment.sim
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public String getSim() {
+		return sim;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.sim
+	 * @param sim  the value for tb_mould_equipment.sim
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public void setSim(String sim) {
+		this.sim = sim;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.curhill_number
+	 * @return  the value of tb_mould_equipment.curhill_number
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public String getCurhillNumber() {
+		return curhillNumber;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.curhill_number
+	 * @param curhillNumber  the value for tb_mould_equipment.curhill_number
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public void setCurhillNumber(String curhillNumber) {
+		this.curhillNumber = curhillNumber;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.curtemperature
+	 * @return  the value of tb_mould_equipment.curtemperature
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public Integer getCurtemperature() {
+		return curtemperature;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.curtemperature
+	 * @param curtemperature  the value for tb_mould_equipment.curtemperature
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public void setCurtemperature(Integer curtemperature) {
+		this.curtemperature = curtemperature;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.lastopentime
+	 * @return  the value of tb_mould_equipment.lastopentime
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public Date getLastopentime() {
+		return lastopentime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.lastopentime
+	 * @param lastopentime  the value for tb_mould_equipment.lastopentime
+	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 */
+	public void setLastopentime(Date lastopentime) {
+		this.lastopentime = lastopentime;
+	}
 }

File diff suppressed because it is too large
+ 1401 - 1341
cloud-socket/src/com/js/kbt/model/TbMouldEquipmentExample.java


+ 19 - 79
cloud-socket/src/com/js/kbt/socket/UserHandler.java

@@ -187,19 +187,8 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 			System.out.println("==lac" + reverseParseHex(input.substring(48 * 2, 50 * 2)));
 			System.out.println("==ci" + reverseParseHex(input.substring(50 * 2, 52 * 2)));
 			// 临时变更高低位不做转换(由于硬件转递数据高低位传反导致,具体以上面为准)
-			// System.out.println("==lac" + Integer.parseInt(input.substring(48
-			// * 2, 50 *
-			// 2),16));
-			// System.out.println("==ci" + Integer.parseInt(input.substring(50 *
-			// 2, 52 *
-			// 2),16));
 			item.setGprsLac("" + reverseParseHex(input.substring(48 * 2, 50 * 2)));
 			item.setGprsCi("" + reverseParseHex(input.substring(50 * 2, 52 * 2)));
-			// 临时变更高低位不做转换(由于硬件转递数据高低位传反导致,具体以上面为准)
-			// item.setGprsLac("" + Integer.parseInt(input.substring(48 * 2, 50
-			// * 2),16));
-			// item.setGprsCi("" + Integer.parseInt(input.substring(50 * 2, 52 *
-			// 2),16));
 			item.setWifiBbsid(input.substring(52 * 2, 58 * 2));
 			String temp = "0x" + input.substring(58 * 2, 59 * 2);
 			System.out.println(temp);
@@ -254,13 +243,6 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 			List<MouldHistory> newList = mouldHistoryMapper.selectByExample(mExp);
 			// 存入数据库
 			mouldHistoryMapper.insertSelective(item);
-			Integer differenceValue = 0;
-			//计算本次的运行次数和上次的差值
-			if(newList.size()==0){
-				differenceValue = item.getRunCnt();
-			}else{
-				differenceValue = item.getRunCnt() - newList.get(0).getRunCnt();
-			}
 			//发送清空次数和其他指定
 //			EquipmentSendCommandExample escExample = new EquipmentSendCommandExample();
 //			escExample.createCriteria().andEquipmentNoEqualTo(item.getEquipmentNo()).andIsSendEqualTo(0);
@@ -288,8 +270,8 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 			List<MouldHistoryTime> historyList = new ArrayList<>();
 			//用于接受第一包的开合时间与上次最新一包的开合时间差值
 			long openTimeDiff = 0L;
+			Date lastOpenTime = null;
 			//用于接受第一包数据
-//			MouldHistoryTime firstMouldHistoryTime = new MouldHistoryTime();
 			if (end - start * 2 >= 24) {// 时间最少6位,1位显示0x00,开合算两个时间,所以是6*2*2=24
 				// 本次运行周期内的开合模次数
 				int periodCnt = (end - start * 2) / 24;
@@ -297,7 +279,6 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 				logger.info("本次开合模次数==" + periodCnt);
 				long aHeadOpenTimeLongVal = 0L;
 				//用于接收判断是不是有包在当前包之后但已经发上来了,如16:11的开和数据先于16:10的数据先发上来
-//				List<MouldHistoryTime> GreaterThanOpenTimeList = new ArrayList<>();
 				for (int pos = 0; pos < periodCnt; pos++) {
 					// 合模时间
 					MouldHistoryTime time = new MouldHistoryTime();
@@ -309,15 +290,17 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 					// 开模时间
 					Date openTime = parseDate(input, start, pos, 6);
 					time.setOpenTime(openTime);
+					if (lastOpenTime == null) {
+						lastOpenTime = openTime;
+					}
+					if (openTime != null && openTime.after(lastOpenTime)) {
+						lastOpenTime = openTime;
+					}
 					logger.info("第" + (pos + 1) + "包");
 					logger.info("本包开合时间戳--" + openTime.getTime());
 					if (pos == 0) {
 						MouldHistoryTimeExample mhtExp = new MouldHistoryTimeExample();
 						//查询当前包是否是之前丢的包,判断依据,看看有没有比当前开合日期更后的开合数据
-//						mhtExp.setOrderByClause("open_time limit 1");
-//						mhtExp.createCriteria().andEquipmentNoEqualTo(item.getEquipmentNo()).andOpenTimeGreaterThanOrEqualTo(openTime).andIsTrueEqualTo(0);
-//						GreaterThanOpenTimeList = mouldHistoryTimeMapper.selectByExample(mhtExp);
-//						mhtExp.clear();
 						mhtExp.setOrderByClause("open_time desc limit 1");
 						mhtExp.createCriteria().andEquipmentNoEqualTo(item.getEquipmentNo()).andOpenTimeLessThanOrEqualTo(openTime);
 						//小于当前开合时间的最新的一包开合数据
@@ -335,67 +318,17 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 					mouldHistoryTimeMapper.insertSelective(time);
 					// // 处理最后一包周期逻辑
 					aHeadOpenTimeLongVal = openTime.getTime();
-//					if(pos==0){
-//						firstMouldHistoryTime = time;
-//					}
 				}
-//				if(GreaterThanOpenTimeList.size()>0){
-//					//当前数据为丢包重传的数据
-//					logger.info("此包为之前丢的包...需要修改之前的第一包周期");
-//					MouldHistoryTime mouldHistoryTime = GreaterThanOpenTimeList.get(0);
-//					mouldHistoryTime.setTimeCost((int) (mouldHistoryTime.getOpenTime().getTime() - aHeadOpenTimeLongVal));
-//					MouldHistoryTimeExample mhtExp = new MouldHistoryTimeExample();
-//					mhtExp.createCriteria().andHistoryIdEqualTo(mouldHistoryTime.getHistoryId()).andOpenTimeEqualTo(mouldHistoryTime.getOpenTime()).andEquipmentNoEqualTo(mouldHistoryTime.getEquipmentNo());
-//					mouldHistoryTimeMapper.updateByExampleSelective(mouldHistoryTime, mhtExp);
-//				}
-//				//当前包为非丢包重传的数据
-//				Integer lossPacketCount = differenceValue - thisOpenCounts;
-//				if(lossPacketCount>0){
-//					logger.info("本次丢包数---->"+lossPacketCount+"_上一包开合数据数:"+historyList.size()+"_两包之间的时间差值:"+openTimeDiff);
-//					if(historyList.size()>0){
-//						//本次第一包开合时间与上一包最新开合数据的开合时间差值超过一分钟则判断为丢包了
-//						if(openTimeDiff>60000){
-//							logger.info("触发补充数据任务,时间:"+new SimpleDateFormat("yy-MM-dd,HH:mm:ss").format(new Date()));
-//							//此时丢包了,丢了lossPacketCount个包,如果小于0则是第二包或者是之前的丢包补上来了
-//							examineTask(item.getEquipmentNo(),lossPacketCount,firstMouldHistoryTime,historyList.get(0),pool);
-//						}
-//					}
-//				}
-
 			} else {
 				logger.info("本次开合模次数==0");
 			}
 			// 统计该模盒的平均开合周期
-			// MouldHistoryExample exp = new MouldHistoryExample();
-			// exp.setOrderByClause("id");
-			// exp.createCriteria().andEquipmentNoEqualTo(item.getEquipmentNo()).andRunCntEqualTo(item.getRunCnt());
-			// List<MouldHistoryTime> list =
-			// mouldHistoryTimeMapper.selectByEquipmentNoAndThanZero(item.getEquipmentNo());
-			// List<MouldHistory> list =
-			// mouldHistoryMapper.selectByExample(exp);
-			// List<Long> historyIds = new ArrayList<>();
-			// historyIds.add(-1L);
-			// for (MouldHistory mouldHistory : list) {
-			// historyIds.add(mouldHistory.getId());
-			// }
 			MouldHistoryTimeExample mtExp = new MouldHistoryTimeExample();
 			mtExp.setOrderByClause("seq");
 			mtExp.createCriteria().andHistoryIdEqualTo(item.getId()).andTimeCostGreaterThan(0);
 			historyList = mouldHistoryTimeMapper.selectByExample(mtExp);
 			int avgTime = 0;
 			int totalTime = 0;
-			// if (historyList.size() == 1) {
-			// // 证明盒子动了,找寻上一条记录
-			// if (newList.size() > 0) {
-			// MouldHistoryTime now = historyList.get(0);
-			// MouldHistoryTime last =
-			// mouldHistoryTimeMapper.getDateByHistory(newList.get(0).getId());
-			// if (null != now && null != last) {
-			// avgTime = (int)((now.getOpenTime().getTime()) -
-			// (last.getOpenTime().getTime()));
-			// }
-			// }
-			// } else {
 			if (historyList.size() > 1) {
 				for (MouldHistoryTime mouldHistoryTime : historyList) {
 					logger.info("totalTime" + totalTime);
@@ -406,10 +339,10 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 			}
 			// }
 			logger.info("avgTime-->" + avgTime);
-
-			handleModLogic(item, avgTime, thisOpenCounts);
-			// 判断预留字节的
-			if ("02".equals(mobilePart)) {
+			
+			handleModLogic(item, avgTime, thisOpenCounts, lastOpenTime);
+			// 判断预留字节的, 01-丢12包,02-丢50包
+			if ("01".equals(mobilePart) || "02".equals(mobilePart)) {
 				// 丢包数据已占满缓存,调用读取命令
 				String strHexStr16 = strHexStr16("#PRINTFALL;");
 				logger.info("丢包数据已占满缓存下发调用读取命令#PRINTFALL;==>" + strHexStr16);
@@ -506,7 +439,7 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 		}
 	}
 
-	private void handleModLogic(MouldHistory item, int avgTime, Integer thisOpenCount) {
+	private void handleModLogic(MouldHistory item, int avgTime, Integer thisOpenCount, Date lastOpenTime) {
 		logger.info("进了handleModLogic逻辑--");
 		logger.info("item==>" + item);
 		TbMouldEquipmentExample meqExp = new TbMouldEquipmentExample();
@@ -536,6 +469,13 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 				 */
 				logger.info("设备报警啦:" + item.getAlarm());
 			}
+			//处理最后一次开模时间
+			if (me.getLastopentime() == null) {
+				me.setLastopentime(lastOpenTime);
+			} else if (lastOpenTime != null && me.getLastopentime().before(lastOpenTime)) {
+				me.setLastopentime(lastOpenTime);
+				logger.info("设置最后开模时间:" + new SimpleDateFormat("yyyy-M-dd HH:mm:ss").format(lastOpenTime));
+			}
 			tbMouldEquipmentMapper.updateByPrimaryKeySelective(me);
 			logger.info("更新完了tbMouldEquipment的状态和温度以及经纬度");
 			TbMouldExample tExp = new TbMouldExample();