seyason 5 rokov pred
rodič
commit
85dd3d4e7e

+ 8 - 99
.idea/yunsu.iml

@@ -1,100 +1,9 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="kotlin-language" name="Kotlin">
-      <configuration version="3" platform="JVM 1.8" useProjectSettings="false">
-        <compilerSettings />
-        <compilerArguments>
-          <option name="jvmTarget" value="1.8" />
-          <option name="languageVersion" value="1.2" />
-          <option name="apiVersion" value="1.2" />
-          <option name="pluginOptions">
-            <array />
-          </option>
-          <option name="pluginClasspaths">
-            <array />
-          </option>
-        </compilerArguments>
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/model/cloud-model" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/cloud-model/src" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-thymeleaf:2.1.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.11.2" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.2" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.26" level="project" />
-    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
-    <orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf-spring5:3.0.11.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf:3.0.11.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.attoparser:attoparser:2.0.5.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.unbescape:unbescape:1.1.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.26" level="project" />
-    <orderEntry type="library" name="Maven: org.thymeleaf.extras:thymeleaf-extras-java8time:3.0.4.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.9" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.9" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.9" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.9" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.9" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.21" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.21" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.21" level="project" />
-    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.17.Final" level="project" />
-    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
-    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: net.lingala.zip4j:zip4j:1.3.2" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.springframework.boot:spring-boot-devtools:2.1.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.6.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.6.RELEASE" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:8.0.16" level="project" />
-    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.8" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.1.6.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.1.6.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.6.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.11.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.23.4" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.9.13" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.9.13" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.8.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.8.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.1.8.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.2" level="project" />
-    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.15" level="project" />
-  </component>
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
 </module>

+ 21 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/controller/EquipmentSendCommandController.java

@@ -0,0 +1,21 @@
+package com.hssx.cloudmodel.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author seya
+ * @since 2020-04-02
+ */
+@RestController
+@RequestMapping("/equipment-send-command")
+public class EquipmentSendCommandController {
+
+}
+

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

