فهرست منبع

模具生产信息的填入

5 سال پیش
والد
کامیت
2b81a62d6b
29فایلهای تغییر یافته به همراه2582 افزوده شده و 1752 حذف شده
  1. 16 1
      cloud-model/src/main/java/com/hssx/cloudmodel/controller/MouldEquipmentController.java
  2. 0 15
      cloud-model/src/main/java/com/hssx/cloudmodel/entity/MouldDownPacket.java
  3. 78 0
      cloud-model/src/main/java/com/hssx/cloudmodel/entity/SensorThreshold.java
  4. 2 0
      cloud-model/src/main/java/com/hssx/cloudmodel/entity/vo/MouldVO.java
  5. 16 0
      cloud-model/src/main/java/com/hssx/cloudmodel/mapper/SensorThresholdMapper.java
  6. 3 0
      cloud-model/src/main/java/com/hssx/cloudmodel/service/MouldEquipmentService.java
  7. 16 0
      cloud-model/src/main/java/com/hssx/cloudmodel/service/SensorThresholdService.java
  8. 18 3
      cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldEquipmentServiceImpl.java
  9. 2 0
      cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldServiceImpl.java
  10. 20 0
      cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/SensorThresholdServiceImpl.java
  11. 1 2
      cloud-model/src/main/resources/mapper/MouldDownPacketMapper.xml
  12. 6 6
      cloud-model/src/main/resources/mapper/MouldMapper.xml
  13. 17 0
      cloud-model/src/main/resources/mapper/SensorThresholdMapper.xml
  14. 1 1
      cloud-socket/src/com/js/kbt/UserTempGenConfig.xml
  15. 57 77
      cloud-socket/src/com/js/kbt/mapper/MouldCycleRuntimeMapper.java
  16. 15 15
      cloud-socket/src/com/js/kbt/mapper/MouldCycleRuntimeMapper.xml
  17. 57 77
      cloud-socket/src/com/js/kbt/mapper/MouldDownPacketMapper.java
  18. 15 15
      cloud-socket/src/com/js/kbt/mapper/MouldDownPacketMapper.xml
  19. 76 0
      cloud-socket/src/com/js/kbt/mapper/SensorThresholdMapper.java
  20. 254 0
      cloud-socket/src/com/js/kbt/mapper/SensorThresholdMapper.xml
  21. 105 153
      cloud-socket/src/com/js/kbt/model/MouldCycleRuntime.java
  22. 572 613
      cloud-socket/src/com/js/kbt/model/MouldCycleRuntimeExample.java
  23. 115 163
      cloud-socket/src/com/js/kbt/model/MouldDownPacket.java
  24. 562 603
      cloud-socket/src/com/js/kbt/model/MouldDownPacketExample.java
  25. 76 0
      cloud-socket/src/com/js/kbt/model/SensorThreshold.java
  26. 452 0
      cloud-socket/src/com/js/kbt/model/SensorThresholdExample.java
  27. 23 1
      cloud-socket/src/com/js/kbt/socket/UserHandler.java
  28. 1 1
      cloud-socket/src/jdbc.properties
  29. 6 6
      target/classes/main/resources/mapper/MouldMapper.xml

+ 16 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/controller/MouldEquipmentController.java

@@ -3,6 +3,7 @@ package com.hssx.cloudmodel.controller;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.hssx.cloudmodel.entity.MouldEquipment;
+import com.hssx.cloudmodel.entity.SensorThreshold;
 import com.hssx.cloudmodel.entity.User;
 import com.hssx.cloudmodel.entity.vo.MouldEquipmentVO;
 import com.hssx.cloudmodel.entity.vo.UserVO;
@@ -76,7 +77,7 @@ public class MouldEquipmentController {
      * hotAlarmLimit 热报警限值:(1 字节,十六进制)如:50=80
      * isUse:0-停止,1-启动
      * equipmentNo 设备编号(可能是多个或者一个)多个以“,”隔开传  如:"123456"(单个),"123456,456878,123589"(多个)
-     * workInterval 工作状态时间间隔,freeInterval 空闲状态的时间间隔,threshold 传感器阈值
+     * workInterval 工作状态时间间隔,freeInterval 空闲状态的时间间隔
      */
     @ApiOperation("启用设备")
     @RequestMapping("/use")
@@ -146,5 +147,19 @@ public class MouldEquipmentController {
         msg = mouldEquipmentService.getEquipmentListByOldMouldAndUser(userVO);
         return msg;
     }
+
+    /**
+     * 设置传感器阈值20~200
+     * 参数 threshold 传感器阈值(范围20~200)
+     * @return
+     */
+    @ApiOperation("设置传感器阈值20~200")
+    @RequestMapping("/setThreshold")
+    @ResponseBody
+    public synchronized HttpRespMsg  setThreshold(SensorThreshold sensorThreshold){
+        HttpRespMsg msg = new HttpRespMsg();
+        msg = mouldEquipmentService.setThreshold(sensorThreshold);
+        return msg;
+    }
 }
 

+ 0 - 15
cloud-model/src/main/java/com/hssx/cloudmodel/entity/MouldDownPacket.java

