Sfoglia il codice sorgente

fix:蓝牙枪内容替换

hmc 6 mesi fa
parent
commit
c7e40aeb0d
63 ha cambiato i file con 2459 aggiunte e 140 eliminazioni
  1. 42 2
      zkqy-admin/src/main/java/com/zkqy/web/controller/system/SysUserController.java
  2. 2 1
      zkqy-admin/src/main/resources/application-druid.yml
  3. 4 4
      zkqy-admin/src/main/resources/application.yml
  4. 66 0
      zkqy-admin/src/main/resources/bf3/application-druid.yml
  5. 203 0
      zkqy-admin/src/main/resources/bf3/application.yml
  6. 3 3
      zkqy-common/src/main/java/com/zkqy/common/core/domain/entity/SysUser.java
  7. 13 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/MaterialInfoController.java
  8. 0 1
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ProductionPlanningManagementController.java
  9. 48 2
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/RingScanInformationController.java
  10. 12 1
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/StationInformationController.java
  11. 11 1
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/PlanTaskDetails.java
  12. 14 1
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/ProcedureList.java
  13. 23 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/RingScanInformationFirst.java
  14. 12 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/PlanTaskDetailsVo.java
  15. 18 1
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/RingScanInformationLogVo.java
  16. 11 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/RingScanInformationQueryVo.java
  17. 35 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/RingScanInformationVo.java
  18. 7 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/MaterialtransactionlogMapper.java
  19. 10 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/PlanTaskDetailsMapper.java
  20. 8 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/ProductionPlanningManagementMapper.java
  21. 8 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/RingScanInformationFirstMapper.java
  22. 12 2
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/RingScanInformationMapper.java
  23. 7 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IMaterialInfoService.java
  24. 9 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IRingScanInformationService.java
  25. 14 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IStationInformationService.java
  26. 42 4
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/MaterialInfoServiceImpl.java
  27. 12 2
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/RingScanInformationServiceImpl.java
  28. 589 10
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/StationInformationServiceImpl.java
  29. 30 2
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/utils/MaUtils.java
  30. 8 1
      zkqy-fujian-amichi/src/main/resources/mapper/MaterialtransactionlogMapper.xml
  31. 60 2
      zkqy-fujian-amichi/src/main/resources/mapper/PlanTaskDetailsMapper.xml
  32. 6 1
      zkqy-fujian-amichi/src/main/resources/mapper/ProcedureListMapper.xml
  33. 1 1
      zkqy-fujian-amichi/src/main/resources/mapper/ProductionCardFlowMapper.xml
  34. 37 2
      zkqy-fujian-amichi/src/main/resources/mapper/ProductionPlanningManagementMapper.xml
  35. 27 4
      zkqy-fujian-amichi/src/main/resources/mapper/RingScanInformationFirstMapper.xml
  36. 57 1
      zkqy-fujian-amichi/src/main/resources/mapper/RingScanInformationMapper.xml
  37. 4 4
      zkqy-fujian-amichi/src/main/resources/mapper/StationInformationMapper.xml
  38. 1 0
      zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/controller/ChemicalElementTestResultsController.java
  39. 14 0
      zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/controller/DetectionResultController.java
  40. 13 0
      zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/domain/DetectionResult.java
  41. 7 0
      zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/mapper/DetectionResultMapper.java
  42. 7 0
      zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/service/IDetectionResultService.java
  43. 12 0
      zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/service/impl/DetectionResultServiceImpl.java
  44. 74 26
      zkqy-laboratory-information/src/main/resources/mapper/DetectionResultMapper.xml
  45. 4 11
      zkqy-ui/.env.development
  46. 7 8
      zkqy-ui/.env.production
  47. 9 0
      zkqy-ui/src/api/lims/materielInfo/detectionResult.js
  48. 9 0
      zkqy-ui/src/api/system/user.js
  49. BIN
      zkqy-ui/src/assets/images/mecos-logo1bak2.jpg
  50. 3 3
      zkqy-ui/src/views/amichi/dialogCompments/customizedVersion/components/TaskItem.vue
  51. 6 2
      zkqy-ui/src/views/amichi/dialogCompments/customizedVersion/components/taskList.vue
  52. 1 2
      zkqy-ui/src/views/amichi/dialogCompments/customizedVersion/processDisplay.vue
  53. 9 3
      zkqy-ui/src/views/amichi/planTask/salesPlan.vue
  54. 1 2
      zkqy-ui/src/views/amichi/print/FlowCardPrint.vue
  55. 8 0
      zkqy-ui/src/views/amichi/procedureList/list/index.vue
  56. 6 12
      zkqy-ui/src/views/amichi/ringScanInformation/index.vue
  57. 297 0
      zkqy-ui/src/views/amichi/ringScanInformation/indexTwo.vue
  58. 1 0
      zkqy-ui/src/views/amichi/shopRoom/index.vue
  59. 425 0
      zkqy-ui/src/views/amichi/stationInformation/indexCopyV4.vue
  60. 26 1
      zkqy-ui/src/views/amichi/system/user/index.vue
  61. 44 11
      zkqy-ui/src/views/lims/detectionResult/detectionDetection.vue
  62. 4 3
      zkqy-ui/src/views/login.vue
  63. 6 3
      zkqy-ui/vue.config.js

+ 42 - 2
zkqy-admin/src/main/java/com/zkqy/web/controller/system/SysUserController.java

@@ -1,10 +1,14 @@
 package com.zkqy.web.controller.system;
 
+import java.io.File;
+import java.io.IOException;
 import java.util.List;
 import java.util.stream.Collectors;
 import javax.servlet.http.HttpServletResponse;
 
 import com.alibaba.fastjson2.JSON;
+import com.google.zxing.WriterException;
+import com.zkqy.amichi.utils.MaUtils;
 import com.zkqy.common.annotation.Anonymous;
 import com.zkqy.system.domain.SysPost;
 import org.apache.commons.lang3.ArrayUtils;
