Ver Fonte

修改模具通信

quyueting há 5 anos atrás
pai
commit
2be0b6e1b1

+ 8 - 10
cloud-socket/src/applicationContext.xml

@@ -1,15 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:p="http://www.springframework.org/schema/p"
 	xmlns:context="http://www.springframework.org/schema/context"
 	xmlns:tx="http://www.springframework.org/schema/tx"
+	xmlns:task="http://www.springframework.org/schema/task"
 	xsi:schemaLocation="
 	http://www.springframework.org/schema/beans 
 	http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
 	http://www.springframework.org/schema/tx 
 	http://www.springframework.org/schema/tx/spring-tx-3.0.xsd 
 	http://www.springframework.org/schema/context 
-	http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+	http://www.springframework.org/schema/context/spring-context-3.0.xsd
+	http://www.springframework.org/schema/task 
+	http://www.springframework.org/schema/task/spring-task.xsd">
 	
 	<!-- 引入jdbc配置文件 -->
 	<context:property-placeholder location="classpath:jdbc.properties" />
@@ -40,14 +44,8 @@
 	<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
 		<property name="basePackage" value="com.js.kbt.mapper" />
 	</bean>
-<!-- 	<context:component-scan base-package="com.js.kbt.socket"/> -->
-	
-<!-- 	<bean id="helloServer" class="com.js.kbt.socket.HelloServer" scope="singleton" init-method="startServer" destroy-method="shutdown"/> -->
-<!--  	<bean id="helloServer" class="com.js.kbt.socket.Server" scope="singleton" init-method="start" destroy-method="shutdown"/> --> 
-<!--   	<bean id="deviceHandler" class="com.js.kbt.socket.DeviceHandler" scope="prototype"/> -->
-<!--   	<bean id="userHandler" class="com.js.kbt.socket.UserHandler" scope="prototype"/> -->
-<!--   	<bean id="appContextUtil" class="com.js.kbt.socket.ApplicationContextUtil" scope="prototype"/> -->
-  	 
+  	<context:component-scan
+		base-package="com.js.kbt.task" /> 
   	<context:component-scan base-package="com.js.kbt.socket"/>
 	
   <bean id="helloServer" class="com.js.kbt.socket.HelloServer" scope="singleton" init-method="startServer" destroy-method="shutdown"/>

+ 11 - 11
cloud-socket/src/com/js/kbt/mapper/TbMouldMapper.java