@@ -28,7 +28,7 @@ public class MouldDownPacketController {
     /**
      * 下发某些指令,如清空指令
      * 参数:equipmentNo 云模盒的ccid(云模盒编号),uid 当前操作人的id,
-     * state 指令类型(0-清空,1-待定
+     * state 指令类型(0-清空,1-设置阈值
      * @return
      */
 

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

@@ -1,180 +1,180 @@
-package com.hssx.cloudmodel.controller;
-
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.hssx.cloudmodel.entity.ChangeIpCommand;
-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;
-import com.hssx.cloudmodel.service.MouldEquipmentService;
-import com.hssx.cloudmodel.service.UserService;
-import com.hssx.cloudmodel.util.HttpRespMsg;
-import com.hssx.cloudmodel.util.PageUtil;
-import io.swagger.annotations.ApiOperation;
-import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.io.IOException;
-
-
-/**
- *
- * @author 吴涛涛
- * @since 2019-08-02
- */
-@Controller
-@RequestMapping("/mouldequipment")
-public class MouldEquipmentController {
-    @Autowired
-    private MouldEquipmentService mouldEquipmentService;
-    @Autowired
-    private UserService userService;
-    /**
-     * 添加/修改模具设备
-     * 添加参数:equipmentName 设备名称(产品编号),useLife 使用年限, equipmentNo 设备编号 ,agent 代理商
-     * 修改时需多传的参数 id 设备id, belongCompanyId 所属公司id ,equipmentName 设备名称,agent 代理商
-     * @return
-     */
-    @ApiOperation("添加/修改模具设备")
-    @RequestMapping("/addOrUpdate")
-    @ResponseBody
-    public HttpRespMsg addOrUpdate(MouldEquipment mouldEquipment,String token) {
-        HttpRespMsg msg = new HttpRespMsg();
-        QueryWrapper<User> qw = new QueryWrapper<>();
-        qw.eq("head_imgurl",token);
-        User user = userService.getOne(qw);
-        msg = mouldEquipmentService.addAndUpdateMouldEquipment(mouldEquipment,user);
-        return msg;
-    }
-    /**
-     * 批量零件 Excel 导入
-     * file excel文件 token 用户身份凭证
-     *
-     * @param file
-     * @throws Exception
-     */
-    @ApiOperation("云模盒的excel批量导入")
-    @RequestMapping(value = "/importMouldEquipmentExcel")
-    @ResponseBody
-    public HttpRespMsg importMouldEquipmentExcel(
-            @RequestParam(value = "file", required = false) MultipartFile file,
-            UserVO userVO) throws IOException, InvalidFormatException {
-        HttpRespMsg msg = new HttpRespMsg();
-        msg = mouldEquipmentService.importMouldEquipmentExcel(file, userVO);
-        return msg;
-    }
-
-    /**
-     * 云平台下行配置数据包接口
-     * lowPowerLimit 低电量报警限值:(1 字节,十六进制)如:1e=31
-     * hotAlarmLimit 热报警限值:(1 字节,十六进制)如:50=80
-     * isUse:0-停止,1-启动
-     * equipmentNo 设备编号(可能是多个或者一个)多个以“,”隔开传  如:"123456"(单个),"123456,456878,123589"(多个)
-     * workInterval 工作状态时间间隔,freeInterval 空闲状态的时间间隔,threshold 阈值
-     */
-    @ApiOperation("启用设备")
-    @RequestMapping("/use")
-    @ResponseBody
-    public HttpRespMsg use(MouldEquipmentVO mouldEquipmentVO,String token) {
-        HttpRespMsg msg = new HttpRespMsg();
-        QueryWrapper<User> qw = new QueryWrapper<>();
-        qw.eq("head_imgurl",token);
-        User user = userService.getOne(qw);
-        msg = mouldEquipmentService.isUse(mouldEquipmentVO,user);
-        return msg;
-    }
-
-    /**
-     * 切换ip
-     * ip 要切换的ip,如:58.213.104.114
-     * port 端口,如:2019
-     */
-    @ApiOperation("切换ip")
-    @RequestMapping("/changeIp")
-    @ResponseBody
-    public HttpRespMsg changeIp(ChangeIpCommand changeIpCommand) {
-        HttpRespMsg msg = new HttpRespMsg();
-        msg = mouldEquipmentService.changeIp(changeIpCommand);
-        return msg;
-    }
-
-    /**
-     * 创建模具时获取资产方公司的设备列表
-     * 参数 belongCompanyId 当前登录人公司id,
-     * @return
-     */
-    @ApiOperation("获取资产方公司的设备列表")
-    @RequestMapping("/getMouldEquipmentList")
-    @ResponseBody
-    public HttpRespMsg getMouldEquipmentList(MouldEquipmentVO mouldEquipmentVO){
-        HttpRespMsg msg = new HttpRespMsg();
-        msg = mouldEquipmentService.getListByCompanyId(mouldEquipmentVO);
-        return msg;
-    }
-
-    /**
-     * 设备列表(仅仅只有超级管理员能够看到)
-     * 参数 token 用户唯一身份凭证 pageNum 当前页码,pageSize 每页条数 keyName 关键字查询,companyId 公司id(筛选)
-     * @return
-     */
-    @ApiOperation("设备列表")
-    @RequestMapping("/getEquipmentList")
-    @ResponseBody
-    public HttpRespMsg getMouldEquipmentList(@RequestParam(required = false) String token, PageUtil page,Integer companyId,String keyName){
-        HttpRespMsg msg = new HttpRespMsg();
-        QueryWrapper<User> qw = new QueryWrapper<>();
-        qw.eq("head_imgurl",token);
-        User user = userService.getOne(qw);
-        msg = mouldEquipmentService.getList(user,page,companyId,keyName);
-        return msg;
-    }
-
-    /**
-     * 模具设备(云模盒)温度/低电量告警
-     */
-    @ApiOperation("模具设备(云模盒)温度/低电量告警")
-    @RequestMapping("/alarm")
-    @ResponseBody
-    @Scheduled(cron = "0 0 12 * * ?")//配置时间点触发(每日中午12点)
-    public HttpRespMsg MouldEquipmentAlarm() throws Exception {
-        HttpRespMsg msg = mouldEquipmentService.MouldEquipmentAlarm();
-        return msg;
-    }
-
-    /**
-     * 给模具更换云模盒时所获取的设备列表
-     * 参数 token 用户唯一身份凭证 mouldId 模具id
-     * @return
-     */
-    @ApiOperation("给模具更换云模盒时所获取的设备列表")
-    @RequestMapping("/getEquipmentListByOldMouldAndUser")
-    @ResponseBody
-    public HttpRespMsg getEquipmentListByOldMouldAndUser(UserVO userVO){
-        HttpRespMsg msg = new HttpRespMsg();
-        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;
-//    }
-}
-
+package com.hssx.cloudmodel.controller;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.hssx.cloudmodel.entity.ChangeIpCommand;
+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;
+import com.hssx.cloudmodel.service.MouldEquipmentService;
+import com.hssx.cloudmodel.service.UserService;
+import com.hssx.cloudmodel.util.HttpRespMsg;
+import com.hssx.cloudmodel.util.PageUtil;
+import io.swagger.annotations.ApiOperation;
+import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+
+
+/**
+ *
+ * @author 吴涛涛
+ * @since 2019-08-02
+ */
+@Controller
+@RequestMapping("/mouldequipment")
+public class MouldEquipmentController {
+    @Autowired
+    private MouldEquipmentService mouldEquipmentService;
+    @Autowired
+    private UserService userService;
+    /**
+     * 添加/修改模具设备
+     * 添加参数:equipmentName 设备名称(产品编号),useLife 使用年限, equipmentNo 设备编号 ,agent 代理商
+     * 修改时需多传的参数 id 设备id, belongCompanyId 所属公司id ,equipmentName 设备名称,agent 代理商
+     * @return
+     */
+    @ApiOperation("添加/修改模具设备")
+    @RequestMapping("/addOrUpdate")
+    @ResponseBody
+    public HttpRespMsg addOrUpdate(MouldEquipment mouldEquipment,String token) {
+        HttpRespMsg msg = new HttpRespMsg();
+        QueryWrapper<User> qw = new QueryWrapper<>();
+        qw.eq("head_imgurl",token);
+        User user = userService.getOne(qw);
+        msg = mouldEquipmentService.addAndUpdateMouldEquipment(mouldEquipment,user);
+        return msg;
+    }
+    /**
+     * 批量零件 Excel 导入
+     * file excel文件 token 用户身份凭证
+     *
+     * @param file
+     * @throws Exception
+     */
+    @ApiOperation("云模盒的excel批量导入")
+    @RequestMapping(value = "/importMouldEquipmentExcel")
+    @ResponseBody
+    public HttpRespMsg importMouldEquipmentExcel(
+            @RequestParam(value = "file", required = false) MultipartFile file,
+            UserVO userVO) throws IOException, InvalidFormatException {
+        HttpRespMsg msg = new HttpRespMsg();
+        msg = mouldEquipmentService.importMouldEquipmentExcel(file, userVO);
+        return msg;
+    }
+
+    /**
+     * 云平台下行配置数据包接口
+     * lowPowerLimit 低电量报警限值:(1 字节,十六进制)如:1e=31
+     * hotAlarmLimit 热报警限值:(1 字节,十六进制)如:50=80
+     * isUse:0-停止,1-启动
+     * equipmentNo 设备编号(可能是多个或者一个)多个以“,”隔开传  如:"123456"(单个),"123456,456878,123589"(多个)
+     * workInterval 工作状态时间间隔,freeInterval 空闲状态的时间间隔,threshold 阈值
+     */
+    @ApiOperation("启用设备")
+    @RequestMapping("/use")
+    @ResponseBody
+    public HttpRespMsg use(MouldEquipmentVO mouldEquipmentVO,String token) {
+        HttpRespMsg msg = new HttpRespMsg();
+        QueryWrapper<User> qw = new QueryWrapper<>();
+        qw.eq("head_imgurl",token);
+        User user = userService.getOne(qw);
+        msg = mouldEquipmentService.isUse(mouldEquipmentVO,user);
+        return msg;
+    }
+
+    /**
+     * 切换ip
+     * ip 要切换的ip,如:58.213.104.114
+     * port 端口,如:2019
+     */
+    @ApiOperation("切换ip")
+    @RequestMapping("/changeIp")
+    @ResponseBody
+    public HttpRespMsg changeIp(ChangeIpCommand changeIpCommand) {
+        HttpRespMsg msg = new HttpRespMsg();
+        msg = mouldEquipmentService.changeIp(changeIpCommand);
+        return msg;
+    }
+
+    /**
+     * 创建模具时获取资产方公司的设备列表
+     * 参数 belongCompanyId 当前登录人公司id,
+     * @return
+     */
+    @ApiOperation("获取资产方公司的设备列表")
+    @RequestMapping("/getMouldEquipmentList")
+    @ResponseBody
+    public HttpRespMsg getMouldEquipmentList(MouldEquipmentVO mouldEquipmentVO){
+        HttpRespMsg msg = new HttpRespMsg();
+        msg = mouldEquipmentService.getListByCompanyId(mouldEquipmentVO);
+        return msg;
+    }
+
+    /**
+     * 设备列表(仅仅只有超级管理员能够看到)
+     * 参数 token 用户唯一身份凭证 pageNum 当前页码,pageSize 每页条数 keyName 关键字查询,companyId 公司id(筛选)
+     * @return
+     */
+    @ApiOperation("设备列表")
+    @RequestMapping("/getEquipmentList")
+    @ResponseBody
+    public HttpRespMsg getMouldEquipmentList(@RequestParam(required = false) String token, PageUtil page,Integer companyId,String keyName){
+        HttpRespMsg msg = new HttpRespMsg();
+        QueryWrapper<User> qw = new QueryWrapper<>();
+        qw.eq("head_imgurl",token);
+        User user = userService.getOne(qw);
+        msg = mouldEquipmentService.getList(user,page,companyId,keyName);
+        return msg;
+    }
+
+    /**
+     * 模具设备(云模盒)温度/低电量告警
+     */
+    @ApiOperation("模具设备(云模盒)温度/低电量告警")
+    @RequestMapping("/alarm")
+    @ResponseBody
+    @Scheduled(cron = "0 0 12 * * ?")//配置时间点触发(每日中午12点)
+    public HttpRespMsg MouldEquipmentAlarm() throws Exception {
+        HttpRespMsg msg = mouldEquipmentService.MouldEquipmentAlarm();
+        return msg;
+    }
+
+    /**
+     * 给模具更换云模盒时所获取的设备列表
+     * 参数 token 用户唯一身份凭证 mouldId 模具id
+     * @return
+     */
+    @ApiOperation("给模具更换云模盒时所获取的设备列表")
+    @RequestMapping("/getEquipmentListByOldMouldAndUser")
+    @ResponseBody
+    public HttpRespMsg getEquipmentListByOldMouldAndUser(UserVO userVO){
+        HttpRespMsg msg = new HttpRespMsg();
+        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;
+//    }
+}
+

+ 153 - 142
cloud-model/src/main/java/com/hssx/cloudmodel/entity/EquipmentSendCommand.java

@@ -1,142 +1,153 @@
-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 com.fasterxml.jackson.annotation.JsonFormat;
-
-import java.io.Serializable;
-
-/**
- * <p>
- * 
- * </p>
- *
- * @author 吴涛涛
- * @since 2020-03-19
- */
-public class EquipmentSendCommand extends Model<EquipmentSendCommand> {
-
-    private static final long serialVersionUID=1L;
-
-    /**
-     * 清空次数表主键
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Integer id;
-
-    /**
-     * 设备编号
-     */
-    @TableField("equipment_no")
-    private String equipmentNo;
-
-    /**
-     * 设置下发人的id
-     */
-    @TableField("uid")
-    private Integer uid;
-
-    /**
-     * 设置下发命令的时间
-     */
-    @TableField("indate")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private LocalDateTime indate;
-
-    /**
-     * 实际下发的时间
-     */
-    @TableField("send_time")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private LocalDateTime sendTime;
-
-    /**
-     * 操作状态0-清空,1-。。。
-     */
-    @TableField("state")
-    private Integer state;
-
-    /**
-     * 是否已下发0-未,1-已
-     */
-    @TableField("is_send")
-    private Integer isSend;
-
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public String getEquipmentNo() {
-        return equipmentNo;
-    }
-
-    public void setEquipmentNo(String equipmentNo) {
-        this.equipmentNo = equipmentNo;
-    }
-
-    public Integer getUid() {
-        return uid;
-    }
-
-    public void setUid(Integer uid) {
-        this.uid = uid;
-    }
-
-    public LocalDateTime getIndate() {
-        return indate;
-    }
-
-    public void setIndate(LocalDateTime indate) {
-        this.indate = indate;
-    }
-
-    public LocalDateTime getSendTime() {
-        return sendTime;
-    }
-
-    public void setSendTime(LocalDateTime sendTime) {
-        this.sendTime = sendTime;
-    }
-
-    public Integer getState() {
-        return state;
-    }
-
-    public void setState(Integer state) {
-        this.state = state;
-    }
-
-    public Integer getIsSend() {
-        return isSend;
-    }
-
-    public void setIsSend(Integer isSend) {
-        this.isSend = isSend;
-    }
-
-    @Override
-    protected Serializable pkVal() {
-        return this.id;
-    }
-
-    @Override
-    public String toString() {
-        return "EquipmentSendCommand{" +
-        "id=" + id +
-        ", equipmentNo=" + equipmentNo +
-        ", uid=" + uid +
-        ", indate=" + indate +
-        ", sendTime=" + sendTime +
-        ", state=" + state +
-        ", isSend=" + isSend +
-        "}";
-    }
-}
+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 seya
+ * @since 2020-04-10
+ */
+public class EquipmentSendCommand extends Model<EquipmentSendCommand> {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 清空次数表主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 设备编号
+     */
+    @TableField("equipment_no")
+    private String equipmentNo;
+
+    /**
+     * 设置下发人的id
+     */
+    @TableField("uid")
+    private Integer uid;
+
+    /**
+     * 设置下发命令的时间
+     */
+    @TableField("indate")
+    private LocalDateTime indate;
+
+    /**
+     * 实际下发的时间
+     */
+    @TableField("send_time")
+    private LocalDateTime sendTime;
+
+    /**
+     * 下发命令
+     */
+    @TableField("cmd")
+    private String cmd;
+
+    /**
+     * 是否已下发0-未,1-已
+     */
+    @TableField("is_send")
+    private Integer isSend;
+
+    /**
+     * 下发参数,当state为自定义时,存储的是16进制指令
+     */
+    @TableField("param")
+    private String param;
+
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getEquipmentNo() {
+        return equipmentNo;
+    }
+
+    public void setEquipmentNo(String equipmentNo) {
+        this.equipmentNo = equipmentNo;
+    }
+
+    public Integer getUid() {
+        return uid;
+    }
+
+    public void setUid(Integer uid) {
+        this.uid = uid;
+    }
+
+    public LocalDateTime getIndate() {
+        return indate;
+    }
+
+    public void setIndate(LocalDateTime indate) {
+        this.indate = indate;
+    }
+
+    public LocalDateTime getSendTime() {
+        return sendTime;
+    }
+
+    public void setSendTime(LocalDateTime sendTime) {
+        this.sendTime = sendTime;
+    }
+
+    public String getCmd() {
+        return cmd;
+    }
+
+    public void setCmd(String cmd) {
+        this.cmd = cmd;
+    }
+
+    public Integer getIsSend() {
+        return isSend;
+    }
+
+    public void setIsSend(Integer isSend) {
+        this.isSend = isSend;
+    }
+
+    public String getParam() {
+        return param;
+    }
+
+    public void setParam(String param) {
+        this.param = param;
+    }
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+    @Override
+    public String toString() {
+        return "EquipmentSendCommand{" +
+        "id=" + id +
+        ", equipmentNo=" + equipmentNo +
+        ", uid=" + uid +
+        ", indate=" + indate +
+        ", sendTime=" + sendTime +
+        ", cmd=" + cmd +
+        ", isSend=" + isSend +
+        ", param=" + param +
+        "}";
+    }
+}

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

@@ -16,6 +16,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 
 import javax.annotation.Resource;
+import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -54,6 +55,7 @@ public class EquipmentSendCommandServiceImpl extends ServiceImpl<EquipmentSendCo
     @Override
     public HttpRespMsg sendCommand(EquipmentSendCommand equipmentSendCommand) {
         HttpRespMsg msg = new HttpRespMsg();
+        equipmentSendCommand.setIndate(LocalDateTime.now());
         equipmentSendCommandMapper.insert(equipmentSendCommand);
         return msg;
     }

+ 3 - 3
cloud-model/src/main/java/com/hssx/cloudmodel/util/CodeGenerator.java

@@ -74,7 +74,7 @@ public class CodeGenerator {
         //生成的代码位置为当前项目
         String projectPath = System.getProperty("user.dir");
         gc.setOutputDir(projectPath + "/src/main/java");
-        gc.setAuthor("吴涛涛");
+        gc.setAuthor("seya");
         gc.setOpen(false);
         gc.setFileOverride(true);
         gc.setActiveRecord(true);
@@ -92,11 +92,11 @@ public class CodeGenerator {
 
         // 数据源配置
         DataSourceConfig dsc = new DataSourceConfig();
-        dsc.setUrl("jdbc:mysql://localhost:3306/cloud_mould?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8");
+        dsc.setUrl("jdbc:mysql://47.100.37.243:7644/cloud_mould?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8");
 //        dsc.setSchemaName("public");
         dsc.setDriverName("com.mysql.cj.jdbc.Driver");
         dsc.setUsername("root");
-        dsc.setPassword("102345..");
+        dsc.setPassword("Ziyu1026!@");
         mpg.setDataSource(dsc);
 
         // 包配置

+ 6 - 5
cloud-model/src/main/resources/application.properties

@@ -13,10 +13,11 @@ spring.thymeleaf.jackson.date-format=yyyy-MM-dd HH:mm:ss
 # ####################################################################################################
 # 数据源配置
 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
-#spring.datasource.url=jdbc:mysql://118.190.47.230:3306/cloud_model?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+#spring.datasource.url=jdbc:mysql://127.0.0.1:3306/cloud_mould?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
 spring.datasource.url=jdbc:mysql://47.100.37.243:7644/cloud_mould?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
 spring.datasource.username=root
-spring.datasource.password=Hssx2018.!
+#spring.datasource.password=p011430seya1026
+spring.datasource.password=Ziyu1026!@
 #spring.datasource.druid.test-on-borrow=true
 #spring.datasource.druid.test-while-idle=true
 # ####################################################################################################
@@ -37,10 +38,10 @@ spring.thymeleaf.prefix=classpath:/static/
 #spring.redis.port=6379
 ######################################################################################################
 # 文件上传路径
-upload.path=D:/mould/upload/
+upload.path=C:/mould/upload/
 ######################################################################################################
 # 文件下载路径
-download.path=D:/mould/download/
+download.path=C:/mould/download/
 # 邀请人员链接前缀
 invitation.url.prefix=https://localhost:8090/#/invite/
 # 备用密码
@@ -55,5 +56,5 @@ spring.datasource.hikari.minimum-idle=3
 spring.datasource.hikari.maximum-pool-size=10
 spring.datasource.hikari.max-lifetime =30000
 spring.datasource.hikari.connection-test-query=SELECT 1
-logging.path=E:/
+logging.path=C:/log/
 

+ 22 - 39
cloud-model/src/main/resources/mapper/EquipmentSendCommandMapper.xml

@@ -1,39 +1,22 @@
-<?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.EquipmentSendCommandMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.EquipmentSendCommand">
-        <id column="id" property="id" />
-        <result column="equipment_no" property="equipmentNo" />
-        <result column="uid" property="uid" />
-        <result column="indate" property="indate" />
-        <result column="send_time" property="sendTime" />
-        <result column="state" property="state" />
-        <result column="is_send" property="isSend" />
-    </resultMap>
-
-    <!-- 通用查询结果列 -->
-    <sql id="Base_Column_List">
-        id, equipment_no, uid, indate, send_time, state, is_send
-    </sql>
-
-    <select id="getList" resultType="java.util.Map">
-        select
-            esc.id, esc.equipment_no, esc.uid, DATE_FORMAT(esc.indate,'%Y-%m-%d %H:%m:%s') indate, DATE_FORMAT(esc.send_time,'%Y-%m-%d %H:%m:%s') send_time, esc.state, esc.is_send, tu.username
-        from
-            equipment_send_command esc
-        left join
-            tb_user tu
-        on
-            tu.id = esc.uid
-        <where>
-            esc.equipment_no in
-                <foreach collection="list" separator="," item="item" index="index" open="(" close=")">
-                    #{item}
-                </foreach>
-        </where>
-            order by indate desc
-    </select>
-
-</mapper>
+<?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.EquipmentSendCommandMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.EquipmentSendCommand">
+        <id column="id" property="id" />
+        <result column="equipment_no" property="equipmentNo" />
+        <result column="uid" property="uid" />
+        <result column="indate" property="indate" />
+        <result column="send_time" property="sendTime" />
+        <result column="cmd" property="cmd" />
+        <result column="is_send" property="isSend" />
+        <result column="param" property="param" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, equipment_no, uid, indate, send_time, cmd, is_send, param
+    </sql>
+
+</mapper>

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

@@ -4,21 +4,21 @@
 	<!-- <properties resource="jdbc.properties" />
 	<classPathEntry location="${classPath}"/> -->
 	<!-- 下面这行相当于以上两行 -->
-	<classPathEntry location="D:/mysql-connector-java-5.1.31-bin.jar"/>
+	<classPathEntry location="C:/gitproject/yunsu/cloud-socket/WebContent/WEB-INF/lib/mysql-connector-java-5.1.31-bin.jar"/>
   <context id="context1" targetRuntime="MyBatis3">
   
     <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://47.100.37.243:7644/cloud_mould"
-     userId="root" password="Hssx2018.!">
+     userId="root" password="Ziyu1026!@">
     </jdbcConnection>
     <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_mould" tableName="mould_history_time" >
-    	<!-- <generatedKey column="id" identity="true" sqlStatement="SELECT LAST_INSERT_ID()"/> -->
-    </table>
-<!--     <table schema="cloud_model" tableName="tb_mould_equipment" > -->
+<!--     <table schema="cloud_mould" tableName="mould_history_time" > -->
 <!--     	<generatedKey column="id" identity="true" sqlStatement="SELECT LAST_INSERT_ID()"/> -->
 <!--     </table> -->
+    <table schema="cloud_model" tableName="equipment_send_command" >
+    	<generatedKey column="id" identity="true" sqlStatement="SELECT LAST_INSERT_ID()"/>
+    </table>
 <!--     <table schema="cloud_model" tableName="tb_factory" > -->
 <!--     	<generatedKey column="id" identity="true" sqlStatement="SELECT LAST_INSERT_ID()"/> -->
 <!--     </table> -->

+ 58 - 77
cloud-socket/src/com/js/kbt/mapper/EquipmentSendCommandMapper.java

@@ -6,91 +6,72 @@ import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
 public interface EquipmentSendCommandMapper {
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table equipment_send_command
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    long countByExample(EquipmentSendCommandExample example);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table equipment_send_command
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    int deleteByExample(EquipmentSendCommandExample example);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_send_command
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	long countByExample(EquipmentSendCommandExample example);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table equipment_send_command
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    int deleteByPrimaryKey(Integer id);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_send_command
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	int deleteByExample(EquipmentSendCommandExample example);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table equipment_send_command
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    int insert(EquipmentSendCommand record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_send_command
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	int deleteByPrimaryKey(Integer id);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table equipment_send_command
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    int insertSelective(EquipmentSendCommand record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_send_command
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	int insert(EquipmentSendCommand record);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table equipment_send_command
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    List<EquipmentSendCommand> selectByExample(EquipmentSendCommandExample example);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_send_command
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	int insertSelective(EquipmentSendCommand record);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table equipment_send_command
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    EquipmentSendCommand selectByPrimaryKey(Integer id);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_send_command
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	List<EquipmentSendCommand> selectByExample(EquipmentSendCommandExample example);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table equipment_send_command
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    int updateByExampleSelective(@Param("record") EquipmentSendCommand record, @Param("example") EquipmentSendCommandExample example);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_send_command
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	EquipmentSendCommand selectByPrimaryKey(Integer id);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table equipment_send_command
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    int updateByExample(@Param("record") EquipmentSendCommand record, @Param("example") EquipmentSendCommandExample example);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_send_command
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	int updateByExampleSelective(@Param("record") EquipmentSendCommand record,
+			@Param("example") EquipmentSendCommandExample example);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table equipment_send_command
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    int updateByPrimaryKeySelective(EquipmentSendCommand record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_send_command
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	int updateByExample(@Param("record") EquipmentSendCommand record,
+			@Param("example") EquipmentSendCommandExample example);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table equipment_send_command
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    int updateByPrimaryKey(EquipmentSendCommand record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_send_command
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	int updateByPrimaryKeySelective(EquipmentSendCommand record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_send_command
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	int updateByPrimaryKey(EquipmentSendCommand record);
 }

+ 332 - 317
cloud-socket/src/com/js/kbt/mapper/EquipmentSendCommandMapper.xml

@@ -1,318 +1,333 @@
-<?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.EquipmentSendCommandMapper">
-  <resultMap id="BaseResultMap" type="com.js.kbt.model.EquipmentSendCommand">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Mar 19 13:16:30 CST 2020.
-    -->
-    <id column="id" jdbcType="INTEGER" property="id" />
-    <result column="equipment_no" jdbcType="VARCHAR" property="equipmentNo" />
-    <result column="uid" jdbcType="INTEGER" property="uid" />
-    <result column="indate" jdbcType="TIMESTAMP" property="indate" />
-    <result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
-    <result column="state" jdbcType="INTEGER" property="state" />
-    <result column="is_send" jdbcType="INTEGER" property="isSend" />
-  </resultMap>
-  <sql id="Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Mar 19 13:16:30 CST 2020.
-    -->
-    <where>
-      <foreach collection="oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Mar 19 13:16:30 CST 2020.
-    -->
-    <where>
-      <foreach collection="example.oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Base_Column_List">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Mar 19 13:16:30 CST 2020.
-    -->
-    id, equipment_no, uid, indate, send_time, state, is_send
-  </sql>
-  <select id="selectByExample" parameterType="com.js.kbt.model.EquipmentSendCommandExample" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Mar 19 13:16:30 CST 2020.
-    -->
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from equipment_send_command
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Mar 19 13:16:30 CST 2020.
-    -->
-    select 
-    <include refid="Base_Column_List" />
-    from equipment_send_command
-    where id = #{id,jdbcType=INTEGER}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Mar 19 13:16:30 CST 2020.
-    -->
-    delete from equipment_send_command
-    where id = #{id,jdbcType=INTEGER}
-  </delete>
-  <delete id="deleteByExample" parameterType="com.js.kbt.model.EquipmentSendCommandExample">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Mar 19 13:16:30 CST 2020.
-    -->
-    delete from equipment_send_command
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.js.kbt.model.EquipmentSendCommand">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Mar 19 13:16:30 CST 2020.
-    -->
-    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
-      SELECT LAST_INSERT_ID()
-    </selectKey>
-    insert into equipment_send_command (equipment_no, uid, indate, 
-      send_time, state, is_send
-      )
-    values (#{equipmentNo,jdbcType=VARCHAR}, #{uid,jdbcType=INTEGER}, #{indate,jdbcType=TIMESTAMP}, 
-      #{sendTime,jdbcType=TIMESTAMP}, #{state,jdbcType=INTEGER}, #{isSend,jdbcType=INTEGER}
-      )
-  </insert>
-  <insert id="insertSelective" parameterType="com.js.kbt.model.EquipmentSendCommand">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Mar 19 13:16:30 CST 2020.
-    -->
-    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
-      SELECT LAST_INSERT_ID()
-    </selectKey>
-    insert into equipment_send_command
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="equipmentNo != null">
-        equipment_no,
-      </if>
-      <if test="uid != null">
-        uid,
-      </if>
-      <if test="indate != null">
-        indate,
-      </if>
-      <if test="sendTime != null">
-        send_time,
-      </if>
-      <if test="state != null">
-        state,
-      </if>
-      <if test="isSend != null">
-        is_send,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="equipmentNo != null">
-        #{equipmentNo,jdbcType=VARCHAR},
-      </if>
-      <if test="uid != null">
-        #{uid,jdbcType=INTEGER},
-      </if>
-      <if test="indate != null">
-        #{indate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="sendTime != null">
-        #{sendTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="state != null">
-        #{state,jdbcType=INTEGER},
-      </if>
-      <if test="isSend != null">
-        #{isSend,jdbcType=INTEGER},
-      </if>
-    </trim>
-  </insert>
-  <select id="countByExample" parameterType="com.js.kbt.model.EquipmentSendCommandExample" resultType="java.lang.Long">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Mar 19 13:16:30 CST 2020.
-    -->
-    select count(*) from equipment_send_command
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Mar 19 13:16:30 CST 2020.
-    -->
-    update equipment_send_command
-    <set>
-      <if test="record.id != null">
-        id = #{record.id,jdbcType=INTEGER},
-      </if>
-      <if test="record.equipmentNo != null">
-        equipment_no = #{record.equipmentNo,jdbcType=VARCHAR},
-      </if>
-      <if test="record.uid != null">
-        uid = #{record.uid,jdbcType=INTEGER},
-      </if>
-      <if test="record.indate != null">
-        indate = #{record.indate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.sendTime != null">
-        send_time = #{record.sendTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.state != null">
-        state = #{record.state,jdbcType=INTEGER},
-      </if>
-      <if test="record.isSend != null">
-        is_send = #{record.isSend,jdbcType=INTEGER},
-      </if>
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Mar 19 13:16:30 CST 2020.
-    -->
-    update equipment_send_command
-    set id = #{record.id,jdbcType=INTEGER},
-      equipment_no = #{record.equipmentNo,jdbcType=VARCHAR},
-      uid = #{record.uid,jdbcType=INTEGER},
-      indate = #{record.indate,jdbcType=TIMESTAMP},
-      send_time = #{record.sendTime,jdbcType=TIMESTAMP},
-      state = #{record.state,jdbcType=INTEGER},
-      is_send = #{record.isSend,jdbcType=INTEGER}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.js.kbt.model.EquipmentSendCommand">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Mar 19 13:16:30 CST 2020.
-    -->
-    update equipment_send_command
-    <set>
-      <if test="equipmentNo != null">
-        equipment_no = #{equipmentNo,jdbcType=VARCHAR},
-      </if>
-      <if test="uid != null">
-        uid = #{uid,jdbcType=INTEGER},
-      </if>
-      <if test="indate != null">
-        indate = #{indate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="sendTime != null">
-        send_time = #{sendTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="state != null">
-        state = #{state,jdbcType=INTEGER},
-      </if>
-      <if test="isSend != null">
-        is_send = #{isSend,jdbcType=INTEGER},
-      </if>
-    </set>
-    where id = #{id,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.js.kbt.model.EquipmentSendCommand">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Mar 19 13:16:30 CST 2020.
-    -->
-    update equipment_send_command
-    set equipment_no = #{equipmentNo,jdbcType=VARCHAR},
-      uid = #{uid,jdbcType=INTEGER},
-      indate = #{indate,jdbcType=TIMESTAMP},
-      send_time = #{sendTime,jdbcType=TIMESTAMP},
-      state = #{state,jdbcType=INTEGER},
-      is_send = #{isSend,jdbcType=INTEGER}
-    where id = #{id,jdbcType=INTEGER}
-  </update>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.js.kbt.mapper.EquipmentSendCommandMapper">
+  <resultMap id="BaseResultMap" type="com.js.kbt.model.EquipmentSendCommand">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 10 11:50:44 CST 2020.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="equipment_no" jdbcType="VARCHAR" property="equipmentNo" />
+    <result column="uid" jdbcType="INTEGER" property="uid" />
+    <result column="indate" jdbcType="TIMESTAMP" property="indate" />
+    <result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
+    <result column="cmd" jdbcType="VARCHAR" property="cmd" />
+    <result column="is_send" jdbcType="INTEGER" property="isSend" />
+    <result column="param" jdbcType="VARCHAR" property="param" />
+  </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 Fri Apr 10 11:50:44 CST 2020.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 10 11:50:44 CST 2020.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 10 11:50:44 CST 2020.
+    -->
+    id, equipment_no, uid, indate, send_time, cmd, is_send, param
+  </sql>
+  <select id="selectByExample" parameterType="com.js.kbt.model.EquipmentSendCommandExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 10 11:50:44 CST 2020.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from equipment_send_command
+    <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 Fri Apr 10 11:50:44 CST 2020.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from equipment_send_command
+    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 Fri Apr 10 11:50:44 CST 2020.
+    -->
+    delete from equipment_send_command
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.js.kbt.model.EquipmentSendCommandExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 10 11:50:44 CST 2020.
+    -->
+    delete from equipment_send_command
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.js.kbt.model.EquipmentSendCommand">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 10 11:50:44 CST 2020.
+    -->
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into equipment_send_command (equipment_no, uid, indate, 
+      send_time, cmd, is_send, 
+      param)
+    values (#{equipmentNo,jdbcType=VARCHAR}, #{uid,jdbcType=INTEGER}, #{indate,jdbcType=TIMESTAMP}, 
+      #{sendTime,jdbcType=TIMESTAMP}, #{cmd,jdbcType=VARCHAR}, #{isSend,jdbcType=INTEGER}, 
+      #{param,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.js.kbt.model.EquipmentSendCommand">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 10 11:50:44 CST 2020.
+    -->
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into equipment_send_command
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="equipmentNo != null">
+        equipment_no,
+      </if>
+      <if test="uid != null">
+        uid,
+      </if>
+      <if test="indate != null">
+        indate,
+      </if>
+      <if test="sendTime != null">
+        send_time,
+      </if>
+      <if test="cmd != null">
+        cmd,
+      </if>
+      <if test="isSend != null">
+        is_send,
+      </if>
+      <if test="param != null">
+        param,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="equipmentNo != null">
+        #{equipmentNo,jdbcType=VARCHAR},
+      </if>
+      <if test="uid != null">
+        #{uid,jdbcType=INTEGER},
+      </if>
+      <if test="indate != null">
+        #{indate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="sendTime != null">
+        #{sendTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="cmd != null">
+        #{cmd,jdbcType=VARCHAR},
+      </if>
+      <if test="isSend != null">
+        #{isSend,jdbcType=INTEGER},
+      </if>
+      <if test="param != null">
+        #{param,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.js.kbt.model.EquipmentSendCommandExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 10 11:50:44 CST 2020.
+    -->
+    select count(*) from equipment_send_command
+    <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 Fri Apr 10 11:50:44 CST 2020.
+    -->
+    update equipment_send_command
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.equipmentNo != null">
+        equipment_no = #{record.equipmentNo,jdbcType=VARCHAR},
+      </if>
+      <if test="record.uid != null">
+        uid = #{record.uid,jdbcType=INTEGER},
+      </if>
+      <if test="record.indate != null">
+        indate = #{record.indate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.sendTime != null">
+        send_time = #{record.sendTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.cmd != null">
+        cmd = #{record.cmd,jdbcType=VARCHAR},
+      </if>
+      <if test="record.isSend != null">
+        is_send = #{record.isSend,jdbcType=INTEGER},
+      </if>
+      <if test="record.param != null">
+        param = #{record.param,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 Fri Apr 10 11:50:44 CST 2020.
+    -->
+    update equipment_send_command
+    set id = #{record.id,jdbcType=INTEGER},
+      equipment_no = #{record.equipmentNo,jdbcType=VARCHAR},
+      uid = #{record.uid,jdbcType=INTEGER},
+      indate = #{record.indate,jdbcType=TIMESTAMP},
+      send_time = #{record.sendTime,jdbcType=TIMESTAMP},
+      cmd = #{record.cmd,jdbcType=VARCHAR},
+      is_send = #{record.isSend,jdbcType=INTEGER},
+      param = #{record.param,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.js.kbt.model.EquipmentSendCommand">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 10 11:50:44 CST 2020.
+    -->
+    update equipment_send_command
+    <set>
+      <if test="equipmentNo != null">
+        equipment_no = #{equipmentNo,jdbcType=VARCHAR},
+      </if>
+      <if test="uid != null">
+        uid = #{uid,jdbcType=INTEGER},
+      </if>
+      <if test="indate != null">
+        indate = #{indate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="sendTime != null">
+        send_time = #{sendTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="cmd != null">
+        cmd = #{cmd,jdbcType=VARCHAR},
+      </if>
+      <if test="isSend != null">
+        is_send = #{isSend,jdbcType=INTEGER},
+      </if>
+      <if test="param != null">
+        param = #{param,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.js.kbt.model.EquipmentSendCommand">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 10 11:50:44 CST 2020.
+    -->
+    update equipment_send_command
+    set equipment_no = #{equipmentNo,jdbcType=VARCHAR},
+      uid = #{uid,jdbcType=INTEGER},
+      indate = #{indate,jdbcType=TIMESTAMP},
+      send_time = #{sendTime,jdbcType=TIMESTAMP},
+      cmd = #{cmd,jdbcType=VARCHAR},
+      is_send = #{isSend,jdbcType=INTEGER},
+      param = #{param,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
 </mapper>

+ 185 - 230
cloud-socket/src/com/js/kbt/model/EquipmentSendCommand.java

@@ -3,234 +3,189 @@ package com.js.kbt.model;
 import java.util.Date;
 
 public class EquipmentSendCommand {
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column equipment_send_command.id
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    private Integer id;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column equipment_send_command.equipment_no
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    private String equipmentNo;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column equipment_send_command.uid
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    private Integer uid;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column equipment_send_command.indate
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    private Date indate;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column equipment_send_command.send_time
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    private Date sendTime;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column equipment_send_command.state
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    private Integer state;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column equipment_send_command.is_send
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    private Integer isSend;
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column equipment_send_command.id
-     *
-     * @return the value of equipment_send_command.id
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    public Integer getId() {
-        return id;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column equipment_send_command.id
-     *
-     * @param id the value for equipment_send_command.id
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column equipment_send_command.equipment_no
-     *
-     * @return the value of equipment_send_command.equipment_no
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    public String getEquipmentNo() {
-        return equipmentNo;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column equipment_send_command.equipment_no
-     *
-     * @param equipmentNo the value for equipment_send_command.equipment_no
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    public void setEquipmentNo(String equipmentNo) {
-        this.equipmentNo = equipmentNo;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column equipment_send_command.uid
-     *
-     * @return the value of equipment_send_command.uid
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    public Integer getUid() {
-        return uid;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column equipment_send_command.uid
-     *
-     * @param uid the value for equipment_send_command.uid
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    public void setUid(Integer uid) {
-        this.uid = uid;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column equipment_send_command.indate
-     *
-     * @return the value of equipment_send_command.indate
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    public Date getIndate() {
-        return indate;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column equipment_send_command.indate
-     *
-     * @param indate the value for equipment_send_command.indate
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    public void setIndate(Date indate) {
-        this.indate = indate;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column equipment_send_command.send_time
-     *
-     * @return the value of equipment_send_command.send_time
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    public Date getSendTime() {
-        return sendTime;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column equipment_send_command.send_time
-     *
-     * @param sendTime the value for equipment_send_command.send_time
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    public void setSendTime(Date sendTime) {
-        this.sendTime = sendTime;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column equipment_send_command.state
-     *
-     * @return the value of equipment_send_command.state
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    public Integer getState() {
-        return state;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column equipment_send_command.state
-     *
-     * @param state the value for equipment_send_command.state
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    public void setState(Integer state) {
-        this.state = state;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column equipment_send_command.is_send
-     *
-     * @return the value of equipment_send_command.is_send
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    public Integer getIsSend() {
-        return isSend;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column equipment_send_command.is_send
-     *
-     * @param isSend the value for equipment_send_command.is_send
-     *
-     * @mbg.generated Thu Mar 19 13:16:30 CST 2020
-     */
-    public void setIsSend(Integer isSend) {
-        this.isSend = isSend;
-    }
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column equipment_send_command.id
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column equipment_send_command.equipment_no
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	private String equipmentNo;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column equipment_send_command.uid
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	private Integer uid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column equipment_send_command.indate
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	private Date indate;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column equipment_send_command.send_time
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	private Date sendTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column equipment_send_command.cmd
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	private String cmd;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column equipment_send_command.is_send
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	private Integer isSend;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column equipment_send_command.param
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	private String param;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column equipment_send_command.id
+	 * @return  the value of equipment_send_command.id
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column equipment_send_command.id
+	 * @param id  the value for equipment_send_command.id
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column equipment_send_command.equipment_no
+	 * @return  the value of equipment_send_command.equipment_no
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	public String getEquipmentNo() {
+		return equipmentNo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column equipment_send_command.equipment_no
+	 * @param equipmentNo  the value for equipment_send_command.equipment_no
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	public void setEquipmentNo(String equipmentNo) {
+		this.equipmentNo = equipmentNo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column equipment_send_command.uid
+	 * @return  the value of equipment_send_command.uid
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	public Integer getUid() {
+		return uid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column equipment_send_command.uid
+	 * @param uid  the value for equipment_send_command.uid
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	public void setUid(Integer uid) {
+		this.uid = uid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column equipment_send_command.indate
+	 * @return  the value of equipment_send_command.indate
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	public Date getIndate() {
+		return indate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column equipment_send_command.indate
+	 * @param indate  the value for equipment_send_command.indate
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	public void setIndate(Date indate) {
+		this.indate = indate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column equipment_send_command.send_time
+	 * @return  the value of equipment_send_command.send_time
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	public Date getSendTime() {
+		return sendTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column equipment_send_command.send_time
+	 * @param sendTime  the value for equipment_send_command.send_time
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	public void setSendTime(Date sendTime) {
+		this.sendTime = sendTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column equipment_send_command.cmd
+	 * @return  the value of equipment_send_command.cmd
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	public String getCmd() {
+		return cmd;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column equipment_send_command.cmd
+	 * @param cmd  the value for equipment_send_command.cmd
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	public void setCmd(String cmd) {
+		this.cmd = cmd;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column equipment_send_command.is_send
+	 * @return  the value of equipment_send_command.is_send
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	public Integer getIsSend() {
+		return isSend;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column equipment_send_command.is_send
+	 * @param isSend  the value for equipment_send_command.is_send
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	public void setIsSend(Integer isSend) {
+		this.isSend = isSend;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column equipment_send_command.param
+	 * @return  the value of equipment_send_command.param
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	public String getParam() {
+		return param;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column equipment_send_command.param
+	 * @param param  the value for equipment_send_command.param
+	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 */
+	public void setParam(String param) {
+		this.param = param;
+	}
 }

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 752 - 713
cloud-socket/src/com/js/kbt/model/EquipmentSendCommandExample.java


+ 190 - 133
cloud-socket/src/com/js/kbt/socket/UserHandler.java

@@ -3,6 +3,7 @@ package com.js.kbt.socket;
 import java.math.BigDecimal;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -30,6 +31,8 @@ import com.js.kbt.mapper.TbMouldMapper;
 import com.js.kbt.mapper.TimeCalibrationRecordMapper;
 import com.js.kbt.model.ChangeIpCommand;
 import com.js.kbt.model.ChangeIpCommandExample;
+import com.js.kbt.model.EquipmentSendCommand;
+import com.js.kbt.model.EquipmentSendCommandExample;
 import com.js.kbt.model.LonLatRecord;
 import com.js.kbt.model.LonLatRecordExample;
 import com.js.kbt.model.MouldDownPacket;
@@ -44,11 +47,7 @@ import com.js.kbt.model.TbMouldEquipment;
 import com.js.kbt.model.TbMouldEquipmentExample;
 import com.js.kbt.model.TbMouldExample;
 import com.js.kbt.model.TimeCalibrationRecord;
-import com.mysql.fabric.xmlrpc.base.Array;
 
-import edu.emory.mathcs.backport.java.util.concurrent.Executors;
-import edu.emory.mathcs.backport.java.util.concurrent.ScheduledExecutorService;
-import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.Unpooled;
 import io.netty.channel.ChannelHandlerContext;
@@ -58,6 +57,17 @@ import io.netty.handler.timeout.IdleStateEvent;
 
 @Service("userHandler")
 public class UserHandler extends SimpleChannelInboundHandler<String> {
+	public static final String CMD_STATUS = "01";//工作状态控制字;
+	public static final String CMD_BUSY_PERIOD = "02";//工作忙状态周期
+	public static final String CMD_IDLE_PERIOD = "03";//空闲状态周期
+	public static final String CMD_TIME_FIX = "08";//网络时间校准
+	public static final String CMD_NO_2G = "09";//NB切换2G阈值
+	public static final String CMD_CLOSE_WTIME = "0C";//合模等待时间
+	public static final String CMD_OPEN_WTIME = "0D";//开模等待时间1,单位1ms
+	public static final String CMD_EEPROM = "0E";//重新上传EEPROM值
+	public static final String CMD_WAITING_UPLOAD_TIME = "10";//待机上报时间
+	public static final String CMD_COUNT = "12";//开合模总次数
+	public static final String CMD_PURE_HEX = "100";//纯16进制指令,用户界面输入
 
 	private static final Logger logger = Logger.getLogger(UserHandler.class);
 
@@ -154,21 +164,7 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 				// 下发完就将数据删除(防止后续数据过大造成性能的影响)
 				mouldDownPacketMapper.deleteByPrimaryKey(packet.getId());
 			}
-			pExp.clear();
-			pExp.createCriteria().andEquipmentNoEqualTo(deviceNum).andPacketStrEqualTo("CLEAR_PROTOCOL");
-			List<MouldDownPacket> emptyPacketList = mouldDownPacketMapper.selectByExample(pExp);
-			if (emptyPacketList.size() > 0) {
-				MouldDownPacket packet = emptyPacketList.get(0);
-				if (packet.getIsUse() == 0) {
-					logger.info("开始下清空次数发数据包==>" + "#CLEAR_PROTOCOL");
-					logger.info("开始下清空次数转化为16进制==>" + strHexStr16("#CLEAR_PROTOCOL"));
-					sendMsg(strHexStr16("#CLEAR_PROTOCOL;"));
-					packet.setIsUse(1);
-					mouldDownPacketMapper.updateByPrimaryKey(packet);
-					logger.info("清空次数发送完毕==>");
-				}
-
-			}
+			
 			// 软件版本号25
 			String version = input.substring(25 * 2, 26 * 2);
 			System.out.println("软件版本号=" + version);
@@ -243,22 +239,6 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 			List<MouldHistory> newList = mouldHistoryMapper.selectByExample(mExp);
 			// 存入数据库
 			mouldHistoryMapper.insertSelective(item);
-			//发送清空次数和其他指定
-//			EquipmentSendCommandExample escExample = new EquipmentSendCommandExample();
-//			escExample.createCriteria().andEquipmentNoEqualTo(item.getEquipmentNo()).andIsSendEqualTo(0);
-//			List<EquipmentSendCommand> sendCommandLists = equipmentSendCommandMapper.selectByExample(escExample);
-//			if(sendCommandLists.size()>0){
-//				for (EquipmentSendCommand equipmentSendCommand : sendCommandLists) {
-//					if(equipmentSendCommand.getState().intValue() == 0){
-//						//清空指定
-//						sendMsg(strHexStr16("#CLEAR_PROTOCOL;"));
-//						equipmentSendCommand.setIsSend(1);
-//						equipmentSendCommand.setSendTime(new Date());
-//						equipmentSendCommandMapper.updateByPrimaryKeySelective(equipmentSendCommand);
-//					}
-//
-//				}
-//			}
 			// 模具开合记录
 			int cnt = item.getRunCnt();
 			int start = 69;
@@ -293,7 +273,7 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 					if (lastOpenTime == null) {
 						lastOpenTime = openTime;
 					}
-					if (openTime != null && openTime.after(lastOpenTime)) {
+					if (openTime != null && openTime.compareTo(lastOpenTime) > 0) {
 						lastOpenTime = openTime;
 					}
 					logger.info("第" + (pos + 1) + "包");
@@ -342,18 +322,15 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 			
 			handleModLogic(item, avgTime, thisOpenCounts, lastOpenTime);
 			// 判断预留字节的, 01-丢12包,02-丢50包
+//			if ("02".equals(mobilePart)) {
 			if ("01".equals(mobilePart) || "02".equals(mobilePart)) {
 				// 丢包数据已占满缓存,调用读取命令
-				String strHexStr16 = strHexStr16("#PRINTFALL;");
+//				String strHexStr16 = strHexStr16("#PRINTFALL;");
+				String strHexStr16 = getDownPackage(CMD_EEPROM, "00 00 00 00 00 01");
 				logger.info("丢包数据已占满缓存下发调用读取命令#PRINTFALL;==>" + strHexStr16);
 				sendMsg(strHexStr16);
 				return deviceNum;
 			}
-			// //临时下发周期矫正fa af 00 03 01 05 08 14 50 00 14 a6 22
-			// sendMsg("fa af 00 03 01 05 08 14 50 00 14 a6 22");
-			// logger.info("临时下发周期矫正==>" + "fa af 00 03 01 05 08 14 50 00 14 a6
-			// 22");
-			// 返回设备编号
 		}
 		return deviceNum;
 	}
@@ -380,13 +357,15 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 		}
 	}
 
-	public void sendPackage(String equipmentNo) {
+	//下发云模盒命令
+	private void sendPackage(String equipmentNo) {
 		if (equipmentNo.indexOf("FAAF") != -1) {
 			logger.info("非法云模盒编号,不作下发处理");
 			return;
 		}
+		//下发停用启用云模盒命令
 		MouldDownPacketExample exp = new MouldDownPacketExample();
-		exp.createCriteria().andEquipmentNoEqualTo(equipmentNo).andPacketStrNotEqualTo("CLEAR_PROTOCOL");
+		exp.createCriteria().andEquipmentNoEqualTo(equipmentNo);
 		List<MouldDownPacket> list = mouldDownPacketMapper.selectByExample(exp);
 		if (list.size() > 0) {
 			MouldDownPacket packet = list.get(0);
@@ -411,6 +390,62 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 			// 下发完删除数据
 			mouldDownPacketMapper.deleteByPrimaryKey(packet.getId());
 		}
+		
+		//发送清空次数和其他指定
+		EquipmentSendCommandExample escExample = new EquipmentSendCommandExample();
+		escExample.createCriteria().andEquipmentNoEqualTo(equipmentNo).andIsSendEqualTo(0);
+		List<EquipmentSendCommand> sendCommandLists = equipmentSendCommandMapper.selectByExample(escExample);
+		if(sendCommandLists.size()>0){
+			for (EquipmentSendCommand equipmentSendCommand : sendCommandLists) {
+				switch (equipmentSendCommand.getCmd()) {
+				case CMD_STATUS:
+					break;
+				case CMD_BUSY_PERIOD:
+					
+					break;
+				case CMD_IDLE_PERIOD:
+					
+					break;
+				case CMD_TIME_FIX:
+					
+					break;
+				case CMD_NO_2G:
+					
+					break;
+				case CMD_CLOSE_WTIME:
+					
+					break;
+				case CMD_OPEN_WTIME:
+					
+					break;
+				case CMD_EEPROM:
+					
+					break;
+				case CMD_WAITING_UPLOAD_TIME:
+					
+					break;
+				case CMD_COUNT:
+					sendMsg(getDownPackage(CMD_COUNT, "00 00 00 00 00 00"));
+					equipmentSendCommand.setIsSend(1);
+					equipmentSendCommand.setSendTime(new Date());
+					equipmentSendCommandMapper.updateByPrimaryKeySelective(equipmentSendCommand);
+					break;
+				case CMD_PURE_HEX:
+					String pack = equipmentSendCommand.getParam();
+					System.out.println("下发16进制手动指令=="+pack);
+					if (pack.contains(" ")) {
+						pack = pack.replaceAll(" ", "");
+					}
+					sendMsg(pack);
+					equipmentSendCommand.setIsSend(1);
+					equipmentSendCommand.setSendTime(new Date());
+					equipmentSendCommandMapper.updateByPrimaryKeySelective(equipmentSendCommand);
+					break;
+				}
+				
+
+			}
+		}
 	}
 
 	public void timeCalibration(String equipmentNo) {
@@ -422,22 +457,100 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 		List<TimeCalibrationRecord> count = timeCalibrationRecordMapper.selectCountByToday(equipmentNo);
 		// 今天未校准时间,下发时间校准,已经校准过了,则不再校准
 		if (count.size() == 0) {
-			Date date = new Date();
-			SimpleDateFormat sdf = new SimpleDateFormat("yy-MM-dd,HH:mm:ss");
-			String dateStr = sdf.format(date);
-			dateStr = "#TIME=" + dateStr + ";";
-			// #TIME=18-03-06,15:31:48;
-			logger.info("校准系统模块时间==>" + dateStr);
-			// 将字符串转成16进制字符串
-			String strHexStr16 = strHexStr16(dateStr);
-			logger.info("校准系统模块时间转成16进制的字符串==>" + strHexStr16);
-			sendMsg(strHexStr16);
+//			Date date = new Date();
+//			SimpleDateFormat sdf = new SimpleDateFormat("yy-MM-dd,HH:mm:ss");
+//			String dateStr = sdf.format(date);
+//			dateStr = "#TIME=" + dateStr + ";";
+//			// #TIME=18-03-06,15:31:48;
+//			logger.info("校准系统模块时间==>" + dateStr);
+//			// 将字符串转成16进制字符串
+//			String strHexStr16 = strHexStr16(dateStr);
+//			logger.info("校准系统模块时间转成16进制的字符串==>" + strHexStr16);
+			//新协议
+			String hexDate = getNowDateHex();
+			logger.info("校准系统模块时间转成16进制的字符串==>" + hexDate);
+			sendMsg(getDownPackage(CMD_TIME_FIX, hexDate));
 			TimeCalibrationRecord timeCalibrationRecord = new TimeCalibrationRecord();
 			timeCalibrationRecord.setIndate(new Date());
 			timeCalibrationRecord.setEquipmentNo(equipmentNo);
 			timeCalibrationRecordMapper.insertSelective(timeCalibrationRecord);
 		}
 	}
+	
+	//构建下行的命令
+	public static String getDownPackage(String hexCmd, String hexData) {
+		if (hexData.contains(" ")) {
+			hexData = hexData.replaceAll(" ", "");
+		}
+		hexData = hexData.toUpperCase();
+		byte[] b = getCRCByCmd(hexCmd, hexData);
+		String crc = getCRC(b).toUpperCase();
+		if (crc.length() < 4) {
+    		crc = "0" + crc;
+    	}
+		//低位在前转化
+		crc = crc.substring(2,4) +crc.substring(0,2);
+		
+		StringBuilder sb = new StringBuilder();
+		sb.append("FAAF0D00")
+		.append(hexCmd)
+		.append(hexData)
+		.append(crc);
+		
+		String str = sb.toString();
+		//中间加空格
+		StringBuilder mm = new StringBuilder();
+		for (int i=0;i<str.length(); i+=2) {
+			mm.append(str.substring(i, i+2));
+			if (i < str.length() -2) {
+				mm.append(" ");
+			}
+		}
+		System.out.println(mm.toString());
+		return mm.toString();
+	}
+	
+	public static byte[]  getCRCByCmd(String cmd, String hexData) {
+		byte[] crcByte = new byte[11];
+		crcByte[0]= (byte)Integer.parseInt("FA", 16);
+		crcByte[1]= (byte)Integer.parseInt("AF", 16);
+		crcByte[2]= (byte)Integer.parseInt("0D", 16);
+		crcByte[3]= (byte)Integer.parseInt("00", 16);
+		crcByte[4]= (byte)Integer.parseInt(cmd, 16);
+		crcByte[5] = (byte)Integer.parseInt(hexData.substring(0, 2), 16);;
+		crcByte[6] = (byte)Integer.parseInt(hexData.substring(2, 4), 16);;
+		crcByte[7] = (byte)Integer.parseInt(hexData.substring(4, 6), 16);;
+		crcByte[8] = (byte)Integer.parseInt(hexData.substring(6, 8), 16);;
+		crcByte[9] = (byte)Integer.parseInt(hexData.substring(8, 10), 16);;
+		crcByte[10] = (byte)Integer.parseInt(hexData.substring(10, 12), 16);;
+		return crcByte;
+	}
+	
+	/**
+     * 计算CRC16校验码
+     *
+     * @param bytes
+     * @return
+     */
+    public static String getCRC(byte[] bytes) {
+        int CRC = 0x0000ffff;
+        int POLYNOMIAL = 0x0000a001;
+
+        int i, j;
+        for (i = 0; i < bytes.length; i++) {
+            CRC ^= ((int) bytes[i] & 0x000000ff);
+            for (j = 0; j < 8; j++) {
+                if ((CRC & 0x00000001) != 0) {
+                    CRC >>= 1;
+                    CRC ^= POLYNOMIAL;
+                } else {
+                    CRC >>= 1;
+                }
+            }
+        }
+        return Integer.toHexString(CRC);
+    }
+    
 
 	private void handleModLogic(MouldHistory item, int avgTime, Integer thisOpenCount, Date lastOpenTime) {
 		logger.info("进了handleModLogic逻辑--");
@@ -679,84 +792,6 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 		ctx.writeAndFlush(bf);
 		// ctx.close();
 	}
-	//检查是否丢包,并插入丢包数据
-	/**
-	 * @param equipmentNo 云模合编号
-	 * @param loseCount 丢包数量
-	 * @param firstMouldHistoryTime 本次的第一条开合数据
-	 * @param lastEndMouldHistoryTime 上一包最后一条开合数据
-	 * @param pool 线程池
-	 */
-
-//	public void examineTask(String equipmentNo,int loseCount,MouldHistoryTime firstMouldHistoryTime,MouldHistoryTime lastEndMouldHistoryTime,ScheduledExecutorService pool){
-//		pool.schedule(new Runnable() {
-//			@Override
-//			public void run() {
-//				SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd,HH:mm:ss");
-//				logger.info("定时补充数据任务开始了,时间:"+sdf.format(new Date()));
-//				MouldHistoryTimeExample mhtExp = new MouldHistoryTimeExample();
-//				mhtExp.createCriteria().andOpenTimeGreaterThan(lastEndMouldHistoryTime.getOpenTime()).andOpenTimeLessThan(firstMouldHistoryTime.getOpenTime());
-//				long count = mouldHistoryTimeMapper.countByExample(mhtExp);
-//				logger.info(sdf.format(lastEndMouldHistoryTime.getOpenTime())+"--"+sdf.format(firstMouldHistoryTime.getOpenTime())+"时间段内丢包时间段上来了"+count+"条数据");
-//				if(count==loseCount){
-//					return;
-//				}else{
-//					TbMouldEquipmentExample tExp = new TbMouldEquipmentExample();
-//					tExp.createCriteria().andEquipmentNoEqualTo(equipmentNo);
-//					List<TbMouldEquipment> equipments = tbMouldEquipmentMapper.selectByExample(tExp);
-//					if(equipments.size()>0){
-//						TbMouldExample tmExp = new TbMouldExample();
-//						tmExp.createCriteria().andEquipmentIdEqualTo(equipments.get(0).getId());
-//						List<TbMould> moulds = tbMouldMapper.selectByExample(tmExp);
-//						MouldHistoryTime newMouldHistoryTime = new MouldHistoryTime();
-//						if(moulds.size()>0){
-//							//平均开合周期
-//							int OcCycle = (int)moulds.get(0).getOcCycle().doubleValue()*1000;
-//							long addPacketCount = loseCount-count;
-//							logger.info("补包数->"+addPacketCount);
-//							long openTime = 0L;
-//							long closeTime = 0L;
-//							if(addPacketCount<loseCount){
-//								mhtExp.clear();
-//								mhtExp.setOrderByClause("open_time desc limit 1");
-//								mhtExp.createCriteria().andOpenTimeGreaterThanOrEqualTo(lastEndMouldHistoryTime.getOpenTime()).andOpenTimeLessThan(firstMouldHistoryTime.getOpenTime());
-//								List<MouldHistoryTime> newMouldHistoryTimes = mouldHistoryTimeMapper.selectByExample(mhtExp);
-//								newMouldHistoryTime = newMouldHistoryTimes.get(0);
-//								openTime = newMouldHistoryTime.getOpenTime().getTime();
-//								closeTime = newMouldHistoryTime.getCloseTime().getTime();
-//							}else{
-//								newMouldHistoryTime = lastEndMouldHistoryTime;
-//								openTime = newMouldHistoryTime.getOpenTime().getTime();
-//								closeTime = newMouldHistoryTime.getCloseTime().getTime();
-//							}
-//							for(int i=0;i<addPacketCount;i++){
-//								MouldHistoryTime m = new MouldHistoryTime();
-//								m.setCloseTime(new Date(closeTime+OcCycle));
-//								m.setOpenTime(new Date(openTime+OcCycle));
-//								m.setIsTrue(1);
-//								m.setEquipmentNo(equipmentNo);
-//								m.setHistoryId(newMouldHistoryTime.getHistoryId());
-//								m.setSeq(i+1);
-//								m.setTimeCost(OcCycle);
-//								mouldHistoryTimeMapper.insertSelective(m);
-//								openTime = m.getOpenTime().getTime();
-//								closeTime = m.getCloseTime().getTime();
-//								if(i==addPacketCount-1){
-//									MouldHistoryTime mouldHistoryTime = firstMouldHistoryTime;
-//									mouldHistoryTime.setTimeCost((int) (mouldHistoryTime.getOpenTime().getTime() - m.getOpenTime().getTime()));
-//									MouldHistoryTimeExample exp = new MouldHistoryTimeExample();
-//									exp.createCriteria().andHistoryIdEqualTo(mouldHistoryTime.getHistoryId()).andOpenTimeEqualTo(mouldHistoryTime.getOpenTime()).andEquipmentNoEqualTo(mouldHistoryTime.getEquipmentNo());
-//									mouldHistoryTimeMapper.updateByExampleSelective(mouldHistoryTime, exp);
-//								}
-//							}
-//						}
-//					}
-//				}
-//			}
-//		}, 2, TimeUnit.HOURS);
-//
-//	}
-
 	/**
 	 * channel被激活时调用
 	 */
@@ -966,6 +1001,28 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 		// }
 		// System.out.println("while執行完了");
 		// System.out.println(strList);
-		System.out.println(strHexStr16("#CLEAR_PROTOCOL"));
+		String str = getDownPackage("02", "00 00 00 00 00 1e");
+		System.out.println(str);
+	}
+	
+	private String getNowDateHex() {
+		LocalDateTime now = LocalDateTime.now();
+		
+		int yearBit = now.getYear()%100;
+		String yearHex = fillZeroLeft(Integer.toHexString(yearBit));
+		String monthHex = fillZeroLeft(Integer.toHexString(now.getMonthValue()));
+		String dayHex = fillZeroLeft(Integer.toHexString(now.getDayOfMonth()));
+		String hourHex = fillZeroLeft(Integer.toHexString(now.getHour()));
+		String minHex = fillZeroLeft(Integer.toHexString(now.getMinute()));
+		String secHex = fillZeroLeft(Integer.toHexString(now.getSecond()));
+		
+		return yearHex + monthHex + dayHex + hourHex + minHex + secHex;
+	}
+	
+	private static String fillZeroLeft(String str) {
+		if (str.length() == 1) {
+			str = "0" + str;
+		}
+		return str;
 	}
 }

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

@@ -1,9 +1,9 @@
 classPath=D:/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://localhost:3306/cloud_model?autoReconnect=true&rewriteBatchedStatements=TRUE&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF-8
+url=jdbc:mysql://47.100.37.243:7644/cloud_mould?autoReconnect=true&rewriteBatchedStatements=TRUE&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF-8
 username=root
-password=102345..
+password=Ziyu1026!@
 maxActive=255
 maxIdle=20
 maxWait=100

+ 7 - 2
ys_int/src/i18n/lang/en.js

@@ -374,7 +374,8 @@ const lang = {
         proAddress: "Producer Address",
         inputProAddress: "Please enter the producer address",
         delPro: "Are you sure to delete the producer?",
-        // 云模盒管理
+		// 云模盒管理
+		targetModelName: "Target Model",
         clearData: "Clear Data",
         isClearData: "Whether to clear data?",
 		addYM: "Add Equipment",
@@ -420,7 +421,11 @@ const lang = {
         inputfreeInterval: "Please enter freeInterval",
         inputthreshold: "Please enter Sensor Threshold",
         inputthresholdNum: "Sensor Threshold is a number",
-        inputthresholdBhind: "Sensor Threshold is 20 ~ 200",
+		inputthresholdBhind: "Sensor Threshold is 20 ~ 200",
+		cmdName: "Send Command",
+		noCmdAlert:"Please choose command",
+		noThresholdAlert :"Please input threshold",
+		sendCmdConfirm :"Are you sure you want to send this command?",
     },
     // 后台翻译
     port: {

+ 10 - 4
ys_int/src/i18n/lang/zh.js

@@ -375,7 +375,8 @@ const lang = {
         proAddress: "生产方地址",
         inputProAddress: "请输入生产方地址",
         delPro: "确认删除该生产方吗?",
-        // 云模盒管理
+		// 云模盒管理
+		targetModelName: "目标云模盒",
         clearData: "清除数据",
         isClearData: "是否清除数据?",
 		addYM: "新建云模盒",
@@ -416,12 +417,17 @@ const lang = {
         toWait: "操作成功,请等待数据传输",
         workInterval: "工作状态上报间隔",
         freeInterval: "空闲状态上报间隔",
-        threshold: "传感器阈值",
+        threshold: "参数",
         inputworkInterval: "请输入工作状态上报间隔",
         inputfreeInterval: "请输入空闲状态上报间隔",
-        inputthreshold: "请输入传感器阈值",
+        inputthreshold: "请输入参数",
         inputthresholdNum: "传感器阈值为数字",
-        inputthresholdBhind: "传感器阈值为20~200",
+		inputthresholdBhind: "传感器阈值为20~200",
+		cmdName: "下发命令",
+		noCmdAlert:"请选择下发命令",
+		noThresholdAlert :"请输入阈值",
+		sendCmdConfirm :"您确定要下发吗?",
+
     },
     ...locale
 }

+ 123 - 122
ys_int/src/port.js

@@ -1,123 +1,124 @@
-export default {
-    manage: {
-        login: '/user/login', // 登录
-    },
-    //消息提示相关
-    notice: {
-        list: '/vnoticeuser/list',  // 消息列表
-        read: '/vnoticeuser/read'  // 消息读取
-    },
-    pwd: {
-        resetPwd: '/user/updatePassword' // 重置密码
-    },
-    map: { 
-        mapList: '/company/getCoutomCompanyAndMouldsByUser', // 生产方公司和公司下所属的模具
-        newMap: '/mould/listMap' // 获取地图
-    },
-    project: {
-        addUser: '/user/add',  // 添加或修改用户
-        userList: '/user/list',  // 用户列表
-        delUser: '/user/delete',  // 删除用户
-
-        addProject: '/project/add', // 添加或修改项目
-        projectList: '/project/list', // 项目列表
-        invalidProject: '/project/setProjectDelete', //项目失效
-        projectDetail: '/project/detail', // 项目详情
-        projects: '/project/projectList', // 筛选模具列表时作为筛选条件所加载的项目列表
-        projectByUser: '/project/getProjectListByUserAndCompany',// 获取创建人员分配项目时根据当前人和公司获取项目列表
-
-        uploadFile: '/projectfile/uploadFile', //项目文档的上传
-        dowloadFile: '/projectfile/dowloadFile', //项目文档的下载
-        fileList: '/projectfile/list', //项目文档列表
-        delFile: '/projectfile/delFile', //项目文档的删除
-        operList: '/projectoperationdynamics/list', //项目操作记录列表
-
-        getUserList: '/user/getUserList', //获取用户列表
-        getUserById: '/user/getUserListByCompanyIds', // 给项目分配参与人的时候根据公司id获取公司下的人员
-
-        inviteUser: '/invitationrecord/inviteUser', //添加邀请记录并产生链接
-
-        powerList: '/power/list', // 权限列表
-        powerUpdate: '/power/update', //修改权限
-    },
-    //模具
-    mold: {
-        addMold: '/mould/addOrUpdate', //添加/修改模具设备
-        molds: '/mould/list', //模具列表
-        modelList: '/mould/modelList', //给项目分配模具获取该公司下的模具列表
-        delMold: '/mould/delMould', //删除模具
-
-        changeIp: '/mouldequipment/changeIp',//切换IP
-
-        moldDetail: '/mould/detail', //模具详情
-        moldFileList: '/mouldfile/list', //获取模具文档
-        moldFileListAll: '/mouldfile/allList', //获取全部模具文档
-        moldFileUpload: '/mouldfile/uploadFile', //上传模具文档
-        moldFileDowload: '/mouldfile/dowloadFile', //模具文档的下载
-        moldFileDowloadList: '/mouldfile/fileList', //获取模具文档下载列表
-
-        moldFileDowloadFile: '/mouldfile/downloadfileList', //批量下载
-        moldFileCheck: '/mouldfile/check', //审批模具文档 
-        exportOperationExcel: '/mouldfile/downloadFileListExcel', //下载操作记录
-
-        chooseModelList: '/mould/chooseModelList', //编辑项目时显示的模具列表
-
-        moldFileDelete: '/mouldfile/delFile', //项目文档的删除
-        moldOperationList: '/mouldoperationdynamics/list', //项目操作记录列表
-
-        partList: '/part/list', //零件列表
-        addPart: '/part/addOrUpdate', //单个零件添加
-        importPart: '/part/importAppLogin',//零件的excel导入
-        partUpload: '/mouldfile/uploadPartFileList', //零件文档的批量上传
-
-        download: '/mouldfile/download',
-
-        moldMaintain: '/mouldmaintain/maintain', //维护
-        moldMaintainList: '/mouldmaintain/list', //获取列表
-        moldMaintainListGet: '/mould/maintainMouldList', //主页获取保养模具列表
-        moldDiscardListGet: '/mould/scrapMouldList', //主页获取报废模具列表
-        moldChange: '/mould/changeMouldEquipment', //处理告警
-        moldChangeRequirement: '/mouldequipment/getEquipmentListByOldMouldAndUser' //处理告警所需的设备
-    },
-    //基础管理
-    base: {
-        addCompany: '/company/add', // 添加资产方
-        companyList: '/company/list', // 资产方列表
-        delCompany: '/company/delete', // 删除资产方
-
-        getCompanyList: '/company/getCompanyList', // 管理员创建人员时显示公司
-        
-        getCompanys: '/company/getCompanys', // 云模盒所属公司
-
-        addCompanyListToProject: '/company/addCompanyListToProject', // 编辑项目时获取生产方公司
-
-        relationList: '/company/relationList', // 获取关联公司列表
-
-        //ownerComps: '/company/ownerRelateCompany', // 返回当前公司的关联公司列表
-
-        getProduceCompany: '/company/getProduceCompany', // 根据项目id获取生产方列表
-        
-        getInfo: '/company/getProduceCompanyByCurrentUser', // 根据当前人登录人所能看到的公司进行筛选
-
-        addFactory: '/factory/add',  // 添加生产方
-        factoryList: '/factory/list',   // 生产方列表
-        delFactory: '/factory/delete',  // 删除生产方
-
-        editMould: '/mouldequipment/addOrUpdate', // 添加 / 修改云模盒
-        mouldeList: '/mouldequipment/getEquipmentList', // 云模盒列表
-        enableMould: '/mouldequipment/use', // 启用云模盒
-
-        moulds: '/mouldequipment/getMouldEquipmentList', // 创建模具时获取资产方的云模盒列表
-        importMouldEquipmentExcel: '/mouldequipment/importMouldEquipmentExcel', //批量导入云模盒
-        
-        setPacket: '/mouldequipment/use',// 云平台下行配置数据包接口
-        openingAndClosingTimesChart: '/mouldhistory/openingAndClosingTimesChart', //获取云模盒的每日开合次数图表 (时间/次数)
-        openingAndClosingTimesChartCycle: '/mouldhistory/openingAndClosingTimesChartCycle', //获取云模盒的每日开合次数周期 (时间/次数)
-        exportExcel: '/mouldhistory/exportExcel', // 导出excel
-
-        clearData: '/mould-down-packet/sendCommand',       //清除数据
-    },
-    file: {
-        view: '/pdffile/getPdfFile' // 文件预览
-    }
+export default {
+    manage: {
+        login: '/user/login', // 登录
+    },
+    //消息提示相关
+    notice: {
+        list: '/vnoticeuser/list',  // 消息列表
+        read: '/vnoticeuser/read'  // 消息读取
+    },
+    pwd: {
+        resetPwd: '/user/updatePassword' // 重置密码
+    },
+    map: { 
+        mapList: '/company/getCoutomCompanyAndMouldsByUser', // 生产方公司和公司下所属的模具
+        newMap: '/mould/listMap' // 获取地图
+    },
+    project: {
+        addUser: '/user/add',  // 添加或修改用户
+        userList: '/user/list',  // 用户列表
+        delUser: '/user/delete',  // 删除用户
+
+        addProject: '/project/add', // 添加或修改项目
+        projectList: '/project/list', // 项目列表
+        invalidProject: '/project/setProjectDelete', //项目失效
+        projectDetail: '/project/detail', // 项目详情
+        projects: '/project/projectList', // 筛选模具列表时作为筛选条件所加载的项目列表
+        projectByUser: '/project/getProjectListByUserAndCompany',// 获取创建人员分配项目时根据当前人和公司获取项目列表
+
+        uploadFile: '/projectfile/uploadFile', //项目文档的上传
+        dowloadFile: '/projectfile/dowloadFile', //项目文档的下载
+        fileList: '/projectfile/list', //项目文档列表
+        delFile: '/projectfile/delFile', //项目文档的删除
+        operList: '/projectoperationdynamics/list', //项目操作记录列表
+
+        getUserList: '/user/getUserList', //获取用户列表
+        getUserById: '/user/getUserListByCompanyIds', // 给项目分配参与人的时候根据公司id获取公司下的人员
+
+        inviteUser: '/invitationrecord/inviteUser', //添加邀请记录并产生链接
+
+        powerList: '/power/list', // 权限列表
+        powerUpdate: '/power/update', //修改权限
+    },
+    //模具
+    mold: {
+        addMold: '/mould/addOrUpdate', //添加/修改模具设备
+        molds: '/mould/list', //模具列表
+        modelList: '/mould/modelList', //给项目分配模具获取该公司下的模具列表
+        delMold: '/mould/delMould', //删除模具
+
+        changeIp: '/mouldequipment/changeIp',//切换IP
+
+        moldDetail: '/mould/detail', //模具详情
+        moldFileList: '/mouldfile/list', //获取模具文档
+        moldFileListAll: '/mouldfile/allList', //获取全部模具文档
+        moldFileUpload: '/mouldfile/uploadFile', //上传模具文档
+        moldFileDowload: '/mouldfile/dowloadFile', //模具文档的下载
+        moldFileDowloadList: '/mouldfile/fileList', //获取模具文档下载列表
+
+        moldFileDowloadFile: '/mouldfile/downloadfileList', //批量下载
+        moldFileCheck: '/mouldfile/check', //审批模具文档 
+        exportOperationExcel: '/mouldfile/downloadFileListExcel', //下载操作记录
+
+        chooseModelList: '/mould/chooseModelList', //编辑项目时显示的模具列表
+
+        moldFileDelete: '/mouldfile/delFile', //项目文档的删除
+        moldOperationList: '/mouldoperationdynamics/list', //项目操作记录列表
+
+        partList: '/part/list', //零件列表
+        addPart: '/part/addOrUpdate', //单个零件添加
+        importPart: '/part/importAppLogin',//零件的excel导入
+        partUpload: '/mouldfile/uploadPartFileList', //零件文档的批量上传
+
+        download: '/mouldfile/download',
+
+        moldMaintain: '/mouldmaintain/maintain', //维护
+        moldMaintainList: '/mouldmaintain/list', //获取列表
+        moldMaintainListGet: '/mould/maintainMouldList', //主页获取保养模具列表
+        moldDiscardListGet: '/mould/scrapMouldList', //主页获取报废模具列表
+        moldChange: '/mould/changeMouldEquipment', //处理告警
+        moldChangeRequirement: '/mouldequipment/getEquipmentListByOldMouldAndUser' //处理告警所需的设备
+    },
+    //基础管理
+    base: {
+        addCompany: '/company/add', // 添加资产方
+        companyList: '/company/list', // 资产方列表
+        delCompany: '/company/delete', // 删除资产方
+
+        getCompanyList: '/company/getCompanyList', // 管理员创建人员时显示公司
+        
+        getCompanys: '/company/getCompanys', // 云模盒所属公司
+
+        addCompanyListToProject: '/company/addCompanyListToProject', // 编辑项目时获取生产方公司
+
+        relationList: '/company/relationList', // 获取关联公司列表
+
+        //ownerComps: '/company/ownerRelateCompany', // 返回当前公司的关联公司列表
+
+        getProduceCompany: '/company/getProduceCompany', // 根据项目id获取生产方列表
+        
+        getInfo: '/company/getProduceCompanyByCurrentUser', // 根据当前人登录人所能看到的公司进行筛选
+
+        addFactory: '/factory/add',  // 添加生产方
+        factoryList: '/factory/list',   // 生产方列表
+        delFactory: '/factory/delete',  // 删除生产方
+
+        editMould: '/mouldequipment/addOrUpdate', // 添加 / 修改云模盒
+        mouldeList: '/mouldequipment/getEquipmentList', // 云模盒列表
+        enableMould: '/mouldequipment/use', // 启用云模盒
+
+        moulds: '/mouldequipment/getMouldEquipmentList', // 创建模具时获取资产方的云模盒列表
+        importMouldEquipmentExcel: '/mouldequipment/importMouldEquipmentExcel', //批量导入云模盒
+        
+        setPacket: '/mouldequipment/use',// 云平台下行配置数据包接口
+        sendCmd: '/mould-down-packet/sendCommand',// 云平台下行命令
+        openingAndClosingTimesChart: '/mouldhistory/openingAndClosingTimesChart', //获取云模盒的每日开合次数图表 (时间/次数)
+        openingAndClosingTimesChartCycle: '/mouldhistory/openingAndClosingTimesChartCycle', //获取云模盒的每日开合次数周期 (时间/次数)
+        exportExcel: '/mouldhistory/exportExcel', // 导出excel
+
+        clearData: '/mould-down-packet/sendCommand',       //清除数据
+    },
+    file: {
+        view: '/pdffile/getPdfFile' // 文件预览
+    }
 }

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 873 - 780
ys_int/src/views/base/allocation.vue