@@ -74,8 +78,7 @@ public class SysUserController extends BaseController {
     //@PreAuthorize("@ss.hasPermi('system:user:export')")
     @PostMapping("/export")
     public void export(HttpServletResponse response, SysUser user, List<String> uIds) {
-        if (uIds != null && uIds.size() != 0) {
-            // 导出指定用户集合
+        if (uIds != null && uIds.size() != 0) {// 导出指定用户集合
 
         }
         List<SysUser> list = userService.selectUserList(user);
@@ -83,6 +86,43 @@ public class SysUserController extends BaseController {
         util.exportExcel(response, list, "用户数据");
     }
 
+    @Log(title = "用户管理", businessType = BusinessType.EXPORT)
+    //@PreAuthorize("@ss.hasPermi('system:user:export')")
+    @GetMapping("/abc")
+    public AjaxResult export() {
+        SysUser sysUser = new SysUser();
+        List<SysUser> list = userService.selectUserList(sysUser);
+
+        // 定义基础目录
+        String baseDir = "C:\\Users\\86180\\Desktop\\lims";
+
+        //循环
+        list.forEach(item->{
+            String userFolder = baseDir + "\\" + item.getUserName();
+            //创建用户文件夹
+            File folder = new File(userFolder);
+            if(folder.exists()){
+                folder.delete();//刪除
+            }else {
+                folder.mkdirs();//創建
+            }
+            //码存放的路径
+            String qrFilePath = userFolder + "\\qrcode_" + item.getUserName() + ".png";
+            //
+            StringBuilder builder=new StringBuilder();
+            builder.append(item.getUserId()).append("#").append(item.getUserName()).append("scan@");
+            try {
+                MaUtils.generateQRCode(builder.toString(),qrFilePath);
+            } catch (WriterException e) {
+                throw new RuntimeException(e);
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
+        });
+        return AjaxResult.success("导出成功");
+    }
+
+
     @Log(title = "用户管理", businessType = BusinessType.IMPORT)
     //@PreAuthorize("@ss.hasPermi('system:user:import')")
     @PostMapping("/importData")

+ 2 - 1
zkqy-admin/src/main/resources/application-druid.yml

@@ -11,8 +11,9 @@ spring:
                 #url: jdbc:mysql://121.37.234.37:3306/zkqyzk?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
                 username: root
                 #password: zkqy8888
-#                password: quanyi666
                 password: root
+#                password: quanyi666
+#                password: zkqy123456,
                 #password: zkqy@8888888
             # 从库数据源
             slave:

+ 4 - 4
zkqy-admin/src/main/resources/application.yml

@@ -83,7 +83,7 @@ spring:
     # 端口,默认为6379
     port: 6379
     # 数据库索引
-    database: 10
+    database: 14
     # 密码
     password: zkqy@8888888
     # 连接超时时间
@@ -192,12 +192,12 @@ projectDownloadZip:
 OpenAuthorization2:
   MES:
     # 单点获取code、token、userinfo主机地址
-    URL: http://192.168.2.127:8066/oauth2
+    URL: http://192.168.110.83:8066/oauth2
     # 系统标识
     BASIC: mes
     # 重定向本系统主机地址
-    REDIRECT_URL: http://192.168.2.127:1025
+    REDIRECT_URL: http://192.168.110.83:1025
     # 回调地址
-    CALLBACK: http://192.168.2.127:8066/oauth/callback
+    CALLBACK: http://192.168.110.83:8066/oauth/callback
     #
     NAME: hmc

+ 66 - 0
zkqy-admin/src/main/resources/bf3/application-druid.yml

@@ -0,0 +1,66 @@
+# 数据源配置
+spring:
+    datasource:
+        type: com.alibaba.druid.pool.DruidDataSource
+        driverClassName: com.mysql.cj.jdbc.Driver
+        druid:
+            # 主库数据源 http:///
+            master:
+                url: jdbc:mysql://localhost:3306/ry-vue-call?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
+                #url: jdbc:mysql://192.168.110.15:3306/ry-vue-call?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
+                #url: jdbc:mysql://121.37.234.37:3306/zkqyzk?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
+                username: root
+                #password: zkqy8888
+#                password: quanyi666
+                password: root
+                #password: zkqy@8888888
+            # 从库数据源
+            slave:
+                # 从数据源开关/默认关闭
+                enabled: false
+                url: 
+                username: 
+                password: 
+            # 初始连接数
+            initialSize: 5
+            # 最小连接池数量
+            minIdle: 10
+            # 最大连接池数量
+            maxActive: 60
+            # 配置获取连接等待超时的时间
+            maxWait: 60000
+            # 配置连接超时时间
+            connectTimeout: 30000
+            # 配置网络超时时间
+            socketTimeout: 60000
+            # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+            timeBetweenEvictionRunsMillis: 60000
+            # 配置一个连接在池中最小生存的时间,单位是毫秒
+            minEvictableIdleTimeMillis: 300000
+            # 配置一个连接在池中最大生存的时间,单位是毫秒
+            maxEvictableIdleTimeMillis: 900000
+            # 配置检测连接是否有效
+            validationQuery: SELECT 1 FROM DUAL
+            testWhileIdle: true
+            testOnBorrow: false
+            testOnReturn: false
+            webStatFilter: 
+                enabled: true
+            statViewServlet:
+                enabled: true
+                # 设置白名单,不填则允许所有访问
+                allow:
+                url-pattern: /druid/*
+                # 控制台管理用户名和密码
+                login-username: ruoyi
+                login-password: 123456
+            filter:
+                stat:
+                    enabled: true
+                    # 慢SQL记录
+                    log-slow-sql: true
+                    slow-sql-millis: 1000
+                    merge-sql: true
+                wall:
+                    config:
+                        multi-statement-allow: true

+ 203 - 0
zkqy-admin/src/main/resources/bf3/application.yml

@@ -0,0 +1,203 @@
+# 项目相关配置
+zkqy:
+  # 名称
+  name: zkqy
+  # 版本
+  version: 3.8.5
+  # 版权年份
+  copyrightYear: 2023
+  # 实例演示开关
+  demoEnabled: true
+  # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
+  profile: D:/zkqy/uploadPath
+  # 获取ip地址开关
+  addressEnabled: false
+  # 验证码类型 math 数组计算 char 字符验证
+  captchaType: math
+
+# 开发环境配置
+server:
+  # 服务器的HTTP端口,默认为8080
+  port: 8066
+  servlet:
+    # 应用的访问路径
+    context-path: /
+  tomcat:
+    # tomcat的URI编码
+    uri-encoding: UTF-8
+    # 连接数满后的排队数,默认为100
+    accept-count: 1000
+    threads:
+      # tomcat最大线程数,默认为200
+      max: 800
+      # Tomcat启动初始化的线程数,默认值10
+      min-spare: 100
+
+# 日志配置
+logging:
+  # 定义全局日志级别,此处可以针对不同包或类设置不同的日志输出级别
+  level:
+    # 设置com.zkqy包及其子包下的日志级别为debug
+    com.zkqy: debug
+    # 设置org.springframework包及其子包下的日志级别为warn
+    org.springframework: warn
+  # 文件日志相关配置
+  file:
+    # 指定日志文件的输出目录
+    # 此处将所有生成的日志文件存储在D:/rz/logs路径下(日志文件必须名为)
+    # logback-spring.xml中可以读取这个配置项(注意:日志配置文件必须叫logback-spring.xml)
+    path: C:/logs
+
+# 用户配置
+user:
+  password:
+    # 密码最大错误次数
+    maxRetryCount: 5
+    # 密码锁定时间(默认10分钟)
+    lockTime: 10
+
+# Spring配置
+spring:
+  # 资源信息
+  messages:
+    # 国际化资源文件路径
+    basename: i18n/messages
+  profiles:
+    active: druid
+  # 文件上传
+  servlet:
+    multipart:
+      # 单个文件大小
+      max-file-size: 100MB
+      # 设置总上传的文件大小
+      max-request-size: 1000MB
+  # 服务模块
+  devtools:
+    restart:
+      # 热部署开关
+      enabled: true
+  # redis 配置
+  redis:
+    # 地址
+    host: 121.37.234.37
+    # 端口,默认为6379
+    port: 6379
+    # 数据库索引
+    database: 3
+    # 密码
+    password: zkqy@8888888
+    # 连接超时时间
+    timeout: 10s
+    lettuce:
+      pool:
+        # 连接池中的最小空闲连接
+        min-idle: 0
+        # 连接池中的最大空闲连接
+        max-idle: 8
+        # 连接池的最大数据库连接数
+        max-active: 8
+        # #连接池最大阻塞等待时间(使用负值表示没有限制)
+        max-wait: -1ms
+
+# token配置
+token:
+  # 令牌自定义标识
+  header: Authorization
+  # 令牌密钥
+  secret: abcdefghijklmnopqrstuvwxyz
+  # 令牌有效期(默认30分钟)3000000
+  expireTime: 144000000
+
+# MyBatis配置
+mybatis:
+  # 搜索指定包别名
+  typeAliasesPackage: com.zkqy.**.domain
+  # 配置mapper的扫描,找到所有的mapper.xml映射文件
+  mapperLocations: classpath*:mapper/**/*Mapper.xml
+  # 加载全局的配置文件
+  configLocation: classpath:mybatis/mybatis-config.xml
+
+# PageHelper分页插件
+pagehelper:
+  helperDialect: mysql
+  supportMethodsArguments: true
+  params: count=countSql
+
+# Shiro
+shiro:
+  user:
+    # 登录地址
+    loginUrl: /login
+    # 权限认证失败地址
+    unauthorizedUrl: /unauth
+    # 首页地址
+    indexUrl: /index
+    # 验证码开关
+    captchaEnabled: true
+    # 验证码类型 math 数组计算 char 字符
+    captchaType: math
+  cookie:
+    # 设置Cookie的域名 默认空,即当前访问的域名
+    domain:
+    # 设置cookie的有效访问路径
+    path: /
+    # 设置HttpOnly属性
+    httpOnly: true
+    # 设置Cookie的过期时间,天为单位
+    maxAge: 30
+    # 设置密钥,务必保持唯一性(生成方式,直接拷贝到main运行即可)Base64.encodeToString(CipherUtils.generateNewKey(128, "AES").getEncoded()) (默认启动生成随机秘钥,随机秘钥会导致之前客户端RememberMe Cookie无效,如设置固定秘钥RememberMe Cookie则有效)
+    cipherKey:
+  session:
+    # Session超时时间,-1代表永不过期(默认30分钟)
+    expireTime: 30
+    # 同步session到数据库的周期(默认1分钟)
+    dbSyncPeriod: 1
+    # 相隔多久检查一次session的有效性,默认就是10分钟
+    validationInterval: 10
+    # 同一个用户最大会话数,比如2的意思是同一个账号允许最多同时两个人登录(默认-1不限制)
+    maxSession: -1
+    # 踢出之前登录的/之后登录的用户,默认踢出之前登录的用户
+    kickoutAfter: false
+  rememberMe:
+    # 是否开启记住我
+    enabled: true
+
+# Swagger配置
+swagger:
+  # 是否开启swagger
+  enabled: true
+  # 请求前缀
+  pathMapping: /dev-api
+
+# 防止XSS攻击
+xss:
+  # 过滤开关
+  enabled: true
+  # 排除链接(多个用逗号分隔)
+  excludes: /system/notice
+  # 匹配链接
+  urlPatterns: /system/*,/monitor/*,/tool/*
+
+# cas配置
+cas:
+  client-name: CasClient
+  server:
+    url: http://localhost:8080/cas
+  project:
+    url: http://localhost:80
+
+projectDownloadZip:
+  mysql: /usr/local/mysql/bin/mysqldump
+
+OpenAuthorization2:
+  MES:
+    # 单点获取code、token、userinfo主机地址
+    URL: http://192.168.2.127:8066/oauth2
+    # 系统标识
+    BASIC: mes
+    # 重定向本系统主机地址
+    REDIRECT_URL: http://192.168.2.127:1025
+    # 回调地址
+    CALLBACK: http://192.168.2.127:8066/oauth/callback
+    #
+    NAME: hmc

+ 3 - 3
zkqy-common/src/main/java/com/zkqy/common/core/domain/entity/SysUser.java

@@ -23,7 +23,7 @@ public class SysUser extends BaseEntity
     private static final long serialVersionUID = 1L;
 
     /** 用户ID */
-    @Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
+   //@Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
     private Long userId;
 
     /** 部门ID */
@@ -34,7 +34,7 @@ public class SysUser extends BaseEntity
     private Long tenantId;
 
     /** 用户账号 */
-    @Excel(name = "登录名称")
+    @Excel(name = "登录账号")
     private String userName;
 
     /** 用户昵称 */
@@ -102,7 +102,7 @@ public class SysUser extends BaseEntity
     /** 租户名称 */
     private String tenantName;
 
-    @Excel(name = "帐号状态", readConverterExp = "0=允许,1=禁止")
+//    @Excel(name = "是否可登录工具端", readConverterExp = "0=允许,1=禁止")
     private  String isCanTools;
 
     public SysUser()

+ 13 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/MaterialInfoController.java

@@ -4,6 +4,7 @@ import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 
 import com.zkqy.amichi.domain.MaterialInfo;
+import com.zkqy.amichi.domain.Materialtransactionlog;
 import com.zkqy.amichi.domain.vo.MaterialSetQueryVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -82,6 +83,17 @@ public class MaterialInfoController extends BaseController
         return getDataTable(list);
     }
 
+
+    @Log(title = "物料信息实时计算", businessType = BusinessType.IMPORT)
+    //@PreAuthorize("@ss.hasPermi('system:user:import')")
+    @PostMapping("/realTimeComputing")
+    public TableDataInfo realTimeComputing() throws Exception {
+        startPage();
+        List<MaterialInfo> as= materialInfoService.realTimeComputing();
+        return getDataTable(as);
+    }
+
+
     /**
      * 导出物料信息列表
      */
@@ -109,6 +121,7 @@ public class MaterialInfoController extends BaseController
 
 
 
+
     /**
      * 获取物料信息详细信息
      */

+ 0 - 1
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ProductionPlanningManagementController.java

@@ -54,7 +54,6 @@ public class ProductionPlanningManagementController extends BaseController
     /**
      * 查询生产计划列表
      */
-    //@PreAuthorize("@ss.hasPermi('amichi:management:list')")
     @GetMapping("/list")
     @ApiOperation(value = "查询生产计划列表")
     public TableDataInfo list(ProductionPlanningManagement productionPlanningManagement)

+ 48 - 2
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/RingScanInformationController.java

@@ -83,6 +83,52 @@ public class RingScanInformationController extends BaseController
     @Anonymous
     @GetMapping("/info/scanCodeMonitoringLogs")
     public AjaxResult  scanCodeMonitoringLogs(RingScanInformationQueryVo ringScanInformationQueryVo)
+    {
+//        startPage();
+//        RingScanInformationFirst ringScanInformationFirst=new RingScanInformationFirst();
+//        ringScanInformationFirst.setStatus(ringScanInformationQueryVo.getStatus());
+//        if(StringUtils.isNotNull(ringScanInformationQueryVo.getOrderNumber())){
+//            ringScanInformationFirst.setOrderNumber(ringScanInformationQueryVo.getOrderNumber());
+//        }
+//        //分页数据
+//        List<RingScanInformationFirst> ringScanInformationFirsts = ringScanInformationFirstMapper.selectRingScanInformationFirstList(ringScanInformationFirst);
+//        if(ringScanInformationFirsts.size()<=0){
+//            Map<String, List<RingScanInformationLogVo>> stringListMap=new HashMap<>();
+//            return AjaxResult.success("查询成功",stringListMap).put("total",0);
+//        }
+//        List<String> orderNumberListString = ringScanInformationFirsts.parallelStream().map(RingScanInformationFirst::getOrderNumber).collect(Collectors.toList());
+//
+//        Map<String, List<RingScanInformationLogVo>> stringListMap = ringScanInformationService.SelectRingScanInformationLog(orderNumberListString);
+//        //总条数
+//        long total = new PageInfo(ringScanInformationFirsts).getTotal();
+//        //分页数据返回
+//        return AjaxResult.success("查询成功",stringListMap).put("total",total);
+
+        startPage();
+        RingScanInformationFirst ringScanInformationFirst=new RingScanInformationFirst();
+        ringScanInformationFirst.setStatus(ringScanInformationQueryVo.getStatus());
+        if(StringUtils.isNotNull(ringScanInformationQueryVo.getOrderNumber())){
+            ringScanInformationFirst.setOrderNumber(ringScanInformationQueryVo.getOrderNumber());
+        }
+        //分页数据
+        List<RingScanInformationFirst> ringScanInformationFirsts = ringScanInformationFirstMapper.selectRingScanInformationFirstList(ringScanInformationFirst);
+        if(ringScanInformationFirsts.size()<=0){
+            Map<String, List<RingScanInformationLogVo>> stringListMap=new HashMap<>();
+            return AjaxResult.success("查询成功",stringListMap).put("total",0);
+        }
+        List<String> orderNumberListString = ringScanInformationFirsts.parallelStream().map(RingScanInformationFirst::getProductionOrderNumber).collect(Collectors.toList());
+
+        Map<String, List<RingScanInformationLogVo>> stringListMap = ringScanInformationService.selectRingScanInformationLog2(orderNumberListString);
+        //总条数
+        long total = new PageInfo(ringScanInformationFirsts).getTotal();
+        //分页数据返回
+        return AjaxResult.success("查询成功",stringListMap).put("total",total);
+    }
+
+
+    @Anonymous
+    @GetMapping("/info/scanCodeMonitoringLogs2")
+    public AjaxResult  scanCodeMonitoringLogs2(RingScanInformationQueryVo ringScanInformationQueryVo)
     {
         startPage();
         RingScanInformationFirst ringScanInformationFirst=new RingScanInformationFirst();
@@ -96,9 +142,9 @@ public class RingScanInformationController extends BaseController
             Map<String, List<RingScanInformationLogVo>> stringListMap=new HashMap<>();
             return AjaxResult.success("查询成功",stringListMap).put("total",0);
         }
-        List<String> orderNumberListString = ringScanInformationFirsts.parallelStream().map(RingScanInformationFirst::getOrderNumber).collect(Collectors.toList());
+        List<String> orderNumberListString = ringScanInformationFirsts.parallelStream().map(RingScanInformationFirst::getProductionOrderNumber).collect(Collectors.toList());
 
-        Map<String, List<RingScanInformationLogVo>> stringListMap = ringScanInformationService.SelectRingScanInformationLog(orderNumberListString);
+        Map<String, List<RingScanInformationLogVo>> stringListMap = ringScanInformationService.selectRingScanInformationLog2(orderNumberListString);
         //总条数
         long total = new PageInfo(ringScanInformationFirsts).getTotal();
         //分页数据返回

+ 12 - 1
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/StationInformationController.java

@@ -62,7 +62,7 @@ public class StationInformationController extends BaseController
 
 
     /**
-     * 手持机设备扫描
+     * 手持机设备扫描 1.0版本
      */
     @Anonymous
     @PostMapping("/stationProductScanning")
@@ -72,6 +72,17 @@ public class StationInformationController extends BaseController
       return stationInformationService.stationProductScanning(contentString);
     }
 
+    /**
+     * 手持机设备扫描 2.0版本
+     */
+    @Anonymous
+    @PostMapping("/stationProductScanningTwo")
+    @ApiOperation(value = "导出工位信息列表")
+    public String stationProductScanningTwo(@RequestParam("contentString") String contentString)
+    {
+        return stationInformationService.stationProductScanningTwo2(contentString);
+    }
+
     /**
      * 蓝牙扫描枪设备扫描
      */

+ 11 - 1
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/PlanTaskDetails.java

@@ -21,9 +21,11 @@ public class PlanTaskDetails extends BaseEntity
     /** 主键 */
     private Long id;
 
-    /** 主键 */
+    /** 描述信息 */
     private Long description;
 
+    /** 当前生产订单的状态*/
+    private  String status;
 
 
     /** 物料编码 */
@@ -156,6 +158,14 @@ public class PlanTaskDetails extends BaseEntity
         this.scheduledCommencement = scheduledCommencement;
     }
 
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
     public String getScheduledCompletion() {
         return scheduledCompletion;
     }

+ 14 - 1
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/ProcedureList.java

@@ -42,7 +42,20 @@ public class ProcedureList extends BaseEntity
     /** 删除标志(0代表存在 1代表删除) */
     private String delFlag;
 
-    public void setId(Long id) 
+    /**
+     * 工序排序
+     */
+    private  String  sort;
+
+    public String getSort() {
+        return sort;
+    }
+
+    public void setSort(String sort) {
+        this.sort = sort;
+    }
+
+    public void setId(Long id)
     {
         this.id = id;
     }

+ 23 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/RingScanInformationFirst.java

@@ -26,6 +26,29 @@ public class RingScanInformationFirst extends BaseEntity
     @Excel(name = "订单号")
     private String orderNumber;
 
+    /** 1、包装 2、检验 */
+    @Excel(name = "包装或者检验")
+    private  String packingOrInspection;
+
+    /** 生产订单的总数 */
+    @Excel(name = "生产订单的总数")
+    private  String  productionOrderTotalQuantity;
+
+    public String getProductionOrderTotalQuantity() {
+        return productionOrderTotalQuantity;
+    }
+
+    public void setProductionOrderTotalQuantity(String productionOrderTotalQuantity) {
+        this.productionOrderTotalQuantity = productionOrderTotalQuantity;
+    }
+
+    public String getPackingOrInspection() {
+        return packingOrInspection;
+    }
+
+    public void setPackingOrInspection(String packingOrInspection) {
+        this.packingOrInspection = packingOrInspection;
+    }
 
     /** 订单号 */
     @Excel(name = "总数量")

+ 12 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/PlanTaskDetailsVo.java

@@ -13,6 +13,11 @@ public class PlanTaskDetailsVo extends BaseEntity {
     @Excel(name = "物料编码")
     private String materialId;
 
+
+
+    @Excel(name ="状态")
+    private  String  status;
+
     @Excel(name = "需求单据")
     private  String  demandDocument;
 
@@ -98,6 +103,13 @@ public class PlanTaskDetailsVo extends BaseEntity {
         return id;
     }
 
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
     public void setId(Long id) {
         this.id = id;
     }

+ 18 - 1
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/RingScanInformationLogVo.java

@@ -17,7 +17,8 @@ public class RingScanInformationLogVo extends BaseEntity {
 
     private  String   totalQuantity;
 
-
+    private  String productionOrderNumber;
+    private  String productionOrderTotalQuantity;
 
     private  String   sort;
 
@@ -27,6 +28,22 @@ public class RingScanInformationLogVo extends BaseEntity {
 
     private  String  endTime;
 
+    public String getProductionOrderNumber() {
+        return productionOrderNumber;
+    }
+
+    public void setProductionOrderNumber(String productionOrderNumber) {
+        this.productionOrderNumber = productionOrderNumber;
+    }
+
+    public String getProductionOrderTotalQuantity() {
+        return productionOrderTotalQuantity;
+    }
+
+    public void setProductionOrderTotalQuantity(String productionOrderTotalQuantity) {
+        this.productionOrderTotalQuantity = productionOrderTotalQuantity;
+    }
+
     public String getId() {
         return id;
     }

+ 11 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/RingScanInformationQueryVo.java

@@ -6,6 +6,17 @@ public class RingScanInformationQueryVo extends BaseEntity {
     //订单号
     private  String  orderNumber;
 
+    //生产订单号
+    private String productionOrderNumber;
+
+    public String getProductionOrderNumber() {
+        return productionOrderNumber;
+    }
+
+    public void setProductionOrderNumber(String productionOrderNumber) {
+        this.productionOrderNumber = productionOrderNumber;
+    }
+
     private  String   status;
 
     public String getOrderNumber() {

+ 35 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/RingScanInformationVo.java

@@ -14,6 +14,41 @@ public class RingScanInformationVo extends RingScanInformation {
     private  String  materialName;
 
     private  String  model;
+    private  String  personnelName;
+
+    private  String  processName;
+
+    private  String  stationName;
+
+    @Override
+    public String getPersonnelName() {
+        return personnelName;
+    }
+
+    @Override
+    public void setPersonnelName(String personnelName) {
+        this.personnelName = personnelName;
+    }
+
+    @Override
+    public String getProcessName() {
+        return processName;
+    }
+
+    @Override
+    public void setProcessName(String processName) {
+        this.processName = processName;
+    }
+
+    @Override
+    public String getStationName() {
+        return stationName;
+    }
+
+    @Override
+    public void setStationName(String stationName) {
+        this.stationName = stationName;
+    }
 
     public String getOrderNumber() {
         return orderNumber;

+ 7 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/MaterialtransactionlogMapper.java

@@ -61,4 +61,11 @@ public interface MaterialtransactionlogMapper
      * @return 结果
      */
     public int deleteMaterialtransactionlogByIds(Long[] ids);
+
+    /**
+     * 相同编码数量求和的一个扣料列表
+     * @param materialtransactionlog
+     * @return
+     */
+    List<Materialtransactionlog> selectMaterialtransactionlogListSun(Materialtransactionlog materialtransactionlog);
 }

+ 10 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/PlanTaskDetailsMapper.java

@@ -48,6 +48,16 @@ public interface PlanTaskDetailsMapper
      */
     public int updatePlanTaskDetails(PlanTaskDetails planTaskDetails);
 
+
+    /**
+     * 根绝生产订单号修改生产订单信息
+     *
+     * @param planTaskDetails 生产任务单明细
+     * @return 结果
+     */
+    public int updatePlanTaskDetailsByDemandDocument(PlanTaskDetails planTaskDetails);
+
+
     /**
      * 删除生产任务单明细
      * 

+ 8 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/ProductionPlanningManagementMapper.java

@@ -57,6 +57,14 @@ public interface ProductionPlanningManagementMapper
      */
     public int updateProductionPlanningManagement(ProductionPlanningManagement productionPlanningManagement);
 
+    /**
+     * 修改生产计划状态根据订单号
+     *
+     * @param productionPlanningManagement 生产计划
+     * @return 结果
+     */
+    public int updateProductionPlanningManagementByOrderNumber(ProductionPlanningManagement productionPlanningManagement);
+
     /**
      * 删除生产计划
      * 

+ 8 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/RingScanInformationFirstMapper.java

@@ -45,6 +45,14 @@ public interface RingScanInformationFirstMapper
      */
     public int updateRingScanInformationFirst(RingScanInformationFirst ringScanInformationFirst);
 
+    /**
+     * 修改第一次扫描信息记录
+     *
+     * @param ringScanInformationFirst 第一次扫描信息记录
+     * @return 结果
+     */
+    public int updateRingScanInformationFirstByproductionOrderNumber(RingScanInformationFirst ringScanInformationFirst);
+
     /**
      * 删除第一次扫描信息记录
      * 

+ 12 - 2
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/RingScanInformationMapper.java

@@ -80,9 +80,19 @@ public interface RingScanInformationMapper
      */
     RingScanInformation selectRingScanInformationListDateTimeMax(RingScanInformation ringScanInformationQuery);
 
+
     /**
-     *
+     *  日志信息倒推
      * @return
      */
-    List<RingScanInformationLogVo>  SelectRingScanInformationLog(List<String> orderNumberListString);
+    List<RingScanInformationLogVo> SelectRingScanInformationLog(List<String> orderNumberListString);
+
+
+    /**
+     *  日志信息倒推
+     * @return
+     */
+    List<RingScanInformationLogVo> selectRingScanInformationLog2(List<String> orderNumberListString);
+
+
 }

+ 7 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IMaterialInfoService.java

@@ -3,6 +3,7 @@ package com.zkqy.amichi.service;
 import java.util.List;
 
 import com.zkqy.amichi.domain.MaterialInfo;
+import com.zkqy.amichi.domain.Materialtransactionlog;
 import com.zkqy.amichi.domain.vo.MaterialInventoryInformationVo;
 import com.zkqy.amichi.domain.vo.MaterialSetQueryVo;
 import com.zkqy.common.core.domain.AjaxResult;
@@ -94,4 +95,10 @@ public interface IMaterialInfoService
      * @return
      */
     List<MaterialInventoryInformationVo> viewPlannedMaterialStatus(MaterialSetQueryVo materialSetQueryVo);
+
+    /**
+     * 物料信息实时计算
+     * @return
+     */
+    List<MaterialInfo> realTimeComputing();
 }

+ 9 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IRingScanInformationService.java

@@ -31,6 +31,13 @@ public interface IRingScanInformationService
      */
     public Map<String,List<RingScanInformationLogVo>> SelectRingScanInformationLog(List<String> orderNumberListString);
 
+    /**
+     * 流程列表查看2
+     * @param orderNumberListString
+     * @return
+     */
+    Map<String, List<RingScanInformationLogVo>> selectRingScanInformationLog2(List<String> orderNumberListString);
+
     /**
      * 查询指环王扫描日志信息列表
      * 
@@ -78,4 +85,6 @@ public interface IRingScanInformationService
      * @return 结果
      */
     public int deleteRingScanInformationById(Long id);
+
+
 }

+ 14 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IStationInformationService.java

@@ -88,4 +88,18 @@ public interface IStationInformationService
      * @return
      */
     String bluetoothScannerGun(StationProductScanningRingVo stationProductScanningRingVo);
+
+    /**
+     * 手持设备二次扫描
+     * @param contentString
+     * @return
+     */
+    String stationProductScanningTwo(String contentString);
+
+    /**
+     * 手持设备二次扫描
+     * @param contentString
+     * @return
+     */
+    String stationProductScanningTwo2(String contentString);
 }

+ 42 - 4
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/MaterialInfoServiceImpl.java

@@ -1,10 +1,8 @@
 package com.zkqy.amichi.service.impl;
 
+import java.math.BigDecimal;
 import java.time.LocalDateTime;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.stream.Collectors;
 
@@ -338,4 +336,44 @@ public class MaterialInfoServiceImpl implements IMaterialInfoService
 //        List<ProductionBomsDetailsVo> productionBomsDetails = productionBomsDetailsMapper.selectProductionBomsDetailsListByInProductionBomId(idStringList);
 //        return  AjaxResult.success(productionBomsDetails);
     }
+
+    @Override
+    public List<MaterialInfo> realTimeComputing() {
+        //同步更新车间仓物料信息系
+        System.out.println("更新车间仓物料信息");
+        //查询当前车间仓物料信息
+        MaterialInfo materialInfo=new MaterialInfo();
+        materialInfo.setCkNumber("CK005");
+        List<MaterialInfo> materialInfos = materialInfoMapper.selectMaterialInfoList(materialInfo);
+        //扣料记录查询
+        Materialtransactionlog materialtransactionlog=new Materialtransactionlog();
+        List<Materialtransactionlog> materialtransactionlogs = materialtransactionlogMapper.selectMaterialtransactionlogListSun(materialtransactionlog);
+        //合并
+        Map<String, Materialtransactionlog> materialLogMap = materialtransactionlogs.stream()
+                .collect(Collectors.toMap(
+                        Materialtransactionlog::getMaterialCode,
+                        log -> log,
+                        (existing, replacement) -> existing // 或者选择其他合并策略
+                ));
+
+        //对比计算
+        List<MaterialInfo> items = materialInfos.stream().map(item -> {
+            //拿到当前相同的母粒
+            Materialtransactionlog materialtransactionlog1 = materialLogMap.get(item.getMaterialCode());
+            Optional<Materialtransactionlog> optionalObj = Optional.ofNullable(materialtransactionlog1);
+            //判断是否从Map里拿到了扣料记录
+            if (optionalObj.isPresent()) {
+                System.out.println("对象不为空");
+                //设置新的数量
+                BigDecimal bigDecimal1 = new BigDecimal(item.getStockQuantity());
+                BigDecimal bigDecimal2 = new BigDecimal(materialtransactionlog1.getQuantity());
+                //相减计算
+                BigDecimal subtract = bigDecimal1.subtract(bigDecimal2);//计算的新的数量
+                item.setStockQuantity(subtract.doubleValue());
+            }
+            return item;
+        }).collect(Collectors.toList());
+        return  items;
+    }
+
 }

+ 12 - 2
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/RingScanInformationServiceImpl.java

@@ -50,8 +50,18 @@ public class RingScanInformationServiceImpl implements IRingScanInformationServi
                 .collect(Collectors.groupingBy(RingScanInformationLogVo::getOrderNumber));
         return mapByOrderNumber;
     }