@@ -9,67 +9,67 @@ public interface TbMouldMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	long countByExample(TbMouldExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	int deleteByExample(TbMouldExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	int deleteByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	int insert(TbMould record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	int insertSelective(TbMould record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	List<TbMould> selectByExample(TbMouldExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	TbMould selectByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	int updateByExampleSelective(@Param("record") TbMould record, @Param("example") TbMouldExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	int updateByExample(@Param("record") TbMould record, @Param("example") TbMouldExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	int updateByPrimaryKeySelective(TbMould record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	int updateByPrimaryKey(TbMould record);
 }

+ 37 - 20
cloud-socket/src/com/js/kbt/mapper/TbMouldMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Oct 10 11:01:44 CST 2019.
+      This element was generated on Mon Oct 28 20:22:26 CST 2019.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="model_no" jdbcType="VARCHAR" property="modelNo" />
@@ -34,12 +34,13 @@
     <result column="holes" jdbcType="VARCHAR" property="holes" />
     <result column="pre_update_id" jdbcType="INTEGER" property="preUpdateId" />
     <result column="history_run_times" jdbcType="INTEGER" property="historyRunTimes" />
+    <result column="last_rec_time" jdbcType="TIMESTAMP" property="lastRecTime" />
   </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 10 11:01:44 CST 2019.
+      This element was generated on Mon Oct 28 20:22:26 CST 2019.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -73,7 +74,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Oct 10 11:01:44 CST 2019.
+      This element was generated on Mon Oct 28 20:22:26 CST 2019.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -107,19 +108,19 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Oct 10 11:01:44 CST 2019.
+      This element was generated on Mon Oct 28 20:22:26 CST 2019.
     -->
     id, model_no, model_name, water_gap, tonnage, oc_cycle, daily_output, company_id, 
     current_version_id, state, is_delete, creator_id, project_id, rfid, setting_life, 
     area, produce_company_name, initial_modulus, equipment_id, belong_project_grade, 
     produce_company_id, run_times, is_maintain, maintain_count, holes, pre_update_id, 
-    history_run_times
+    history_run_times, last_rec_time
   </sql>
   <select id="selectByExample" parameterType="com.js.kbt.model.TbMouldExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Oct 10 11:01:44 CST 2019.
+      This element was generated on Mon Oct 28 20:22:26 CST 2019.
     -->
     select
     <if test="distinct">
@@ -138,7 +139,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Oct 10 11:01:44 CST 2019.
+      This element was generated on Mon Oct 28 20:22:26 CST 2019.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -149,7 +150,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Oct 10 11:01:44 CST 2019.
+      This element was generated on Mon Oct 28 20:22:26 CST 2019.
     -->
     delete from tb_mould
     where id = #{id,jdbcType=INTEGER}
@@ -158,7 +159,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Oct 10 11:01:44 CST 2019.
+      This element was generated on Mon Oct 28 20:22:26 CST 2019.
     -->
     delete from tb_mould
     <if test="_parameter != null">
@@ -169,7 +170,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Oct 10 11:01:44 CST 2019.
+      This element was generated on Mon Oct 28 20:22:26 CST 2019.
     -->
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
       SELECT LAST_INSERT_ID()
@@ -182,7 +183,8 @@
       produce_company_name, initial_modulus, equipment_id, 
       belong_project_grade, produce_company_id, run_times, 
       is_maintain, maintain_count, holes, 
-      pre_update_id, history_run_times)
+      pre_update_id, history_run_times, last_rec_time
+      )
     values (#{modelNo,jdbcType=VARCHAR}, #{modelName,jdbcType=VARCHAR}, #{waterGap,jdbcType=DECIMAL}, 
       #{tonnage,jdbcType=DECIMAL}, #{ocCycle,jdbcType=DECIMAL}, #{dailyOutput,jdbcType=DECIMAL}, 
       #{companyId,jdbcType=INTEGER}, #{currentVersionId,jdbcType=INTEGER}, #{state,jdbcType=VARCHAR}, 
@@ -191,13 +193,14 @@
       #{produceCompanyName,jdbcType=VARCHAR}, #{initialModulus,jdbcType=INTEGER}, #{equipmentId,jdbcType=INTEGER}, 
       #{belongProjectGrade,jdbcType=VARCHAR}, #{produceCompanyId,jdbcType=INTEGER}, #{runTimes,jdbcType=INTEGER}, 
       #{isMaintain,jdbcType=INTEGER}, #{maintainCount,jdbcType=VARCHAR}, #{holes,jdbcType=VARCHAR}, 
-      #{preUpdateId,jdbcType=INTEGER}, #{historyRunTimes,jdbcType=INTEGER})
+      #{preUpdateId,jdbcType=INTEGER}, #{historyRunTimes,jdbcType=INTEGER}, #{lastRecTime,jdbcType=TIMESTAMP}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.js.kbt.model.TbMould">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Oct 10 11:01:44 CST 2019.
+      This element was generated on Mon Oct 28 20:22:26 CST 2019.
     -->
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
       SELECT LAST_INSERT_ID()
@@ -282,6 +285,9 @@
       <if test="historyRunTimes != null">
         history_run_times,
       </if>
+      <if test="lastRecTime != null">
+        last_rec_time,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="modelNo != null">
@@ -362,13 +368,16 @@
       <if test="historyRunTimes != null">
         #{historyRunTimes,jdbcType=INTEGER},
       </if>
+      <if test="lastRecTime != null">
+        #{lastRecTime,jdbcType=TIMESTAMP},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.js.kbt.model.TbMouldExample" 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 10 11:01:44 CST 2019.
+      This element was generated on Mon Oct 28 20:22:26 CST 2019.
     -->
     select count(*) from tb_mould
     <if test="_parameter != null">
@@ -379,7 +388,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Oct 10 11:01:44 CST 2019.
+      This element was generated on Mon Oct 28 20:22:26 CST 2019.
     -->
     update tb_mould
     <set>
@@ -464,6 +473,9 @@
       <if test="record.historyRunTimes != null">
         history_run_times = #{record.historyRunTimes,jdbcType=INTEGER},
       </if>
+      <if test="record.lastRecTime != null">
+        last_rec_time = #{record.lastRecTime,jdbcType=TIMESTAMP},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -473,7 +485,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Oct 10 11:01:44 CST 2019.
+      This element was generated on Mon Oct 28 20:22:26 CST 2019.
     -->
     update tb_mould
     set id = #{record.id,jdbcType=INTEGER},
@@ -502,7 +514,8 @@
       maintain_count = #{record.maintainCount,jdbcType=VARCHAR},
       holes = #{record.holes,jdbcType=VARCHAR},
       pre_update_id = #{record.preUpdateId,jdbcType=INTEGER},
-      history_run_times = #{record.historyRunTimes,jdbcType=INTEGER}
+      history_run_times = #{record.historyRunTimes,jdbcType=INTEGER},
+      last_rec_time = #{record.lastRecTime,jdbcType=TIMESTAMP}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -511,7 +524,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Oct 10 11:01:44 CST 2019.
+      This element was generated on Mon Oct 28 20:22:26 CST 2019.
     -->
     update tb_mould
     <set>
@@ -593,6 +606,9 @@
       <if test="historyRunTimes != null">
         history_run_times = #{historyRunTimes,jdbcType=INTEGER},
       </if>
+      <if test="lastRecTime != null">
+        last_rec_time = #{lastRecTime,jdbcType=TIMESTAMP},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -600,7 +616,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Oct 10 11:01:44 CST 2019.
+      This element was generated on Mon Oct 28 20:22:26 CST 2019.
     -->
     update tb_mould
     set model_no = #{modelNo,jdbcType=VARCHAR},
@@ -628,7 +644,8 @@
       maintain_count = #{maintainCount,jdbcType=VARCHAR},
       holes = #{holes,jdbcType=VARCHAR},
       pre_update_id = #{preUpdateId,jdbcType=INTEGER},
-      history_run_times = #{historyRunTimes,jdbcType=INTEGER}
+      history_run_times = #{historyRunTimes,jdbcType=INTEGER},
+      last_rec_time = #{lastRecTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=INTEGER}
   </update>
 </mapper>

+ 105 - 81
cloud-socket/src/com/js/kbt/model/TbMould.java

@@ -1,149 +1,155 @@
 package com.js.kbt.model;
 
 import java.math.BigDecimal;
+import java.util.Date;
 
 public class TbMould {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private Integer id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.model_no
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private String modelNo;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.model_name
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private String modelName;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.water_gap
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private BigDecimal waterGap;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.tonnage
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private BigDecimal tonnage;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.oc_cycle
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private BigDecimal ocCycle;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.daily_output
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private BigDecimal dailyOutput;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.company_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private Integer companyId;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.current_version_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private Integer currentVersionId;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.state
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private String state;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.is_delete
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private Integer isDelete;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.creator_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private Integer creatorId;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.project_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private Integer projectId;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.rfid
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private String rfid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.setting_life
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private Integer settingLife;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.area
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private String area;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.produce_company_name
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private String produceCompanyName;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.initial_modulus
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private Integer initialModulus;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.equipment_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private Integer equipmentId;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.belong_project_grade
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private String belongProjectGrade;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.produce_company_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private Integer produceCompanyId;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.run_times
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private Integer runTimes;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.is_maintain
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private Integer isMaintain;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.maintain_count
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private String maintainCount;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.holes
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private String holes;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.pre_update_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private Integer preUpdateId;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.history_run_times
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	private Integer historyRunTimes;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould.last_rec_time
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
+	 */
+	private Date lastRecTime;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.id
 	 * @return  the value of tb_mould.id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public Integer getId() {
 		return id;
@@ -152,7 +158,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.id
 	 * @param id  the value for tb_mould.id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setId(Integer id) {
 		this.id = id;
@@ -161,7 +167,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.model_no
 	 * @return  the value of tb_mould.model_no
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public String getModelNo() {
 		return modelNo;
@@ -170,7 +176,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.model_no
 	 * @param modelNo  the value for tb_mould.model_no
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setModelNo(String modelNo) {
 		this.modelNo = modelNo;
@@ -179,7 +185,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.model_name
 	 * @return  the value of tb_mould.model_name
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public String getModelName() {
 		return modelName;
@@ -188,7 +194,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.model_name
 	 * @param modelName  the value for tb_mould.model_name
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setModelName(String modelName) {
 		this.modelName = modelName;
@@ -197,7 +203,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.water_gap
 	 * @return  the value of tb_mould.water_gap
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public BigDecimal getWaterGap() {
 		return waterGap;
@@ -206,7 +212,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.water_gap
 	 * @param waterGap  the value for tb_mould.water_gap
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setWaterGap(BigDecimal waterGap) {
 		this.waterGap = waterGap;
@@ -215,7 +221,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.tonnage
 	 * @return  the value of tb_mould.tonnage
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public BigDecimal getTonnage() {
 		return tonnage;
@@ -224,7 +230,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.tonnage
 	 * @param tonnage  the value for tb_mould.tonnage
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setTonnage(BigDecimal tonnage) {
 		this.tonnage = tonnage;
@@ -233,7 +239,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.oc_cycle
 	 * @return  the value of tb_mould.oc_cycle
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public BigDecimal getOcCycle() {
 		return ocCycle;
@@ -242,7 +248,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.oc_cycle
 	 * @param ocCycle  the value for tb_mould.oc_cycle
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setOcCycle(BigDecimal ocCycle) {
 		this.ocCycle = ocCycle;
@@ -251,7 +257,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.daily_output
 	 * @return  the value of tb_mould.daily_output
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public BigDecimal getDailyOutput() {
 		return dailyOutput;
@@ -260,7 +266,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.daily_output
 	 * @param dailyOutput  the value for tb_mould.daily_output
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setDailyOutput(BigDecimal dailyOutput) {
 		this.dailyOutput = dailyOutput;
@@ -269,7 +275,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.company_id
 	 * @return  the value of tb_mould.company_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public Integer getCompanyId() {
 		return companyId;
@@ -278,7 +284,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.company_id
 	 * @param companyId  the value for tb_mould.company_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setCompanyId(Integer companyId) {
 		this.companyId = companyId;
@@ -287,7 +293,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.current_version_id
 	 * @return  the value of tb_mould.current_version_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public Integer getCurrentVersionId() {
 		return currentVersionId;
@@ -296,7 +302,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.current_version_id
 	 * @param currentVersionId  the value for tb_mould.current_version_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setCurrentVersionId(Integer currentVersionId) {
 		this.currentVersionId = currentVersionId;
@@ -305,7 +311,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.state
 	 * @return  the value of tb_mould.state
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public String getState() {
 		return state;
@@ -314,7 +320,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.state
 	 * @param state  the value for tb_mould.state
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setState(String state) {
 		this.state = state;
@@ -323,7 +329,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.is_delete
 	 * @return  the value of tb_mould.is_delete
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public Integer getIsDelete() {
 		return isDelete;
@@ -332,7 +338,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.is_delete
 	 * @param isDelete  the value for tb_mould.is_delete
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setIsDelete(Integer isDelete) {
 		this.isDelete = isDelete;
@@ -341,7 +347,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.creator_id
 	 * @return  the value of tb_mould.creator_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public Integer getCreatorId() {
 		return creatorId;
@@ -350,7 +356,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.creator_id
 	 * @param creatorId  the value for tb_mould.creator_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setCreatorId(Integer creatorId) {
 		this.creatorId = creatorId;
@@ -359,7 +365,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.project_id
 	 * @return  the value of tb_mould.project_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public Integer getProjectId() {
 		return projectId;
@@ -368,7 +374,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.project_id
 	 * @param projectId  the value for tb_mould.project_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setProjectId(Integer projectId) {
 		this.projectId = projectId;
@@ -377,7 +383,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.rfid
 	 * @return  the value of tb_mould.rfid
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public String getRfid() {
 		return rfid;
@@ -386,7 +392,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.rfid
 	 * @param rfid  the value for tb_mould.rfid
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setRfid(String rfid) {
 		this.rfid = rfid;
@@ -395,7 +401,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.setting_life
 	 * @return  the value of tb_mould.setting_life
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public Integer getSettingLife() {
 		return settingLife;
@@ -404,7 +410,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.setting_life
 	 * @param settingLife  the value for tb_mould.setting_life
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setSettingLife(Integer settingLife) {
 		this.settingLife = settingLife;
@@ -413,7 +419,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.area
 	 * @return  the value of tb_mould.area
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public String getArea() {
 		return area;
@@ -422,7 +428,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.area
 	 * @param area  the value for tb_mould.area
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setArea(String area) {
 		this.area = area;
@@ -431,7 +437,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.produce_company_name
 	 * @return  the value of tb_mould.produce_company_name
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public String getProduceCompanyName() {
 		return produceCompanyName;
@@ -440,7 +446,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.produce_company_name
 	 * @param produceCompanyName  the value for tb_mould.produce_company_name
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setProduceCompanyName(String produceCompanyName) {
 		this.produceCompanyName = produceCompanyName;
@@ -449,7 +455,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.initial_modulus
 	 * @return  the value of tb_mould.initial_modulus
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public Integer getInitialModulus() {
 		return initialModulus;
@@ -458,7 +464,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.initial_modulus
 	 * @param initialModulus  the value for tb_mould.initial_modulus
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setInitialModulus(Integer initialModulus) {
 		this.initialModulus = initialModulus;
@@ -467,7 +473,7 @@ public class TbMould {
 	/**
 	 * 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  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public Integer getEquipmentId() {
 		return equipmentId;
@@ -476,7 +482,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.equipment_id
 	 * @param equipmentId  the value for tb_mould.equipment_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setEquipmentId(Integer equipmentId) {
 		this.equipmentId = equipmentId;
@@ -485,7 +491,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.belong_project_grade
 	 * @return  the value of tb_mould.belong_project_grade
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public String getBelongProjectGrade() {
 		return belongProjectGrade;
@@ -494,7 +500,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.belong_project_grade
 	 * @param belongProjectGrade  the value for tb_mould.belong_project_grade
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setBelongProjectGrade(String belongProjectGrade) {
 		this.belongProjectGrade = belongProjectGrade;
@@ -503,7 +509,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.produce_company_id
 	 * @return  the value of tb_mould.produce_company_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public Integer getProduceCompanyId() {
 		return produceCompanyId;
@@ -512,7 +518,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.produce_company_id
 	 * @param produceCompanyId  the value for tb_mould.produce_company_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setProduceCompanyId(Integer produceCompanyId) {
 		this.produceCompanyId = produceCompanyId;
@@ -521,7 +527,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.run_times
 	 * @return  the value of tb_mould.run_times
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public Integer getRunTimes() {
 		return runTimes;
@@ -530,7 +536,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.run_times
 	 * @param runTimes  the value for tb_mould.run_times
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setRunTimes(Integer runTimes) {
 		this.runTimes = runTimes;
@@ -539,7 +545,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.is_maintain
 	 * @return  the value of tb_mould.is_maintain
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public Integer getIsMaintain() {
 		return isMaintain;
@@ -548,7 +554,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.is_maintain
 	 * @param isMaintain  the value for tb_mould.is_maintain
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setIsMaintain(Integer isMaintain) {
 		this.isMaintain = isMaintain;
@@ -557,7 +563,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.maintain_count
 	 * @return  the value of tb_mould.maintain_count
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public String getMaintainCount() {
 		return maintainCount;
@@ -566,7 +572,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.maintain_count
 	 * @param maintainCount  the value for tb_mould.maintain_count
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setMaintainCount(String maintainCount) {
 		this.maintainCount = maintainCount;
@@ -575,7 +581,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.holes
 	 * @return  the value of tb_mould.holes
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public String getHoles() {
 		return holes;
@@ -584,7 +590,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.holes
 	 * @param holes  the value for tb_mould.holes
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setHoles(String holes) {
 		this.holes = holes;
@@ -593,7 +599,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.pre_update_id
 	 * @return  the value of tb_mould.pre_update_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public Integer getPreUpdateId() {
 		return preUpdateId;
@@ -602,7 +608,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.pre_update_id
 	 * @param preUpdateId  the value for tb_mould.pre_update_id
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setPreUpdateId(Integer preUpdateId) {
 		this.preUpdateId = preUpdateId;
@@ -611,7 +617,7 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.history_run_times
 	 * @return  the value of tb_mould.history_run_times
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public Integer getHistoryRunTimes() {
 		return historyRunTimes;
@@ -620,9 +626,27 @@ public class TbMould {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.history_run_times
 	 * @param historyRunTimes  the value for tb_mould.history_run_times
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setHistoryRunTimes(Integer historyRunTimes) {
 		this.historyRunTimes = historyRunTimes;
 	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould.last_rec_time
+	 * @return  the value of tb_mould.last_rec_time
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
+	 */
+	public Date getLastRecTime() {
+		return lastRecTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould.last_rec_time
+	 * @param lastRecTime  the value for tb_mould.last_rec_time
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
+	 */
+	public void setLastRecTime(Date lastRecTime) {
+		this.lastRecTime = lastRecTime;
+	}
 }

+ 77 - 16
cloud-socket/src/com/js/kbt/model/TbMouldExample.java

@@ -3,27 +3,28 @@ package com.js.kbt.model;
 import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Date;
 
 public class TbMouldExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public TbMouldExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -31,7 +32,7 @@ public class TbMouldExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -39,7 +40,7 @@ public class TbMouldExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -47,7 +48,7 @@ public class TbMouldExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -55,7 +56,7 @@ public class TbMouldExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -63,7 +64,7 @@ public class TbMouldExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -71,7 +72,7 @@ public class TbMouldExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -79,7 +80,7 @@ public class TbMouldExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -89,7 +90,7 @@ public class TbMouldExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -101,7 +102,7 @@ public class TbMouldExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -110,7 +111,7 @@ public class TbMouldExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -120,7 +121,7 @@ public class TbMouldExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -1872,11 +1873,71 @@ public class TbMouldExample {
 			addCriterion("history_run_times not between", value1, value2, "historyRunTimes");
 			return (Criteria) this;
 		}
+
+		public Criteria andLastRecTimeIsNull() {
+			addCriterion("last_rec_time is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andLastRecTimeIsNotNull() {
+			addCriterion("last_rec_time is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andLastRecTimeEqualTo(Date value) {
+			addCriterion("last_rec_time =", value, "lastRecTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andLastRecTimeNotEqualTo(Date value) {
+			addCriterion("last_rec_time <>", value, "lastRecTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andLastRecTimeGreaterThan(Date value) {
+			addCriterion("last_rec_time >", value, "lastRecTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andLastRecTimeGreaterThanOrEqualTo(Date value) {
+			addCriterion("last_rec_time >=", value, "lastRecTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andLastRecTimeLessThan(Date value) {
+			addCriterion("last_rec_time <", value, "lastRecTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andLastRecTimeLessThanOrEqualTo(Date value) {
+			addCriterion("last_rec_time <=", value, "lastRecTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andLastRecTimeIn(List<Date> values) {
+			addCriterion("last_rec_time in", values, "lastRecTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andLastRecTimeNotIn(List<Date> values) {
+			addCriterion("last_rec_time not in", values, "lastRecTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andLastRecTimeBetween(Date value1, Date value2) {
+			addCriterion("last_rec_time between", value1, value2, "lastRecTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andLastRecTimeNotBetween(Date value1, Date value2) {
+			addCriterion("last_rec_time not between", value1, value2, "lastRecTime");
+			return (Criteria) this;
+		}
 	}
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table tb_mould
-	 * @mbg.generated  Thu Oct 10 11:01:44 CST 2019
+	 * @mbg.generated  Mon Oct 28 20:22:26 CST 2019
 	 */
 	public static class Criterion {
 		private String condition;

+ 1 - 0
cloud-socket/src/com/js/kbt/socket/UserHandler.java

@@ -333,6 +333,7 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 				tm.setState(item.getStatus());
 				// 云模盒运行次数+模具的历史运行次数
 				tm.setRunTimes(item.getRunCnt() + tm.getHistoryRunTimes());
+				tm.setLastRecTime(new Date());
 				// 处理每模平均周期(单位秒)
 				if (0 != avgTime) {
 					logger.info("开始修改平均每模周期值为:" + avgTime);

+ 45 - 0
cloud-socket/src/com/js/kbt/task/MyTask.java

@@ -0,0 +1,45 @@
+package com.js.kbt.task;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import javax.annotation.Resource;
+
+import org.apache.log4j.Logger;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Service;
+
+import com.js.kbt.mapper.TbMouldMapper;
+
+@Service
+public class MyTask {
+	
+	@Resource(name = "tbMouldMapper")
+	private TbMouldMapper tbMouldMapper;
+
+	Logger log = Logger.getLogger(MyTask.class);
+
+	@Scheduled(fixedRate = 1 * 10 * 1000)
+	// @Scheduled(fixedRate = 1*60*1000)
+	public void doTask() throws Exception {
+		Date now = new Date();
+		log.info("定时任务:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(now));
+		//规则是, 运动状态下,上次接受,超过1个小时,不到6个小时的模具设备,状态设置为5-异常,6小时以上的,状态设置为掉线
+		/**now.setHours(now.getHours() -1);
+		TbMouldExample example = new TbMouldExample();
+		example.createCriteria().andStateEqualTo("1").andLastRecTimeLessThanOrEqualTo(now);
+		TbMould mould = new TbMould();
+		mould.setState("5");//超过1小时仍然是运行状态的,要改成异常。
+		tbMouldMapper.updateByExampleSelective(mould, example);
+		
+		//超过6小时,仍然是异常状态的,改成掉线
+		now = new Date();
+		now.setHours(now.getHours() - 6);
+		example.clear();
+		example.createCriteria().andStateEqualTo("5").andLastRecTimeLessThanOrEqualTo(now);
+		mould.setState("6");
+		tbMouldMapper.updateByExampleSelective(mould, example);**/
+		
+	}
+
+}

+ 2 - 2
cloud-socket/src/context-dispatcher.xml

@@ -2,14 +2,14 @@
 <beans default-lazy-init="true"
 	xmlns="http://www.springframework.org/schema/beans"
 	xmlns:p="http://www.springframework.org/schema/p"
-	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xmlns:context="http://www.springframework.org/schema/context"
 	xmlns:mvc="http://www.springframework.org/schema/mvc"
 	xsi:schemaLocation="  
        http://www.springframework.org/schema/beans   
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd  
        http://www.springframework.org/schema/mvc   
-       http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd   
+       http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd    
        http://www.springframework.org/schema/context  
        http://www.springframework.org/schema/context/spring-context-3.0.xsd">