@@ -49,12 +49,6 @@ public class MouldDownPacket extends Model<MouldDownPacket> {
     @TableField("is_use")
     private Integer isUse;
 
-    /**
-     * 传感器阈值
-     */
-    @TableField("threshold")
-    private String threshold;
-
 
     public Integer getId() {
         return id;
@@ -96,14 +90,6 @@ public class MouldDownPacket extends Model<MouldDownPacket> {
         this.isUse = isUse;
     }
 
-    public String getThreshold() {
-        return threshold;
-    }
-
-    public void setThreshold(String threshold) {
-        this.threshold = threshold;
-    }
-
     @Override
     protected Serializable pkVal() {
         return this.id;
@@ -117,7 +103,6 @@ public class MouldDownPacket extends Model<MouldDownPacket> {
         ", packetStr=" + packetStr +
         ", indate=" + indate +
         ", isUse=" + isUse +
-        ", threshold=" + threshold +
         "}";
     }
 }

+ 78 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/entity/SensorThreshold.java

@@ -0,0 +1,78 @@
+package com.hssx.cloudmodel.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2019-10-29
+ */
+public class SensorThreshold extends Model<SensorThreshold> {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 传感器阈值表主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 创建时间
+     */
+    @TableField("indate")
+    private LocalDateTime indate;
+
+    /**
+     * 传感器阈值20~200
+     */
+    @TableField("threshold")
+    private String threshold = "30";
+
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public LocalDateTime getIndate() {
+        return indate;
+    }
+
+    public void setIndate(LocalDateTime indate) {
+        this.indate = indate;
+    }
+
+    public String getThreshold() {
+        return threshold;
+    }
+
+    public void setThreshold(String threshold) {
+        this.threshold = threshold;
+    }
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+    @Override
+    public String toString() {
+        return "SensorThreshold{" +
+        "id=" + id +
+        ", indate=" + indate +
+        ", threshold=" + threshold +
+        "}";
+    }
+}

+ 2 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/entity/vo/MouldVO.java

@@ -2,6 +2,7 @@ package com.hssx.cloudmodel.entity.vo;
 
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.hssx.cloudmodel.entity.InjectionMolding;
 import com.hssx.cloudmodel.entity.Mould;
 import lombok.Data;
 
@@ -34,4 +35,5 @@ public class MouldVO extends Mould {
     private Integer stage;
     private String equipmentName;
     private Integer temperature;
+    private InjectionMolding injectionMolding;
 }

+ 16 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/mapper/SensorThresholdMapper.java

@@ -0,0 +1,16 @@
+package com.hssx.cloudmodel.mapper;
+
+import com.hssx.cloudmodel.entity.SensorThreshold;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2019-10-29
+ */
+public interface SensorThresholdMapper extends BaseMapper<SensorThreshold> {
+
+}

+ 3 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/service/MouldEquipmentService.java

@@ -2,6 +2,7 @@ package com.hssx.cloudmodel.service;
 
 import com.hssx.cloudmodel.entity.MouldEquipment;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.hssx.cloudmodel.entity.SensorThreshold;
 import com.hssx.cloudmodel.entity.User;
 import com.hssx.cloudmodel.entity.vo.MouldEquipmentVO;
 import com.hssx.cloudmodel.entity.vo.UserVO;
@@ -32,4 +33,6 @@ public interface MouldEquipmentService extends IService<MouldEquipment> {
     HttpRespMsg importMouldEquipmentExcel(MultipartFile file, UserVO userVO);
 
     HttpRespMsg getEquipmentListByOldMouldAndUser(UserVO userVO);
+
+    HttpRespMsg setThreshold(SensorThreshold sensorThreshold);
 }

+ 16 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/service/SensorThresholdService.java

@@ -0,0 +1,16 @@
+package com.hssx.cloudmodel.service;
+
+import com.hssx.cloudmodel.entity.SensorThreshold;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2019-10-29
+ */
+public interface SensorThresholdService extends IService<SensorThreshold> {
+
+}

+ 18 - 3
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldEquipmentServiceImpl.java

@@ -64,6 +64,8 @@ public class MouldEquipmentServiceImpl extends ServiceImpl<MouldEquipmentMapper,
     MouldDownPacketMapper mouldDownPacketMapper;
     @Resource
     ProjectUserMapper projectUserMapper;
+    @Resource
+    SensorThresholdMapper sensorThresholdMapper;
 
     @Override
     public HttpRespMsg addAndUpdateMouldEquipment(MouldEquipment mouldEquipment, User user) {
@@ -110,7 +112,6 @@ public class MouldEquipmentServiceImpl extends ServiceImpl<MouldEquipmentMapper,
         if (workInterval.length() == 1) {
             workInterval = "0" + workInterval;
         }
-        String.format("%04d", mouldEquipment.getThreshold());
         String hotAlarmLimitStr = Integer.toHexString(mouldEquipment.getHotAlarmLimit());
         if (hotAlarmLimitStr.length() == 1) {
             hotAlarmLimitStr = "0" + hotAlarmLimitStr;
@@ -144,7 +145,6 @@ public class MouldEquipmentServiceImpl extends ServiceImpl<MouldEquipmentMapper,
                     mouldDownPacket.setPacketStr(setPacketMessage);
                     mouldDownPacket.setIsUse(mouldEquipment.getIsUse());
                     mouldDownPacket.setEquipmentNo(str);
-                    mouldDownPacket.setThreshold(workInterval);
                     mouldDownPacketMapper.updateById(mouldDownPacket);
                 } else {
                     MouldDownPacket mouldDownPacket = new MouldDownPacket();
@@ -152,7 +152,6 @@ public class MouldEquipmentServiceImpl extends ServiceImpl<MouldEquipmentMapper,
                     mouldDownPacket.setPacketStr(setPacketMessage);
                     mouldDownPacket.setIsUse(mouldEquipment.getIsUse());
                     mouldDownPacket.setEquipmentNo(str);
-                    mouldDownPacket.setThreshold(workInterval);
                     mouldDownPacketMapper.insert(mouldDownPacket);
                 }
             }
@@ -427,6 +426,21 @@ public class MouldEquipmentServiceImpl extends ServiceImpl<MouldEquipmentMapper,
         return msg;
     }
 
+    @Override
+    public HttpRespMsg setThreshold(SensorThreshold sensorThreshold) {
+        HttpRespMsg msg = new HttpRespMsg();
+        List<SensorThreshold> sensorThresholds = sensorThresholdMapper.selectList(new QueryWrapper<SensorThreshold>().last("limit 1"));
+        if(sensorThresholds.size() == 0){
+            sensorThreshold.setThreshold(String.format("%04d", Integer.parseInt(sensorThreshold.getThreshold())));
+            sensorThresholdMapper.insert(sensorThreshold);
+        }else{
+            SensorThreshold sensor = sensorThresholds.get(0);
+            sensor.setThreshold(String.format("%04d", Integer.parseInt(sensorThreshold.getThreshold())));
+            sensorThresholdMapper.updateById(sensor);
+        }
+        return msg;
+    }
+
     /**
      * 输入流转file
      *
@@ -481,4 +495,5 @@ public class MouldEquipmentServiceImpl extends ServiceImpl<MouldEquipmentMapper,
         System.out.println("lastPart===>" + lastPart);
         return lastPart;
     }
+
 }

+ 2 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldServiceImpl.java

@@ -216,6 +216,8 @@ public class MouldServiceImpl extends ServiceImpl<MouldMapper, Mould> implements
             return msg;
         } else {
             MouldVO mould = mouldMapper.getDetailById(mouldVO);
+            InjectionMolding molding = injectionMoldingMapper.selectOne(new QueryWrapper<InjectionMolding>().eq("mould_id", mouldVO.getId()));
+            mould.setInjectionMolding(molding);
             map.put("vo", mould);
             ProjectVO vo = projectMapper.getProjectById(mould.getProjectId());
             if (null == mould.getProjectId()) {

+ 20 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/SensorThresholdServiceImpl.java

@@ -0,0 +1,20 @@
+package com.hssx.cloudmodel.service.impl;
+
+import com.hssx.cloudmodel.entity.SensorThreshold;
+import com.hssx.cloudmodel.mapper.SensorThresholdMapper;
+import com.hssx.cloudmodel.service.SensorThresholdService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2019-10-29
+ */
+@Service
+public class SensorThresholdServiceImpl extends ServiceImpl<SensorThresholdMapper, SensorThreshold> implements SensorThresholdService {
+
+}

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

@@ -9,12 +9,11 @@
         <result column="packet_str" property="packetStr" />
         <result column="indate" property="indate" />
         <result column="is_use" property="isUse" />
-        <result column="threshold" property="threshold" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, equipment_no, packet_str, indate, is_use, threshold
+        id, equipment_no, packet_str, indate, is_use
     </sql>
 
 </mapper>

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

@@ -91,8 +91,8 @@
         tbp.manager mangerName,tbco.company_address area,tbmp.hill_number hillNumber,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 indate FROM `mould_history` WHERE equipment_no=equipmentNo ORDER BY indate DESC LIMIT 1) lastopentime