-    
-    
+
+    @Override
+    public Map<String, List<RingScanInformationLogVo>> selectRingScanInformationLog2(List<String> orderNumberListString) {
+        //取真实展示数据
+        List<RingScanInformationLogVo> ringScanInformations = ringScanInformationMapper.selectRingScanInformationLog2(orderNumberListString);
+        //转换为map集合
+        Map<String, List<RingScanInformationLogVo>> mapByOrderNumber = ringScanInformations.parallelStream()
+                .collect(Collectors.groupingBy(RingScanInformationLogVo::getProductionOrderNumber));
+        return mapByOrderNumber;
+    }
+
+
     /**
      * 查询指环王扫描日志信息列表
      * 

+ 589 - 10
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/StationInformationServiceImpl.java

@@ -19,6 +19,7 @@ import com.zkqy.amichi.jd.domain.JdProductionOrder;
 import com.zkqy.amichi.jd.domain.MaterialRetentionLogVo;
 import com.zkqy.amichi.mapper.*;
 import com.zkqy.amichi.utils.WarehouseEntryNumberGenerator;
+import com.zkqy.common.core.domain.R;
 import com.zkqy.common.utils.DateUtils;
 import com.zkqy.common.utils.StringUtils;
 import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNodeLog;
@@ -81,6 +82,11 @@ public class StationInformationServiceImpl implements IStationInformationService
     @Autowired
     private  RingScanInformationProdOrderScanningMapper prodOrderScanningMapper;
 
+    @Autowired
+    private  PlanTaskDetailsMapper planTaskDetailsMapper;
+
+
+
 
     public static void main(String[] args) {
        String aaa="scan@&GWM-001&SMSB001";
@@ -212,8 +218,7 @@ public class StationInformationServiceImpl implements IStationInformationService
                 //拿到工位id
                 StationInformation stationInformation1 = stationInformationsTwo.get(0);
                 return "工位:"+stationInformation1.getStationName()+" 班组:"+stationInformation1.getTeamName();
-            }
-            else{
+            } else{
                 //产品扫描逻辑
                 String[] content = contentString.split("&");
                 StationInformation stationInformation=new StationInformation();
@@ -617,14 +622,273 @@ public class StationInformationServiceImpl implements IStationInformationService
                     //第一次扫码记录订单扫描记录信息
                     int i = ringScanInformationFirstMapper.insertRingScanInformationFirst(ringScanInformationFirst);
                 }
-                //先查生产订单日志表没有在查询在新增
+                //先查生产订单日志表没有在新增
+                RingScanInformationProdOrderScanning prodOrderScanning=new RingScanInformationProdOrderScanning();
+                prodOrderScanning.setOrderNumber(ringScanInformation.getOrderNumber());
+                prodOrderScanning.setProductionOrderNumber(ringScanInformation.getProductionOrderNumber());
+                List<RingScanInformationProdOrderScanning> ringScanInformationProdOrderScannings =
+                        prodOrderScanningMapper.selectRingScanInformationProdOrderScanningList(prodOrderScanning);
+                if(ringScanInformationProdOrderScannings.size()<0){
+                    //看看这个生产订单包装节点Or检验
+                    String query="{\n" +
+                            "    \"FormId\": \"PRD_MO\",\n" +
+                            "    \"FieldKeys\": \"FMaterialId.FNumber\",\n" +
+                            "    \"FilterString\": [{\"Left\":\"\",\"FieldName\":\"FBillNo\",\"Compare\":\"67\",\"Value\":\""+ringScanInformation.getProductionOrderNumber()+"\",\"Right\":\"\",\"Logic\":0}],\n" +
+                            "    \"OrderString\": \"\",\n" +
+                            "    \"TopRowCount\": 0,\n" +
+                            "    \"StartRow\": 0,\n" +
+                            "    \"Limit\": 2000,\n" +
+                            "    \"SubSystemId\": \"\"\n" +
+                            "}";
+                    Map<String, Object> prodListQuery = JSON.parseObject(query, Map.class);
+                    String prodListQueryJson = null;
+                    try {
+                        prodListQueryJson = api.billQuery(JSON.toJSONString(prodListQuery));
+                    } catch (Exception e) {
+                        throw new RuntimeException(e);
+                    }
+                    List<Map> prodListQueryJsonList = JSON.parseArray(prodListQueryJson, Map.class);
+                    //如果ERP存在这个生产订单
+                    if(prodListQueryJsonList.size()>0){
+                        //[{"FMaterialId.FNumber":"1010040050034","FQty":2.0000000000}]
+                        //生产订单日志记录
+                        prodOrderScanning.setTotalQuantity(prodListQueryJsonList.get(0).get("FQty").toString());//数量
+                        if(prodListQueryJsonList.get(0).get("FMaterialId.FNumber").toString().startsWith("1")){
+                            prodOrderScanning.setToPackagingorinspection("1");//到包装
+                        }else if(prodListQueryJsonList.get(0).get("FMaterialId.FNumber").toString().startsWith("2")){
+                            prodOrderScanning.setToPackagingorinspection("2");//到检验
+                        }else {
+                            prodOrderScanning.setToPackagingorinspection("0");//其他
+                        }
+                        int i = prodOrderScanningMapper.insertRingScanInformationProdOrderScanning(prodOrderScanning);
+                        if(i>0){
+                            System.out.println("新增生产订单日志信息成功");
+                        }
+                    }
+                }
+            }
+
+            //插入扫描日志信息
+            int i2 = ringScanInformationMapper.insertRingScanInformation(ringScanInformation);
+
+            if(i2>0){
+                //最后一个节点判定逻辑
+                RingScanInformationProdOrderScanning prodOrderScanning=new RingScanInformationProdOrderScanning();
+                prodOrderScanning.setOrderNumber(ringScanInformation.getOrderNumber());
+                prodOrderScanning.setProductionOrderNumber(ringScanInformation.getProductionOrderNumber());
+                List<RingScanInformationProdOrderScanning> ringScanInformationProdOrderScannings =
+                        prodOrderScanningMapper.selectRingScanInformationProdOrderScanningList(prodOrderScanning);
+                if(ringScanInformationProdOrderScannings.size()>0){
+                    String toPackagingorinspection = ringScanInformationProdOrderScannings.get(0).getToPackagingorinspection();
+                    if(toPackagingorinspection.equals("1")){//更新包装数量
+                        String toPackagingorinspection1 = ringScanInformationProdOrderScannings.get(0).getPackingQuantity();
+                        Double d=Double.valueOf(toPackagingorinspection1)+1;
+                        ringScanInformationProdOrderScannings.get(0).setPackingQuantity(d.toString());
+                        int i = prodOrderScanningMapper.updateRingScanInformationProdOrderScanning(ringScanInformationProdOrderScannings.get(0));
+                        System.out.println("包装节点更新成功");
+                        String rk = this.rk(prodOrderScanning);
+                        System.out.println(rk);
+                    }else {//更新检验数量
+                        String toPackagingorinspection1 = ringScanInformationProdOrderScannings.get(0).getInspectionQuantity();
+                        Double d=Double.valueOf(toPackagingorinspection1)+1;
+                        ringScanInformationProdOrderScannings.get(0).setInspectionQuantity(d.toString());
+                        int i = prodOrderScanningMapper.updateRingScanInformationProdOrderScanning(ringScanInformationProdOrderScannings.get(0));
+                        System.out.println("检验节点更新成功");
+                        String rk = this.rk(prodOrderScanning);
+                        System.out.println(rk);
+                    }
+                }
+                return "扫描成功";
+            }else {
+                return "扫描失败";
+            }
+        }
+        return "扫描成功";
+    }
+
+    private String rk(RingScanInformationProdOrderScanning prodOrderScanning) {
+        return "dddd";
+    }
+
+
+    /**
+     * 手持扫描实现
+     * @param contentString
+     * @return
+     */
+
+    @Override
+    public String stationProductScanningTwo(String contentString) {
+        //扫描人员码信息
+        if(contentString.contains("scan@")){
+            //扫描标记替换为空
+            String replace = contentString.replace("scan@", "");
+            //首先把内容拆分下
+            String[] content = replace.split("&");
+            //人员信息
+            String personneString = content[0];
+            //更改当前人员的扫码信息
+            String[] personneList = personneString.split("#");
+            //设备编码信息
+            String sbMacAddress= content[1];
+            //更改当前工位码的设备信息
+            StationInformation stationInformation = new StationInformation();
+            stationInformation.setDeviceNumber(sbMacAddress);//设备编号
+            List<StationInformation> stationInformations = stationInformationMapper.selectStationInformationListByDEviceNumber(stationInformation);
+            if (stationInformations.size()>0){
+                //重置以前的绑定(手持机在哪我就把那变成空)
+                stationInformationMapper.updateStationInformationDeviceNameAndBluetoothName(stationInformation);
+            }
+            stationInformation.setPersonnelId(personneList[0]);//员工id
+            stationInformation.setPersonnelName(personneList[1]);//员工姓名
+            int i = stationInformationMapper.updateStationInformationByUseIdAndUserName(stationInformation);
+            if(i>0){
+                System.out.println("工位:"+stationInformations.get(0).getStationName()+"人员:"+stationInformations.get(0).getPersonnelName());
+            }
+        }else {
+            //产品编码&mac地址
+            String[] content = contentString.split("&");
+            //产品编码
+            String s1 = content[0];
+            //mac地址
+            String s2 = content[1];
+
+            //1、判断扫的是不是厂内流转卡
+            /*boolean fjqyD = stationProductScanningRingVo.getContentInformation().contains("D");
+            boolean fjqyZ = stationProductScanningRingVo.getContentInformation().contains("Z");
+            if(!fjqyD||!fjqyZ){return "请扫描相关二维码";}*/
+
+            //2、扫描间距判断
+            /* RingScanInformation ringScanInformationQuery=new RingScanInformation();
+            ringScanInformationQuery.setDeviceNumber(split[1]);//设备Mac地址
+            RingScanInformation ringScanInformations = ringScanInformationMapper.selectRingScanInformationListDateTimeMax(ringScanInformationQuery);
+            if(ringScanInformations!=null){
+                //拿到上次扫描的时间
+                LocalDateTime scanningTime1 = ringScanInformations.getScanningTime();
+                //拿到当前系统时间
+                LocalDateTime now = LocalDateTime.now();
+                //计算两次时间的时间差
+                Duration duration = Duration.between(scanningTime1, now);
+                boolean isTwoMinutesPassed = duration.toMinutes() < 1;
+                //判断两次时间是否大于
+                if (isTwoMinutesPassed) {
+                  return "同一设备,两分钟之内不能重复扫描";
+                }
+            }*/
+
+            //扫码内容
+            RingScanInformation ringScanInformation=new RingScanInformation();
+            //扫描内容
+            ringScanInformation.setContentInformation(s1);
+            //当前时间
+            ringScanInformation.setScanningTime(LocalDateTime.now());
+            //mac地址
+            ringScanInformation.setDeviceNumber(s2);//mac地址
+
+            //4、查询当前机器绑定的工位信息和人信息
+            StationInformation terminalInformation=new StationInformation();
+            terminalInformation.setDeviceNumber(s2);//mac地址
+            List<StationInformation> stationInformations =
+                    stationInformationMapper.selectStationInformationListByDEviceNumber(terminalInformation);
+            if(stationInformations.size()>0){
+                ringScanInformation.setPersonnelName(stationInformations.get(0).getPersonnelName());
+                ringScanInformation.setProcess(stationInformations.get(0).getProcessId()); //人员id
+                ringScanInformation.setProcessName(stationInformations.get(0).getProcessName()); //人员姓名
+                ringScanInformation.setStationId(stationInformations.get(0).getId().toString()); //工位id
+                ringScanInformation.setStationName(stationInformations.get(0).getStationName());//工位名称
+            }
+            String nativeNumber="";
+            if(s1.contains("Z")){nativeNumber = s1.replace("Z", "");}
+            if(s1.contains("D")){nativeNumber=s1.replace("D","");}
+            if(StringUtils.isNotNull(nativeNumber)&&nativeNumber!=""){
+                //取值真实的扫描内容
+                ringScanInformation.setNativeNumbering(nativeNumber);
+            }else {
+                //扫描内容---直接就是产品码
+                ringScanInformation.setNativeNumbering(s1);
+            }
+
+
+            //根据扫描内容拿到生产订单号和订单号
+            String  queryStringOrderNumberAndProductionOrderNumber="{\n" +
+                    "    \"FormId\": \"PRD_MO\",\n" +
+                    "    \"FieldKeys\": \"FSaleOrderNo,FBillNo\",\n" +
+                    "    \"FilterString\": [{\"Left\":\"\",\"FieldName\":\"FSerialNo\",\"Compare\":\"17\",\"Value\":\""+ringScanInformation.getNativeNumbering()+"\",\"Right\":\"\",\"Logic\":0}],\n" +
+                    "    \"OrderString\": \"\",\n" +
+                    "    \"TopRowCount\": 0,\n" +
+                    "    \"StartRow\": 0,\n" +
+                    "    \"Limit\": 2000,\n" +
+                    "    \"SubSystemId\": \"\"\n" +
+                    "}";
+            Map<String, Object> map = JSON.parseObject(queryStringOrderNumberAndProductionOrderNumber, Map.class);
+            K3CloudApi api = new K3CloudApi();
+            String resultJson = null;
+            try {
+                resultJson = api.billQuery(JSON.toJSONString(map));
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+
+            //判断内不为空
+            if(resultJson!=""&resultJson!="[]"){
+                List<JdProductionOrder>    jdProductionOrders = JSON.parseArray(resultJson, JdProductionOrder.class);
+                if(jdProductionOrders.size()>0){
+                    //需求单据号
+                    ringScanInformation.setOrderNumber(jdProductionOrders.get(0).getDemandDocument());
+                    //生产订单号
+                    ringScanInformation.setProductionOrderNumber(jdProductionOrders.get(0).getDocumentNumber());
+                }
+            }
+
+            if(StringUtils.isNotNull(ringScanInformation.getOrderNumber())){
+                //--记录第一扫描(将来第一扫描的单据记录)
+                RingScanInformationFirst ringScanInformationFirst=new RingScanInformationFirst();
+                ringScanInformationFirst.setOrderNumber(ringScanInformation.getOrderNumber());
+                List<RingScanInformationFirst> ringScanInformationFirsts = ringScanInformationFirstMapper.selectRingScanInformationFirstList(ringScanInformationFirst);
+                //订单扫描记录
+                if(ringScanInformationFirsts.size()<=0){
+                    ringScanInformationFirst.setProductionOrderNumber(ringScanInformation.getProductionOrderNumber());
+                    ringScanInformationFirst.setStatus("1");
+                    ringScanInformationFirst.setStartTime(LocalDateTime.now());//开始时间
+                    //查询这个订单的总数量是多少
+                    String sa="{\n" +
+                            "    \"FormId\": \"SAL_SaleOrder\",\n" +
+                            "    \"FieldKeys\": \"FBillNo,FQty\",\n" +
+                            "    \"FilterString\": [{\"Left\":\"\",\"FieldName\":\"FBillNo\",\"Compare\":\"17\",\"Value\":\""+ringScanInformation.getOrderNumber()+"\",\"Right\":\"\",\"Logic\":0}],\n" +
+                            "    \"OrderString\": \"\",\n" +
+                            "    \"TopRowCount\": 0,\n" +
+                            "    \"StartRow\": 0,\n" +
+                            "    \"Limit\": 2000,\n" +
+                            "    \"SubSystemId\": \"\"\n" +
+                            "}";
+                    Map<String, Object> mapTotal = JSON.parseObject(sa, Map.class);
+                    String resultJsonTotal = null;
+                    try {
+                        resultJsonTotal = api.billQuery(JSON.toJSONString(mapTotal));
+                    } catch (Exception e) {
+                        throw new RuntimeException(e);
+                    }
+                    List<Map> mapListTotal = JSON.parseArray(resultJsonTotal, Map.class);
+                    if(mapListTotal.size()<=0){
+                        return "扫码失败订单已关闭";
+                    }
+                    Double totalAmount = mapListTotal.stream()
+                            .filter(map1 -> map1.containsKey("FQty")) // 确保 map 中包含 "amount" 字段
+                            .mapToDouble(map1 -> ((Number) map1.get("FQty")).doubleValue()) // 将 "amount" 字段转换为 double
+                            .sum(); // 求和
+
+                    ringScanInformationFirst.setTotalQuantity(String.valueOf(totalAmount.intValue()));
+                    //第一次扫码记录订单扫描记录信息
+                    int i = ringScanInformationFirstMapper.insertRingScanInformationFirst(ringScanInformationFirst);
+                }
+                //先查生产订单日志表没有在新增
                 RingScanInformationProdOrderScanning prodOrderScanning=new RingScanInformationProdOrderScanning();
                 prodOrderScanning.setOrderNumber(ringScanInformation.getOrderNumber());
                 prodOrderScanning.setProductionOrderNumber(ringScanInformation.getProductionOrderNumber());
                 List<RingScanInformationProdOrderScanning> ringScanInformationProdOrderScannings =
                         prodOrderScanningMapper.selectRingScanInformationProdOrderScanningList(prodOrderScanning);
                 if(ringScanInformationProdOrderScannings.size()<0){
-                    //看看这个生产订单包装节点Or
+                    //看看这个生产订单包装节点Or检验
                     String query="{\n" +
                             "    \"FormId\": \"PRD_MO\",\n" +
                             "    \"FieldKeys\": \"FMaterialId.FNumber\",\n" +
@@ -651,7 +915,7 @@ public class StationInformationServiceImpl implements IStationInformationService
                         if(prodListQueryJsonList.get(0).get("FMaterialId.FNumber").toString().startsWith("1")){
                             prodOrderScanning.setToPackagingorinspection("1");//到包装
                         }else if(prodListQueryJsonList.get(0).get("FMaterialId.FNumber").toString().startsWith("2")){
-                            prodOrderScanning.setToPackagingorinspection("2");//到入库
+                            prodOrderScanning.setToPackagingorinspection("2");//到检验
                         }else {
                             prodOrderScanning.setToPackagingorinspection("0");//其他
                         }
@@ -662,7 +926,10 @@ public class StationInformationServiceImpl implements IStationInformationService
                     }
                 }
             }
+
+            //插入扫描日志信息
             int i2 = ringScanInformationMapper.insertRingScanInformation(ringScanInformation);
+
             if(i2>0){
                 //最后一个节点判定逻辑
                 RingScanInformationProdOrderScanning prodOrderScanning=new RingScanInformationProdOrderScanning();
@@ -671,11 +938,23 @@ public class StationInformationServiceImpl implements IStationInformationService
                 List<RingScanInformationProdOrderScanning> ringScanInformationProdOrderScannings =
                         prodOrderScanningMapper.selectRingScanInformationProdOrderScanningList(prodOrderScanning);
                 if(ringScanInformationProdOrderScannings.size()>0){
-                    //得到
                     String toPackagingorinspection = ringScanInformationProdOrderScannings.get(0).getToPackagingorinspection();
-                    if(toPackagingorinspection.equals("1")){//判断完是到包装还是到检验
-                        //更新检验或者入库数量
-                        //
+                    if(toPackagingorinspection.equals("1")){//更新包装数量
+                        String toPackagingorinspection1 = ringScanInformationProdOrderScannings.get(0).getPackingQuantity();
+                        Double d=Double.valueOf(toPackagingorinspection1)+1;
+                        ringScanInformationProdOrderScannings.get(0).setPackingQuantity(d.toString());
+                        int i = prodOrderScanningMapper.updateRingScanInformationProdOrderScanning(ringScanInformationProdOrderScannings.get(0));
+                        System.out.println("包装节点更新成功");
+                        String rk = this.rk(prodOrderScanning);
+                        System.out.println(rk);
+                    }else {//更新检验数量
+                        String toPackagingorinspection1 = ringScanInformationProdOrderScannings.get(0).getInspectionQuantity();
+                        Double d=Double.valueOf(toPackagingorinspection1)+1;
+                        ringScanInformationProdOrderScannings.get(0).setInspectionQuantity(d.toString());
+                        int i = prodOrderScanningMapper.updateRingScanInformationProdOrderScanning(ringScanInformationProdOrderScannings.get(0));
+                        System.out.println("检验节点更新成功");
+                        String rk = this.rk(prodOrderScanning);
+                        System.out.println(rk);
                     }
                 }
                 return "扫描成功";
@@ -684,7 +963,307 @@ public class StationInformationServiceImpl implements IStationInformationService
             }
         }
         return "扫描成功";
-    };
+    }
+
+    @Override
+    @Transactional
+    public String stationProductScanningTwo2(String contentString) {
+        //扫描人员码信息
+        if(contentString.contains("scan@")){
+            //扫描标记替换为空
+            String replace = contentString.replace("scan@", "");
+            //首先把内容拆分下
+            String[] content = replace.split("&");
+            //人员信息
+            String personneString = content[0];
+            //更改当前人员的扫码信息
+            String[] personneList = personneString.split("#");
+            //设备编码信息
+            String sbMacAddress= content[1];
+            //更改当前工位码的设备信息
+            StationInformation stationInformation = new StationInformation();
+            stationInformation.setDeviceNumber(sbMacAddress);//设备编号
+            List<StationInformation> stationInformations = stationInformationMapper.selectStationInformationListByDEviceNumber(stationInformation);
+
+            if (stationInformations.size()>0){
+                //重置以前的绑定(手持机在哪我就把那变成空)
+                stationInformationMapper.updateStationInformationDeviceNameAndBluetoothName(stationInformation);
+            }
+            stationInformation.setPersonnelId(personneList[0]);//员工id
+            stationInformation.setPersonnelName(personneList[1]);//员工姓名
+            int i = stationInformationMapper.updateStationInformationByUseIdAndUserName(stationInformation);
+            if(i>0){
+                System.out.println("手持设备绑定成功");
+            }
+            StationInformation stationInformation2 = new StationInformation();
+            stationInformation2.setPersonnelId(personneList[0]);//设备编号
+            List<StationInformation> stationInformations1 = stationInformationMapper.selectStationInformationList(stationInformation2);
+            System.out.println("工位:"+stationInformations1.get(0).getStationName()+"人员:"+stationInformations1.get(0).getPersonnelName());
+            return "工位:"+stationInformations1.get(0).getStationName()+",人员:"+stationInformations1.get(0).getPersonnelName()+"-手持设备绑定成功";
+        }else {
+            //产品编码&mac地址
+            String[] content = contentString.split("&");
+            //产品编码
+            String s1 = content[0];
+            //mac地址
+            String s2 = content[1];
+
+            //1、判断扫的是不是厂内流转卡
+            /*boolean fjqyD = stationProductScanningRingVo.getContentInformation().contains("D");
+            boolean fjqyZ = stationProductScanningRingVo.getContentInformation().contains("Z");
+            if(!fjqyD||!fjqyZ){return "请扫描相关二维码";}*/
+
+            //2、扫描间距判断
+            /* RingScanInformation ringScanInformationQuery=new RingScanInformation();
+            ringScanInformationQuery.setDeviceNumber(split[1]);//设备Mac地址
+            RingScanInformation ringScanInformations = ringScanInformationMapper.selectRingScanInformationListDateTimeMax(ringScanInformationQuery);
+            if(ringScanInformations!=null){
+                //拿到上次扫描的时间
+                LocalDateTime scanningTime1 = ringScanInformations.getScanningTime();
+                //拿到当前系统时间
+                LocalDateTime now = LocalDateTime.now();
+                //计算两次时间的时间差
+                Duration duration = Duration.between(scanningTime1, now);
+                boolean isTwoMinutesPassed = duration.toMinutes() < 1;
+                //判断两次时间是否大于
+                if (isTwoMinutesPassed) {
+                  return "同一设备,两分钟之内不能重复扫描";
+                }
+            }*/
+
+            //扫码内容
+            RingScanInformation ringScanInformation=new RingScanInformation();
+            //扫描内容
+            ringScanInformation.setContentInformation(s1);
+            //当前时间
+            ringScanInformation.setScanningTime(LocalDateTime.now());
+            //mac地址
+            ringScanInformation.setDeviceNumber(s2);//mac地址
+
+
+
+
+            //4、查询当前机器绑定的工位信息和人信息
+            StationInformation terminalInformation=new StationInformation();
+            terminalInformation.setDeviceNumber(s2);//mac地址
+            List<StationInformation> stationInformations =
+                    stationInformationMapper.selectStationInformationListByDEviceNumber(terminalInformation);
+            if(stationInformations.size()>0){
+                ringScanInformation.setPersonnelName(stationInformations.get(0).getPersonnelName());//人员姓名
+                ringScanInformation.setProcess(stationInformations.get(0).getProcessId()); //工序id
+                ringScanInformation.setProcessName(stationInformations.get(0).getProcessName()); //工序名称
+                ringScanInformation.setStationId(stationInformations.get(0).getId().toString()); //工位id
+                ringScanInformation.setStationName(stationInformations.get(0).getStationName());//工位名称
+            }else {//当前没有绑定Mac地址直接返回
+                return "当前手持机未绑定工位人员信息-请先扫描人员码信息";
+            }
+
+            //验证重复扫描
+            RingScanInformation prodOrderScanning=new RingScanInformation();
+            prodOrderScanning.setContentInformation(s1);
+            prodOrderScanning.setProcessName(ringScanInformation.getProcessName());
+            List<RingScanInformation> ringScanInformations = ringScanInformationMapper.selectRingScanInformationList(prodOrderScanning);
+            if(ringScanInformations.size()>0){
+                return "工位:"+stationInformations.get(0).getStationName()+","+"人员:"+stationInformations.get(0).getPersonnelName()+"-"+"当前产品工序以扫描,不能重复扫描";
+            }
+            String nativeNumber="";
+            if(s1.contains("Z")){nativeNumber = s1.replace("Z", "");}
+            if(s1.contains("D")){nativeNumber=s1.replace("D","");}
+            if(StringUtils.isNotNull(nativeNumber)&&nativeNumber!=""){
+                //取值真实的扫描内容
+                ringScanInformation.setNativeNumbering(nativeNumber);
+            }else {
+                //扫描内容---直接就是产品码
+                ringScanInformation.setNativeNumbering(s1);
+            }
+            //根据扫描内容拿到生产订单号和订单号--查询流转卡序列号
+            ProductionCardFlow productionCardFlow=new ProductionCardFlow();
+            productionCardFlow.setSerialNumber(ringScanInformation.getNativeNumbering());//流转卡序列号
+            List<ProductionCardFlow> productionCardFlows = productionCardFlowMapper.selectProductionCardFlowList(productionCardFlow);
+            if(productionCardFlows.size()>0){
+                ProductionCardFlow productionCardFlow1 = productionCardFlows.get(0);
+                //需求单据号
+                ringScanInformation.setOrderNumber(productionCardFlow1.getProductionOrderListId());
+                //生产订单号
+                ringScanInformation.setProductionOrderNumber(productionCardFlow1.getDemandDocumentNumber());
+            }else {
+                System.out.println("erp未同步当前流转卡序列号");
+                return "请先同步-ERP数据";
+            }
+
+            //查询生产订单日志里有没有这个生产订单有就不添加了
+            RingScanInformationFirst ringScanInformationFirst=new RingScanInformationFirst();
+            ringScanInformationFirst.setProductionOrderNumber(ringScanInformation.getProductionOrderNumber());
+            List<RingScanInformationFirst> ringScanInformationFirsts = ringScanInformationFirstMapper.selectRingScanInformationFirstList(ringScanInformationFirst);
+            if(ringScanInformationFirsts.size()<=0){
+                RingScanInformationFirst ringScanInformationFirst1=new RingScanInformationFirst();
+                ringScanInformationFirst1.setOrderNumber(ringScanInformation.getOrderNumber());//订单号
+                ringScanInformationFirst1.setProductionOrderNumber(ringScanInformation.getProductionOrderNumber());//生产订单号
+                ringScanInformationFirst1.setStatus("1");
+                ringScanInformationFirst1.setStartTime(LocalDateTime.now());//开始时间
+
+                //有多少个序列号就是有多少台
+                ProductionCardFlow productionCardFlow2=new ProductionCardFlow();
+                productionCardFlow2.setProductionOrderListId(ringScanInformation.getOrderNumber());//订单号
+                List<ProductionCardFlow> productionCardFlows2 = productionCardFlowMapper.selectProductionCardFlowList(productionCardFlow2);
+                ringScanInformationFirst1.setTotalQuantity(String.valueOf(productionCardFlows2.size()));//订单的总数
+
+                //判断当前生产订单 到包装还是检验
+                PlanTaskDetails planTaskDetails=new PlanTaskDetails();
+                planTaskDetails.setDemandDocument(ringScanInformation.getProductionOrderNumber());
+                List<PlanTaskDetails> planTaskDetails1 = planTaskDetailsService.selectPlanTaskDetailsList(planTaskDetails);
+
+                Double v = Double.parseDouble(planTaskDetails1.get(0).getQuantity());
+                Integer i1 = v.intValue();
+                ringScanInformationFirst1.setProductionOrderTotalQuantity(i1.toString());//生产订单的总数
+
+                if(planTaskDetails1.size()>0){
+                    PlanTaskDetails planTaskDetails2 = planTaskDetails1.get(0);
+                    String materialId = planTaskDetails2.getMaterialId();
+                    if(materialId.startsWith("1")){//更新包装数量
+                        ringScanInformationFirst1.setPackingOrInspection("1");//包装
+                    }else if(materialId.startsWith("102")) {
+                        ringScanInformationFirst1.setPackingOrInspection("2"); //检验
+                    }
+
+                }
+                //扫一次产品记录一次
+                int i = ringScanInformationFirstMapper.insertRingScanInformationFirst(ringScanInformationFirst1);
+
+                //有可能订单数量就是一台,我扫一回订单就结束掉了
+
+            }else {
+                //更新包装或者检验的数量
+                //拿到老的包装数量
+                RingScanInformationFirst ringScanInformationFirst1=new RingScanInformationFirst();
+                ringScanInformationFirst1.setProductionOrderNumber(ringScanInformation.getProductionOrderNumber());
+                List<RingScanInformationFirst> ringScanInformationFirsts1 = ringScanInformationFirstMapper.selectRingScanInformationFirstList(ringScanInformationFirst1);
+                RingScanInformationFirst ringScanInformationFirstNumber = ringScanInformationFirsts1.get(0);
+
+                //判断当前生产订单 到包装还是检验
+                PlanTaskDetails planTaskDetails=new PlanTaskDetails();
+                planTaskDetails.setDemandDocument(ringScanInformation.getProductionOrderNumber());
+                List<PlanTaskDetails> planTaskDetails1 = planTaskDetailsService.selectPlanTaskDetailsList(planTaskDetails);
+                if(planTaskDetails1.size()>0){
+                    PlanTaskDetails planTaskDetails2 = planTaskDetails1.get(0);
+                    String materialId = planTaskDetails2.getMaterialId();
+                    if(materialId.startsWith("1")&&ringScanInformation.getProcessName().equals("包装")){//1卡头并且当前工序未包装,扫描信息为,更新包装数量
+                        RingScanInformationFirst newRingScanInformationFirst = getRingScanInformationFirst(ringScanInformationFirstNumber.getPackingQuantity(), ringScanInformation,"1");
+                        ringScanInformationFirstMapper.updateRingScanInformationFirstByproductionOrderNumber(newRingScanInformationFirst);
+                        this.generateWarehouseWarrant(ringScanInformation.getProductionOrderNumber());
+                    }else if(materialId.startsWith("102")&&ringScanInformation.getProcessName().equals("检验")) {
+                        RingScanInformationFirst newRingScanInformationFirst = getRingScanInformationFirst(ringScanInformationFirstNumber.getInspectionQuantity(), ringScanInformation,"2");
+                        ringScanInformationFirstMapper.updateRingScanInformationFirstByproductionOrderNumber(newRingScanInformationFirst);
+                        this.generateWarehouseWarrant(ringScanInformation.getProductionOrderNumber());
+                    }
+                }
+            }
+            //插入扫描日志前判定当前销售订单是否变为生成完成
+
+            PlanTaskDetails planTaskDetails=new PlanTaskDetails();
+            planTaskDetails.setStatus("1");//状态
+            planTaskDetails.setDemandDocument(ringScanInformation.getProductionOrderNumber());//生产订单
+            List<PlanTaskDetails> planTaskDetails1 = planTaskDetailsMapper.selectPlanTaskDetailsList(planTaskDetails);
+            if(planTaskDetails1.size()<=0){
+                //生产订单状态
+                RingScanInformationFirst ringScanInformationFirst1=new RingScanInformationFirst();
+                ringScanInformationFirst1.setProductionOrderNumber(ringScanInformation.getProductionOrderNumber());
+                ringScanInformationFirst1.setStatus("2");
+                ringScanInformationFirstMapper.updateRingScanInformationFirstByproductionOrderNumber(ringScanInformationFirst1);
+            }
+            ProductionPlanningManagement productionPlanningManagement=new ProductionPlanningManagement();
+            productionPlanningManagement.setOrderNumber(ringScanInformation.getOrderNumber());
+            List<ProductionPlanningManagement> productionPlanningManagements = productionPlanningManagementMapper
+                    .selectProductionPlanningManagementList(productionPlanningManagement);
+            if(productionPlanningManagements.size()>0){
+                ProductionPlanningManagement productionPlanningManagement1 = productionPlanningManagements.get(0);
+                //订单号
+                PlanTaskDetails planTaskDetailsTwo=new PlanTaskDetails();
+                planTaskDetailsTwo.setPlanId(productionPlanningManagement1.getId());//生产订单
+                planTaskDetailsTwo.setStatus("1");
+                List<PlanTaskDetails> planTaskDetailsPlan = planTaskDetailsMapper.selectPlanTaskDetailsList(planTaskDetailsTwo);
+                if(planTaskDetailsPlan.size()<=0){
+                    PlanTaskDetails planTaskDetails2=new PlanTaskDetails();
+                    planTaskDetails2.setDemandDocument(ringScanInformation.getProductionOrderNumber());//生产订单
+                    List<PlanTaskDetails> planTaskDetails2s = planTaskDetailsMapper.selectPlanTaskDetailsList(planTaskDetails2);
+                    //改订单状态
+                    ProductionPlanningManagement productionPlanningManagementUpdate=new ProductionPlanningManagement();
+                    productionPlanningManagementUpdate.setOrderNumber(ringScanInformation.getOrderNumber());
+                    productionPlanningManagementUpdate.setTaskStatus("3");
+                    productionPlanningManagementUpdate.setId(planTaskDetails2s.get(0).getPlanId());
+                    productionPlanningManagementMapper.updateProductionPlanningManagement(productionPlanningManagementUpdate);
+                }
+            }
+            //插入扫描日志信息
+            int i2 = ringScanInformationMapper.insertRingScanInformation(ringScanInformation);
+            return "工位:"+ringScanInformation.getStationName()+","+"人员:"+ringScanInformation.getPersonnelName()+"-"+"流转卡扫描成功";
+        }
+    }
+
+
+
+    /**
+     * 更新包装还是更新检验
+     * @param ringScanInformationFirstNumber
+     * @param ringScanInformation
+     * @return
+     */
+    private static RingScanInformationFirst getRingScanInformationFirst(String ringScanInformationFirstNumber, RingScanInformation ringScanInformation,String type) {
+        if(type.equals("1")){
+            String inspectionQuantity = ringScanInformationFirstNumber;
+            Double newInspectionQuantity = Double.parseDouble(inspectionQuantity) + 1;
+            Integer i1 = newInspectionQuantity.intValue();
+            RingScanInformationFirst newRingScanInformationFirst = new RingScanInformationFirst();
+            newRingScanInformationFirst.setProductionOrderNumber(ringScanInformation.getProductionOrderNumber());
+            newRingScanInformationFirst.setPackingQuantity(i1.toString());
+            return newRingScanInformationFirst;
+        }else {
+            String inspectionQuantity = ringScanInformationFirstNumber;
+            Double newInspectionQuantity = Double.parseDouble(inspectionQuantity) + 1;
+            Integer i2 = newInspectionQuantity.intValue();
+            RingScanInformationFirst newRingScanInformationFirst = new RingScanInformationFirst();
+            newRingScanInformationFirst.setProductionOrderNumber(ringScanInformation.getProductionOrderNumber());
+            newRingScanInformationFirst.setInspectionQuantity(i2.toString());
+            return newRingScanInformationFirst;
+        }
+
+
+    }
+
+
+    public  String  generateWarehouseWarrant(String productionOrderNumber){
+        RingScanInformationFirst newRingScanInformationFirst = new RingScanInformationFirst();
+        newRingScanInformationFirst.setProductionOrderNumber(productionOrderNumber);;
+        List<RingScanInformationFirst> ringScanInformationFirsts1 = ringScanInformationFirstMapper.selectRingScanInformationFirstList(newRingScanInformationFirst);
+        if (ringScanInformationFirsts1.size()>0){
+            RingScanInformationFirst ringScanInformationFirst = ringScanInformationFirsts1.get(0);
+            String packingOrInspection = ringScanInformationFirst.getPackingOrInspection();
+            if(packingOrInspection.equals("1")){
+                //看包装跟当前生产订单总数量是否相等
+                if(ringScanInformationFirst.getPackingQuantity().equals(ringScanInformationFirst.getProductionOrderTotalQuantity())){
+                    //生成入库单
+                    System.out.println("包装生成入库单");
+                    //改当前生产订单的状态
+                    PlanTaskDetails planTaskDetails=new PlanTaskDetails();
+                    planTaskDetails.setDemandDocument(productionOrderNumber);
+                    planTaskDetails.setStatus("2");//生产完成
+                    int i = planTaskDetailsMapper.updatePlanTaskDetailsByDemandDocument(planTaskDetails);
+                }
+            }else if(packingOrInspection.equals("2")){
+                //看包装跟当前生产订单总数量是否相等
+                if(ringScanInformationFirst.getInspectionQuantity().equals(ringScanInformationFirst.getProductionOrderTotalQuantity())){
+                    //生成入库单
+                    System.out.println("包装生成入库单");
+                    //改当前生产订单的状态
+                    PlanTaskDetails planTaskDetails=new PlanTaskDetails();
+                    planTaskDetails.setDemandDocument(productionOrderNumber);
+                    planTaskDetails.setStatus("2");//生产完成
+                    int i = planTaskDetailsMapper.updatePlanTaskDetailsByDemandDocument(planTaskDetails);
+                }
+            }
+        }
+        return "数量够了入库";
+    }
 
     /**
      * 指环王扫描信息hmc

+ 30 - 2
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/utils/MaUtils.java

@@ -11,6 +11,9 @@ import javax.imageio.ImageIO;
 import java.awt.image.BufferedImage;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.FileSystems;
+import java.nio.file.Path;
 import java.util.Base64;
 import java.util.HashMap;
 import java.util.Map;
@@ -40,9 +43,10 @@ public class MaUtils {
 
     public static String generateQRCodeConfig(String text,Integer width,Integer height) {
         QRCodeWriter qrCodeWriter = new QRCodeWriter();
-        Map<EncodeHintType, Integer> hints = new HashMap<>();
-        int margin = 0; // 设置边距
+        Map<EncodeHintType, String> hints = new HashMap<>();
+        String margin = "0"; // 设置边距
         hints.put(EncodeHintType.MARGIN, margin); // 设置边距
+        hints.put(EncodeHintType.CHARACTER_SET, StandardCharsets.UTF_8.name());
         try {
             // 生成二维码的位矩阵
             BitMatrix bitMatrix = qrCodeWriter.encode(text, BarcodeFormat.QR_CODE, width, height,hints);
@@ -59,4 +63,28 @@ public class MaUtils {
             return null;
         }
     }
+
+    /**
+     * 循环生成逻辑
+     * @param data
+     * @param filePath
+     * @throws WriterException
+     * @throws IOException
+     */
+
+    public static void generateQRCode(String data, String filePath) throws WriterException, IOException {
+        // 创建 QR Code 编码器
+        QRCodeWriter qrCodeWriter = new QRCodeWriter();
+
+        // 设置编码格式为 UTF-8
+        HashMap<EncodeHintType, Object> hints = new HashMap<>();
+        hints.put(EncodeHintType.CHARACTER_SET, "UTF-8");
+
+        // 生成 BitMatrix
+        BitMatrix bitMatrix = qrCodeWriter.encode(data, BarcodeFormat.QR_CODE, 300, 300, hints);
+
+        // 将 BitMatrix 写入图片文件
+        Path path = FileSystems.getDefault().getPath(filePath);
+        MatrixToImageWriter.writeToPath(bitMatrix, "PNG", path);
+    }
 }

