Ver Fonte

增加下发指令反馈显示

seyason há 4 anos atrás
pai
commit
d4ef7ae0ee
87 ficheiros alterados com 4809 adições e 620 exclusões
  1. 85 4
      .idea/yunsu.iml
  2. 1 0
      cloud-model/src/main/java/com/hssx/cloudmodel/constant/Constant.java
  3. 11 1
      cloud-model/src/main/java/com/hssx/cloudmodel/controller/CompanyController.java
  4. 47 0
      cloud-model/src/main/java/com/hssx/cloudmodel/controller/EquipmentRecCommandController.java
  5. 133 16
      cloud-model/src/main/java/com/hssx/cloudmodel/controller/MouldController.java
  6. 1 1
      cloud-model/src/main/java/com/hssx/cloudmodel/controller/MouldEquipmentController.java
  7. 9 0
      cloud-model/src/main/java/com/hssx/cloudmodel/controller/MouldFileController.java
  8. 3 3
      cloud-model/src/main/java/com/hssx/cloudmodel/controller/MouldHistoryController.java
  9. 11 3
      cloud-model/src/main/java/com/hssx/cloudmodel/controller/ProjectFileController.java
  10. 25 0
      cloud-model/src/main/java/com/hssx/cloudmodel/controller/UserController.java
  11. 92 2
      cloud-model/src/main/java/com/hssx/cloudmodel/entity/Company.java
  12. 110 0
      cloud-model/src/main/java/com/hssx/cloudmodel/entity/EquipmentRecCommand.java
  13. 65 4
      cloud-model/src/main/java/com/hssx/cloudmodel/entity/Mould.java
  14. 33 3
      cloud-model/src/main/java/com/hssx/cloudmodel/entity/MouldEquipment.java
  15. 17 5
      cloud-model/src/main/java/com/hssx/cloudmodel/entity/ProjectFile.java
  16. 17 0
      cloud-model/src/main/java/com/hssx/cloudmodel/entity/vo/MapItemVO.java
  17. 2 0
      cloud-model/src/main/java/com/hssx/cloudmodel/entity/vo/MouldHistoryVO.java
  18. 7 0
      cloud-model/src/main/java/com/hssx/cloudmodel/entity/vo/MouldVO.java
  19. 2 0
      cloud-model/src/main/java/com/hssx/cloudmodel/mapper/CompanyMapper.java
  20. 16 0
      cloud-model/src/main/java/com/hssx/cloudmodel/mapper/EquipmentRecCommandMapper.java
  21. 2 0
      cloud-model/src/main/java/com/hssx/cloudmodel/mapper/MouldEquipmentMapper.java
  22. 6 1
      cloud-model/src/main/java/com/hssx/cloudmodel/mapper/MouldHistoryTimeMapper.java
  23. 2 2
      cloud-model/src/main/java/com/hssx/cloudmodel/service/CompanyService.java
  24. 16 0
      cloud-model/src/main/java/com/hssx/cloudmodel/service/EquipmentRecCommandService.java
  25. 2 0
      cloud-model/src/main/java/com/hssx/cloudmodel/service/MouldFileService.java
  26. 1 1
      cloud-model/src/main/java/com/hssx/cloudmodel/service/MouldHistoryService.java
  27. 8 0
      cloud-model/src/main/java/com/hssx/cloudmodel/service/MouldService.java
  28. 3 1
      cloud-model/src/main/java/com/hssx/cloudmodel/service/ProjectFileService.java
  29. 6 0
      cloud-model/src/main/java/com/hssx/cloudmodel/service/UserService.java
  30. 7 16
      cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/CompanyServiceImpl.java
  31. 20 0
      cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/EquipmentRecCommandServiceImpl.java
  32. 34 4
      cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldEquipmentServiceImpl.java
  33. 67 60
      cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldFileServiceImpl.java
  34. 135 81
      cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldHistoryServiceImpl.java
  35. 97 0
      cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldServiceImpl.java
  36. 92 17
      cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/ProjectFileServiceImpl.java
  37. 9 1
      cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/ProjectServiceImpl.java
  38. 108 1
      cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/UserServiceImpl.java
  39. 2 2
      cloud-model/src/main/java/com/hssx/cloudmodel/util/CodeGenerator.java
  40. 19 0
      cloud-model/src/main/java/com/hssx/cloudmodel/util/ListUtil.java
  41. 12 0
      cloud-model/src/main/java/com/hssx/cloudmodel/util/OpenOfficeService.java
  42. 5 2
      cloud-model/src/main/java/com/hssx/cloudmodel/util/QcloudUntil.java
  43. 51 21
      cloud-model/src/main/resources/mapper/CompanyMapper.xml
  44. 19 0
      cloud-model/src/main/resources/mapper/EquipmentRecCommandMapper.xml
  45. 19 4
      cloud-model/src/main/resources/mapper/MouldEquipmentMapper.xml
  46. 18 1
      cloud-model/src/main/resources/mapper/MouldHistoryTimeMapper.xml
  47. 23 8
      cloud-model/src/main/resources/mapper/MouldMapper.xml
  48. 2 1
      cloud-model/src/main/resources/mapper/ProjectFileMapper.xml
  49. 1 1
      cloud-socket/src/com/js/kbt/UserTempGenConfig.xml
  50. 77 0
      cloud-socket/src/com/js/kbt/mapper/EquipmentRecCommandMapper.java
  51. 286 0
      cloud-socket/src/com/js/kbt/mapper/EquipmentRecCommandMapper.xml
  52. 11 11
      cloud-socket/src/com/js/kbt/mapper/EquipmentSendCommandMapper.java
  53. 15 15
      cloud-socket/src/com/js/kbt/mapper/EquipmentSendCommandMapper.xml
  54. 11 11
      cloud-socket/src/com/js/kbt/mapper/TbMouldEquipmentMapper.java
  55. 37 20
      cloud-socket/src/com/js/kbt/mapper/TbMouldEquipmentMapper.xml
  56. 122 0
      cloud-socket/src/com/js/kbt/model/EquipmentRecCommand.java
  57. 592 0
      cloud-socket/src/com/js/kbt/model/EquipmentRecCommandExample.java
  58. 24 24
      cloud-socket/src/com/js/kbt/model/EquipmentSendCommand.java
  59. 16 16
      cloud-socket/src/com/js/kbt/model/EquipmentSendCommandExample.java
  60. 77 54
      cloud-socket/src/com/js/kbt/model/TbMouldEquipment.java
  61. 76 16
      cloud-socket/src/com/js/kbt/model/TbMouldEquipmentExample.java
  62. 112 37
      cloud-socket/src/com/js/kbt/socket/UserHandler.java
  63. 21 0
      src/main/java/com/hssx/cloudmodel/controller/TbMouldController.java
  64. 469 0
      src/main/java/com/hssx/cloudmodel/entity/TbMould.java
  65. 16 0
      src/main/java/com/hssx/cloudmodel/mapper/TbMouldMapper.java
  66. 16 0
      src/main/java/com/hssx/cloudmodel/service/TbMouldService.java
  67. 20 0
      src/main/java/com/hssx/cloudmodel/service/impl/TbMouldServiceImpl.java
  68. 43 0
      src/main/resources/mapper/TbMouldMapper.xml
  69. 1 1
      website/src/main/resources/application-prod.properties
  70. BIN
      ys_int/src/assets/image/qrCode.jpg
  71. 25 7
      ys_int/src/i18n/lang/en.js
  72. 27 9
      ys_int/src/i18n/lang/zh.js
  73. 11 4
      ys_int/src/port.js
  74. 5 0
      ys_int/src/routes.js
  75. 32 14
      ys_int/src/views/Home.vue
  76. 3 0
      ys_int/src/views/Login.vue
  77. 41 1
      ys_int/src/views/base/allocation.vue
  78. 117 9
      ys_int/src/views/base/factory.vue
  79. 227 0
      ys_int/src/views/base/factoryDetail.vue
  80. 80 16
      ys_int/src/views/detection/maintenance.vue
  81. 70 17
      ys_int/src/views/map/map.vue
  82. 16 10
      ys_int/src/views/message.vue
  83. 222 20
      ys_int/src/views/mold/moldDetail.vue
  84. 32 23
      ys_int/src/views/mold/moldList.vue
  85. 60 15
      ys_int/src/views/project/projectDetail.vue
  86. 21 3
      ys_int/src/views/project/staff.vue
  87. 305 0
      ys_int/src/views/project/staffDetail.vue

+ 85 - 4
.idea/yunsu.iml

@@ -1,9 +1,90 @@
 <?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$" />
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="web" name="Web">
+      <configuration>
+        <descriptors>
+          <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/cloud-socket/WebContent/WEB-INF/web.xml" />
+        </descriptors>
+        <webroots>
+          <root url="file://$MODULE_DIR$/cloud-socket/WebContent" relative="/" />
+        </webroots>
+      </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$">
+      <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>
 </module>

+ 1 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/constant/Constant.java