-        ,(SELECT battery  FROM `mould_history` WHERE equipmentNo = equipment_no ORDER BY indate DESC LIMIT 1) hill_number,
-        (SELECT temperature  FROM `mould_history` WHERE equipment_no = equipmentNo ORDER BY indate DESC LIMIT 1) temperature
+        ,tbmp.curhill_number hill_number,
+        tbmp.curtemperature temperature
         from
         tb_mould tbm
         left join
@@ -141,8 +141,8 @@
         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 indate FROM `mould_history` WHERE equipment_no=equipmentNo ORDER BY indate DESC LIMIT 1) lastopentime,
-        (SELECT battery  FROM `mould_history` WHERE equipmentNo = equipment_no ORDER BY indate DESC LIMIT 1) hill_number,
-        (SELECT temperature  FROM `mould_history` WHERE equipment_no = equipmentNo ORDER BY indate DESC LIMIT 1) temperature
+        tbmp.curhill_number hill_number,
+        tbmp.curtemperature temperature
         from
         tb_mould tbm
         left join
@@ -191,8 +191,8 @@
         tbm.id id,tbm.model_no model_no, tbm.model_name,tbm.initial_modulus initial_modulus,tbp.manager_id managerId,tbm.produce_company_id produce_company_id,
         tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbco.company_name produceCompany,tbm.creator_id creator_id,tbm.holes,
         tbp.manager mangerName,tbco.company_address area,tbm.rfid rfid,tbm.oc_cycle oc_cycle,tbc.company_name companyName,tbm.pre_update_id,tbmp.equipment_name equipmentName,
-        tbmp.equipment_no equipmentNo,(SELECT battery  FROM `mould_history` WHERE tbmp.equipment_no = equipment_no ORDER BY indate DESC LIMIT 1) hill_number,
-        (SELECT temperature  FROM `mould_history` WHERE equipment_no = tbmp.equipment_no ORDER BY indate DESC LIMIT 1) temperature,tbm.setting_life setting_life,tbm.run_times run_times,tbmp.stage
+        tbmp.equipment_no equipmentNo,tbmp.curhill_number hill_number,
+        tbmp.curtemperature temperature,tbm.setting_life setting_life,tbm.run_times run_times,tbmp.stage
         from
         tb_mould tbm
         left join

+ 17 - 0
cloud-model/src/main/resources/mapper/SensorThresholdMapper.xml

@@ -0,0 +1,17 @@
+<?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.hssx.cloudmodel.mapper.SensorThresholdMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.SensorThreshold">
+        <id column="id" property="id" />
+        <result column="indate" property="indate" />
+        <result column="threshold" property="threshold" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, indate, threshold
+    </sql>
+
+</mapper>

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

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

+ 57 - 77
cloud-socket/src/com/js/kbt/mapper/MouldCycleRuntimeMapper.java