+ 8 - 1
zkqy-fujian-amichi/src/main/resources/mapper/MaterialtransactionlogMapper.xml

@@ -70,7 +70,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectMaterialtransactionlogVo"/>
         where id = #{id}
     </select>
-        
+    <select id="selectMaterialtransactionlogListSun"
+            resultType="com.zkqy.amichi.domain.Materialtransactionlog">
+        select id, materialCode, material_name, model, specification, unit, attribute, type_of_operation, sum(quantity) as quantity, transactionDate,warehousing_time,
+               operator, batchNumber, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status,
+               process_key, task_process_key, task_node_key, sparea, spareb, sparec from  fjqydb.materialtransactionlog
+               group by  materialCode
+    </select>
+
     <insert id="insertMaterialtransactionlog" parameterType="com.zkqy.amichi.domain.Materialtransactionlog" useGeneratedKeys="true" keyProperty="id">
         insert into  {DBNAME}.materialtransactionlog
         <trim prefix="(" suffix=")" suffixOverrides=",">

+ 60 - 2
zkqy-fujian-amichi/src/main/resources/mapper/PlanTaskDetailsMapper.xml

@@ -45,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="hegezheng"    column="hegezheng"    />
         <result property="description"    column="description"    />
         <result property="baozhuangxiang"    column="baozhuangxiang"    />