@@ -30,6 +30,7 @@ public class Constant {
     public static final Integer MAINTAIN_TYPE = 1;//保养类型
     public static final Integer APPROVEL_TYPE = 0;//审批类型
     public static final Integer EMERGENCY_TYPE = 2;//告警类型
+
     public static final Integer APPROVAL_AUTHORITY = 3;//审批权限
     public static final String WARNING_NOTICE_TEMPLATE_ID = "-EpBbqgMN2cCBf6pUSlFXGNlstkeCidVEejTOhrGcy4";//告警通知模板id
     public static final String MAINTAIN_NOTICE_TEMPLATE_ID = "VcU9E2f3Nn4uR6S1z57VBaLeBAhEO4vfivo3Tug_BKE";//保养通知模板id

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

@@ -78,13 +78,23 @@ public class CompanyController {
     @ApiOperation("公司列表")
     @RequestMapping("/list")
     @ResponseBody
-    public HttpRespMsg deleteRole(@RequestParam(required = false)String keyName, HttpServletRequest request,
+    public HttpRespMsg list(@RequestParam(required = false)String keyName, HttpServletRequest request,
                                   HttpServletResponse response, PageUtil page,@RequestParam(required = false)Integer companyType) {
         HttpRespMsg msg = new HttpRespMsg();
         System.out.println("====>"+companyType);
         msg = companyService.pageList(page,keyName,companyType);
         return msg;
     }
+
+
+    @ApiOperation("公司详情")
+    @RequestMapping("/detail")
+    @ResponseBody
+    public HttpRespMsg detail(@RequestParam Integer id) {
+        HttpRespMsg msg = new HttpRespMsg();
+        msg = companyService.detail(id);
+        return msg;
+    }
     /**
      * 建立关联公司时的公司列表
      * 参数:companyType 公司类型 0-资产方 1-生产方

+ 47 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/controller/EquipmentRecCommandController.java

@@ -0,0 +1,47 @@
+package com.hssx.cloudmodel.controller;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.hssx.cloudmodel.entity.EquipmentRecCommand;
+import com.hssx.cloudmodel.entity.MouldEquipment;
+import com.hssx.cloudmodel.service.EquipmentRecCommandService;
+import com.hssx.cloudmodel.service.MouldEquipmentService;
+import com.hssx.cloudmodel.util.HttpRespMsg;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author seya
+ * @since 2020-08-01
+ */
+@RestController
+@RequestMapping("/equipment-rec-command")
+public class EquipmentRecCommandController {
+
+    @Resource
+    EquipmentRecCommandService equipmentRecCommandService;
+
+    @Resource
+    MouldEquipmentService mouldEquipmentService;
+
+    @RequestMapping("/getList")
+    public HttpRespMsg getList(String equipmentNo) {
+        QueryWrapper<EquipmentRecCommand> queryWrapper = new QueryWrapper<EquipmentRecCommand>();
+        queryWrapper.orderByDesc("indate");
+        HttpRespMsg msg = new HttpRespMsg();
+        msg.data = equipmentRecCommandService.list(queryWrapper);
+        //新反馈重置为0
+        MouldEquipment record = new MouldEquipment();
+        record.setHasNewMessage(0);
+        mouldEquipmentService.update(record, new QueryWrapper<MouldEquipment>().eq("equipment_no", equipmentNo));
+        return msg;
+    }
+}
+

+ 133 - 16
cloud-model/src/main/java/com/hssx/cloudmodel/controller/MouldController.java

@@ -2,14 +2,11 @@ package com.hssx.cloudmodel.controller;
 
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.hssx.cloudmodel.entity.InjectionMolding;
-import com.hssx.cloudmodel.entity.Mould;
-import com.hssx.cloudmodel.entity.User;
+import com.hssx.cloudmodel.entity.*;
+import com.hssx.cloudmodel.entity.vo.MapItemVO;
 import com.hssx.cloudmodel.entity.vo.MouldVO;
 import com.hssx.cloudmodel.entity.vo.UserVO;
-import com.hssx.cloudmodel.service.MouldService;
-import com.hssx.cloudmodel.service.ProjectService;
-import com.hssx.cloudmodel.service.UserService;
+import com.hssx.cloudmodel.service.*;
 import com.hssx.cloudmodel.util.HttpRespMsg;
 import com.hssx.cloudmodel.util.PageUtil;
 import io.swagger.annotations.ApiOperation;
@@ -22,6 +19,11 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
 /**
  * @author 吴涛涛
  * @since 2019-07-30
@@ -36,6 +38,10 @@ public class MouldController {
     private UserService userService;
     @Autowired
     private ProjectService projectService;
+    @Autowired
+    private CompanyService companyService;
+    @Autowired
+    private LngLatCompanyService lngLatCompanyService;
     /**
      * 添加/修改模具设备
      * 添加参数:equipmentId 设备id, modelNo 模具编号 ,modelName 模具名称 ,maintainCount 保养设定次数:"1,2,3"
@@ -74,6 +80,15 @@ public class MouldController {
         return msg;
     }
 
+    @ApiOperation("更改生产方")
+    @RequestMapping("/changeProducer")
+    @ResponseBody
+    public HttpRespMsg changeProducer(int id, int produceCompanyId) {
+        HttpRespMsg msg = new HttpRespMsg();
+        msg = mouldService.changeProducer(id, produceCompanyId);
+        return msg;
+    }
+
     /**
      * 给项目分配模具获取该公司下的模具列表
      * parentId 当前人parentId ,id当前人id
@@ -221,16 +236,118 @@ public class MouldController {
         return msg;
     }
 
-//    /**
-//     * 本地E盘文件上传到腾讯云
-//     * @return
-//     */
-//    @ApiOperation("本地E盘文件上传到腾讯云")
-//    @RequestMapping("/listMap")
-//    @ResponseBody
-//    public HttpRespMsg uploadQcloud(UserVO userVO, String token) {
-//        HttpRespMsg msg = new HttpRespMsg();
-//    }
+
+
+    @ApiOperation("模具地图概览")
+    @RequestMapping("/listMap2")
+    @ResponseBody
+    public HttpRespMsg listMap2(UserVO userVO, String token) {
+        HttpRespMsg msg = new HttpRespMsg();
+        User user = userService.getOne(new QueryWrapper<User>().eq("head_imgurl", token));
+        BeanUtils.copyProperties(user,userVO);
+        HttpRespMsg modelListMapByUser = projectService.getModelListMapByUser(userVO);
+        List<MouldVO> mouldVOList = (List<MouldVO>) modelListMapByUser.data;
+        //重新处理数据, 按照生产方工厂来显示点, 超出生产方200米范围的,单独显示该点,作为报警;
+        List<Company> companyList = companyService.list(new QueryWrapper<Company>().eq("company_type", 1));
+        List<LngLatCompany> positionList = lngLatCompanyService.list();
+        List<MapItemVO> retList = new ArrayList<>();
+
+        mouldVOList.stream().forEach(m->{
+            System.out.println("getProduceCompanyId=="+m.getProduceCompanyId());
+            MapItemVO vo = new MapItemVO();
+            vo.setItemId(m.getId());
+            vo.setLng(m.getLng());
+            vo.setLat(m.getLat());
+            vo.setName(m.getModelName());
+            vo.setType(1);
+            vo.setState(m.getState());
+            vo.setMoveState(m.getMoveApplyState());
+            if (m.getProduceCompanyId() != null) {
+                Company comp = companyList.stream().filter(c->c.getId().equals(m.getProduceCompanyId())).findFirst().get();
+                LngLatCompany pos = positionList.stream().filter(p->p.getCompanyId().equals(m.getProduceCompanyId())).findFirst().get();
+                //当前这个模盒距离生产工厂的距离
+                double distance = getDistance(m.getLng(), m.getLat(), Double.parseDouble(pos.getyLng()), Double.parseDouble(pos.getxLat()));
+                System.out.println("distance==="+distance);
+                if (distance < 0.2) {//单位是千米
+                    Optional<MapItemVO> oldItem = retList.stream().filter(r->r.getName().equals(comp.getCompanyName())&&r.getItemId() == comp.getId()).findFirst();
+                    if (oldItem.isPresent()) {
+                        //按工厂名称和id匹配,取到之前已经添加的元素
+                        List<MapItemVO> children = oldItem.get().getChildren();
+                        children.add(vo);
+                    } else {
+                        //先添加工厂
+                        MapItemVO factory = new MapItemVO();
+                        factory.setItemId(comp.getId());
+                        factory.setLng(Double.parseDouble(pos.getyLng()));
+                        factory.setLat(Double.parseDouble(pos.getxLat()));
+                        factory.setName(comp.getCompanyName());
+                        factory.setType(0);//工厂类型
+                        //再为工厂添加当前的模具
+                        List<MapItemVO> children = new ArrayList<>();
+                        children.add(vo);
+                        factory.setChildren(children);
+                        retList.add(factory);
+                    }
+                } else {
+                    //超过工厂的, 直接单独显示
+                    retList.add(vo);
+                }
+            } else {
+                //无生产方工厂的,直接单独显示
+                retList.add(vo);
+            }
+        });
+        msg.data = retList;
+        return msg;
+    }
+
+    @ApiOperation("申请移模")
+    @RequestMapping("/applyMove")
+    @ResponseBody
+    public HttpRespMsg applyMove(int mouldId, String reason) {
+        return mouldService.applyMove(mouldId, reason);
+    }
+    @ApiOperation("审核移模申请")
+    @RequestMapping("/checkApplyMove")
+    @ResponseBody
+    public HttpRespMsg checkApplyMove(int mouldId, int status) {
+        return mouldService.checkApplyMove(mouldId, status);
+    }
+
+    @ApiOperation("完成移模")
+    @RequestMapping("/finishMove")
+    @ResponseBody
+    public HttpRespMsg finishMove(int mouldId) {
+        return mouldService.finishMove(mouldId);
+    }
+
+
+
+
+    /**
+     * 求两点之间的距离
+     * @param lng1 A点经度
+     * @param lat1 A点纬度
+     * @param lng2 B点经度
+     * @param lat2 B点纬度
+     * @return 两点距离
+     */
+    public static double getDistance(double lng1, double lat1, double lng2, double lat2) {
+        double EARTH_RADIUS = 6371;
+        double radiansAX = Math.toRadians(lng1); // A经弧度
+        double radiansAY = Math.toRadians(lat1); // A纬弧度
+        double radiansBX = Math.toRadians(lng2); // B经弧度
+        double radiansBY = Math.toRadians(lat2); // B纬弧度
+
+        // 公式中“cosβ1cosβ2cos(α1-α2)+sinβ1sinβ2”的部分,得到∠AOB的cos值
+        double cos = Math.cos(radiansAY) * Math.cos(radiansBY) * Math.cos(radiansAX - radiansBX)
+                + Math.sin(radiansAY) * Math.sin(radiansBY);
+        double acos = Math.acos(cos); // 反余弦值
+//		System.out.println("-------"+EARTH_RADIUS * acos);
+        return EARTH_RADIUS * acos; // 最终结果
+
+    }
+
 
 
     /**

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

@@ -128,7 +128,7 @@ public class MouldEquipmentController {
     @ApiOperation("设备列表")
     @RequestMapping("/getEquipmentList")
     @ResponseBody
-    public HttpRespMsg getMouldEquipmentList(@RequestParam(required = false) String token, PageUtil page,Integer companyId,String keyName){
+    public HttpRespMsg getEquipmentList(@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);

+ 9 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/controller/MouldFileController.java

@@ -173,6 +173,15 @@ public class MouldFileController {
         return msg;
     }
 
+
+    @ApiOperation("发起项目文档的删除申请")
+    @RequestMapping("/applyDelete")
+    @ResponseBody
+    public HttpRespMsg applyDelete(MouldFile mouldFile, String token, Integer belongType) {
+        HttpRespMsg msg = mouldFileService.applyDelete(mouldFile,token, belongType);
+        return msg;
+    }
+
     /**
      * 文档批量下载列表
      * 参数: token 用户身份凭证,pageSize ,pageNum,keyName(筛选搜索关键词)

+ 3 - 3
cloud-model/src/main/java/com/hssx/cloudmodel/controller/MouldHistoryController.java

@@ -54,11 +54,11 @@ public class MouldHistoryController {
      *        equipmentNo 设备编号
      * @return
      */
-    @ApiOperation("获取云模盒的每日开合次数周期 (时间/周期)")
+    @ApiOperation("获取云模盒的开合次数周期 (时间/周期)")
     @RequestMapping("/openingAndClosingTimesChartCycle")
     @ResponseBody
-    public HttpRespMsg openingAndClosingTimesChartCycle(String equipmentNo,String time){
-        HttpRespMsg msg = mouldHistoryService.openingAndClosingTimesChartCycle(equipmentNo, time);
+    public HttpRespMsg openingAndClosingTimesChartCycle(String equipmentNo,String startDate, String endDate){
+        HttpRespMsg msg = mouldHistoryService.openingAndClosingTimesChartCycle(equipmentNo, startDate, endDate);
         return msg;
     }
 

+ 11 - 3
cloud-model/src/main/java/com/hssx/cloudmodel/controller/ProjectFileController.java

@@ -84,11 +84,19 @@ public class ProjectFileController {
      *
      * @return
      */
-    @ApiOperation("项目文档的删除")
+    @ApiOperation("项目文档删除申请")
+    @RequestMapping("/delFileApplication")
+    @ResponseBody
+    public HttpRespMsg delFileApplication(ProjectFile projectFile,String token){
+        HttpRespMsg msg = projectFileService.delFileApplication(projectFile,token);
+        return msg;
+    }
+
+    @ApiOperation("项目文档的删除审核")
     @RequestMapping("/delFile")
     @ResponseBody
-    public HttpRespMsg delFile(ProjectFile projectFile,String token){
-        HttpRespMsg msg = projectFileService.delFile(projectFile,token);
+    public HttpRespMsg delFile(ProjectFile projectFile,String token, Integer isPass){
+        HttpRespMsg msg = projectFileService.delFile(projectFile,token, isPass);
         return msg;
     }
 }

+ 25 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/controller/UserController.java

@@ -125,6 +125,14 @@ public class UserController {
         return msg;
     }
 
+
+    @ApiOperation("用户详情")
+    @RequestMapping("/detail")
+    @ResponseBody
+    public HttpRespMsg detail(Integer userId) {
+        return userService.detail(userId);
+    }
+
     /**
      * 给项目分配参与人的时候根据公司id获取公司下的人员
      * 参数:companyIds 公司ids ,id当前操作人的id,projectId 项目id
@@ -152,5 +160,22 @@ public class UserController {
         HttpRespMsg msg = projectService.getUserByCompanyIdOrSubordinateType(user);
         return msg;
     }
+
+    @ApiOperation("交接项目")
+    @RequestMapping("/transferProject")
+    @ResponseBody
+    public HttpRespMsg transferProject(Integer fromUid, Integer toUid, String projects) {
+        HttpRespMsg msg = new HttpRespMsg();
+        msg = userService.transferProject(fromUid,toUid,projects);
+        return msg;
+    }
+
+    @ApiOperation("获取可选的用户列表")
+    @RequestMapping("/getAllAvailableUserList")
+    @ResponseBody
+    public HttpRespMsg getAllAvailableUserList(Integer userId) {
+        HttpRespMsg msg = userService.getAllAvailableUserList(userId);
+        return msg;
+    }
 }
 

+ 92 - 2
cloud-model/src/main/java/com/hssx/cloudmodel/entity/Company.java

@@ -12,8 +12,8 @@ import java.io.Serializable;
  * 
  * </p>
  *
- * @author 吴涛涛
- * @since 2019-08-16
+ * @author seya
+ * @since 2020-07-29
  */
 @TableName("tb_company")
 public class Company extends Model<Company> {
@@ -56,6 +56,42 @@ public class Company extends Model<Company> {
     @TableField("administrator")
     private String administrator;
 
+    /**
+     * 联系人
+     */
+    @TableField("contact")
+    private String contact;
+
+    /**
+     * 联系电话
+     */
+    @TableField("contact_phone")
+    private String contactPhone;
+
+    /**
+     * 成立日期
+     */
+    @TableField("setup_date")
+    private String setupDate;
+
+    /**
+     * 公司性质
+     */
+    @TableField("prop")
+    private String prop;
+
+    /**
+     * 营业时间
+     */
+    @TableField("running_time")
+    private String runningTime;
+
+    /**
+     * 占地面积
+     */
+    @TableField("area")
+    private String area;
+
 
     public Integer getId() {
         return id;
@@ -105,6 +141,54 @@ public class Company extends Model<Company> {
         this.administrator = administrator;
     }
 
+    public String getContact() {
+        return contact;
+    }
+
+    public void setContact(String contact) {
+        this.contact = contact;
+    }
+
+    public String getContactPhone() {
+        return contactPhone;
+    }
+
+    public void setContactPhone(String contactPhone) {
+        this.contactPhone = contactPhone;
+    }
+
+    public String getSetupDate() {
+        return setupDate;
+    }
+
+    public void setSetupDate(String setupDate) {
+        this.setupDate = setupDate;
+    }
+
+    public String getProp() {
+        return prop;
+    }
+
+    public void setProp(String prop) {
+        this.prop = prop;
+    }
+
+    public String getRunningTime() {
+        return runningTime;
+    }
+
+    public void setRunningTime(String runningTime) {
+        this.runningTime = runningTime;
+    }
+
+    public String getArea() {
+        return area;
+    }
+
+    public void setArea(String area) {
+        this.area = area;
+    }
+
     @Override
     protected Serializable pkVal() {
         return this.id;
@@ -119,6 +203,12 @@ public class Company extends Model<Company> {
         ", companyType=" + companyType +
         ", administratorId=" + administratorId +
         ", administrator=" + administrator +
+        ", contact=" + contact +
+        ", contactPhone=" + contactPhone +
+        ", setupDate=" + setupDate +
+        ", prop=" + prop +
+        ", runningTime=" + runningTime +
+        ", area=" + area +
         "}";
     }
 }

+ 110 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/entity/EquipmentRecCommand.java

@@ -0,0 +1,110 @@
+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 org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author seya
+ * @since 2020-08-01
+ */
+public class EquipmentRecCommand extends Model<EquipmentRecCommand> {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 设备编号
+     */
+    @TableField("equipment_no")
+    private String equipmentNo;
+
+    /**
+     * 返回的命令
+     */
+    @TableField("cmd")
+    private String cmd;
+
+    /**
+     * 创建时间
+     */
+    @TableField("indate")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private LocalDateTime indate;
+
+    /**
+     * 解析出来的文字
+     */
+    @TableField("cmd_txt")
+    private String cmdTxt;
+
+
+    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 String getCmd() {
+        return cmd;
+    }
+
+    public void setCmd(String cmd) {
+        this.cmd = cmd;
+    }
+
+    public LocalDateTime getIndate() {
+        return indate;
+    }
+
+    public void setIndate(LocalDateTime indate) {
+        this.indate = indate;
+    }
+
+    public String getCmdTxt() {
+        return cmdTxt;
+    }
+
+    public void setCmdTxt(String cmdTxt) {
+        this.cmdTxt = cmdTxt;
+    }
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+    @Override
+    public String toString() {
+        return "EquipmentRecCommand{" +
+        "id=" + id +
+        ", equipmentNo=" + equipmentNo +
+        ", cmd=" + cmd +
+        ", indate=" + indate +
+        ", cmdTxt=" + cmdTxt +
+        "}";
+    }
+}

+ 65 - 4
cloud-model/src/main/java/com/hssx/cloudmodel/entity/Mould.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
 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;
 
@@ -13,8 +14,8 @@ import java.io.Serializable;
  * 
  * </p>
  *
- * @author 吴涛涛
- * @since 2019-10-10
+ * @author seya
+ * @since 2020-07-27
  */
 @TableName("tb_mould")
 public class Mould extends Model<Mould> {
@@ -76,7 +77,7 @@ public class Mould extends Model<Mould> {
     private Integer currentVersionId;
 
     /**
-     * 状态0-静止 1-运动 2-告警 3-待报废 4-已报废
+     * 状态0-静止 1-运动  3-待报废 4-已报废 5-异常,6-掉线
      */
     @TableField("state")
     private String state;
@@ -160,7 +161,7 @@ public class Mould extends Model<Mould> {
     private Integer isMaintain;
 
     /**
-     * 保养设定次数:1,2,3
+     * 日常保养设定次数:1,2,3
      */
     @TableField("maintain_count")
     private String maintainCount;
@@ -183,6 +184,30 @@ public class Mould extends Model<Mould> {
     @TableField("history_run_times")
     private Integer historyRunTimes;
 
+    /**
+     * 接受设备上传数据的时间
+     */
+    @TableField("last_rec_time")
+    private LocalDateTime lastRecTime;
+
+    /**
+     * 固定保养次数
+     */
+    @TableField("fixed_maintain_count")
+    private String fixedMaintainCount;
+
+    /**
+     * 移模状态:0-未申请,1-申请移模待审核,2-审核通过,3-审核不通过
+     */
+    @TableField("move_apply_state")
+    private Integer moveApplyState;
+
+    /**
+     * 移模原因
+     */
+    @TableField("move_apply_reason")
+    private String moveApplyReason;
+
 
     public Integer getId() {
         return id;
@@ -400,6 +425,38 @@ public class Mould extends Model<Mould> {
         this.historyRunTimes = historyRunTimes;
     }
 
+    public LocalDateTime getLastRecTime() {
+        return lastRecTime;
+    }
+
+    public void setLastRecTime(LocalDateTime lastRecTime) {
+        this.lastRecTime = lastRecTime;
+    }
+
+    public String getFixedMaintainCount() {
+        return fixedMaintainCount;
+    }
+
+    public void setFixedMaintainCount(String fixedMaintainCount) {
+        this.fixedMaintainCount = fixedMaintainCount;
+    }
+
+    public Integer getMoveApplyState() {
+        return moveApplyState;
+    }
+
+    public void setMoveApplyState(Integer moveApplyState) {
+        this.moveApplyState = moveApplyState;
+    }
+
+    public String getMoveApplyReason() {
+        return moveApplyReason;
+    }
+
+    public void setMoveApplyReason(String moveApplyReason) {
+        this.moveApplyReason = moveApplyReason;
+    }
+
     @Override
     protected Serializable pkVal() {
         return this.id;
@@ -435,6 +492,10 @@ public class Mould extends Model<Mould> {
         ", holes=" + holes +
         ", preUpdateId=" + preUpdateId +
         ", historyRunTimes=" + historyRunTimes +
+        ", lastRecTime=" + lastRecTime +
+        ", fixedMaintainCount=" + fixedMaintainCount +
+        ", moveApplyState=" + moveApplyState +
+        ", moveApplyReason=" + moveApplyReason +
         "}";
     }
 }

+ 33 - 3
cloud-model/src/main/java/com/hssx/cloudmodel/entity/MouldEquipment.java

@@ -13,8 +13,8 @@ import java.io.Serializable;
  * 
  * </p>
  *
- * @author 吴涛涛
- * @since 2019-10-28
+ * @author seya
+ * @since 2020-08-01
  */
 @TableName("tb_mould_equipment")
 public class MouldEquipment extends Model<MouldEquipment> {
@@ -64,7 +64,7 @@ public class MouldEquipment extends Model<MouldEquipment> {
     private String equipmentNo;
 
     /**
-     * 是否启用 0-未启用,1-启用
+     * 是否启用 0-未启用,1-启用,2-启用中,3-停用中
      */
     @TableField("is_use")
     private Integer isUse;
@@ -123,6 +123,18 @@ public class MouldEquipment extends Model<MouldEquipment> {
     @TableField("curtemperature")
     private Integer curtemperature;
 
+    /**
+     * 最后开模时间
+     */
+    @TableField("lastopentime")
+    private LocalDateTime lastopentime;
+
+    /**
+     * 是否有新的设备反馈消息
+     */
+    @TableField("has_new_message")
+    private Integer hasNewMessage;
+
 
     public Integer getId() {
         return id;
@@ -260,6 +272,22 @@ public class MouldEquipment extends Model<MouldEquipment> {
         this.curtemperature = curtemperature;
     }
 
+    public LocalDateTime getLastopentime() {
+        return lastopentime;
+    }
+
+    public void setLastopentime(LocalDateTime lastopentime) {
+        this.lastopentime = lastopentime;
+    }
+
+    public Integer getHasNewMessage() {
+        return hasNewMessage;
+    }
+
+    public void setHasNewMessage(Integer hasNewMessage) {
+        this.hasNewMessage = hasNewMessage;
+    }
+
     @Override
     protected Serializable pkVal() {
         return this.id;
@@ -285,6 +313,8 @@ public class MouldEquipment extends Model<MouldEquipment> {
         ", sim=" + sim +
         ", curhillNumber=" + curhillNumber +
         ", curtemperature=" + curtemperature +
+        ", lastopentime=" + lastopentime +
+        ", hasNewMessage=" + hasNewMessage +
         "}";
     }
 }

+ 17 - 5
cloud-model/src/main/java/com/hssx/cloudmodel/entity/ProjectFile.java

@@ -6,8 +6,6 @@ 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;
 
 /**
@@ -15,8 +13,8 @@ import java.io.Serializable;
  * 
  * </p>
  *
- * @author 吴涛涛
- * @since 2019-08-06
+ * @author seya
+ * @since 2020-07-17
  */
 @TableName("tb_project_file")
 public class ProjectFile extends Model<ProjectFile> {
@@ -75,9 +73,14 @@ public class ProjectFile extends Model<ProjectFile> {
      * 上传时间
      */
     @TableField("indate")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime indate;
 
+    /**
+     * 0-已上传,1-删除待审批
+     */
+    @TableField("status")
+    private Integer status;
+
 
     public Integer getId() {
         return id;
@@ -151,6 +154,14 @@ public class ProjectFile extends Model<ProjectFile> {
         this.indate = indate;
     }
 
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
     @Override
     protected Serializable pkVal() {
         return this.id;
@@ -168,6 +179,7 @@ public class ProjectFile extends Model<ProjectFile> {
         ", fileType=" + fileType +
         ", fileSize=" + fileSize +
         ", indate=" + indate +
+        ", status=" + status +
         "}";
     }
 }

+ 17 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/entity/vo/MapItemVO.java

@@ -0,0 +1,17 @@
+package com.hssx.cloudmodel.entity.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class MapItemVO {
+    private int itemId;
+    private double lng;
+    private double lat;
+    private int type; //0-工厂, 1-模具
+    private String name;
+    private String state; //模具状态
+    private List<MapItemVO> children;
+    private Integer moveState;
+}

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

@@ -13,4 +13,6 @@ import lombok.Data;
 public class MouldHistoryVO extends MouldHistory {
     private String time;
     private Integer cycle;
+    private Integer maxCost;
+    private Integer minCost;
 }

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

@@ -22,6 +22,10 @@ public class MouldVO extends Mould {
     private LocalDateTime endTime;
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime lastOpenTime;
+    //首次启动时间
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private LocalDateTime startTime;
+
     private String mangerName;
     private String equipmentNo;
     private String hillNumber;
@@ -36,4 +40,7 @@ public class MouldVO extends Mould {
     private String equipmentName;
     private Integer temperature;
     private InjectionMolding injectionMolding = new InjectionMolding();
+
+    //当前位置状态
+    private String curPosition;
 }

+ 2 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/mapper/CompanyMapper.java

@@ -23,4 +23,6 @@ public interface CompanyMapper extends BaseMapper<Company> {
     List<CompanyVO> getCustomerListByKeyName(@Param("keyName") String keyName, @Param("companyType")Integer companyType);
 
     List<CompanyVO> getListMould(@Param("mouldIds")List<Integer> mouldIds);
+
+    CompanyVO getCustomerDetailById(@Param("id")Integer id);
 }

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

@@ -0,0 +1,16 @@
+package com.hssx.cloudmodel.mapper;
+
+import com.hssx.cloudmodel.entity.EquipmentRecCommand;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author seya
+ * @since 2020-08-01
+ */
+public interface EquipmentRecCommandMapper extends BaseMapper<EquipmentRecCommand> {
+
+}

+ 2 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/mapper/MouldEquipmentMapper.java

@@ -21,4 +21,6 @@ public interface MouldEquipmentMapper extends BaseMapper<MouldEquipment> {
     List<MouldEquipmentVO> getListByCompanyId(@Param("belongCompanyId") Integer belongCompanyId,@Param("list") List<Integer> ides);
 
     List<MouldEquipmentVO> getList(@Param("companyId")Integer companyId,@Param("keyName")String keyName);
+
+    int batchInsert(List<MouldEquipment> list);
 }

+ 6 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/mapper/MouldHistoryTimeMapper.java

@@ -17,7 +17,12 @@ import java.util.List;
  */
 public interface MouldHistoryTimeMapper extends BaseMapper<MouldHistoryTime> {
 
-    List<MouldHistoryVO> getOpeningAndClosingTimesChartCycle(@Param("time")String time,@Param("equipmentNo")String equipmentNo
+    List<MouldHistoryVO> getOpeningAndClosingTimesChartCycle(@Param("time")String time,
+                                                             @Param("equipmentNo")String equipmentNo
+    ,@Param("maxCycle")Integer maxCycle,@Param("minCycle")Integer minCycle);
+    List<MouldHistoryVO> getOpeningAndClosingTimesChartCycleByDatePeriod(@Param("startDate")String startDate,
+                                                                         @Param("endDate")String endDate,
+                                                             @Param("equipmentNo")String equipmentNo
     ,@Param("maxCycle")Integer maxCycle,@Param("minCycle")Integer minCycle);
 
     List<MouldHistoryTime> getOpeningAndClosingTimesChartCycleExcel(@Param("startTime")String startTime,@Param("endTime")String time,@Param("equipmentNo")String equipmentNo

+ 2 - 2
cloud-model/src/main/java/com/hssx/cloudmodel/service/CompanyService.java

@@ -34,11 +34,11 @@ public interface CompanyService extends IService<Company> {
 
     HttpRespMsg relationList(Integer companyType);
 
-    HttpRespMsg detail(UserVO userVO);
-
     HttpRespMsg getOwnerRelateCompany(CompanyVO companyVO);
 
     HttpRespMsg getProduceCompany(UserVO userVO);
 
     HttpRespMsg getProduceCompanyByCurrentUser(UserVO userVO);
+
+    HttpRespMsg detail(Integer id);
 }

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

@@ -0,0 +1,16 @@
+package com.hssx.cloudmodel.service;
+
+import com.hssx.cloudmodel.entity.EquipmentRecCommand;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author seya
+ * @since 2020-08-01
+ */
+public interface EquipmentRecCommandService extends IService<EquipmentRecCommand> {
+
+}

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

@@ -34,4 +34,6 @@ public interface MouldFileService extends IService<MouldFile> {
     HttpRespMsg downloadFileListExcel(UserVO userVO, HttpServletResponse response,String downloadPath) throws ParseException;
 
     HttpRespMsg mouldUpdateCheck(UserVO userVO);
+
+    HttpRespMsg applyDelete(MouldFile mouldFile, String token, Integer blongType);
 }

+ 1 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/service/MouldHistoryService.java

@@ -20,5 +20,5 @@ public interface MouldHistoryService extends IService<MouldHistory> {
 
     HttpRespMsg getOpeningAndClosingTimesChart(HttpServletResponse response, String equipmentNo, String startTime, String endTime, Integer type);
 
-    HttpRespMsg openingAndClosingTimesChartCycle(String equipmentNo,String time);
+    HttpRespMsg openingAndClosingTimesChartCycle(String equipmentNo,String startDate, String endDate);
 }

+ 8 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/service/MouldService.java

@@ -39,4 +39,12 @@ public interface MouldService extends IService<Mould> {
     HttpRespMsg updateRuntimesTask();
 
     HttpRespMsg updateLastTimeRuntimesTask();
+
+    HttpRespMsg applyMove(int mouldId, String reason);
+
+    HttpRespMsg checkApplyMove(int mouldId, int status);
+
+    HttpRespMsg finishMove(int mouldId);
+
+    HttpRespMsg changeProducer(int id, int produceCompanyId);
 }

+ 3 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/service/ProjectFileService.java

@@ -26,5 +26,7 @@ public interface ProjectFileService extends IService<ProjectFile> {
 
     HttpRespMsg getFileList(UserVO userVO,String path);
 
-    HttpRespMsg delFile(ProjectFile projectFile,String token);
+    HttpRespMsg delFile(ProjectFile projectFile,String token, Integer isPass);
+
+    HttpRespMsg delFileApplication(ProjectFile projectFile, String token);
 }

+ 6 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/service/UserService.java

@@ -27,4 +27,10 @@ public interface UserService extends IService<User> {
     HttpRespMsg deleteUser(User user);
 
     HttpRespMsg changeUserInfo(User user);
+
+    HttpRespMsg detail(Integer userId);
+
+    HttpRespMsg transferProject(Integer fromUid, Integer toUid, String projects);
+
+    HttpRespMsg getAllAvailableUserList(Integer userId);
 }

+ 7 - 16
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/CompanyServiceImpl.java

@@ -312,22 +312,6 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
         return msg;
     }
 
-    @Override
-    public HttpRespMsg detail(UserVO userVO) {
-        HttpRespMsg msg = new HttpRespMsg();
-//        Company company = companyMapper.selectById(userVO.getCompanyId());
-//        if (company != null) {
-//            if (0 == company.getCompanyType()) {
-//                //资产方
-//                CompanyVO
-//
-//            }
-//        } else {
-//            msg.setError("公司不存在");
-//        }
-        return msg;
-    }
-
     @Override
     public HttpRespMsg getOwnerRelateCompany(CompanyVO companyVO) {
         HttpRespMsg msg = new HttpRespMsg();
@@ -431,6 +415,13 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
         return msg;
     }
 
+    @Override
+    public HttpRespMsg detail(Integer id) {
+        HttpRespMsg msg = new HttpRespMsg();
+        msg.data = companyMapper.getCustomerDetailById(id);
+        return msg;
+    }
+
     @Override
     public HttpRespMsg deleteById(Integer id) {
         HttpRespMsg msg = new HttpRespMsg();

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

@@ -0,0 +1,20 @@
+package com.hssx.cloudmodel.service.impl;
+
+import com.hssx.cloudmodel.entity.EquipmentRecCommand;
+import com.hssx.cloudmodel.mapper.EquipmentRecCommandMapper;
+import com.hssx.cloudmodel.service.EquipmentRecCommandService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author seya
+ * @since 2020-08-01
+ */
+@Service
+public class EquipmentRecCommandServiceImpl extends ServiceImpl<EquipmentRecCommandMapper, EquipmentRecCommand> implements EquipmentRecCommandService {
+
+}

+ 34 - 4
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldEquipmentServiceImpl.java

@@ -14,6 +14,7 @@ import com.hssx.cloudmodel.service.MouldEquipmentService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.hssx.cloudmodel.util.*;
 import org.apache.commons.lang3.StringEscapeUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.xssf.usermodel.XSSFCell;
 import org.apache.poi.xssf.usermodel.XSSFRow;
@@ -66,6 +67,8 @@ public class MouldEquipmentServiceImpl extends ServiceImpl<MouldEquipmentMapper,
     ProjectUserMapper projectUserMapper;
     @Resource
     ChangeIpCommandMapper changeIpCommandMapper;
+    @Resource
+    CompanyMapper companyMapper;
 
     @Override
     public HttpRespMsg addAndUpdateMouldEquipment(MouldEquipment mouldEquipment, User user) {
@@ -364,12 +367,16 @@ public class MouldEquipmentServiceImpl extends ServiceImpl<MouldEquipmentMapper,
                 int s = sheet.getLastRowNum();
                 // 遍历当前sheet中的所有行,第一行是数据对应的字段,不是数据,
                 // 故从第二行开始遍历拿数据(如果有标题的话,则从第三行开始拿数据)
+                //有对所属公司的解析,先查出所有公司
+                List<Company> companies = companyMapper.selectList(new QueryWrapper<>());
+                List<MouldEquipment> allList = new ArrayList<>();
+                List<String> oldEnoList = new ArrayList<>();
                 for (int j = 1; j < sheet.getLastRowNum() + 1; j++) {
                     XSSFRow row = sheet.getRow(j);
                     //新建云模盒对象
                     MouldEquipment mouldEquipment = new MouldEquipment();
                     // 遍历所有的列,下面的10是excle表格里共有10列即对应了10个字段
-                    for (int y = 0; y < 3; y++) {
+                    for (int y = 0; y < 5; y++) {
                         XSSFCell cell = row.getCell(y);
                         cell.setCellType(Cell.CELL_TYPE_STRING);
                         //取出当前列的值
@@ -384,21 +391,44 @@ public class MouldEquipmentServiceImpl extends ServiceImpl<MouldEquipmentMapper,
                             for (MouldEquipment p : mouldEquipments) {
                                 if (value.equals(p.getEquipmentNo())) {
 //                                    msg.setError("第" + j + "行的云模盒编号:" + value + "已被占用,请修改后重新上传");
-                                    msg.setError("云模盒编号已被占用,请修改后重新上传");
+                                    msg.setError("云模盒编号("+value+")已被占用,请修改后重新上传");
                                     return msg;
                                 }
                             }
+                            //检查在本身的excel文件中,是否存在重复的。
+                            if (oldEnoList.contains(value)) {
+                                msg.setError("文档中云模盒编号("+value+")存在重复,请修改后重新上传");
+                                return msg;
+                            }
                             mouldEquipment.setEquipmentNo(value);
+                            oldEnoList.add(value);
                         } else if (y == 1) {
+                            //产品编号
+                            mouldEquipment.setEquipmentName(value);
+                        } else if (y == 2) {
+                            //所属公司
+                            if (StringUtils.isNotEmpty(value)) {
+                                Optional<Company> comp = companies.stream().filter(c->c.getCompanyName().equals(value)).findFirst();
+                                if (comp.isPresent()) {//设置公司id
+                                    mouldEquipment.setBelongCompanyId(comp.get().getId());
+                                } else {
+                                    msg.setError("公司名称不存在: " + value);
+                                }
+                            }
+                        } else if (y == 3) {
                             //使用年限
                             mouldEquipment.setUseLife(Integer.parseInt(value));
-                        } else if (y == 2) {
+                        } else if (y == 4) {
                             //代理商
                             mouldEquipment.setAgent(value);
                         }
                     }
-                    mouldEquipmentMapper.insert(mouldEquipment);
+//                    mouldEquipmentMapper.insert(mouldEquipment);
+                    allList.add(mouldEquipment);
                 }
+                //批量插入数据库
+                mouldEquipmentMapper.batchInsert(allList);
+
                 //用完后删除临时文件
                 if (!f.isDirectory()) {
                     f.delete();

+ 67 - 60
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldFileServiceImpl.java

@@ -173,7 +173,7 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
                         pdfFile.setRafId(projectFile.getModelId());
                         pdfFile.setSourceFileUrl(projectFile.getFileUrl());
                         pdfFileMapper.insert(pdfFile);
-                    } else {
+                    } else if (OpenOfficeService.canTransferToPdf(projectFile.getFileType())){
                         //上传完,需要生成pdf
                         String dFile1 = path + UUID.randomUUID().toString().replaceAll("-", "") + ".pdf";
                         openOfficeService.start();
@@ -199,7 +199,7 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
                             pdfFile.setRafId(projectFile.getModelId());
                             pdfFile.setSourceFileUrl(projectFile.getFileUrl2());
                             pdfFileMapper.insert(pdfFile);
-                        } else {
+                        } else if (OpenOfficeService.canTransferToPdf(projectFile.getFileType())){
                             dFile2 = path + UUID.randomUUID().toString().replaceAll("-", "") + ".pdf";
                             File testFile = new File(dFile2);
                             if (!testFile.exists()) {
@@ -218,46 +218,7 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
                     openOfficeService.shutdown();
                     Project project = projectMapper.selectById(mould.getProjectId());
                     Integer count = projectApproveMapper.selectCount(new QueryWrapper<ProjectApprove>().eq("approver_id", user.getId()).eq("project_id", project.getId()));
-//                    if(count>0){
-//                        if (user.getSubordinateType() == 0) {
-//                            //上传人为资产方审批人,自动审核通过
-//                            projectFile.setState(1);
-//                            MouldOperationDynamics dynamics = new MouldOperationDynamics();
-//                            dynamics.setMouldId(userVO.getMouldId());
-//                            dynamics.setBelongType(blongType);
-//                            dynamics.setFileId(projectFile.getId());
-//                            if (null != projectFile.getFileName2()) {
-//                                dynamics.setFileName(projectFile.getFileName() + "," + projectFile.getFileName2());
-//                            } else {
-//                                dynamics.setFileName(projectFile.getFileName());
-//                            }
-//                            dynamics.setOperatorId(user.getId());
-//                            dynamics.setOperatorName(user.getUsername());
-//                            dynamics.setContent(Constant.APPROVAL);
-//                            mouldOperationDynamicsMapper.insert(dynamics);
-//                        } else if (user.getSubordinateType() == 1) {
-//                            //上传人为生产方,自动审核通过
-//                            projectFile.setState(2);
-//                            //上传人为资产方审批人,自动审核通过
-//                            MouldOperationDynamics dynamics = new MouldOperationDynamics();
-//                            dynamics.setMouldId(userVO.getMouldId());
-//                            dynamics.setBelongType(blongType);
-//                            dynamics.setFileId(projectFile.getId());
-//                            if (null != projectFile.getFileName2()) {
-//                                dynamics.setFileName(projectFile.getFileName() + "," + projectFile.getFileName2());
-//                            } else {
-//                                dynamics.setFileName(projectFile.getFileName());
-//                            }
-//                            dynamics.setOperatorId(user.getId());
-//                            dynamics.setOperatorName(user.getUsername());
-//                            dynamics.setContent(Constant.APPROVAL);
-//                            mouldOperationDynamicsMapper.insert(dynamics);
-//                        } else {
-//                            projectFile.setState(0);
-//                        }
-//                    }else{
                     projectFile.setState(0);
-//                    }
                     //添加上传记录
                     MouldOperationDynamics dynamics = new MouldOperationDynamics();
                     dynamics.setContent(Constant.UPLOAD);
@@ -309,13 +270,6 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
                 projectFile.setBlongType(blongType);
                 mouldFileMapper.insert(projectFile);
                 //添加上传记录
-//                MouldOperationDynamics dynamics = new MouldOperationDynamics();
-//                dynamics.setContent(Constant.UPDATE);
-//                dynamics.setOperatorId(user.getId());
-//                dynamics.setOperatorName(user.getUsername());
-//                dynamics.setMouldId(userVO.getMouldId());
-//                dynamics.setBelongType(blongType);
-//                mouldOperationDynamicsMapper.insert(dynamics);
                 Project project = projectMapper.selectOne(new QueryWrapper<Project>().eq("id", mould.getProjectId()));
                 List<ProjectApprove> projectApproves = projectApproveMapper.selectList(new QueryWrapper<ProjectApprove>().eq("project_id", project.getId()));
                 String content = "模具更新";
@@ -815,19 +769,22 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
                             QcloudUntil.close();
                         }
                     });
-                    //上传完,需要生成pdf
-                    String dFile1 = path + UUID.randomUUID().toString().replaceAll("-", "") + ".pdf";
-                    File newFile = new File(dFile1);
-                    if (!newFile.exists()) {
-                        openOfficeService.office2PDF(path + fileName, dFile1);
-                        PdfFile pdfFile = new PdfFile();
-                        pdfFile.setPdfUrl("/upload/" + dFile1.substring(path.length()));
-                        pdfFile.setFileId(partFile.getId());
-                        pdfFile.setType(1);
-                        pdfFile.setRafId(partFile.getModelId());
-                        pdfFile.setSourceFileUrl(partFile.getFileUrl());
-                        pdfFileMapper.insert(pdfFile);
+                    if (OpenOfficeService.canTransferToPdf(partFile.getFileType())) {
+                        //上传完,需要生成pdf
+                        String dFile1 = path + UUID.randomUUID().toString().replaceAll("-", "") + ".pdf";
+                        File newFile = new File(dFile1);
+                        if (!newFile.exists()) {
+                            openOfficeService.office2PDF(path + fileName, dFile1);
+                            PdfFile pdfFile = new PdfFile();
+                            pdfFile.setPdfUrl("/upload/" + dFile1.substring(path.length()));
+                            pdfFile.setFileId(partFile.getId());
+                            pdfFile.setType(1);
+                            pdfFile.setRafId(partFile.getModelId());
+                            pdfFile.setSourceFileUrl(partFile.getFileUrl());
+                            pdfFileMapper.insert(pdfFile);
+                        }
                     }
+
                 } catch (IOException e) {
                     e.printStackTrace();
                     partFile = null;
@@ -964,6 +921,56 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
         return msg;
     }
 
+    @Override
+    public HttpRespMsg applyDelete(MouldFile mouldFile, String token, Integer belongType) {
+        HttpRespMsg msg = new HttpRespMsg();
+
+        User currentUser = userMapper.selectOne(new QueryWrapper<User>().eq("head_imgurl", token));
+        if (currentUser == null) {
+            msg.setError("用户不存在或者未登录");
+        } else {
+            MouldFile file = mouldFileMapper.selectById(mouldFile.getId());
+            Mould mould = mouldMapper.selectById(mouldFile.getModelId());
+            if (file.getUplodtorId().equals(currentUser.getId())) {
+                //上传人负责发起删除申请
+                //添加消息通知记录
+                if (file.getProjectId() != null) {
+                    Project project = projectMapper.selectById(file.getProjectId());
+                    List<ProjectApprove> projectApproves = projectApproveMapper.selectList(new QueryWrapper<ProjectApprove>().eq("project_id", file.getProjectId()));
+                    String content = "";
+                    NewsNotice newsNotice = new NewsNotice();
+                    newsNotice.setRefId(file.getModelId());
+                    newsNotice.setProjectId(file.getProjectId());
+                    newsNotice.setBelongType(belongType);
+                    newsNotice.setProjectName(project.getProjectName() + "-" + mould.getModelName());
+                    newsNotice.setNoticeType(Constant.APPROVEL_TYPE);
+                    if (belongType == 0) {
+                        content = "模具文档";
+                    } else if (belongType == 1) {
+                        content = "零件文档";
+                    } else if (belongType == 2) {
+                        content = "试模验收文档";
+                    } else if (belongType == 3) {
+                        content = "保养方案文档";
+                    } else if (belongType == 5) {
+                        content = "模具报废文档";
+                    }
+                    newsNotice.setContent(currentUser.getUsername() + "申请删除" + content + "模块的" + mould.getModelName() + ",待您审批。");
+                    newsNoticeMapper.insert(newsNotice);
+                    for (ProjectApprove projectApprove : projectApproves) {
+                        NewsNoticeUser newsNoticeUser = new NewsNoticeUser();
+                        newsNoticeUser.setUserId(projectApprove.getApproverId());
+                        newsNoticeUser.setNewsId(newsNotice.getId());
+                        newsNoticeUserMapper.insert(newsNoticeUser);
+                    }
+                }
+            } else {
+                msg.setError("您没有该权限!");
+            }
+        }
+        return msg;
+    }
+
     //生成.zip文件
     public String download(String downloadPath, Mould vo, List<MouldFile> mouldFiles, String oldFilePath, User user) {
         //需要压缩的文件--包括文件地址和文件名

+ 135 - 81
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldHistoryServiceImpl.java

@@ -123,7 +123,7 @@ public class MouldHistoryServiceImpl extends ServiceImpl<MouldHistoryMapper, Mou
     }
 
     @Override
-    public HttpRespMsg openingAndClosingTimesChartCycle(String equipmentNo, String time) {
+    public HttpRespMsg openingAndClosingTimesChartCycle(String equipmentNo, String startDate, String endDate) {
         HttpRespMsg msg = new HttpRespMsg();
         Map<String, Object> listMap = new HashMap<>();
         MouldEquipment mouldEquipment = mouldEquipmentMapper.selectOne(new QueryWrapper<MouldEquipment>().eq("equipment_no", equipmentNo));
@@ -135,96 +135,150 @@ public class MouldHistoryServiceImpl extends ServiceImpl<MouldHistoryMapper, Mou
         } else {
             cycle = 40000;
         }
+        final int fCycle = cycle;
         //筛选10s-200s
         Integer maxCycle = 10000*15;
         Integer minCycle = 10000;
+
         Map<String, MouldHistoryTimeVO> map = TimeAndCountUtil.getMap();
-        List<MouldHistoryVO> list = mouldHistoryTimeMapper.getOpeningAndClosingTimesChartCycle(time, equipmentNo, maxCycle, minCycle);
+        List<MouldHistoryVO> list;
         Integer count = 0;
-        Map<String, List<MouldHistoryVO>> mapList = list.stream().collect(Collectors.groupingBy(MouldHistoryVO::getTime));
-        for (Map.Entry<String, List<MouldHistoryVO>> entry : mapList.entrySet()) {
-            MouldHistoryTimeVO vo = new MouldHistoryTimeVO();
-            vo.setMinCycle(entry.getValue().stream().mapToInt(MouldHistoryVO::getRunCnt).min().getAsInt());
-            vo.setMaxCycle(entry.getValue().stream().mapToInt(MouldHistoryVO::getRunCnt).max().getAsInt());
-            vo.setAvgCycle((int) entry.getValue().stream().mapToInt(MouldHistoryVO::getRunCnt).average().getAsDouble());
-            vo.setTheoryCycle(cycle);
-            if ("00".equals(entry.getKey())) {
-                map.put("00:00-01:00", vo);
-            } else if ("01".equals(entry.getKey())) {
-                map.put("01:00-02:00", vo);
-            } else if ("02".equals(entry.getKey())) {
-                map.put("02:00-03:00", vo);
-            } else if ("03".equals(entry.getKey())) {
-                map.put("03:00-04:00", vo);
-            } else if ("04".equals(entry.getKey())) {
-                map.put("04:00-05:00", vo);
-            } else if ("05".equals(entry.getKey())) {
-                map.put("05:00-06:00", vo);
-            } else if ("06".equals(entry.getKey())) {
-                map.put("06:00-07:00", vo);
-            } else if ("07".equals(entry.getKey())) {
-                map.put("07:00-08:00", vo);
-            } else if ("08".equals(entry.getKey())) {
-                map.put("08:00-09:00", vo);
-            } else if ("09".equals(entry.getKey())) {
-                map.put("09:00-10:00", vo);
-            } else if ("10".equals(entry.getKey())) {
-                map.put("10:00-11:00", vo);
-            } else if ("11".equals(entry.getKey())) {
-                map.put("11:00-12:00", vo);
-            } else if ("12".equals(entry.getKey())) {
-                map.put("12:00-13:00", vo);
-            } else if ("13".equals(entry.getKey())) {
-                map.put("13:00-14:00", vo);
-            } else if ("14".equals(entry.getKey())) {
-                map.put("14:00-15:00", vo);
-            } else if ("15".equals(entry.getKey())) {
-                map.put("15:00-16:00", vo);
-            } else if ("16".equals(entry.getKey())) {
-                map.put("16:00-17:00", vo);
-            } else if ("17".equals(entry.getKey())) {
-                map.put("17:00-18:00", vo);
-            } else if ("18".equals(entry.getKey())) {
-                map.put("18:00-19:00", vo);
-            } else if ("19".equals(entry.getKey())) {
-                map.put("19:00-20:00", vo);
-            } else if ("20".equals(entry.getKey())) {
-                map.put("20:00-21:00", vo);
-            } else if ("21".equals(entry.getKey())) {
-                map.put("21:00-22:00", vo);
-            } else if ("22".equals(entry.getKey())) {
-                map.put("22:00-23:00", vo);
-            } else if ("23".equals(entry.getKey())) {
-                map.put("23:00-24:00", vo);
+        Map<String, List<MouldHistoryVO>> mapList = null;
+        boolean dayTimeShow = false;
+        if (startDate.equals(endDate)) {
+            dayTimeShow = true;
+            //某一天的,按时间段显示
+            list = mouldHistoryTimeMapper.getOpeningAndClosingTimesChartCycle(startDate, equipmentNo, maxCycle, minCycle);
+        } else {
+            //某个日期范围,按天显示
+            list = mouldHistoryTimeMapper.getOpeningAndClosingTimesChartCycleByDatePeriod(startDate, endDate, equipmentNo, maxCycle, minCycle);
+        }
+        mapList = list.stream().collect(Collectors.groupingBy(MouldHistoryVO::getTime));
+        if (dayTimeShow) {
+            for (Map.Entry<String, List<MouldHistoryVO>> entry : mapList.entrySet()) {
+                MouldHistoryTimeVO vo = new MouldHistoryTimeVO();
+                vo.setMinCycle(entry.getValue().stream().mapToInt(MouldHistoryVO::getRunCnt).min().getAsInt());
+                vo.setMaxCycle(entry.getValue().stream().mapToInt(MouldHistoryVO::getRunCnt).max().getAsInt());
+                vo.setAvgCycle((int) entry.getValue().stream().mapToInt(MouldHistoryVO::getRunCnt).average().getAsDouble());
+                vo.setTheoryCycle(cycle);
+                if ("00".equals(entry.getKey())) {
+                    map.put("00:00-01:00", vo);
+                } else if ("01".equals(entry.getKey())) {
+                    map.put("01:00-02:00", vo);
+                } else if ("02".equals(entry.getKey())) {
+                    map.put("02:00-03:00", vo);
+                } else if ("03".equals(entry.getKey())) {
+                    map.put("03:00-04:00", vo);
+                } else if ("04".equals(entry.getKey())) {
+                    map.put("04:00-05:00", vo);
+                } else if ("05".equals(entry.getKey())) {
+                    map.put("05:00-06:00", vo);
+                } else if ("06".equals(entry.getKey())) {
+                    map.put("06:00-07:00", vo);
+                } else if ("07".equals(entry.getKey())) {
+                    map.put("07:00-08:00", vo);
+                } else if ("08".equals(entry.getKey())) {
+                    map.put("08:00-09:00", vo);
+                } else if ("09".equals(entry.getKey())) {
+                    map.put("09:00-10:00", vo);
+                } else if ("10".equals(entry.getKey())) {
+                    map.put("10:00-11:00", vo);
+                } else if ("11".equals(entry.getKey())) {
+                    map.put("11:00-12:00", vo);
+                } else if ("12".equals(entry.getKey())) {
+                    map.put("12:00-13:00", vo);
+                } else if ("13".equals(entry.getKey())) {
+                    map.put("13:00-14:00", vo);
+                } else if ("14".equals(entry.getKey())) {
+                    map.put("14:00-15:00", vo);
+                } else if ("15".equals(entry.getKey())) {
+                    map.put("15:00-16:00", vo);
+                } else if ("16".equals(entry.getKey())) {
+                    map.put("16:00-17:00", vo);
+                } else if ("17".equals(entry.getKey())) {
+                    map.put("17:00-18:00", vo);
+                } else if ("18".equals(entry.getKey())) {
+                    map.put("18:00-19:00", vo);
+                } else if ("19".equals(entry.getKey())) {
+                    map.put("19:00-20:00", vo);
+                } else if ("20".equals(entry.getKey())) {
+                    map.put("20:00-21:00", vo);
+                } else if ("21".equals(entry.getKey())) {
+                    map.put("21:00-22:00", vo);
+                } else if ("22".equals(entry.getKey())) {
+                    map.put("22:00-23:00", vo);
+                } else if ("23".equals(entry.getKey())) {
+                    map.put("23:00-24:00", vo);
+                }
             }
+            System.out.println("原来的map===>" + map);
+            Map<String, MouldHistoryTimeVO> result = map.entrySet().stream()
+                    .sorted(Map.Entry.comparingByKey())
+                    .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,
+                            (oleValue, newValue) -> oleValue, LinkedHashMap::new));
+            System.out.println("排序后的map===>" + result);
+            listMap.put("cycle", result);
+        } else {
+            final Map<String, MouldHistoryTimeVO> dayMap = new LinkedHashMap<String, MouldHistoryTimeVO>();
+            //把最大周期,最小周期,平均周期都进行赋值
+            list.forEach(time->{
+                MouldHistoryTimeVO vo = new MouldHistoryTimeVO();
+                vo.setMinCycle(time.getMinCost());
+                vo.setMaxCycle(time.getMaxCost());
+                vo.setAvgCycle(time.getCycle());
+                vo.setTheoryCycle(fCycle);
+                dayMap.put(time.getTime(), vo);
+            });
+            listMap.put("cycle", dayMap);
         }
-        System.out.println("原来的map===>" + map);
-        Map<String, MouldHistoryTimeVO> result = map.entrySet().stream()
-                .sorted(Map.Entry.comparingByKey())
-                .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,
-                        (oleValue, newValue) -> oleValue, LinkedHashMap::new));
-        System.out.println("排序后的map===>" + result);
-        listMap.put("cycle", result);
+
         //模具运行次数
-        List<MouldCycleRuntime> cycleRuntime = mouldCycleRuntimeMapper.selectList(new QueryWrapper<MouldCycleRuntime>().eq("equipment_no", equipmentNo).eq("date_str", time));
-        cycleRuntime = cycleRuntime.stream().sorted(Comparator.comparing(MouldCycleRuntime::getTimeSlot)).collect(Collectors.toList());
-        Map<String, MouldCycleRuntime> set = TimeAndCountUtil.getSet();
-        Map<String, List<MouldCycleRuntime>> collect = cycleRuntime.stream().collect(Collectors.groupingBy(MouldCycleRuntime::getTimeSlot));
-        for (Map.Entry<String, List<MouldCycleRuntime>> entry : collect.entrySet()) {
-            MouldCycleRuntime vo = new MouldCycleRuntime();
-            if(entry.getValue().size()>0){
-                vo.setDateStr(entry.getValue().get(0).getDateStr());
-                vo.setEquipmentNo(entry.getValue().get(0).getEquipmentNo());
-                vo.setRuntime(entry.getValue().get(0).getRuntime());
-                vo.setTimeSlot(entry.getValue().get(0).getTimeSlot());
-                set.put(entry.getKey(),vo);
+        if (dayTimeShow) {
+            List<MouldCycleRuntime> cycleRuntime = mouldCycleRuntimeMapper.selectList(new QueryWrapper<MouldCycleRuntime>().eq("equipment_no", equipmentNo).eq("date_str", startDate));
+            cycleRuntime = cycleRuntime.stream().sorted(Comparator.comparing(MouldCycleRuntime::getTimeSlot)).collect(Collectors.toList());
+            Map<String, MouldCycleRuntime> set = TimeAndCountUtil.getSet();
+            Map<String, List<MouldCycleRuntime>> collect = cycleRuntime.stream().collect(Collectors.groupingBy(MouldCycleRuntime::getTimeSlot));
+            for (Map.Entry<String, List<MouldCycleRuntime>> entry : collect.entrySet()) {
+                MouldCycleRuntime vo = new MouldCycleRuntime();
+                if(entry.getValue().size()>0){
+                    vo.setDateStr(entry.getValue().get(0).getDateStr());
+                    vo.setEquipmentNo(entry.getValue().get(0).getEquipmentNo());
+                    vo.setRuntime(entry.getValue().get(0).getRuntime());
+                    vo.setTimeSlot(entry.getValue().get(0).getTimeSlot());
+                    set.put(entry.getKey(),vo);
+                }
             }
-        }
-        Map<String, MouldCycleRuntime> runtimeResult = new LinkedHashMap<>();
-        //给map排序
-        set.entrySet().stream().sorted(Map.Entry.<String, MouldCycleRuntime>comparingByKey().reversed())
+            Map<String, MouldCycleRuntime> runtimeResult = new LinkedHashMap<>();
+            //给map排序
+            set.entrySet().stream().sorted(Map.Entry.<String, MouldCycleRuntime>comparingByKey().reversed())
                     .forEachOrdered(e -> runtimeResult.put(e.getKey(), e.getValue()));
-        listMap.put("runtime", runtimeResult);
+            listMap.put("runtime", runtimeResult);
+        } else {
+            //按天展示,统计每天的运行总次数
+            List<MouldCycleRuntime> cycleRuntime = mouldCycleRuntimeMapper.selectList(new QueryWrapper<MouldCycleRuntime>().eq("equipment_no", equipmentNo).between("date_str", startDate, endDate));
+
+            cycleRuntime = cycleRuntime.stream().sorted(Comparator.comparing(MouldCycleRuntime::getDateStr)).collect(Collectors.toList());
+            Map<String, List<MouldCycleRuntime>> collect = cycleRuntime.stream().collect(Collectors.groupingBy(MouldCycleRuntime::getDateStr));
+            Map<String, MouldCycleRuntime> runtimeResult = new LinkedHashMap<>();
+            for (Map.Entry<String, List<MouldCycleRuntime>> entry : collect.entrySet()) {
+                MouldCycleRuntime vo = new MouldCycleRuntime();
+                if(entry.getValue().size()>0){
+
+                    vo.setDateStr(entry.getValue().get(0).getDateStr());
+                    vo.setEquipmentNo(entry.getValue().get(0).getEquipmentNo());
+                    int sumRunTime = entry.getValue().stream().collect(Collectors.summingInt(MouldCycleRuntime::getRuntime)).intValue();
+                    vo.setRuntime(sumRunTime);//计算和
+                    vo.setTimeSlot(entry.getValue().get(0).getTimeSlot());
+                    String date = entry.getKey();//处理一下,只要后面的月和日
+                    String[] arr = date.split("-");
+                    String shortDate = arr[1]+"-"+arr[2];
+                    runtimeResult.put(shortDate,vo);
+                }
+            }
+            listMap.put("runtime", runtimeResult);
+        }
+
+
         msg.data = listMap;
         return msg;
     }

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

@@ -17,6 +17,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
+import org.springframework.util.StringUtils;
 
 import javax.annotation.Resource;
 import java.text.SimpleDateFormat;
@@ -207,16 +208,23 @@ public class MouldServiceImpl extends ServiceImpl<MouldMapper, Mould> implements
                 List<ProjectApprove> projectss = projectApproveMapper.selectList(new QueryWrapper<ProjectApprove>().eq("approver_id", userVO.getId()));
                 if (projectss.size() > 0) {
                     for (ProjectApprove projectUser : projectss) {
+                        System.out.println("负责审核的项目ID="+projectUser.getProjectId());
                         set.add(projectUser.getProjectId());
                     }
                 }
                 set.add(-1);
                 moulds = mouldMapper.selectListByConditionByProject(userVO, set);
+                System.out.println("有权限的模具size="+moulds.size());
             }
         } else {
             msg.setError("用户不存在或者未登录");
         }
         List<Integer> mIds = moulds.stream().map(MouldVO::getId).collect(Collectors.toList());
+        System.out.println("=======mouldVO id==="+mouldVO.getId());
+        mIds.stream().forEach(m->{
+            System.out.println("m==="+m.intValue());
+        });
+        System.out.println(mIds.stream().toArray());
         if (!mIds.contains(mouldVO.getId())) {
             msg.setError("你没有该权限!");
             return msg;
@@ -226,7 +234,16 @@ public class MouldServiceImpl extends ServiceImpl<MouldMapper, Mould> implements
             if (null != molding) {
                 mould.setInjectionMolding(molding);
             }
+
             map.put("vo", mould);
+            //加上资产方审批人id, 作为前端的判断条件
+            //发送给审批人
+            ProjectApprove approveVo = projectApproveMapper.selectOne(new QueryWrapper<ProjectApprove>().eq("project_id", mould.getProjectId()).eq("subordinate_type", 0));
+            if (approveVo != null) {
+                map.put("assetApproverId", approveVo.getApproverId());
+            }
+
+
             ProjectVO vo = projectMapper.getProjectById(mould.getProjectId(), user);
             if (null == mould.getProjectId()) {
                 map.put("update", 0);
@@ -679,5 +696,85 @@ public class MouldServiceImpl extends ServiceImpl<MouldMapper, Mould> implements
         }
         return null;
     }
+
+    @Override
+    public HttpRespMsg applyMove(int mouldId, String reason) {
+        HttpRespMsg msg = new HttpRespMsg();
+        Mould mould = new Mould();
+        mould.setId(mouldId);
+        mould.setMoveApplyState(1);
+        mould.setMoveApplyReason(reason);
+        mouldMapper.updateById(mould);
+
+        //发送消息通知
+        Project project = projectMapper.selectById(mouldMapper.selectById(mouldId).getProjectId());
+        mould = mouldMapper.selectById(mouldId);
+        //发送给审批人
+        ProjectApprove approve = projectApproveMapper.selectOne(new QueryWrapper<ProjectApprove>().eq("project_id", project.getId()).eq("subordinate_type", 0));
+        if (approve != null) {
+            NewsNotice notice = new NewsNotice();
+            notice.setContent("申请移模,"+(!StringUtils.isEmpty(mould.getMoveApplyReason())?"原因:"+mould.getMoveApplyReason()+",":"")+"请审批");
+            notice.setNoticeType(0);//待审批
+            notice.setRefId(mouldId);//附带模具id
+            notice.setProjectName(mould.getModelName());
+            notice.setProjectId(mouldId);
+            notice.setBelongType(7);//移模申请
+            newsNoticeMapper.insert(notice);
+            NewsNoticeUser newsNoticeUser = new NewsNoticeUser();
+            newsNoticeUser.setNewsId(notice.getId());
+            newsNoticeUser.setUserId(approve.getApproverId());
+            newsNoticeUser.setIsRead(0);
+            newsNoticeUserMapper.insert(newsNoticeUser);
+        }
+
+
+        return new HttpRespMsg();
+    }
+
+    @Override
+    public HttpRespMsg checkApplyMove(int mouldId, int status) {
+        Mould mould = new Mould();
+        mould.setId(mouldId);
+        mould.setMoveApplyState(status);
+        mouldMapper.updateById(mould);
+
+        //发送通知消息给项目经理
+        mould = mouldMapper.selectById(mouldId);
+        int managerId = projectMapper.selectById(mould.getProjectId()).getManagerId();
+        NewsNotice notice = new NewsNotice();
+        notice.setContent("申请移模"+(status == 2?"已通过,请进行移模操作。":"被驳回"));
+        notice.setNoticeType(0);//待审批
+        notice.setRefId(mouldId);//附带模具id
+        notice.setProjectName(mould.getModelName());
+        notice.setProjectId(mouldId);
+        notice.setBelongType(7);//移模申请
+
+        newsNoticeMapper.insert(notice);
+        NewsNoticeUser newsNoticeUser = new NewsNoticeUser();
+        newsNoticeUser.setNewsId(notice.getId());
+        newsNoticeUser.setUserId(managerId);
+        newsNoticeUser.setIsRead(0);
+        newsNoticeUserMapper.insert(newsNoticeUser);
+
+        return new HttpRespMsg();
+    }
+
+    @Override
+    public HttpRespMsg finishMove(int mouldId) {
+        Mould mould = new Mould();
+        mould.setId(mouldId);
+        mould.setMoveApplyState(0);
+        mouldMapper.updateById(mould);
+        return new HttpRespMsg();
+    }
+
+    @Override
+    public HttpRespMsg changeProducer(int id, int produceCompanyId) {
+        Mould m = new Mould();
+        m.setId(id);
+        m.setProduceCompanyId(produceCompanyId);
+        mouldMapper.updateById(m);
+        return new HttpRespMsg();
+    }
 }
 

+ 92 - 17
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/ProjectFileServiceImpl.java

@@ -22,6 +22,7 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.net.URLEncoder;
+import java.time.LocalDateTime;
 import java.util.List;
 import java.util.UUID;
 
@@ -46,6 +47,12 @@ public class ProjectFileServiceImpl extends ServiceImpl<ProjectFileMapper, Proje
     ProjectMapper projectMapper;
     @Resource
     PdfFileMapper pdfFileMapper;
+    @Resource
+    ProjectApproveMapper projectApproveMapper;
+    @Resource
+    NewsNoticeMapper newsNoticeMapper;
+    @Resource
+    NewsNoticeUserMapper newsNoticeUserMapper;
 
     @Override
     public HttpRespMsg addFile(UserVO userVO, MultipartFile file, String path) {
@@ -88,22 +95,25 @@ public class ProjectFileServiceImpl extends ServiceImpl<ProjectFileMapper, Proje
                                 QcloudUntil.close();
                             }
                         }.start();
-                        //上传完,需要生成pdf
-                        OpenOfficeService openOfficeService = new OpenOfficeService();
-                        String dFile1 = path+UUID.randomUUID().toString().replaceAll("-", "")+".pdf";
-                        openOfficeService.start();
-                        File newFile = new File(dFile1);
-                        if(!newFile .exists()){
-                            openOfficeService.office2PDF(path + fileName,dFile1);
-                            PdfFile pdfFile = new PdfFile();
-                            pdfFile.setPdfUrl("/upload/"+dFile1.substring(path.length()));
-                            pdfFile.setFileId(projectFile.getId());
-                            pdfFile.setType(1);
-                            pdfFile.setRafId(projectFile.getProjectId());
-                            pdfFile.setSourceFileUrl(projectFile.getUrl());
-                            pdfFileMapper.insert(pdfFile);
+                        if (OpenOfficeService.canTransferToPdf(projectFile.getFileType())) {
+                            //上传完,需要生成pdf
+                            OpenOfficeService openOfficeService = new OpenOfficeService();
+                            String dFile1 = path+UUID.randomUUID().toString().replaceAll("-", "")+".pdf";
+                            openOfficeService.start();
+                            File newFile = new File(dFile1);
+                            if(!newFile .exists()){
+                                openOfficeService.office2PDF(path + fileName,dFile1);
+                                PdfFile pdfFile = new PdfFile();
+                                pdfFile.setPdfUrl("/upload/"+dFile1.substring(path.length()));
+                                pdfFile.setFileId(projectFile.getId());
+                                pdfFile.setType(1);
+                                pdfFile.setRafId(projectFile.getProjectId());
+                                pdfFile.setSourceFileUrl(projectFile.getUrl());
+                                pdfFileMapper.insert(pdfFile);
+                            }
+                            openOfficeService.shutdown();
                         }
-                        openOfficeService.shutdown();
+
                     } catch (IOException e) {
                         e.printStackTrace();
                         projectFile = null;
@@ -241,7 +251,44 @@ public class ProjectFileServiceImpl extends ServiceImpl<ProjectFileMapper, Proje
     }
 
     @Override
-    public HttpRespMsg delFile(ProjectFile projectFile, String token) {
+    public HttpRespMsg delFile(ProjectFile projectFile, String token, Integer isPass) {
+        HttpRespMsg msg = new HttpRespMsg();
+        User user = userMapper.selectOne(new QueryWrapper<User>().eq("head_imgurl", token));//当前审批人
+        //查询项目
+//        Project project = projectMapper.selectById(projectFile.getProjectId());
+        if (user == null) {
+            msg.setError("当前用户不存在或者未登录");
+            return msg;
+        } else {
+            if(user != null){
+                projectFile = projectFileMapper.selectById(projectFile.getId());
+                ProjectOperationDynamics dynamics = new ProjectOperationDynamics();
+                dynamics.setProjectId(projectFile.getProjectId());
+                dynamics.setOperatorId(user.getId());
+                dynamics.setOperator(user.getUsername());
+                dynamics.setFileName(projectFile.getFileName());
+                if (isPass == 1) {
+                    //同意
+                    dynamics.setContent("已同意申请,自动删除该文件");
+                    msg.data = projectFileMapper.deleteById(projectFile.getId());
+                } else {
+                    //不同意
+                    dynamics.setContent("拒绝了删除申请");
+                    //更新文件状态
+                    projectFile.setStatus(0);
+                    projectFileMapper.updateById(projectFile);
+                }
+                projectOperationDynamicsMapper.insert(dynamics);
+            }else{
+                msg.setError("当前用户不存在或者未登录");
+                return msg;
+            }
+        }
+        return msg;
+    }
+
+    @Override
+    public HttpRespMsg delFileApplication(ProjectFile projectFile, String token) {
         HttpRespMsg msg = new HttpRespMsg();
         User user = userMapper.selectOne(new QueryWrapper<User>().eq("head_imgurl", token));
         Project project = projectMapper.selectById(projectFileMapper.selectById(projectFile.getId()).getProjectId());
@@ -250,7 +297,35 @@ public class ProjectFileServiceImpl extends ServiceImpl<ProjectFileMapper, Proje
             return msg;
         } else {
             if((Constant.SYS_ID.equals(user.getParentId()) && user.getSubordinateType()==0)||project.getManagerId().equals(user.getId())){
-                msg.data = projectFileMapper.deleteById(projectFile.getId());
+                //修改状态, 发送消息通知资方审批人
+                projectFile.setStatus(1);//删除待审批
+                projectFileMapper.updateById(projectFile);
+                projectFile = projectFileMapper.selectById(projectFile.getId());
+                ProjectOperationDynamics dynamic = new ProjectOperationDynamics();
+                ProjectApprove approve = projectApproveMapper.selectOne(new QueryWrapper<ProjectApprove>().eq("project_id", project.getId()).eq("subordinate_type", 0));
+                dynamic.setContent("申请删除文件,待"+approve.getApproverName()+"审批");
+                dynamic.setFileName(projectFile.getFileName());
+                dynamic.setOperator(user.getUsername());
+                dynamic.setOperatorId(user.getId());
+                dynamic.setProjectId(project.getId());
+                projectOperationDynamicsMapper.insert(dynamic);
+
+                NewsNotice notice = new NewsNotice();
+                notice.setContent("申请删除文件,请审批");
+                notice.setNoticeType(0);//待审批
+                notice.setRefId(projectFile.getId());//附带项目文件id
+                notice.setProjectName(project.getProjectName());
+                notice.setProjectId(project.getId());
+                notice.setBelongType(6);//项目文档类型
+                newsNoticeMapper.insert(notice);
+                //发送给审批人
+                NewsNoticeUser newsNoticeUser = new NewsNoticeUser();
+                newsNoticeUser.setNewsId(notice.getId());
+                newsNoticeUser.setUserId(approve.getApproverId());
+                newsNoticeUser.setIsRead(0);
+                newsNoticeUserMapper.insert(newsNoticeUser);
+
+                msg.data = approve.getApproverName();//返回审批人姓名
             }else{
                 msg.setError("当前用户不存在或者未登录");
                 return msg;

+ 9 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/ProjectServiceImpl.java

@@ -468,6 +468,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         vo.setParticipateUsers(users);
         //处理users按照客户呼和供应商分组
         map.put("vo", vo);
+
+        //当前用户是否为资方审批人
+        ProjectApprove approve = projectApproveMapper.selectOne(new QueryWrapper<ProjectApprove>().eq("project_id", project.getId()).eq("subordinate_type", 0));
+        if (approve != null) {
+            map.put("projectDocApprove", approve.getApproverId().equals(user.getId())?1:0);
+        } else {
+            map.put("projectDocApprove", 0);
+        }
         msg.data = map;
         return msg;
     }
@@ -613,7 +621,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             } else {
                 QueryWrapper<Project> qwPro = new QueryWrapper<>();
                 qwPro.eq("manager_id", user.getId());
-                List<Project> projectList = projectMapper.selectList(qw);
+                List<Project> projectList = projectMapper.selectList(qwPro);
                 for (Project project : projectList) {
                     ides.add(project.getId());
                 }

+ 108 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/UserServiceImpl.java

@@ -1,5 +1,6 @@
 package com.hssx.cloudmodel.service.impl;
 
+import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
@@ -22,6 +23,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.UUID;
 import java.util.stream.Collectors;
+import java.util.stream.IntStream;
 
 /**
  * @author 吴涛涛
@@ -42,6 +44,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
     @Resource
     ProjectApproveMapper projectApproveMapper;
     @Resource
+    AssetCustomCompanyMapper assetCustomCompanyMapper;
+    @Resource
     CustomCompanyMapper customCompanyMapper;
     @Value("${sysPwd}")
     private String sysPwd;
@@ -249,7 +253,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
         //普通用户应用到项目不能删除
         Integer count = projectUserMapper.selectCount(qw);
         if (count > 0) {
-            msg.setError("该用户已被应用到项目,暂不提供删除操作");
+            msg.setError("该用户已被应用到项目,请先从项目中移除");
             return msg;
         }
         //是项目经理不能删除
@@ -280,6 +284,109 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
         return msg;
     }
 
+    @Override
+    public HttpRespMsg detail(Integer userId) {
+        HttpRespMsg msg = new HttpRespMsg();
+        User user = userMapper.selectById(userId);
+        String account = user.getAccount();
+        UserVO vo = new UserVO();
+        vo.setAccount(account);
+        UserVO userVO = userMapper.getUserByAccount(vo);
+
+        List<Project> projects = new ArrayList<>();
+        {
+            List<Integer> set = new ArrayList<>();
+            set.add(-1);
+            if (userVO.getId() != null) {
+                //项目经理或者普通用户
+                QueryWrapper<Project> qwPro = new QueryWrapper<>();
+                qwPro.eq("manager_id", userVO.getId());
+                List<Project> projectList = projectMapper.selectList(qwPro);
+                for (Project project : projectList) {
+                    set.add(project.getId());
+                }
+                List<ProjectUser> projectUsers = projectUserMapper.selectList(new QueryWrapper<ProjectUser>().eq("user_id", userVO.getId()));
+                for (ProjectUser projectUser : projectUsers) {
+                    set.add(projectUser.getProjectId());
+                }
+                //作为审批人
+                List<ProjectApprove> projectApproves = projectApproveMapper.selectList(new QueryWrapper<ProjectApprove>().eq("approver_id", userVO.getId()));
+                for (ProjectApprove projectApprove : projectApproves) {
+                    set.add(projectApprove.getProjectId());
+                }
+                projects = projectMapper.selectList(new QueryWrapper<Project>().in("id", set));
+                userVO.setProjects(projects);
+            }
+        }
+        msg.data = userVO;
+        return msg;
+    }
+
+    @Override
+    public HttpRespMsg transferProject(Integer fromUid, Integer toUid, String projects) {
+        HttpRespMsg msg = new HttpRespMsg();
+        String toName = userMapper.selectById(toUid).getUsername();
+        List<Integer> ids = ListUtil.convertIdsFromJSONArray(projects);
+        List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().in("id", ids));
+
+        //担任项目经理
+        QueryWrapper projectQuery = new QueryWrapper<Project>().eq("manager_id", fromUid).in("id", ids);
+        Integer managerCount = projectMapper.selectCount(projectQuery);
+        if (managerCount > 0) {
+            Project p = new Project();
+            p.setManagerId(toUid);
+            p.setManager(toName);
+            projectMapper.update(p, projectQuery);
+        }
+
+        //担任参与者
+        QueryWrapper<ProjectUser> queryWrapper = new QueryWrapper<ProjectUser>().in("project_id", ids).eq("user_id", fromUid);
+        Integer count = projectUserMapper.selectCount(queryWrapper);
+        if (count > 0) {
+            ProjectUser projectUser = new ProjectUser();
+            projectUser.setUserId(toUid);
+            projectUserMapper.update(projectUser, queryWrapper);
+        }
+
+        //担任审批人
+        QueryWrapper<ProjectApprove> approveQueryWrapper = new QueryWrapper<ProjectApprove>().in("project_id", ids).eq("approver_id", fromUid);
+        Integer approveCount = projectApproveMapper.selectCount(approveQueryWrapper);
+        if (approveCount > 0) {
+            ProjectApprove approve = new ProjectApprove();
+            approve.setApproverId(toUid);
+            approve.setApproverName(toName);
+            projectApproveMapper.update(approve, approveQueryWrapper);
+        }
+
+        return msg;
+    }
+
+    @Override
+    public HttpRespMsg getAllAvailableUserList(Integer userId) {
+        HttpRespMsg msg = new HttpRespMsg();
+        User user = userMapper.selectById(userId);
+        int compId = user.getCompanyId();
+        List<User> users = new ArrayList<>();
+        List<Project> projects = projectMapper.selectList(new QueryWrapper<Project>().eq("manager_id", userId));
+        if (Constant.SYS_PARENT_ID.equals(user.getParentId())) {
+            //超级管理员
+            users = userMapper.selectList(new QueryWrapper<User>().ne("parent_id", 0));
+        } else if (Constant.SYS_ID.equals(user.getParentId())) {
+            //只有资产方管理员有权限,获取该公司下的所有人员,包括相关的生产方的人员
+            if (user.getSubordinateType().equals(0)) {
+                List<Integer> integerList = new ArrayList<>();
+                integerList.add(compId);
+                //相关的生产方的公司
+                List<AssetCustomCompany> assertId = assetCustomCompanyMapper.selectList(new QueryWrapper<AssetCustomCompany>().eq("assert_id", compId));
+                int[] toArray = assertId.stream().mapToInt(AssetCustomCompany::getCustomId).toArray();
+                integerList.addAll(ListUtil.convertFromIntArray(toArray));
+                users = userMapper.selectList(new QueryWrapper<User>().in("company_id", integerList));
+            }
+        }
+        msg.data = users;
+        return msg;
+    }
+
     @Override
     public HttpRespMsg addAndUpdateUser(User user, Integer flag, Integer addType, String projectIds) {
         //获取该账号的创建者

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

@@ -210,12 +210,12 @@ public class CodeGenerator {
         //若想要生成的实体类继承某个Controller,则可打开下面注释。写上需要继承的Controller的位置即可
 //        strategy.setSuperControllerClass("com.baomidou.ant.common.BaseController");
         //此处user是表名,多个英文逗号分割
-        strategy.setInclude("vulnerable_parts");
+        strategy.setInclude("equipment_rec_command");
 //        strategy.setExclude();//数据库表全生成
 //        strategy.setInclude(scanner("user").split(","));//表名,多个英文逗号分割
         strategy.setControllerMappingHyphenStyle(true);
         //数据库表前缀,不配置这行的话,生成的类会带有T如:TUser,配置后即可将前缀去掉
-//        strategy.setTablePrefix("tb_");
+        strategy.setTablePrefix("tb_");
         mpg.setStrategy(strategy);
 //        mpg.setTemplateEngine(new FreemarkerTemplateEngine());
         mpg.execute();

+ 19 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/util/ListUtil.java

@@ -1,5 +1,7 @@
 package com.hssx.cloudmodel.util;
 
+import com.alibaba.fastjson.JSONArray;
+
 import java.lang.reflect.Field;
 import java.util.ArrayList;
 import java.util.HashSet;
@@ -12,6 +14,14 @@ import java.util.List;
  */
 
 public class ListUtil {
+
+	public static List<Integer> convertFromIntArray(int[] array) {
+		List<Integer> integers = new ArrayList<>();
+		for (int i : array) {
+			integers.add(i);
+		}
+		return integers;
+	}
 	/**
 	 * 
 	 * @param idStr 1,2,3,4,5字符串
@@ -59,6 +69,15 @@ public class ListUtil {
 		return ids;
 	}
 
+	public static List<Integer> convertIdsFromJSONArray(String idArray) {
+		JSONArray array = JSONArray.parseArray(idArray);
+		List<Integer> ids = new ArrayList<Integer>();
+		for (int i=0;i<array.size(); i++) {
+			ids.add(array.getInteger(i));
+		}
+		return ids;
+	}
+
 	public static List<Integer> extractIdFromList(List object, String key) {
 		List<Integer> list = new ArrayList<Integer>();
         for (Object obj : object) {

+ 12 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/util/OpenOfficeService.java

@@ -20,6 +20,18 @@ public class OpenOfficeService {
 
 	private static OfficeManager officeManager;
 
+	public static boolean canTransferToPdf(String suffix) {
+		if (".doc".equals(suffix) || ".docx".equals(suffix)
+		|| ".xls".equals(suffix) || ".xlsx".equals(suffix)
+		|| ".ppt".equals(suffix) || ".pptx".equals(suffix)
+		|| ".jpg".equals(suffix) || ".png".equals(suffix)
+		|| ".bmp".equals(suffix) || ".jpeg".equals(suffix)
+		|| ".txt".equals(suffix)) {
+			return true;
+		} else {
+			return false;
+		}
+	}
 	/**
 	 * 启动openoffice服务
 	 */

+ 5 - 2
cloud-model/src/main/java/com/hssx/cloudmodel/util/QcloudUntil.java

@@ -60,8 +60,11 @@ public class QcloudUntil {
 // 设置 bucket 的权限为 PublicRead(公有读私有写), 其他可选有私有读写, 公有读写
         createBucketRequest.setCannedAcl(CannedAccessControlList.PublicRead);
         try {
-            //创建存储桶
-            Bucket bucketResult = cosClient.createBucket(createBucketRequest);
+            //如果不存在,创建存储桶
+            if (!cosClient.doesBucketExist(bucket)) {
+                Bucket bucketResult = cosClient.createBucket(createBucketRequest);
+            }
+
         } catch (CosServiceException serverException) {
             serverException.printStackTrace();
         } catch (CosClientException clientException) {

+ 51 - 21
cloud-model/src/main/resources/mapper/CompanyMapper.xml

@@ -10,11 +10,17 @@
         <result column="company_type" property="companyType" />
         <result column="administrator_id" property="administratorId" />
         <result column="administrator" property="administrator" />
+        <result column="contact" property="contact" />
+        <result column="contact_phone" property="contactPhone" />
+        <result column="setup_date" property="setupDate" />
+        <result column="prop" property="prop" />
+        <result column="running_time" property="runningTime" />
+        <result column="area" property="area" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, company_name, company_address, company_type, administrator_id, administrator
+        id, company_name, company_address, company_type, administrator_id, administrator, contact, contact_phone, setup_date, prop, running_time, area
     </sql>
 
     <resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.CompanyVO">
@@ -24,6 +30,12 @@
         <result column="companytype" property="companyType" />
         <result column="administrator_id" property="administratorId" />
         <result column="administrator" property="administrator" />
+        <result column="contact" property="contact" />
+        <result column="contact_phone" property="contactPhone" />
+        <result column="setup_date" property="setupDate" />
+        <result column="prop" property="prop" />
+        <result column="running_time" property="runningTime" />
+        <result column="area" property="area" />
         <result column="y_lng" property="yLng" />
         <result column="x_lat" property="xLat" />
         <collection property="relateCompanyList" javaType="java.util.List" select="selectRelateCompanyList"
@@ -43,22 +55,24 @@
 
 
     <!--<select id="getListByKeyName" resultMap="BaseResultMapVO">-->
-        <!--select-->
-        <!--<include refid="Base_Column_List"/>-->
-        <!--from-->
-        <!--tb_company-->
-        <!--<where>-->
-            <!--<if test="keyName != null and keyName != ''">-->
-                <!--and company_name like concat('%',#{keyName},'%')-->
-            <!--</if>-->
-            <!--<if test="companyType != null">-->
-                <!--and company_type = #{companyType}-->
-            <!--</if>-->
-        <!--</where>-->
+    <!--select-->
+    <!--<include refid="Base_Column_List"/>-->
+    <!--from-->
+    <!--tb_company-->
+    <!--<where>-->
+    <!--<if test="keyName != null and keyName != ''">-->
+    <!--and company_name like concat('%',#{keyName},'%')-->
+    <!--</if>-->
+    <!--<if test="companyType != null">-->
+    <!--and company_type = #{companyType}-->
+    <!--</if>-->
+    <!--</where>-->
     <!--</select>-->
     <select id="getCustomerListByKeyName" resultMap="BaseResultMapVO">
         select
-        t.id, t.company_name, t.company_address, t.company_type companytype,t.administrator_id,t.administrator,tc.y_lng, tc.x_lat
+        t.id, t.company_name, t.company_address, t.company_type companytype,t.administrator_id,t.administrator,
+        contact, contact_phone, setup_date, prop, running_time, area,
+        tc.y_lng, tc.x_lat
         from
         tb_company t
         left join
@@ -73,8 +87,24 @@
             </if>
         </where>
     </select>
+    <select id="getCustomerDetailById" resultMap="BaseResultMapVO">
+        select
+        t.id, t.company_name, t.company_address, t.company_type companytype,t.administrator_id,t.administrator,
+        contact, contact_phone, setup_date, prop, running_time, area,
+        tc.y_lng, tc.x_lat
+        from
+        tb_company t
+        left join
+        tb_lng_lat_company tc
+        on tc.company_id = t.id
+        <where>
+            <if test="id != null">
+                and t.id = #{id}
+            </if>
+        </where>
+    </select>
     <select id="selectRelateCompanyList" resultType="com.hssx.cloudmodel.entity.Company" parameterType="java.util.Map">
-      SELECT
+        SELECT
         t.id, t.company_name,t.company_type
         from
         tb_asset_custom_company tbcc
@@ -87,12 +117,12 @@
             on t.id = tbcc.assert_id
         </if>
         <where>
-          <if test="companyType == 0">
-              tbcc.assert_id = #{Id}
-          </if>
-          <if test="companyType == 1">
-              tbcc.custom_id = #{Id}
-          </if>
+            <if test="companyType == 0">
+                tbcc.assert_id = #{Id}
+            </if>
+            <if test="companyType == 1">
+                tbcc.custom_id = #{Id}
+            </if>
         </where>
 
     </select>

+ 19 - 0
cloud-model/src/main/resources/mapper/EquipmentRecCommandMapper.xml

@@ -0,0 +1,19 @@
+<?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.EquipmentRecCommandMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.EquipmentRecCommand">
+        <id column="id" property="id" />
+        <result column="equipment_no" property="equipmentNo" />
+        <result column="cmd" property="cmd" />
+        <result column="indate" property="indate" />
+        <result column="cmd_txt" property="cmdTxt" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, equipment_no, cmd, indate, cmd_txt
+    </sql>
+
+</mapper>

+ 19 - 4
cloud-model/src/main/resources/mapper/MouldEquipmentMapper.xml

@@ -21,13 +21,14 @@
         <result column="sim" property="sim" />
         <result column="curhill_number" property="curhillNumber" />
         <result column="curtemperature" property="curtemperature" />
+        <result column="lastopentime" property="lastopentime" />
+        <result column="has_new_message" property="hasNewMessage" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, equipment_name, start_time, end_time, use_life, belong_company_id, equipment_no, is_use, hill_number, lng, lat, temperature, agent, stage, sim, curhill_number, curtemperature
+        id, equipment_name, start_time, end_time, use_life, belong_company_id, equipment_no, is_use, hill_number, lng, lat, temperature, agent, stage, sim, curhill_number, curtemperature, lastopentime, has_new_message
     </sql>
-
     <resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.MouldEquipmentVO">
         <id column="id" property="id" />
         <result column="equipment_name" property="equipmentName" />
@@ -47,13 +48,14 @@
         <result column="sim" property="sim" />
         <result column="alarmBattery" property="alarmBattery" />
         <result column="alarmDegree" property="alarmDegree" />
+        <result column="has_new_message" property="hasNewMessage" />
     </resultMap>
 
     <select id="getListByCompanyId" resultMap="BaseResultMapVO">
         select
         tbme.id id, tbme.equipment_name equipment_name, tbme.start_time start_time, tbme.end_time end_time,
         tbme.use_life use_life, tbme.belong_company_id belong_company_id, tbme.equipment_no equipment_no,
-        tbme.is_use, tbme.hill_number,tbc.company_name companyName,tbme.agent,tbme.stage
+        tbme.is_use, tbme.hill_number,tbc.company_name companyName,tbme.agent,tbme.stage, tbme.has_new_message
         from
         tb_mould_equipment tbme
         left join
@@ -77,7 +79,7 @@
         tbme.is_use, tbme.curhill_number hill_number,
         tbme.curtemperature temperature,tbc.company_name companyName,
         tbm.model_no modelNo,tbme.temperature alarmDegree,tbme.hill_number alarmBattery,
-        tbm.model_name modelName,tbme.stage
+        tbm.model_name modelName,tbme.stage, tbme.has_new_message has_new_message
         from
         tb_mould_equipment tbme
         left join
@@ -96,4 +98,17 @@
             </if>
         </where>
     </select>
+
+    <insert id="batchInsert" parameterType="java.util.List">
+        insert into tb_mould_equipment(equipment_no, equipment_name, belong_company_id, use_life, agent) values
+        <foreach collection="list" item="item" index="index" separator=",">
+            (
+            #{item.equipmentNo,jdbcType=VARCHAR},
+            #{item.equipmentName,jdbcType=VARCHAR},
+            #{item.belongCompanyId,jdbcType=INTEGER},
+            #{item.useLife,jdbcType=INTEGER},
+            #{item.agent,jdbcType=VARCHAR}
+            )
+        </foreach>
+    </insert>
 </mapper>

+ 18 - 1
cloud-model/src/main/resources/mapper/MouldHistoryTimeMapper.xml

@@ -14,6 +14,8 @@
     <resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.MouldHistoryVO">
         <result column="run_cnt" property="runCnt"/>
         <result column="time" property="time"/>
+        <result column="max_cost" property="maxCost"/>
+        <result column="min_cost" property="minCost"/>
     </resultMap>
 
     <!-- 通用查询结果列 -->
@@ -22,7 +24,7 @@
     </sql>
     <select id="getOpeningAndClosingTimesChartCycle" resultMap="BaseResultMapVO">
         select
-        DATE_FORMAT(open_time,'%H') time ,time_cost run_cnt
+         DATE_FORMAT(open_time,'%H') time ,time_cost run_cnt
         from
         `mould_history_time`
         <where>
@@ -34,6 +36,21 @@
         </where>
         ORDER BY open_time
     </select>
+    <!--某个日期范围内的 ,按天展示数据 -->
+    <select id="getOpeningAndClosingTimesChartCycleByDatePeriod" resultMap="BaseResultMapVO">
+        select
+        DATE_FORMAT(open_time,'%m-%d') time ,CAST(AVG(time_cost) AS SIGNED) AS run_cnt, MAX(time_cost) AS max_cost, MIN(time_cost) AS min_cost
+        from
+        `mould_history_time`
+        <where>
+            equipment_no = #{equipmentNo}
+            <if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
+                AND DATE_FORMAT(open_time,'%Y-%m-%d') between #{startDate} and #{endDate}
+            </if>
+            and time_cost BETWEEN #{minCycle} AND #{maxCycle}
+        </where>
+        GROUP BY DATE_FORMAT(open_time,'%Y-%m-%d') ORDER BY DATE_FORMAT(open_time,'%Y-%m-%d')
+    </select>
     <select id="getOpeningAndClosingTimesChartCycleExcel" resultMap="BaseResultMap">
         select
         history_id, seq, close_time, open_time, time_cost, equipment_no

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

@@ -31,15 +31,20 @@
         <result column="holes" property="holes" />
         <result column="pre_update_id" property="preUpdateId" />
         <result column="history_run_times" property="historyRunTimes" />
+        <result column="last_rec_time" property="lastRecTime" />
+        <result column="fixed_maintain_count" property="fixedMaintainCount" />
+        <result column="move_apply_state" property="moveApplyState" />
+        <result column="move_apply_reason" property="moveApplyReason" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, model_no, model_name, water_gap, tonnage, oc_cycle, daily_output, company_id, current_version_id, state, is_delete, creator_id, project_id, rfid, setting_life, area, produce_company_name, initial_modulus, equipment_id, belong_project_grade, produce_company_id, run_times, is_maintain, maintain_count, holes, pre_update_id, history_run_times
+        id, model_no, model_name, water_gap, tonnage, oc_cycle, daily_output, company_id, current_version_id, state, is_delete, creator_id, project_id, rfid, setting_life, area, produce_company_name, initial_modulus, equipment_id, belong_project_grade, produce_company_id, run_times, is_maintain, maintain_count, holes, pre_update_id, history_run_times, last_rec_time, fixed_maintain_count, move_apply_state, move_apply_reason
     </sql>
     <resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.MouldVO">
         <id column="id" property="id"/>
         <result column="maintain_count" property="maintainCount" />
+        <result column="fixed_maintain_count" property="fixedMaintainCount" />
         <result column="model_no" property="modelNo"/>
         <result column="model_name" property="modelName"/>
         <result column="oc_cycle" property="ocCycle"/>
@@ -78,6 +83,9 @@
         <result column="lat" property="lat" />
         <result column="equipmentName" property="equipmentName" />
         <result column="pre_update_id" property="preUpdateId" />
+        <result column="move_apply_state" property="moveApplyState" />
+        <result column="move_apply_reason" property="moveApplyReason" />
+        <result column="start_time" property="startTime" />
     </resultMap>
 
     <update id="updateMouldByProjectId">
@@ -91,7 +99,8 @@
         tbp.manager mangerName,tbco.company_address area,tbm.oc_cycle oc_cycle,tbp.manager_id managerId,tbmp.equipment_name equipmentName,
         tbmp.equipment_no equipmentNo,tbm.setting_life setting_life,tbp.owner_company_name ownerCompanyName,tbm.run_times run_times,
         tbmp.lng,tbmp.lat,tbmp.stage,tbmp.lastopentime
-        ,tbmp.curhill_number hillNumber,tbmp.curtemperature temperature
+        ,tbmp.curhill_number hillNumber,tbmp.curtemperature temperature,
+        tbm.produce_company_id produce_company_id,tbm.move_apply_state, tbmp.start_time
         from
         tb_mould tbm
         left join
@@ -119,6 +128,9 @@
             <if test="userVO.searchType == 1 and userVO.keyName != '' and userVO.keyName != null">
                 AND tbm.model_name like concat('%',#{userVO.keyName},'%')
             </if>
+            <if test="userVO.searchType == 2 and userVO.keyName != '' and userVO.keyName != null">
+                AND tbmp.equipment_name like concat('%',#{userVO.keyName},'%')
+            </if>
             <if test="userVO.projectId != -1">
                 AND tbm.project_id = #{userVO.projectId}
             </if>
@@ -142,7 +154,8 @@
         tbmp.equipment_no equipmentNo,tbm.setting_life setting_life,tbp.owner_company_name ownerCompanyName,tbm.run_times run_times,
         tbmp.lng,tbmp.lat,tbmp.stage,tbmp.lastopentime,
         tbmp.curhill_number hillNumber,
-        tbmp.curtemperature temperature
+        tbmp.curtemperature temperature,
+        tbm.produce_company_id produce_company_id,tbm.move_apply_state, tbmp.start_time
         from
         tb_mould tbm
         left join
@@ -168,6 +181,9 @@
             <if test="userVO.searchType == 1 and userVO.keyName != '' and userVO.keyName != null">
                 AND tbm.model_name like concat('%',#{userVO.keyName},'%')
             </if>
+            <if test="userVO.searchType == 2 and userVO.keyName != '' and userVO.keyName != null">
+                AND tbmp.equipment_name like concat('%',#{userVO.keyName},'%')
+            </if>
             <if test="userVO.mouleMap == -1">
                 AND tbmp.lng IS NOT NULL and tbmp.lat IS NOT NULL
                 AND tbp.is_delete = 0
@@ -183,18 +199,19 @@
                      open="(" separator="," close=")">
                 #{item}
             </foreach>
-            AND tbm.produce_company_id =#{userVO.companyId}
+            AND (tbm.produce_company_id =#{userVO.companyId} or tbm.company_id = #{userVO.companyId})
         </where>
     </select>
 
     <select id="getDetailById" resultMap="BaseResultMapVO">
     select
-        tbm.project_id project_id, tbm.setting_life setting_life,tbm.equipment_id equipment_id,tbm.maintain_count maintain_count,is_maintain,
+        tbm.project_id project_id, tbm.setting_life setting_life,tbm.equipment_id equipment_id,tbm.maintain_count maintain_count,tbm.fixed_maintain_count fixed_maintain_count, is_maintain,
         tbm.id id,tbm.model_no model_no, tbm.model_name,tbm.initial_modulus initial_modulus,tbp.manager_id managerId,tbm.produce_company_id produce_company_id,
         tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbco.company_name produceCompany,tbm.creator_id creator_id,tbm.holes,
         tbp.manager mangerName,tbco.company_address area,tbm.rfid rfid,tbm.oc_cycle oc_cycle,tbc.company_name companyName,tbm.pre_update_id,tbmp.equipment_name equipmentName,
         tbmp.equipment_no equipmentNo,tbmp.curhill_number hillNumber,
-        tbmp.curtemperature temperature,tbm.setting_life setting_life,tbm.run_times run_times,tbmp.stage
+        tbmp.curtemperature temperature,tbm.setting_life setting_life,tbm.run_times run_times,tbmp.stage,tbm.move_apply_state,tbm.move_apply_reason,
+        tbmp.start_time
         from
         tb_mould tbm
         left join
@@ -255,6 +272,4 @@
           SET /*project_id = NULL , */equipment_id = NULL
           where id = #{model.id}
     </update>
-
-
 </mapper>

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

@@ -13,11 +13,12 @@
         <result column="file_type" property="fileType" />
         <result column="file_size" property="fileSize" />
         <result column="indate" property="indate" />
+        <result column="status" property="status" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, project_id, uploader_id, uploader, file_name, url, file_type, file_size, indate
+        id, project_id, uploader_id, uploader, file_name, url, file_type, file_size, indate, status
     </sql>
 
 </mapper>

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

@@ -16,7 +16,7 @@
 <!--     <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" >
+    <table schema="cloud_model" tableName="equipment_rec_command" >
     	<generatedKey column="id" identity="true" sqlStatement="SELECT LAST_INSERT_ID()"/>
     </table>
 <!--     <table schema="cloud_model" tableName="tb_factory" > -->

+ 77 - 0
cloud-socket/src/com/js/kbt/mapper/EquipmentRecCommandMapper.java

@@ -0,0 +1,77 @@
+package com.js.kbt.mapper;
+
+import com.js.kbt.model.EquipmentRecCommand;
+import com.js.kbt.model.EquipmentRecCommandExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface EquipmentRecCommandMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	long countByExample(EquipmentRecCommandExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	int deleteByExample(EquipmentRecCommandExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	int insert(EquipmentRecCommand record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	int insertSelective(EquipmentRecCommand record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	List<EquipmentRecCommand> selectByExample(EquipmentRecCommandExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	EquipmentRecCommand selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	int updateByExampleSelective(@Param("record") EquipmentRecCommand record,
+			@Param("example") EquipmentRecCommandExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	int updateByExample(@Param("record") EquipmentRecCommand record,
+			@Param("example") EquipmentRecCommandExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	int updateByPrimaryKeySelective(EquipmentRecCommand record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	int updateByPrimaryKey(EquipmentRecCommand record);
+}

+ 286 - 0
cloud-socket/src/com/js/kbt/mapper/EquipmentRecCommandMapper.xml

@@ -0,0 +1,286 @@
+<?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.EquipmentRecCommandMapper">
+  <resultMap id="BaseResultMap" type="com.js.kbt.model.EquipmentRecCommand">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Aug 01 22:48:02 CST 2020.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="equipment_no" jdbcType="VARCHAR" property="equipmentNo" />
+    <result column="cmd" jdbcType="VARCHAR" property="cmd" />
+    <result column="indate" jdbcType="TIMESTAMP" property="indate" />
+    <result column="cmd_txt" jdbcType="VARCHAR" property="cmdTxt" />
+  </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 Sat Aug 01 22:48:02 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 Sat Aug 01 22:48:02 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 Sat Aug 01 22:48:02 CST 2020.
+    -->
+    id, equipment_no, cmd, indate, cmd_txt
+  </sql>
+  <select id="selectByExample" parameterType="com.js.kbt.model.EquipmentRecCommandExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Aug 01 22:48:02 CST 2020.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from equipment_rec_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 Sat Aug 01 22:48:02 CST 2020.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from equipment_rec_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 Sat Aug 01 22:48:02 CST 2020.
+    -->
+    delete from equipment_rec_command
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.js.kbt.model.EquipmentRecCommandExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Aug 01 22:48:02 CST 2020.
+    -->
+    delete from equipment_rec_command
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.js.kbt.model.EquipmentRecCommand">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Aug 01 22:48:02 CST 2020.
+    -->
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into equipment_rec_command (equipment_no, cmd, indate, 
+      cmd_txt)
+    values (#{equipmentNo,jdbcType=VARCHAR}, #{cmd,jdbcType=VARCHAR}, #{indate,jdbcType=TIMESTAMP}, 
+      #{cmdTxt,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.js.kbt.model.EquipmentRecCommand">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Aug 01 22:48:02 CST 2020.
+    -->
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into equipment_rec_command
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="equipmentNo != null">
+        equipment_no,
+      </if>
+      <if test="cmd != null">
+        cmd,
+      </if>
+      <if test="indate != null">
+        indate,
+      </if>
+      <if test="cmdTxt != null">
+        cmd_txt,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="equipmentNo != null">
+        #{equipmentNo,jdbcType=VARCHAR},
+      </if>
+      <if test="cmd != null">
+        #{cmd,jdbcType=VARCHAR},
+      </if>
+      <if test="indate != null">
+        #{indate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="cmdTxt != null">
+        #{cmdTxt,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.js.kbt.model.EquipmentRecCommandExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Aug 01 22:48:02 CST 2020.
+    -->
+    select count(*) from equipment_rec_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 Sat Aug 01 22:48:02 CST 2020.
+    -->
+    update equipment_rec_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.cmd != null">
+        cmd = #{record.cmd,jdbcType=VARCHAR},
+      </if>
+      <if test="record.indate != null">
+        indate = #{record.indate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.cmdTxt != null">
+        cmd_txt = #{record.cmdTxt,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 Sat Aug 01 22:48:02 CST 2020.
+    -->
+    update equipment_rec_command
+    set id = #{record.id,jdbcType=INTEGER},
+      equipment_no = #{record.equipmentNo,jdbcType=VARCHAR},
+      cmd = #{record.cmd,jdbcType=VARCHAR},
+      indate = #{record.indate,jdbcType=TIMESTAMP},
+      cmd_txt = #{record.cmdTxt,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.js.kbt.model.EquipmentRecCommand">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Aug 01 22:48:02 CST 2020.
+    -->
+    update equipment_rec_command
+    <set>
+      <if test="equipmentNo != null">
+        equipment_no = #{equipmentNo,jdbcType=VARCHAR},
+      </if>
+      <if test="cmd != null">
+        cmd = #{cmd,jdbcType=VARCHAR},
+      </if>
+      <if test="indate != null">
+        indate = #{indate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="cmdTxt != null">
+        cmd_txt = #{cmdTxt,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.js.kbt.model.EquipmentRecCommand">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Aug 01 22:48:02 CST 2020.
+    -->
+    update equipment_rec_command
+    set equipment_no = #{equipmentNo,jdbcType=VARCHAR},
+      cmd = #{cmd,jdbcType=VARCHAR},
+      indate = #{indate,jdbcType=TIMESTAMP},
+      cmd_txt = #{cmdTxt,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

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

@@ -9,69 +9,69 @@ public interface EquipmentSendCommandMapper {
 
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 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  Fri Apr 10 11:50:44 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:08:45 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	int updateByPrimaryKey(EquipmentSendCommand record);
 }

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

@@ -5,7 +5,7 @@
     <!--
       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.
+      This element was generated on Sat Aug 01 22:08:45 CST 2020.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="equipment_no" jdbcType="VARCHAR" property="equipmentNo" />
@@ -20,7 +20,7 @@
     <!--
       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.
+      This element was generated on Sat Aug 01 22:08:45 CST 2020.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -54,7 +54,7 @@
     <!--
       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.
+      This element was generated on Sat Aug 01 22:08:45 CST 2020.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -88,7 +88,7 @@
     <!--
       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.
+      This element was generated on Sat Aug 01 22:08:45 CST 2020.
     -->
     id, equipment_no, uid, indate, send_time, cmd, is_send, param
   </sql>
@@ -96,7 +96,7 @@
     <!--
       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.
+      This element was generated on Sat Aug 01 22:08:45 CST 2020.
     -->
     select
     <if test="distinct">
@@ -115,7 +115,7 @@
     <!--
       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.
+      This element was generated on Sat Aug 01 22:08:45 CST 2020.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -126,7 +126,7 @@
     <!--
       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.
+      This element was generated on Sat Aug 01 22:08:45 CST 2020.
     -->
     delete from equipment_send_command
     where id = #{id,jdbcType=INTEGER}
@@ -135,7 +135,7 @@
     <!--
       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.
+      This element was generated on Sat Aug 01 22:08:45 CST 2020.
     -->
     delete from equipment_send_command
     <if test="_parameter != null">
@@ -146,7 +146,7 @@
     <!--
       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.
+      This element was generated on Sat Aug 01 22:08:45 CST 2020.
     -->
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
       SELECT LAST_INSERT_ID()
@@ -162,7 +162,7 @@
     <!--
       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.
+      This element was generated on Sat Aug 01 22:08:45 CST 2020.
     -->
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
       SELECT LAST_INSERT_ID()
@@ -219,7 +219,7 @@
     <!--
       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.
+      This element was generated on Sat Aug 01 22:08:45 CST 2020.
     -->
     select count(*) from equipment_send_command
     <if test="_parameter != null">
@@ -230,7 +230,7 @@
     <!--
       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.
+      This element was generated on Sat Aug 01 22:08:45 CST 2020.
     -->
     update equipment_send_command
     <set>
@@ -267,7 +267,7 @@
     <!--
       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.
+      This element was generated on Sat Aug 01 22:08:45 CST 2020.
     -->
     update equipment_send_command
     set id = #{record.id,jdbcType=INTEGER},
@@ -286,7 +286,7 @@
     <!--
       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.
+      This element was generated on Sat Aug 01 22:08:45 CST 2020.
     -->
     update equipment_send_command
     <set>
@@ -318,7 +318,7 @@
     <!--
       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.
+      This element was generated on Sat Aug 01 22:08:45 CST 2020.
     -->
     update equipment_send_command
     set equipment_no = #{equipmentNo,jdbcType=VARCHAR},

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

@@ -9,68 +9,68 @@ public interface TbMouldEquipmentMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	long countByExample(TbMouldEquipmentExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	int deleteByExample(TbMouldEquipmentExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	int deleteByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	int insert(TbMouldEquipment record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	int insertSelective(TbMouldEquipment record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	List<TbMouldEquipment> selectByExample(TbMouldEquipmentExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	TbMouldEquipment selectByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	int updateByExampleSelective(@Param("record") TbMouldEquipment record,
 			@Param("example") TbMouldEquipmentExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	int updateByExample(@Param("record") TbMouldEquipment record, @Param("example") TbMouldEquipmentExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	int updateByPrimaryKeySelective(TbMouldEquipment record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	int updateByPrimaryKey(TbMouldEquipment record);
 }

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

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+      This element was generated on Sat Aug 01 22:19:04 CST 2020.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="equipment_name" jdbcType="VARCHAR" property="equipmentName" />
@@ -25,12 +25,13 @@
     <result column="curhill_number" jdbcType="VARCHAR" property="curhillNumber" />
     <result column="curtemperature" jdbcType="INTEGER" property="curtemperature" />
     <result column="lastopentime" jdbcType="TIMESTAMP" property="lastopentime" />
+    <result column="has_new_message" jdbcType="INTEGER" property="hasNewMessage" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+      This element was generated on Sat Aug 01 22:19:04 CST 2020.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -64,7 +65,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+      This element was generated on Sat Aug 01 22:19:04 CST 2020.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -98,17 +99,17 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+      This element was generated on Sat Aug 01 22:19:04 CST 2020.
     -->
     id, equipment_name, start_time, end_time, use_life, belong_company_id, equipment_no, 
     is_use, hill_number, lng, lat, temperature, agent, stage, sim, curhill_number, curtemperature, 
-    lastopentime
+    lastopentime, has_new_message
   </sql>
   <select id="selectByExample" parameterType="com.js.kbt.model.TbMouldEquipmentExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+      This element was generated on Sat Aug 01 22:19:04 CST 2020.
     -->
     select
     <if test="distinct">
@@ -127,7 +128,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+      This element was generated on Sat Aug 01 22:19:04 CST 2020.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -138,7 +139,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+      This element was generated on Sat Aug 01 22:19:04 CST 2020.
     -->
     delete from tb_mould_equipment
     where id = #{id,jdbcType=INTEGER}
@@ -147,7 +148,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+      This element was generated on Sat Aug 01 22:19:04 CST 2020.
     -->
     delete from tb_mould_equipment
     <if test="_parameter != null">
@@ -158,7 +159,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+      This element was generated on Sat Aug 01 22:19:04 CST 2020.
     -->
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
       SELECT LAST_INSERT_ID()
@@ -168,19 +169,21 @@
       is_use, hill_number, lng, 
       lat, temperature, agent, 
       stage, sim, curhill_number, 
-      curtemperature, lastopentime)
+      curtemperature, lastopentime, has_new_message
+      )
     values (#{equipmentName,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, 
       #{useLife,jdbcType=INTEGER}, #{belongCompanyId,jdbcType=INTEGER}, #{equipmentNo,jdbcType=VARCHAR}, 
       #{isUse,jdbcType=INTEGER}, #{hillNumber,jdbcType=VARCHAR}, #{lng,jdbcType=DOUBLE}, 
       #{lat,jdbcType=DOUBLE}, #{temperature,jdbcType=INTEGER}, #{agent,jdbcType=VARCHAR}, 
       #{stage,jdbcType=INTEGER}, #{sim,jdbcType=VARCHAR}, #{curhillNumber,jdbcType=VARCHAR}, 
-      #{curtemperature,jdbcType=INTEGER}, #{lastopentime,jdbcType=TIMESTAMP})
+      #{curtemperature,jdbcType=INTEGER}, #{lastopentime,jdbcType=TIMESTAMP}, #{hasNewMessage,jdbcType=INTEGER}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.js.kbt.model.TbMouldEquipment">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+      This element was generated on Sat Aug 01 22:19:04 CST 2020.
     -->
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
       SELECT LAST_INSERT_ID()
@@ -238,6 +241,9 @@
       <if test="lastopentime != null">
         lastopentime,
       </if>
+      <if test="hasNewMessage != null">
+        has_new_message,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="equipmentName != null">
@@ -291,13 +297,16 @@
       <if test="lastopentime != null">
         #{lastopentime,jdbcType=TIMESTAMP},
       </if>
+      <if test="hasNewMessage != null">
+        #{hasNewMessage,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.js.kbt.model.TbMouldEquipmentExample" resultType="java.lang.Long">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+      This element was generated on Sat Aug 01 22:19:04 CST 2020.
     -->
     select count(*) from tb_mould_equipment
     <if test="_parameter != null">
@@ -308,7 +317,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+      This element was generated on Sat Aug 01 22:19:04 CST 2020.
     -->
     update tb_mould_equipment
     <set>
@@ -366,6 +375,9 @@
       <if test="record.lastopentime != null">
         lastopentime = #{record.lastopentime,jdbcType=TIMESTAMP},
       </if>
+      <if test="record.hasNewMessage != null">
+        has_new_message = #{record.hasNewMessage,jdbcType=INTEGER},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -375,7 +387,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+      This element was generated on Sat Aug 01 22:19:04 CST 2020.
     -->
     update tb_mould_equipment
     set id = #{record.id,jdbcType=INTEGER},
@@ -395,7 +407,8 @@
       sim = #{record.sim,jdbcType=VARCHAR},
       curhill_number = #{record.curhillNumber,jdbcType=VARCHAR},
       curtemperature = #{record.curtemperature,jdbcType=INTEGER},
-      lastopentime = #{record.lastopentime,jdbcType=TIMESTAMP}
+      lastopentime = #{record.lastopentime,jdbcType=TIMESTAMP},
+      has_new_message = #{record.hasNewMessage,jdbcType=INTEGER}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -404,7 +417,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+      This element was generated on Sat Aug 01 22:19:04 CST 2020.
     -->
     update tb_mould_equipment
     <set>
@@ -459,6 +472,9 @@
       <if test="lastopentime != null">
         lastopentime = #{lastopentime,jdbcType=TIMESTAMP},
       </if>
+      <if test="hasNewMessage != null">
+        has_new_message = #{hasNewMessage,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -466,7 +482,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Mar 29 17:48:51 CST 2020.
+      This element was generated on Sat Aug 01 22:19:04 CST 2020.
     -->
     update tb_mould_equipment
     set equipment_name = #{equipmentName,jdbcType=VARCHAR},
@@ -485,7 +501,8 @@
       sim = #{sim,jdbcType=VARCHAR},
       curhill_number = #{curhillNumber,jdbcType=VARCHAR},
       curtemperature = #{curtemperature,jdbcType=INTEGER},
-      lastopentime = #{lastopentime,jdbcType=TIMESTAMP}
+      lastopentime = #{lastopentime,jdbcType=TIMESTAMP},
+      has_new_message = #{hasNewMessage,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
 </mapper>

+ 122 - 0
cloud-socket/src/com/js/kbt/model/EquipmentRecCommand.java

@@ -0,0 +1,122 @@
+package com.js.kbt.model;
+
+import java.util.Date;
+
+public class EquipmentRecCommand {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column equipment_rec_command.id
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column equipment_rec_command.equipment_no
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	private String equipmentNo;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column equipment_rec_command.cmd
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	private String cmd;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column equipment_rec_command.indate
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	private Date indate;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column equipment_rec_command.cmd_txt
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	private String cmdTxt;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column equipment_rec_command.id
+	 * @return  the value of equipment_rec_command.id
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column equipment_rec_command.id
+	 * @param id  the value for equipment_rec_command.id
+	 * @mbg.generated  Sat Aug 01 22:48:02 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_rec_command.equipment_no
+	 * @return  the value of equipment_rec_command.equipment_no
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	public String getEquipmentNo() {
+		return equipmentNo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column equipment_rec_command.equipment_no
+	 * @param equipmentNo  the value for equipment_rec_command.equipment_no
+	 * @mbg.generated  Sat Aug 01 22:48:02 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_rec_command.cmd
+	 * @return  the value of equipment_rec_command.cmd
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	public String getCmd() {
+		return cmd;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column equipment_rec_command.cmd
+	 * @param cmd  the value for equipment_rec_command.cmd
+	 * @mbg.generated  Sat Aug 01 22:48:02 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_rec_command.indate
+	 * @return  the value of equipment_rec_command.indate
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	public Date getIndate() {
+		return indate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column equipment_rec_command.indate
+	 * @param indate  the value for equipment_rec_command.indate
+	 * @mbg.generated  Sat Aug 01 22:48:02 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_rec_command.cmd_txt
+	 * @return  the value of equipment_rec_command.cmd_txt
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	public String getCmdTxt() {
+		return cmdTxt;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column equipment_rec_command.cmd_txt
+	 * @param cmdTxt  the value for equipment_rec_command.cmd_txt
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	public void setCmdTxt(String cmdTxt) {
+		this.cmdTxt = cmdTxt;
+	}
+}

+ 592 - 0
cloud-socket/src/com/js/kbt/model/EquipmentRecCommandExample.java

@@ -0,0 +1,592 @@
+package com.js.kbt.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class EquipmentRecCommandExample {
+    /**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	protected String orderByClause;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	protected boolean distinct;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	protected List<Criteria> oredCriteria;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	public EquipmentRecCommandExample() {
+		oredCriteria = new ArrayList<Criteria>();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	public void setOrderByClause(String orderByClause) {
+		this.orderByClause = orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	public String getOrderByClause() {
+		return orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	public void setDistinct(boolean distinct) {
+		this.distinct = distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	public boolean isDistinct() {
+		return distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	public List<Criteria> getOredCriteria() {
+		return oredCriteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	public void or(Criteria criteria) {
+		oredCriteria.add(criteria);
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	public Criteria or() {
+		Criteria criteria = createCriteriaInternal();
+		oredCriteria.add(criteria);
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	public Criteria createCriteria() {
+		Criteria criteria = createCriteriaInternal();
+		if (oredCriteria.size() == 0) {
+			oredCriteria.add(criteria);
+		}
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	protected Criteria createCriteriaInternal() {
+		Criteria criteria = new Criteria();
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	public void clear() {
+		oredCriteria.clear();
+		orderByClause = null;
+		distinct = false;
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	protected abstract static class GeneratedCriteria {
+		protected List<Criterion> criteria;
+
+		protected GeneratedCriteria() {
+			super();
+			criteria = new ArrayList<Criterion>();
+		}
+
+		public boolean isValid() {
+			return criteria.size() > 0;
+		}
+
+		public List<Criterion> getAllCriteria() {
+			return criteria;
+		}
+
+		public List<Criterion> getCriteria() {
+			return criteria;
+		}
+
+		protected void addCriterion(String condition) {
+			if (condition == null) {
+				throw new RuntimeException("Value for condition cannot be null");
+			}
+			criteria.add(new Criterion(condition));
+		}
+
+		protected void addCriterion(String condition, Object value, String property) {
+			if (value == null) {
+				throw new RuntimeException("Value for " + property + " cannot be null");
+			}
+			criteria.add(new Criterion(condition, value));
+		}
+
+		protected void addCriterion(String condition, Object value1, Object value2, String property) {
+			if (value1 == null || value2 == null) {
+				throw new RuntimeException("Between values for " + property + " cannot be null");
+			}
+			criteria.add(new Criterion(condition, value1, value2));
+		}
+
+		public Criteria andIdIsNull() {
+			addCriterion("id is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIsNotNull() {
+			addCriterion("id is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdEqualTo(Integer value) {
+			addCriterion("id =", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotEqualTo(Integer value) {
+			addCriterion("id <>", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThan(Integer value) {
+			addCriterion("id >", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+			addCriterion("id >=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThan(Integer value) {
+			addCriterion("id <", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThanOrEqualTo(Integer value) {
+			addCriterion("id <=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIn(List<Integer> values) {
+			addCriterion("id in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotIn(List<Integer> values) {
+			addCriterion("id not in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdBetween(Integer value1, Integer value2) {
+			addCriterion("id between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotBetween(Integer value1, Integer value2) {
+			addCriterion("id not between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andEquipmentNoIsNull() {
+			addCriterion("equipment_no is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andEquipmentNoIsNotNull() {
+			addCriterion("equipment_no is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andEquipmentNoEqualTo(String value) {
+			addCriterion("equipment_no =", value, "equipmentNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andEquipmentNoNotEqualTo(String value) {
+			addCriterion("equipment_no <>", value, "equipmentNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andEquipmentNoGreaterThan(String value) {
+			addCriterion("equipment_no >", value, "equipmentNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andEquipmentNoGreaterThanOrEqualTo(String value) {
+			addCriterion("equipment_no >=", value, "equipmentNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andEquipmentNoLessThan(String value) {
+			addCriterion("equipment_no <", value, "equipmentNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andEquipmentNoLessThanOrEqualTo(String value) {
+			addCriterion("equipment_no <=", value, "equipmentNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andEquipmentNoLike(String value) {
+			addCriterion("equipment_no like", value, "equipmentNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andEquipmentNoNotLike(String value) {
+			addCriterion("equipment_no not like", value, "equipmentNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andEquipmentNoIn(List<String> values) {
+			addCriterion("equipment_no in", values, "equipmentNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andEquipmentNoNotIn(List<String> values) {
+			addCriterion("equipment_no not in", values, "equipmentNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andEquipmentNoBetween(String value1, String value2) {
+			addCriterion("equipment_no between", value1, value2, "equipmentNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andEquipmentNoNotBetween(String value1, String value2) {
+			addCriterion("equipment_no not between", value1, value2, "equipmentNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdIsNull() {
+			addCriterion("cmd is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdIsNotNull() {
+			addCriterion("cmd is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdEqualTo(String value) {
+			addCriterion("cmd =", value, "cmd");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdNotEqualTo(String value) {
+			addCriterion("cmd <>", value, "cmd");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdGreaterThan(String value) {
+			addCriterion("cmd >", value, "cmd");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdGreaterThanOrEqualTo(String value) {
+			addCriterion("cmd >=", value, "cmd");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdLessThan(String value) {
+			addCriterion("cmd <", value, "cmd");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdLessThanOrEqualTo(String value) {
+			addCriterion("cmd <=", value, "cmd");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdLike(String value) {
+			addCriterion("cmd like", value, "cmd");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdNotLike(String value) {
+			addCriterion("cmd not like", value, "cmd");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdIn(List<String> values) {
+			addCriterion("cmd in", values, "cmd");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdNotIn(List<String> values) {
+			addCriterion("cmd not in", values, "cmd");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdBetween(String value1, String value2) {
+			addCriterion("cmd between", value1, value2, "cmd");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdNotBetween(String value1, String value2) {
+			addCriterion("cmd not between", value1, value2, "cmd");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateIsNull() {
+			addCriterion("indate is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateIsNotNull() {
+			addCriterion("indate is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateEqualTo(Date value) {
+			addCriterion("indate =", value, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateNotEqualTo(Date value) {
+			addCriterion("indate <>", value, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateGreaterThan(Date value) {
+			addCriterion("indate >", value, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateGreaterThanOrEqualTo(Date value) {
+			addCriterion("indate >=", value, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateLessThan(Date value) {
+			addCriterion("indate <", value, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateLessThanOrEqualTo(Date value) {
+			addCriterion("indate <=", value, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateIn(List<Date> values) {
+			addCriterion("indate in", values, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateNotIn(List<Date> values) {
+			addCriterion("indate not in", values, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateBetween(Date value1, Date value2) {
+			addCriterion("indate between", value1, value2, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andIndateNotBetween(Date value1, Date value2) {
+			addCriterion("indate not between", value1, value2, "indate");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdTxtIsNull() {
+			addCriterion("cmd_txt is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdTxtIsNotNull() {
+			addCriterion("cmd_txt is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdTxtEqualTo(String value) {
+			addCriterion("cmd_txt =", value, "cmdTxt");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdTxtNotEqualTo(String value) {
+			addCriterion("cmd_txt <>", value, "cmdTxt");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdTxtGreaterThan(String value) {
+			addCriterion("cmd_txt >", value, "cmdTxt");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdTxtGreaterThanOrEqualTo(String value) {
+			addCriterion("cmd_txt >=", value, "cmdTxt");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdTxtLessThan(String value) {
+			addCriterion("cmd_txt <", value, "cmdTxt");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdTxtLessThanOrEqualTo(String value) {
+			addCriterion("cmd_txt <=", value, "cmdTxt");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdTxtLike(String value) {
+			addCriterion("cmd_txt like", value, "cmdTxt");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdTxtNotLike(String value) {
+			addCriterion("cmd_txt not like", value, "cmdTxt");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdTxtIn(List<String> values) {
+			addCriterion("cmd_txt in", values, "cmdTxt");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdTxtNotIn(List<String> values) {
+			addCriterion("cmd_txt not in", values, "cmdTxt");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdTxtBetween(String value1, String value2) {
+			addCriterion("cmd_txt between", value1, value2, "cmdTxt");
+			return (Criteria) this;
+		}
+
+		public Criteria andCmdTxtNotBetween(String value1, String value2) {
+			addCriterion("cmd_txt not between", value1, value2, "cmdTxt");
+			return (Criteria) this;
+		}
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table equipment_rec_command
+	 * @mbg.generated  Sat Aug 01 22:48:02 CST 2020
+	 */
+	public static class Criterion {
+		private String condition;
+		private Object value;
+		private Object secondValue;
+		private boolean noValue;
+		private boolean singleValue;
+		private boolean betweenValue;
+		private boolean listValue;
+		private String typeHandler;
+
+		public String getCondition() {
+			return condition;
+		}
+
+		public Object getValue() {
+			return value;
+		}
+
+		public Object getSecondValue() {
+			return secondValue;
+		}
+
+		public boolean isNoValue() {
+			return noValue;
+		}
+
+		public boolean isSingleValue() {
+			return singleValue;
+		}
+
+		public boolean isBetweenValue() {
+			return betweenValue;
+		}
+
+		public boolean isListValue() {
+			return listValue;
+		}
+
+		public String getTypeHandler() {
+			return typeHandler;
+		}
+
+		protected Criterion(String condition) {
+			super();
+			this.condition = condition;
+			this.typeHandler = null;
+			this.noValue = true;
+		}
+
+		protected Criterion(String condition, Object value, String typeHandler) {
+			super();
+			this.condition = condition;
+			this.value = value;
+			this.typeHandler = typeHandler;
+			if (value instanceof List<?>) {
+				this.listValue = true;
+			} else {
+				this.singleValue = true;
+			}
+		}
+
+		protected Criterion(String condition, Object value) {
+			this(condition, value, null);
+		}
+
+		protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+			super();
+			this.condition = condition;
+			this.value = value;
+			this.secondValue = secondValue;
+			this.typeHandler = typeHandler;
+			this.betweenValue = true;
+		}
+
+		protected Criterion(String condition, Object value, Object secondValue) {
+			this(condition, value, secondValue, null);
+		}
+	}
+
+	/**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table equipment_rec_command
+     *
+     * @mbg.generated do_not_delete_during_merge Sat Aug 01 22:08:58 CST 2020
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+}

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

@@ -6,49 +6,49 @@ public class EquipmentSendCommand {
 
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public Integer getId() {
 		return id;
@@ -57,7 +57,7 @@ public class EquipmentSendCommand {
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public void setId(Integer id) {
 		this.id = id;
@@ -66,7 +66,7 @@ public class EquipmentSendCommand {
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public String getEquipmentNo() {
 		return equipmentNo;
@@ -75,7 +75,7 @@ public class EquipmentSendCommand {
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public void setEquipmentNo(String equipmentNo) {
 		this.equipmentNo = equipmentNo;
@@ -84,7 +84,7 @@ public class EquipmentSendCommand {
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public Integer getUid() {
 		return uid;
@@ -93,7 +93,7 @@ public class EquipmentSendCommand {
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public void setUid(Integer uid) {
 		this.uid = uid;
@@ -102,7 +102,7 @@ public class EquipmentSendCommand {
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public Date getIndate() {
 		return indate;
@@ -111,7 +111,7 @@ public class EquipmentSendCommand {
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public void setIndate(Date indate) {
 		this.indate = indate;
@@ -120,7 +120,7 @@ public class EquipmentSendCommand {
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public Date getSendTime() {
 		return sendTime;
@@ -129,7 +129,7 @@ public class EquipmentSendCommand {
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public void setSendTime(Date sendTime) {
 		this.sendTime = sendTime;
@@ -138,7 +138,7 @@ public class EquipmentSendCommand {
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public String getCmd() {
 		return cmd;
@@ -147,7 +147,7 @@ public class EquipmentSendCommand {
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public void setCmd(String cmd) {
 		this.cmd = cmd;
@@ -156,7 +156,7 @@ public class EquipmentSendCommand {
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public Integer getIsSend() {
 		return isSend;
@@ -165,7 +165,7 @@ public class EquipmentSendCommand {
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public void setIsSend(Integer isSend) {
 		this.isSend = isSend;
@@ -174,7 +174,7 @@ public class EquipmentSendCommand {
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public String getParam() {
 		return param;
@@ -183,7 +183,7 @@ public class EquipmentSendCommand {
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public void setParam(String param) {
 		this.param = param;

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

@@ -7,23 +7,23 @@ import java.util.List;
 public class EquipmentSendCommandExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table equipment_send_command
-	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table equipment_send_command
-	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table equipment_send_command
-	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public EquipmentSendCommandExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -31,7 +31,7 @@ public class EquipmentSendCommandExample {
 
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -39,7 +39,7 @@ public class EquipmentSendCommandExample {
 
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -47,7 +47,7 @@ public class EquipmentSendCommandExample {
 
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -55,7 +55,7 @@ public class EquipmentSendCommandExample {
 
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -63,7 +63,7 @@ public class EquipmentSendCommandExample {
 
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -71,7 +71,7 @@ public class EquipmentSendCommandExample {
 
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -79,7 +79,7 @@ public class EquipmentSendCommandExample {
 
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -89,7 +89,7 @@ public class EquipmentSendCommandExample {
 
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -101,7 +101,7 @@ public class EquipmentSendCommandExample {
 
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -110,7 +110,7 @@ public class EquipmentSendCommandExample {
 
 	/**
 	 * 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
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -120,7 +120,7 @@ public class EquipmentSendCommandExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table equipment_send_command
-	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -676,7 +676,7 @@ public class EquipmentSendCommandExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table equipment_send_command
-	 * @mbg.generated  Fri Apr 10 11:50:44 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:08:45 CST 2020
 	 */
 	public static class Criterion {
 		private String condition;

+ 77 - 54
cloud-socket/src/com/js/kbt/model/TbMouldEquipment.java

@@ -6,99 +6,104 @@ public class TbMouldEquipment {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.id
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	private Integer id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.equipment_name
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	private String equipmentName;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.start_time
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	private Date startTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.end_time
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	private Date endTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.use_life
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	private Integer useLife;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.belong_company_id
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	private Integer belongCompanyId;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.equipment_no
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	private String equipmentNo;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.is_use
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	private Integer isUse;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.hill_number
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	private String hillNumber;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.lng
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	private Double lng;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.lat
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	private Double lat;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.temperature
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	private Integer temperature;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.agent
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	private String agent;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.stage
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	private Integer stage;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.sim
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	private String sim;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.curhill_number
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	private String curhillNumber;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.curtemperature
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	private Integer curtemperature;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.lastopentime
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	private Date lastopentime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column tb_mould_equipment.has_new_message
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
+	 */
+	private Integer hasNewMessage;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.id
 	 * @return  the value of tb_mould_equipment.id
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public Integer getId() {
 		return id;
@@ -107,7 +112,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.id
 	 * @param id  the value for tb_mould_equipment.id
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setId(Integer id) {
 		this.id = id;
@@ -116,7 +121,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.equipment_name
 	 * @return  the value of tb_mould_equipment.equipment_name
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public String getEquipmentName() {
 		return equipmentName;
@@ -125,7 +130,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.equipment_name
 	 * @param equipmentName  the value for tb_mould_equipment.equipment_name
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setEquipmentName(String equipmentName) {
 		this.equipmentName = equipmentName;
@@ -134,7 +139,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.start_time
 	 * @return  the value of tb_mould_equipment.start_time
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public Date getStartTime() {
 		return startTime;
@@ -143,7 +148,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.start_time
 	 * @param startTime  the value for tb_mould_equipment.start_time
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setStartTime(Date startTime) {
 		this.startTime = startTime;
@@ -152,7 +157,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.end_time
 	 * @return  the value of tb_mould_equipment.end_time
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public Date getEndTime() {
 		return endTime;
@@ -161,7 +166,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.end_time
 	 * @param endTime  the value for tb_mould_equipment.end_time
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setEndTime(Date endTime) {
 		this.endTime = endTime;
@@ -170,7 +175,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.use_life
 	 * @return  the value of tb_mould_equipment.use_life
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public Integer getUseLife() {
 		return useLife;
@@ -179,7 +184,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.use_life
 	 * @param useLife  the value for tb_mould_equipment.use_life
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setUseLife(Integer useLife) {
 		this.useLife = useLife;
@@ -188,7 +193,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.belong_company_id
 	 * @return  the value of tb_mould_equipment.belong_company_id
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public Integer getBelongCompanyId() {
 		return belongCompanyId;
@@ -197,7 +202,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.belong_company_id
 	 * @param belongCompanyId  the value for tb_mould_equipment.belong_company_id
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setBelongCompanyId(Integer belongCompanyId) {
 		this.belongCompanyId = belongCompanyId;
@@ -206,7 +211,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.equipment_no
 	 * @return  the value of tb_mould_equipment.equipment_no
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public String getEquipmentNo() {
 		return equipmentNo;
@@ -215,7 +220,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.equipment_no
 	 * @param equipmentNo  the value for tb_mould_equipment.equipment_no
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setEquipmentNo(String equipmentNo) {
 		this.equipmentNo = equipmentNo;
@@ -224,7 +229,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.is_use
 	 * @return  the value of tb_mould_equipment.is_use
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public Integer getIsUse() {
 		return isUse;
@@ -233,7 +238,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.is_use
 	 * @param isUse  the value for tb_mould_equipment.is_use
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setIsUse(Integer isUse) {
 		this.isUse = isUse;
@@ -242,7 +247,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.hill_number
 	 * @return  the value of tb_mould_equipment.hill_number
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public String getHillNumber() {
 		return hillNumber;
@@ -251,7 +256,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.hill_number
 	 * @param hillNumber  the value for tb_mould_equipment.hill_number
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setHillNumber(String hillNumber) {
 		this.hillNumber = hillNumber;
@@ -260,7 +265,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.lng
 	 * @return  the value of tb_mould_equipment.lng
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public Double getLng() {
 		return lng;
@@ -269,7 +274,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.lng
 	 * @param lng  the value for tb_mould_equipment.lng
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setLng(Double lng) {
 		this.lng = lng;
@@ -278,7 +283,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.lat
 	 * @return  the value of tb_mould_equipment.lat
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public Double getLat() {
 		return lat;
@@ -287,7 +292,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.lat
 	 * @param lat  the value for tb_mould_equipment.lat
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setLat(Double lat) {
 		this.lat = lat;
@@ -296,7 +301,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.temperature
 	 * @return  the value of tb_mould_equipment.temperature
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public Integer getTemperature() {
 		return temperature;
@@ -305,7 +310,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.temperature
 	 * @param temperature  the value for tb_mould_equipment.temperature
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setTemperature(Integer temperature) {
 		this.temperature = temperature;
@@ -314,7 +319,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.agent
 	 * @return  the value of tb_mould_equipment.agent
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public String getAgent() {
 		return agent;
@@ -323,7 +328,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.agent
 	 * @param agent  the value for tb_mould_equipment.agent
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setAgent(String agent) {
 		this.agent = agent;
@@ -332,7 +337,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.stage
 	 * @return  the value of tb_mould_equipment.stage
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public Integer getStage() {
 		return stage;
@@ -341,7 +346,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.stage
 	 * @param stage  the value for tb_mould_equipment.stage
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setStage(Integer stage) {
 		this.stage = stage;
@@ -350,7 +355,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.sim
 	 * @return  the value of tb_mould_equipment.sim
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public String getSim() {
 		return sim;
@@ -359,7 +364,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.sim
 	 * @param sim  the value for tb_mould_equipment.sim
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setSim(String sim) {
 		this.sim = sim;
@@ -368,7 +373,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.curhill_number
 	 * @return  the value of tb_mould_equipment.curhill_number
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public String getCurhillNumber() {
 		return curhillNumber;
@@ -377,7 +382,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.curhill_number
 	 * @param curhillNumber  the value for tb_mould_equipment.curhill_number
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setCurhillNumber(String curhillNumber) {
 		this.curhillNumber = curhillNumber;
@@ -386,7 +391,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.curtemperature
 	 * @return  the value of tb_mould_equipment.curtemperature
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public Integer getCurtemperature() {
 		return curtemperature;
@@ -395,7 +400,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.curtemperature
 	 * @param curtemperature  the value for tb_mould_equipment.curtemperature
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setCurtemperature(Integer curtemperature) {
 		this.curtemperature = curtemperature;
@@ -404,7 +409,7 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.lastopentime
 	 * @return  the value of tb_mould_equipment.lastopentime
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public Date getLastopentime() {
 		return lastopentime;
@@ -413,9 +418,27 @@ public class TbMouldEquipment {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.lastopentime
 	 * @param lastopentime  the value for tb_mould_equipment.lastopentime
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setLastopentime(Date lastopentime) {
 		this.lastopentime = lastopentime;
 	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column tb_mould_equipment.has_new_message
+	 * @return  the value of tb_mould_equipment.has_new_message
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
+	 */
+	public Integer getHasNewMessage() {
+		return hasNewMessage;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column tb_mould_equipment.has_new_message
+	 * @param hasNewMessage  the value for tb_mould_equipment.has_new_message
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
+	 */
+	public void setHasNewMessage(Integer hasNewMessage) {
+		this.hasNewMessage = hasNewMessage;
+	}
 }

+ 76 - 16
cloud-socket/src/com/js/kbt/model/TbMouldEquipmentExample.java

@@ -7,23 +7,23 @@ import java.util.List;
 public class TbMouldEquipmentExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public TbMouldEquipmentExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -31,7 +31,7 @@ public class TbMouldEquipmentExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -39,7 +39,7 @@ public class TbMouldEquipmentExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -47,7 +47,7 @@ public class TbMouldEquipmentExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -55,7 +55,7 @@ public class TbMouldEquipmentExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -63,7 +63,7 @@ public class TbMouldEquipmentExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -71,7 +71,7 @@ public class TbMouldEquipmentExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -79,7 +79,7 @@ public class TbMouldEquipmentExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -89,7 +89,7 @@ public class TbMouldEquipmentExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -101,7 +101,7 @@ public class TbMouldEquipmentExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -110,7 +110,7 @@ public class TbMouldEquipmentExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -120,7 +120,7 @@ public class TbMouldEquipmentExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -1302,11 +1302,71 @@ public class TbMouldEquipmentExample {
 			addCriterion("lastopentime not between", value1, value2, "lastopentime");
 			return (Criteria) this;
 		}
+
+		public Criteria andHasNewMessageIsNull() {
+			addCriterion("has_new_message is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andHasNewMessageIsNotNull() {
+			addCriterion("has_new_message is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andHasNewMessageEqualTo(Integer value) {
+			addCriterion("has_new_message =", value, "hasNewMessage");
+			return (Criteria) this;
+		}
+
+		public Criteria andHasNewMessageNotEqualTo(Integer value) {
+			addCriterion("has_new_message <>", value, "hasNewMessage");
+			return (Criteria) this;
+		}
+
+		public Criteria andHasNewMessageGreaterThan(Integer value) {
+			addCriterion("has_new_message >", value, "hasNewMessage");
+			return (Criteria) this;
+		}
+
+		public Criteria andHasNewMessageGreaterThanOrEqualTo(Integer value) {
+			addCriterion("has_new_message >=", value, "hasNewMessage");
+			return (Criteria) this;
+		}
+
+		public Criteria andHasNewMessageLessThan(Integer value) {
+			addCriterion("has_new_message <", value, "hasNewMessage");
+			return (Criteria) this;
+		}
+
+		public Criteria andHasNewMessageLessThanOrEqualTo(Integer value) {
+			addCriterion("has_new_message <=", value, "hasNewMessage");
+			return (Criteria) this;
+		}
+
+		public Criteria andHasNewMessageIn(List<Integer> values) {
+			addCriterion("has_new_message in", values, "hasNewMessage");
+			return (Criteria) this;
+		}
+
+		public Criteria andHasNewMessageNotIn(List<Integer> values) {
+			addCriterion("has_new_message not in", values, "hasNewMessage");
+			return (Criteria) this;
+		}
+
+		public Criteria andHasNewMessageBetween(Integer value1, Integer value2) {
+			addCriterion("has_new_message between", value1, value2, "hasNewMessage");
+			return (Criteria) this;
+		}
+
+		public Criteria andHasNewMessageNotBetween(Integer value1, Integer value2) {
+			addCriterion("has_new_message not between", value1, value2, "hasNewMessage");
+			return (Criteria) this;
+		}
 	}
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table tb_mould_equipment
-	 * @mbg.generated  Sun Mar 29 17:48:51 CST 2020
+	 * @mbg.generated  Sat Aug 01 22:19:04 CST 2020
 	 */
 	public static class Criterion {
 		private String condition;

Diff do ficheiro suprimidas por serem muito extensas
+ 112 - 37
cloud-socket/src/com/js/kbt/socket/UserHandler.java


+ 21 - 0
src/main/java/com/hssx/cloudmodel/controller/TbMouldController.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-07-16
+ */
+@RestController
+@RequestMapping("/tb-mould")
+public class TbMouldController {
+
+}
+

+ 469 - 0
src/main/java/com/hssx/cloudmodel/entity/TbMould.java

@@ -0,0 +1,469 @@
+package com.hssx.cloudmodel.entity;
+
+import java.math.BigDecimal;
+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-07-16
+ */
+public class TbMould extends Model<TbMould> {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 模具编号
+     */
+    @TableField("model_no")
+    private String modelNo;
+
+    /**
+     * 模具名称
+     */
+    @TableField("model_name")
+    private String modelName;
+
+    /**
+     * 水隙
+     */
+    @TableField("water_gap")
+    private BigDecimal waterGap;
+
+    /**
+     * 吨位
+     */
+    @TableField("tonnage")
+    private BigDecimal tonnage;
+
+    /**
+     * 每模平均周期
+     */
+    @TableField("oc_cycle")
+    private BigDecimal ocCycle;
+
+    /**
+     * 日输出量
+     */
+    @TableField("daily_output")
+    private BigDecimal dailyOutput;
+
+    /**
+     * 所属资产方公司id
+     */
+    @TableField("company_id")
+    private Integer companyId;
+
+    /**
+     * 当前版本id
+     */
+    @TableField("current_version_id")
+    private Integer currentVersionId;
+
+    /**
+     * 状态0-静止 1-运动  3-待报废 4-已报废 5-异常,6-掉线
+     */
+    @TableField("state")
+    private String state;
+
+    /**
+     * 是否删除
+     */
+    @TableField("is_delete")
+    private Integer isDelete;
+
+    /**
+     * 创建者id
+     */
+    @TableField("creator_id")
+    private Integer creatorId;
+
+    /**
+     * 项目id
+     */
+    @TableField("project_id")
+    private Integer projectId;
+
+    /**
+     * 模具对应的射频识别
+     */
+    @TableField("rfid")
+    private String rfid;
+
+    /**
+     * 使用寿命 单位:次
+     */
+    @TableField("setting_life")
+    private Integer settingLife;
+
+    /**
+     * 生产方公司位置
+     */
+    @TableField("area")
+    private String area;
+
+    /**
+     * 生产方名称
+     */
+    @TableField("produce_company_name")
+    private String produceCompanyName;
+
+    /**
+     * 初始模次(保养设定次数)
+     */
+    @TableField("initial_modulus")
+    private Integer initialModulus;
+
+    /**
+     * 对应设备id
+     */
+    @TableField("equipment_id")
+    private Integer equipmentId;
+
+    /**
+     * 在项目中所属的部分如:1/10
+     */
+    @TableField("belong_project_grade")
+    private String belongProjectGrade;
+
+    /**
+     * 生产方公司id
+     */
+    @TableField("produce_company_id")
+    private Integer produceCompanyId;
+
+    /**
+     * 运行次数
+     */
+    @TableField("run_times")
+    private Integer runTimes;
+
+    /**
+     * 保养提醒 0-不需要,1-需要
+     */
+    @TableField("is_maintain")
+    private Integer isMaintain;
+
+    /**
+     * 日常保养设定次数:1,2,3
+     */
+    @TableField("maintain_count")
+    private String maintainCount;
+
+    /**
+     * 穴数
+     */
+    @TableField("holes")
+    private String holes;
+
+    /**
+     * 更新前的id
+     */
+    @TableField("pre_update_id")
+    private Integer preUpdateId;
+
+    /**
+     * 历史运行次数只对换绑云模盒时进行处理
+     */
+    @TableField("history_run_times")
+    private Integer historyRunTimes;
+
+    /**
+     * 接受设备上传数据的时间
+     */
+    @TableField("last_rec_time")
+    private LocalDateTime lastRecTime;
+
+    /**
+     * 固定保养次数
+     */
+    @TableField("fixed_maintain_count")
+    private String fixedMaintainCount;
+
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getModelNo() {
+        return modelNo;
+    }
+
+    public void setModelNo(String modelNo) {
+        this.modelNo = modelNo;
+    }
+
+    public String getModelName() {
+        return modelName;
+    }
+
+    public void setModelName(String modelName) {
+        this.modelName = modelName;
+    }
+
+    public BigDecimal getWaterGap() {
+        return waterGap;
+    }
+
+    public void setWaterGap(BigDecimal waterGap) {
+        this.waterGap = waterGap;
+    }
+
+    public BigDecimal getTonnage() {
+        return tonnage;
+    }
+
+    public void setTonnage(BigDecimal tonnage) {
+        this.tonnage = tonnage;
+    }
+
+    public BigDecimal getOcCycle() {
+        return ocCycle;
+    }
+
+    public void setOcCycle(BigDecimal ocCycle) {
+        this.ocCycle = ocCycle;
+    }
+
+    public BigDecimal getDailyOutput() {
+        return dailyOutput;
+    }
+
+    public void setDailyOutput(BigDecimal dailyOutput) {
+        this.dailyOutput = dailyOutput;
+    }
+
+    public Integer getCompanyId() {
+        return companyId;
+    }
+
+    public void setCompanyId(Integer companyId) {
+        this.companyId = companyId;
+    }
+
+    public Integer getCurrentVersionId() {
+        return currentVersionId;
+    }
+
+    public void setCurrentVersionId(Integer currentVersionId) {
+        this.currentVersionId = currentVersionId;
+    }
+
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public Integer getIsDelete() {
+        return isDelete;
+    }
+
+    public void setIsDelete(Integer isDelete) {
+        this.isDelete = isDelete;
+    }
+
+    public Integer getCreatorId() {
+        return creatorId;
+    }
+
+    public void setCreatorId(Integer creatorId) {
+        this.creatorId = creatorId;
+    }
+
+    public Integer getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(Integer projectId) {
+        this.projectId = projectId;
+    }
+
+    public String getRfid() {
+        return rfid;
+    }
+
+    public void setRfid(String rfid) {
+        this.rfid = rfid;
+    }
+
+    public Integer getSettingLife() {
+        return settingLife;
+    }
+
+    public void setSettingLife(Integer settingLife) {
+        this.settingLife = settingLife;
+    }
+
+    public String getArea() {
+        return area;
+    }
+
+    public void setArea(String area) {
+        this.area = area;
+    }
+
+    public String getProduceCompanyName() {
+        return produceCompanyName;
+    }
+
+    public void setProduceCompanyName(String produceCompanyName) {
+        this.produceCompanyName = produceCompanyName;
+    }
+
+    public Integer getInitialModulus() {
+        return initialModulus;
+    }
+
+    public void setInitialModulus(Integer initialModulus) {
+        this.initialModulus = initialModulus;
+    }
+
+    public Integer getEquipmentId() {
+        return equipmentId;
+    }
+
+    public void setEquipmentId(Integer equipmentId) {
+        this.equipmentId = equipmentId;
+    }
+
+    public String getBelongProjectGrade() {
+        return belongProjectGrade;
+    }
+
+    public void setBelongProjectGrade(String belongProjectGrade) {
+        this.belongProjectGrade = belongProjectGrade;
+    }
+
+    public Integer getProduceCompanyId() {
+        return produceCompanyId;
+    }
+
+    public void setProduceCompanyId(Integer produceCompanyId) {
+        this.produceCompanyId = produceCompanyId;
+    }
+
+    public Integer getRunTimes() {
+        return runTimes;
+    }
+
+    public void setRunTimes(Integer runTimes) {
+        this.runTimes = runTimes;
+    }
+
+    public Integer getIsMaintain() {
+        return isMaintain;
+    }
+
+    public void setIsMaintain(Integer isMaintain) {
+        this.isMaintain = isMaintain;
+    }
+
+    public String getMaintainCount() {
+        return maintainCount;
+    }
+
+    public void setMaintainCount(String maintainCount) {
+        this.maintainCount = maintainCount;
+    }
+
+    public String getHoles() {
+        return holes;
+    }
+
+    public void setHoles(String holes) {
+        this.holes = holes;
+    }
+
+    public Integer getPreUpdateId() {
+        return preUpdateId;
+    }
+
+    public void setPreUpdateId(Integer preUpdateId) {
+        this.preUpdateId = preUpdateId;
+    }
+
+    public Integer getHistoryRunTimes() {
+        return historyRunTimes;
+    }
+
+    public void setHistoryRunTimes(Integer historyRunTimes) {
+        this.historyRunTimes = historyRunTimes;
+    }
+
+    public LocalDateTime getLastRecTime() {
+        return lastRecTime;
+    }
+
+    public void setLastRecTime(LocalDateTime lastRecTime) {
+        this.lastRecTime = lastRecTime;
+    }
+
+    public String getFixedMaintainCount() {
+        return fixedMaintainCount;
+    }
+
+    public void setFixedMaintainCount(String fixedMaintainCount) {
+        this.fixedMaintainCount = fixedMaintainCount;
+    }
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+    @Override
+    public String toString() {
+        return "TbMould{" +
+        "id=" + id +
+        ", modelNo=" + modelNo +
+        ", modelName=" + modelName +
+        ", waterGap=" + waterGap +
+        ", tonnage=" + tonnage +
+        ", ocCycle=" + ocCycle +
+        ", dailyOutput=" + dailyOutput +
+        ", companyId=" + companyId +
+        ", currentVersionId=" + currentVersionId +
+        ", state=" + state +
+        ", isDelete=" + isDelete +
+        ", creatorId=" + creatorId +
+        ", projectId=" + projectId +
+        ", rfid=" + rfid +
+        ", settingLife=" + settingLife +
+        ", area=" + area +
+        ", produceCompanyName=" + produceCompanyName +
+        ", initialModulus=" + initialModulus +
+        ", equipmentId=" + equipmentId +
+        ", belongProjectGrade=" + belongProjectGrade +
+        ", produceCompanyId=" + produceCompanyId +
+        ", runTimes=" + runTimes +
+        ", isMaintain=" + isMaintain +
+        ", maintainCount=" + maintainCount +
+        ", holes=" + holes +
+        ", preUpdateId=" + preUpdateId +
+        ", historyRunTimes=" + historyRunTimes +
+        ", lastRecTime=" + lastRecTime +
+        ", fixedMaintainCount=" + fixedMaintainCount +
+        "}";
+    }
+}

+ 16 - 0
src/main/java/com/hssx/cloudmodel/mapper/TbMouldMapper.java

@@ -0,0 +1,16 @@
+package com.hssx.cloudmodel.mapper;
+
+import com.hssx.cloudmodel.entity.TbMould;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author seya
+ * @since 2020-07-16
+ */
+public interface TbMouldMapper extends BaseMapper<TbMould> {
+
+}

+ 16 - 0
src/main/java/com/hssx/cloudmodel/service/TbMouldService.java

@@ -0,0 +1,16 @@
+package com.hssx.cloudmodel.service;
+
+import com.hssx.cloudmodel.entity.TbMould;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author seya
+ * @since 2020-07-16
+ */
+public interface TbMouldService extends IService<TbMould> {
+
+}

+ 20 - 0
src/main/java/com/hssx/cloudmodel/service/impl/TbMouldServiceImpl.java

@@ -0,0 +1,20 @@
+package com.hssx.cloudmodel.service.impl;
+
+import com.hssx.cloudmodel.entity.TbMould;
+import com.hssx.cloudmodel.mapper.TbMouldMapper;
+import com.hssx.cloudmodel.service.TbMouldService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author seya
+ * @since 2020-07-16
+ */
+@Service
+public class TbMouldServiceImpl extends ServiceImpl<TbMouldMapper, TbMould> implements TbMouldService {
+
+}

+ 43 - 0
src/main/resources/mapper/TbMouldMapper.xml

@@ -0,0 +1,43 @@
+<?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.TbMouldMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.TbMould">
+        <id column="id" property="id" />
+        <result column="model_no" property="modelNo" />
+        <result column="model_name" property="modelName" />
+        <result column="water_gap" property="waterGap" />
+        <result column="tonnage" property="tonnage" />
+        <result column="oc_cycle" property="ocCycle" />
+        <result column="daily_output" property="dailyOutput" />
+        <result column="company_id" property="companyId" />
+        <result column="current_version_id" property="currentVersionId" />
+        <result column="state" property="state" />
+        <result column="is_delete" property="isDelete" />
+        <result column="creator_id" property="creatorId" />
+        <result column="project_id" property="projectId" />
+        <result column="rfid" property="rfid" />
+        <result column="setting_life" property="settingLife" />
+        <result column="area" property="area" />
+        <result column="produce_company_name" property="produceCompanyName" />
+        <result column="initial_modulus" property="initialModulus" />
+        <result column="equipment_id" property="equipmentId" />
+        <result column="belong_project_grade" property="belongProjectGrade" />
+        <result column="produce_company_id" property="produceCompanyId" />
+        <result column="run_times" property="runTimes" />
+        <result column="is_maintain" property="isMaintain" />
+        <result column="maintain_count" property="maintainCount" />
+        <result column="holes" property="holes" />
+        <result column="pre_update_id" property="preUpdateId" />
+        <result column="history_run_times" property="historyRunTimes" />
+        <result column="last_rec_time" property="lastRecTime" />
+        <result column="fixed_maintain_count" property="fixedMaintainCount" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, model_no, model_name, water_gap, tonnage, oc_cycle, daily_output, company_id, current_version_id, state, is_delete, creator_id, project_id, rfid, setting_life, area, produce_company_name, initial_modulus, equipment_id, belong_project_grade, produce_company_id, run_times, is_maintain, maintain_count, holes, pre_update_id, history_run_times, last_rec_time, fixed_maintain_count
+    </sql>
+
+</mapper>

+ 1 - 1
website/src/main/resources/application-prod.properties

@@ -1,6 +1,6 @@
 # ####################################################################################################
 # ·þÎñ¶ËÅäÖÃ
-server.port=80
+server.port=8099
 server.servlet.context-path=/
 server.tomcat.uri-encoding=UTF-8
 server.tomcat.max-http-post-size=-1

BIN
ys_int/src/assets/image/qrCode.jpg


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

@@ -25,7 +25,10 @@ const lang = {
 		upload: "Upload",
 		invite: "Invite",
         state: "State",
-        motion: "Motion",
+		motion: "Motion",
+		mouldNum:"Mould Number",
+		mouldName:"Mould Name",
+		productNum:"Product Number",
     },
     prompt: {
         success: "Modify Success",
@@ -178,6 +181,10 @@ const lang = {
 		addUser: "Add Person",
 		uploadAndAdd: "Submit and Add",
 		delFile: "Are you sure to delete this document?",
+		delFileApplication: "Are you sure to apply to delete this document?",
+		confirmApplyDel:"Agree to delete file?",
+		confirmRejectDel:"Disagree to delete file?",
+		status:"status",
 		num:"Num",
         // 人员管理
         initial: "Initial Password",
@@ -213,6 +220,7 @@ const lang = {
 	// 模具管理
 	mold: {
 		// 模具列表
+		applyDelete: "Apply Delete",
 		moldNo: "Mold Num",
 		modelName: "Mold Name",
 		projectName: "Project Name",
@@ -237,7 +245,8 @@ const lang = {
 		inputhole: "Please enter the number of points.",
 		inputrfid: "Please enter RIFD code",
 		inputfactoryName: "Please select the manufacturer to which you belong.",
-		maintainCount: "Maintenance times",
+		maintainCount: "Daily Maintenance times",
+		fixedMaintainCount: "Fixed Maintenance times",
 		inputmaintainCount: "Please choose the number of maintenance times.",
 		num0: "Please fill in numbers greater than 0",
         num1: "Please fill in a number less than or equal to 100 million",
@@ -247,8 +256,8 @@ const lang = {
         color: "Color Specification",
         size: "Mold Size(mm)",
         tonnage: "Machine Tonnage(T)",
-        product: "Finished Product Weight(g)",
-        mathead: "Head Weight(g)",
+        product: "Total Finished Product Weight(g)",
+        mathead: "Total Head Weight(g)",
         minshot: "Min Shot Amount(g)",
         maxshot: "Max Shot Amount(g)",
         stand: "StandardMolding Cycle(s)",
@@ -258,8 +267,8 @@ const lang = {
         inputcolor: "Please enter Color Specification",
         inputsize: "Please enter Mold Size(long*width*high)",
         inputtonnage: "Please enter Machine Tonnage",
-        inputproduct: "Please enter Finished Product Weight",
-        inputmathead: "Please enter Head Weight",
+        inputproduct: "Please enter Total Finished Product Weight",
+        inputmathead: "Please enter Total Head Weight",
         inputminshot: "Please enter Min Shot Amount",
         inputmaxshot: "Please enter Max Shot Amount",
         inputstand: "Please enter Standard Molding Cycle",
@@ -343,6 +352,8 @@ const lang = {
 	},
     // 基础管理
     basic: {
+		select:"Please Select",
+		input: "Please Input",
         next: "Next",
         prev: "Prev",
         system: "System Admin",
@@ -366,7 +377,13 @@ const lang = {
         delAss: "Are you sure to delete the asset?",
         // 生产方管理
         inputPro: "Please enter the producer name to search",
-        proName: "Producer Name",
+		proName: "Producer Name",
+		contact: "Contact",
+		contactPhone: "Phone",
+		setupDate: "Setup Date",
+		prop: "Property",
+		runningTime: "Running Time",
+		area: "Area",
         inputProName: "Please enter the producer name",
         proManager: "Producer Manager",
         proAsset: "Associated Asset",
@@ -375,6 +392,7 @@ const lang = {
         inputProAddress: "Please enter the producer address",
         delPro: "Are you sure to delete the producer?",
 		// 云模盒管理
+		startTime: "First Run Time",
 		targetModelName: "Target Model",
         clearData: "Clear Data",
         isClearData: "Whether to clear data?",

+ 27 - 9
ys_int/src/i18n/lang/zh.js

@@ -25,7 +25,10 @@ const lang = {
 		upload: "上传",
 		invite: "邀请",
         state: "状态",
-        motion: "运动",
+		motion: "运动",
+		mouldNum:"模具编号",
+		mouldName:"模具名称",
+		productNum:"产品编号",
     },
     prompt: {
         success: "修改成功",
@@ -178,6 +181,10 @@ const lang = {
 		addUser: "添加人员",
 		uploadAndAdd: "提交并新增",
 		delFile: "确认删除该文档吗?",
+		delFileApplication: "确认申请删除该文档吗?",
+		confirmApplyDel:"确认同意删除该文档吗?",
+		confirmRejectDel:"确认拒绝删除该文档吗?",
+		status:"状态",
 		num:"序号",
         // 人员管理
         initial: "初始密码",
@@ -214,6 +221,7 @@ const lang = {
 	// 模具管理
 	mold: {
 		// 模具列表
+		applyDelete: "申请删除",
 		moldNo: "模具编号",
 		modelName: "模具名称",
 		projectName: "所属项目",
@@ -238,7 +246,8 @@ const lang = {
 		inputhole: "请输入穴数",
 		inputrfid: "请输入RIFD码",
 		inputfactoryName: "请选择所属生产方",
-		maintainCount: "保养次数",
+		maintainCount: "日常保养次数",
+		fixedMaintainCount: "定期保养次数",
 		inputmaintainCount: "请选择保养次数",
 		num0: "请填写大于0的数字",
         num1: "请填写小于等于1亿的数字",
@@ -247,9 +256,9 @@ const lang = {
         material: "材料牌号",
         color: "颜色规格",
         size: "模具尺寸(mm)",
-        tonnage: "机台吨位(T)",
-        product: "成品重量(g)",
-        mathead: "料头重量(g)",
+        tonnage: "机台吨位范围(T)",
+        product: "成品重量(g)",
+        mathead: "料头重量(g)",
         minshot: "最小射胶量(g)",
         maxshot: "最大射胶量(g)",
         stand: "标准成型周期(s)",
@@ -258,9 +267,9 @@ const lang = {
         inputmaterial: "请输入材料牌号",
         inputcolor: "请输入颜色规格",
         inputsize: "请输入模具尺寸(长*宽*高)",
-        inputtonnage: "请输入机台吨位",
-        inputproduct: "请输入成品重量",
-        inputmathead: "请输入料头重量",
+        inputtonnage: "请输入机台吨位范围(例如: 80-100)",
+        inputproduct: "请输入成品重量",
+        inputmathead: "请输入料头重量",
         inputminshot: "请输入最小射胶量",
         inputmaxshot: "请输入最大射胶量",
         inputstand: "请输入标准成型周期",
@@ -344,6 +353,8 @@ const lang = {
 	},
     // 基础管理
     basic: {
+		select:"请选择",
+		input: "请输入",
         next: "下一步",
         prev: "上一步",
         system: "系统管理员",
@@ -367,7 +378,13 @@ const lang = {
         editProducer: "编辑生产方",
         addProSystem: "新增生产方管理员",
         inputPro: "请输入生产方名称进行搜索",
-        proName: "生产方名称",
+		proName: "生产方名称",
+		contact: "联系人",
+		contactPhone: "联系电话",
+		setupDate: "成立日期",
+		prop: "公司性质",
+		runningTime: "营业时间",
+		area: "占地面积",
         inputProName: "请输入生产方名称",
         proManager: "生产方管理员",
         proAsset: "关联资产方",
@@ -376,6 +393,7 @@ const lang = {
         inputProAddress: "请输入生产方地址",
         delPro: "确认删除该生产方吗?",
 		// 云模盒管理
+		startTime: "首次启动时间",
 		targetModelName: "目标云模盒",
         clearData: "清除数据",
         isClearData: "是否清除数据?",

+ 11 - 4
ys_int/src/port.js

@@ -12,7 +12,7 @@ export default {
     },
     map: { 
         mapList: '/company/getCoutomCompanyAndMouldsByUser', // 生产方公司和公司下所属的模具
-        newMap: '/mould/listMap' // 获取地图
+        newMap: '/mould/listMap2' // 获取地图
     },
     project: {
         addUser: '/user/add',  // 添加或修改用户
@@ -30,6 +30,7 @@ export default {
         dowloadFile: '/projectfile/dowloadFile', //项目文档的下载
         fileList: '/projectfile/list', //项目文档列表
         delFile: '/projectfile/delFile', //项目文档的删除
+        delFileApplication: '/projectfile/delFileApplication',//项目文档删除申请
         operList: '/projectoperationdynamics/list', //项目操作记录列表
 
         getUserList: '/user/getUserList', //获取用户列表
@@ -46,7 +47,7 @@ export default {
         molds: '/mould/list', //模具列表
         modelList: '/mould/modelList', //给项目分配模具获取该公司下的模具列表
         delMold: '/mould/delMould', //删除模具
-
+        changeProducer: '/mould/changeProducer', //修改生产方 
         changeIp: '/mouldequipment/changeIp',//切换IP
 
         moldDetail: '/mould/detail', //模具详情
@@ -62,7 +63,8 @@ export default {
 
         chooseModelList: '/mould/chooseModelList', //编辑项目时显示的模具列表
 
-        moldFileDelete: '/mouldfile/delFile', //项目文档的删除
+        moldFileDelete: '/mouldfile/delFile', //模具文档的删除
+        moldFileApplyDelete: '/mouldfile/applyDelete', //模具文档的删除申请
         moldOperationList: '/mouldoperationdynamics/list', //项目操作记录列表
 
         partList: '/part/list', //零件列表
@@ -77,12 +79,17 @@ export default {
         moldMaintainListGet: '/mould/maintainMouldList', //主页获取保养模具列表
         moldDiscardListGet: '/mould/scrapMouldList', //主页获取报废模具列表
         moldChange: '/mould/changeMouldEquipment', //处理告警
-        moldChangeRequirement: '/mouldequipment/getEquipmentListByOldMouldAndUser' //处理告警所需的设备
+        moldChangeRequirement: '/mouldequipment/getEquipmentListByOldMouldAndUser', //处理告警所需的设备
+        moveMold: '/mould/applyMove',//发起移模申请
+        checkMoveMold: '/mould/checkApplyMove',//发起移模申请
+        finishMove: '/mould/finishMove',//完成移模
     },
     //基础管理
     base: {
         addCompany: '/company/add', // 添加资产方
         companyList: '/company/list', // 资产方列表
+        companyDetail: '/company/detail', // 资产方详情
+        userDetail: '/user/detail',
         delCompany: '/company/delete', // 删除资产方
 
         getCompanyList: '/company/getCompanyList', // 管理员创建人员时显示公司

+ 5 - 0
ys_int/src/routes.js

@@ -12,6 +12,7 @@ import maintenance from './views/detection/maintenance.vue'
 import project from './views/project/project.vue'
 import projectDetail from './views/project/projectDetail.vue'
 import staff from './views/project/staff.vue'
+import staffDetail from './views/project/staffDetail.vue'
 import competence from './views/project/competence.vue'
 
 import moldList from './views/mold/moldList.vue'
@@ -20,6 +21,7 @@ import moldDownload from './views/mold/moldDownload.vue'
 
 import comp from './views/base/comp.vue'
 import factory from './views/base/factory.vue'
+import factoryDetail from './views/base/factoryDetail.vue'
 import allocation from './views/base/allocation.vue'
 
 let routes = [
@@ -66,6 +68,7 @@ let routes = [
             { path: '/competence', component: competence, name: "navigation.power" }
         ]
     },
+    
     //模具管理
     {
         path: '/',
@@ -73,6 +76,7 @@ let routes = [
         name: "navigation.mold",
         iconCls: 'iconfont icon-moxing',
         children: [
+            { path: '/staffDetail', component: staffDetail,  name: "员工详情", hidden: true},
             { path: '/moldList', component: moldList, name: "navigation.moldList" },
             { path: '/moldList/:id/:type', component: moldDetail, name: '模具详情', hidden: true },
             { path: '/moldDownload', component: moldDownload, name: "navigation.moldDown" }
@@ -87,6 +91,7 @@ let routes = [
         children: [
             { path: '/comp', component: comp, name: "navigation.asset" },
             { path: '/factory', component: factory, name: "navigation.producer" },
+            { path: '/factoryDetail', component: factoryDetail, hidden:true, name: "navigation.producerDetail" },
             { path: '/allocation', component: allocation, name: "navigation.device" }
         ]
     },

+ 32 - 14
ys_int/src/views/Home.vue

@@ -11,6 +11,17 @@
                 </div>
             </el-col>
             <el-col :span="6" class="userinfo">
+                <el-badge class="itemNew" >
+                    <i class="el-icon-phone-outline" style="font-size:24px" v-popover:help></i>
+                    <!-- 消息中心 -->
+                    <el-popover ref="help" placement="bottom" width="200" trigger="hover" popper-class="popover-self">
+                        <div style="text-align:center;margin-top:10px;"><img src="../assets/image/qrCode.jpg" style="width:150px;height:150px;"/></div>
+                        <div style="text-align:center;width:100%;padding:5px;">客服电话1: 025-58718377</div>
+                        <div style="text-align:center;width:100%;padding:5px;">客服电话2: 025-58702675</div>
+                    </el-popover>
+                </el-badge>
+
+
                 <el-badge class="itemNew" :value="unreadCount[3]" :hidden="unreadCount[3] == 0">
                     <i class="el-icon-message-solid" style="font-size:24px" v-popover:popover1></i>
                     <!-- 消息中心 -->
@@ -26,8 +37,8 @@
                                 <span v-else>{{$t('home.approval')}}({{unreadCount[0]}})</span>
                             </span>
                             <div class="popover-item" v-if="popoverData[0].length == 0">{{$t('home.noApproval')}}</div>
-                            <div class="popover-item" v-for="item in popoverData[0]">
-                                <div style="cursor: pointer;" @click="locationHerf(item.id, item.refId, item.noticeType, item.belongType)">
+                            <div class="popover-item" :key="item.id" v-for="item in popoverData[0]">
+                                <div style="cursor: pointer;" @click="locationHerf(item)">
                                     <p class="popover-title">
                                         <span v-if="item.isRead == 1" class="isRead">{{item.projectName}}</span>
                                         <span v-else>{{item.projectName}}</span>
@@ -45,8 +56,8 @@
                                 <span v-else>{{$t('home.warning')}}({{unreadCount[2]}})</span>
                             </span>
                             <div class="popover-item" v-if="popoverData[2].length == 0">{{$t('home.noWarning')}}</div>
-                            <div class="popover-item" v-for="item in popoverData[2]">
-                                <div style="cursor: pointer;" @click="locationHerf(item.id, item.refId, item.noticeType, null)">
+                            <div class="popover-item" :key="item.id" v-for="item in popoverData[2]">
+                                <div style="cursor: pointer;" @click="locationHerf(item)">
                                     <p class="popover-title">
                                         <span v-if="item.isRead == 1" class="isRead">{{item.projectName}}</span>
                                         <span v-else>{{item.projectName}}</span>
@@ -64,8 +75,8 @@
                                 <span v-else>{{$t('home.maintain')}}({{unreadCount[1]}})</span>
                             </span>
                             <div class="popover-item" v-if="popoverData[1].length == 0">{{$t('home.noMaintain')}}</div>
-                            <div class="popover-item" v-for="item in popoverData[1]">
-                                <div style="cursor: pointer;" @click="locationHerf(item.id, item.refId, item.noticeType, null)">
+                            <div class="popover-item" :key="item.id" v-for="item in popoverData[1]">
+                                <div style="cursor: pointer;" @click="locationHerf(item)">
                                     <p class="popover-title">
                                         <span v-if="item.isRead == 1" class="isRead">{{item.projectName}}</span>
                                         <span v-else>{{item.projectName}}</span>
@@ -118,7 +129,7 @@
 
                 <!--导航菜单-折叠后-->
                 <ul class="el-menu el-menu-vertical-demo collapsed" v-if="collapsed" ref="menuCollapsed">
-                    <li v-for="(item,index) in $router.options.routes" v-if="!item.hidden" class="el-submenu item" :style="{overflow:!item.leaf?'':'hidden'}">
+                    <li v-for="(item,index) in $router.options.routes" :key="item.name" v-if="!item.hidden" class="el-submenu item" :style="{overflow:!item.leaf?'':'hidden'}">
                         <template v-if="!item.leaf">
                             <div class="el-submenu__title" style="padding-left: 20px;" @mouseover="showMenu(index,true)" @mouseout="showMenu(index,false)">
                                 <i :class="item.iconCls"></i>
@@ -414,9 +425,9 @@
             },
 
             //点击消息的跳转
-            locationHerf(id, refid, type, approval) {
+            locationHerf(item) {
                 this.http.post( this.port.notice.read, {
-                    id: id
+                    id: item.id
                 },
                 res => {
                     if (res.code == "ok") {
@@ -440,16 +451,23 @@
                 var currentRoute = this.$route.path.split("/");
                 if (currentRoute.length == 4 && currentRoute[1] == "moldList") {
                     this.$router.go(0);
+                } else if (currentRoute.length == 3 && currentRoute[1] == "project") {
+                    this.$router.go(0);
                 }
-                if (type == 0) {
+                if (item.noticeType == 0) {
                     //审批 跳转到模具详情
-                    this.$router.push("/moldList/" + refid + "/" + approval);
-                } else if (type == 1) {
+                    if (item.belongType == 6) {
+                        //项目文档申请删除消息,跳转到项目详情页面
+                        this.$router.push("/project/" + item.projectId);
+                    } else {
+                        this.$router.push("/moldList/" + item.refId + "/" + item.belongType);
+                    }
+                } else if (item.noticeType == 1) {
                     //警告 跳转到运行监测
                     this.$router.push("/detection");
-                } else if (type == 2) {
+                } else if (item.noticeType == 2) {
                     //保养 跳转到运行监测详情
-                    this.$router.push("/detection/" + refid);
+                    this.$router.push("/detection/" + item.refId);
                 }
             },
 

+ 3 - 0
ys_int/src/views/Login.vue

@@ -19,10 +19,13 @@
             <el-form-item class="login-button" style="width:100%;">
                 <el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit" :loading="logining">{{$t('base.login')}}</el-button>
             </el-form-item>
+            <div style="float:right;margin-top:7px;"><a href="http://www.yunsu.cn">返回官网</a></div>
         </el-form>
+        
         <div class="login-backImg">
             <img src="../assets/image/login_center.png" />
         </div>
+        
     </div>
 </template>
 

+ 41 - 1
ys_int/src/views/base/allocation.vue

@@ -85,6 +85,13 @@
                     <!--  :disabled="scope.row.isUse == 1" -->
                     <el-button size="small" :style="scope.row.modelNo!=null?(parseInt(scope.row.isUse)>=2?'float:right;margin-right:6px':''):'float:right;margin-right:6px'" @click="showEdit(scope.$index, scope.row, scope.row.isUse == 1)">{{$t('base.edit')}}</el-button>
                     <el-button size="small" type="danger" @click="sendCmd(scope.$index, scope.row, scope.row.isUse == 1)">{{$t('basic.issued')}}</el-button>
+
+                </template>
+            </el-table-column>
+            <el-table-column fixed="right" label="下发结果" align="center" width="100">
+                <template slot-scope="scope">
+                    <el-Link v-if="scope.row.hasNewMessage == 1" style="color:red" @click="getRecCmdList(scope.row.equipmentNo)">有新反馈</el-Link>
+                    <el-Link v-if="scope.row.hasNewMessage == 0"  @click="getRecCmdList(scope.row.equipmentNo)">历史反馈</el-Link>
                 </template>
             </el-table-column>
         </el-table>
@@ -222,6 +229,17 @@
                 <el-button type="primary" @click="saveSendCmd">{{$t('basic.issued')}}</el-button>
             </span>
         </el-dialog>
+
+        <!--执行反馈的结果列表-->
+        <el-dialog title="设备执行命令反馈结果列表" :visible.sync="recCmdVisible" width="1050px">
+            <!--列表-->
+            <el-table :data="recCmdList" height="460" highlight-current-row style="width: 100%;">
+                <el-table-column type="index" width="50"></el-table-column>
+                <el-table-column prop="equipmentNo" :label="$t('basic.equipmentNo')" width="180" ></el-table-column>
+                <el-table-column prop="cmdTxt" label="反馈结果" ></el-table-column>
+                <el-table-column prop="indate" label="反馈时间" width="180" ></el-table-column>
+            </el-table>
+        </el-dialog>
     </section>
 </template>
 
@@ -274,7 +292,8 @@
             };
             return {
                 user: JSON.parse(sessionStorage.getItem("user")),
-                
+                recCmdVisible:false,
+                recCmdList:[],
                 allocations: [],
                 companies: {},
                 newAllocation: {
@@ -361,6 +380,27 @@
             };
         },
         methods: {
+            getRecCmdList(no) {
+                this.recCmdVisible = true;
+                this.http.post("/equipment-rec-command/getList", {equipmentNo:no},
+                res => {
+                    if (res.code == "ok") {
+                        this.recCmdList = res.data;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
             getMsg() {
                 //获取公司下拉列表
                 this.http.post( this.port.base.getCompanys, {},

+ 117 - 9
ys_int/src/views/base/factory.vue

@@ -21,12 +21,12 @@
 			<el-table-column prop="companyName" :label="$t('basic.proName')" width="250" sortable></el-table-column>
             <el-table-column prop="administrator" :label="$t('basic.proManager')" width="150" sortable>
                 <template slot-scope="scope">
-                    <router-link to="/staff" tag="span" style="cursor: pointer; color: #409eff;">{{scope.row.administrator}}</router-link>
+                    <router-link :to="'/staff?name='+scope.row.administrator" tag="span" style="cursor: pointer; color: #409eff;">{{scope.row.administrator}}</router-link>
                 </template>
             </el-table-column>
             <el-table-column prop="relateCompanyList" :label="$t('basic.proAsset')" sortable>
                 <template slot-scope="scope">
-                    <span class="info" v-for="(item, index) in scope.row.relateCompanyList">
+                    <span class="info" :key="item.id" v-for="(item, index) in scope.row.relateCompanyList">
                         {{item.companyName}}
                         <span v-if="index != scope.row.relateCompanyList.length-1">、</span>
                     </span>
@@ -35,6 +35,7 @@
             <el-table-column prop="companyAddress" :label="$t('basic.proAddress')" sortable></el-table-column>
 			<el-table-column :label="$t('base.operate')" width="200">
 				<template slot-scope="scope">
+					<el-button size="small" @click.native="showDetail(scope.row.id)">{{$t('base.detail')}}</el-button>
 					<el-button size="small" @click.native="handleEdit(scope.$index, scope.row)">{{$t('base.edit')}}</el-button>
 					<el-button type="danger" size="small" @click.native.native="handleDel(scope.$index, scope.row)">{{$t('el.upload.delete')}}</el-button>
 				</template>
@@ -60,6 +61,42 @@
 				<el-form-item label-width="150px" :label="$t('basic.proName')" prop="companyName" v-show="addState">
 					<el-input v-model="addForm.companyName" autocomplete="off" :placeholder="$t('basic.inputProName')" style="width:485px"></el-input>
 				</el-form-item>
+				<el-form-item label-width="150px" :label="$t('basic.contact')" prop="contact" v-show="addState">
+					<el-input v-model="addForm.contact" :placeholder="$t('basic.input')" style="width:485px"></el-input>
+				</el-form-item>
+				<el-form-item label-width="150px" :label="$t('basic.contactPhone')" prop="contactPhone" v-show="addState">
+					<el-input v-model="addForm.contactPhone" :placeholder="$t('basic.input')" style="width:485px"></el-input>
+				</el-form-item>
+				<el-form-item label-width="150px" :label="$t('basic.setupDate')" prop="setupDate" v-show="addState">
+					<!-- <el-input v-model="addForm.companyName" autocomplete="off" :placeholder="$t('basic.input')" style="width:485px"></el-input> -->
+                    <el-date-picker
+                        v-model="addForm.setupDate"
+                        type="date"
+                        format="yyyy-MM-dd" 
+                        value-format="yyyy-MM-dd" 
+                        :placeholder="$t('basic.select')">
+                        </el-date-picker>
+				</el-form-item>
+				<el-form-item label-width="150px" :label="$t('basic.prop')" prop="prop" v-show="addState">
+					<!-- <el-input v-model="addForm.companyName" autocomplete="off" :placeholder="$t('basic.input')" style="width:485px"></el-input> -->
+                    <el-select v-model="addForm.prop" :placeholder="$t('basic.select')">
+                    <el-option label="私营企业" value="私营企业"></el-option>
+                    <el-option label="集体企业" value="集体企业"></el-option>
+                    <el-option label="国有企业" value="国有企业"></el-option>
+                    <el-option label="合伙企业" value="合伙企业"></el-option>
+                    <el-option label="个体工商户" value="个体工商户"></el-option>
+                    <el-option label="联营企业" value="联营企业"></el-option>
+                    <el-option label="股份合作制企业" value="股份合作制企业"></el-option>
+                    <el-option label="有限责任公司" value="有限责任公司"></el-option>
+                    <el-option label="股份有限公司" value="股份有限公司"></el-option>
+                    </el-select>
+				</el-form-item>
+                <el-form-item label-width="150px" :label="$t('basic.runningTime')" prop="runningTime" v-show="addState">
+					<el-input v-model="addForm.runningTime" :placeholder="$t('basic.input')" style="width:485px"></el-input>
+				</el-form-item>
+                <el-form-item label-width="150px" :label="$t('basic.area')" prop="area" v-show="addState">
+					<el-input v-model="addForm.area" :placeholder="$t('basic.input')" style="width:485px"></el-input>
+				</el-form-item>
                 <el-form-item label-width="150px" :label="$t('basic.proAsset')" v-show="addState">
                     <el-select v-model="addForm.companyIds" clearable multiple filterable :placeholder="$t('basic.inputProAsset')" style="width:485px">
                         <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id">
@@ -96,6 +133,42 @@
 				<el-form-item :label="$t('basic.proName')" prop="companyName">
 					<el-input v-model="editForm.companyName" autocomplete="off" :placeholder="$t('basic.inputProName')" style="width:485px"></el-input>
 				</el-form-item>
+                <el-form-item label-width="100px" :label="$t('basic.contact')" prop="contact" v-show="addState">
+					<el-input v-model="editForm.contact" :placeholder="$t('basic.input')" style="width:485px"></el-input>
+				</el-form-item>
+				<el-form-item label-width="100px" :label="$t('basic.contactPhone')" prop="contactPhone" v-show="addState">
+					<el-input v-model="editForm.contactPhone" :placeholder="$t('basic.input')" style="width:485px"></el-input>
+				</el-form-item>
+				<el-form-item label-width="100px" :label="$t('basic.setupDate')" prop="setupDate" v-show="addState">
+					<!-- <el-input v-model="addForm.companyName" autocomplete="off" :placeholder="$t('basic.input')" style="width:485px"></el-input> -->
+                    <el-date-picker
+                        v-model="editForm.setupDate"
+                        type="date"
+                        format="yyyy-MM-dd" 
+                        value-format="yyyy-MM-dd" 
+                        :placeholder="$t('basic.select')">
+                        </el-date-picker>
+				</el-form-item>
+				<el-form-item label-width="100px" :label="$t('basic.prop')" prop="prop" v-show="addState">
+					<!-- <el-input v-model="addForm.companyName" autocomplete="off" :placeholder="$t('basic.input')" style="width:485px"></el-input> -->
+                    <el-select v-model="editForm.prop" :placeholder="$t('basic.select')">
+                    <el-option label="私营企业" value="私营企业"></el-option>
+                    <el-option label="集体企业" value="集体企业"></el-option>
+                    <el-option label="国有企业" value="国有企业"></el-option>
+                    <el-option label="合伙企业" value="合伙企业"></el-option>
+                    <el-option label="个体工商户" value="个体工商户"></el-option>
+                    <el-option label="联营企业" value="联营企业"></el-option>
+                    <el-option label="股份合作制企业" value="股份合作制企业"></el-option>
+                    <el-option label="有限责任公司" value="有限责任公司"></el-option>
+                    <el-option label="股份有限公司" value="股份有限公司"></el-option>
+                    </el-select>
+				</el-form-item>
+                <el-form-item label-width="100px" :label="$t('basic.runningTime')" prop="runningTime" v-show="addState">
+					<el-input v-model="editForm.runningTime" :placeholder="$t('basic.input')" style="width:485px"></el-input>
+				</el-form-item>
+                <el-form-item label-width="100px" :label="$t('basic.area')" prop="area" v-show="addState">
+					<el-input v-model="editForm.area" :placeholder="$t('basic.input')" style="width:485px"></el-input>
+				</el-form-item>
                 <el-form-item :label="$t('basic.proAsset')">
                     <el-select v-model="editForm.companyIds" clearable multiple filterable :placeholder="$t('basic.inputProAsset')" style="width:485px">
                         <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id">
@@ -201,9 +274,14 @@
                     account: '',
                     companyId: '',
                     roleName: this.$t('basic.system'),
-                    flag: 0
+                    flag: 0,
+                    contact:'',
+                    contactPhone:'',
+                    setupDate:'',
+                    prop:'',
+                    runningTime:'',
+                    area:'',
 				},
-                
                 // 编辑界面
 				editFormVisible: false,
 				editLoading: false,
@@ -215,7 +293,13 @@
                     yLng: 0,
                     xLat: 0,
                     companyIds: [],
-                    flag: 1
+                    flag: 1,
+                    contact:'',
+                    contactPhone:'',
+                    setupDate:'',
+                    prop:'',
+                    runningTime:'',
+                    area:'',
 				}
 			}
 		},
@@ -345,7 +429,13 @@
                             yLng: this.addForm.yLng,
                             xLat: this.addForm.xLat,
                             companyIds: str,
-                            flag: 0
+                            flag: 0,
+                            contact: this.addForm.contact,
+                            contactPhone: this.addForm.contactPhone,
+                            setupDate: this.addForm.setupDate,
+                            prop: this.addForm.prop,
+                            runningTime: this.addForm.runningTime,
+                            area: this.addForm.area,
                         } , res => {
                             this.addLoading = false;
                             if (res.code == "ok") {
@@ -437,7 +527,9 @@
                     })
 				});
             },
-            
+            showDetail(id) {
+                this.$router.push("/factoryDetail?id="+id);
+            },
 			//显示编辑界面
 			handleEdit(index, row) {
                 this.editFormVisible = true;
@@ -453,7 +545,13 @@
                     yLng: row.ylng,
                     xLat: row.xlat,
                     companyIds: array,
-                    flag: 1
+                    flag: 1,
+                    contact: row.contact,
+                    contactPhone: row.contactPhone,
+                    setupDate: row.setupDate,
+                    prop: row.prop,
+                    runningTime: row.runningTime,
+                    area: row.area,
                 };
             },
             
@@ -478,7 +576,13 @@
                             yLng: this.editForm.yLng,
                             xLat: this.editForm.xLat,
                             companyIds: str,
-                            flag: 1
+                            flag: 1,
+                            contact: this.editForm.contact,
+                            contactPhone: this.editForm.contactPhone,
+                            setupDate: this.editForm.setupDate,
+                            prop: this.editForm.prop,
+                            runningTime: this.editForm.runningTime,
+                            area: this.editForm.area,
                         } , res => {
                             this.editLoading = false;
                             if (res.code == "ok") {
@@ -613,6 +717,10 @@
             }
         },
 		mounted() {
+            var name = this.$route.query.name;
+            if (name != null) {
+                this.filters.keyName = name;
+            }
             this.getMsg();
 			this.getFactory();
         }

+ 227 - 0
ys_int/src/views/base/factoryDetail.vue

@@ -0,0 +1,227 @@
+<template>
+	<section>
+		<!--工具条-->
+		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
+			<el-form :inline="true">
+                <el-form-item>
+                    <el-button type="text" @click="backToList" icon="el-icon-back" class="back">{{$t('base.back')}}</el-button>
+                </el-form-item>
+                <el-form-item>
+                     <span class="title">{{data.companyName}}</span>
+                </el-form-item>
+			</el-form>
+		</el-col>
+
+        <!-- 主区域 -->
+        <el-col :span="24" :style="allDetail">
+            <el-col :span="24" class="title">
+                {{data.companyName}}
+            </el-col>
+            <el-col :span="24" class="main">
+                <el-col :span="8" class="detail">
+                    {{$t('basic.contact')}}:
+                    <span class="info">{{data.contact}}</span>
+                </el-col>
+                <el-col :span="8" class="detail">
+                    {{$t('basic.contactPhone')}}:
+                    <span class="info">{{data.contactPhone}}</span>
+                </el-col>
+                <el-col :span="8" class="detail">
+                    {{$t('basic.setupDate')}}:
+                    <span class="info">{{data.setupDate}}</span>
+                </el-col>
+            </el-col>
+            <el-col :span="24" class="main">
+                <el-col :span="8" class="detail">
+                    {{$t('basic.prop')}}:
+                    <span class="info">{{data.prop}}</span>
+                </el-col>
+                <el-col :span="8" class="detail">
+                    {{$t('basic.area')}}:
+                    <span class="info">{{data.area}}</span>
+                </el-col>
+                <el-col :span="8" class="detail">
+                    {{$t('basic.runningTime')}}:
+                    <span class="info">{{data.runningTime}}</span>
+                </el-col>
+            </el-col>
+
+            <el-col :span="24" class="main">
+                <el-col :span="24" class="detail">
+                    {{$t('basic.proAsset')}}:
+                    <span class="info" v-for="(item,index) in data.relateCompanyList" :key="item.id">{{item.companyName}}
+                        <span v-if="index != data.relateCompanyList.length-1">、</span>
+                    </span>
+                </el-col>
+            </el-col>
+            <el-col :span="24" class="main">
+                <el-col :span="24" class="detail">
+                    {{$t('basic.proAddress')}}:
+                    <span class="info">{{data.companyAddress}}</span>
+                </el-col>
+            </el-col>
+            <el-col :span="24" class="main">
+                <el-col :span="24" class="detail">
+                    <div id="addContainer" class="formMap"></div>
+                </el-col>
+            </el-col>
+        </el-col>
+	</section>
+</template>
+
+<script>
+    import Vue from 'vue';
+	import util from '../../common/js/util'
+
+	export default {
+		data() {
+			return {
+                // 地图
+                map: '',
+                marker: '',
+                allDetail: {
+                    overflow: "auto",
+                    padding: "0px 5px",
+                    height: 0
+                },
+                data:{},
+                user: JSON.parse(sessionStorage.getItem('user')),
+			}
+		},
+		methods: {
+            backToList() {
+                this.$router.go(-1);
+            },
+            //获取地图
+            setMap() {
+                this.map = new AMap.Map('addContainer', {
+                    resizeEnable: true, // 允许缩放
+                    center:[ this.data.ylng , this.data.xlat ],
+                    zoom:10
+                })
+
+                this.marker = new AMap.Marker({
+                    map: this.map,
+                    position: new AMap.LngLat(this.data.ylng , this.data.xlat),   // 经纬度
+                });
+                
+            },
+
+			//获取生产方详情
+			getFactoryDetail() {
+				this.listLoading = true;
+                this.http.post(this.port.base.companyDetail, {
+                    id:this.$route.query.id
+                }, res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        this.data = res.data;
+                        this.setMap();
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+            },
+        },
+        created() {
+            let height = window.innerHeight;
+            this.allDetail.height = height - 170 + "px";
+            const that = this;
+            window.onresize = function temp() {
+                that.allDetail.height = window.innerHeight - 170;
+            };
+        },
+        
+		mounted() {
+			this.getFactoryDetail();
+        }
+	}
+</script>
+
+<style scoped>
+    a {
+        text-decoration: none;
+    }
+
+    a.download {
+        color:#20a0ff;
+    }
+
+    .toolbar .el-form-item {
+        font-size: 14px;
+        vertical-align: middle;
+    }
+
+    .back {
+        font-size: 16px;
+    }
+
+    .divLine {
+        width: 2px;
+        background: #c3c3c3;
+        height: 100%;
+    }
+
+    .projectTitle {
+        font-size: 18px;
+        color: #333;
+    }
+
+    .state {
+        float: right;
+    }
+
+    .tips {
+        color: #bbb;
+    }
+
+    .title {
+        padding-left: 10px;
+        padding-bottom: 0px;
+        margin: 20px 0;
+        font-size: 16px;
+        line-height: 24px;
+        border-left: 1px #20a0ff solid;
+    }
+
+    .editDetail {
+        margin-left: 10px;
+        color: #20a0ff;
+        cursor: pointer;
+    }
+
+    .download {
+        text-decoration:none;
+        color: #20a0ff;
+        cursor: pointer;
+    }
+
+    .info {
+        color: grey;
+    }
+
+    .belongPro {
+        cursor: pointer;
+        color:#20a0ff;
+    }
+
+    .main {
+        padding-left: 10px;
+    }
+
+    .detail {
+        margin-bottom: 20px;
+    }
+    .formMap {
+        height: 400px;
+    }
+</style>

+ 80 - 16
ys_int/src/views/detection/maintenance.vue

@@ -7,7 +7,7 @@
                     <el-button type="text" @click="backToDetection" icon="el-icon-back" class="back">{{$t('base.back')}}</el-button>
                 </el-form-item>
                 <el-form-item class="divLine"></el-form-item>
-                <el-form-item>{{mouldName}}</el-form-item>
+                <el-form-item><a style="color: #409EFF; cursor: pointer" @click="toMould(mouldId)">{{mouldName}}</a></el-form-item>
                 <el-form-item class="state" style="float: right;">{{$t('runTest.state')}}:
                     <span style="color:#909399" v-if="mouldState == 0">{{$t('base.static')}}</span>
                     <span style="color:#00CD66" v-else-if="mouldState == 1">{{$t('base.run')}}</span>
@@ -28,7 +28,7 @@
                 <span v-if="requirement" style="color: #ff4949;">{{$t('runTest.isMaintain0')}}</span>
                 <span v-else style="color: black;">{{$t('runTest.isMaintain1')}}</span>
                 <el-button size="small" type="primary" @click="showMaintenance" style="margin-left: 16px;"
-                    v-if="!(user.parentId == 1 && user.subordinateType == 1) && requirement">
+                    v-if="requirement">
                     {{$t('runTest.immediate')}}
                 </el-button>
             </el-col>
@@ -43,12 +43,26 @@
             <!-- 开合周期 -->
             <el-col :span="24" class="title">
                 {{$t('runTest.openCycle')}}
+
+                <!-- <el-date-picker v-model="openCycle" style="width:125px;margin-left:20px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" 
+                        @change='changeOpen(2)' size="mini" :clearable="false" type="date" :placeholder="$t('el.datepicker.selectDate')"></el-date-picker> -->
+                <el-date-picker style="width:325px;margin-left:60px;" 
+                    format="yyyy-MM-dd" 
+                    value-format="yyyy-MM-dd" 
+                    v-model="openCycle"
+                    @change='changeOpen(2)' :clearable="false"
+                    type="daterange"
+                    align="right"
+                    unlink-panels
+                    range-separator="至"
+                    start-placeholder="开始日期"
+                    end-placeholder="结束日期"
+                    :picker-options="pickerOptions">
+                    </el-date-picker>
                 <el-button size="small" type="primary" @click="openExport" style="float:right;margin-right: 16px;">
                     {{$t('runTest.exportExcel')}}
                 </el-button>
-                <el-date-picker v-model="openCycle" style="float:right;width:125px;margin-right:20px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" 
-                        @change='changeOpen(2)' size="mini" :clearable="false" type="date" :placeholder="$t('el.datepicker.selectDate')"></el-date-picker>
-            </el-col>
+                </el-col>
             <el-col :span="24">
                 <!-- <el-col :span="11">
                     <div style="padding:0 20px">
@@ -207,6 +221,50 @@
         data() {
             return {
                 user: JSON.parse(sessionStorage.getItem("user")),
+                pickerOptions: {
+                shortcuts: [{
+                    text: '今天',
+                    onClick(picker) {
+                    const end = new Date();
+                    const start = new Date();
+                    picker.$emit('pick', [start, end]);
+                    }
+                },{
+                    text: '昨天',
+                    onClick(picker) {
+                    const end = new Date();
+                    const start = new Date();
+                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
+                    end.setTime(end.getTime() - 3600 * 1000 * 24 * 1);
+                    picker.$emit('pick', [start, end]);
+                    }
+                },{
+                    text: '最近一周',
+                    onClick(picker) {
+                    const end = new Date();
+                    const start = new Date();
+                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+                    picker.$emit('pick', [start, end]);
+                    }
+                }, {
+                    text: '最近一个月',
+                    onClick(picker) {
+                    const end = new Date();
+                    const start = new Date();
+                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+                    picker.$emit('pick', [start, end]);
+                    }
+                }, {
+                    text: '最近三个月',
+                    onClick(picker) {
+                    const end = new Date();
+                    const start = new Date();
+                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+                    picker.$emit('pick', [start, end]);
+                    }
+                }]
+                },
+                
                  detail: '',
                 //本页模具ID
                 mouldId: null,
@@ -266,8 +324,8 @@
                 },
                 imageUrl: "",
                 openNum: util.formatDate.format(new Date(), 'yyyy-MM-dd'),
-                // openCycle: [util.formatDate.format(new Date(), 'yyyy-MM-dd') , util.formatDate.format(new Date(), 'yyyy-MM-dd')],
-                openCycle: util.formatDate.format(new Date(), 'yyyy-MM-dd'),
+                openCycle: [util.formatDate.format(new Date(), 'yyyy-MM-dd') , util.formatDate.format(new Date(), 'yyyy-MM-dd')],
+                // openCycle: util.formatDate.format(new Date(), 'yyyy-MM-dd'),
                 allDetail: {
                     overflow: 'auto',
                     padding: '0px 5px',
@@ -286,6 +344,10 @@
             };
         },
         methods: {
+            //跳转到模具详情
+            toMould(id) {
+                this.$router.push("/moldList/" + id + "/0");
+            },
             //分页
             handleCurrentChange(val) {
                 this.page = val;
@@ -541,7 +603,8 @@
             getEcharts() {
                 this.http.post( this.port.base.openingAndClosingTimesChartCycle, {
                     equipmentNo: this.detail.equipmentNo,
-                    time: this.openCycle
+                    startDate: this.openCycle[0],
+                    endDate: this.openCycle[1],
                 },
                 res => {
                     if (res.code == "ok") {
@@ -577,7 +640,7 @@
                             }
                             num++;
                         }
-
+                        console.log('sData.length==='+sData.length);
                         let myChart = this.echarts.init(document.getElementById("myChart2"));
                         this.echarts2 = myChart;
                         var option = {
@@ -641,7 +704,7 @@
                                     xAxisIndex: [0,1],
                                     bottom: "0",
                                     start: 0,
-                                    end: 40,
+                                    end: 100,
                                     left:"center",
                                     handleIcon: "M0,0 v9.7h5 v-9.7h-5 Z",
                                     handleStyle: {
@@ -659,12 +722,13 @@
                                     },
                                     fillerColor: "rgba(31,178,251,0.2)",
                                     labelFormatter: function (value, params) {
-                                        var str = "";
-                                        if (params.length > 4) {
-                                            str = params.substring(0, 4) + "…";
-                                        } else {
-                                            str = params;
-                                        }
+                                        // var str = "";
+                                        // if (params.length > 4) {
+                                        //     str = params.substring(0, 4) + "…";
+                                        // } else {
+                                        //     str = params;
+                                        // }
+                                        var str = params;
                                         return str;
                                     }
                                 }

+ 70 - 17
ys_int/src/views/map/map.vue

@@ -120,11 +120,11 @@
                             var halfNumWidth = numMetrics.width / 2;
 
                             labelCtx.beginPath();
-                            labelCtx.fillStyle = 'rgba(12 , 239 , 231 , 0.8)';//'#3366cc';
+                            labelCtx.fillStyle = 'rgba(17,150,238 , 0.8)';//'#3366cc';
 
                             //绘制一个蓝色背景
-                            labelCtx.strokeStyle= "rgba(12 , 239 , 231 , 0.65)"
-                            labelCtx.fillStyle = 'rgba(12 , 239 , 231 , 0.65)';
+                            labelCtx.strokeStyle= "rgba(17,150,238, 0.65)"
+                            labelCtx.fillStyle = 'rgba(17,150,238, 0.65)';
                             
                             var radius = 0;
                             if(textMetrics.width > numMetrics.width) {
@@ -209,13 +209,31 @@
                             //     position: [parseFloat(data[i].lng), parseFloat(data[i].lat)],
                             //     map: _this.map
                             // });
-
-                            var shape = new SvgMarker.Shape['Circle']({
-                                height: 20 * (1 * 0.3),
-                                strokeWidth: 1,
-                                strokeColor: 'rgba(255, 0, 0, 1)',
-                                fillColor: 'rgba(255, 0, 0, 1)'
-                            });
+                            var shape;
+                            if (data[i].type == 0) {
+                                //工厂内的点, 用绿色
+                                shape = new SvgMarker.Shape['Circle']({
+                                    height: 20*(1*0.8),
+                                    strokeWidth: 1,
+                                    strokeColor: 'rgba(0,204,0, 0.6)',
+                                    fillColor: 'rgba(0,204,0, 0.6)'
+                                });
+                            } else {
+                                //偏离的单独点,非移模状态用红色。
+                                var dotColor = '';
+                                if (data[i].moveState == 2) {
+                                    dotColor = 'rgba(0,255,0, 1)';
+                                } else {
+                                    dotColor = 'rgba(255, 0, 0, 1)';
+                                }
+                                shape = new SvgMarker.Shape['Circle']({
+                                    height: 20 * (1 * 0.3),
+                                    strokeWidth: 1,
+                                    strokeColor: dotColor,
+                                    fillColor: dotColor
+                                });
+                            }
+                            
                             var marker = new SvgMarker(
                                 shape, {
                                     map: _this.map,
@@ -238,18 +256,52 @@
                             } else if(data[i].state == '6'){
                                 state = '<span style="color:#F56C6C">'+_this.$t('mold.dropped')+'</span>'
                             }
-
-                            var str = "<div>模具名称:&nbsp;&nbsp;&nbsp;<router-link :to='{ path: '/moldList/"+ data[i].id +"/0' }'>"+ data[i].modelName +"</router-link></div>"
-                                +"<div>运行状态:&nbsp;&nbsp;&nbsp;"+ state +"</div>"
+                            var str ='';
+                            if (data[i].type == 0) {
+                                //工厂
+                                str = "<div>工厂名称:&nbsp;&nbsp;&nbsp;"+ data[i].name +"</div>";
+                                for (var m=0;m<data[i].children.length; m++) {
+                                    var model = data[i].children[m];
+                                    var state2 = "";
+                                    if(model.state == '0'){
+                                        state2 = '<span style="color:#909399">'+_this.$t('base.static')+'</span>'//_this.$t('base.static') // 静止
+                                    } else if(model.state == '1'){
+                                        state2 = '<span style="color:#00CD66">'+_this.$t('base.run')+'</span>'
+                                    } else if(model.state == '2'){
+                                        state2 = '<span style="color:#F56C6C">'+_this.$t('base.warning')+'</span>'
+                                    } else if(model.state == '3'){
+                                        state2 = '<span style="color:#909399">'+_this.$t('mold.beScrapped')+'</span>'
+                                    } else if(model.state == '4'){
+                                        state2 = '<span style="color:#909399">'+_this.$t('mold.scraped')+'</span>'
+                                    } else if(model.state == '5'){
+                                        state2 = '<span style="color:#F56C6C">'+_this.$t('mold.abnormal')+'</span>'
+                                    } else if(model.state == '6'){
+                                        state2 = '<span style="color:#F56C6C">'+_this.$t('mold.dropped')+'</span>'
+                                    }
+                                    str += "<div><a href='/#/moldList/"+ model.itemId +"/0'>"+model.name+"</a>:&nbsp;&nbsp;&nbsp;<span style='text-align:right'>"+ state2 +"</span></div>"
+                                }
+                            } else {
+                                //模具
+                                
+                                str = "<div>模具名称:&nbsp;&nbsp;&nbsp;<a href='/#/moldList/"+ data[i].itemId +"/0'>"+ data[i].name +"</a></div>"
+                                +"<div>运行状态:&nbsp;&nbsp;&nbsp;"+ state +"</div>";
+                                if (data[i].moveState == 2) {//非移模申请同意,进行中
+                                    str += "<div style='color:green'>移模进行中</div>";
+                                } else {
+                                    str += "<div style='color:red'>偏离生产方工厂</div>";
+                                }
+                                
+                            }
                             
                             marker.content = str;
                             marker.id = data[i].id;
-                            marker.on('click', jumpTo);
+                            // marker.on('click', jumpTo);
                             marker.on('mouseover', openInfo);
-                            marker.on('mouseout', closeInfo);
+                            // marker.on('mouseout', closeInfo);
                         }
                     }
 
+
                     function jumpTo(e) {
                         // _this.$router.push("/moldList/" + e.target.id + "/0");
                         _this.$router.push("/moldList");
@@ -292,8 +344,9 @@
             //新地图
             that.map = new AMap.Map('container', {
                 zoom: 4,
-                mapStyle: "amap://styles/8016abec658e1132508723183f848f14",
-                features: ['bg']
+                mapStyle: "amap://styles/normal",
+                // mapStyle: "amap://styles/8016abec658e1132508723183f848f14",
+                // features: ['bg']
             });
 
             that.map.plugin(["AMap.Scale"],function(){

+ 16 - 10
ys_int/src/views/message.vue

@@ -15,7 +15,7 @@
                 <el-tab-pane name="0" :label="$t('home.approval')">
                     <div :style="heightString">
                         <div class="noMsg" v-if="messages[0].length == 0">{{$t('home.noApproval')}}</div>
-                        <div class="message-div" v-for="item in messages[0]" @click="locationHerf(item.id, item.refId, item.noticeType, item.belongType)">
+                        <div class="message-div" :key="item.id" v-for="item in messages[0]" @click="locationHerf(item)">
                             <p>
                                 <span class="message-title isRead" v-if="item.isRead == 1">{{item.projectName}}</span>
                                 <span class="message-title" v-else>{{item.projectName}}</span>
@@ -41,7 +41,7 @@
                 <el-tab-pane name="1" :label="$t('home.warning')">
                     <div :style="heightString">
                         <div class="noMsg" v-if="messages[1].length == 0">{{$t('home.noWarning')}}</div>
-                        <div class="message-div" v-for="item in messages[1]" @click="locationHerf(item.id, item.refId, item.noticeType, null)">
+                        <div class="message-div" :key="item.id" v-for="item in messages[1]" @click="locationHerf(item)">
                             <p>
                                 <span class="message-title isRead" v-if="item.isRead == 1">{{item.projectName}}</span>
                                 <span class="message-title" v-else>{{item.projectName}}</span>
@@ -67,7 +67,7 @@
                 <el-tab-pane name="2" :label="$t('home.maintain')">
                     <div :style="heightString">
                         <div class="noMsg" v-if="messages[2].length == 0">{{$t('home.noMaintain')}}</div>
-                        <div class="message-div" v-for="item in messages[2]" @click="locationHerf(item.id, item.refId, item.noticeType, null)">
+                        <div class="message-div" :key="item.id" v-for="item in messages[2]" @click="locationHerf(item)">
                             <p>
                                 <span class="message-title isRead" v-if="item.isRead == 1">{{item.projectName}}</span>
                                 <span class="message-title" v-else>{{item.projectName}}</span>
@@ -180,9 +180,10 @@
                 });
             },
             //点击消息的跳转
-            locationHerf(id, refid, type, approval) {
+            locationHerf(item) {
+                
                 this.http.post( this.port.notice.read, {
-                    id: id
+                    id: item.id
                 },
                 res => {
                     if (res.code == "ok") {
@@ -199,15 +200,20 @@
                         type: "error"
                     });
                 });
-                if (type == 0) {
+                if (item.noticeType == 0) {
                     //审批 跳转到模具详情
-                    this.$router.push("/moldList/" + refid + "/" + approval);
-                } else if (type == 1) {
+                    if (item.belongType == 6) {
+                        //项目文档申请删除消息,跳转到项目详情页面
+                        this.$router.push("/project/" + item.projectId);
+                    } else {
+                        this.$router.push("/moldList/" + item.refId + "/" + item.belongType);
+                    }
+                } else if (item.noticeType == 1) {
                     //警告 跳转到运行监测
                     this.$router.push("/detection");
-                } else if (type == 2) {
+                } else if (item.noticeType == 2) {
                     //保养 跳转到运行监测详情
-                    this.$router.push("/detection/" + refid);
+                    this.$router.push("/detection/" + item.refId);
                 }
             }
         },

+ 222 - 20
ys_int/src/views/mold/moldDetail.vue

@@ -10,6 +10,7 @@
                 <el-form-item>
                     <span class="projectTitle">{{moldDetail.modelName}}</span>
                 </el-form-item>
+                
                 <el-form-item class="state">
                     {{$t('runTest.state')}}:
                     <a style="color: #909399; cursor: pointer" @click="toDetection" v-if="moldDetail.state == 0">{{$t('base.static')}}</a>
@@ -21,6 +22,31 @@
                     <a style="color: #F56C6C; cursor: pointer" @click="toDetection" v-if="moldDetail.state == 6">{{$t('mold.dropped')}}</a>
                     <span class="tips">({{$t('mold.view')}})</span>
                 </el-form-item>
+                
+                <el-form-item class="state" style="margin-right:30px;">
+                    <el-tooltip v-if="moldDetail.moveApplyState > 0" class="item" effect="light" :content="'原因:'+moldDetail.moveApplyReason" placement="bottom">
+                        <span 
+                            :style="'color:' +['black','orange','green','red'][moldDetail.moveApplyState] "
+                            >
+                        {{["正常","移模待审核","移模同意,进行中","移模驳回"][moldDetail.moveApplyState]}}
+                        </span>
+                    </el-tooltip>
+                    
+                    
+                    <!--项目经理负责申请移模-->
+                    <span v-if="(moldDetail.managerId == user.id) && (moldDetail.moveApplyState==0||moldDetail.moveApplyState==3)">
+                        <el-button @click="moveDialogVisible=true">申请移模</el-button>
+                    </span>
+                    <!-- 移模同意后,项目经理可以完成移模,重置为正常状态 -->
+                    <span v-if="(moldDetail.managerId == user.id) && (moldDetail.moveApplyState==2)">
+                        <el-button @click="finishMoveMould">移模完成</el-button>
+                    </span>
+                    <!-- 资产方审批人负责审批移模申请 -->
+                    <span v-if="(assetApproverId == user.id) && (moldDetail.moveApplyState==1)">
+                        <el-button @click="checkMoveApply(2)">通过</el-button>
+                        <el-button @click="checkMoveApply(3)">驳回</el-button>
+                    </span>
+                </el-form-item>
             </el-form>
         </el-col>
 
@@ -40,15 +66,15 @@
                 <!-- <el-col :span="6" class="detail">
                     {{$t('mold.hillNumber')}}:
                     <span class="info">{{moldDetail.hillNumber}}</span>
+                </el-col>-->
+                <el-col :span="6" class="detail">
+                    {{$t('basic.startTime')}}:
+                    <span class="info">{{moldDetail.startTime}}</span>
                 </el-col>
                 <el-col :span="6" class="detail">
-                    {{$t('basic.diffTime')}}:
-                    <span class="info">{{moldDetail.diffTime}}</span>
-                </el-col> -->
-                <!-- <el-col :span="6" class="detail">
                     {{$t('mold.initial')}}:
                     <span class="info">{{moldDetail.initialModulus==null?'':moldDetail.initialModulus.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')}}</span>
-                </el-col> -->
+                </el-col>
                 <el-col :span="6" class="detail">
                     {{$t('mold.initialR')}}:
                     <span class="info">{{(moldDetail.runTimes==null?0:moldDetail.runTimes + moldDetail.initialModulus).toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')}}</span>
@@ -57,29 +83,34 @@
                     {{$t('mold.life')}}:
                     <span class="info">{{moldDetail.settingLife==null?'':moldDetail.settingLife.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')}}</span>
                 </el-col>
-                <el-col :span="6" class="detail">
-                    {{$t('mold.rfid')}}:
-                    <span class="info">{{moldDetail.rfid}}</span>
-                </el-col>
                 <el-col :span="6" class="detail">
                     {{$t('mold.hole')}}:
                     <span class="info">{{moldDetail.holes}}</span>
                 </el-col>
+                <el-col :span="6" class="detail">
+                    {{$t('mold.maintainCount')}}:
+                    <span class="info">{{moldDetail.maintainCount}}</span>
+                </el-col>
+                <el-col :span="6" class="detail">
+                    {{$t('mold.fixedMaintainCount')}}:
+                    <span class="info">{{moldDetail.fixedMaintainCount}}</span>
+                </el-col>
+                
                 <el-col :span="12" class="detail">
                     {{$t('mold.projectName')}}:
                     <span class="info belongPro" @click="toPro(moldDetail.projectId)">{{moldDetail.projectName}}</span>
                 </el-col>
-                <el-col :span="24" class="detail">
+                <!-- <el-col :span="24" class="detail">
                     {{$t('basic.equipmentNo')}}:
                     <span class="info">{{moldDetail.equipmentNo}}</span>
-                </el-col>
+                </el-col> -->
                 <el-col :span="24" class="detail">
                     {{$t('basic.proNum')}}:
                     <span class="info">{{moldDetail.equipmentName}}</span>
                 </el-col>
                 <el-col :span="24" class="detail">
                     {{$t('basic.producer')}}:
-                    <span class="info">{{moldDetail.produceCompany}}</span>
+                    <span class="info">{{moldDetail.produceCompany}}</span><i class="el-icon-edit editDetail" v-if="user.id == moldDetail.managerId || user.id == moldDetail.creatorId" @click="changeProducer"></i>
                 </el-col>
                 <el-col :span="24" class="detail">
                     {{$t('basic.proAddress')}}:
@@ -116,14 +147,14 @@
                     {{$t('mold.mathead')}}:
                     <span class="info">{{moldDetail.injectionMolding==null?'':moldDetail.injectionMolding.headWeight}}</span>
                 </el-col>
-                <el-col :span="6" class="detail">
+                <!-- <el-col :span="6" class="detail">
                     {{$t('mold.minshot')}}:
                     <span class="info">{{moldDetail.injectionMolding==null?'':moldDetail.injectionMolding.minShotWeight}}</span>
                 </el-col>
                 <el-col :span="6" class="detail">
                     {{$t('mold.maxshot')}}:
                     <span class="info">{{moldDetail.injectionMolding==null?'':moldDetail.injectionMolding.maxShotWeight}}</span>
-                </el-col>
+                </el-col> -->
                 <el-col :span="6" class="detail">
                     {{$t('mold.stand')}}:
                     <span class="info">{{moldDetail.injectionMolding==null?'':moldDetail.injectionMolding.cycle}}</span>
@@ -234,6 +265,7 @@
                                     <el-button size="small" 
                                         v-if="(scope.row.uplodtorId == user.id && scope.row.state <= 0) || (scope.row.state == 3 && user.parentId == 1 && user.subordinateType == 0)" 
                                         @click="deleteFile(scope.row.id)" type="danger">{{$t('el.upload.delete')}}</el-button>
+                                    
                                 </template>
                             </el-table-column>
                         </el-table>
@@ -296,7 +328,7 @@
                                     </el-button>
                                     <el-button size="small" 
                                         v-if="scope.row.state == 3 && user.parentId == 1 && user.subordinateType == 0"  
-                                        @click="deleteFile(scope.row.id)" type="danger">{{$t('el.upload.delete')}}</el-button>
+                                        @click="deleteFile(scope.row.id)" type="danger">{{$t('mold.applyDelete')}}</el-button>
                                 </template>
                             </el-table-column>
                         </el-table>
@@ -335,7 +367,7 @@
                                     </a>
                                     <el-button size="small"
                                         v-if="(scope.row.uplodtorId == user.id && scope.row.state <= 0) || (scope.row.state == 3 && user.parentId == 1 && user.subordinateType == 0)" 
-                                        @click="deleteFile(scope.row.id)" type="danger">{{$t('el.upload.delete')}}</el-button>
+                                        @click="deleteFile(scope.row.id)" type="danger">{{$t('mold.applyDelete')}}</el-button>
                                 </template>
                             </el-table-column>
                         </el-table>
@@ -374,7 +406,7 @@
                                     </a>
                                     <el-button size="small"
                                         v-if="(scope.row.uplodtorId == user.id && scope.row.state <= 0) || (scope.row.state == 3 && user.parentId == 1 && user.subordinateType == 0)" 
-                                        @click="deleteFile(scope.row.id)" type="danger">{{$t('el.upload.delete')}}</el-button>
+                                        @click="deleteFile(scope.row.id)" type="danger">{{$t('mold.applyDelete')}}</el-button>
                                 </template>
                             </el-table-column>
                         </el-table>
@@ -467,7 +499,7 @@
                                     </el-button>
                                     <el-button size="small"
                                         v-if="(scope.row.uplodtorId == user.id && scope.row.state <= 0) || (scope.row.state == 3 && user.parentId == 1 && user.subordinateType == 0)" 
-                                        @click="deleteFile(scope.row.id)" type="danger">{{$t('el.upload.delete')}}</el-button>
+                                        @click="deleteFile(scope.row.id)" type="danger">{{$t('mold.applyDelete')}}</el-button>
                                 </template>
                             </el-table-column>
                         </el-table>
@@ -686,6 +718,33 @@
                 <el-button v-if="!addState" type="primary" @click.native="inviteSubmit" :loading="addLoading">{{$t('el.messagebox.confirm')}}</el-button>
             </div>
         </el-dialog>
+
+        <!-- 发起移模申请填写原因弹出框 -->
+        <el-dialog title="移模申请" v-if="moveDialogVisible" :visible.sync="moveDialogVisible" :close-on-click-modal="false" customClass="customWidth">
+            <el-form :model="newParts" label-width="100px" ref="newParts" class="demo-form-inline">
+                <el-form-item label="移模原因" prop="reason">
+                    <el-input v-model="reason"  placeholder="请填写移模原因"></el-input>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click.native="moveDialogVisible = false">{{$t('el.messagebox.cancel')}}</el-button>
+                <el-button type="primary" @click.native="submitMoveApply" :loading="editLoading">{{$t('el.messagebox.confirm')}}</el-button>
+            </div>
+        </el-dialog>
+        <!--修改生产方弹出框 -->
+        <el-dialog title="移模申请" v-if="changeProducerDialogVisible" :visible.sync="changeProducerDialogVisible" :close-on-click-modal="false" customClass="customWidth">
+            <el-form :model="newParts" label-width="100px" ref="newParts" class="demo-form-inline">
+                <el-form-item :label="$t('mold.factoryName')" >
+                    <el-select v-model="produceCompanyId" clearable filterable :placeholder="$t('mold.inputfactoryName')" style="width:470px">
+                        <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id"></el-option>
+                    </el-select>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click.native="changeProducerDialogVisible = false">{{$t('el.messagebox.cancel')}}</el-button>
+                <el-button type="primary" @click.native="submitChangeProducer" :loading="editLoading">{{$t('el.messagebox.confirm')}}</el-button>
+            </div>
+        </el-dialog>
     </section>
 </template>
 
@@ -788,6 +847,11 @@
                 }
             };            
             return {
+                produceCompanyId:null,
+                changeProducerDialogVisible:false,
+                assetApproverId:0,
+                moveDialogVisible: false,
+                reason:null,
                 detailId: this.$route.params.id,
                 user: JSON.parse(sessionStorage.getItem("user")),
                 moldDetail: {},
@@ -957,12 +1021,143 @@
                 files: [],
                 //报废文件
                 files2: [null, null],
-
                 twoId: null,
                 threeId: null,
             };
         },
         methods: {
+            submitChangeProducer() {
+                //提交修改生产方
+                this.http.post(this.port.mold.changeProducer, {
+                    id: this.detailId,
+                    produceCompanyId: this.produceCompanyId
+                }, res => {
+                    if (res.code == "ok") {
+                        this.getDetail();
+                        this.changeProducerDialogVisible = false;
+                        if (this.moldDetail.projectId != null) {
+                            this.$message({message:'生产方修改成功。由于该模具已有项目,请修改项目相关生产方人员。', type:'success'});
+                        }
+                        
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                });
+            },
+            getCompanys() {
+                //新版获取公司
+                this.http.post(this.port.base.relationList, {
+                    companyType: 1
+                }, res => {
+                    if (res.code == "ok") {
+                        this.companys = res.data;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                });
+            },
+            finishMoveMould() {
+                var _this = this;
+                this.$confirm('提示', '确定完成移模了吗?', {
+                    confirmButtonText: this.$t('el.messagebox.confirm'),
+                    cancelButtonText: this.$t('el.messagebox.cancel'),
+                    type: 'warning'
+                }).then(() => {
+                    //完成移模
+                    _this.http.post( _this.port.mold.finishMove, {
+                        mouldId: _this.detailId
+                    },
+                    res => {
+                        if (res.code == "ok") {
+                            //刷新数据
+                            _this.getDetail();
+                            _this.moveDialogVisible = false;
+                        } else {
+                            _this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.listLoading = false;
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                    });
+                   
+                }).catch(() => {});
+            },
+            //审核移模申请
+            checkMoveApply(status) {
+                //发起移模申请
+                this.http.post( this.port.mold.checkMoveMold, {
+                    status: status,
+                    mouldId: this.detailId
+                },
+                res => {
+                    if (res.code == "ok") {
+                        //刷新数据
+                        this.getDetail();
+                        this.moveDialogVisible = false;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+            submitMoveApply() {
+                //发起移模申请
+                this.http.post( this.port.mold.moveMold, {
+                    reason: this.reason,
+                    mouldId: this.detailId
+                },
+                res => {
+                    if (res.code == "ok") {
+                        //刷新数据
+                        this.getDetail();
+                        this.moveDialogVisible = false;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
             backToList() {
                 this.$router.go(-1);
             },
@@ -1018,6 +1213,7 @@
                 },
                 res => {
                     if (res.code == "ok") {
+                        this.assetApproverId = res.data.assetApproverId;
                         var detail = res.data.vo;
                         if (detail.endTime == null) {
                             detail.diffTime = "";
@@ -1472,7 +1668,12 @@
                     }
                 })
             },
-            
+
+            changeProducer() {
+                //修改生产方
+                this.produceCompanyId = this.moldDetail.produceCompanyId;
+                this.changeProducerDialogVisible = true;
+            },
             //打开零件修改
             editPort(row) {
                 this.editPortVisible = true;
@@ -1964,6 +2165,7 @@
         },
         mounted() {
             this.getDetail();
+            this.getCompanys();
         }
     };
 </script>

+ 32 - 23
ys_int/src/views/mold/moldList.vue

@@ -77,6 +77,7 @@
             </el-table-column>
             <el-table-column fixed="right" :label="$t('base.operate')" width="150" align="center" sortable v-if="user.parentId == 1 && user.subordinateType == 0">
                 <template slot-scope="scope">
+                    <!-- <el-button size="small" type="primary" @click="handleEdit(scope.row)">{{$t('base.edit')}}</el-button> -->
                     <el-button size="small" type="danger" @click="handleDel(scope.row)">{{$t('el.upload.delete')}}</el-button>
                 </template>
             </el-table-column>
@@ -104,9 +105,9 @@
                 <el-form-item :label="$t('mold.moldNo')" prop="modelNo" v-if="addState">
                     <el-input v-model="addForm.modelNo" autocomplete="off" :placeholder="$t('mold.inputmoldNo')" style="width:470px"></el-input>
                 </el-form-item>
-                <el-form-item :label="$t('basic.equipmentNo')" prop="equipmentId" v-if="addState">
-                    <el-select v-model="addForm.equipmentId" clearable filterable :placeholder="$t('mold.inputequipment')" style="width:470px">
-                        <el-option v-for="item in boxes" :key="item.id" :label="item.equipmentNo" :value="item.id"></el-option>
+                <el-form-item :label="$t('basic.proNum')" prop="equipmentId" v-if="addState">
+                    <el-select v-model="addForm.equipmentId" clearable filterable :placeholder="$t('basic.inputProNum')" style="width:470px">
+                        <el-option v-for="item in boxes" :key="item.id" :label="item.equipmentName" :value="item.id"></el-option>
                     </el-select>
                 </el-form-item>
                 <el-form-item :label="$t('mold.initial')" prop="initialModulus" v-if="addState">
@@ -115,9 +116,9 @@
                 <el-form-item :label="$t('mold.life')" prop="settingLife" v-if="addState">
                     <el-input v-model="addForm.settingLife" autocomplete="off" :placeholder="$t('mold.inputlife')" style="width:470px"></el-input>
                 </el-form-item>
-                <el-form-item :label="$t('mold.rfid')" prop="rfid" v-if="addState">
+                <!-- <el-form-item :label="$t('mold.rfid')" prop="rfid" v-if="addState">
                     <el-input v-model="addForm.rfid" autocomplete="off" :placeholder="$t('mold.inputrfid')" style="width:470px"></el-input>
-                </el-form-item>
+                </el-form-item> -->
                 <el-form-item :label="$t('mold.hole')" prop="holes" v-if="addState">
                     <el-input v-model="addForm.holes" autocomplete="off" :placeholder="$t('mold.inputhole')" style="width:470px"></el-input>
                 </el-form-item>
@@ -127,11 +128,16 @@
                     </el-select>
                 </el-form-item>
                 <el-form-item :label="$t('mold.maintainCount')" prop="maintainCount" v-if="addState">
-                    <el-select v-model="addForm.maintainCount" clearable multiple allow-create filterable default-first-option :placeholder="$t('mold.inputmaintainCount')" style="width:470px">
+                    <el-select v-model="addForm.maintainCount" clearable allow-create filterable default-first-option :placeholder="$t('mold.inputmaintainCount')" style="width:470px">
                         <el-option v-for="item in maintainCount" :key="item" :label="item" :value="item"></el-option>
                     </el-select>
                 </el-form-item>
-                
+                <el-form-item :label="$t('mold.fixedMaintainCount')" prop="fixedMaintainCount" v-if="addState">
+                    <el-select v-model="addForm.fixedMaintainCount" clearable allow-create filterable default-first-option :placeholder="$t('mold.inputmaintainCount')" style="width:470px">
+                        <el-option v-for="item in maintainCount" :key="item" :label="item" :value="item"></el-option>
+                    </el-select>
+                </el-form-item>
+
                 <el-form-item :label="$t('mold.material')" prop="materialType" v-if="!addState">
                     <el-input v-model="addForm.materialType" autocomplete="off" :placeholder="$t('mold.inputmaterial')" style="width:470px"></el-input>
                 </el-form-item>
@@ -155,12 +161,12 @@
                 <el-form-item :label="$t('mold.mathead')" prop="headWeight" v-if="!addState">
                     <el-input v-model="addForm.headWeight" autocomplete="off" :placeholder="$t('mold.inputmathead')" style="width:470px"></el-input>
                 </el-form-item>
-                <el-form-item :label="$t('mold.maxshot')" prop="maxShotWeight" v-if="!addState">
+                <!-- <el-form-item :label="$t('mold.maxshot')" prop="maxShotWeight" v-if="!addState">
                     <el-input v-model="addForm.maxShotWeight" autocomplete="off" :placeholder="$t('mold.inputmaxshot')" style="width:470px"></el-input>
                 </el-form-item>
                 <el-form-item :label="$t('mold.minshot')" prop="minShotWeight" v-if="!addState">
                     <el-input v-model="addForm.minShotWeight" autocomplete="off" :placeholder="$t('mold.inputminshot')" style="width:470px"></el-input>
-                </el-form-item>
+                </el-form-item> -->
                 <el-form-item :label="$t('mold.stand')" prop="cycle" v-if="!addState">
                     <el-input v-model="addForm.cycle" autocomplete="off" :placeholder="$t('mold.inputstand')" style="width:470px"></el-input>
                 </el-form-item>
@@ -317,9 +323,9 @@
                     settingLife: [
                         { required: true, validator: checkSettingLife, trigger: 'blur'}
                     ],
-                    rfid: [
-                        { required: true, validator: msg, trigger: "blur" }
-                    ],
+                    // rfid: [
+                    //     { required: true, validator: msg, trigger: "blur" }
+                    // ],
                     holes: [
                         { required: true, validator: msg, trigger: "blur" }
                     ],
@@ -329,7 +335,9 @@
                     maintainCount: [
                         { required: true, validator: msg, trigger: ["blur", "change"] }
                     ],
-
+                    fixedMaintainCount: [
+                        { required: true, validator: msg, trigger: ["blur", "change"] }
+                    ],
                     materialType: [
                         { required: true, validator: msg, trigger: "blur" }
                     ],
@@ -576,7 +584,8 @@
                     equipmentId: "",
                     initialModulus: "",
                     settingLife: "",
-                    maintainCount: [],
+                    maintainCount: '',
+                    fixedMaintainCount:'',
                     rfid: "",
                     holes: "",
                     produceCompanyId: "",
@@ -615,15 +624,15 @@
                 this.$refs.addForm.validate(valid => {
                     if (valid) {
                         this.addLoading = true;
-                        var maintainCount = this.addForm.maintainCount , str = "";
-                        for(var i in maintainCount) {
-                            if(i == maintainCount.length-1){
-                                str += maintainCount[i]
-                            } else {
-                                str += maintainCount[i] + ","
-                            }
-                        }
-                        this.addForm.maintainCount = str;
+                        // var maintainCount = this.addForm.maintainCount , str = "";
+                        // for(var i in maintainCount) {
+                        //     if(i == maintainCount.length-1){
+                        //         str += maintainCount[i]
+                        //     } else {
+                        //         str += maintainCount[i] + ","
+                        //     }
+                        // }
+                        // this.addForm.maintainCount = str;
                         this.addForm.size = this.addForm.size1 + "*" + this.addForm.size2 + "*" + this.addForm.size3;
                         this.http.post( this.port.mold.addMold, this.addForm,
                         res => {

+ 60 - 15
ys_int/src/views/project/projectDetail.vue

@@ -27,27 +27,27 @@
                 </el-col>
                 <el-col :span="6" class="detail">
                     {{$t('project.manager')}}:
-                    <span class="info">{{proDetail.manager}}</span>
+                    <router-link class="info" :to="'/staffDetail?id='+proDetail.managerId">{{proDetail.manager}}</router-link>
                 </el-col>
                 <el-col :span="6" class="detail">
                     {{$t('project.ownerApprover')}}:
-                    <span class="info">{{proDetail.ownerApprover}}</span>
+                    <router-link class="info" :to="'/staffDetail?id='+proDetail.ownerApproverId">{{proDetail.ownerApprover}}</router-link>
                 </el-col>
                 <el-col :span="6" class="detail">
                     {{$t('project.customerApprover')}}:
-                    <span class="info">{{proDetail.customerApprover}}</span>
+                    <router-link class="info" :to="'/staffDetail?id='+proDetail.customerApproverId">{{proDetail.customerApprover}}</router-link>
                 </el-col>
                 <el-col :span="24" class="detail">
                     {{$t('project.cusName')}}:
-                    <span class="info" v-for="(item, index) in proDetail.customCompanies">
-                        {{item.companyName}}
+                    <span class="info" :key="index" v-for="(item, index) in proDetail.customCompanies">
+                        <router-link class="info" :to="'/factoryDetail?id='+item.companyId">{{item.companyName}}</router-link>
                         <span v-if="index != proDetail.customCompanies.length-1">、</span>
                     </span>
                 </el-col>
                 <el-col :span="24" class="detail">
                     {{$t('project.users')}}:
-                    <span class="info" v-for="(item, index) in proDetail.participateUsers">
-                        {{item.username}}
+                    <span class="info" :key="index" v-for="(item, index) in proDetail.participateUsers">
+                        <router-link class="info" :to="'/staffDetail?id='+item.id">{{item.username}}</router-link>
                         <span v-if="index != proDetail.participateUsers.length-1">、</span>
                     </span>
                 </el-col>
@@ -97,15 +97,26 @@
                                 <el-table-column prop="fileSize" :label="$t('project.fileSize')" width="150" align="center" sortable></el-table-column>
                                 <el-table-column prop="uploader" :label="$t('project.uploader')" width="120" align="center" sortable></el-table-column>
                                 <el-table-column prop="indate" :label="$t('project.uploadTime')" width="200" align="center" sortable></el-table-column>
-                                <el-table-column :label="$t('base.operate')" width="220" align="center" sortable>
+                                <el-table-column prop="status" :label="$t('project.status')" width="200" align="center" sortable>
+                                    <template slot-scope="scope">
+                                        {{scope.row.status == 0?"正常":"删除待审批"}}
+                                    </template>
+                                </el-table-column>
+                                <el-table-column :label="$t('base.operate')" width="280" align="center" sortable>
                                     <template slot-scope="scope">
                                         <div v-if="download == 1">
                                             <a :href="scope.row.url" :download="scope.row.fileName">
                                                 <el-button size="small" @click="dowloadFile(scope.row)">{{$t('project.download')}}</el-button>
                                             </a>
-                                            <el-button size="small" type="danger" @click="fileDel(scope.row.id)"v-if="scope.row.uploaderId == user.id">{{$t('el.upload.delete')}}</el-button>
+
+                                            <el-button size="small" type="danger" @click="fileDel(scope.row.id)" v-if="scope.row.uploaderId == user.id && scope.row.status == 0">{{$t('el.upload.delete')}}</el-button>
+                                            <div  v-if="projectDocApprove==1 && scope.row.status == 1" style="margin-left:15px;display:inline;">
+                                            <el-button @click="checkDel(scope.row.id, 1)" size="small" type="danger">{{$t('mold.pass')}}</el-button>
+                                            <el-button @click="checkDel(scope.row.id, 0)" size="small" >{{$t('mold.fail')}}</el-button>
+                                            </div>
                                         </div>
                                         <div v-else>-</div>
+                                        
                                     </template>
                                 </el-table-column>
                             </el-table>
@@ -119,7 +130,7 @@
                         <el-col :span="24" class="detail">
                             <el-table :data="opers" highlight-current-row v-loading="oplistLoading" style="width: 100%;">
                                 <el-table-column type="index" width="40"></el-table-column>
-                                <el-table-column prop="content" :label="$t('base.operate')" width="120" sortable></el-table-column>
+                                <el-table-column prop="content" :label="$t('base.operate')" width="220" sortable></el-table-column>
                                 <el-table-column prop="fileName" :label="$t('project.operFileName')" sortable></el-table-column>
                                 <el-table-column prop="operator" :label="$t('project.operator')" width="120" align="center" sortable></el-table-column>
                                 <el-table-column prop="indate" :label="$t('project.operTime')" width="200" align="center" sortable></el-table-column>
@@ -282,7 +293,7 @@
                 proDetail: {},
                 files: [],
                 opers: [],
-
+                projectDocApprove:0,
                 allDetail: {
                     overflow: 'auto',
                     padding: '0px 5px',
@@ -388,6 +399,7 @@
                         this.download = res.data.download;
                         this.view = res.data.view;
                         this.approve = res.data.approve;
+                        this.projectDocApprove = res.data.projectDocApprove;
 
                         var list = res.data.vo;
                         var approves = res.data.vo.approves;
@@ -395,8 +407,10 @@
                         for(var i in approves){
                             if(approves[i].subordinateType == 0){
                                 list.ownerApprover = approves[i].approverName;
+                                list.ownerApproverId = approves[i].approverId;
                             } else {
                                 list.customerApprover = approves[i].approverName;
+                                list.customerApproverId = approves[i].approverId;
                             }
                         }
                         this.proDetail = list;
@@ -1012,17 +1026,49 @@
 
             //删除上传文件
 			fileDel(id) {
-                 this.$confirm(this.$t('project.delFile'), this.$t('el.messagebox.title'), {
+                this.$confirm(this.$t('project.delFileApplication'), this.$t('el.messagebox.title'), {
 					confirmButtonText: this.$t('el.messagebox.confirm'),
                     cancelButtonText: this.$t('el.messagebox.cancel'),
                     type: 'warning'
 				}).then(() => {
-                    this.http.post(this.port.project.delFile, {
+                    this.http.post(this.port.project.delFileApplication, {
                         id: id
                     }, res => {
                         if (res.code == "ok") {
                             this.$message({
-                                message: this.$t('prompt.success3'),
+                                message: "申请已发起,请等待"+res.data+"审核",
+                                type: 'success'
+                            });
+                            this.getFileList();
+                            this.getOperList();
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: 'error'
+                            });
+                        }
+                    }, error => {
+                        this.$message({
+                            message: error,
+                            type: 'error'
+                        });
+                    })
+				});
+            },
+            checkDel(id, isPass) {
+                this.$confirm(isPass==1?this.$t('project.confirmApplyDel'):this.$t('project.confirmRejectDel'), this.$t('el.messagebox.title'), {
+					confirmButtonText: this.$t('el.messagebox.confirm'),
+                    cancelButtonText: this.$t('el.messagebox.cancel'),
+                    type: 'warning'
+				}).then(() => {
+                    this.http.post(this.port.project.delFile, {
+                        id: id,
+                        isPass:isPass,
+                        projectId:this.detailId
+                    }, res => {
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: this.$t('prompt.success7'),
                                 type: 'success'
                             });
                             this.getFileList();
@@ -1041,7 +1087,6 @@
                     })
 				});
             },
-
             // 在线预览
             viewFile(row) {
                 this.http.post(this.port.file.view, {

+ 21 - 3
ys_int/src/views/project/staff.vue

@@ -34,7 +34,12 @@
 		<!--列表-->
 		<el-table :data="list" highlight-current-row :height="tableHeight" v-loading="listLoading" style="width: 100%;">
 			<el-table-column type="index" width="60"></el-table-column>
-			<el-table-column prop="username" :label="$t('project.name')" width="120" sortable></el-table-column>
+			<el-table-column prop="username"  :label="$t('project.name')" width="120" sortable>
+                <template slot-scope="scope">
+                    <!-- <a :href="'/staffDetail?id=' + scope.row.id">{{scope.row.username}}</a> -->
+                    <el-link :underline="false" type="primary" @click="toDetail(scope.row.id)">{{scope.row.username}}</el-link>
+                </template>
+            </el-table-column>
 			<el-table-column prop="account" :label="$t('project.mobile')" width="180" sortable></el-table-column>
 			<!-- <el-table-column prop="mobile" label="联系方式" width="150" sortable></el-table-column> -->
             <el-table-column prop="projects" :label="$t('project.partake')" width="300">
@@ -109,10 +114,15 @@
 					<el-input v-model="editForm.username" autocomplete="off" :placeholder="$t('project.inputName')"></el-input>
 				</el-form-item>
 				<el-form-item :label="$t('project.mobile')" prop="account">
-					<el-input v-model="editForm.account" disabled autocomplete="off" :placeholder="$t('project.inputPartake')"></el-input>
+					<el-input v-model="editForm.account" autocomplete="off" :placeholder="$t('project.inputPartake')"></el-input>
 				</el-form-item>
                 <el-form-item :label="$t('project.company')" prop="companyId">
-                    <el-input v-model="editForm.companyId" disabled autocomplete="off" :placeholder="$t('project.inputCompany')"></el-input>
+                    <!-- <el-input v-model="editForm.companyId" autocomplete="off" :placeholder="$t('project.inputCompany')"></el-input> -->
+                    <el-select v-model="editForm.companyId" clearable filterable :placeholder="$t('project.inputCompany')" style="width:202px">
+                        <el-option v-for="item in company" :key="item.id" :label="item.companyName" :value="item.id">
+                        </el-option>
+                    </el-select>
+
 				</el-form-item>
                 <el-form-item :label="$t('project.remark')">
                     <el-input v-model="editForm.roleName" autocomplete="off" :placeholder="$t('project.inputRemark')"></el-input>
@@ -238,6 +248,9 @@
 			}
 		},
 		methods: {
+            toDetail(id) {
+                this.$router.push('staffDetail?id='+id);
+            },
             //获取基础数据
             getMsg(){
                 if(this.user.parentId == 1 && this.user.subordinateType == 0) {
@@ -446,6 +459,7 @@
                             parentId: this.editForm.parentId,
                             username: this.editForm.username,
                             roleName: this.editForm.roleName,
+                            companyId: this.editForm.companyId,
                             flag: 1
                         } , res => {
                             this.editLoading = false;
@@ -550,6 +564,10 @@
             };
         },
 		mounted() {
+            var staffName = this.$route.query.name;
+            if (staffName != null) {
+                this.filters.keyName = staffName;
+            }
             this.getMsg();
 			this.getUsers();
         }

+ 305 - 0
ys_int/src/views/project/staffDetail.vue

@@ -0,0 +1,305 @@
+<template>
+	<section>
+		<!--工具条-->
+		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
+			<el-form :inline="true">
+                <el-form-item>
+                    <el-button type="text" @click="backToList" icon="el-icon-back" class="back">{{$t('base.back')}}</el-button>
+                </el-form-item>
+                <el-form-item>
+                     <span class="title">人员详情</span>
+                </el-form-item>
+			</el-form>
+		</el-col>
+
+        <!-- 主区域 -->
+        <el-col :span="24" :style="allDetail">
+            <el-col :span="24" class="title">
+                {{data.username}}
+            </el-col>
+            <el-col :span="24" class="main">
+                <el-col :span="8" class="detail">
+                    手机号:
+                    <span class="info">{{data.account}}</span>
+                </el-col>
+                <el-col :span="8" class="detail">
+                    类型:
+                    <span class="info">{{data.teamName}}</span>
+                </el-col>
+                <el-col :span="8" class="detail">
+                    所属公司:
+                    <span class="info">{{data.companyName}}</span>
+                </el-col>
+            </el-col>
+            <el-col :span="24" class="main">
+                <el-col :span="8" class="detail">
+                    参与项目:
+                    <span class="info" :key="item.id" v-for="(item, index) in data.projects">
+                        {{item.projectName}}
+                        <span v-if="data.projects != null && index != data.projects.length-1">、</span>
+                    </span>
+                    <!-- 只有资产方管理员或者系统管理员才有权限 -->
+                    <el-button size="mini" style="margin-left:10px;" v-show="data.projects != null && data.projects.length > 0 && (user.parentId == 0 || (user.parentId == 1 && user.subordinateType == 0))" type="default" @click="showTransferProject=true">项目交接</el-button>
+                </el-col>
+            </el-col>
+            <el-col :span="24" class="main">
+                <el-col :span="8" class="detail">
+                    备注:
+                    <span class="info">{{data.roleName}}</span>
+                </el-col>
+            </el-col>
+            <el-col :span="24" class="main">
+                <el-col :span="8" class="detail">
+                    创建时间:
+                    <span class="info">{{data.indate}}</span>
+                </el-col>
+            </el-col>
+            
+        </el-col>
+
+        <!--交接项目-->
+        <el-dialog :title="项目交接" v-if="showTransferProject" :visible.sync="showTransferProject" :close-on-click-modal="false"
+         customClass='customWidth'>
+            <el-transfer v-model="outProject" :data="allProject" :titles="['所属项目', '交出项目']"></el-transfer>
+            <el-divider></el-divider>
+            <el-form ref="form" label-width="80px" style="width:100%;">
+            <el-form-item label="接手人员" required="true">
+                <el-select v-model="takeHandsUser" filterable placeholder="请选择接手人员">
+                    <el-option
+                        v-for="item in options"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+            
+            </el-form>
+            <el-divider></el-divider>
+            <div style="width:100%;text-align:right;">
+                <el-button type="primary" @click="onSubmit">确定</el-button>
+                <el-button @click="showTransferProject=false">取消</el-button>
+            </div>
+        </el-dialog>
+	</section>
+
+    
+    
+</template>
+
+<script>
+    import Vue from 'vue';
+	import util from '../../common/js/util'
+
+	export default {
+		data() {
+            return {
+                options:[],
+                takeHandsUser: null,
+                outProject:[],
+                allProject:[],
+                showTransferProject: false,
+                allDetail: {
+                    overflow: "auto",
+                    padding: "0px 5px",
+                    height: 0
+                },
+                data:{},
+                user: JSON.parse(sessionStorage.getItem('user')),
+			}
+		},
+		methods: {
+            getUserList() {
+                this.http.post('/user/getAllAvailableUserList', {
+                    userId: this.user.id
+                }, res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        var list = res.data;
+                        //构造列表下拉数据
+                        list.forEach(item=>{
+                            if (item.id != this.data.id) {
+                                this.options.push({
+                                    value: item.id,
+                                    label: item.username
+                                });
+                            }
+                        })
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+            },
+            backToList() {
+                this.$router.go(-1);
+            },
+            
+            //提交项目交接
+            onSubmit() {
+                if (this.takeHandsUser == null) {
+                    this.$message({message:'接手人不能为空', type:'error'})
+                    return;
+                }
+                if (this.outProject.length == 0) {
+                    this.$message({message:'交出项目不能为空', type:'error'})
+                    return;
+                }
+
+                this.http.post('/user/transferProject', {
+                    fromUid:this.data.id,
+                    toUid: this.takeHandsUser,
+                    projects:JSON.stringify(this.outProject)
+                }, res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        this.getDetail();
+                        this.showTransferProject = false;
+                        this.$message({message:'项目交接成功', type:'success'});
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+            },
+			//获取详情
+			getDetail() {
+				this.listLoading = true;
+                this.http.post(this.port.base.userDetail, {
+                    userId:this.$route.query.id
+                }, res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        this.data = res.data;
+                        var projects = this.data.projects;
+                        for (var i=0;i<projects.length; i++) {
+                            
+                            this.allProject.push({
+                                key: projects[i].id,
+                                label: projects[i].projectName,
+                                disabled: false
+                            });
+                        }
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+            },
+        },
+        created() {
+            let height = window.innerHeight;
+            this.allDetail.height = height - 170 + "px";
+            const that = this;
+            window.onresize = function temp() {
+                that.allDetail.height = window.innerHeight - 170;
+            };
+            this.getUserList();
+        },
+        
+		mounted() {
+			this.getDetail();
+        }
+	}
+</script>
+
+<style scoped>
+    a {
+        text-decoration: none;
+    }
+
+    a.download {
+        color:#20a0ff;
+    }
+
+    .toolbar .el-form-item {
+        font-size: 14px;
+        vertical-align: middle;
+    }
+
+    .back {
+        font-size: 16px;
+    }
+
+    .divLine {
+        width: 2px;
+        background: #c3c3c3;
+        height: 100%;
+    }
+
+    .projectTitle {
+        font-size: 18px;
+        color: #333;
+    }
+
+    .state {
+        float: right;
+    }
+
+    .tips {
+        color: #bbb;
+    }
+
+    .title {
+        padding-left: 10px;
+        padding-bottom: 0px;
+        margin: 20px 0;
+        font-size: 16px;
+        line-height: 24px;
+        border-left: 1px #20a0ff solid;
+    }
+
+    .editDetail {
+        margin-left: 10px;
+        color: #20a0ff;
+        cursor: pointer;
+    }
+
+    .download {
+        text-decoration:none;
+        color: #20a0ff;
+        cursor: pointer;
+    }
+
+    .info {
+        color: grey;
+    }
+
+    .belongPro {
+        cursor: pointer;
+        color:#20a0ff;
+    }
+
+    .main {
+        padding-left: 10px;
+    }
+
+    .detail {
+        margin-bottom: 20px;
+    }
+    .formMap {
+        height: 400px;
+    }
+</style>