@@ -6,91 +6,71 @@ import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
 public interface MouldCycleRuntimeMapper {
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_cycle_runtime
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    long countByExample(MouldCycleRuntimeExample example);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_cycle_runtime
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    int deleteByExample(MouldCycleRuntimeExample example);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_cycle_runtime
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	long countByExample(MouldCycleRuntimeExample example);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_cycle_runtime
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    int deleteByPrimaryKey(Integer id);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_cycle_runtime
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	int deleteByExample(MouldCycleRuntimeExample example);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_cycle_runtime
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    int insert(MouldCycleRuntime record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_cycle_runtime
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	int deleteByPrimaryKey(Integer id);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_cycle_runtime
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    int insertSelective(MouldCycleRuntime record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_cycle_runtime
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	int insert(MouldCycleRuntime record);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_cycle_runtime
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    List<MouldCycleRuntime> selectByExample(MouldCycleRuntimeExample example);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_cycle_runtime
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	int insertSelective(MouldCycleRuntime record);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_cycle_runtime
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    MouldCycleRuntime selectByPrimaryKey(Integer id);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_cycle_runtime
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	List<MouldCycleRuntime> selectByExample(MouldCycleRuntimeExample example);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_cycle_runtime
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    int updateByExampleSelective(@Param("record") MouldCycleRuntime record, @Param("example") MouldCycleRuntimeExample example);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_cycle_runtime
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	MouldCycleRuntime selectByPrimaryKey(Integer id);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_cycle_runtime
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    int updateByExample(@Param("record") MouldCycleRuntime record, @Param("example") MouldCycleRuntimeExample example);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_cycle_runtime
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	int updateByExampleSelective(@Param("record") MouldCycleRuntime record,
+			@Param("example") MouldCycleRuntimeExample example);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_cycle_runtime
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    int updateByPrimaryKeySelective(MouldCycleRuntime record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_cycle_runtime
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	int updateByExample(@Param("record") MouldCycleRuntime record, @Param("example") MouldCycleRuntimeExample example);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_cycle_runtime
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    int updateByPrimaryKey(MouldCycleRuntime record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_cycle_runtime
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	int updateByPrimaryKeySelective(MouldCycleRuntime record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_cycle_runtime
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	int updateByPrimaryKey(MouldCycleRuntime record);
 }

+ 15 - 15
cloud-socket/src/com/js/kbt/mapper/MouldCycleRuntimeMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 14:23:48 CST 2019.
+      This element was generated on Tue Oct 29 15:18:29 CST 2019.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="runtime" jdbcType="INTEGER" property="runtime" />
@@ -17,7 +17,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 14:23:48 CST 2019.
+      This element was generated on Tue Oct 29 15:18:29 CST 2019.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -51,7 +51,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 14:23:48 CST 2019.
+      This element was generated on Tue Oct 29 15:18:29 CST 2019.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -85,7 +85,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 14:23:48 CST 2019.
+      This element was generated on Tue Oct 29 15:18:29 CST 2019.
     -->
     id, runtime, time_slot, date_str, equipment_no
   </sql>
@@ -93,7 +93,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 14:23:48 CST 2019.
+      This element was generated on Tue Oct 29 15:18:29 CST 2019.
     -->
     select
     <if test="distinct">
@@ -112,7 +112,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 14:23:48 CST 2019.
+      This element was generated on Tue Oct 29 15:18:29 CST 2019.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -123,7 +123,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 14:23:48 CST 2019.
+      This element was generated on Tue Oct 29 15:18:29 CST 2019.
     -->
     delete from mould_cycle_runtime
     where id = #{id,jdbcType=INTEGER}
@@ -132,7 +132,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 14:23:48 CST 2019.
+      This element was generated on Tue Oct 29 15:18:29 CST 2019.
     -->
     delete from mould_cycle_runtime
     <if test="_parameter != null">
@@ -143,7 +143,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 14:23:48 CST 2019.
+      This element was generated on Tue Oct 29 15:18:29 CST 2019.
     -->
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
       SELECT LAST_INSERT_ID()
@@ -157,7 +157,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 14:23:48 CST 2019.
+      This element was generated on Tue Oct 29 15:18:29 CST 2019.
     -->
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
       SELECT LAST_INSERT_ID()
@@ -196,7 +196,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 14:23:48 CST 2019.
+      This element was generated on Tue Oct 29 15:18:29 CST 2019.
     -->
     select count(*) from mould_cycle_runtime
     <if test="_parameter != null">
@@ -207,7 +207,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 14:23:48 CST 2019.
+      This element was generated on Tue Oct 29 15:18:29 CST 2019.
     -->
     update mould_cycle_runtime
     <set>
@@ -235,7 +235,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 14:23:48 CST 2019.
+      This element was generated on Tue Oct 29 15:18:29 CST 2019.
     -->
     update mould_cycle_runtime
     set id = #{record.id,jdbcType=INTEGER},
@@ -251,7 +251,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 14:23:48 CST 2019.
+      This element was generated on Tue Oct 29 15:18:29 CST 2019.
     -->
     update mould_cycle_runtime
     <set>
@@ -274,7 +274,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 28 14:23:48 CST 2019.
+      This element was generated on Tue Oct 29 15:18:29 CST 2019.
     -->
     update mould_cycle_runtime
     set runtime = #{runtime,jdbcType=INTEGER},

+ 57 - 77
cloud-socket/src/com/js/kbt/mapper/MouldDownPacketMapper.java

@@ -6,91 +6,71 @@ import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
 public interface MouldDownPacketMapper {
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_down_packet
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    long countByExample(MouldDownPacketExample example);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_down_packet
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    int deleteByExample(MouldDownPacketExample example);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_down_packet
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	long countByExample(MouldDownPacketExample example);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_down_packet
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    int deleteByPrimaryKey(Integer id);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_down_packet
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	int deleteByExample(MouldDownPacketExample example);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_down_packet
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    int insert(MouldDownPacket record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_down_packet
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	int deleteByPrimaryKey(Integer id);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_down_packet
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    int insertSelective(MouldDownPacket record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_down_packet
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	int insert(MouldDownPacket record);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_down_packet
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    List<MouldDownPacket> selectByExample(MouldDownPacketExample example);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_down_packet
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	int insertSelective(MouldDownPacket record);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_down_packet
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    MouldDownPacket selectByPrimaryKey(Integer id);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_down_packet
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	List<MouldDownPacket> selectByExample(MouldDownPacketExample example);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_down_packet
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    int updateByExampleSelective(@Param("record") MouldDownPacket record, @Param("example") MouldDownPacketExample example);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_down_packet
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	MouldDownPacket selectByPrimaryKey(Integer id);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_down_packet
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    int updateByExample(@Param("record") MouldDownPacket record, @Param("example") MouldDownPacketExample example);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_down_packet
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	int updateByExampleSelective(@Param("record") MouldDownPacket record,
+			@Param("example") MouldDownPacketExample example);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_down_packet
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    int updateByPrimaryKeySelective(MouldDownPacket record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_down_packet
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	int updateByExample(@Param("record") MouldDownPacket record, @Param("example") MouldDownPacketExample example);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table mould_down_packet
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    int updateByPrimaryKey(MouldDownPacket record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_down_packet
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	int updateByPrimaryKeySelective(MouldDownPacket record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table mould_down_packet
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	int updateByPrimaryKey(MouldDownPacket record);
 }

+ 15 - 15
cloud-socket/src/com/js/kbt/mapper/MouldDownPacketMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 09 18:15:27 CST 2019.
+      This element was generated on Tue Oct 29 16:02:41 CST 2019.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="equipment_no" jdbcType="VARCHAR" property="equipmentNo" />
@@ -17,7 +17,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 09 18:15:27 CST 2019.
+      This element was generated on Tue Oct 29 16:02:41 CST 2019.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -51,7 +51,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 09 18:15:27 CST 2019.
+      This element was generated on Tue Oct 29 16:02:41 CST 2019.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -85,7 +85,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 09 18:15:27 CST 2019.
+      This element was generated on Tue Oct 29 16:02:41 CST 2019.
     -->
     id, equipment_no, packet_str, indate, is_use
   </sql>
@@ -93,7 +93,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 09 18:15:27 CST 2019.
+      This element was generated on Tue Oct 29 16:02:41 CST 2019.
     -->
     select
     <if test="distinct">
@@ -112,7 +112,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 09 18:15:27 CST 2019.
+      This element was generated on Tue Oct 29 16:02:41 CST 2019.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -123,7 +123,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 09 18:15:27 CST 2019.
+      This element was generated on Tue Oct 29 16:02:41 CST 2019.
     -->
     delete from mould_down_packet
     where id = #{id,jdbcType=INTEGER}
@@ -132,7 +132,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 09 18:15:27 CST 2019.
+      This element was generated on Tue Oct 29 16:02:41 CST 2019.
     -->
     delete from mould_down_packet
     <if test="_parameter != null">
@@ -143,7 +143,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 09 18:15:27 CST 2019.
+      This element was generated on Tue Oct 29 16:02:41 CST 2019.
     -->
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
       SELECT LAST_INSERT_ID()
@@ -157,7 +157,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 09 18:15:27 CST 2019.
+      This element was generated on Tue Oct 29 16:02:41 CST 2019.
     -->
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
       SELECT LAST_INSERT_ID()
@@ -196,7 +196,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 09 18:15:27 CST 2019.
+      This element was generated on Tue Oct 29 16:02:41 CST 2019.
     -->
     select count(*) from mould_down_packet
     <if test="_parameter != null">
@@ -207,7 +207,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 09 18:15:27 CST 2019.
+      This element was generated on Tue Oct 29 16:02:41 CST 2019.
     -->
     update mould_down_packet
     <set>
@@ -235,7 +235,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 09 18:15:27 CST 2019.
+      This element was generated on Tue Oct 29 16:02:41 CST 2019.
     -->
     update mould_down_packet
     set id = #{record.id,jdbcType=INTEGER},
@@ -251,7 +251,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 09 18:15:27 CST 2019.
+      This element was generated on Tue Oct 29 16:02:41 CST 2019.
     -->
     update mould_down_packet
     <set>
@@ -274,7 +274,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Oct 09 18:15:27 CST 2019.
+      This element was generated on Tue Oct 29 16:02:41 CST 2019.
     -->
     update mould_down_packet
     set equipment_no = #{equipmentNo,jdbcType=VARCHAR},

+ 76 - 0
cloud-socket/src/com/js/kbt/mapper/SensorThresholdMapper.java

@@ -0,0 +1,76 @@
+package com.js.kbt.mapper;
+
+import com.js.kbt.model.SensorThreshold;
+import com.js.kbt.model.SensorThresholdExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface SensorThresholdMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	long countByExample(SensorThresholdExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	int deleteByExample(SensorThresholdExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	int insert(SensorThreshold record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	int insertSelective(SensorThreshold record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	List<SensorThreshold> selectByExample(SensorThresholdExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	SensorThreshold selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	int updateByExampleSelective(@Param("record") SensorThreshold record,
+			@Param("example") SensorThresholdExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	int updateByExample(@Param("record") SensorThreshold record, @Param("example") SensorThresholdExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	int updateByPrimaryKeySelective(SensorThreshold record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	int updateByPrimaryKey(SensorThreshold record);
+}

+ 254 - 0
cloud-socket/src/com/js/kbt/mapper/SensorThresholdMapper.xml

@@ -0,0 +1,254 @@
+<?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.SensorThresholdMapper">
+  <resultMap id="BaseResultMap" type="com.js.kbt.model.SensorThreshold">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Oct 29 15:57:23 CST 2019.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="indate" jdbcType="TIMESTAMP" property="indate" />
+    <result column="threshold" jdbcType="VARCHAR" property="threshold" />
+  </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 Tue Oct 29 15:57:23 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 Tue Oct 29 15:57:23 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 Tue Oct 29 15:57:23 CST 2019.
+    -->
+    id, indate, threshold
+  </sql>
+  <select id="selectByExample" parameterType="com.js.kbt.model.SensorThresholdExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Oct 29 15:57:23 CST 2019.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from sensor_threshold
+    <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 Tue Oct 29 15:57:23 CST 2019.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from sensor_threshold
+    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 Tue Oct 29 15:57:23 CST 2019.
+    -->
+    delete from sensor_threshold
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.js.kbt.model.SensorThresholdExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Oct 29 15:57:23 CST 2019.
+    -->
+    delete from sensor_threshold
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.js.kbt.model.SensorThreshold">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Oct 29 15:57:23 CST 2019.
+    -->
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into sensor_threshold (indate, threshold)
+    values (#{indate,jdbcType=TIMESTAMP}, #{threshold,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.js.kbt.model.SensorThreshold">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Oct 29 15:57:23 CST 2019.
+    -->
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into sensor_threshold
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="indate != null">
+        indate,
+      </if>
+      <if test="threshold != null">
+        threshold,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="indate != null">
+        #{indate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="threshold != null">
+        #{threshold,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.js.kbt.model.SensorThresholdExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Oct 29 15:57:23 CST 2019.
+    -->
+    select count(*) from sensor_threshold
+    <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 Tue Oct 29 15:57:23 CST 2019.
+    -->
+    update sensor_threshold
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.indate != null">
+        indate = #{record.indate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.threshold != null">
+        threshold = #{record.threshold,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Oct 29 15:57:23 CST 2019.
+    -->
+    update sensor_threshold
+    set id = #{record.id,jdbcType=INTEGER},
+      indate = #{record.indate,jdbcType=TIMESTAMP},
+      threshold = #{record.threshold,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.js.kbt.model.SensorThreshold">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Oct 29 15:57:23 CST 2019.
+    -->
+    update sensor_threshold
+    <set>
+      <if test="indate != null">
+        indate = #{indate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="threshold != null">
+        threshold = #{threshold,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.js.kbt.model.SensorThreshold">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Oct 29 15:57:23 CST 2019.
+    -->
+    update sensor_threshold
+    set indate = #{indate,jdbcType=TIMESTAMP},
+      threshold = #{threshold,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 105 - 153
cloud-socket/src/com/js/kbt/model/MouldCycleRuntime.java

@@ -1,168 +1,120 @@
 package com.js.kbt.model;
 
 public class MouldCycleRuntime {
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column mould_cycle_runtime.id
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    private Integer id;
 
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column mould_cycle_runtime.runtime
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    private Integer runtime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column mould_cycle_runtime.id
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column mould_cycle_runtime.runtime
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	private Integer runtime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column mould_cycle_runtime.time_slot
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	private String timeSlot;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column mould_cycle_runtime.date_str
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	private String dateStr;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column mould_cycle_runtime.equipment_no
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	private String equipmentNo;
 
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column mould_cycle_runtime.time_slot
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    private String timeSlot;
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column mould_cycle_runtime.id
+	 * @return  the value of mould_cycle_runtime.id
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	public Integer getId() {
+		return id;
+	}
 
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column mould_cycle_runtime.date_str
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    private String dateStr;
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column mould_cycle_runtime.id
+	 * @param id  the value for mould_cycle_runtime.id
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
 
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column mould_cycle_runtime.equipment_no
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    private String equipmentNo;
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column mould_cycle_runtime.runtime
+	 * @return  the value of mould_cycle_runtime.runtime
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	public Integer getRuntime() {
+		return runtime;
+	}
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column mould_cycle_runtime.id
-     *
-     * @return the value of mould_cycle_runtime.id
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    public Integer getId() {
-        return id;
-    }
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column mould_cycle_runtime.runtime
+	 * @param runtime  the value for mould_cycle_runtime.runtime
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	public void setRuntime(Integer runtime) {
+		this.runtime = runtime;
+	}
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column mould_cycle_runtime.id
-     *
-     * @param id the value for mould_cycle_runtime.id
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 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 mould_cycle_runtime.time_slot
+	 * @return  the value of mould_cycle_runtime.time_slot
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	public String getTimeSlot() {
+		return timeSlot;
+	}
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column mould_cycle_runtime.runtime
-     *
-     * @return the value of mould_cycle_runtime.runtime
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    public Integer getRuntime() {
-        return runtime;
-    }
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column mould_cycle_runtime.time_slot
+	 * @param timeSlot  the value for mould_cycle_runtime.time_slot
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	public void setTimeSlot(String timeSlot) {
+		this.timeSlot = timeSlot;
+	}
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column mould_cycle_runtime.runtime
-     *
-     * @param runtime the value for mould_cycle_runtime.runtime
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    public void setRuntime(Integer runtime) {
-        this.runtime = runtime;
-    }
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column mould_cycle_runtime.date_str
+	 * @return  the value of mould_cycle_runtime.date_str
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	public String getDateStr() {
+		return dateStr;
+	}
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column mould_cycle_runtime.time_slot
-     *
-     * @return the value of mould_cycle_runtime.time_slot
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    public String getTimeSlot() {
-        return timeSlot;
-    }
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column mould_cycle_runtime.date_str
+	 * @param dateStr  the value for mould_cycle_runtime.date_str
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	public void setDateStr(String dateStr) {
+		this.dateStr = dateStr;
+	}
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column mould_cycle_runtime.time_slot
-     *
-     * @param timeSlot the value for mould_cycle_runtime.time_slot
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    public void setTimeSlot(String timeSlot) {
-        this.timeSlot = timeSlot;
-    }
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column mould_cycle_runtime.equipment_no
+	 * @return  the value of mould_cycle_runtime.equipment_no
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	public String getEquipmentNo() {
+		return equipmentNo;
+	}
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column mould_cycle_runtime.date_str
-     *
-     * @return the value of mould_cycle_runtime.date_str
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    public String getDateStr() {
-        return dateStr;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column mould_cycle_runtime.date_str
-     *
-     * @param dateStr the value for mould_cycle_runtime.date_str
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    public void setDateStr(String dateStr) {
-        this.dateStr = dateStr;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column mould_cycle_runtime.equipment_no
-     *
-     * @return the value of mould_cycle_runtime.equipment_no
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    public String getEquipmentNo() {
-        return equipmentNo;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column mould_cycle_runtime.equipment_no
-     *
-     * @param equipmentNo the value for mould_cycle_runtime.equipment_no
-     *
-     * @mbg.generated Mon Oct 28 14:23:48 CST 2019
-     */
-    public void setEquipmentNo(String equipmentNo) {
-        this.equipmentNo = equipmentNo;
-    }
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column mould_cycle_runtime.equipment_no
+	 * @param equipmentNo  the value for mould_cycle_runtime.equipment_no
+	 * @mbg.generated  Tue Oct 29 15:18:29 CST 2019
+	 */
+	public void setEquipmentNo(String equipmentNo) {
+		this.equipmentNo = equipmentNo;
+	}
 }

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 572 - 613
cloud-socket/src/com/js/kbt/model/MouldCycleRuntimeExample.java


+ 115 - 163
cloud-socket/src/com/js/kbt/model/MouldDownPacket.java

@@ -3,168 +3,120 @@ package com.js.kbt.model;
 import java.util.Date;
 
 public class MouldDownPacket {
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column mould_down_packet.id
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    private Integer id;
 
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column mould_down_packet.equipment_no
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    private String equipmentNo;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column mould_down_packet.packet_str
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    private String packetStr;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column mould_down_packet.indate
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    private Date indate;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column mould_down_packet.is_use
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    private Integer isUse;
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column mould_down_packet.id
-     *
-     * @return the value of mould_down_packet.id
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    public Integer getId() {
-        return id;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column mould_down_packet.id
-     *
-     * @param id the value for mould_down_packet.id
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column mould_down_packet.equipment_no
-     *
-     * @return the value of mould_down_packet.equipment_no
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    public String getEquipmentNo() {
-        return equipmentNo;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column mould_down_packet.equipment_no
-     *
-     * @param equipmentNo the value for mould_down_packet.equipment_no
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 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 mould_down_packet.packet_str
-     *
-     * @return the value of mould_down_packet.packet_str
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    public String getPacketStr() {
-        return packetStr;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column mould_down_packet.packet_str
-     *
-     * @param packetStr the value for mould_down_packet.packet_str
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    public void setPacketStr(String packetStr) {
-        this.packetStr = packetStr;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column mould_down_packet.indate
-     *
-     * @return the value of mould_down_packet.indate
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    public Date getIndate() {
-        return indate;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column mould_down_packet.indate
-     *
-     * @param indate the value for mould_down_packet.indate
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    public void setIndate(Date indate) {
-        this.indate = indate;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column mould_down_packet.is_use
-     *
-     * @return the value of mould_down_packet.is_use
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    public Integer getIsUse() {
-        return isUse;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column mould_down_packet.is_use
-     *
-     * @param isUse the value for mould_down_packet.is_use
-     *
-     * @mbg.generated Wed Oct 09 18:15:27 CST 2019
-     */
-    public void setIsUse(Integer isUse) {
-        this.isUse = isUse;
-    }
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column mould_down_packet.id
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column mould_down_packet.equipment_no
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	private String equipmentNo;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column mould_down_packet.packet_str
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	private String packetStr;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column mould_down_packet.indate
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	private Date indate;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column mould_down_packet.is_use
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	private Integer isUse;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column mould_down_packet.id
+	 * @return  the value of mould_down_packet.id
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column mould_down_packet.id
+	 * @param id  the value for mould_down_packet.id
+	 * @mbg.generated  Tue Oct 29 16:02:41 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 mould_down_packet.equipment_no
+	 * @return  the value of mould_down_packet.equipment_no
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	public String getEquipmentNo() {
+		return equipmentNo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column mould_down_packet.equipment_no
+	 * @param equipmentNo  the value for mould_down_packet.equipment_no
+	 * @mbg.generated  Tue Oct 29 16:02:41 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 mould_down_packet.packet_str
+	 * @return  the value of mould_down_packet.packet_str
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	public String getPacketStr() {
+		return packetStr;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column mould_down_packet.packet_str
+	 * @param packetStr  the value for mould_down_packet.packet_str
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	public void setPacketStr(String packetStr) {
+		this.packetStr = packetStr;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column mould_down_packet.indate
+	 * @return  the value of mould_down_packet.indate
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	public Date getIndate() {
+		return indate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column mould_down_packet.indate
+	 * @param indate  the value for mould_down_packet.indate
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	public void setIndate(Date indate) {
+		this.indate = indate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column mould_down_packet.is_use
+	 * @return  the value of mould_down_packet.is_use
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	public Integer getIsUse() {
+		return isUse;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column mould_down_packet.is_use
+	 * @param isUse  the value for mould_down_packet.is_use
+	 * @mbg.generated  Tue Oct 29 16:02:41 CST 2019
+	 */
+	public void setIsUse(Integer isUse) {
+		this.isUse = isUse;
+	}
 }

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 562 - 603
cloud-socket/src/com/js/kbt/model/MouldDownPacketExample.java


+ 76 - 0
cloud-socket/src/com/js/kbt/model/SensorThreshold.java

@@ -0,0 +1,76 @@
+package com.js.kbt.model;
+
+import java.util.Date;
+
+public class SensorThreshold {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column sensor_threshold.id
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column sensor_threshold.indate
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	private Date indate;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column sensor_threshold.threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	private String threshold;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column sensor_threshold.id
+	 * @return  the value of sensor_threshold.id
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column sensor_threshold.id
+	 * @param id  the value for sensor_threshold.id
+	 * @mbg.generated  Tue Oct 29 15:57:23 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 sensor_threshold.indate
+	 * @return  the value of sensor_threshold.indate
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	public Date getIndate() {
+		return indate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column sensor_threshold.indate
+	 * @param indate  the value for sensor_threshold.indate
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	public void setIndate(Date indate) {
+		this.indate = indate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column sensor_threshold.threshold
+	 * @return  the value of sensor_threshold.threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	public String getThreshold() {
+		return threshold;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column sensor_threshold.threshold
+	 * @param threshold  the value for sensor_threshold.threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	public void setThreshold(String threshold) {
+		this.threshold = threshold;
+	}
+}

+ 452 - 0
cloud-socket/src/com/js/kbt/model/SensorThresholdExample.java

@@ -0,0 +1,452 @@
+package com.js.kbt.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class SensorThresholdExample {
+    /**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	protected String orderByClause;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	protected boolean distinct;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	protected List<Criteria> oredCriteria;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	public SensorThresholdExample() {
+		oredCriteria = new ArrayList<Criteria>();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	public void setOrderByClause(String orderByClause) {
+		this.orderByClause = orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	public String getOrderByClause() {
+		return orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	public void setDistinct(boolean distinct) {
+		this.distinct = distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	public boolean isDistinct() {
+		return distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	public List<Criteria> getOredCriteria() {
+		return oredCriteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	public void or(Criteria criteria) {
+		oredCriteria.add(criteria);
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	public Criteria or() {
+		Criteria criteria = createCriteriaInternal();
+		oredCriteria.add(criteria);
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	public Criteria createCriteria() {
+		Criteria criteria = createCriteriaInternal();
+		if (oredCriteria.size() == 0) {
+			oredCriteria.add(criteria);
+		}
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	protected Criteria createCriteriaInternal() {
+		Criteria criteria = new Criteria();
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	public void clear() {
+		oredCriteria.clear();
+		orderByClause = null;
+		distinct = false;
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	protected abstract static class GeneratedCriteria {
+		protected List<Criterion> criteria;
+
+		protected GeneratedCriteria() {
+			super();
+			criteria = new ArrayList<Criterion>();
+		}
+
+		public boolean isValid() {
+			return criteria.size() > 0;
+		}
+
+		public List<Criterion> getAllCriteria() {
+			return criteria;
+		}
+
+		public List<Criterion> getCriteria() {
+			return criteria;
+		}
+
+		protected void addCriterion(String condition) {
+			if (condition == null) {
+				throw new RuntimeException("Value for condition cannot be null");
+			}
+			criteria.add(new Criterion(condition));
+		}
+
+		protected void addCriterion(String condition, Object value, String property) {
+			if (value == null) {
+				throw new RuntimeException("Value for " + property + " cannot be null");
+			}
+			criteria.add(new Criterion(condition, value));
+		}
+
+		protected void addCriterion(String condition, Object value1, Object value2, String property) {
+			if (value1 == null || value2 == null) {
+				throw new RuntimeException("Between values for " + property + " cannot be null");
+			}
+			criteria.add(new Criterion(condition, value1, value2));
+		}
+
+		public Criteria andIdIsNull() {
+			addCriterion("id is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIsNotNull() {
+			addCriterion("id is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdEqualTo(Integer value) {
+			addCriterion("id =", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotEqualTo(Integer value) {
+			addCriterion("id <>", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThan(Integer value) {
+			addCriterion("id >", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+			addCriterion("id >=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThan(Integer value) {
+			addCriterion("id <", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThanOrEqualTo(Integer value) {
+			addCriterion("id <=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIn(List<Integer> values) {
+			addCriterion("id in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotIn(List<Integer> values) {
+			addCriterion("id not in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdBetween(Integer value1, Integer value2) {
+			addCriterion("id between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotBetween(Integer value1, Integer value2) {
+			addCriterion("id not between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateIsNull() {
+			addCriterion("indate is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateIsNotNull() {
+			addCriterion("indate is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateEqualTo(Date value) {
+			addCriterion("indate =", value, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateNotEqualTo(Date value) {
+			addCriterion("indate <>", value, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateGreaterThan(Date value) {
+			addCriterion("indate >", value, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateGreaterThanOrEqualTo(Date value) {
+			addCriterion("indate >=", value, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateLessThan(Date value) {
+			addCriterion("indate <", value, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateLessThanOrEqualTo(Date value) {
+			addCriterion("indate <=", value, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateIn(List<Date> values) {
+			addCriterion("indate in", values, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateNotIn(List<Date> values) {
+			addCriterion("indate not in", values, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateBetween(Date value1, Date value2) {
+			addCriterion("indate between", value1, value2, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateNotBetween(Date value1, Date value2) {
+			addCriterion("indate not between", value1, value2, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andThresholdIsNull() {
+			addCriterion("threshold is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andThresholdIsNotNull() {
+			addCriterion("threshold is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andThresholdEqualTo(String value) {
+			addCriterion("threshold =", value, "threshold");
+			return (Criteria) this;
+		}
+
+		public Criteria andThresholdNotEqualTo(String value) {
+			addCriterion("threshold <>", value, "threshold");
+			return (Criteria) this;
+		}
+
+		public Criteria andThresholdGreaterThan(String value) {
+			addCriterion("threshold >", value, "threshold");
+			return (Criteria) this;
+		}
+
+		public Criteria andThresholdGreaterThanOrEqualTo(String value) {
+			addCriterion("threshold >=", value, "threshold");
+			return (Criteria) this;
+		}
+
+		public Criteria andThresholdLessThan(String value) {
+			addCriterion("threshold <", value, "threshold");
+			return (Criteria) this;
+		}
+
+		public Criteria andThresholdLessThanOrEqualTo(String value) {
+			addCriterion("threshold <=", value, "threshold");
+			return (Criteria) this;
+		}
+
+		public Criteria andThresholdLike(String value) {
+			addCriterion("threshold like", value, "threshold");
+			return (Criteria) this;
+		}
+
+		public Criteria andThresholdNotLike(String value) {
+			addCriterion("threshold not like", value, "threshold");
+			return (Criteria) this;
+		}
+
+		public Criteria andThresholdIn(List<String> values) {
+			addCriterion("threshold in", values, "threshold");
+			return (Criteria) this;
+		}
+
+		public Criteria andThresholdNotIn(List<String> values) {
+			addCriterion("threshold not in", values, "threshold");
+			return (Criteria) this;
+		}
+
+		public Criteria andThresholdBetween(String value1, String value2) {
+			addCriterion("threshold between", value1, value2, "threshold");
+			return (Criteria) this;
+		}
+
+		public Criteria andThresholdNotBetween(String value1, String value2) {
+			addCriterion("threshold not between", value1, value2, "threshold");
+			return (Criteria) this;
+		}
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table sensor_threshold
+	 * @mbg.generated  Tue Oct 29 15:57:23 CST 2019
+	 */
+	public static class Criterion {
+		private String condition;
+		private Object value;
+		private Object secondValue;
+		private boolean noValue;
+		private boolean singleValue;
+		private boolean betweenValue;
+		private boolean listValue;
+		private String typeHandler;
+
+		public String getCondition() {
+			return condition;
+		}
+
+		public Object getValue() {
+			return value;
+		}
+
+		public Object getSecondValue() {
+			return secondValue;
+		}
+
+		public boolean isNoValue() {
+			return noValue;
+		}
+
+		public boolean isSingleValue() {
+			return singleValue;
+		}
+
+		public boolean isBetweenValue() {
+			return betweenValue;
+		}
+
+		public boolean isListValue() {
+			return listValue;
+		}
+
+		public String getTypeHandler() {
+			return typeHandler;
+		}
+
+		protected Criterion(String condition) {
+			super();
+			this.condition = condition;
+			this.typeHandler = null;
+			this.noValue = true;
+		}
+
+		protected Criterion(String condition, Object value, String typeHandler) {
+			super();
+			this.condition = condition;
+			this.value = value;
+			this.typeHandler = typeHandler;
+			if (value instanceof List<?>) {
+				this.listValue = true;
+			} else {
+				this.singleValue = true;
+			}
+		}
+
+		protected Criterion(String condition, Object value) {
+			this(condition, value, null);
+		}
+
+		protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+			super();
+			this.condition = condition;
+			this.value = value;
+			this.secondValue = secondValue;
+			this.typeHandler = typeHandler;
+			this.betweenValue = true;
+		}
+
+		protected Criterion(String condition, Object value, Object secondValue) {
+			this(condition, value, secondValue, null);
+		}
+	}
+
+	/**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table sensor_threshold
+     *
+     * @mbg.generated do_not_delete_during_merge Tue Oct 29 15:56:44 CST 2019
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+}

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

@@ -16,6 +16,7 @@ import com.js.kbt.mapper.MouldDownPacketMapper;
 import com.js.kbt.mapper.MouldHistoryMapper;
 import com.js.kbt.mapper.MouldHistoryTimeMapper;
 import com.js.kbt.mapper.MouldHodingMapper;
+import com.js.kbt.mapper.SensorThresholdMapper;
 import com.js.kbt.mapper.TbFactoryMapper;
 import com.js.kbt.mapper.TbMouldEquipmentMapper;
 import com.js.kbt.mapper.TbMouldMapper;
@@ -28,6 +29,8 @@ import com.js.kbt.model.MouldHistory;
 import com.js.kbt.model.MouldHistoryExample;
 import com.js.kbt.model.MouldHistoryTime;
 import com.js.kbt.model.MouldHistoryTimeExample;
+import com.js.kbt.model.SensorThreshold;
+import com.js.kbt.model.SensorThresholdExample;
 import com.js.kbt.model.TbMould;
 import com.js.kbt.model.TbMouldEquipment;
 import com.js.kbt.model.TbMouldEquipmentExample;
@@ -67,6 +70,9 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 	private TimeCalibrationRecordMapper timeCalibrationRecordMapper;
 	@Resource
 	private MouldCycleRuntimeMapper mouldCycleRuntimeMapper;
+	@Resource
+    private SensorThresholdMapper sensorThresholdMapper;
+	
 
 	@Override
 	protected void channelRead0(ChannelHandlerContext arg0, String arg1) throws ParseException {
@@ -254,9 +260,23 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 			sendMsg(strHexStr16);
 			return deviceNum;
 		}
+		//下发传感器阈值20~200
+		sendThreshold();
 		// 返回设备编号
 		return deviceNum;
 	}
+	
+	//下发传感器阈值20~200
+	public void sendThreshold(){
+		List<SensorThreshold> list = sensorThresholdMapper.selectByExample(new SensorThresholdExample());
+		if(list.size()>0){
+			SensorThreshold sensorThreshold = list.get(0);
+			String threshold = "#LIMIT VALUE="+sensorThreshold.getThreshold();
+			sendMsg(threshold);
+			//下发完处理掉数据
+			sensorThresholdMapper.deleteByPrimaryKey(sensorThreshold.getId());
+		}
+	}
 
 	public void sendPackage(String equipmentNo) {
 		if (equipmentNo.indexOf("FAAF") != -1) {
@@ -279,6 +299,8 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 				me.setIsUse(packet.getIsUse());
 				tbMouldEquipmentMapper.updateByPrimaryKeySelective(me);
 			}
+			//下发完删除数据
+			mouldDownPacketMapper.deleteByPrimaryKey(packet.getId());
 		}
 	}
 
@@ -288,7 +310,7 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 			Date date = new Date();
 			SimpleDateFormat sdf = new SimpleDateFormat("yy-MM-dd,HH:mm:ss");
 			String dateStr = sdf.format(date);
-			dateStr = "#TIME=" + dateStr + ";";
+			dateStr = "#TIME=" + dateStr+";";
 			// #TIME=18-03-06,15:31:48;
 			logger.info("校准系统模块时间==>" + dateStr);
 			// 将字符串转成16进制字符串

+ 1 - 1
cloud-socket/src/jdbc.properties

@@ -1,7 +1,7 @@
 classPath=D:/model/cloud-socket/WebContent/WEB-INF/lib/mysql-connector-java-5.1.31-bin.jar
 #classPath=D:/workspace/yunsu/cloud-socket/WebContent/WEB-INF/lib/mysql-connector-java-5.1.31-bin.jar
 driver=com.mysql.jdbc.Driver
-url=jdbc:mysql://118.190.47.230:3306/cloud_model_test?autoReconnect=true&rewriteBatchedStatements=TRUE&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF-8
+url=jdbc:mysql://118.190.47.230:3306/cloud_model?autoReconnect=true&rewriteBatchedStatements=TRUE&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF-8
 username=root
 password=p011430seya1026
 maxActive=255

+ 6 - 6
target/classes/main/resources/mapper/MouldMapper.xml

@@ -91,8 +91,8 @@
         tbp.manager mangerName,tbco.company_address area,tbmp.hill_number hillNumber,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 indate FROM `mould_history` WHERE equipment_no=equipmentNo ORDER BY indate DESC LIMIT 1) lastopentime
-        ,(SELECT battery  FROM `mould_history` WHERE equipmentNo = equipment_no ORDER BY indate DESC LIMIT 1) hill_number,
-        (SELECT temperature  FROM `mould_history` WHERE equipment_no = equipmentNo ORDER BY indate DESC LIMIT 1) temperature
+        ,tbmp.curhill_number hill_number,
+        tbmp.curtemperature temperature
         from
         tb_mould tbm
         left join
@@ -141,8 +141,8 @@
         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 indate FROM `mould_history` WHERE equipment_no=equipmentNo ORDER BY indate DESC LIMIT 1) lastopentime,
-        (SELECT battery  FROM `mould_history` WHERE equipmentNo = equipment_no ORDER BY indate DESC LIMIT 1) hill_number,
-        (SELECT temperature  FROM `mould_history` WHERE equipment_no = equipmentNo ORDER BY indate DESC LIMIT 1) temperature
+        tbmp.curhill_number hill_number,
+        tbmp.curtemperature temperature
         from
         tb_mould tbm
         left join
@@ -191,8 +191,8 @@
         tbm.id id,tbm.model_no model_no, tbm.model_name,tbm.initial_modulus initial_modulus,tbp.manager_id managerId,tbm.produce_company_id produce_company_id,
         tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbco.company_name produceCompany,tbm.creator_id creator_id,tbm.holes,
         tbp.manager mangerName,tbco.company_address area,tbm.rfid rfid,tbm.oc_cycle oc_cycle,tbc.company_name companyName,tbm.pre_update_id,tbmp.equipment_name equipmentName,
-        tbmp.equipment_no equipmentNo,(SELECT battery  FROM `mould_history` WHERE tbmp.equipment_no = equipment_no ORDER BY indate DESC LIMIT 1) hill_number,
-        (SELECT temperature  FROM `mould_history` WHERE equipment_no = tbmp.equipment_no ORDER BY indate DESC LIMIT 1) temperature,tbm.setting_life setting_life,tbm.run_times run_times,tbmp.stage
+        tbmp.equipment_no equipmentNo,tbmp.curhill_number hill_number,
+        tbmp.curtemperature temperature,tbm.setting_life setting_life,tbm.run_times run_times,tbmp.stage
         from
         tb_mould tbm
         left join