+        <result property="status"    column="status"    />
     </resultMap>
 
     <resultMap type="com.zkqy.amichi.domain.vo.PlanTaskDetailsVo" id="PlanTaskDetailsResultVo">
@@ -75,12 +76,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="orderNumber"    column="order_number"/>
         <result property="completionTime"    column="completion_time"/>
         <result property="timeOfRequest" column="time_of_request"/>
+        <result property="status"    column="status"    />
     </resultMap>
 
 
 
     <sql id="selectPlanTaskDetailsVo">
-        select id, task_id, model, nameplate, capacity, interface_disk, length, voltage, programme, quantity, sparea, spareb, sparec, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key, task_node_key, plan_id, material_id, material_name, model_number, specification, material_unit, demand_document, time_of_request, customer_model, power, colour, mingpai, shuomingshu, hegezheng, description, baozhuangxiang from fjqydb.plan_task_details
+        select id, task_id, model, nameplate, capacity, interface_disk, length, voltage, programme, quantity, sparea, spareb, sparec, remark,
+               create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key,
+               task_process_key, task_node_key, plan_id, material_id, material_name, model_number, specification, material_unit, demand_document,
+               time_of_request, customer_model, power, colour, mingpai, shuomingshu, hegezheng, description, baozhuangxiang,status
+        from fjqydb.plan_task_details
     </sql>
 
     <select id="selectPlanTaskDetailsList" parameterType="com.zkqy.amichi.domain.PlanTaskDetails" resultMap="PlanTaskDetailsResult">
@@ -120,6 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="hegezheng != null  and hegezheng != ''"> and hegezheng = #{hegezheng}</if>
             <if test="description != null  and description != ''"> and description = #{description}</if>
             <if test="baozhuangxiang != null  and baozhuangxiang != ''"> and baozhuangxiang = #{baozhuangxiang}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
         </where>
     </select>
     
@@ -173,8 +180,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="description != null">description,</if>
             <if test="baozhuangxiang != null">baozhuangxiang,</if>
             <if test="switchBox != null">switch_box,</if>
-            <if test="scheduledCompletion != null">scheduled_commencement,</if>
+            <if test="scheduledCommencement != null">scheduled_commencement,</if>
             <if test="scheduledCompletion != null">scheduled_completion,</if>
+            <if test="status != null  and status != ''">status</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="taskId != null">#{taskId},</if>
@@ -220,8 +228,57 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="switchBox != null">#{switchBox},</if>
             <if test="scheduledCommencement != null">#{scheduledCommencement},</if>
             <if test="scheduledCompletion != null">#{scheduledCompletion},</if>
+            <if test="status != null  and status != ''">#{status},</if>
          </trim>
     </insert>
+    <!--查询生产订单号 -->
+    <update id="updatePlanTaskDetailsByDemandDocument" parameterType="com.zkqy.amichi.domain.PlanTaskDetails">
+        update fjqydb.plan_task_details
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="taskId != null">task_id = #{taskId},</if>
+            <if test="model != null">model = #{model},</if>
+            <if test="nameplate != null">nameplate = #{nameplate},</if>
+            <if test="capacity != null">capacity = #{capacity},</if>
+            <if test="interfaceDisk != null">interface_disk = #{interfaceDisk},</if>
+            <if test="lengthString != null">`length` = #{lengthString},</if>
+            <if test="voltage != null">voltage = #{voltage},</if>
+            <if test="programme != null">programme = #{programme},</if>
+            <if test="quantity != null">quantity = #{quantity},</if>
+            <if test="sparea != null">sparea = #{sparea},</if>
+            <if test="spareb != null">spareb = #{spareb},</if>
+            <if test="sparec != null">sparec = #{sparec},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
+            <if test="processKey != null">process_key = #{processKey},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+            <if test="planId != null">plan_id = #{planId},</if>
+            <if test="materialId != null">material_id = #{materialId},</if>
+            <if test="materialName != null">material_name = #{materialName},</if>
+            <if test="modelNumber != null">model_number = #{modelNumber},</if>
+            <if test="specification != null">specification = #{specification},</if>
+            <if test="materialUnit != null">material_unit = #{materialUnit},</if>
+            <if test="demandDocument != null">demand_document = #{demandDocument},</if>
+            <if test="timeOfRequest != null">time_of_request = #{timeOfRequest},</if>
+            <if test="customerModel != null">customer_model = #{customerModel},</if>
+            <if test="power != null">power = #{power},</if>
+            <if test="colour != null">colour = #{colour},</if>
+            <if test="mingpai != null">mingpai = #{mingpai},</if>
+            <if test="shuomingshu != null">shuomingshu = #{shuomingshu},</if>
+            <if test="hegezheng != null">hegezheng = #{hegezheng},</if>
+            <if test="description != null">description = #{description},</if>
+            <if test="baozhuangxiang != null">baozhuangxiang = #{baozhuangxiang},</if>
+            <if test="status != null  and status != ''">status=#{status},</if>
+        </trim>
+        where demand_document = #{demandDocument}
+    </update>
 
     <update id="updatePlanTaskDetails" parameterType="com.zkqy.amichi.domain.PlanTaskDetails">
         update {DBNAME}.plan_task_details
@@ -266,6 +323,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="hegezheng != null">hegezheng = #{hegezheng},</if>
             <if test="description != null">description = #{description},</if>
             <if test="baozhuangxiang != null">baozhuangxiang = #{baozhuangxiang},</if>
+            <if test="status != null  and status != ''">status=#{status},</if>
         </trim>
         where id = #{id}
     </update>

+ 6 - 1
zkqy-fujian-amichi/src/main/resources/mapper/ProcedureListMapper.xml

@@ -16,10 +16,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
         <result property="delFlag"    column="del_flag"    />
+        <result property="sort"    column="sort"    />
     </resultMap>
 
     <sql id="selectProcedureListVo">
-        select id, procedure_number, procedur_name, remarks, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag from fjqydb.procedure_list
+        select id, procedure_number, procedur_name, remarks, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag,sort from fjqydb.procedure_list
     </sql>
 
     <select id="selectProcedureListList" parameterType="com.zkqy.amichi.domain.ProcedureList" resultMap="ProcedureListResult">
@@ -31,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createById != null "> and create_by_id = #{createById}</if>
             <if test="updateById != null "> and update_by_id = #{updateById}</if>
         </where>
+        order by   sort
     </select>
     
     <select id="selectProcedureListById" parameterType="Long" resultMap="ProcedureListResult">
@@ -51,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="delFlag != null">del_flag,</if>
+            <if test="sort != null">sort,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="procedureNumber != null and procedureNumber != ''">#{procedureNumber},</if>
@@ -63,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="delFlag != null">#{delFlag},</if>
+            <if test="sort != null">#{sort},</if>
          </trim>
     </insert>
 
@@ -79,6 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="sort != null">sort= #{sort},</if>
         </trim>
         where id = #{id}
     </update>

+ 1 - 1
zkqy-fujian-amichi/src/main/resources/mapper/ProductionCardFlowMapper.xml

@@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectProductionCardFlowVo">
-        select id, production_order_list_id, serial_number, demand_document_number, print_quantity, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key, task_node_key from {DBNAME}.production_card_flow
+        select id, production_order_list_id, serial_number, demand_document_number, print_quantity, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key, task_node_key from fjqydb.production_card_flow
     </sql>
 
     <select id="selectProductionCardFlowList" parameterType="com.zkqy.amichi.domain.ProductionCardFlow" resultMap="ProductionCardFlowResult">

+ 37 - 2
zkqy-fujian-amichi/src/main/resources/mapper/ProductionPlanningManagementMapper.xml

@@ -72,7 +72,7 @@
     </resultMap>
 
     <sql id="selectProductionPlanningManagementVo">
-        select id, plan_number, plan_name, order_number, quantity, completion_time, task_status, task_id, sparea, spareb, sparec, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key, task_node_key, contract_number, documenter, approved_by_department,scheduling_state,plan_type,special_requirements,is_weld_sheet,creationtimeString,order_type from {DBNAME}.production_planning_management
+        select id, plan_number, plan_name, order_number, quantity, completion_time, task_status, task_id, sparea, spareb, sparec, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key, task_node_key, contract_number, documenter, approved_by_department,scheduling_state,plan_type,special_requirements,is_weld_sheet,creationtimeString,order_type from fjqydb.production_planning_management
     </sql>
 
     <select id="selectProductionPlanningManagementList" parameterType="com.zkqy.amichi.domain.ProductionPlanningManagement" resultMap="ProductionPlanningManagementResult">
@@ -291,7 +291,7 @@
     </insert>
 
     <update id="updateProductionPlanningManagement" parameterType="com.zkqy.amichi.domain.ProductionPlanningManagement">
-        update {DBNAME}.production_planning_management
+        update fjqydb.production_planning_management
         <trim prefix="SET" suffixOverrides=",">
             <if test="planNumber != null">plan_number = #{planNumber},</if>
             <if test="planName != null">plan_name = #{planName},</if>
@@ -324,6 +324,41 @@
         where id = #{id}
     </update>
 
+    <update id="updateProductionPlanningManagementByOrderNumber" parameterType="com.zkqy.amichi.domain.ProductionPlanningManagement">
+        update fjqydb.production_planning_management
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="planNumber != null">plan_number = #{planNumber},</if>
+            <if test="planName != null">plan_name = #{planName},</if>
+            <if test="orderNumber != null">order_number = #{orderNumber},</if>
+            <if test="quantity != null">quantity = #{quantity},</if>
+            <if test="completionTime != null">completion_time = #{completionTime},</if>
+            <if test="taskStatus != null">task_status = #{taskStatus},</if>
+            <if test="taskId != null">task_id = #{taskId},</if>
+            <if test="sparea != null">sparea = #{sparea},</if>
+            <if test="spareb != null">spareb = #{spareb},</if>
+            <if test="sparec != null">sparec = #{sparec},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
+            <if test="processKey != null">process_key = #{processKey},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+            <if test="contractNumber != null">contract_number = #{contractNumber},</if>
+            <if test="documenter != null">documenter = #{documenter},</if>
+            <if test="approvedByDepartment != null">approved_by_department = #{approvedByDepartment},</if>
+            <if test="schedulingState != null  and schedulingState != ''">scheduling_state = #{schedulingState},</if>
+            <if test="planType != null  and planType != ''">plan_type = #{planType}</if>
+        </trim>
+        where order_number = #{orderNumber}
+    </update>
+
+
     <delete id="deleteProductionPlanningManagementById" parameterType="Long">
         delete from {DBNAME}.production_planning_management where id = #{id}
     </delete>

+ 27 - 4
zkqy-fujian-amichi/src/main/resources/mapper/RingScanInformationFirstMapper.xml

@@ -14,17 +14,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="packingQuantity"    column="packing_quantity"    />
         <result property="inspectionQuantity"    column="inspection_quantity"    />
         <result property="totalQuantity"    column="total_quantity"    />
+        <result property="packingOrInspection"    column="packing_or_inspection"    />
+        <result property="productionOrderTotalQuantity"    column="production_order_total_quantity"    />
     </resultMap>
 
     <sql id="selectRingScanInformationFirstVo">
-        select id, order_number, production_order_number, status,start_time,end_time,packing_quantity,inspection_quantity,total_quantity
+        select id, order_number, production_order_number, status,start_time,end_time,packing_quantity,inspection_quantity,total_quantity,
+            packing_or_inspection,production_order_total_quantity
         from fjqydb.ring_scan_information_first
     </sql>
 
     <select id="selectRingScanInformationFirstList" parameterType="com.zkqy.amichi.domain.RingScanInformationFirst" resultMap="RingScanInformationFirstResult">
         <include refid="selectRingScanInformationFirstVo"/>
         <where>  
-            <if test="orderNumber != null  and orderNumber != ''"> and order_number = #{orderNumber}</if>
+            <if test="orderNumber != null  and orderNumber != ''"> and (order_number = #{orderNumber} or production_order_number = #{orderNumber})</if>
             <if test="productionOrderNumber != null  and productionOrderNumber != ''"> and production_order_number = #{productionOrderNumber}</if>
             <if test="status != null  and status != ''"> and status = #{status}</if>
             <if test="startTime != null  and startTime != ''"> and start_time = #{startTime}</if>
@@ -32,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="packingQuantity != null  and packingQuantity != ''"> and packing_quantity = #{packingQuantity}</if>
             <if test="inspectionQuantity != null  and inspectionQuantity != ''"> and inspection_quantity = #{inspectionQuantity}</if>
             <if test="totalQuantity != null  and totalQuantity != ''"> and total_quantity = #{totalQuantity}</if>
+            <if test="packingOrInspection != null  and packingOrInspection != ''"> and packing_or_inspection = #{packingOrInspection}</if>
         </where>
     </select>
     
@@ -50,7 +54,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="endTime != null">end_time,</if>
             <if test="packingQuantity != null  and packingQuantity != ''">packing_quantity,</if>
             <if test="inspectionQuantity != null  and inspectionQuantity != ''">inspection_quantity,</if>
-            <if test="totalQuantity != null  and totalQuantity != ''">total_quantity</if>
+            <if test="totalQuantity != null  and totalQuantity != ''">total_quantity,</if>
+            <if test="packingOrInspection != null  and packingOrInspection != ''">packing_or_inspection,</if>
+            <if test="productionOrderTotalQuantity != null  and productionOrderTotalQuantity != ''">production_order_total_quantity,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="orderNumber != null">#{orderNumber},</if>
@@ -60,7 +66,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="endTime != null">#{endTime},</if>
             <if test="packingQuantity != null  and packingQuantity != ''">#{packingQuantity},</if>
             <if test="inspectionQuantity != null  and inspectionQuantity != ''">#{inspectionQuantity},</if>
-            <if test="totalQuantity != null  and totalQuantity != ''">#{totalQuantity}</if>
+            <if test="totalQuantity != null  and totalQuantity != ''">#{totalQuantity},</if>
+            <if test="packingOrInspection != null  and packingOrInspection != ''">#{packingOrInspection},</if>
+            <if test="productionOrderTotalQuantity != null  and productionOrderTotalQuantity != ''">#{productionOrderTotalQuantity}</if>
          </trim>
     </insert>
 
@@ -79,6 +87,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </update>
 
+    <update id="updateRingScanInformationFirstByproductionOrderNumber" parameterType="com.zkqy.amichi.domain.RingScanInformationFirst">
+        update fjqydb.ring_scan_information_first
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="orderNumber != null">order_number = #{orderNumber},</if>
+            <if test="productionOrderNumber != null">production_order_number = #{productionOrderNumber},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="startTime != null  and startTime != ''">start_time = #{startTime}</if>
+            <if test="endTime != null  and endTime != ''">end_time = #{endTime}</if>
+            <if test="packingQuantity != null  and packingQuantity != ''"> packing_quantity = #{packingQuantity}</if>
+            <if test="inspectionQuantity != null  and inspectionQuantity != ''">inspection_quantity = #{inspectionQuantity}</if>
+            <if test="totalQuantity != null  and totalQuantity != ''">total_quantity = #{totalQuantity}</if>
+        </trim>
+        where production_order_number = #{productionOrderNumber}
+    </update>
+
     <delete id="deleteRingScanInformationFirstById" parameterType="Long">
         delete from fjqydb.ring_scan_information_first where id = #{id}
     </delete>

+ 57 - 1
zkqy-fujian-amichi/src/main/resources/mapper/RingScanInformationMapper.xml

@@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectRingScanInformationVo"/>
         <where>  
             <if test="deviceNumber != null  and deviceNumber != ''"> and device_number = #{deviceNumber}</if>
+            <if test="processName != null  and processName != ''"> and process_name = #{processName}</if>
             <if test="deviceName != null  and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
             <if test="scanningTime != null "> and scanning_time = #{scanningTime}</if>
             <if test="contentInformation != null  and contentInformation != ''"> and content_information = #{contentInformation}</if>
@@ -41,6 +42,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="materialName"    column="material_name"    />
         <result property="model"    column="model"    />
         <result property="demandDocument"    column="demand_document"    />
+        <result property="personnelName"    column="personnel_name"    />
+        <result property="processName"    column="process_name"    />
+        <result property="stationName"    column="station_name"    />
     </resultMap>
 
     <select id="selectRingScanInformationListVo" parameterType="com.zkqy.amichi.domain.RingScanInformation" resultMap="RingScanInformationResultNR">
@@ -71,7 +75,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         rsi.device_name,
         rsi.scanning_time,
         rsi.content_information,
-        rsi.native_numbering
+        rsi.native_numbering,
+        rsi.personnel_name,
+        rsi.process_name,
+        rsi.station_name
         FROM
         fjqydb.production_card_flow AS pcf
         LEFT JOIN fjqydb.plan_task_details AS ptd ON ptd.demand_document = pcf.demand_document_number
@@ -149,6 +156,55 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             sub.order_number,sub.sort
     </select>
 
+
+    <select id="selectRingScanInformationLog2" resultType="com.zkqy.amichi.domain.vo.RingScanInformationLogVo">
+        SELECT
+        sub.count,
+        sub.process_name,
+        sub.native_numbering,
+        sub.order_number,
+        sub.scanning_time,
+        sub.production_order_number,
+        sub.sort,
+        rsif.`status`,
+        rsif.start_time,
+        rsif.end_time,
+        rsif.total_quantity,
+        rsif.production_order_total_quantity
+        FROM
+        (
+        SELECT
+        rsi.process_name,
+        rsi.native_numbering,
+        rsi.order_number,
+        COUNT( rsi.process_name ) AS count,
+        rsi.production_order_number,
+        MAX( rsi.scanning_time ) AS scanning_time,
+        pl.sort
+        FROM
+        fjqydb.ring_scan_information AS rsi
+        LEFT JOIN fjqydb.procedure_list AS pl ON pl.procedur_name = rsi.process_name
+        GROUP BY
+        rsi.production_order_number,
+        rsi.process_name
+        ) AS sub
+        LEFT JOIN fjqydb.ring_scan_information_first AS rsif ON (sub.production_order_number = rsif.production_order_number)
+        <where>
+            <if test="list != null and list.size()>0">
+                sub.production_order_number IN
+                <foreach item="id" collection="list" open="(" separator="," close=")">
+                    #{id}
+                </foreach>
+            </if>
+            <if test="list == null or list.size() == 0">
+                rsi.production_order_number = 'X'
+            </if>
+        </where>
+        ORDER BY
+        sub.production_order_number,sub.sort
+    </select>
+
+
     <insert id="insertRingScanInformation" parameterType="com.zkqy.amichi.domain.RingScanInformation" useGeneratedKeys="true" keyProperty="id">
         insert into fjqydb.ring_scan_information
         <trim prefix="(" suffix=")" suffixOverrides=",">

+ 4 - 4
zkqy-fujian-amichi/src/main/resources/mapper/StationInformationMapper.xml

@@ -165,7 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </insert>
 
     <update id="updateStationInformation" parameterType="com.zkqy.amichi.domain.StationInformation">
-        update {DBNAME}.station_information
+        update fjqydb.station_information
         <trim prefix="SET" suffixOverrides=",">
             <if test="stationCode != null">station_code = #{stationCode},</if>
             <if test="stationName != null">station_name = #{stationName},</if>
@@ -187,7 +187,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
             <if test="teamName != null  and teamName != ''">team_name=#{teamName},</if>
             <if test="stationType!=null and stationType!=''">station_type=#{stationType},</if>
-            <if test="deviceNumber!=null and deviceNumber!=''">device_number#{deviceNumber},</if>
+            <if test="deviceNumber!=null and deviceNumber!=''">device_number=#{deviceNumber},</if>
             <if test="bluetoothName!=null and bluetoothName!=''">bluetooth_name=#{bluetoothName},</if>
             <if test="processId!=null and processId!=''">process_id=#{processId},</if>
             <if test="processName!=null and processName!=''">process_name=#{processName}</if>
@@ -292,8 +292,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update fjqydb.station_information
         <trim prefix="SET" suffixOverrides=",">
             <if test="stationName != null">station_name = #{stationName},</if>
-            <if test="personnelId != null">personnel_id = #{personnelId},</if>
-            <if test="personnelName != null">personnel_name = #{personnelName},</if>
+<!--            <if test="personnelId != null">personnel_id = #{personnelId},</if>-->
+<!--            <if test="personnelName != null">personnel_name = #{personnelName},</if>-->
             <if test="deviceId != null">device_id = #{deviceId},</if>
             <if test="deviceName != null">device_name = #{deviceName},</if>
             <if test="remark != null">remark = #{remark},</if>

+ 1 - 0
zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/controller/ChemicalElementTestResultsController.java

@@ -39,6 +39,7 @@ public class ChemicalElementTestResultsController extends BaseController
     @ApiOperation(value = "查询化学元素检测结果列表")
     public TableDataInfo list(ChemicalElementTestResults chemicalElementTestResults)
     {
+
         startPage();
         List<ChemicalElementTestResults> list = chemicalElementTestResultsService.selectChemicalElementTestResultsList(chemicalElementTestResults);
         return getDataTable(list);

+ 14 - 0
zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/controller/DetectionResultController.java

@@ -172,6 +172,20 @@ public class DetectionResultController extends BaseController
         return toAjax(detectionResultService.updateDetectionResult(detectionResult));
     }
 
+    /**
+     * 修改性能检测结果
+     */
+    //@PreAuthorize("@ss.hasPermi('laboratory:detectionResult:edit')")
+    @Log(title = "性能检测结果", businessType = BusinessType.UPDATE)
+    @PutMapping("/batchAudit")
+    @ApiOperation(value = "批量修改审核结果")
+    public AjaxResult batchAudit(@RequestBody DetectionResult detectionResult)
+    {
+        detectionResult.setDataApprovalStatus("1");
+        return toAjax(detectionResultService.batchAudit(detectionResult));
+//        return AjaxResult.success();
+    }
+
     /**
      * 删除性能检测结果
      */

+ 13 - 0
zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/domain/DetectionResult.java

@@ -19,6 +19,19 @@ public class DetectionResult extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
 
+    /**
+     * 批量审核id
+     */
+    private  List<String> ids;
+
+    public List<String> getIds() {
+        return ids;
+    }
+
+    public void setIds(List<String> ids) {
+        this.ids = ids;
+    }
+
     /** 主键 */
     private Long id;
 

+ 7 - 0
zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/mapper/DetectionResultMapper.java

@@ -67,4 +67,11 @@ public interface DetectionResultMapper
      * @return 结果
      */
     public int deleteDetectionResultByIds(Long[] ids);
+
+    /**
+     * 批量审核
+     * @param detectionResult
+     * @return
+     */
+    int batchAudit(DetectionResult detectionResult);
 }

+ 7 - 0
zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/service/IDetectionResultService.java

@@ -60,4 +60,11 @@ public interface IDetectionResultService
     public int deleteDetectionResultById(Long id);
 
     public DetectionResult selectDetectionResultByWtNumber(String wtNumber);
+
+    /**
+     * 批量审核
+     * @param detectionResult
+     * @return
+     */
+    int batchAudit(DetectionResult detectionResult);
 }

+ 12 - 0
zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/service/impl/DetectionResultServiceImpl.java

@@ -75,6 +75,9 @@ public class DetectionResultServiceImpl implements IDetectionResultService
         return detectionResultMapper.updateDetectionResult(detectionResult);
     }
 
+
+
+
     /**
      * 批量删除性能检测结果
      * 
@@ -103,4 +106,13 @@ public class DetectionResultServiceImpl implements IDetectionResultService
     public DetectionResult selectDetectionResultByWtNumber(String wtNumber) {
         return detectionResultMapper.selectDetectionResultByWtNumber(wtNumber);
     }
+
+    @Override
+    public int batchAudit(DetectionResult detectionResult) {
+        detectionResult.setTaskProcessKey(DateUtils.toLocalDateTimeStr(LocalDateTime.now()));//审批时间
+        detectionResult.setTaskNodeKey(SecurityUtils.getLoginUser().getUser().getNickName());//审批人
+        System.out.println(SecurityUtils.getLoginUser());//
+        detectionResult.setUpdateTime(DateUtils.getNowDate());
+        return detectionResultMapper.batchAudit(detectionResult);
+    }
 }

+ 74 - 26
zkqy-laboratory-information/src/main/resources/mapper/DetectionResultMapper.xml

@@ -206,31 +206,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateDetectionResult" parameterType="com.zkqy.laboratory.domain.DetectionResult">
         update {DBNAME}.detection_result
         <trim prefix="SET" suffixOverrides=",">
-            <if test="serialNumber != null">serial_number = #{serialNumber},</if>
-            <if test="date != null">`date` = #{date},</if>
-            <if test="lotNumber != null">lot_number = #{lotNumber},</if>
-            <if test="specification != null">specification = #{specification},</if>
-            <if test="alloyState != null">alloy_state = #{alloyState},</if>
-            <if test="manufacturer != null">manufacturer = #{manufacturer},</if>
-            <if test="tensileValueMpa != null">tensile_value_mpa = #{tensileValueMpa},</if>
-            <if test="rateOfElongation != null">rate_of_elongation = #{rateOfElongation},</if>
-            <if test="fractureDeformation != null">fracture_deformation = #{fractureDeformation},</if>
-            <if test="maximumForce != null">maximum_force = #{maximumForce},</if>
-            <if test="tensileStrengthAvg != null">tensile_strength_avg = #{tensileStrengthAvg},</if>
-            <if test="fractureForceRateAvg != null">fracture_force_rate_avg = #{fractureForceRateAvg},</if>
-            <if test="repeatSurvey != null">repeat_survey = #{repeatSurvey},</if>
-            <if test="productType != null">product_type = #{productType},</if>
-            <if test="productionDirection != null">production_direction = #{productionDirection},</if>
-            <if test="tensileValueMpaTwo != null">tensile_value_mpa_two = #{tensileValueMpaTwo},</if>
-            <if test="rateOfElongationTwo != null">rate_of_elongation_two = #{rateOfElongationTwo},</if>
-            <if test="standard != null">standard = #{standard},</if>
-            <if test="decisionResult != null">decision_result = #{decisionResult},</if>
-            <if test="lslOne != null">lsl_one = #{lslOne},</if>
-            <if test="usl != null">usl = #{usl},</if>
-            <if test="lsl2 != null">lsl2 = #{lsl2},</if>
-            <if test="inspector != null">inspector = #{inspector},</if>
-            <if test="performanceCreationTime != null">performance_creation_time = #{performanceCreationTime},</if>
-            <if test="remark != null">remark = #{remark},</if>
+<!--            <if test="serialNumber != null">serial_number = #{serialNumber},</if>-->
+<!--            <if test="date != null">`date` = #{date},</if>-->
+<!--            <if test="lotNumber != null">lot_number = #{lotNumber},</if>-->
+<!--            <if test="specification != null">specification = #{specification},</if>-->
+<!--            <if test="alloyState != null">alloy_state = #{alloyState},</if>-->
+<!--            <if test="manufacturer != null">manufacturer = #{manufacturer},</if>-->
+<!--            <if test="tensileValueMpa != null">tensile_value_mpa = #{tensileValueMpa},</if>-->
+<!--            <if test="rateOfElongation != null">rate_of_elongation = #{rateOfElongation},</if>-->
+<!--            <if test="fractureDeformation != null">fracture_deformation = #{fractureDeformation},</if>-->
+<!--            <if test="maximumForce != null">maximum_force = #{maximumForce},</if>-->
+<!--            <if test="tensileStrengthAvg != null">tensile_strength_avg = #{tensileStrengthAvg},</if>-->
+<!--            <if test="fractureForceRateAvg != null">fracture_force_rate_avg = #{fractureForceRateAvg},</if>-->
+<!--            <if test="repeatSurvey != null">repeat_survey = #{repeatSurvey},</if>-->
+<!--            <if test="productType != null">product_type = #{productType},</if>-->
+<!--            <if test="productionDirection != null">production_direction = #{productionDirection},</if>-->
+<!--            <if test="tensileValueMpaTwo != null">tensile_value_mpa_two = #{tensileValueMpaTwo},</if>-->
+<!--            <if test="rateOfElongationTwo != null">rate_of_elongation_two = #{rateOfElongationTwo},</if>-->
+<!--            <if test="standard != null">standard = #{standard},</if>-->
+<!--            <if test="decisionResult != null">decision_result = #{decisionResult},</if>-->
+<!--            <if test="lslOne != null">lsl_one = #{lslOne},</if>-->
+<!--            <if test="usl != null">usl = #{usl},</if>-->
+<!--            <if test="lsl2 != null">lsl2 = #{lsl2},</if>-->
+<!--            <if test="inspector != null">inspector = #{inspector},</if>-->
+<!--            <if test="performanceCreationTime != null">performance_creation_time = #{performanceCreationTime},</if>-->
+<!--            <if test="remark != null">remark = #{remark},</if>-->
             <if test="createById != null">create_by_id = #{createById},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
@@ -239,7 +239,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>
             <if test="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
-            <if test="processKey != null">process_key = #{processKey},</if>
+             <if test="processKey != null">process_key = #{processKey},</if>
             <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
             <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
             <if test="wtNumber != null  and wtNumber != ''">wt_number=#{wtNumber},</if>
@@ -248,6 +248,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </trim>
         where id = #{id}
     </update>
+    <update id="batchAudit" parameterType="com.zkqy.laboratory.domain.DetectionResult">
+        update {DBNAME}.detection_result
+        <trim prefix="SET" suffixOverrides=",">
+<!--            <if test="serialNumber != null">serial_number = #{serialNumber},</if>-->
+<!--            <if test="date != null">`date` = #{date},</if>-->
+<!--            <if test="lotNumber != null">lot_number = #{lotNumber},</if>-->
+<!--            <if test="specification != null">specification = #{specification},</if>-->
+<!--            <if test="alloyState != null">alloy_state = #{alloyState},</if>-->
+<!--            <if test="manufacturer != null">manufacturer = #{manufacturer},</if>-->
+<!--            <if test="tensileValueMpa != null">tensile_value_mpa = #{tensileValueMpa},</if>-->
+<!--            <if test="rateOfElongation != null">rate_of_elongation = #{rateOfElongation},</if>-->
+<!--            <if test="fractureDeformation != null">fracture_deformation = #{fractureDeformation},</if>-->
+<!--            <if test="maximumForce != null">maximum_force = #{maximumForce},</if>-->
+<!--            <if test="tensileStrengthAvg != null">tensile_strength_avg = #{tensileStrengthAvg},</if>-->
+<!--            <if test="fractureForceRateAvg != null">fracture_force_rate_avg = #{fractureForceRateAvg},</if>-->
+<!--            <if test="repeatSurvey != null">repeat_survey = #{repeatSurvey},</if>-->
+<!--            <if test="productType != null">product_type = #{productType},</if>-->
+<!--            <if test="productionDirection != null">production_direction = #{productionDirection},</if>-->
+<!--            <if test="tensileValueMpaTwo != null">tensile_value_mpa_two = #{tensileValueMpaTwo},</if>-->
+<!--            <if test="rateOfElongationTwo != null">rate_of_elongation_two = #{rateOfElongationTwo},</if>-->
+<!--            <if test="standard != null">standard = #{standard},</if>-->
+<!--            <if test="decisionResult != null">decision_result = #{decisionResult},</if>-->
+<!--            <if test="lslOne != null">lsl_one = #{lslOne},</if>-->
+<!--            <if test="usl != null">usl = #{usl},</if>-->
+<!--            <if test="lsl2 != null">lsl2 = #{lsl2},</if>-->
+<!--            <if test="inspector != null">inspector = #{inspector},</if>-->
+<!--            <if test="performanceCreationTime != null">performance_creation_time = #{performanceCreationTime},</if>-->
+<!--            <if test="remark != null">remark = #{remark},</if>-->
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
+            <if test="processKey != null">process_key = #{processKey},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+            <if test="wtNumber != null  and wtNumber != ''">wt_number=#{wtNumber},</if>
+            <if test="temperature != null  and temperature != ''">temperature=#{temperature},</if>
+            <if test="experStandard != null  and experStandard != ''">exper_standard=#{experStandard}</if>
+        </trim>
+        where wt_number in
+        <foreach item="id" collection="ids" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update >
 
     <delete id="deleteDetectionResultById" parameterType="Long">
         delete from {DBNAME}.detection_result where id = #{id}

+ 4 - 11
zkqy-ui/.env.development

@@ -8,7 +8,8 @@ ENV = 'development'
 VUE_APP_BASE_API = '/dev-api'
 
 # 图片路径
-VUE_APP_BASE_IMG_API = 'http://192.168.0.17:1024/dev-api'
+#VUE_APP_BASE_IMG_API = 'http://192.168.2.127:1024/dev-api'
+VUE_APP_BASE_IMG_API = 'http://192.168.110.83:1025/dev-api'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true
@@ -17,16 +18,8 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
 # VUE_APP_BASE_API1 = 'http://192.168.110.15:8066/'
 # VUE_APP_BASE_API1 = 'http://192.168.110.120:8066/'
 # VUE_APP_BASE_API1 = 'http://192.168.110.76:8066/'
-VUE_APP_BASE_API1 = 'http://192.168.0.17:8066/'
+#VUE_APP_BASE_API1 = 'http://192.168.2.127:8066/'
+VUE_APP_BASE_API1 = 'http://192.168.110.83:8066/'
 
 # ws地址
 VUE_APP_BASE_WS_API = '//127.0.0.1:8721'
-
-#数据引擎模块IP
-#VUE_APP_BASE_API2 = 'http://192.168.110.59:8099/'
-
-#表单引擎模块IP
-#VUE_APP_BASE_API3 = 'http://192.168.110.59:8088/'
-
-#流程引擎模块IP
-#VUE_APP_BASE_API4 = 'http://192.168.110.59:8055/'

+ 7 - 8
zkqy-ui/.env.production

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE = 化纤生产协同管理系统
+VUE_APP_TITLE = 实验室信息管理系统
 
 # 生产环境配置
 ENV = 'production'
@@ -8,20 +8,19 @@ ENV = 'production'
 VUE_APP_BASE_API = '/prod-api'
 
 # 生产环境
-VUE_APP_BASE_API1 = 'http://192.168.0.17:8066/'
+# VUE_APP_BASE_API1 = 'http://62.234.61.92:8055/'
+# VUE_APP_BASE_API1 = 'http://192.168.2.135:8066/'
 # VUE_APP_BASE_API1 = 'http://62.234.61.92:8066/'
-#VUE_APP_BASE_API1 = 'http://192.168.2.135:8066/'
-#VUE_APP_BASE_API1 = 'http://192.168.58.1:8066/'
+#VUE_APP_BASE_API1 = 'http://192.168.2.127:8066/'
+VUE_APP_BASE_API1 = 'http://192.168.128.171:8066/'
 
 
 # 图片路径
-VUE_APP_BASE_IMG_API = 'http://192.168.0.17:1024/prod-api'
+VUE_APP_BASE_IMG_API = 'http://192.168.128.171:1025/prod-api'
 
-#VUE_APP_BASE_IMG_API = 'http://192.168.58.1:1024/prod-api'
+#VUE_APP_BASE_IMG_API = 'http://62.234.61.92:1025/prod-api'
 
 # ws地址
 VUE_APP_BASE_WS_API = '//127.0.0.1:8721'
 
-VUE_APP_BASE_WS_API = '//127.0.0.1:8721'
-
 VUE_APP_BASE_IMG_API_MINIO='http://192.168.128.164:9000/xingneng'

+ 9 - 0
zkqy-ui/src/api/lims/materielInfo/detectionResult.js

@@ -43,6 +43,15 @@ export function updateDetectionResult(data) {
   })
 }
 
+//批量修改检测结果
+export function batchAudit(data) {
+  return request({
+    url: '/laboratory/detectionResult/batchAudit',
+    method: 'put',
+    data: data
+  })
+}
+
 // 删除性能检测结果
 export function delDetectionResult(id) {
   return request({

+ 9 - 0
zkqy-ui/src/api/system/user.js

@@ -17,6 +17,15 @@ export function generateEmployeeCode(query) {
     params: query
   })
 }
+
+// 查询用户列表
+export function dwj() {
+  return request({
+    url: '/system/user/abc',
+    method: 'get',
+  })
+}
+
 // 查询用户详细
 export function getUser(userId) {
   console.log(userId, "dddddd")

BIN
zkqy-ui/src/assets/images/mecos-logo1bak2.jpg


+ 3 - 3
zkqy-ui/src/views/amichi/dialogCompments/customizedVersion/components/TaskItem.vue

@@ -2,8 +2,8 @@
   <div
     :class="{
       'task-item-wrap': true,
-      'done-bg': itemData.totalQuantity==itemData.count,
-      'now-border': itemData.totalQuantity!=itemData.count,
+      'done-bg': itemData.productionOrderTotalQuantity==itemData.count,
+      'now-border': itemData.productionOrderTotalQuantity!=itemData.count,
     }"
     style="display:flex; justify-content: space-between;width: 20%"
   >
@@ -14,7 +14,7 @@
       </div>
       <div class="completedQuantity">
         <span class="mr5">任务数量:</span>
-        <span class="mr5">{{itemData.totalQuantity}}</span>
+        <span class="mr5">{{itemData.productionOrderTotalQuantity}}</span>
       </div>
       <div class="completedQuantity">
         <span class="mr5">完成数量:</span>

+ 6 - 2
zkqy-ui/src/views/amichi/dialogCompments/customizedVersion/components/taskList.vue

@@ -2,12 +2,16 @@
   <div class="task-list-wrap">
     <div class="title-list">
       <div class="title-item">
-        <span class="title-label">订单号:</span>
+        <span class="title-label">生产订单号:</span>
+        <span class="title-content">{{cardData[0].orderNumber}}</span>
+      </div>
+      <div class="title-item">
+        <span class="title-label">生产订单号:</span>
         <span class="title-content">{{orderNumber}}</span>
       </div>
       <div class="title-item">
         <span class="title-label">数量:</span>
-        <span class="title-content">{{cardData[0].totalQuantity}}</span>
+        <span class="title-content">{{cardData[0].productionOrderTotalQuantity}}</span>
       </div>
       <div class="title-item">
         <span class="title-label">开始时间:</span>

+ 1 - 2
zkqy-ui/src/views/amichi/dialogCompments/customizedVersion/processDisplay.vue

@@ -36,8 +36,7 @@
       <!--主体内容部分-->
       <div class="show-body" v-loading="loading">
         <template v-if="total > 0">
-          <TaskList v-for="(value, key,index) of tableData"
-                    :key="index + 1" :orderNumber="key"  :cardData="value"></TaskList>
+          <TaskList v-for="(value, key,index) of tableData" :key="index + 1" :orderNumber="key"  :cardData="value"></TaskList>
         </template>
         <el-empty v-else description="暂无数据"></el-empty>
         <!--分页列表-->

+ 9 - 3
zkqy-ui/src/views/amichi/planTask/salesPlan.vue

@@ -55,6 +55,7 @@
           <el-radio-button label="2">焊接</el-radio-button>
         </el-radio-group>
       </el-row>
+
       <div class="mb8 btn-wrap">
         <el-row :gutter="10" class="mb8">
           <el-col :span="1.5">
@@ -143,6 +144,7 @@
           ></right-toolbar>
         </el-row>
       </div>
+
       <el-table
         :data="tableData"
         @selection-change="handleSelectionChange"
@@ -166,11 +168,17 @@
               <el-table-column align="center"  label="型号"    prop="modelNumber" />
               <el-table-column align="center"  label="规格"    prop="specification" />
               <el-table-column align="center"  label="单位"    prop="materialUnit" />
+
               <el-table-column align="center"  label="数量(台)" >
                 <template slot-scope="scope">
                   {{ formatNumber(scope.row.quantity) }}
                 </template>
               </el-table-column>
+              <el-table-column label="状态" align="center" prop="status" >
+                <template  v-slot="scope">
+                  <dict-tag  :options="dict.type.scddzt" :value="scope.row.status"/>
+                </template>
+              </el-table-column>
               <el-table-column label="操作"   align="center" class-name="small-padding fixed-width" v-if="scopes.row.isWeldSheet!=2">
                 <template slot-scope="scope">
                   <el-dropdown @command="(command)=>{handleCommand(command, scope.row)}">
@@ -557,7 +565,7 @@ import {jdProductionOrderPull,jdProductionWeldPlanOrderPullApi, listProductionCa
 
 export default {
   name: "listInfo",
-  dicts: ["schedule_type","tczt","scheduling_state",'djlx'],
+  dicts: ["schedule_type","tczt","scheduling_state",'djlx','scddzt'],
   components: {
   },
   data() {
@@ -602,8 +610,6 @@ export default {
       // 自动排产数据  end
       QueryfromLoading: false,
       selection: [], //选中数组
-      // 遮罩层
-      loading: true,
       // 选中数组
       ids: [],
       // 非单个禁用

+ 1 - 2
zkqy-ui/src/views/amichi/print/FlowCardPrint.vue

@@ -503,11 +503,10 @@ export default {
     // console.log(this.queryParams.orderNumberList)
     this.flowCardListApi();
   },
-
 }
 
 </script>
-<style media="print">
+<style media="print" scoped>
 .bzx{
   width: 454px;
   max-height: 115px;

+ 8 - 0
zkqy-ui/src/views/amichi/procedureList/list/index.vue

@@ -74,6 +74,7 @@
 <!--      <el-table-column label="主键" align="center" prop="id" />-->
       <el-table-column label="工序编号" align="center" prop="procedureNumber" />
       <el-table-column label="工序名称" align="center" prop="procedurName" />
+      <el-table-column label="工序排序" align="center" prop="sort" />
       <el-table-column label="备注" align="center" prop="remarks" />
 
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@@ -108,6 +109,10 @@
         <el-form-item label="工序名称" prop="procedurName">
           <el-input v-model="form.procedurName" placeholder="请输入工序名称" />
         </el-form-item>
+        <el-form-item label="工序排序" prop="sort">
+          <el-input v-model="form.sort" placeholder="请输入工序排序值" />
+        </el-form-item>
+
         <el-form-item label="备注" prop="remarks">
           <el-input v-model="form.remarks" placeholder="请输入备注" />
         </el-form-item>
@@ -164,6 +169,9 @@ export default {
         procedurName: [
           { required: true, message: "工序名称不能为空", trigger: "blur" }
         ],
+        sort: [
+          { required: true, message: "工序排序值不能为空", trigger: "blur" }
+        ],
       }
     };
   },

+ 6 - 12
zkqy-ui/src/views/amichi/ringScanInformation/index.vue

@@ -9,14 +9,6 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="设备编号" prop="deviceName">
-        <el-input
-          v-model="queryParams.deviceName"
-          placeholder="请输入设备编号"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item label="扫描时间" prop="scanningTime">
         <el-date-picker clearable
                         v-model="queryParams.scanningTime"
@@ -88,15 +80,17 @@
     <el-table v-loading="loading" style="margin-top: 15px" :data="informationList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
 <!--      <el-table-column label="主键" align="center" prop="id" />-->
-      <el-table-column label="指环名称" align="center" prop="deviceNumber" />
-      <el-table-column label="指环编号" align="center" prop="deviceName" />
+      <el-table-column label="人员姓名" align="center" prop="personnelName" />
+      <el-table-column label="工序" align="center" prop="processName" />
+      <el-table-column label="工位" align="center" prop="stationName" />
+      <el-table-column label="设备名称" align="center" prop="deviceNumber" />
+      <el-table-column label="扫描内容" align="center" prop="contentInformation" />
       <el-table-column label="扫描时间" align="center" prop="scanningTime" width="180">
 <!--        <template slot-scope="scope">-->
 <!--          <span>{{ parseTime(scope.row.scanningTime, '{y}-{m}-{d}') }}</span>-->
 <!--        </template>-->
       </el-table-column>
-      <el-table-column label="扫描内容" align="center" prop="contentInformation" />
-      <el-table-column label="实际序列号" align="center" prop="nativeNumbering" />
+<!--      <el-table-column label="实际序列号" align="center" prop="nativeNumbering" />-->
       <el-table-column label="订单号" align="center" prop="orderNumber" />
       <el-table-column label="生产订单号" align="center" prop="demandDocument" />
       <el-table-column label="物料编码" align="center" prop="materialCode" />

+ 297 - 0
zkqy-ui/src/views/amichi/ringScanInformation/indexTwo.vue

@@ -0,0 +1,297 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="设备名称" prop="deviceNumber">
+        <el-input
+          v-model="queryParams.deviceNumber"
+          placeholder="请输入设备名称"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="设备编号" prop="deviceName">
+        <el-input
+          v-model="queryParams.deviceName"
+          placeholder="请输入设备编号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="扫描时间" prop="scanningTime">
+        <el-date-picker clearable
+                        v-model="queryParams.scanningTime"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        placeholder="请选择扫描时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="扫描内容" prop="contentInformation">
+        <el-input
+          v-model="queryParams.contentInformation"
+          placeholder="请输入扫描内容"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['ringScanInformation:information:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['ringScanInformation:information:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['ringScanInformation:information:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['ringScanInformation:information:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" style="margin-top: 15px" :data="informationList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+<!--      <el-table-column label="主键" align="center" prop="id" />-->
+      <el-table-column label="指环名称" align="center" prop="deviceNumber" />
+      <el-table-column label="指环编号" align="center" prop="deviceName" />
+      <el-table-column label="扫描时间" align="center" prop="scanningTime" width="180">
+<!--        <template slot-scope="scope">-->
+<!--          <span>{{ parseTime(scope.row.scanningTime, '{y}-{m}-{d}') }}</span>-->
+<!--        </template>-->
+      </el-table-column>
+      <el-table-column label="扫描内容" align="center" prop="contentInformation" />
+      <el-table-column label="实际序列号" align="center" prop="nativeNumbering" />
+      <el-table-column label="订单号" align="center" prop="orderNumber" />
+      <el-table-column label="生产订单号" align="center" prop="demandDocument" />
+      <el-table-column label="物料编码" align="center" prop="materialCode" />
+      <el-table-column label="物料名称" align="center" prop="materialName" />
+      <el-table-column label="型号" align="center" prop="model" />
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改指环王扫描日志信息对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="设备编号" prop="deviceNumber">
+          <el-input v-model="form.deviceNumber" placeholder="请输入设备编号" />
+        </el-form-item>
+        <el-form-item label="设备名称" prop="deviceName">
+          <el-input v-model="form.deviceName" placeholder="请输入设备名称" />
+        </el-form-item>
+        <el-form-item label="扫描时间" prop="scanningTime">
+          <el-date-picker clearable
+                          v-model="form.scanningTime"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          placeholder="请选择扫描时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="扫描内容" prop="contentInformation">
+          <el-input v-model="form.contentInformation" placeholder="请输入扫描内容" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listInformation, getInformation, delInformation, addInformation, updateInformation } from "@/api/amichi/ringScanInformation/index";
+
+export default {
+  name: "Information",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 指环王扫描日志信息表格数据
+      informationList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        deviceNumber: null,
+        deviceName: null,
+        scanningTime: null,
+        contentInformation: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询指环王扫描日志信息列表 */
+    getList() {
+      this.loading = true;
+      listInformation(this.queryParams).then(response => {
+        this.informationList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    //下拉菜单点击事件
+    handleCommand(command, row) {
+      switch (command) {
+        case "handleUpdate":
+          this.handleUpdate(row)
+          break;
+        case "handleDelete":
+          this.handleDelete(row)
+          break;
+        default:
+          break;
+      }
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        deviceNumber: null,
+        deviceName: null,
+        scanningTime: null,
+        contentInformation: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加指环王扫描日志信息";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getInformation(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改指环王扫描日志信息";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateInformation(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addInformation(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除指环王扫描日志信息编号为"' + ids + '"的数据项?').then(function() {
+        return delInformation(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('ringScanInformation/information/export', {
+        ...this.queryParams
+      }, `information_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 1 - 0
zkqy-ui/src/views/amichi/shopRoom/index.vue

@@ -526,6 +526,7 @@ export default {
     },
     /** 导出按钮操作 */
     handleExport() {
+
       this.download('system/materialInfo/export', {
         ...this.queryParams
       }, `materialInfo_${new Date().getTime()}.xlsx`)

+ 425 - 0
zkqy-ui/src/views/amichi/stationInformation/indexCopyV4.vue

@@ -0,0 +1,425 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
+      <el-form-item label="工位名称" prop="stationName">
+        <el-input
+          v-model="queryParams.stationName"
+          placeholder="请输入工序名称"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="工序" prop="stationType">
+        <el-select v-model="queryParams.stationType">
+          <el-option
+            v-for="(item,index) in processList"
+            :key="index"
+            :label="item.label"
+            :value="item.value"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <!--      <el-form-item label="班组名称" prop="teamName">-->
+      <!--        <el-input-->
+      <!--          v-model="queryParams.teamName"-->
+      <!--          placeholder="请输入班组名称"-->
+      <!--          clearable-->
+      <!--          @keyup.enter.native="handleQuery"-->
+      <!--        />-->
+      <!--      </el-form-item>-->
+      <el-form-item label="人员姓名" prop="personnelName">
+        <el-input
+          v-model="queryParams.personnelName"
+          placeholder="请输入人员姓名"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="设备名称" prop="deviceName">
+        <el-input
+          v-model="queryParams.deviceName"
+          placeholder="请输入设备名称"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['amichi:stationInformation:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['amichi:stationInformation:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['amichi:stationInformation:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['amichi:stationInformation:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="stationInformationList" @selection-change="handleSelectionChange" style="margin-top: 20px">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="工序"  align="center" prop="processId">
+        <template  v-slot="scope">
+           <span v-for="option in processList" :key="option.value" v-if="option.value == scope.row.processId" class="custom-label">
+                   {{ option.label }}
+           </span>
+        </template>
+      </el-table-column>
+      <el-table-column label="工位名称" align="center" prop="stationName" />
+      <el-table-column label="人员姓名" align="center" prop="personnelName"/>
+      <el-table-column label="设备mac" align="center"  prop="deviceNumber" />
+      <el-table-column label="备注" align="center" prop="remark" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-dropdown @command="(command)=>{handleCommand(command, scope.row)}">
+            <el-button type="warning">
+              操作<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item  icon="el-icon-edit"  command="handleUpdate">修改</el-dropdown-item>
+              <el-dropdown-item  icon="el-icon-delete" command="handleDelete">删除</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改工位信息对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="工位名称" prop="stationName">
+          <el-input v-model="form.stationName" placeholder="请输入工位名称" />
+        </el-form-item>
+        <el-form-item label="工位类型" prop="processId">
+          <el-select
+            v-model="form.processId"
+            size="small"
+            style="width: 680px"
+            @change="processNametSelected()"
+          >
+            <el-option
+              v-for="(item,index) in processList"
+              :key="index"
+              :label="item.label"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="人员姓名" prop="personnelId">
+          <el-select
+            v-model="form.personnelId"
+            size="small"
+            style="width: 680px"
+            @change="personnelNametSelected()"
+          >
+            <el-option
+              v-for="(item,index) in userInfo"
+              :key="index"
+              :label="item.nickName"
+              :value="item.userId"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+<!--        <el-form-item label="设备名称" prop="deviceName">-->
+<!--          <el-input v-model="form.deviceName" placeholder="请输入设备名称" />-->
+<!--        </el-form-item>-->
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" placeholder="请输入备注" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- print -->
+    <div id="printDom" style="width: 160px; height: 160px"></div>
+  </div>
+</template>
+
+<script>
+import { listStationInformation, getStationInformation, delStationInformation, addStationInformation, updateStationInformation } from "@/api/amichi/stationInformation/stationInformation";
+import qrCodeList from "@/views/amichi/print/qrCodeList";
+import {listUserInformation} from  "@/api/amichi/user/user"
+import {listList} from "@/api/amichi/procedureList/list";
+export default {
+  name: "StationInformation",
+  dicts:["gxlxinfo"],
+  data() {
+    return {
+      //工序列表
+      processList:[],
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 工位信息表格数据
+      stationInformationList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        stationCode: null,
+        stationName: null,
+        personnelId: null,
+        personnelName: null,
+        deviceId: null,
+        deviceName: null,
+        createById: null,
+        updateById: null,
+        dataApprovalStatus: null,
+        processKey: null,
+        taskProcessKey: null,
+        taskNodeKey: null,
+        teamName:null
+      },
+      userInfo:[],
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.processListApi();
+    this.getListUserInformation();
+    this.getList();
+  },
+  methods: {
+    processNametSelected(){
+      let obj = this.processList.find(item=>item.value==this.form.processId);
+      console.log(obj,"dddd");
+      this.form.processName=obj.label;
+      console.log(this.form);
+    },
+    personnelNametSelected(){
+      let obj = this.userInfo.find(item=>item.userId==this.form.personnelId);
+      this.form.personnelName=obj.nickName;
+    },
+    getListUserInformation(){
+      listUserInformation().then(resp=>{
+        this.userInfo=resp.rows.filter(item=>item.userName!="fjqyAdmin");
+        console.log(this.userInfo);
+      })
+    },
+    //下拉菜单点击事件
+    handleCommand(command, row) {
+      switch (command) {
+        case "handleUpdate":
+          this.handleUpdate(row)
+          break;
+        case "handleDelete":
+          this.handleDelete(row)
+          break;
+        case "printStationCode":
+          this.printStationCode(row)
+          break;
+        default:
+          break;
+      }
+    },
+    //打印逻辑方法
+    printStationCode(row){
+      console.log("打印工位码信息")
+      console.log(row)
+      let codeString = "scan@&"+row.stationCode;
+      let allPringtData = [];
+      //添加内容
+      allPringtData.push({
+        codeData: codeString,
+        showMsg: [
+          { label: "工位码", value: row.stationCode },
+        ],
+      });
+      qrCodeList(allPringtData, "printDom");
+    },
+    /** 查询工位信息列表 */
+    getList() {
+      this.loading = true;
+      listStationInformation(this.queryParams).then(response => {
+        this.stationInformationList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        stationCode: null,
+        stationName: null,
+        personnelId: null,
+        personnelName: null,
+        deviceId: null,
+        deviceName: null,
+        remark: null,
+        createById: null,
+        createBy: null,
+        createTime: null,
+        updateById: null,
+        updateBy: null,
+        updateTime: null,
+        delFlag: null,
+        dataApprovalStatus: null,
+        processKey: null,
+        taskProcessKey: null,
+        taskNodeKey: null
+      };
+      this.resetForm("form");
+    },
+    /**
+     * 查询工序列表
+     */
+    processListApi(){
+      this.processList=[];
+      listList({"isEnablePaging":false}).then(response => {
+        let newData=response.rows.map(item=>{
+          return {"value":item.id,"label":item.procedurName}
+        })
+        this.processList=newData;
+        console.log(this.processList)
+      });
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.getListUserInformation();
+      this.processListApi();
+      this.open = true;
+      this.title = "添加工位信息";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      this.getListUserInformation();
+      this.processListApi();
+      const id = row.id || this.ids
+      getStationInformation(id).then(response => {
+        this.form = response.data;
+        this.form.personnelId=parseInt(response.data.personnelId);
+        this.form.processId=parseInt(response.data.processId);
+        // this.form.stationType=parseInt(response.data.stationType);
+        this.open = true;
+        this.title = "修改工位信息";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateStationInformation(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addStationInformation(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除工位信息编号为"' + ids + '"的数据项?').then(function() {
+        return delStationInformation(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('amichi/stationInformation/export', {
+        ...this.queryParams
+      }, `stationInformation_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 26 - 1
zkqy-ui/src/views/amichi/system/user/index.vue

@@ -162,6 +162,17 @@
               v-hasPermi="['system:user:export']"
               >导出
             </el-button>
+            <el-button
+              v-if="selection.length == 0"
+              type="warning"
+              plain
+              icon="el-icon-download"
+              size="mini"
+              @click="dwjExport"
+              v-hasPermi="['system:user:export']"
+            >生成二维码文件夹
+            </el-button>
+
             <ExcelDownLoad
               v-else
               :headerList="headerList"
@@ -185,7 +196,7 @@
         >
           <el-table-column type="selection" width="50" align="center" />
           <el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible"/>
-          <el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true"/>
+          <el-table-column label="登录账号" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true"/>
 
           <el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true"/>
           <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true"
@@ -498,6 +509,7 @@ import {
   changeUserStatus,
   deptTreeSelect,
   generateEmployeeCode,
+  dwj,
 } from "@/api/system/user";
 
 import { getToken } from "@/utils/auth";
@@ -700,6 +712,15 @@ export default {
     },
   },
   methods: {
+    dwjExport(){
+      console.log("导出文件夹")
+      dwj().then((res) => {
+        console.log(res);
+        if (res.code == 200) {
+          this.$modal.msgSuccess("导出成功");
+        }
+      });
+    },
     printEmployeeCode(row){
       console.log("成成")
       this.employeeNumber=row.userId;
@@ -935,6 +956,10 @@ export default {
     },
     /** 导出按钮操作 */
     handleExport() {
+      if( this.ids!=null){
+        this.$modal.msgWarning("请先勾选数据条目");
+        return;
+      }
       this.download(
         "system/user/export",
         {

+ 44 - 11
zkqy-ui/src/views/lims/detectionResult/detectionDetection.vue

@@ -85,12 +85,24 @@
           v-hasPermi="['lims:ypjc:jcgc:scfj']"
         >附件上传</el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-check"
+          size="mini"
+          @click="batchAudit"
+          v-if="queryParams.tabPosition==0"
+          v-hasPermi="['lims:ypjc:jcgc:scfjplsp']"
+        >批量审核</el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <!-- 表格start -->
     <selsetHeader style="margin-top: 20px"  :options="tableHeadData.slice(1, tableHeadData.length -1 )" @change="cascaderChangeFun"></selsetHeader>
     <el-table v-loading="loading"  style="margin-top:20px" ref="tableTree" :data="detectionResultList" @selection-change="handleSelectionChange">
+      <el-table-column align="center" type="selection" width="50" ></el-table-column>
       <el-table-column :prop="tableHeadData[0].value"  :label="tableHeadData[0].label" align="center" width="180"></el-table-column>
       <el-table-column v-for="(item, index) in optionsData" :key="index" :prop="item.value" :label="item.label" align="center">
         <template  v-slot="scope"  v-if="item.label=='审核状态'">
@@ -104,8 +116,6 @@
               操作<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
             <el-dropdown-menu slot="dropdown">
-<!--              <el-dropdown-item  icon="el-icon-edit"  command="handleUpdate">修改</el-dropdown-item>-->
-<!--              <el-dropdown-item  icon="el-icon-delete" command="handleDelete">删除</el-dropdown-item>-->
               <el-dropdown-item  icon="el-icon-edit" v-hasPermi="['lims:ypjc:jcgc:ckfj']"    command="catbg">报告预览</el-dropdown-item>
               <el-dropdown-item  icon="el-icon-edit" v-hasPermi="['lims:ypjc:jcgc:ckfj']"  v-if="scope.row.dataApprovalStatus==0"  command="bgsh">报告审核</el-dropdown-item>
             </el-dropdown-menu>
@@ -254,7 +264,14 @@
 </template>
 
 <script>
-import { listDetectionResult, getDetectionResult, delDetectionResult, addDetectionResult, updateDetectionResult } from "@/api/lims/materielInfo/detectionResult";
+import {
+  listDetectionResult,
+  getDetectionResult,
+  delDetectionResult,
+  addDetectionResult,
+  updateDetectionResult,
+  batchAudit
+} from "@/api/lims/materielInfo/detectionResult";
 import selsetHeader from "@/views/amichi/materiel/components/selsetHeader.vue";
 import {getToken} from "@/utils/auth";
 // 引入
@@ -425,6 +442,7 @@ export default {
     this.getList();
   },
   methods: {
+
     tabHandleClick(){
       console.log("tab选项切换")
       this.getList();
@@ -623,10 +641,24 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
+      this.ids = selection.map(item => item.wtNumber)
       this.single = selection.length!==1
       this.multiple = !selection.length
     },
+    batchAudit(){
+      if(this.ids.length<=0){
+        return;
+      }
+      console.log("批量审核");
+      console.log(this.ids);
+      let nr={"ids":this.ids}
+      this.$modal.confirm('是否审核性能检测结果编号为"' + this.ids + '"的数据项?').then(function() {
+        return batchAudit(JSON.stringify(nr));
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("审核成功");
+      }).catch(() => {});
+    },
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
@@ -684,13 +716,14 @@ export default {
 
     },
     shSubmitForm(){
-      updateDetectionResult(this.shForm).then(resp=>{
-        if(resp.code==200){
-          this.sHOpen = false;
-          this.getList();
-          this.$modal.msgSuccess("审批成功");
-        }
-      })
+      console.log(this.shForm,'hmc');
+      // updateDetectionResult(this.shForm).then(resp=>{
+      //   if(resp.code==200){
+      //     this.sHOpen = false;
+      //     this.getList();
+      //     this.$modal.msgSuccess("审批成功");
+      //   }
+      // })
     },
     /** 删除按钮操作 */
     handleDelete(row) {

+ 4 - 3
zkqy-ui/src/views/login.vue

@@ -307,11 +307,12 @@ export default {
             Cookies.remove("rememberMe");
           }
           let form = {
-               uri: "?client_id=hmc&scope=basic&response_type=code&state=AB1357&redirect_uri=http://192.168.2.127:8066/oauth/callback",
-               //uri:"?client_id=mestools&scope=basic&response_type=code&state=AB1357&redirect_uri=http://192.168.128.171:8066/oauth/callback",
+               //uri: "?client_id=hmc&scope=basic&response_type=code&state=AB1357&redirect_uri=http://192.168.2.127:8066/oauth/callback",
+               // uri:"?client_id=mestools&scope=basic&response_type=code&state=AB1357&redirect_uri=http://62.234.61.92:8055/oauth/callback",
+               // uri:"?client_id=mestools&scope=basic&response_type=code&state=AB1357&redirect_uri=http://192.168.128.171:8066/oauth/callback",
               // uri:"?client_id=mestools&scope=basic&response_type=code&state=AB1357&redirect_uri=http://192.168.2.135:8066/oauth/callback",
              //uri:"?client_id=hmc&scope=basic&response_type=code&state=AB1357&redirect_uri=http://192.168.110.85:8066/oauth/callback",
-             // uri:"?client_id=hmc&scope=basic&response_type=code&state=AB1357&redirect_uri=http://192.168.110.83:8066/oauth/callback",
+             uri:"?client_id=hmc&scope=basic&response_type=code&state=AB1357&redirect_uri=http://192.168.110.83:8066/oauth/callback",
             // uri:"?client_id=hmc&scope=basic&response_type=code&state=AB1357&redirect_uri=http://172.20.10.5:8066/oauth/callback",
             //   uri:"?client_id=mestools&scope=basic&response_type=code&state=AB1357&redirect_uri=http://192.168.0.17:8066/oauth/callback",
             ...this.loginForm,

+ 6 - 3
zkqy-ui/vue.config.js

@@ -8,7 +8,7 @@ const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
 
 const CompressionPlugin = require('compression-webpack-plugin')
 // Lims实验室信息管理系统
-const name = process.env.VUE_APP_TITLE || '铨一生产协同管理系统' // 网页标题
+const name = process.env.VUE_APP_TITLE || '实验室信息管理系统' // 网页标题
 
 const port = process.env.port || process.env.npm_config_port || 1025 // 端口
 const isDev = process.env.NODE_ENV !== "production";
@@ -39,11 +39,14 @@ module.exports = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
          // target: `http://172.20.10.5:8066`,
-        // target: `http://192.168.110.83:8066`,
+        target: `http://192.168.110.83:8066`,
         // target: `http://192.168.128.171:8066`,
         // target: `http://192.168.2.135:8066`, //铨一开发
-        target: `http://192.168.2.127:8066`,
+        // target: `http://192.168.2.127:8066`,
+        // target: `http://62.234.61.92:8055`,
         //  target: `http://192.168.2.127:8066`,
+        //  target: `http://192.168.128.171:8066`,
+
         // target: `http://192.168.0.17:8066`,
         changeOrigin: true,
         pathRewrite: {