Browse Source

Merge remote-tracking branch 'origin/master'

阿赫 7 tháng trước cách đây
mục cha
commit
9a24d24dda
71 tập tin đã thay đổi với 2596 bổ sung424 xóa
  1. BIN
      lib/DmJdbcDriver18.jar
  2. 3 2
      zkqy-admin/src/main/java/com/zkqy/web/controller/system/SysLoginController.java
  3. 3 1
      zkqy-admin/src/main/resources/application.yml
  4. 66 0
      zkqy-admin/src/main/resources/bf1/application-druid.yml
  5. 203 0
      zkqy-admin/src/main/resources/bf1/application.yml
  6. 66 0
      zkqy-admin/src/main/resources/bf2/application-druid.yml
  7. 208 0
      zkqy-admin/src/main/resources/bf2/application.yml
  8. 2 4
      zkqy-custom-business/src/main/resources/mapper/business/SaleProductsMapper.xml
  9. 1 1
      zkqy-framework/src/main/java/com/zkqy/framework/config/SecurityConfig.java
  10. 43 8
      zkqy-framework/src/main/java/com/zkqy/framework/sso_oauth2/controller/ThirdPartLoginController.java
  11. 14 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/PlanTaskDetailsController.java
  12. 3 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ProductionPlanningManagementController.java
  13. 2 2
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/StationInformationController.java
  14. 22 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/PlanTaskDetails.java
  15. 22 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/ProductionPlanningManagement.java
  16. 57 17
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/PlanTaskDetailsVo.java
  17. 14 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/ProductionPlanningManagementVo.java
  18. 20 1
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/jd/controller/JdMaterialInfoController.java
  19. 8 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/jd/controller/JdProductionOrderController.java
  20. 1 1
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/jd/domain/JdMaterialBaseInfoVo.java
  21. 1 1
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/jd/domain/JdMaterialInfoVo.java
  22. 80 15
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/jd/domain/JdProductionOrder.java
  23. 5 1
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/jd/service/JdMaterialInfoService.java
  24. 5 2
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/jd/service/JdProductionOrderService.java
  25. 75 8
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/jd/service/impl/JdMaterialInfoServiceImpl.java
  26. 356 101
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/jd/service/impl/JdProductionOrderServiceImpl.java
  27. 7 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/MaterialBaseInfoMapper.java
  28. 2 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/MaterialInfoMapper.java
  29. 7 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/PlanTaskDetailsMapper.java
  30. 5 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/ProductionPlanningManagementMapper.java
  31. 7 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/RingScanInformationMapper.java
  32. 9 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IPlanTaskDetailsService.java
  33. 6 1
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/PlanTaskDetailsServiceImpl.java
  34. 35 1
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/StationInformationServiceImpl.java
  35. 1 1
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/utils/MaUtils.java
  36. 23 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/utils/aa.java
  37. 130 104
      zkqy-fujian-amichi/src/main/resources/mapper/MaterialBaseInfoMapper.xml
  38. 4 0
      zkqy-fujian-amichi/src/main/resources/mapper/MaterialInfoMapper.xml
  39. 38 0
      zkqy-fujian-amichi/src/main/resources/mapper/PlanTaskDetailsMapper.xml
  40. 12 5
      zkqy-fujian-amichi/src/main/resources/mapper/ProductionPlanningManagementMapper.xml
  41. 13 0
      zkqy-fujian-amichi/src/main/resources/mapper/RingScanInformationMapper.xml
  42. 9 0
      zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/controller/DetectionResultController.java
  43. 5 0
      zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/controller/EntrustedInformationController.java
  44. 24 0
      zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/domain/DetectionResult.java
  45. 7 0
      zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/mapper/DetectionResultMapper.java
  46. 2 0
      zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/service/IDetectionResultService.java
  47. 5 0
      zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/service/impl/DetectionResultServiceImpl.java
  48. 2 3
      zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/service/impl/LaboratorySampleCollectionServiceImpl.java
  49. 19 1
      zkqy-laboratory-information/src/main/resources/mapper/DetectionResultMapper.xml
  50. 8 3
      zkqy-laboratory-information/src/main/resources/mapper/EntrustedInformationMapper.xml
  51. 28 0
      zkqy-ui/application.properties
  52. 11 0
      zkqy-ui/src/api/amichi/materiel/materialInfo.js
  53. 8 0
      zkqy-ui/src/api/amichi/planTask/planTaskDetails.js
  54. 11 1
      zkqy-ui/src/api/amichi/productionCardFlow/productionCardFlow.js
  55. 8 0
      zkqy-ui/src/api/lims/materielInfo/detectionResult.js
  56. 2 2
      zkqy-ui/src/api/login.js
  57. BIN
      zkqy-ui/src/assets/qy/7477781c76b6b2e1466f46d53bee05b.png
  58. 7 0
      zkqy-ui/src/router/index.js
  59. 4 3
      zkqy-ui/src/views/adminLogin.vue
  60. 23 2
      zkqy-ui/src/views/amichi/materialInfo/index.vue
  61. 95 18
      zkqy-ui/src/views/amichi/planTask/salesPlan.vue
  62. 81 59
      zkqy-ui/src/views/amichi/print/FlowCardPrint.vue
  63. 291 0
      zkqy-ui/src/views/amichi/print/FlowWeldCardPrint.vue
  64. 291 0
      zkqy-ui/src/views/amichi/print/FlowWeldCardPrint2.vue
  65. 26 13
      zkqy-ui/src/views/lims/detectionResult/detectionDetection.vue
  66. 27 27
      zkqy-ui/src/views/lims/detectionResult/detectionProcess.vue
  67. 11 5
      zkqy-ui/src/views/lims/report/detectionDetectionReport.vue
  68. 2 2
      zkqy-ui/src/views/lims/wtform/wtFormIndex.vue
  69. 3 3
      zkqy-ui/src/views/login.vue
  70. 3 1
      zkqy-ui/src/views/pageTransferPage.vue
  71. 4 4
      zkqy-ui/vue.config.js

BIN
lib/DmJdbcDriver18.jar


+ 3 - 2
zkqy-admin/src/main/java/com/zkqy/web/controller/system/SysLoginController.java

@@ -201,13 +201,14 @@ public class SysLoginController {
 
 
     @GetMapping("/lims/Login/")
-    public AjaxResult LimsOauth2Login(@RequestParam("userName") String userName) {
+    public AjaxResult LimsOauth2Login(@RequestParam("userName") String userName,
+                                      @RequestParam(value = "tenantId", required = false, defaultValue = "213") String tenantId) {
         //本身参数就为空
         if (StringUtils.isEmpty(userName)) {
             return AjaxResult.error("用户名不能为空");
         }
         //处理租户拼接问题(buffer线程安全)
-        StringBuffer tenantIdStringBuffer=new StringBuffer("213");
+        StringBuffer tenantIdStringBuffer=new StringBuffer(tenantId);
         tenantIdStringBuffer.append("¥¥¥");
         tenantIdStringBuffer.append(userName);
         //根据用户名查询,lims租户下的用户信息

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

@@ -198,4 +198,6 @@ OpenAuthorization2:
     # 重定向本系统主机地址
     REDIRECT_URL: http://192.168.2.127:1025
     # 回调地址
-    CALLBACK: http://192.168.2.127:8066/oauth/callback
+    CALLBACK: http://192.168.2.127:8066/oauth/callback
+    #
+    NAME: hmc

+ 66 - 0
zkqy-admin/src/main/resources/bf1/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/bf1/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: 10
+    # 密码
+    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

+ 66 - 0
zkqy-admin/src/main/resources/bf2/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:3307/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

+ 208 - 0
zkqy-admin/src/main/resources/bf2/application.yml

@@ -0,0 +1,208 @@
+# 项目相关配置
+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: 192.168.110.15
+    #host: 121.37.234.37
+    #
+    host: 127.0.0.1
+    # 端口,默认为6379
+    port: 6479
+    # 数据库索引
+    database: 10
+    # 密码
+    password:
+    #password: zkqy@8888888
+#    password: 123456
+    # 连接超时时间
+    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.135:8066/oauth2
+    # 系统标识
+    BASIC: mes
+    # 重定向本系统主机地址
+    REDIRECT_URL: http://192.168.2.135:1025
+    # 回调地址
+    CALLBACK: http://192.168.2.135:8066/oauth/callback
+    #
+    NAME: mestools

+ 2 - 4
zkqy-custom-business/src/main/resources/mapper/business/SaleProductsMapper.xml

@@ -493,7 +493,6 @@
                  LEFT JOIN {DBNAME}.sale_products sp
         ON sp.sale_order_no = a.sale_order_no  AND sp.`level` = a.levels
             AND sp.product_no = a.productCode and sp.del_flag = '0'
-
     </select>
 
     <select id="selectSaleProductsInfo3" resultType="com.zkqy.business.domain.vo.ProductInvoiceVO$SaleProductInfo">
@@ -530,7 +529,6 @@
                  LEFT JOIN {DBNAME}.sale_products sp
         ON sp.sale_order_no = a.sale_order_no  AND sp.`level` = a.levels
             AND sp.product_no = a.productCode and sp.del_flag = '0'
-
     </select>
 
     <select id="selectOutboundOrderInfo" resultType="com.zkqy.business.domain.vo.SaleProductsVo">
@@ -548,9 +546,9 @@
           AND p.del_flag = '0'
           and sp.sale_order_no = #{saleOrderNo}
     </select>
+
     <select id="selectSaleProductsListAndCustomInfoThread"
             resultType="com.zkqy.business.domain.vo.SaleProductsVo">
-
         SELECT
         sp.*,cs.custom_name,m.materie_encoding,m.materie_color_number,pd.product_specifications
         FROM
@@ -668,7 +666,7 @@
             <if test="saleOrderNo != null">and sale_order_no = #{saleOrderNo}</if>
             <if test="productNo != null">and product_no = #{productNo}</if>
             <if test="colours != null"> and colours = #{colours}</if>
-            and product_number = 0.00
+            <if test="id !=null and id!=''">and id=#{id}</if>
         </where>
     </update>
 

+ 1 - 1
zkqy-framework/src/main/java/com/zkqy/framework/config/SecurityConfig.java

@@ -115,7 +115,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
                 // 单点授权
                 .antMatchers("/oauth2/**", "/Oauth2Login/**", "/oauth/callback", "/authorize").permitAll()
                 //模拟登录授权
-                .antMatchers("/pageTransfer","/lims/Login/").permitAll()
+                .antMatchers("/pageTransfer","/lims/Login/","pageTransferTo").permitAll()
 
                 // 除上面外的所有请求全部需要鉴权认证
                 .anyRequest().authenticated()

+ 43 - 8
zkqy-framework/src/main/java/com/zkqy/framework/sso_oauth2/controller/ThirdPartLoginController.java

@@ -46,8 +46,8 @@ public class ThirdPartLoginController {
     @Value("${OpenAuthorization2.MES.CALLBACK}")
     private String CALLBACK;
 
-//    @Value("${OpenAuthorization2.MES.NAME}")
-//    private String name;
+    @Value("${OpenAuthorization2.MES.NAME}")
+    private String name;
 
     @GetMapping("oauth/callback")
     public String callback(@RequestParam("code") String code, HttpSession session, HttpServletRequest request) {
@@ -57,13 +57,13 @@ public class ThirdPartLoginController {
             map.put("grant_type", "authorization_code");
             map.put("redirect_uri", CALLBACK);
             map.put("code", code);
-            map.put("client_id", "mestools");
+//            map.put("client_id", "mestools");
 //            map.put("client_id", "hmc");
-//            if(name.equals("")&&name!=
-//            null){
-//                map.put("client_id", "mestools");
-//            }else {
-//            }
+            if(StringUtils.isNotNull(name)&&!name.equals("")){
+                map.put("client_id", name);
+            }else {
+                map.put("client_id","mestools");
+            }
             map.put("client_secret", "zkqy8888");
             // 获取token请求头
             Map<String, String> headers = new HashMap<>();
@@ -170,5 +170,40 @@ public class ThirdPartLoginController {
         return "redirect:" + REDIRECT_URL + "/pageTransferPage?userInfo="+encodeUserInfo;
     }
 
+
+
+    /**
+     * 空白页跳转
+     * @return
+     */
+    @GetMapping("/pageTransferTo")
+    @Anonymous
+    public String jointlyCallback(@RequestParam("userName") String userName,@RequestParam("tenantId") String tenantId) {
+        //本身参数就为空
+        if (StringUtils.isEmpty(userName)) {
+            // 授权失败处理
+            return "redirect:" + REDIRECT_URL + "/401";
+        }
+        //处理租户拼接问题(buffer线程安全)
+        StringBuffer tenantIdStringBuffer=new StringBuffer(tenantId);
+        tenantIdStringBuffer.append("¥¥¥");
+        tenantIdStringBuffer.append(userName);
+        //根据用户名查询,lims租户下的用户信息
+        SysUser sysUser = userService.selectUserByUserName(tenantIdStringBuffer.toString());
+        //当前系统中不存在此用户名
+        if (!Optional.ofNullable(sysUser).isPresent()) {
+            // 授权失败处理
+            return "redirect:" + REDIRECT_URL + "/401";
+        }
+        StringBuffer returnTenantInfoBufferString=new StringBuffer(tenantId);
+        returnTenantInfoBufferString.append("#");
+        returnTenantInfoBufferString.append(sysUser.getTenant().getTenantCode());
+        returnTenantInfoBufferString.append("#");
+        returnTenantInfoBufferString.append(userName);
+        System.out.println(returnTenantInfoBufferString);
+        String encodeUserInfo = Base64.getEncoder().encodeToString(returnTenantInfoBufferString.toString().getBytes());
+        // 生成令牌(参数1:租户code 参数二:租户用户名称)
+        return "redirect:" + REDIRECT_URL + "/pageTransferPage?userInfo="+encodeUserInfo;
+    }
 }
 

+ 14 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/PlanTaskDetailsController.java

@@ -18,6 +18,7 @@ import cn.hutool.extra.qrcode.QrConfig;
 import com.github.pagehelper.PageInfo;
 import com.zkqy.amichi.domain.PlanTaskDetails;
 import com.zkqy.amichi.domain.vo.PlanTaskDetailsListAndFlowCardDataVo;
+import com.zkqy.amichi.domain.vo.PlanTaskDetailsVo;
 import com.zkqy.amichi.utils.MaUtils;
 import com.zkqy.common.annotation.Anonymous;
 import com.zkqy.common.constant.HttpStatus;
@@ -107,6 +108,19 @@ public class PlanTaskDetailsController extends BaseController
         return getDataTable(list);
     }
 
+
+    @GetMapping("/flowWeldCardList")
+    @Anonymous
+    @ApiOperation(value = "查询生产任务单明细列表")
+    public TableDataInfo flowWeldCardList(PlanTaskDetailsListAndFlowCardDataVo planTaskDetailsListAndFlowCardDataVo)
+    {
+        startPage();
+        List<PlanTaskDetailsVo> list = planTaskDetailsService.selectPlanTaskDetailsListByOrderNumber(planTaskDetailsListAndFlowCardDataVo.getOrderNumber());
+
+        return getDataTable(list);
+    }
+
+
     public static Map<String, List<PlanTaskDetailsListAndFlowCardDataVo>> convertToListOfLists(List<PlanTaskDetailsListAndFlowCardDataVo> list) {
         return IntStream.range(0, (list.size() + 1) / 2)
                 .boxed()

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

@@ -1,5 +1,6 @@
 package com.zkqy.amichi.controller;
 
+import java.time.LocalDateTime;
 import java.util.List;
 import java.util.stream.Collectors;
 import javax.servlet.http.HttpServletResponse;
@@ -10,6 +11,8 @@ import com.zkqy.amichi.domain.ProductionPlanningManagement;
 import com.zkqy.amichi.domain.vo.ProductionPlanningManagementVo;
 import com.zkqy.amichi.mapper.PlanTaskDetailsMapper;
 import com.zkqy.common.constant.HttpStatus;
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.common.utils.StringUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.security.access.prepost.PreAuthorize;

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

@@ -73,11 +73,11 @@ public class StationInformationController extends BaseController
     }
 
     /**
-     * 扫描工位信息
+     * 指环扫描产品信息
      */
     @Anonymous
     @PostMapping("/stationProductScanningRing")
-    @ApiOperation(value = "指环扫描工位信息")
+    @ApiOperation(value = "指环扫描产品信息")
     public String stationProductScanningRing(StationProductScanningRingVo stationProductScanningRingVo)
     {
         return stationInformationService.stationProductScanningRing(stationProductScanningRingVo);

+ 22 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/PlanTaskDetails.java

@@ -142,6 +142,28 @@ public class PlanTaskDetails extends BaseEntity
     @Excel(name = "包装箱")
     private String switchBox;
 
+    @Excel(name = "计划开工")
+    private String scheduledCommencement;
+
+    @Excel(name = "计划完工")
+    private String scheduledCompletion;
+
+    public String getScheduledCommencement() {
+        return scheduledCommencement;
+    }
+
+    public void setScheduledCommencement(String scheduledCommencement) {
+        this.scheduledCommencement = scheduledCommencement;
+    }
+
+    public String getScheduledCompletion() {
+        return scheduledCompletion;
+    }
+
+    public void setScheduledCompletion(String scheduledCompletion) {
+        this.scheduledCompletion = scheduledCompletion;
+    }
+
     public String getSwitchBox() {
         return switchBox;
     }

+ 22 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/ProductionPlanningManagement.java

@@ -53,6 +53,7 @@ public class ProductionPlanningManagement extends BaseEntity
 
     /** 完成时间 */
     @Excel(name = "完成时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private String completionTime;
 
     /** 投产状态(0:已投产 1:未投产) */
@@ -125,6 +126,27 @@ public class ProductionPlanningManagement extends BaseEntity
     @Excel(name="特殊要求")
     private  String specialRequirements;
 
+    //tab选项卡切换类型
+    private  String  tabPosition;
+    @Excel(name="是否是焊接单 1:普通单 2焊接单")
+    private  String  isWeldSheet;
+
+    public String getIsWeldSheet() {
+        return isWeldSheet;
+    }
+
+    public void setIsWeldSheet(String isWeldSheet) {
+        this.isWeldSheet = isWeldSheet;
+    }
+
+    public String getTabPosition() {
+        return tabPosition;
+    }
+
+    public void setTabPosition(String tabPosition) {
+        this.tabPosition = tabPosition;
+    }
+
     public String getSpecialRequirements() {
         return specialRequirements;
     }

+ 57 - 17
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/PlanTaskDetailsVo.java

@@ -16,13 +16,9 @@ public class PlanTaskDetailsVo extends BaseEntity {
     @Excel(name = "需求单据")
     private  String  demandDocument;
 
-    public String getDemandDocument() {
-        return demandDocument;
-    }
+    @Excel(name = "完成时间")
+    private String completionTime;
 
-    public void setDemandDocument(String demandDocument) {
-        this.demandDocument = demandDocument;
-    }
 
     /** 计划id */
     @Excel(name = "计划id")
@@ -48,8 +44,6 @@ public class PlanTaskDetailsVo extends BaseEntity {
     @Excel(name = "数量")
     private String quantity;
 
-
-
     /** 创建者id */
     @Excel(name = "创建者id")
     private Long createById;
@@ -81,6 +75,10 @@ public class PlanTaskDetailsVo extends BaseEntity {
     @Excel(name = "任务单id关联字段1013记录当前字段废弃了没用")
     private String taskId;
 
+
+    @Excel(name = "订单号")
+    private  String orderNumber;
+
     private String sparea;
     private String spareb;
     private String sparec;
@@ -101,6 +99,22 @@ public class PlanTaskDetailsVo extends BaseEntity {
         this.materialId = materialId;
     }
 
+    public String getDemandDocument() {
+        return demandDocument;
+    }
+
+    public void setDemandDocument(String demandDocument) {
+        this.demandDocument = demandDocument;
+    }
+
+    public String getCompletionTime() {
+        return completionTime;
+    }
+
+    public void setCompletionTime(String completionTime) {
+        this.completionTime = completionTime;
+    }
+
     public Long getPlanId() {
         return planId;
     }
@@ -217,6 +231,14 @@ public class PlanTaskDetailsVo extends BaseEntity {
         this.taskId = taskId;
     }
 
+    public String getOrderNumber() {
+        return orderNumber;
+    }
+
+    public void setOrderNumber(String orderNumber) {
+        this.orderNumber = orderNumber;
+    }
+
     public String getSparea() {
         return sparea;
     }
@@ -241,14 +263,32 @@ public class PlanTaskDetailsVo extends BaseEntity {
         this.sparec = sparec;
     }
 
-    public String getOrderNumber() {
-        return orderNumber;
-    }
-
-    public void setOrderNumber(String orderNumber) {
-        this.orderNumber = orderNumber;
+    @Override
+    public String toString() {
+        final StringBuffer sb = new StringBuffer("PlanTaskDetailsVo{");
+        sb.append("id=").append(id);
+        sb.append(", materialId='").append(materialId).append('\'');
+        sb.append(", demandDocument='").append(demandDocument).append('\'');
+        sb.append(", completionTime='").append(completionTime).append('\'');
+        sb.append(", planId=").append(planId);
+        sb.append(", materialName='").append(materialName).append('\'');
+        sb.append(", modelNumber='").append(modelNumber).append('\'');
+        sb.append(", specification='").append(specification).append('\'');
+        sb.append(", materialUnit='").append(materialUnit).append('\'');
+        sb.append(", quantity='").append(quantity).append('\'');
+        sb.append(", createById=").append(createById);
+        sb.append(", updateById=").append(updateById);
+        sb.append(", delFlag='").append(delFlag).append('\'');
+        sb.append(", dataApprovalStatus='").append(dataApprovalStatus).append('\'');
+        sb.append(", processKey='").append(processKey).append('\'');
+        sb.append(", taskProcessKey='").append(taskProcessKey).append('\'');
+        sb.append(", taskNodeKey='").append(taskNodeKey).append('\'');
+        sb.append(", taskId='").append(taskId).append('\'');
+        sb.append(", orderNumber='").append(orderNumber).append('\'');
+        sb.append(", sparea='").append(sparea).append('\'');
+        sb.append(", spareb='").append(spareb).append('\'');
+        sb.append(", sparec='").append(sparec).append('\'');
+        sb.append('}');
+        return sb.toString();
     }
-
-    private  String orderNumber;
-
 }

+ 14 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/ProductionPlanningManagementVo.java

@@ -76,6 +76,7 @@ public class ProductionPlanningManagementVo extends ProductionPlanningManagement
 
     /** 完成时间 */
     @Excel(name = "完成时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private String completiontime;
 
     /** 制单人 */
@@ -94,6 +95,19 @@ public class ProductionPlanningManagementVo extends ProductionPlanningManagement
     @Excel(name = "状态")
     private String state;
 
+    @Excel(name = "单据创建时间")
+    private  String creationtimeString;
+
+    @Override
+    public String getCreationtimeString() {
+        return creationtimeString;
+    }
+
+    @Override
+    public void setCreationtimeString(String creationtimeString) {
+        this.creationtimeString = creationtimeString;
+    }
+
     public String getRequirementDate() {
         return requirementDate;
     }

+ 20 - 1
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/jd/controller/JdMaterialInfoController.java

@@ -20,8 +20,27 @@ public class JdMaterialInfoController{
     @GetMapping("/pullMaterialInfoJustStores")
     public AjaxResult pullMaterialInfoJustStores()
     {
-        AjaxResult list = jdMaterialInfoService.pullMaterialInfoJustStores();
+        //干掉旧物料拉取新的物料
+        AjaxResult list = jdMaterialInfoService.pullMaterialInfoJustStoresUpdate();
         return list;
     }
 
+
+    @Anonymous
+    @GetMapping("/pullFinishedPartsWarehouseInfoJustStores")
+    public AjaxResult pullFinishedPartsWarehouseInfoJustStores()
+    {
+        AjaxResult list = jdMaterialInfoService.pullFinishedPartsWarehouseInfoJustStores();
+        return list;
+    }
+
+    @Anonymous
+    @GetMapping("/pullMaterialBaseInfo")
+    public AjaxResult pullMaterialBaseInfo()
+    {
+        AjaxResult list = jdMaterialInfoService.pullMaterialBaseInfo();
+        return list;
+    }
+
+
 }

+ 8 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/jd/controller/JdProductionOrderController.java

@@ -63,6 +63,14 @@ public class JdProductionOrderController extends BaseController
         return list;
     }
 
+
+    @Anonymous
+    @GetMapping("/jdProductionWeldPlanOrderPull")
+    public AjaxResult jdProductionWeldPlanOrderPull()
+    {
+        AjaxResult list = jdProductionOrderService.pullWeldProductionOrder();
+        return AjaxResult.success();
+    }
     /**
      * 导出金蝶-生产订单信息列表
      */

+ 1 - 1
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/jd/domain/JdMaterialBaseInfoVo.java

@@ -51,7 +51,7 @@ public class JdMaterialBaseInfoVo extends BaseEntity
 
     /** 数据 */
     @Excel(name = "数据")
-    @JSONField(name = "F.PONP.xiangshu")
+    @JSONField(name = "F.PONP.ShuJu")
     private String dataInfo;
 
     /** 相数  F_PONP_ShuJu*/

+ 1 - 1
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/jd/domain/JdMaterialInfoVo.java

@@ -77,7 +77,7 @@ public class JdMaterialInfoVo extends BaseEntity
 
     /** 可用量(主单位) */
     @Excel(name = "可用量", readConverterExp = "主=单位")
-    @JSONField(name="FBaseQty")
+    @JSONField(name="FSecQty")
     private String availableAmount;
 
     /** 库存状态 */

+ 80 - 15
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/jd/domain/JdProductionOrder.java

@@ -27,6 +27,10 @@ public class JdProductionOrder extends BaseEntity
     @Excel(name = "单据编号")
     @JSONField(name = "FBillNo")
     private String documentNumber;
+    @Excel(name = "需求日期")
+    @JSONField(name = "F.PONP.XQRQ")
+    private String   completionTime;
+
 
     /** 单据类型 */
     @Excel(name = "单据类型")
@@ -126,26 +130,15 @@ public class JdProductionOrder extends BaseEntity
     @Excel(name = "计划名称")
     private String planName;
 
-    public String getBz() {
-        return bz;
-    }
-
-    public void setBz(String bz) {
-        this.bz = bz;
-    }
-
-    public String getTsyq() {
-        return tsyq;
-    }
-
-    public void setTsyq(String tsyq) {
-        this.tsyq = tsyq;
-    }
 
     /** 备注 */
     @Excel(name = "备注")
     @JSONField(name = "FDescription")
     private String bz;
+    @Excel(name = "单据创建时间")
+    @JSONField(name = "FDate")
+    private String creationtimeString;
+
 
     /** 特殊要求 */
     @Excel(name = "特殊要求")
@@ -182,6 +175,71 @@ public class JdProductionOrder extends BaseEntity
     @JSONField(name = "F.PONP.GongLv")
     private String gl;
 
+    @Excel(name = "计划开始")
+    @JSONField(name = "FPlanStartDate")
+    private String FPlanStartDate;
+
+    @Excel(name = "计划完工")
+    @JSONField(name = "FPlanFinishDate")
+    private String FPlanFinishDate;
+
+    @Excel(name = "电压频率")
+    @JSONField(name = "F.PONP.DianYaPinLv")
+    private String dianYaPinLv;
+
+    public String getDianYaPinLv() {
+        return dianYaPinLv;
+    }
+
+    public void setDianYaPinLv(String dianYaPinLv) {
+        this.dianYaPinLv = dianYaPinLv;
+    }
+
+    public String getFPlanStartDate() {
+        return FPlanStartDate;
+    }
+
+    public void setFPlanStartDate(String FPlanStartDate) {
+        this.FPlanStartDate = FPlanStartDate;
+    }
+
+    public String getFPlanFinishDate() {
+        return FPlanFinishDate;
+    }
+
+    public void setFPlanFinishDate(String FPlanFinishDate) {
+        this.FPlanFinishDate = FPlanFinishDate;
+    }
+
+    public String getBz() {
+        return bz;
+    }
+
+    public void setBz(String bz) {
+        this.bz = bz;
+    }
+
+    public String getTsyq() {
+        return tsyq;
+    }
+
+    public void setTsyq(String tsyq) {
+        this.tsyq = tsyq;
+    }
+
+
+    public void setCreationtimeString(String creationtimeString) {
+        this.creationtimeString = creationtimeString;
+    }
+
+
+
+    public String getCreationtimeString() {
+        return creationtimeString;
+    }
+
+
+
     public String getGl() {
         return gl;
     }
@@ -243,6 +301,13 @@ public class JdProductionOrder extends BaseEntity
         this.id = id;
     }
 
+    public String getCompletionTime() {
+        return completionTime;
+    }
+
+    public void setCompletionTime(String completionTime) {
+        this.completionTime = completionTime;
+    }
     public Long getId() 
     {
         return id;

+ 5 - 1
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/jd/service/JdMaterialInfoService.java

@@ -9,7 +9,11 @@ public interface JdMaterialInfoService {
      */
     public AjaxResult pullMaterialInfoJustStores();
 
-
+    /**
+     * 拉取物料库存信息
+     * @return
+     */
+    public AjaxResult pullMaterialInfoJustStoresUpdate();
     /**
      * 拉取成品库存信息
      * @return

+ 5 - 2
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/jd/service/JdProductionOrderService.java

@@ -74,7 +74,10 @@ public interface JdProductionOrderService
      */
     AjaxResult pullXlH();
 
-
-
+    /**
+     * 焊接订单拉取
+     * @return
+     */
+    AjaxResult  pullWeldProductionOrder();
 
 }

+ 75 - 8
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/jd/service/impl/JdMaterialInfoServiceImpl.java

@@ -2,6 +2,7 @@ package com.zkqy.amichi.jd.service.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.kingdee.bos.webapi.sdk.K3CloudApi;
+import com.zkqy.amichi.domain.MaterialBaseInfo;
 import com.zkqy.amichi.jd.domain.JdMaterialBaseInfoVo;
 import com.zkqy.amichi.jd.domain.JdMaterialInfoVo;
 import com.zkqy.amichi.jd.domain.JdProductionBomsDetailsVo;
@@ -14,6 +15,7 @@ import org.springframework.stereotype.Service;
 
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 @Service
 public class JdMaterialInfoServiceImpl implements JdMaterialInfoService {
@@ -35,9 +37,9 @@ public class JdMaterialInfoServiceImpl implements JdMaterialInfoService {
                 "    \"OrderString\": \"\",\n" +
                 "    \"TopRowCount\": 0,\n" +
                 "    \"SubSystemId\": \"\",\n" +
-                "    \"FieldKeys\": \"FMaterialId.FNumber,FMaterialName,FModel,FModel1,F_PONP_TuHao,F_PONP_miaoshu,FStockId.FNumber,FStockName,FLot.FNumber,FStockUnitId.FName,FBaseQty,FStockStatusId.FName,FAVBQTY\",\n" +
+                "    \"FieldKeys\": \"FSecQty,FMaterialId.FNumber,FMaterialName,FModel,FModel1,F_PONP_TuHao,F_PONP_miaoshu,FStockId.FNumber,FStockName,FLot.FNumber,FStockUnitId.FName,FBaseQty,FStockStatusId.FName,FAVBQTY\",\n" +
                 "    \"FormId\": \"STK_Inventory\",\n" +
-                "    \"FilterString\":  [{\"Left\":\"\",\"FieldName\":\"FStockId.FNumber\",\"Compare\":\"83\",\"Value\":\"CK005\",\"Right\":\"\",\"Logic\":0},{\"Left\":\"\",\"FieldName\":\"FStockName\",\"Compare\":\"83\",\"Value\":\"利库仓\",\"Right\":\"\",\"Logic\":0},{\"Left\":\"\",\"FieldName\":\"FStockName\",\"Compare\":\"83\",\"Value\":\"成品仓\",\"Right\":\"\",\"Logic\":0}],\n" +
+                "    \"FilterString\":  [{\"Left\":\"\",\"FieldName\":\"FStockName\",\"Compare\":\"67\",\"Value\":\"利库仓\",\"Right\":\"\",\"Logic\":1},{\"Left\":\"\",\"FieldName\":\"FStockName\",\"Compare\":\"67\",\"Value\":\"成品仓\",\"Right\":\"\",\"Logic\":1},{\"Left\":\"\",\"FieldName\":\"FStockName\",\"Compare\":\"67\",\"Value\":\"车间仓\",\"Right\":\"\",\"Logic\":0}],\n" +
                 "    \"Limit\": 1000,\n" +
                 "    \"StartRow\": \"0\"\n" +
                 "}";
@@ -78,6 +80,63 @@ public class JdMaterialInfoServiceImpl implements JdMaterialInfoService {
     }
 
 
+    /**
+     * 拉取更新MES仓库数量物料及时库存信息
+     * @return
+     */
+    @Override
+    public AjaxResult pullMaterialInfoJustStoresUpdate() {
+        String queryString ="{\n" +
+                "    \"OrderString\": \"\",\n" +
+                "    \"TopRowCount\": 0,\n" +
+                "    \"SubSystemId\": \"\",\n" +
+                "    \"FieldKeys\": \"FSecQty,FMaterialId.FNumber,FMaterialName,FModel,FModel1,F_PONP_TuHao,F_PONP_miaoshu,FStockId.FNumber,FStockName,FLot.FNumber,FStockUnitId.FName,FBaseQty,FStockStatusId.FName,FAVBQTY\",\n" +
+                "    \"FormId\": \"STK_Inventory\",\n" +
+                "    \"FilterString\":  [{\"Left\":\"\",\"FieldName\":\"FStockName\",\"Compare\":\"67\",\"Value\":\"利库仓\",\"Right\":\"\",\"Logic\":1},{\"Left\":\"\",\"FieldName\":\"FStockName\",\"Compare\":\"67\",\"Value\":\"成品仓\",\"Right\":\"\",\"Logic\":1},{\"Left\":\"\",\"FieldName\":\"FStockName\",\"Compare\":\"67\",\"Value\":\"车间仓\",\"Right\":\"\",\"Logic\":0}],\n" +
+                "    \"Limit\": 1000,\n" +
+                "    \"StartRow\": \"0\"\n" +
+                "}";
+        //查询条件
+        Map<String, Object> map = JSON.parseObject(queryString, Map.class);
+        K3CloudApi api = new K3CloudApi();
+        int startRow = 0; // 起始行号
+        int limit = 1000; // 每次查询的数量
+        List<JdMaterialInfoVo> mapList;
+        // 我每次都把所有的物料都干掉
+        int i1 = materialInfoMapper.deleteMaterialInfoAll();
+        boolean flag = true;
+        try {
+            do {
+                // 更新查询条件中的起始行号
+                map.put("StartRow", startRow);
+                // 查询数据
+                String resultJson = api.billQuery(JSON.toJSONString(map));
+                if (resultJson.isEmpty()||resultJson.equals("[]")) {
+                    // 处理空结果的情况
+                    flag = false;
+                }else {
+                    mapList = JSON.parseArray(resultJson, JdMaterialInfoVo.class);
+                    // 处理数据(例如插入到数据库)
+                    int i = materialInfoMapper.batchInsertJdMaterialInfoVo(mapList);
+                    System.out.println(1);
+                    if (mapList.size() < 1000) {
+                        flag = false;
+                    }
+                    // 更新起始行号
+                    startRow += limit;
+                    // 如果返回的数据量小于5000,说明已经没有更多的数据,结束循环
+                }
+            } while (flag);
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+        //abc
+        return AjaxResult.success("详细信息拉取成功");
+    }
+
+
+
+
     /**
      * 拉取物料及时库存信息
      * 拉取成品库存信息
@@ -143,34 +202,42 @@ public class JdMaterialInfoServiceImpl implements JdMaterialInfoService {
         String queryString ="{\n" +
                 "    \"FormId\": \"BD_MATERIAL\",\n" +
                 "    \"FieldKeys\": \"FNumber,FName,FSpecification,FDescription,F_PONP_model,F_PONP_TieXinChangDu,F_PONP_JiKeDuanGai,F_PONP_ShuJu,F_PONP_xiangshu,F_PONP_YanSe,F_PONP_ShuoMingShu,F_PONP_HeGeZheng,F_PONP_PanPianJieKou,F_PONP_GongLv,F_PONP_ChengPinMa,F_PONP_MingPai,F_PONP_DianYaPinLv,F_PONP_KaiGuanXiang,F_PONP_TeShuYaoQiu,F_PONP_TeShuYaoQiu,F_PONP_BaoZhuangXiang\",\n" +
-                "    \"FilterString\": [{\"Left\":\"\",\"FieldName\":\"FStockName\",\"Compare\":\"67\",\"Value\":\"成品仓\",\"Right\":\"\",\"Logic\":0}],\n" +
+                "    \"FilterString\": [],\n" +
                 "    \"OrderString\": \"\",\n" +
                 "    \"TopRowCount\": 0,\n" +
                 "    \"StartRow\": 0,\n" +
-                "    \"Limit\": 1000,\n" +
+                "    \"Limit\": 3000,\n" +
                 "    \"SubSystemId\": \"\"\n" +
                 "}";
         //查询条件
         Map map = JSON.parseObject(queryString, Map.class);
         K3CloudApi api = new K3CloudApi();
         int startRow = 0; // 起始行号
-        int limit = 1000; // 每次查询的数量
+        int limit = 3000; // 每次查询的数量
         List<JdMaterialBaseInfoVo> mapList;
         boolean flag = true;
+        //验证重复
+        MaterialBaseInfo materialBaseInfo=new MaterialBaseInfo();
+        List<MaterialBaseInfo> materialBaseInfos = materialBaseInfoMapper.selectMaterialBaseInfoListCode(materialBaseInfo);
+        List<String> collect = materialBaseInfos.parallelStream().map(MaterialBaseInfo::getMaterialCode).collect(Collectors.toList());
         try {
             do {
                 // 更新查询条件中的起始行号
                 map.put("StartRow", String.valueOf(startRow));
                 // 查询数据
                 String resultJson = api.billQuery(JSON.toJSONString(map));
+
                 if (resultJson.isEmpty()||resultJson.equals("[]")) {
                     // 处理空结果的情况
                     flag = false;
                 }else {
                     mapList = JSON.parseArray(resultJson, JdMaterialBaseInfoVo.class);
+                    List<JdMaterialBaseInfoVo> collect1 = mapList.stream().filter(item -> !collect.contains(item.getMaterialCode())).collect(Collectors.toList());
                     // 处理数据(例如插入到数据库)
-                    int i = materialBaseInfoMapper.batchInsertMaterialBaseInfo(mapList);
-                    if (mapList.size() < 1000) {
+                    if(collect1.size()>0){
+                        int i = materialBaseInfoMapper.batchInsertMaterialBaseInfo(collect1);
+                    }
+                    if (mapList.size() < 3000) {
                         flag = false;
                     }
                     // 更新起始行号
@@ -182,6 +249,6 @@ public class JdMaterialInfoServiceImpl implements JdMaterialInfoService {
             throw new RuntimeException(e);
         }
         //abc
-        return AjaxResult.success("陈高频库存信息拉取成功");
+        return AjaxResult.success("基础物料信息拉取成功");
     }
 }

+ 356 - 101
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/jd/service/impl/JdProductionOrderServiceImpl.java

@@ -2,6 +2,8 @@ package com.zkqy.amichi.jd.service.impl;
 
 import java.math.BigDecimal;
 import java.math.RoundingMode;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
@@ -11,6 +13,7 @@ import com.kingdee.bos.webapi.sdk.K3CloudApi;
 import com.zkqy.amichi.domain.PlanTaskDetails;
 import com.zkqy.amichi.domain.ProductionCardFlow;
 import com.zkqy.amichi.domain.ProductionPlanningManagement;
+import com.zkqy.amichi.jd.domain.JdMaterialInfoVo;
 import com.zkqy.amichi.jd.domain.ProductionCardFlowVo;
 import com.zkqy.amichi.mapper.PlanTaskDetailsMapper;
 import com.zkqy.amichi.mapper.ProductionCardFlowMapper;
@@ -300,9 +303,8 @@ public class JdProductionOrderServiceImpl implements JdProductionOrderService
 
     /**
      * 物料编码不等于焊接
-     * 所有开工数据
-     *    fieldKeysList.add("FDescription");
-     *         fieldKeysList.add("F_PONP_teshuyaoqiu");
+     * 条件:所有开工数据
+     *
      * @return
      */
     public  AjaxResult jdProductionOrderPullTwo(){
@@ -314,7 +316,7 @@ public class JdProductionOrderServiceImpl implements JdProductionOrderService
                 "    \"FieldKeys\": \"FDescription,F_PONP_teshuyaoqiu,FBillNo,FBillType,FDate,FDocumentStatus," +
                 "FProductType,FMaterialId,FWorkShopID0,FQty,FStatus,,FSaleOrderNo,FPickMtrlStatus," +
                 "FMaterialId.FNumber,FMaterialName,F_PONP_BaseProperty,FSpecification,FUnitId.FName,F_PONP_yanse,F_PONP_mingpai,F_PONP_hegezheng.FDataValue," +
-                "F_PONP_shuomingshu.FDataValue,F_PONP_KaiGuanXiang,F_PONP_baozhuangxiang,F_PONP_GongLv,\",\n" +
+                "F_PONP_shuomingshu.FDataValue,F_PONP_KaiGuanXiang,F_PONP_baozhuangxiang,F_PONP_GongLv,FPlanFinishDate,FPlanStartDate\",\n" +
                 "    \"FilterString\": [{\"Left\":\"\",\"FieldName\":\"FMaterialId.FNumber\",\"Compare\":\"34\",\"Value\":\"焊\",\"Right\":\"\",\"Logic\":0},{\"Left\":\"\",\"FieldName\":\"FStatus\",\"Compare\":\"105\",\"Value\":\"4\",\"Right\":\"\",\"Logic\":0}],\n" +
                 "    \"OrderString\": \"\",\n" +
                 "    \"TopRowCount\": 0,\n" +
@@ -329,94 +331,102 @@ public class JdProductionOrderServiceImpl implements JdProductionOrderService
             //生产信息
             List<JdProductionOrder> jdProductionOrders = JSON.parseArray(resultJson, JdProductionOrder.class);
             //单据编号去重
-            List<String> collectOne = jdProductionOrders.stream().map(JdProductionOrder::getDemandDocument).collect(Collectors.toSet())
-                    .stream().collect(Collectors.toList());
+//            List<String> collectOne = jdProductionOrders.stream().map(JdProductionOrder::getDemandDocument).collect(Collectors.toSet())
+//                    .stream().collect(Collectors.toList());
+
             //查询系统中的订单信息
             ProductionPlanningManagement productionPlanningManagement1=new ProductionPlanningManagement();
+            productionPlanningManagement1.setIsWeldSheet("1");
             List<ProductionPlanningManagement> productionPlanningManagements = productionPlanningManagementMapper.selectProductionPlanningManagementList(productionPlanningManagement1);
+
             List<String> collectTwo = productionPlanningManagements.stream().map(ProductionPlanningManagement::getOrderNumber).collect(Collectors.toSet())
                     .stream().collect(Collectors.toList());
-            List<String> cj= collectOne.stream().filter(item -> !collectTwo.contains(item)).collect(Collectors.toList());
+
+//          List<String> cj= collectOne.stream().filter(item -> !collectTwo.contains(item)).collect(Collectors.toList());
             //分组
             // 按照订单号分组并去重
-            Map<String, JdProductionOrder> groupedByDemandDocument = jdProductionOrders.stream()
+            Map<String, JdProductionOrder> groupedByDemandDocument = jdProductionOrders.stream().filter(item->!collectTwo.contains(item.getDemandDocument()))
                     .collect(Collectors.toMap(
                             JdProductionOrder::getDemandDocument,
                             order -> order,
                             (existing, replacement) -> existing // 保留第一个出现的订单
                     ));
-            //订单循环
-            groupedByDemandDocument.forEach((k,v)->{
-                //计划编号
-                String planNumnber = generator.generateCommissionNumber();
-                //编号订单号
-                List<Map> mapList = this.jdSalesOrderInfoS(k);//订单详情信息
-                System.err.println(mapList.size());
-                //拿到了关于这个订单的销售订单
-                if(mapList.size()>0){
+            if(groupedByDemandDocument.size()>0){
+                //订单循环
+                groupedByDemandDocument.forEach((k,v)->{
+                    //计划编号
+                    String planNumnber = generator.generateCommissionNumber();
                     //编号订单号
-                    String fBillNo = mapList.get(0).get("FBillNo").toString();//单据编号
-                    //合同号
-                    String F_PONP_Text = mapList.get(0).get("F.PONP.Text").toString();
-                    //下单时间
-                    String FDate = mapList.get(0).get("FCreateDate").toString();//日期
-                    String F_PONP_Datetime;
-                    if(mapList.get(0).get("F_PONP_DATETIME")!=null){
-                        //要货日期
-                        F_PONP_Datetime = mapList.get(0).get("F_PONP_DATETIME").toString();//要货日期
-                    } else if(mapList.get(0).get("FDeliveryDate")!=null){
-                        F_PONP_Datetime =mapList.get(0).get("FDeliveryDate").toString();//要货日期;
-                    }else {
-                        F_PONP_Datetime="";
-                    }
-                    ProductionPlanningManagement productionPlanningManagement=new ProductionPlanningManagement();
-                    productionPlanningManagement.setPlanNumber(planNumnber);
-                    productionPlanningManagement.setOrderNumber(fBillNo);
-                    productionPlanningManagement.setContractNumber(F_PONP_Text);
-                    if(StringUtils.isNotNull(v.getBz())){ //备注
-                        productionPlanningManagement.setRemark(v.getBz());
-                    }
-                    productionPlanningManagement.setCreationtimeString(F_PONP_Datetime);
-                    productionPlanningManagement.setCompletionTime(F_PONP_Datetime);
-                    if(StringUtils.isNotNull(v.getTsyq())){
-                        productionPlanningManagement.setSpecialRequirements(v.getTsyq()); //特殊要求
-                    }
-                    productionPlanningManagement.setPlanType("0"); //待生产
-                    productionPlanningManagement.setTaskStatus("2");//待排产
-                    //======处理基本的订单信息
-                    productionPlanningManagementMapper.insertProductionPlanningManagement(productionPlanningManagement);
-                    mapList.forEach(a->{
-                        PlanTaskDetails planTaskDetails=new PlanTaskDetails();
-//                        String string = a.get("FMaterialId.FNumber").toString();
-                        List<JdProductionOrder> collect1 = jdProductionOrders.stream().filter(c -> c.getDemandDocument().equals(k) && c.getMaterialCode().equals(a.get("FMaterialId.FNumber").toString())).collect(Collectors.toList());
-                        if(collect1.size()>0){
-                            //需求单据(处理详情信息没有需求单据的问题)
-                            planTaskDetails.setDemandDocument(collect1.get(0).getDocumentNumber());   //需求单据
-                            //颜色
-                            planTaskDetails.setColour(collect1.get(0).getYanse());
-                            //铭牌
-                            planTaskDetails.setMingpai(collect1.get(0).getMingpai());
-                            //合格证
-                            planTaskDetails.setHegezheng(collect1.get(0).getHegezheng());
-                            //说明书
-                            planTaskDetails.setShuomingshu(collect1.get(0).getShuomingshu());
-                            //包装箱
-                            planTaskDetails.setBaozhuangxiang(collect1.get(0).getBaozhuangxiang());
-                            //开关箱子
-                            planTaskDetails.setSwitchBox(collect1.get(0).getKaiguanxiang());
-                            //功率
-                            planTaskDetails.setPower(collect1.get(0).getGl());
+                    List<Map> mapList = this.jdSalesOrderInfoS(k);//订单详情信息
+                    System.err.println(mapList.size());
+                    //拿到了关于这个订单的销售订单
+                    if(mapList.size()>0){
+                        //编号订单号
+                        String fBillNo = mapList.get(0).get("FBillNo").toString();//单据编号
+                        //合同号
+                        String F_PONP_Text = mapList.get(0).get("F.PONP.Text").toString();
+                        //下单时间
+                        String FDate = mapList.get(0).get("FCreateDate").toString();//日期
+                        String F_PONP_Datetime;
+                        if(mapList.get(0).get("F_PONP_DATETIME")!=null){
+                            //要货日期
+                            F_PONP_Datetime = mapList.get(0).get("F_PONP_DATETIME").toString();//要货日期
+                        } else if(mapList.get(0).get("FDeliveryDate")!=null){
+                            F_PONP_Datetime =mapList.get(0).get("FDeliveryDate").toString();//要货日期;
+                        }else {
+                            F_PONP_Datetime="";
+                        }
+                        ProductionPlanningManagement productionPlanningManagement=new ProductionPlanningManagement();
+                        productionPlanningManagement.setPlanNumber(planNumnber);
+                        productionPlanningManagement.setOrderNumber(fBillNo);
+                        productionPlanningManagement.setContractNumber(F_PONP_Text);
+                        if(StringUtils.isNotNull(v.getBz())){ //备注
+                            productionPlanningManagement.setRemark(v.getBz());
                         }
+                        productionPlanningManagement.setCreationtimeString(FDate);
+                        productionPlanningManagement.setCompletionTime(F_PONP_Datetime);
+                        if(StringUtils.isNotNull(v.getTsyq())){
+                            productionPlanningManagement.setSpecialRequirements(v.getTsyq()); //特殊要求
+                        }
+                        productionPlanningManagement.setPlanType("0"); //待生产
+                        productionPlanningManagement.setTaskStatus("2");//待排产
+                        productionPlanningManagement.setIsWeldSheet("1"); //普通订单
+                        //======处理基本的订单信息
+                        productionPlanningManagementMapper.insertProductionPlanningManagement(productionPlanningManagement);
+                        mapList.forEach(a->{
+                            PlanTaskDetails planTaskDetails=new PlanTaskDetails();
+//                        String string = a.get("FMaterialId.FNumber").toString();
+                            List<JdProductionOrder> collect1 = jdProductionOrders.stream().filter(c -> c.getDemandDocument().equals(k) && c.getMaterialCode().equals(a.get("FMaterialId.FNumber").toString())).collect(Collectors.toList());
+                            if(collect1.size()>0){
+                                //需求单据(处理详情信息没有需求单据的问题)
+                                planTaskDetails.setDemandDocument(collect1.get(0).getDocumentNumber());   //需求单据
+                                //颜色
+                                planTaskDetails.setColour(collect1.get(0).getYanse());
+                                //铭牌
+                                planTaskDetails.setMingpai(collect1.get(0).getMingpai());
+                                //合格证
+                                planTaskDetails.setHegezheng(collect1.get(0).getHegezheng());
+                                //说明书
+                                planTaskDetails.setShuomingshu(collect1.get(0).getShuomingshu());
+                                //包装箱
+                                planTaskDetails.setBaozhuangxiang(collect1.get(0).getBaozhuangxiang());
+                                //开关箱子
+                                planTaskDetails.setSwitchBox(collect1.get(0).getKaiguanxiang());
+                                //功率
+                                planTaskDetails.setPower(collect1.get(0).getGl());
+                                //数据
+                                //planTaskDetails.seti
+                            }
 //                      planTaskDetails.setDemandDocument(v.getDocumentNumber());   //需求单据
-                        planTaskDetails.setPlanId(productionPlanningManagement.getId());//计划id
-                        planTaskDetails.setMaterialId(a.get("FMaterialId.FNumber").toString());//原材料编码
-                        planTaskDetails.setMaterialName(a.get("FMaterialName").toString());//名称
-                        planTaskDetails.setQuantity(a.get("FQty").toString());//数量
-                        planTaskDetails.setTimeOfRequest(F_PONP_Datetime);
-                        planTaskDetails.setCustomerModel(a.get("F.PONP.Text1").toString());//客户型号
-                        planTaskDetails.setModelNumber(a.get("F.PONP.BaseProperty").toString());//型号
-                        planTaskDetails.setSpecification(a.get("FMaterialModel").toString());//规格
-                        planTaskDetails.setMaterialUnit(a.get("FUnitID.FName").toString());//单位
+                            planTaskDetails.setPlanId(productionPlanningManagement.getId());//计划id
+                            planTaskDetails.setMaterialId(a.get("FMaterialId.FNumber").toString());//原材料编码
+                            planTaskDetails.setMaterialName(a.get("FMaterialName").toString());//名称
+                            planTaskDetails.setQuantity(a.get("FQty").toString());//数量
+                            planTaskDetails.setTimeOfRequest(F_PONP_Datetime);
+                            planTaskDetails.setCustomerModel(a.get("F.PONP.Text1").toString());//客户型号
+                            planTaskDetails.setModelNumber(a.get("F.PONP.BaseProperty").toString());//型号
+                            planTaskDetails.setSpecification(a.get("FMaterialModel").toString());//规格
+                            planTaskDetails.setMaterialUnit(a.get("FUnitID.FName").toString());//单位
 
 //                        planTaskDetails.setColour(a.get("F.PONP.yanse").toString()); //颜色
 //                        planTaskDetails.setMingpai(a.get("F.PONP.mingpai").toString()); //铭牌
@@ -424,34 +434,279 @@ public class JdProductionOrderServiceImpl implements JdProductionOrderService
 //                        planTaskDetails.setShuomingshu(a.get("F.PONP.shuomingshu.FDataValue").toString()); //说明书
 //                        planTaskDetails.setBaozhuangxiang(a.get("F.PONP.baozhuangxiang").toString()); //包装箱
 //                        planTaskDetails.setSwitchBox(a.get("F.PONP.Text5").toString()); //开关箱
-                        planTaskDetailsMapper.insertPlanTaskDetails(planTaskDetails);
-                    });
-                }
-            });
-            //处理订单序列号问题
-            groupedByDemandDocument.forEach((k,v)->{
+                            planTaskDetailsMapper.insertPlanTaskDetails(planTaskDetails);
+                        });
+                    }
+                });
+                //处理订单序列号问题
+                groupedByDemandDocument.forEach((k,v)->{
 //            String documentNumber = item.getDocumentNumber();//需求单据编号
-                String stringQuery="{\n" +
-                        "    \"FormId\": \"PRD_MO\",\n" +
-                        "    \"FieldKeys\": \"FBillNo,FSNQty1,FSaleOrderNo,FSerialNo\",\n" +
-                        "    \"FilterString\": [{\"Left\":\"\",\"FieldName\":\"FMaterialId.FNumber\",\"Compare\":\"34\",\"Value\":\"焊\",\"Right\":\"\",\"Logic\":0},{\"Left\":\"\",\"FieldName\":\"FStatus\",\"Compare\":\"105\",\"Value\":\"4\",\"Right\":\"\",\"Logic\":0},{\"Left\":\"\",\"FieldName\":\"FSaleOrderNo\",\"Compare\":\"67\",\"Value\":\""+k+"\",\"Right\":\"\",\"Logic\":0}],\n" +
-                        "    \"OrderString\": \"\",\n" +
-                        "    \"TopRowCount\": 0,\n" +
-                        "    \"StartRow\": 0,\n" +
-                        "    \"Limit\": 2000,\n" +
-                        "    \"SubSystemId\": \"\"\n" +
-                        "}";
-                try {
-                    String xlhString = api.billQuery(stringQuery);
-                    if(!xlhString.equals("[]")){
-                        List<ProductionCardFlowVo> mapList1 = JSON.parseArray(xlhString,  ProductionCardFlowVo.class);
-                        int i = productionCardFlowMapper.insertProductionCardFlowBatchVo(mapList1);
+                    String stringQuery="{\n" +
+                            "    \"FormId\": \"PRD_MO\",\n" +
+                            "    \"FieldKeys\": \"FBillNo,FSNQty1,FSaleOrderNo,FSerialNo\",\n" +
+                            "    \"FilterString\": [{\"Left\":\"\",\"FieldName\":\"FMaterialId.FNumber\",\"Compare\":\"34\",\"Value\":\"焊\",\"Right\":\"\",\"Logic\":0},{\"Left\":\"\",\"FieldName\":\"FStatus\",\"Compare\":\"105\",\"Value\":\"4\",\"Right\":\"\",\"Logic\":0},{\"Left\":\"\",\"FieldName\":\"FSaleOrderNo\",\"Compare\":\"67\",\"Value\":\""+k+"\",\"Right\":\"\",\"Logic\":0}],\n" +
+                            "    \"OrderString\": \"\",\n" +
+                            "    \"TopRowCount\": 0,\n" +
+                            "    \"StartRow\": 0,\n" +
+                            "    \"Limit\": 2000,\n" +
+                            "    \"SubSystemId\": \"\"\n" +
+                            "}";
+                    try {
+                        String xlhString = api.billQuery(stringQuery);
+                        if(!xlhString.equals("[]")){
+                            List<ProductionCardFlowVo> mapList1 = JSON.parseArray(xlhString,  ProductionCardFlowVo.class);
+                            int i = productionCardFlowMapper.insertProductionCardFlowBatchVo(mapList1);
+                        }
+                    } catch (Exception e) {
+                        throw new RuntimeException(e);
+                    }
+                });
+            }
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+        return  AjaxResult.success();
+    }
+
+
+    /**
+     * 拉取焊接
+     */
+    @Override
+    public  AjaxResult pullWeldProductionOrder(){
+//金蝶工具key
+        K3CloudApi api = new K3CloudApi();
+        // 获取当前时间
+        LocalDateTime now = LocalDateTime.now();
+        System.out.println("当前时间: " + now);
+        // 减去三个月
+        LocalDateTime threeMonthsAgo = now.minusMonths(3);
+        System.out.println("三个月前的时间: " + threeMonthsAgo);
+        LocalDateTime localDateTime1 = threeMonthsAgo.withMinute(0).withSecond(0).withNano(0);
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        String format = localDateTime1.format(formatter);
+        //定义查询条件
+        String query="{\n" +
+                "    \"FormId\": \"PRD_MO\",\n" +
+                "    \"FieldKeys\": \"FDescription,F_PONP_teshuyaoqiu,FBillNo,FBillType,FDate,FDocumentStatus," +
+                "FProductType,FMaterialId,FWorkShopID0,FQty,FStatus,,FSaleOrderNo,FPickMtrlStatus," +
+                "FMaterialId.FNumber,FMaterialName,F_PONP_BaseProperty,FSpecification,FUnitId.FName,F_PONP_yanse,F_PONP_mingpai,F_PONP_hegezheng.FDataValue," +
+                "F_PONP_shuomingshu.FDataValue,F_PONP_KaiGuanXiang,F_PONP_baozhuangxiang,F_PONP_GongLv,F_PONP_XQRQ,FDate,FPlanStartDate,FPlanFinishDate\",\n" +
+                "    \"FilterString\": [{\"Left\":\"\",\"FieldName\":\"FMaterialId.FNumber\",\"Compare\":\"17\",\"Value\":\"焊\",\"Right\":\"\",\"Logic\":0}," +
+                "{\"Left\":\"\",\"FieldName\":\"FCreateDate\",\"Compare\":\"39\",\"Value\":\""+format+"\",\"Right\":\"\",\"Logic\":0}],\n" +
+                "    \"OrderString\": \"\",\n" +
+                "    \"TopRowCount\": 0,\n" +
+                "    \"StartRow\": 0,\n" +
+                "    \"Limit\": 1000,\n" +
+                "    \"SubSystemId\": \"\"\n" +
+                "}";
+        int startRow = 0; // 起始行号
+        int limit = 1000; // 每次查询的数量
+        // 更新查询条件中的起始行号
+        //查询条件
+        Map<String, Object> map = JSON.parseObject(query, Map.class);
+        List<JdProductionOrder> jdProductionOrders;
+        boolean flag = true;
+        try {
+            do {
+                // 更新查询条件中的起始行号
+                map.put("StartRow", startRow);
+                //查询结果
+                String resultJson = api.billQuery(JSON.toJSONString(map));
+                if (resultJson.isEmpty()||resultJson.equals("[]")) {
+                    // 处理空结果的情况
+                    flag = false;
+                }else {
+                    //生产信息
+                   jdProductionOrders = JSON.parseArray(resultJson, JdProductionOrder.class);
+                    //查询系统中的订单信息
+                    ProductionPlanningManagement productionPlanningManagement1=new ProductionPlanningManagement();
+                    productionPlanningManagement1.setIsWeldSheet("2");
+                    List<ProductionPlanningManagement> productionPlanningManagements = productionPlanningManagementMapper.selectProductionPlanningManagementList(productionPlanningManagement1);
+
+                    List<String> collectTwo = productionPlanningManagements.stream().map(ProductionPlanningManagement::getOrderNumber).collect(Collectors.toSet())
+                            .stream().collect(Collectors.toList());
+                    // 过滤掉 collectTwo 中包含的需求文档编号,并按 demandDocument 分组
+                    Map<String, List<JdProductionOrder>> groupedByDemandDocument = jdProductionOrders.stream()
+                            .filter(item -> !collectTwo.contains(item.getDemandDocument()))
+                            .collect(Collectors.groupingBy(JdProductionOrder::getDemandDocument));
+                    if(groupedByDemandDocument.size()>0){
+                        //订单循环
+                        groupedByDemandDocument.forEach((k,v)->{
+                            //计划编号
+                            String planNumnber = generator.generateCommissionNumber();
+                            //订单号
+                            ProductionPlanningManagement productionPlanningManagement=new ProductionPlanningManagement();
+                            productionPlanningManagement.setOrderNumber(k); //订单编号
+                            productionPlanningManagement.setPlanNumber(planNumnber);//计划号
+                            productionPlanningManagement.setPlanType("0"); //待生产
+                            productionPlanningManagement.setTaskStatus("2");//待排产
+                            productionPlanningManagement.setIsWeldSheet("2");//焊接订单
+                            //计算订单的最大完成时间
+                            Optional<LocalDateTime> maxCompletionTime = v.stream()
+                                    .map(item -> LocalDateTime.parse(item.getCompletionTime(), DateTimeFormatter.ISO_LOCAL_DATE_TIME))
+                                    .max(Comparator.naturalOrder());
+                            maxCompletionTime.ifPresent(maxTime ->{
+                                System.out.println("最大的时间: " + maxTime);
+                                String format1 = maxTime.format(formatter);
+                                productionPlanningManagement.setCompletionTime(format1);//订单的最大完成时间
+                            });
+                            //备注
+                            if(StringUtils.isNotNull(v.get(0).getRemark())){
+                                productionPlanningManagement.setRemark(v.get(0).getRemark()); //备注
+                            }
+                            //订单的创建时间
+                            productionPlanningManagement.setCreationtimeString(v.get(0).getCreationtimeString());//单据的创建时间
+                            //特殊要求
+                            if(StringUtils.isNotNull(v.get(0).getTsyq())){
+                                productionPlanningManagement.setSpecialRequirements(v.get(0).getTsyq());//特殊要求
+                            }
+
+
+                            //编号订单号
+                            List<Map> mapList = this.jdSalesOrderInfoS(k);//订单详情信息
+
+                            //拿到了关于这个订单的销售订单
+                            if(mapList.size()>0){
+                                if(StringUtils.isNotNull(mapList.get(0).get("F.PONP.Text"))){
+                                    productionPlanningManagement.setContractNumber(mapList.get(0).get("F.PONP.Text").toString());
+                                }
+                                //======处理基本的订单信息
+                                productionPlanningManagementMapper.insertProductionPlanningManagement(productionPlanningManagement);
+                                v.forEach(a->{
+                                    PlanTaskDetails planTaskDetails=new PlanTaskDetails();
+                                    planTaskDetails.setDemandDocument(a.getDocumentNumber());//需求单据号
+                                    planTaskDetails.setPlanId(productionPlanningManagement.getId());//计划id
+                                    planTaskDetails.setMaterialId(a.getMaterialCode());//原材料编码
+                                    planTaskDetails.setMaterialName(a.getMaterialName());//名称
+                                    planTaskDetails.setQuantity(a.getQuantity());//数量
+                                    planTaskDetails.setTimeOfRequest(a.getCompletionTime());//要货时间
+                                    planTaskDetails.setModelNumber(a.getModelNumber());//型号
+                                    planTaskDetails.setSpecification(a.getSpecification());//规格
+                                    planTaskDetails.setMaterialUnit(a.getUnit());//单位
+                                    planTaskDetails.setPower(a.getGl());//功率
+                                    planTaskDetails.setVoltage(a.getDianYaPinLv());//电压频率
+                                    planTaskDetails.setColour(a.getYanse());//颜色
+                                    planTaskDetails.setMingpai(a.getMingpai());//铭牌
+                                    planTaskDetails.setShuomingshu(a.getShuomingshu());//说明书
+                                    planTaskDetails.setHegezheng(a.getHegezheng());//合格证
+                                    planTaskDetails.setBaozhuangxiang(a.getBaozhuangxiang());//包装箱
+                                    planTaskDetails.setSwitchBox(a.getKaiguanxiang());//开关箱
+                                    planTaskDetails.setScheduledCommencement(a.getFPlanStartDate()); //计划开始时间
+                                    planTaskDetails.setScheduledCompletion(a.getFPlanFinishDate()); //计划完工时间
+                                    planTaskDetails.setRemark(a.getRemark());
+                                    planTaskDetailsMapper.insertPlanTaskDetails(planTaskDetails);
+                                });
+                            }
+                        });
+                    }
+                    System.out.println(1);
+                    if (jdProductionOrders.size() < 1000) {
+                        flag = false;
                     }
-                } catch (Exception e) {
-                    throw new RuntimeException(e);
+                    // 更新起始行号
+                    startRow += limit;
+                    // 如果返回的数据量小于5000,说明已经没有更多的数据,结束循环
                 }
-            });
+            } while (flag);
 
+//
+//            //生产信息
+//            List<JdProductionOrder> jdProductionOrders = JSON.parseArray(resultJson, JdProductionOrder.class);
+//
+//
+//            //查询系统中的订单信息
+//            ProductionPlanningManagement productionPlanningManagement1 = new ProductionPlanningManagement();
+//            productionPlanningManagement1.setIsWeldSheet("2");
+//            List<ProductionPlanningManagement> productionPlanningManagements = productionPlanningManagementMapper.selectProductionPlanningManagementList(productionPlanningManagement1);
+//
+//            List<String> collectTwo = productionPlanningManagements.stream().map(ProductionPlanningManagement::getOrderNumber).collect(Collectors.toSet())
+//                    .stream().collect(Collectors.toList());
+//
+////            List<String> cj= collectOne.stream().filter(item -> !collectTwo.contains(item)).collect(Collectors.toList());
+//            //分组
+//            // 按照订单号分组并去重
+////            Map<String, JdProductionOrder> groupedByDemandDocument = jdProductionOrders.stream().filter(item->!collectTwo.contains(item.getDemandDocument()))
+////                    .collect(Collectors.toMap(
+////                            JdProductionOrder::getDemandDocument,
+////                            order -> order,
+////                            (existing, replacement) -> existing // 保留第一个出现的订单
+////                    ));
+//            // 过滤掉 collectTwo 中包含的需求文档编号,并按 demandDocument 分组
+//            Map<String, List<JdProductionOrder>> groupedByDemandDocument = jdProductionOrders.stream()
+//                    .filter(item -> !collectTwo.contains(item.getDemandDocument()))
+//                    .collect(Collectors.groupingBy(JdProductionOrder::getDemandDocument));
+//            if (groupedByDemandDocument.size() > 0) {
+//                //订单循环
+//                groupedByDemandDocument.forEach((k, v) -> {
+//                    //计划编号
+//                    String planNumnber = generator.generateCommissionNumber();
+//                    //订单号
+//                    ProductionPlanningManagement productionPlanningManagement = new ProductionPlanningManagement();
+//                    productionPlanningManagement.setOrderNumber(k); //订单编号
+//                    productionPlanningManagement.setPlanNumber(planNumnber);//计划号
+//                    productionPlanningManagement.setPlanType("0"); //待生产
+//                    productionPlanningManagement.setTaskStatus("2");//待排产
+//                    productionPlanningManagement.setIsWeldSheet("2");//焊接订单
+//                    //计算订单的最大完成时间
+//                    Optional<LocalDateTime> maxCompletionTime = v.stream()
+//                            .map(item -> LocalDateTime.parse(item.getCompletionTime(), DateTimeFormatter.ISO_LOCAL_DATE_TIME))
+//                            .max(Comparator.naturalOrder());
+//
+//                    maxCompletionTime.ifPresent(maxTime -> {
+//                        System.out.println("最大的时间: " + maxTime);
+//                        String format1 = maxTime.format(formatter);
+//                        productionPlanningManagement.setCompletionTime(format1);//订单的最大完成时间
+//                    });
+//                    //备注
+//                    if (StringUtils.isNotNull(v.get(0).getRemark())) {
+//                        productionPlanningManagement.setRemark(v.get(0).getRemark()); //备注
+//                    }
+//                    //订单的创建时间
+//                    productionPlanningManagement.setCreationtimeString(v.get(0).getCreationtimeString());//单据的创建时间
+//                    //特殊要求
+//                    if (StringUtils.isNotNull(v.get(0).getTsyq())) {
+//                        productionPlanningManagement.setSpecialRequirements(v.get(0).getTsyq());//特殊要求
+//                    }
+//
+//
+//                    //编号订单号
+//                    List<Map> mapList = this.jdSalesOrderInfoS(k);//订单详情信息
+//
+//                    //拿到了关于这个订单的销售订单
+//                    if (mapList.size() > 0) {
+//                        if (StringUtils.isNotNull(mapList.get(0).get("F.PONP.Text"))) {
+//                            productionPlanningManagement.setContractNumber(mapList.get(0).get("F.PONP.Text").toString());
+//                        }
+//                        //======处理基本的订单信息
+//                        productionPlanningManagementMapper.insertProductionPlanningManagement(productionPlanningManagement);
+//                        v.forEach(a -> {
+//                            PlanTaskDetails planTaskDetails = new PlanTaskDetails();
+//                            planTaskDetails.setDemandDocument(a.getDocumentNumber());//需求单据号
+//                            planTaskDetails.setPlanId(productionPlanningManagement.getId());//计划id
+//                            planTaskDetails.setMaterialId(a.getMaterialCode());//原材料编码
+//                            planTaskDetails.setMaterialName(a.getMaterialName());//名称
+//                            planTaskDetails.setQuantity(a.getQuantity());//数量
+//                            planTaskDetails.setTimeOfRequest(a.getCompletionTime());//要货时间
+//                            planTaskDetails.setModelNumber(a.getModelNumber());//型号
+//                            planTaskDetails.setSpecification(a.getSpecification());//规格
+//                            planTaskDetails.setMaterialUnit(a.getUnit());//单位
+//                            planTaskDetails.setPower(a.getGl());//功率
+//                            planTaskDetails.setVoltage(a.getDianYaPinLv());//电压频率
+//                            planTaskDetails.setColour(a.getYanse());//颜色
+//                            planTaskDetails.setMingpai(a.getMingpai());//铭牌
+//                            planTaskDetails.setShuomingshu(a.getShuomingshu());//说明书
+//                            planTaskDetails.setHegezheng(a.getHegezheng());//合格证
+//                            planTaskDetails.setBaozhuangxiang(a.getBaozhuangxiang());//包装箱
+//                            planTaskDetails.setSwitchBox(a.getKaiguanxiang());//开关箱
+//                            planTaskDetails.setScheduledCommencement(a.getFPlanStartDate()); //计划开始时间
+//                            planTaskDetails.setScheduledCompletion(a.getFPlanFinishDate()); //计划完工时间
+//                            planTaskDetails.setRemark(a.getRemark());
+//                            planTaskDetailsMapper.insertPlanTaskDetails(planTaskDetails);
+//                        });
+//                    }
+//                });
+//            }
         } catch (Exception e) {
             throw new RuntimeException(e);
         }

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

@@ -68,4 +68,11 @@ public interface MaterialBaseInfoMapper
      * @return
      */
     int batchInsertMaterialBaseInfo(List<JdMaterialBaseInfoVo> mapList);
+
+    /**
+     * 查询所有Code
+     * @param materialBaseInfo
+     * @return
+     */
+    List<MaterialBaseInfo> selectMaterialBaseInfoListCode(MaterialBaseInfo materialBaseInfo);
 }

+ 2 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/MaterialInfoMapper.java

@@ -56,6 +56,8 @@ public interface MaterialInfoMapper
      */
     public int deleteMaterialInfoById(Long id);
 
+    public  int deleteMaterialInfoAll();
+
     /**
      * 批量删除物料信息
      * 

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

@@ -70,6 +70,13 @@ public interface PlanTaskDetailsMapper
      */
     List<PlanTaskDetailsVo> selectPlanTaskDetailsListInPlanId(Long [] ids);
 
+
+    /**
+     * 查询计划详情列表根据计划id
+     * @return
+     */
+    List<PlanTaskDetailsVo> selectPlanTaskDetailsListByOrderNumber(String orderNumber);
+
     /**
      * 查询
      */

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

@@ -73,6 +73,11 @@ public interface ProductionPlanningManagementMapper
      */
     public int deleteProductionPlanningManagementByIds(Long[] ids);
 
+    /**
+     * 普通单计划查询
+     * @param productionPlanningManagement
+     * @return
+     */
     List<ProductionPlanningManagementVo> selectProductionPlanningManagementListVo(ProductionPlanningManagement productionPlanningManagement);
 
     /**

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

@@ -69,4 +69,11 @@ public interface RingScanInformationMapper
      * @return 结果
      */
     public int deleteRingScanInformationByIds(Long[] ids);
+
+    /**
+     * 当前设备最近一次的扫描时间
+     * @param ringScanInformationQuery
+     * @return
+     */
+    RingScanInformation selectRingScanInformationListDateTimeMax(RingScanInformation ringScanInformationQuery);
 }

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

@@ -4,6 +4,7 @@ import java.util.List;
 
 import com.zkqy.amichi.domain.PlanTaskDetails;
 import com.zkqy.amichi.domain.vo.PlanTaskDetailsListAndFlowCardDataVo;
+import com.zkqy.amichi.domain.vo.PlanTaskDetailsVo;
 
 /**
  * 生产任务单明细Service接口
@@ -70,4 +71,12 @@ public interface IPlanTaskDetailsService
      */
     public List<PlanTaskDetailsListAndFlowCardDataVo> selectPlanTaskDetailsListAndFlowCardData(List<String> orderNumber);
 
+    /**
+     * 查询生产任务单明细列表
+     *
+     * @param orderNumber 生产任务单明细
+     * @return 生产任务单明细集合
+     */
+    public  List<PlanTaskDetailsVo> selectPlanTaskDetailsListByOrderNumber(String orderNumber);
+
 }

+ 6 - 1
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/PlanTaskDetailsServiceImpl.java

@@ -4,6 +4,7 @@ import java.util.List;
 
 import com.zkqy.amichi.domain.PlanTaskDetails;
 import com.zkqy.amichi.domain.vo.PlanTaskDetailsListAndFlowCardDataVo;
+import com.zkqy.amichi.domain.vo.PlanTaskDetailsVo;
 import com.zkqy.common.utils.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -102,5 +103,9 @@ public class PlanTaskDetailsServiceImpl implements IPlanTaskDetailsService
         return planTaskDetailsListAndFlowCardDataVos;
     }
 
-
+    @Override
+    public List<PlanTaskDetailsVo> selectPlanTaskDetailsListByOrderNumber(String orderNumber) {
+        List<PlanTaskDetailsVo> planTaskDetailsListAndFlowCardDataVos = planTaskDetailsMapper.selectPlanTaskDetailsListByOrderNumber(orderNumber);
+        return planTaskDetailsListAndFlowCardDataVos;
+    }
 }

+ 35 - 1
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/StationInformationServiceImpl.java

@@ -1,5 +1,6 @@
 package com.zkqy.amichi.service.impl;
 
+import java.time.Duration;
 import java.time.LocalDateTime;
 import java.util.Date;
 import java.util.List;
@@ -19,6 +20,7 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.zkqy.amichi.service.IStationInformationService;
+import org.springframework.transaction.annotation.Transactional;
 
 /**
  * 工位信息Service业务层处理
@@ -49,6 +51,9 @@ public class StationInformationServiceImpl implements IStationInformationService
     @Autowired
     private  PlanTaskDetailsServiceImpl planTaskDetailsService;
 
+    @Autowired
+    private  ProductionCardFlowMapper productionCardFlowMapper;
+
     @Autowired
     private RingScanInformationMapper ringScanInformationMapper;
 
@@ -341,12 +346,14 @@ public class StationInformationServiceImpl implements IStationInformationService
 
 
     /**
-     * 指环王扫描信息
+     * 指环王扫描信息hmc
      * @param stationProductScanningRingVo
      * @return
      */
     @Override
+    @Transactional
     public String stationProductScanningRing(StationProductScanningRingVo stationProductScanningRingVo) {
+        //判断扫的是不是厂内流转卡
 //        boolean fjqy = stationProductScanningRingVo.getContentInformation().contains("FJQY");
 //        if(!fjqy){
 //            return "请扫描相关二维码";
@@ -357,6 +364,23 @@ public class StationInformationServiceImpl implements IStationInformationService
             String deviceNumber=split[0];
             String deviceName=split[1];
             String scanningTime = stationProductScanningRingVo.getScanningTime();//扫描时间
+           //先获取到当前设备上次的扫描时间
+            RingScanInformation ringScanInformationQuery=new RingScanInformation();
+            ringScanInformationQuery.setDeviceName(deviceName);
+            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() < 2;
+                //判断两次时间是否大于
+                if (isTwoMinutesPassed) {
+                  return "同一设备,两分钟之内不能重复扫描";
+                }
+            }
             String contentInformation = stationProductScanningRingVo.getContentInformation();//扫描内容
             RingScanInformation ringScanInformation=new RingScanInformation();
             ringScanInformation.setContentInformation(contentInformation);
@@ -374,6 +398,15 @@ public class StationInformationServiceImpl implements IStationInformationService
             ringScanInformation.setNativeNumbering(nativeNumber);
             int i2 = ringScanInformationMapper.insertRingScanInformation(ringScanInformation);
             if(i2>0){
+                //根据序列号id
+                ProductionCardFlow productionCardFlow=new ProductionCardFlow();
+                productionCardFlow.setDemandDocumentNumber(nativeNumber);
+                List<ProductionCardFlow> productionCardFlows = productionCardFlowMapper.selectProductionCardFlowList(productionCardFlow);
+                if(productionCardFlows.size()>0){
+
+                }else {
+                    return "未有当前生产任务";
+                }
                 return "扫描成功";
             }else {
                 return "扫描失败";
@@ -381,6 +414,7 @@ public class StationInformationServiceImpl implements IStationInformationService
         } catch (Exception e) {
             throw new RuntimeException(e);
         }
+
 //        //产品扫描逻辑
 //            String[] content = stationProductScanningRingVo.getContentInformation().split("&");
 //            StationInformation stationInformation=new StationInformation();

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

@@ -23,7 +23,7 @@ public class MaUtils {
         hints.put(EncodeHintType.MARGIN, margin); // 设置边距
         try {
             // 生成二维码的位矩阵
-            BitMatrix bitMatrix = qrCodeWriter.encode(text, BarcodeFormat.QR_CODE, 90, 90,hints);
+            BitMatrix bitMatrix = qrCodeWriter.encode(text, BarcodeFormat.QR_CODE, 80, 80,hints);
             // 将BitMatrix转为BufferedImage
             BufferedImage image = MatrixToImageWriter.toBufferedImage(bitMatrix);
             ByteArrayOutputStream baos = new ByteArrayOutputStream();

+ 23 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/utils/aa.java

@@ -0,0 +1,23 @@
+package com.zkqy.amichi.utils;
+
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+
+public class aa {
+    public static void main(String[] args) {
+
+        // 获取当前时间
+        LocalDateTime now = LocalDateTime.now();
+        System.out.println("当前时间: " + now);
+
+        // 减去三个月
+        LocalDateTime threeMonthsAgo = now.minusMonths(3);
+        System.out.println("三个月前的时间: " + threeMonthsAgo);
+
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        String format = now.format(formatter);
+        System.out.println(format);
+    }
+}

+ 130 - 104
zkqy-fujian-amichi/src/main/resources/mapper/MaterialBaseInfoMapper.xml

@@ -42,27 +42,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectMaterialBaseInfoList" parameterType="com.zkqy.amichi.domain.MaterialBaseInfo" resultMap="MaterialBaseInfoResult">
         <include refid="selectMaterialBaseInfoVo"/>
         <where>  
-            <if test="item.materialCode != null  and materialCode != ''"> and material_code = #{materialCode}</if>
-            <if test="item.materialName != null  and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
-            <if test="item.specification != null  and specification != ''"> and specification = #{specification}</if>
-            <if test="item.model != null  and model != ''"> and model = #{model}</if>
-            <if test="item.coreLength != null  and coreLength != ''"> and core_length = #{coreLength}</if>
-            <if test="item.caseEndCover != null  and caseEndCover != ''"> and case_end_cover = #{caseEndCover}</if>
-            <if test="item.dataInfo != null  and dataInfo != ''"> and data_info = #{dataInfo}</if>
-            <if test="item.phaseNumber != null  and phaseNumber != ''"> and phase_number = #{phaseNumber}</if>
-            <if test="item.colour != null  and colour != ''"> and colour = #{colour}</if>
-            <if test="item.specificationBook != null  and specificationBook != ''"> and specification_book = #{specificationBook}</if>
-            <if test="item.certificateOfConformity != null  and certificateOfConformity != ''"> and certificate_of_conformity = #{certificateOfConformity}</if>
-            <if test="item.platterInterface != null  and platterInterface != ''"> and platter_interface = #{platterInterface}</if>
-            <if test="item.power != null  and power != ''"> and power = #{power}</if>
-            <if test="item.productCode != null  and productCode != ''"> and product_code = #{productCode}</if>
-            <if test="item.dogtag != null "> and dogtag = #{dogtag}</if>
-            <if test="item.voltageFrequency != null  and voltageFrequency != ''"> and voltage_frequency = #{voltageFrequency}</if>
-            <if test="item.switchBox != null  and switchBox != ''"> and switch_box = #{switchBox}</if>
-            <if test="item.specialRequirements != null  and specialRequirements != ''"> and special_requirements = #{specialRequirements}</if>
-            <if test="item.packingBox != null  and packingBox != ''"> and packing_box = #{packingBox}</if>
-            <if test="item.createById != null "> and create_by_id = #{createById}</if>
-            <if test="item.updateById != null "> and update_by_id = #{updateById}</if>
+            <if test="materialCode != null  and materialCode != ''"> and material_code = #{materialCode}</if>
+            <if test="materialName != null  and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
+            <if test="specification != null  and specification != ''"> and specification = #{specification}</if>
+            <if test="model != null  and model != ''"> and model = #{model}</if>
+            <if test="coreLength != null  and coreLength != ''"> and core_length = #{coreLength}</if>
+            <if test="caseEndCover != null  and caseEndCover != ''"> and case_end_cover = #{caseEndCover}</if>
+            <if test="dataInfo != null  and dataInfo != ''"> and data_info = #{dataInfo}</if>
+            <if test="phaseNumber != null  and phaseNumber != ''"> and phase_number = #{phaseNumber}</if>
+            <if test="colour != null  and colour != ''"> and colour = #{colour}</if>
+            <if test="specificationBook != null  and specificationBook != ''"> and specification_book = #{specificationBook}</if>
+            <if test="certificateOfConformity != null  and certificateOfConformity != ''"> and certificate_of_conformity = #{certificateOfConformity}</if>
+            <if test="platterInterface != null  and platterInterface != ''"> and platter_interface = #{platterInterface}</if>
+            <if test="power != null  and power != ''"> and power = #{power}</if>
+            <if test="productCode != null  and productCode != ''"> and product_code = #{productCode}</if>
+            <if test="dogtag != null "> and dogtag = #{dogtag}</if>
+            <if test="voltageFrequency != null  and voltageFrequency != ''"> and voltage_frequency = #{voltageFrequency}</if>
+            <if test="switchBox != null  and switchBox != ''"> and switch_box = #{switchBox}</if>
+            <if test="specialRequirements != null  and specialRequirements != ''"> and special_requirements = #{specialRequirements}</if>
+            <if test="packingBox != null  and packingBox != ''"> and packing_box = #{packingBox}</if>
+            <if test="createById != null "> and create_by_id = #{createById}</if>
+            <if test="updateById != null "> and update_by_id = #{updateById}</if>
         </where>
     </select>
     
@@ -70,67 +70,93 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectMaterialBaseInfoVo"/>
         where id = #{id}
     </select>
+    <select id="selectMaterialBaseInfoListCode" resultType="com.zkqy.amichi.domain.MaterialBaseInfo">
+        select material_code from fjqydb.material_base_info
+        <where>
+            <if test="materialCode != null  and materialCode != ''"> and material_code = #{materialCode}</if>
+            <if test="materialName != null  and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
+            <if test="specification != null  and specification != ''"> and specification = #{specification}</if>
+            <if test="model != null  and model != ''"> and model = #{model}</if>
+            <if test="coreLength != null  and coreLength != ''"> and core_length = #{coreLength}</if>
+            <if test="caseEndCover != null  and caseEndCover != ''"> and case_end_cover = #{caseEndCover}</if>
+            <if test="dataInfo != null  and dataInfo != ''"> and data_info = #{dataInfo}</if>
+            <if test="phaseNumber != null  and phaseNumber != ''"> and phase_number = #{phaseNumber}</if>
+            <if test="colour != null  and colour != ''"> and colour = #{colour}</if>
+            <if test="specificationBook != null  and specificationBook != ''"> and specification_book = #{specificationBook}</if>
+            <if test="certificateOfConformity != null  and certificateOfConformity != ''"> and certificate_of_conformity = #{certificateOfConformity}</if>
+            <if test="platterInterface != null  and platterInterface != ''"> and platter_interface = #{platterInterface}</if>
+            <if test="power != null  and power != ''"> and power = #{power}</if>
+            <if test="productCode != null  and productCode != ''"> and product_code = #{productCode}</if>
+            <if test="dogtag != null "> and dogtag = #{dogtag}</if>
+            <if test="voltageFrequency != null  and voltageFrequency != ''"> and voltage_frequency = #{voltageFrequency}</if>
+            <if test="switchBox != null  and switchBox != ''"> and switch_box = #{switchBox}</if>
+            <if test="specialRequirements != null  and specialRequirements != ''"> and special_requirements = #{specialRequirements}</if>
+            <if test="packingBox != null  and packingBox != ''"> and packing_box = #{packingBox}</if>
+            <if test="createById != null "> and create_by_id = #{createById}</if>
+            <if test="updateById != null "> and update_by_id = #{updateById}</if>
+        </where>
+    </select>
 
     <insert id="insertMaterialBaseInfo" parameterType="com.zkqy.amichi.domain.MaterialBaseInfo" useGeneratedKeys="true" keyProperty="id">
         insert into  fjqydb.material_base_info
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="item.materialCode != null and materialCode != ''">material_code,</if>
-            <if test="item.materialName != null and materialName != ''">material_name,</if>
-            <if test="item.specification != null">specification,</if>
-            <if test="item.model != null">model,</if>
-            <if test="item.coreLength != null">core_length,</if>
-            <if test="item.caseEndCover != null">case_end_cover,</if>
-            <if test="item.dataInfo != null">data_info,</if>
-            <if test="item.phaseNumber != null">phase_number,</if>
-            <if test="item.colour != null">colour,</if>
-            <if test="item.specificationBook != null">specification_book,</if>
-            <if test="item.certificateOfConformity != null">certificate_of_conformity,</if>
-            <if test="item.platterInterface != null">platter_interface,</if>
-            <if test="item.power != null">power,</if>
-            <if test="item.productCode != null">product_code,</if>
-            <if test="item.dogtag != null">dogtag,</if>
-            <if test="item.voltageFrequency != null">voltage_frequency,</if>
-            <if test="item.switchBox != null">switch_box,</if>
-            <if test="item.specialRequirements != null">special_requirements,</if>
-            <if test="item.packingBox != null">packing_box,</if>
-            <if test="item.remark != null">remark,</if>
-            <if test="item.createById != null">create_by_id,</if>
-            <if test="item.createBy != null">create_by,</if>
-            <if test="item.createTime != null">create_time,</if>
-            <if test="item.updateById != null">update_by_id,</if>
-            <if test="item.updateBy != null">update_by,</if>
-            <if test="item.updateTime != null">update_time,</if>
-            <if test="item.delFlag != null">del_flag,</if>
+            <if test="materialCode != null and materialCode != ''">material_code,</if>
+            <if test="materialName != null and materialName != ''">material_name,</if>
+            <if test="specification != null">specification,</if>
+            <if test="model != null">model,</if>
+            <if test="coreLength != null">core_length,</if>
+            <if test="caseEndCover != null">case_end_cover,</if>
+            <if test="dataInfo != null">data_info,</if>
+            <if test="phaseNumber != null">phase_number,</if>
+            <if test="colour != null">colour,</if>
+            <if test="specificationBook != null">specification_book,</if>
+            <if test="certificateOfConformity != null">certificate_of_conformity,</if>
+            <if test="platterInterface != null">platter_interface,</if>
+            <if test="power != null">power,</if>
+            <if test="productCode != null">product_code,</if>
+            <if test="dogtag != null">dogtag,</if>
+            <if test="voltageFrequency != null">voltage_frequency,</if>
+            <if test="switchBox != null">switch_box,</if>
+            <if test="specialRequirements != null">special_requirements,</if>
+            <if test="packingBox != null">packing_box,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="item.materialCode != null and materialCode != ''">#{materialCode},</if>
-            <if test="item.materialName != null and materialName != ''">#{materialName},</if>
-            <if test="item.specification != null">#{specification},</if>
-            <if test="item.model != null">#{model},</if>
-            <if test="item.coreLength != null">#{coreLength},</if>
-            <if test="item.caseEndCover != null">#{caseEndCover},</if>
-            <if test="item.dataInfo != null">#{dataInfo},</if>
-            <if test="item.phaseNumber != null">#{phaseNumber},</if>
-            <if test="item.colour != null">#{colour},</if>
-            <if test="item.specificationBook != null">#{specificationBook},</if>
-            <if test="item.certificateOfConformity != null">#{certificateOfConformity},</if>
-            <if test="item.platterInterface != null">#{platterInterface},</if>
-            <if test="item.power != null">#{power},</if>
-            <if test="item.productCode != null">#{productCode},</if>
-            <if test="item.dogtag != null">#{dogtag},</if>
-            <if test="item.voltageFrequency != null">#{voltageFrequency},</if>
-            <if test="item.switchBox != null">#{switchBox},</if>
-            <if test="item.specialRequirements != null">#{specialRequirements},</if>
-            <if test="item.packingBox != null">#{packingBox},</if>
+            <if test="materialCode != null and materialCode != ''">#{materialCode},</if>
+            <if test="materialName != null and materialName != ''">#{materialName},</if>
+            <if test="specification != null">#{specification},</if>
+            <if test="model != null">#{model},</if>
+            <if test="coreLength != null">#{coreLength},</if>
+            <if test="caseEndCover != null">#{caseEndCover},</if>
+            <if test="dataInfo != null">#{dataInfo},</if>
+            <if test="phaseNumber != null">#{phaseNumber},</if>
+            <if test="colour != null">#{colour},</if>
+            <if test="specificationBook != null">#{specificationBook},</if>
+            <if test="certificateOfConformity != null">#{certificateOfConformity},</if>
+            <if test="platterInterface != null">#{platterInterface},</if>
+            <if test="power != null">#{power},</if>
+            <if test="productCode != null">#{productCode},</if>
+            <if test="dogtag != null">#{dogtag},</if>
+            <if test="voltageFrequency != null">#{voltageFrequency},</if>
+            <if test="switchBox != null">#{switchBox},</if>
+            <if test="specialRequirements != null">#{specialRequirements},</if>
+            <if test="packingBox != null">#{packingBox},</if>
 
-            <if test="item.remark != null">#{remark},</if>
-            <if test="item.createById != null">#{createById},</if>
-            <if test="item.createBy != null">#{createBy},</if>
-            <if test="item.createTime != null">#{createTime},</if>
-            <if test="item.updateById != null">#{updateById},</if>
-            <if test="item.updateBy != null">#{updateBy},</if>
-            <if test="item.updateTime != null">#{updateTime},</if>
-            <if test="item.delFlag != null">#{delFlag},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
          </trim>
     </insert>
     <insert id="batchInsertMaterialBaseInfo" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.List">
@@ -151,7 +177,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 <if test="item.platterInterface != null">platter_interface,</if>
                 <if test="item.power != null">power,</if>
                 <if test="item.productCode != null">product_code,</if>
-                <if test="item.dogtag != null">dogtag,</if>
+                <if test="item.dogtag != null and item.dogtag != ''">dogtag,</if>
                 <if test="item.voltageFrequency != null">voltage_frequency,</if>
                 <if test="item.switchBox != null">switch_box,</if>
                 <if test="item.specialRequirements != null">special_requirements,</if>
@@ -180,7 +206,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 <if test="item.platterInterface != null">#{item.platterInterface},</if>
                 <if test="item.power != null">#{item.power},</if>
                 <if test="item.productCode != null">#{item.productCode},</if>
-                <if test="item.dogtag != null">#{item.dogtag},</if>
+                <if test="item.dogtag != null and item.dogtag != ''">#{item.dogtag},</if>
                 <if test="item.voltageFrequency != null">#{item.voltageFrequency},</if>
                 <if test="item.switchBox != null">#{item.switchBox},</if>
                 <if test="item.specialRequirements != null">#{item.specialRequirements},</if>
@@ -202,33 +228,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateMaterialBaseInfo" parameterType="com.zkqy.amichi.domain.MaterialBaseInfo">
         update  fjqydb.material_base_info
         <trim prefix="SET" suffixOverrides=",">
-            <if test="item.materialCode != null and materialCode != ''">material_code = #{materialCode},</if>
-            <if test="item.materialName != null and materialName != ''">material_name = #{materialName},</if>
-            <if test="item.specification != null">specification = #{specification},</if>
-            <if test="item.model != null">model = #{model},</if>
-            <if test="item.coreLength != null">core_length = #{coreLength},</if>
-            <if test="item.caseEndCover != null">case_end_cover = #{caseEndCover},</if>
-            <if test="item.dataInfo != null">data_info = #{dataInfo},</if>
-            <if test="item.phaseNumber != null">phase_number = #{phaseNumber},</if>
-            <if test="item.colour != null">colour = #{colour},</if>
-            <if test="item.specificationBook != null">specification_book = #{specificationBook},</if>
-            <if test="item.certificateOfConformity != null">certificate_of_conformity = #{certificateOfConformity},</if>
-            <if test="item.platterInterface != null">platter_interface = #{platterInterface},</if>
-            <if test="item.power != null">power = #{power},</if>
-            <if test="item.productCode != null">product_code = #{productCode},</if>
-            <if test="item.dogtag != null">dogtag = #{dogtag},</if>
-            <if test="item.voltageFrequency != null">voltage_frequency = #{voltageFrequency},</if>
-            <if test="item.switchBox != null">switch_box = #{switchBox},</if>
-            <if test="item.specialRequirements != null">special_requirements = #{specialRequirements},</if>
-            <if test="item.packingBox != null">packing_box = #{packingBox},</if>
-            <if test="item.remark != null">remark = #{remark},</if>
-            <if test="item.createById != null">create_by_id = #{createById},</if>
-            <if test="item.createBy != null">create_by = #{createBy},</if>
-            <if test="item.createTime != null">create_time = #{createTime},</if>
-            <if test="item.updateById != null">update_by_id = #{updateById},</if>
-            <if test="item.updateBy != null">update_by = #{updateBy},</if>
-            <if test="item.updateTime != null">update_time = #{updateTime},</if>
-            <if test="item.delFlag != null">del_flag = #{delFlag},</if>
+            <if test="materialCode != null and materialCode != ''">material_code = #{materialCode},</if>
+            <if test="materialName != null and materialName != ''">material_name = #{materialName},</if>
+            <if test="specification != null">specification = #{specification},</if>
+            <if test="model != null">model = #{model},</if>
+            <if test="coreLength != null">core_length = #{coreLength},</if>
+            <if test="caseEndCover != null">case_end_cover = #{caseEndCover},</if>
+            <if test="dataInfo != null">data_info = #{dataInfo},</if>
+            <if test="phaseNumber != null">phase_number = #{phaseNumber},</if>
+            <if test="colour != null">colour = #{colour},</if>
+            <if test="specificationBook != null">specification_book = #{specificationBook},</if>
+            <if test="certificateOfConformity != null">certificate_of_conformity = #{certificateOfConformity},</if>
+            <if test="platterInterface != null">platter_interface = #{platterInterface},</if>
+            <if test="power != null">power = #{power},</if>
+            <if test="productCode != null">product_code = #{productCode},</if>
+            <if test="dogtag != null">dogtag = #{dogtag},</if>
+            <if test="voltageFrequency != null">voltage_frequency = #{voltageFrequency},</if>
+            <if test="switchBox != null">switch_box = #{switchBox},</if>
+            <if test="specialRequirements != null">special_requirements = #{specialRequirements},</if>
+            <if test="packingBox != null">packing_box = #{packingBox},</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>
         </trim>
         where id = #{id}
     </update>

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

@@ -339,6 +339,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         delete from {DBNAME}.materialInfo where id = #{id}
     </delete>
 
+    <delete id="deleteMaterialInfoAll">
+        truncate table fjqydb.materialInfo
+    </delete>
+
     <delete id="deleteMaterialInfoByIds" parameterType="String">
         delete from {DBNAME}.materialInfo where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">

+ 38 - 0
zkqy-fujian-amichi/src/main/resources/mapper/PlanTaskDetailsMapper.xml

@@ -73,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="taskNodeKey"    column="task_node_key"    />
         <result property="demandDocument"    column="demand_document"/>
         <result property="orderNumber"    column="order_number"/>
+        <result property="completionTime"    column="completion_time"/>
     </resultMap>
 
 
@@ -171,6 +172,8 @@ 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="scheduledCompletion != null">scheduled_completion,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="taskId != null">#{taskId},</if>
@@ -214,6 +217,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="description != null">#{description},</if>
             <if test="baozhuangxiang != null">#{baozhuangxiang},</if>
             <if test="switchBox != null">#{switchBox},</if>
+            <if test="scheduledCommencement != null">#{scheduledCommencement},</if>
+            <if test="scheduledCompletion != null">#{scheduledCompletion},</if>
          </trim>
     </insert>
 
@@ -287,6 +292,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </select>
 
+    <select id="selectPlanTaskDetailsListByOrderNumber" parameterType="String" resultMap="PlanTaskDetailsResultVo">
+        select ptd.id,
+               ptd.material_id,
+               ptd.material_name,
+               ptd.model_number,
+               ptd.specification,
+               ptd.material_unit,
+               FORMAT(ptd.quantity,2) as quantity,
+               ptd.sparea,
+               ptd.spareb,
+               ptd.sparec,
+               ptd.remark,
+        ptd.create_by_id,
+        ptd.create_by,
+        ptd.create_time,
+        ptd.update_by_id,
+        ptd.update_by,
+        ptd.update_time,
+        ptd.del_flag,
+        ptd.data_approval_status,
+        ptd.process_key,
+        ptd.task_process_key,
+        ptd.task_node_key,
+        ptd.plan_id,
+        ptd.demand_document,
+        ppm.completion_time,
+        ppm.order_number from fjqydb.plan_task_details as ptd
+        left join fjqydb.production_planning_management ppm
+        on (ptd.plan_id=ppm.id)
+        where ppm.order_number=#{orderNumber} and  is_weld_sheet=2
+        order by material_name
+    </select>
+
     <!--    流转卡数据查询-->
     <resultMap type="com.zkqy.amichi.domain.vo.PlanTaskDetailsListAndFlowCardDataVo" id="PlanTaskDetailsListAndFlowCardDataVoRp">
         <result property="orderNumber"    column="production_order_list_id"    />

+ 12 - 5
zkqy-fujian-amichi/src/main/resources/mapper/ProductionPlanningManagementMapper.xml

@@ -34,6 +34,7 @@
         <result property="schedulingState"    column="scheduling_state"    />
         <result property="planType"    column="plan_type"    />
         <result property="specialRequirements"    column="special_requirements"    />
+        <result property="isWeldSheet" column="is_weld_sheet"></result>
     </resultMap>
 
 
@@ -66,10 +67,12 @@
         <result property="approvedByDepartment"    column="approved_by_department"    />
         <result property="schedulingState"    column="scheduling_state"    />
         <result property="planType"    column="plan_type"    />
+        <result property="creationtimeString"    column="creationtimeString"    />
+
     </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 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 from {DBNAME}.production_planning_management
     </sql>
 
     <select id="selectProductionPlanningManagementList" parameterType="com.zkqy.amichi.domain.ProductionPlanningManagement" resultMap="ProductionPlanningManagementResult">
@@ -96,7 +99,7 @@
             <if test="approvedByDepartment != null  and approvedByDepartment != ''"> and approved_by_department = #{approvedByDepartment}</if>
             <if test="schedulingState != null  and schedulingState != ''"> and scheduling_state = #{schedulingState}</if>
             <if test="planType != null  and planType != ''"> and plan_type = #{planType}</if>
-
+            <if test="isWeldSheet!=null and isWeldSheet!=''">and is_weld_sheet=#{isWeldSheet} </if>
         </where>
     </select>
 
@@ -112,7 +115,7 @@
             <if test="id!=null and id!=''"> and id = #{id}</if>
             <if test="planNumber != null  and planNumber != ''"> and plan_number = #{planNumber}</if>
             <if test="planName != null  and planName != ''"> and plan_name like concat('%', #{planName}, '%')</if>
-            <if test="orderNumber != null  and orderNumber != ''"> and order_number = #{orderNumber}</if>
+            <if test="orderNumber != null  and orderNumber != ''"> and order_number like concat('%', #{orderNumber}, '%')</if>
             <if test="quantity != null  and quantity != ''"> and quantity = #{quantity}</if>
             <if test="completionTime != null  and completionTime != ''"> and completion_time = #{completionTime}</if>
             <if test="taskStatus != null  and taskStatus != ''"> and task_status = #{taskStatus}</if>
@@ -131,7 +134,9 @@
             <if test="approvedByDepartment != null  and approvedByDepartment != ''"> and approved_by_department = #{approvedByDepartment}</if>
             <if test="schedulingState != null  and schedulingState != ''"> and scheduling_state = #{schedulingState}</if>
             <if test="planType != null  and planType != ''"> and plan_type = #{planType}</if>
+            <if test="tabPosition !=null and tabPosition!=''">and is_weld_sheet =#{tabPosition}  </if>
         </where>
+        order by creationtimeString desc
     </select>
     <select id="selectProductionPlanningManagementListVoIn"
             resultType="com.zkqy.amichi.domain.vo.ProductionPlanningManagementVo">
@@ -245,7 +250,8 @@
             <if test="schedulingState != null  and schedulingState != ''">scheduling_state,</if>
             <if test="planType!=null and planType != ''">plan_type,</if>
             <if test="specialRequirements!=null and specialRequirements != ''">special_requirements,</if>
-            <if test="creationtimeString!=null and creationtimeString != ''">creationtimeString</if>
+            <if test="creationtimeString!=null and creationtimeString != ''">creationtimeString,</if>
+            <if test="isWeldSheet!=null and isWeldSheet != ''">is_weld_sheet</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="planNumber != null">#{planNumber},</if>
@@ -276,7 +282,8 @@
             <if test="schedulingState != null  and schedulingState != ''">#{schedulingState},</if>
             <if test="planType!=null and planType != ''">#{planType},</if>
             <if test="specialRequirements!=null and specialRequirements != ''">#{specialRequirements},</if>
-            <if test="creationtimeString!=null and creationtimeString != ''">#{creationtimeString}</if>
+            <if test="creationtimeString!=null and creationtimeString != ''">#{creationtimeString},</if>
+            <if test="isWeldSheet!=null and isWeldSheet != ''">#{isWeldSheet}</if>
         </trim>
     </insert>
 

+ 13 - 0
zkqy-fujian-amichi/src/main/resources/mapper/RingScanInformationMapper.xml

@@ -92,6 +92,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </select>
 
+    <select id="selectRingScanInformationListDateTimeMax"
+            parameterType="com.zkqy.amichi.domain.RingScanInformation" resultMap="RingScanInformationResult">
+        <include refid="selectRingScanInformationVo"/>
+        <where>
+            <if test="deviceNumber != null  and deviceNumber != ''"> and device_number = #{deviceNumber}</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>
+        </where>
+        order by scanning_time DESC
+        LIMIT 1
+    </select>
+
     <insert id="insertRingScanInformation" parameterType="com.zkqy.amichi.domain.RingScanInformation" useGeneratedKeys="true" keyProperty="id">
         insert into fjqydb.ring_scan_information
         <trim prefix="(" suffix=")" suffixOverrides=",">

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

@@ -139,6 +139,15 @@ public class DetectionResultController extends BaseController
         return success(detectionResultService.selectDetectionResultById(id));
     }
 
+
+    @GetMapping(value = "/selectDetectionResultByWtNumber/{wtNumber}")
+    @ApiOperation(value = "获取性能检测结果详细信息")
+    public AjaxResult selectDetectionResultByWtNumber(@PathVariable("wtNumber") String wtNumber)
+    {
+        return success(detectionResultService.selectDetectionResultByWtNumber(wtNumber));
+    }
+
+
     /**
      * 新增性能检测结果
      */

+ 5 - 0
zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/controller/EntrustedInformationController.java

@@ -11,6 +11,7 @@ import javax.servlet.http.HttpServletResponse;
 import com.github.pagehelper.PageInfo;
 import com.zkqy.common.constant.HttpStatus;
 import com.zkqy.common.utils.PageUtils;
+import com.zkqy.common.utils.StringUtils;
 import com.zkqy.laboratory.domain.vo.WtRVo;
 import com.zkqy.laboratory.domain.vo.WtVo;
 import com.zkqy.system.mapper.SysDictDataMapper;
@@ -63,8 +64,12 @@ public class EntrustedInformationController extends BaseController
                 }
                 item.setDetectionTypeItemList(stringList);
             });
+            if(StringUtils.isNotNull(entrustedInformation.getOrderStatus()) &&!entrustedInformation.getOrderStatus().equals("0")){
+                item.setOrderStatus(entrustedInformation.getOrderStatus());
+            }
             return item;
         }).collect(Collectors.toList());
+
         TableDataInfo rspData = new TableDataInfo();
         rspData.setCode(HttpStatus.SUCCESS);
         rspData.setMsg("查询成功");

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

@@ -1,6 +1,8 @@
 package com.zkqy.laboratory.domain;
 
 import java.util.Date;
+import java.util.List;
+
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.zkqy.common.core.domain.BaseEntity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -29,6 +31,17 @@ public class DetectionResult extends BaseEntity
     @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
     private String date;
 
+    //日期数组
+    private List<String> dateList;
+
+    public List<String> getDateList() {
+        return dateList;
+    }
+
+    public void setDateList(List<String> dateList) {
+        this.dateList = dateList;
+    }
+
     /** 批号 */
     @Excel(name = "批号")
     private String lotNumber;
@@ -155,6 +168,17 @@ public class DetectionResult extends BaseEntity
     @Excel(name = "温度")
     private  String experStandard;
 
+    @Excel(name = "tab选项")
+    private  String tabPosition;
+
+    public String getTabPosition() {
+        return tabPosition;
+    }
+
+    public void setTabPosition(String tabPosition) {
+        this.tabPosition = tabPosition;
+    }
+
     public String getTemperature() {
         return temperature;
     }

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

@@ -21,6 +21,13 @@ public interface DetectionResultMapper
      */
     public DetectionResult selectDetectionResultById(Long id);
 
+    /**
+     * 委托单号查询结果信息
+     * @param WtNumber
+     * @return
+     */
+    public DetectionResult selectDetectionResultByWtNumber(String WtNumber);
+
     /**
      * 查询性能检测结果列表
      * 

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

@@ -58,4 +58,6 @@ public interface IDetectionResultService
      * @return 结果
      */
     public int deleteDetectionResultById(Long id);
+
+    public DetectionResult selectDetectionResultByWtNumber(String wtNumber);
 }

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

@@ -98,4 +98,9 @@ public class DetectionResultServiceImpl implements IDetectionResultService
     {
         return detectionResultMapper.deleteDetectionResultById(id);
     }
+
+    @Override
+    public DetectionResult selectDetectionResultByWtNumber(String wtNumber) {
+        return detectionResultMapper.selectDetectionResultByWtNumber(wtNumber);
+    }
 }

+ 2 - 3
zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/service/impl/LaboratorySampleCollectionServiceImpl.java

@@ -138,8 +138,7 @@ public class LaboratorySampleCollectionServiceImpl implements ILaboratorySampleC
                         collect.remove("3");
                         collect.add("5");
                     }
-                    // 这里可以添加查询逻辑
-                }else if(laboratorySampleCollection.getSampleTestingType().equals("2")) {
+                }else if(laboratorySampleCollection.getSampleTestingType().equals("2")) { //化学元素
                     // 查询委托单信息
                     EntrustedInformation entrustedInformation = entrustedInformationMapper.selectEntrustedInformationById(laboratorySampleCollection.getWtId());
                     String[] split = entrustedInformation.getDetectionTypeItem().split(",");
@@ -148,7 +147,6 @@ public class LaboratorySampleCollectionServiceImpl implements ILaboratorySampleC
                         collect.remove("4");
                         collect.add("6");
                     }
-                    // 这里可以添加查询逻辑
                 }
                 //查询当前委托单收样信息状态等于 测试中和待测试的有多少
                 LaboratorySampleCollection l1=new LaboratorySampleCollection();
@@ -161,6 +159,7 @@ public class LaboratorySampleCollectionServiceImpl implements ILaboratorySampleC
                 l2.setSampleStatus("5");
                 List<LaboratorySampleCollection> laboratorySampleCollectionsOne = laboratorySampleCollectionMapper.selectLaboratorySampleCollectionList(l1);
                 List<LaboratorySampleCollection> laboratorySampleCollectionsTwo = laboratorySampleCollectionMapper.selectLaboratorySampleCollectionList(l2);
+
                 if(laboratorySampleCollectionsOne.size()==0&&laboratorySampleCollectionsTwo.size()==0){
                     String collect1 = collect.stream().collect(Collectors.joining(","));
                     EntrustedInformation entrustedInformation = new EntrustedInformation();

+ 19 - 1
zkqy-laboratory-information/src/main/resources/mapper/DetectionResultMapper.xml

@@ -58,7 +58,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectDetectionResultVo"/>
         <where>  
             <if test="serialNumber != null  and serialNumber != ''"> and serial_number = #{serialNumber}</if>
-            <if test="date != null "> and `date` = #{date}</if>
+            <if test="dateList != null and dateList[0]!= null and dateList[0]!=''">
+                <![CDATA[ and DATE(`date`) >= #{dateList[0]}]]>
+            </if>
+            <if test="dateList != null and dateList[1]!= null and dateList[1]!=''">
+                <![CDATA[ and DATE(`date`) <= #{dateList[1]}]]>
+            </if>
             <if test="lotNumber != null  and lotNumber != ''"> and lot_number = #{lotNumber}</if>
             <if test="specification != null  and specification != ''"> and specification = #{specification}</if>
             <if test="alloyState != null  and alloyState != ''"> and alloy_state = #{alloyState}</if>
@@ -90,10 +95,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="wtNumber != null  and wtNumber != ''"> and wt_number = #{wtNumber}</if>
             <if test="temperature != null  and temperature != ''"> and temperature = #{temperature}</if>
             <if test="experStandard != null  and experStandard != ''"> and exper_standard = #{experStandard}</if>
+            <if test="tabPosition!=null and tabPosition!=''">and data_approval_status = #{tabPosition}</if>
         </where>
+        group by  wt_number
         order by id desc
     </select>
     
+    <select id="selectDetectionResultByWtNumber" parameterType="string" resultMap="DetectionResultResult">
+        select CEIL(avg(tensile_value_mpa_two)*100) /100.0  as tensile_value_mpa_two , CEIL(avg(rate_of_elongation_two)*100)/100.0  as rate_of_elongation_two,id, serial_number, `date`, lot_number, specification, alloy_state, manufacturer, tensile_value_mpa, rate_of_elongation, fracture_deformation,
+                tensile_strength_avg, fracture_force_rate_avg, repeat_survey, product_type, production_direction,
+                standard, decision_result, lsl_one, usl, lsl2, inspector, performance_creation_time, 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,wt_number,temperature,exper_standard
+        from limsdb.detection_result
+        where wt_number = #{wtNumber}
+        group by  wt_number
+    </select>
+
+
     <select id="selectDetectionResultById" parameterType="Long" resultMap="DetectionResultResult">
         <include refid="selectDetectionResultVo"/>
         where id = #{id}

+ 8 - 3
zkqy-laboratory-information/src/main/resources/mapper/EntrustedInformationMapper.xml

@@ -126,7 +126,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="endTime != null">
                 <![CDATA[ and DATE(ei.create_time) <= #{endTime}]]>
             </if>
-            <if test="orderStatus != null  and orderStatus != ''"> and ei.order_status = #{orderStatus}</if>
+            <if test="orderStatus != null  and orderStatus==1"> and ei.order_status = '1'</if>
+            <if test="orderStatus != null  and orderStatus==2"> and ei.order_status = '2'</if>
+            <if test="orderStatus != null  and orderStatus==3"> and (detection_type_item like concat('%', '1', '%') or detection_type_item like concat('%', '2', '%'))</if>
+            <if test="orderStatus != null  and orderStatus==5"> and (detection_type_item like concat('%', '3', '%') or detection_type_item like concat('%', '4', '%'))</if>
+            <if test="orderStatus != null  and orderStatus==6"> and (detection_type_item like concat('%', '5', '%') or detection_type_item like concat('%', '6', '%'))</if>
+            <if test="orderStatus != null  and orderStatus==7"> and ei.order_status = '7'</if>
             <if test="createBy != null "> and ei.create_by = #{createBy}</if>
             <if test="createById != null "> and ei.create_by_id = #{createById}</if>
             <if test="updateById != null "> and ei.update_by_id = #{updateById}</if>
@@ -140,7 +145,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         order by create_time desc
     </select>
-    
+
     <select id="selectEntrustedInformationById" parameterType="Long" resultMap="EntrustedInformationResult">
         <include refid="selectEntrustedInformationVo"/>
         where id = #{id} and  del_flag=0
@@ -252,7 +257,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteEntrustedInformationByIds" parameterType="String">
-        delete from {DBNAME}.entrusted_information where id in
+        delete from {DBNAME}.detection_result where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>

+ 28 - 0
zkqy-ui/application.properties

@@ -0,0 +1,28 @@
+zkqy.profile=D:\\mes\\data\\uploadPath
+#项目启动端口设置
+server.port=8066
+#数据库链接地址
+spring.datasource.druid.master.url=jdbc:mysql://localhost:3306/ry-vue-call?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+#数据库名
+spring.datasource.druid.master.username=root
+spring.datasource.druid.master.password=huaxian123
+
+#redis服务器地址
+spring.redis.host=localhost
+#redis端口
+spring.redis.port=6379
+#redis选择的数据库
+spring.redis.database=9
+#redis密码
+spring.redis.password=
+#token配置令牌有效期(默认30分钟)
+token.expireTime=300
+
+#日志配置
+logging.file.path=D:\\mes\\data\\logs
+
+OpenAuthorization2.MES.URL=http://192.168.0.17:8066/oauth2
+OpenAuthorization2.MES.BASIC=mes
+OpenAuthorization2.MES.REDIRECT_URL=http://192.168.0.17:1024
+OpenAuthorization2.MES.CALLBACK=http://192.168.0.17:8066/oauth/callback
+OpenAuthorization2.MES.NAME=hmc

+ 11 - 0
zkqy-ui/src/api/amichi/materiel/materialInfo.js

@@ -9,6 +9,17 @@ export function listMaterialInfo(query) {
   })
 }
 
+// http://localhost:8080/JdMaterialInfo/pullMaterialInfoJustStores
+//拉取物料的及时库存信息
+  export function pullMaterialInfoJustStoresApi(query) {
+    return request({
+      url: '/JdMaterialInfo/pullMaterialInfoJustStores',
+      method: 'get',
+      params: query
+    })
+  }
+
+
 // 查询成品信息列表
 export function listFinishedPartsWarehouse(query) {
   return request({

+ 8 - 0
zkqy-ui/src/api/amichi/planTask/planTaskDetails.js

@@ -25,5 +25,13 @@ export function flowCardList(data) {
   })
 }
 
+export function flowWeldCardListApi(data) {
+  return request({
+    url: '/planTaskDetails/Details/flowWeldCardList',
+    method: 'get',
+    params: data
+  })
+}
+
 
 

+ 11 - 1
zkqy-ui/src/api/amichi/productionCardFlow/productionCardFlow.js

@@ -9,7 +9,7 @@ export function listProductionCardFlow(query) {
   })
 }
 
-// 拉取场内生产计划
+// 拉取普通生产计划
 export function jdProductionOrderPull(query) {
   return request({
     url: '/jdProductionOrder/order/jdProductionOrderPull',
@@ -18,6 +18,16 @@ export function jdProductionOrderPull(query) {
   })
 }
 
+// 拉取焊接生产计划
+export function jdProductionWeldPlanOrderPullApi(query) {
+  return request({
+    url: '/jdProductionOrder/order/jdProductionWeldPlanOrderPull',
+    method: 'get',
+    params: query
+  })
+}
+
+
 // 生成工序流转卡查询工序流转卡流水列表
 export function generateProcessFlowCard(data) {
   return request({

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

@@ -17,6 +17,14 @@ export function getDetectionResult(id) {
   })
 }
 
+
+
+export function getDetectionResultByWtNumber(wtNumber) {
+  return request({
+    url: '/laboratory/detectionResult/selectDetectionResultByWtNumber/' + wtNumber,
+    method: 'get'
+  })
+}
 // 新增性能检测结果
 export function addDetectionResult(data) {
   return request({

+ 2 - 2
zkqy-ui/src/api/login.js

@@ -109,10 +109,10 @@ export function loginBySso(data) {
 //lims模拟登录
 
 
-export function limsLoginBy(userName) {
+export function limsLoginBy(userName,tenantId) {
   return request({
     url: `/lims/Login/`,
-    params: {"userName":userName},
+    params: {"userName":userName,"tenantId":tenantId},
     headers: {
       isToken: false
     },

BIN
zkqy-ui/src/assets/qy/7477781c76b6b2e1466f46d53bee05b.png


+ 7 - 0
zkqy-ui/src/router/index.js

@@ -73,6 +73,13 @@ export const constantRoutes = [
       }
     ]
   },
+  {
+    path: '/amichi/print/FlowWeldCardPrint',
+    component: () => {
+      return import('@/views/amichi/print/FlowWeldCardPrint.vue')
+    },
+    hidden: true
+  },
   {
     path: '/amichi/print/FlowCardPrint',
     component: () => {

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

@@ -97,7 +97,7 @@
           placeholder="账号"
           show-password
         >
-          
+
         </el-input>
       </el-form-item>
       <el-form-item prop="password">
@@ -110,7 +110,7 @@
           @keyup.enter.native="handleLogin"
           show-password
         >
-         
+
         </el-input>
       </el-form-item>
 
@@ -152,7 +152,7 @@
         </div>
       </el-form-item>
     </el-form>
-  
+
     <div class="el-login-footer">
       <span>Copyright © 2018-2023 zkqy.vip All Rights Reserved.</span>
     </div> -->
@@ -169,6 +169,7 @@ export default {
   name: "Login",
   data() {
     return {
+
       codeUrl: "",
       loginForm: {
         username: "",

+ 23 - 2
zkqy-ui/src/views/amichi/materialInfo/index.vue

@@ -92,6 +92,7 @@
         </el-button
         >
       </el-col>
+
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -102,9 +103,20 @@
           v-hasPermi="['system:materialInfo:export']"
         >导出</el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleImportWl"
+          v-hasPermi="['system:user:import']"
+        >拉取车间仓物料信息
+        </el-button
+        >
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
-
     <!-- 表格信息    -->
     <el-table v-loading="loading" style="margin-top: 20px" :data="materialInfoList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
@@ -240,7 +252,7 @@
 </template>
 
 <script>
-import { listMaterialInfo, getMaterialInfo, delMaterialInfo, addMaterialInfo, updateMaterialInfo } from "@/api/amichi/materiel/materialInfo";
+import { listMaterialInfo, getMaterialInfo, delMaterialInfo, addMaterialInfo, updateMaterialInfo,pullMaterialInfoJustStoresApi} from "@/api/amichi/materiel/materialInfo";
 import {getToken} from "@/utils/auth";
 
 export default {
@@ -337,6 +349,15 @@ export default {
     handleFileUploadProgress(event, file, fileList) {
       this.upload.isUploading = true;
     },
+    handleImportWl(){
+      console.log("拉取车间仓物料信息")
+      this.loading = true;
+      pullMaterialInfoJustStoresApi(this.queryParams).then(response => {
+        if(response.code==200){
+          this.getList();
+        }
+      });
+    },
     // 文件上传成功处理
     handleFileSuccess(response, file, fileList) {
       this.upload.open = false;

+ 95 - 18
zkqy-ui/src/views/amichi/planTask/salesPlan.vue

@@ -10,14 +10,14 @@
             @keyup.enter.native="handleQueryDz"
           />
         </el-form-item>
-        <el-form-item label="合同编号" prop="contractNo">
-          <el-input
-            v-model="queryParams.contractNo"
-            placeholder="请输入合同编号"
-            clearable
-            @keyup.enter.native="handleQueryDz"
-          />
-        </el-form-item>
+<!--        <el-form-item label="合同编号" prop="contractNo">-->
+<!--          <el-input-->
+<!--            v-model="queryParams.contractNo"-->
+<!--            placeholder="请输入合同编号"-->
+<!--            clearable-->
+<!--            @keyup.enter.native="handleQueryDz"-->
+<!--          />-->
+<!--        </el-form-item>-->
         <el-form-item label="完成时间" prop="completiontime">
           <el-date-picker
             v-model="queryParams.completiontime"
@@ -49,6 +49,12 @@
           <el-button icon="el-icon-refresh" size="mini" @click="resetQueryDz">重置</el-button>
         </el-form-item>
       </el-form>
+      <el-row >
+        <el-radio-group v-model="queryParams.tabPosition" style="margin-bottom: 30px;float: right"  @change="tabHandleClick" >
+          <el-radio-button label="1">普通</el-radio-button>
+          <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">
@@ -102,15 +108,23 @@
               @click="handleAuto"
             >自动排产</el-button>
           </el-col>
-          <!--              :disabled="!selection.length"-->
-          <el-col :span="1.5">
+          <el-col :span="1.5" v-show="queryParams.tabPosition==1">
             <el-button
               type="primary"
               plain
               icon="el-icon-plus"
               size="mini"
               @click="pullPlan"
-            >拉取生产计划</el-button>
+            >拉取流转卡生产计划</el-button>
+          </el-col>
+          <el-col :span="1.5" v-show="queryParams.tabPosition==2">
+            <el-button
+              type="primary"
+              plain
+              icon="el-icon-plus"
+              size="mini"
+              @click="pullWeldPlan"
+            >拉取焊接生产计划</el-button>
           </el-col>
           <right-toolbar
             :showCount.sync="showCount"
@@ -144,8 +158,8 @@
                   {{ formatNumber(scope.row.quantity) }}
                 </template>
               </el-table-column>
-              <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-                <template slot-scope="scope">
+              <el-table-column label="操作"   align="center" class-name="small-padding fixed-width" v-if="shouldShowOperationColumn">
+                <template slot-scope="scope" v-if="scope.row.isWeldSheet==2">
                   <el-dropdown @command="(command)=>{handleCommand(command, scope.row)}">
                     <el-button type="success">
                       操作<i class="el-icon-arrow-down el-icon--right"></i>
@@ -172,10 +186,15 @@
           prop="orderNumber">
         </el-table-column>
         <el-table-column
-          label="合同号"
-          align="center"
-          prop="contractNumber">
+          prop="creationtimeString"
+          label="单据日期"
+          align="center">
         </el-table-column>
+<!--        <el-table-column-->
+<!--          label="合同号"-->
+<!--          align="center"-->
+<!--          prop="contractNumber">-->
+<!--        </el-table-column>-->
         <el-table-column
           label="总台数"
           align="center"
@@ -188,12 +207,21 @@
           label="特殊要求"
           align="center"
           :show-overflow-tooltip='true'
+          width="200"
           prop="specialRequirements">
         </el-table-column>
+<!--        <el-table-column-->
+<!--          label="完成时间"-->
+<!--          align="center"-->
+<!--          prop="completionTime">-->
+<!--        </el-table-column>-->
         <el-table-column
           label="完成时间"
           align="center"
           prop="completionTime">
+          <template slot-scope="scope">
+            {{ formatDateTime(scope.row.completionTime) }}
+          </template>
         </el-table-column>
         <el-table-column
           label="计划状态"
@@ -219,7 +247,8 @@
                 <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-if="scope.row.taskStatus==0" command="tc">投产</el-dropdown-item>
-                <el-dropdown-item  icon="el-icon-s-open"  command="printFlowCard">打印流转卡</el-dropdown-item>
+                <el-dropdown-item  icon="el-icon-s-open"  v-if="scope.row.isWeldSheet==1" command="printFlowCard">打印流转卡</el-dropdown-item>
+                <el-dropdown-item  icon="el-icon-s-open"  v-if="scope.row.isWeldSheet!=1" command="printWeldCard">打印流焊接单</el-dropdown-item>
               </el-dropdown-menu>
             </el-dropdown>
           </template>
@@ -272,6 +301,7 @@
               label="单据编号"
               align="center">
             </el-table-column>
+
             <el-table-column
               prop="demandDocument"
               label="订单号"
@@ -501,7 +531,7 @@
 import {addInstruction, getPlanList,getPlanOne,viewPlannedMaterialStatus } from "@/api/amichi/planTask/index";
 import {listTableData,btnCommonApi} from "@/api/tablelist/commonTable.js";
 import { getToken } from "@/utils/auth";
-import {jdProductionOrderPull, listProductionCardFlow} from "@/api/amichi/productionCardFlow/productionCardFlow";
+import {jdProductionOrderPull,jdProductionWeldPlanOrderPullApi, listProductionCardFlow} from "@/api/amichi/productionCardFlow/productionCardFlow";
 
 
 export default {
@@ -595,6 +625,7 @@ export default {
         pageSize: 10, // 每页大小
         orderByColumn: "", // 根据某列排序
         isAsc: "", // desc(降序)或 asc(升序)
+        tabPosition:"1"
       },
     };
   },
@@ -604,6 +635,9 @@ export default {
         ...item,
         printQuantity: Math.floor(item.printQuantity)
       }));
+    },
+    shouldShowOperationColumn() {
+      return this.tableData.some(row => row.isWeldSheet === 2);
     }
   },
   filters: {
@@ -620,6 +654,45 @@ export default {
 
   },
   methods: {
+    formatDateTime(dateTimeString) {
+      if (!dateTimeString) return '';
+      const date = new Date(dateTimeString);
+      const year = date.getFullYear();
+      const month = String(date.getMonth() + 1).padStart(2, '0');
+      const day = String(date.getDate()).padStart(2, '0');
+      const hours = String(date.getHours()).padStart(2, '0');
+      const minutes = String(date.getMinutes()).padStart(2, '0');
+      const seconds = String(date.getSeconds()).padStart(2, '0');
+      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+    },
+    //拉取焊接生产订单
+    pullWeldPlan(){
+      console.log("好吊,你居然能拉取焊接订单")
+      jdProductionWeldPlanOrderPullApi().then(response => {
+        if(response.code==200){
+          this.$message.success("拉取场内计划成功");
+        }else {
+          this.$message.success("拉取场内计划失败");
+        }
+      });
+    },
+    printWeldCard(row){
+      this.orderNumebrs=[];
+      console.log("欢迎打印焊接单据")
+      console.log(row.orderNumber);
+      this.orderNumebrs.push(row.orderNumber)
+      //完整写法
+      this.$router.push({
+        path: '/amichi/print/FlowWeldCardPrint',
+        query: {
+          "orderNumberS": this.orderNumebrs,
+        }
+      });
+    },
+    tabHandleClick(){
+      console.log(this.queryParams.tabPosition,"dfakljdkjf")
+      this.getPlanList();
+    },
     formatToFixedTwo(value) {
       if (value !== null && value !== undefined) {
         return Number(value).toFixed(2);
@@ -788,6 +861,10 @@ export default {
           break;
         case "catxlh":
           this.catxlh(row);
+          break;
+        case "printWeldCard":
+          this.printWeldCard(row);
+          break;
         default:
           break;
       }

+ 81 - 59
zkqy-ui/src/views/amichi/print/FlowCardPrint.vue

@@ -16,27 +16,27 @@
        </div>
     </div>
     <div class="base" id="printView" >
-      <div class="box" style="page-break-after:always;margin-top: 10px"  v-for="(item,index) in listDate" v-if="index%2==0">
-        <div class="left"  style="margin-top: 10px">
+      <div class="box" style="page-break-after:always;"  v-for="(item,index) in listDate" v-if="index%2==0">
+        <div class="left"  style="margin-top: 15px">
           <div class="top">
             <table border="2px" class="left-top-table">
               <tr>
                 <td colspan="4">
                   <div class="titleBox" style="position: relative;">
-                    <div class="erweima"><img :src="item.base46MaD" alt=""></div>
-                    <div class="title"><h2 style="font-size: 30px;">铨一产品流转卡</h2></div>
+                    <div class="erweima" ><img :src="item.base46MaD" alt=""></div>
+                    <div class="title"><h2 class="jc" style="font-size: 30px;  color: black;font-weight: bold;">铨一产品流转卡</h2></div>
                     <div class="xh">
                       <span>序号1</span>
                     </div>
                     <div class="time">
-                      <span style="top: 60px;left:273px">完成时间:<i>{{item.xqrq}}</i></span>
+                      <span style="top: 60px;left: 256px;">完成时间:<i>{{item.xqrq}}</i></span>
                     </div>
                   </div>
                 </td>
               </tr>
               <tr>
-                <td style="width: 20%;">订单号:</td>
-                <td style="width: 30%;">{{item.orderNumber}}1</td>
+                <td style="width: 22%;">订单号:</td>
+                <td style="width: 28%;">{{item.orderNumber}}</td>
                 <td style="width: 20%;">产品编号:</td>
                 <td style="width: 30%;">{{item.serialNumber}}</td>
               </tr>
@@ -54,7 +54,7 @@
               </tr>
               <tr>
                 <td>机壳/端盖:</td>
-                <td style="font-size: 12px">{{item.caseEndCover}}</td>
+                <td style="font-size: 16px">{{item.caseEndCover}}</td>
                 <td>盘片接口:</td>
                 <td>{{item.platterInterface}}</td>
               </tr>
@@ -62,13 +62,13 @@
                 <td>数据:</td>
                 <td>{{item.dataInfo}}</td>
                 <td>开关箱:</td>
-                <td ref="detailsCells" style="font-size: 12px">{{item.switchBox}}</td>
+                <td ref="detailsCells" style="font-size: 14px">{{item.switchBox}}</td>
               </tr>
               <tr>
                 <td>颜色:</td>
-                <td ref="detailsCells" style="font-size: 12px">{{item.colour}}</td>
+                <td ref="detailsCells" style="font-size: 14px">{{item.colour}}</td>
                 <td>铭牌:</td>
-                <td style="font-size: 12px" ref="detailsCells">{{item.mingPai}}</td>
+                <td style="font-size: 14px" ref="detailsCells">{{item.mingPai}}</td>
               </tr>
               <tr>
                 <td>说明书:</td>
@@ -77,15 +77,15 @@
                 <td>{{item.certificateOfConformity}}</td>
               </tr>
               <tr>
-                <td >包装箱:</td>
-                <td colspan="3"  id="content-cell" ref="detailsCells" style="height: 60px;font-size: 12px">
+                <td style="height: 70px;" >包装箱:</td>
+                <td  colspan="3"  id="content-cell" ref="detailsCells" style="height: 70px;font-size: 13px">
                   {{item.packingBox}}
                 </td>
               </tr>
               <tr>
                 <td >特殊要求:</td>
-                <td ref="detailsCells"  colspan="3" id="content-cell" style="height: 60px;font-size: 12px">
-                {{item.specialRequirements}}
+                <td ref="detailsCells"  colspan="3" id="content-cell" style="height: 70px;font-size: 13px">
+                   {{item.specialRequirements}}
                 </td>
               </tr>
               <tr>
@@ -119,24 +119,24 @@
                 <td></td>
               </tr>
               <tr>
-                <td >备注</td>
-                <td colspan="3">{{item.remark}}</td>
+                <td style="height: 70px;" >备注</td>
+                <td colspan="3" style="height: 70px;">{{item.remark}}</td>
               </tr>
             </table>
           </div>
-          <div class="bottom" style="margin-top: 10px;">
+          <div class="bottom" style="margin-top: 20px;">
             <table border="2px" class="right-top-table">
               <tr>
                 <td colspan="4">
                   <div class="titleBox" style="position: relative;">
                     <div class="erweima"><img :src="item.base46MaZ" alt=""></div>
 
-                    <div class="title"><h2 style="font-size: 30px;">铨一产品流转卡</h2></div>
+                    <div class="title"><h2 class="jc" style="font-size: 30px;font-weight: bold;">铨一产品流转卡</h2></div>
                     <div class="xh">
                       <span>序号1</span>
                     </div>
                     <div class="time">
-                      <span style="top: 60px;left:273px">完成时间:<i>{{item.xqrq}}</i></span>
+                      <span style="top: 60px;left: 256px;">完成时间:<i>{{item.xqrq}}</i></span>
                     </div>
                   </div>
                 </td>
@@ -167,7 +167,7 @@
               </tr>
               <tr>
                 <td >特殊要求:</td>
-                <td colspan="3" id="content-cell" style="height: 60px;font-size: 12px">
+                <td colspan="3" id="content-cell" style="height: 70px;font-size: 12px">
                   {{item.specialRequirements}}
                 </td>
               </tr>
@@ -196,32 +196,32 @@
                 <td></td>
               </tr>
               <tr>
-                <td >备注</td>
-                <td colspan="3">{{item.remark}}</td>
+                <td style="height: 70px;" >备注</td>
+                <td colspan="3" style="height: 70px;">{{item.remark}}</td>
               </tr>
             </table>
           </div>
         </div>
-        <div class="right" v-if="index+1<listDate.length" style="margin-left: 5px;margin-top: 10px">
+        <div class="right" v-if="index+1<listDate.length" style="margin-left: 15px;margin-top: 15px">
           <div class="top">
             <table border="2px" class="right-top-table">
               <tr>
                 <td colspan="4">
                   <div class="titleBox" style="position: relative;">
                     <div class="erweima"><img :src="item.base46MaD" alt=""></div>
-                    <div class="title"><h2 style="font-size: 30px;">铨一产品流转卡</h2></div>
+                    <div class="title"><h2 class="jc" style="font-size: 30px;font-weight: bold;">铨一产品流转卡</h2></div>
                     <div class="xh">
                       <span>序号1</span>
                     </div>
                     <div class="time">
-                      <span style="top: 60px;left:273px">完成时间:<i>{{item.xqrq}}</i></span>
+                      <span style="top: 60px;left: 256px;">完成时间:<i>{{item.xqrq}}</i></span>
                     </div>
                   </div>
                 </td>
               </tr>
               <tr>
-                <td style="width: 20%;">订单号:</td>
-                <td style="width: 30%;">  {{getNextOrderNumber(index).orderNumber}}</td>
+                <td style="width: 22%;">订单号:</td>
+                <td style="width: 28%;">  {{getNextOrderNumber(index).orderNumber}}</td>
                 <td style="width: 20%;">产品编号:</td>
                 <td style="width: 30%;"> {{getNextOrderNumber(index).serialNumber}}  </td>
               </tr>
@@ -239,7 +239,7 @@
               </tr>
               <tr>
                 <td>机壳/端盖:</td>
-                <td style="font-size: 12px">{{getNextOrderNumber(index).caseEndCover}}</td>
+                <td style="font-size: 16px">{{getNextOrderNumber(index).caseEndCover}}</td>
                 <td>盘片接口:</td>
                 <td>{{getNextOrderNumber(index).platterInterface}}</td>
               </tr>
@@ -247,13 +247,13 @@
                 <td>数据:</td>
                 <td>{{getNextOrderNumber(index).dataInfo}}</td>
                 <td>开关箱:</td>
-                <td style="font-size: 12px">{{getNextOrderNumber(index).switchBox}}</td>
+                <td style="font-size: 14px">{{getNextOrderNumber(index).switchBox}}</td>
               </tr>
               <tr>
                 <td>颜色:</td>
-                <td style="font-size: 12px">  {{getNextOrderNumber(index).colour}} </td>
+                <td style="font-size: 14px">  {{getNextOrderNumber(index).colour}} </td>
                 <td>铭牌:</td>
-                <td style="font-size: 12px">{{getNextOrderNumber(index).mingPai}}</td>
+                <td style="font-size: 14px">{{getNextOrderNumber(index).mingPai}}</td>
               </tr>
               <tr>
                 <td>说明书:</td>
@@ -263,13 +263,13 @@
               </tr>
               <tr>
                 <td >包装箱:</td>
-                <td colspan="3" id="content-cell" style="height: 60px;font-size: 12px">
+                <td colspan="3" id="content-cell" style="height: 70px;font-size: 13px">
                   {{getNextOrderNumber(index).packingBox}}
                 </td>
               </tr>
               <tr>
                 <td >特殊要求:</td>
-                <td colspan="3" id="content-cell" style="height: 60px;font-size: 12px">
+                <td colspan="3" id="content-cell" style="height: 70px;font-size: 13px">
                   {{getNextOrderNumber(index).specialRequirements}}
                 </td>
               </tr>
@@ -304,32 +304,32 @@
                 <td></td>
               </tr>
               <tr>
-                <td >备注</td>
-                <td colspan="3">{{item.remark}}</td>
+                <td style="height: 70px;" >备注</td>
+                <td colspan="3" style="height: 70px;">{{item.remark}}</td>
               </tr>
             </table>
           </div>
-          <div class="bottom" style="margin-top: 10px;">
+          <div class="bottom" style="margin-top: 20px;">
             <table border="2px" class="right-top-table">
               <tr>
                 <td colspan="4">
                   <div class="titleBox" style="position: relative;">
                     <div class="erweima"><img :src="item.base46MaZ" alt=""></div>
-                    <div class="title"><h2 style="font-size: 30px;">铨一产品流转卡</h2></div>
+                    <div class="title"><h2 class="jc" style="font-size: 30px;font-weight: bold;">铨一产品流转卡</h2></div>
                     <div class="xh">
                       <span>序号1</span>
                     </div>
                     <div class="time">
-                      <span style="top: 60px;left:273px">完成时间:<i>{{item.xqrq}}</i></span>
+                      <span style="top: 60px;left: 256px;">完成时间:<i>{{item.xqrq}}</i></span>
                     </div>
                   </div>
                 </td>
               </tr>
               <tr>
-                <td style="width: 20%;">订单号:</td>
-                <td>{{getNextOrderNumber(index).orderNumber}}</td>
-                <td>产品编号:</td>
-                <td>{{getNextOrderNumber(index).serialNumber}}</td>
+                <td style="width: 22%;">订单号:</td>
+                <td style="width: 28%;">{{getNextOrderNumber(index).orderNumber}}</td>
+                <td style="width: 20%;">产品编号:</td>
+                <td style="width: 30%;">{{getNextOrderNumber(index).serialNumber}}</td>
               </tr>
               <tr>
                 <td>型号:</td>
@@ -351,7 +351,7 @@
               </tr>
               <tr>
                 <td >特殊要求:</td>
-                <td colspan="3" id="content-cell" style="height: 60px; font-size: 12px">
+                <td colspan="3" id="content-cell" style="height: 70px; font-size: 12px">
                   {{getNextOrderNumber(index).specialRequirements}}
                 </td>
               </tr>
@@ -380,8 +380,8 @@
                 <td></td>
               </tr>
               <tr>
-                <td >备注</td>
-                <td colspan="3">{{item.remark}}</td>
+                <td style="height: 70px;" >备注</td>
+                <td colspan="3" style="height: 70px;">{{item.remark}}</td>
               </tr>
             </table>
           </div>
@@ -489,6 +489,15 @@ export default {
     display: none; /* 隐藏打印区域不需要打印的内容 */
   }
 }
+.heg{
+  height: 30px;
+}
+.heg td{
+  height: 30px;
+}
+.jc{
+  font-weight: bold;
+}
 .page-break {
   page-break-after: always;
   position: relative;
@@ -502,10 +511,10 @@ export default {
 *{
   margin: 0 auto;
   padding: 0;
-  font-size: 15px;
 }
 .box{
-  width: 900px;
+  font-size: 16px;
+  width: 880px;
   /* border: 1px solid red; */
   display: flex;
   justify-content: start;
@@ -513,41 +522,54 @@ export default {
 }
 td{
   text-align: center;
+
 }
 .left{
-  width: 50%;
+  width: 48%;
 }
 .right{
-  width: 50%;
+  width: 48%;
 }
 
 .left-top-table{
   width: 100%;
-  border: 1px solid black;
+  border: 2px solid black;
   border-collapse: collapse;
+  color: black;
+  font-weight: bold;
 }
 .left-top-table tr td{
-  padding: 8px 8px;
+  padding: 4px 4px;
   word-wrap:break-word;
   word-break:break-all;
+  color: black;
+  font-weight: bold;
 }
 .right-top-table{
   width: 100%;
   border: 1px solid black;
   border-collapse: collapse;
+  color: black;
+  font-weight: bold;
+  color: black;
+  font-weight: bold;
 }
 .right-top-table tr td{
-  padding: 8px 8px;
+  padding: 4px 4px;
   word-wrap:break-word;
   word-break:break-all;
+  color: black;
+  font-weight: bold;
 }
 .erweima{
   width: 80px;
-  height: 84px;;
+  height: 80px;;
   background-color: red;
 }
 .titleBox{
   display: flex;
+  color: black;
+  font-weight: bold;
 }
 
 .left-top-table .titleBox .xh{
@@ -574,7 +596,7 @@ td{
 }
 .titleBox .title{
   margin-left: 60px;
-  margin-top: 0px;
+  margin-top: 7px;
   font-family: 'Courier New', Courier, monospace;
 }
 .abc{
@@ -603,15 +625,15 @@ td{
   top: 82px;
 }
 .left-top-table td{
-  border: 2px solid black;
+  border: 3px solid black;
 }
 .right-top-table td{
-  border: 2px solid black;
+  border: 3px solid black;
 }
 .right-top-table td{
-  border: 2px solid black;
+  border: 3px solid black;
 }
 .right-top-table td{
-  border: 2px solid black;
+  border: 3px solid black;
 }
 </style>

+ 291 - 0
zkqy-ui/src/views/amichi/print/FlowWeldCardPrint.vue

@@ -0,0 +1,291 @@
+<template>
+  <div>
+    <div class="tools" style="width: 900px;height:40px; display: flex; justify-content: space-between; align-items: center;position: relative;  margin-top: 50px;margin-bottom: 10px">
+      <div style="width:700px;height: 80px">
+        <pagination
+          v-show="total>0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="flowWeldCardList"
+          :page-sizes="[25]"
+          style="left: -280px"
+        />
+      </div>
+      <div style="width: 200px;height: 80px">
+        <el-button type="primary" icon="el-icon-search"  size="mini"  v-print="printViewInfo" style="position:absolute;right: 0px;top: 8px">打印</el-button>
+      </div>
+    </div>
+    <div class="base_box" id="printView">
+      <div class="top">
+        <div  class="imgs" style="position: relative">
+          <img :src="imgUrl" alt="" style="position: absolute;top: -44px">
+        </div>
+        <div class="title">
+          <h1 >福建铨一电源科技有限公司</h1>
+        </div>
+        <div>
+          <h1 style="font-size:35px">{{formatDateTime(listDate[0].completionTime)}}</h1>
+        </div>
+      </div>
+      <div class="center">
+        <p>焊接生产订单</p>
+      </div>
+      <div class="center_order">
+        <ul>
+          <li style="margin-left: 5px;"><span>订单号:</span><em>{{queryParams.orderNumber}}</em></li>
+          <li><span>生产单位:</span> <em>焊接车间</em></li>
+          <li ><span>业务类型:</span> <em>普通生产</em></li>
+        </ul>
+      </div>
+      <div class="tableNr">
+        <table border="2">
+          <tr>
+            <td style="width:60px">序号</td>
+            <td style="width: 18%">物料名称</td>
+            <td>型号</td>
+            <td>铁心长度</td>
+            <td>单位</td>
+            <td>数量</td>
+            <td>备注</td>
+          </tr>
+          <tr v-for="(item,index) in listDate">
+            <td>{{index+1}}</td>
+            <td :rowspan="rowSpanMap[item.materialName]" v-if="isFirstRow(item.materialName)">
+              {{ item.materialName }}
+            </td>
+            <td>{{item.modelNumber}}</td>
+            <td>{{item.specification}}</td>
+            <td>{{item.materialUnit}}</td>
+            <td>{{parseInt(item.quantity)}}</td>
+            <td></td>
+          </tr>
+          <tr>
+            <td colspan="5" class="hj">合计:</td>
+            <td>{{parseInt(totalNumber)}}</td>
+            <td></td>
+          </tr>
+        </table>
+      </div>
+      <div class="center_order">
+        <ul>
+          <li style="margin-left: 5px;"><span>制单人:</span> <em>{{loginName}}</em>&nbsp;<em>{{currentDate}}</em></li>
+          <li><span>审核:</span> <em></em></li>
+          <li><span>审批:</span> <em></em></li>
+        </ul>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import {flowWeldCardListApi} from "@/api/amichi/planTask/planTaskDetails.js";
+import img from '@/assets/qy/7477781c76b6b2e1466f46d53bee05b.png'
+import {userInfoAndSection} from "@/api/system/user";
+
+export default {
+  name: "FlowWeldCardPrint",
+  data () {
+    return {
+      seenMaterials: {},
+      rowSpanMap: {},
+      currentDate:"",
+      imgUrl: img,
+      queryParams:{
+        pageNum: 1,
+        pageSize: 25,
+        orderNumber:"",
+      },
+      total:0,
+      listDate:[],
+      loginName:"",
+      dialogVisible: false,
+      msg: "打印",
+      printViewInfo: {
+        id: "printView", //打印区域的唯一的id属性
+        // popTitle: '配置页眉标题', // 页眉文字 (不设置时显示undifined)(页眉页脚可以在打印页面的更多设置的选项中取消勾选)
+        // extraHead: '打印,印刷', // 最左上方的头部文字,附加在head标签上的额外标签,使用逗号分割
+        preview: false, // 是否启动预览模式,默认是false (开启预览模式ture会占满整个屏幕,不建议开启,除非业务需要)
+        // previewTitle: '预览的标题', // 打印预览的标题(预览模式preview为true时才显示)
+        // previewPrintBtnLabel: '预览结束,开始打印', // 打印预览的标题下方的按钮文本,点击可进入打印(预览模式preview为true时才显示)
+        zIndex: 20002, // 预览窗口的z-index,默认是20002,最好比默认值更高
+        previewBeforeOpenCallback (that) { console.log('正在加载预览窗口!'); console.log(that.msg, this) }, // 预览窗口打开之前的callback (预览模式preview为true时才执行) (that可以取到data里的变量值)
+        previewOpenCallback () { console.log('已经加载完预览窗口,预览打开了!') }, // 预览窗口打开时的callback (预览模式preview为true时才执行)
+        beforeOpenCallback () { console.log('开始打印之前!') }, // 开始打印之前的callback
+        openCallback () { console.log('执行打印了!') }, // 调用打印时的callback
+        closeCallback () { console.log('关闭了打印工具!') }, // 关闭打印的callback(无法区分确认or取消)
+        clickMounted () { console.log('点击v-print绑定的按钮了!') },
+        // url: 'http://localhost:8080/', // 打印指定的URL,确保同源策略相同
+        // asyncUrl (reslove) {
+        //   setTimeout(() => {
+        //     reslove('http://localhost:8080/')
+        //   }, 2000)
+        // },
+        standard: '',
+        extarCss: ''
+      }
+    }
+  },
+  methods: {
+    calculateRowSpans() {
+      const counts = {};
+      this.listDate.forEach(item => {
+        if (counts[item.materialName]) {
+          counts[item.materialName]++;
+        } else {
+          counts[item.materialName] = 1;
+        }
+      });
+      this.rowSpanMap = counts;
+    },
+    isFirstRow(materialName) {
+      if (!this.seenMaterials[materialName]) {
+        this.seenMaterials[materialName] = true;
+        return true;
+      }
+      return false;
+    },
+    formatDateTime(dateTimeString) {
+      if (!dateTimeString) return '';
+      const date = new Date(dateTimeString);
+      const year = date.getFullYear();
+      const month = String(date.getMonth() + 1).padStart(2, '0');
+      const day = String(date.getDate()).padStart(2, '0');
+      return `${year}-${month}-${day}`;
+    },
+    processData() {
+      this.calculateRowSpans();
+    },
+    //异步获取焊接数据
+    async flowWeldCardList(){
+      let res = await flowWeldCardListApi(this.queryParams)
+      if (res.code == 200) {
+        this.listDate = res.rows;
+        this.total = res.total;
+        this.getUserInfo();
+        this.getCurrentDate();
+        this.processData();
+      }
+    },
+    //得到用户信息
+    getUserInfo(){
+      console.log(this.$store.state.user.name);
+      this.loginName=this.$store.state.user.name;
+      //通过用户id查询当前用户的部门信息
+      // userInfoAndSection(this.$store.state.user.userId).then(data => {
+      //   // this.wtform.submittingDepartment=data.deptInfo.deptName;
+      //   // if (data.deptInfo.deptName==undefined){
+      //   //   this.wtform.submittingDepartment="当前用户未设置部门";
+      //   // }
+      // })
+    },
+    //当前时间格式化
+    getCurrentDate() {
+      const now = new Date();
+      const year = now.getFullYear();
+      const month = String(now.getMonth() + 1).padStart(2, '0');
+      const day = String(now.getDate()).padStart(2, '0');
+      this.currentDate = `${year}-${month}-${day}`;
+    }
+  },
+  mounted() {
+    // this.flowWeldCardList();
+    // console.log(this.$store.state.user);
+  },
+  computed: {
+    totalNumber() {
+      return this.listDate.reduce((sum, item) => {
+        const quantity = parseFloat(item.quantity);
+        const roundedQuantity = quantity.toFixed(2);
+        return sum + parseFloat(roundedQuantity);
+      }, 0).toFixed(2);
+    },
+  },
+  created(){
+    this.queryParams.orderNumber =this.$route.query.orderNumberS[0];
+    this.flowWeldCardList();
+  }
+}
+</script>
+<style media="print">
+@media print {
+  /* 隐藏页眉页脚 */
+  @page {
+    size: auto;
+    //margin: 3mm;
+    margin-top: 10px;
+  }
+  html {
+    zoom: 85%; /* 缩放比例设置 */
+  }
+  .noprint {
+    display: none; /* 隐藏打印区域不需要打印的内容 */
+  }
+}
+*{
+  margin: 0 auto;
+  padding: 0;
+}
+.base_box{
+  width: 900px;
+  box-sizing: border-box;
+}
+.base_box .top{
+  display: flex;
+  justify-content: flex-start;
+  line-height: 100px;
+  height: 80px;
+  //border: 1px solid  red;
+  align-items: center
+}
+.base_box .top .imgs{
+  flex: 1;
+}
+.base_box .top .title{
+  flex:1.6;
+}
+.center{
+  width: 100%;
+  text-align: center;
+}
+.center p{
+  font-weight: 500;
+  font-size: 24px;
+}
+.center_order{
+  margin-top: 25px;
+  margin-bottom: 20px;
+}
+.center_order   ul li{
+  list-style: none;
+}
+.center_order   ul li em{
+  font-style: normal;
+  font-style:normal;
+
+}
+.center_order  ul{
+  width: 100%;
+  overflow: hidden;
+}
+.center_order ul li{
+  text-align: left;
+  float: left;
+  width: 33%;
+  font-size: 19px;
+}
+.tableNr table{
+  width: 100%;
+  border: 1px solid black;
+  border-collapse: collapse;
+  text-align: center;
+}
+.tableNr table tr td{
+  border: 2px solid black;
+  padding: 8px 7px;
+}
+.tableNr table tr .hj{
+  text-align: left;
+  padding-left: 30px;
+}
+</style>

+ 291 - 0
zkqy-ui/src/views/amichi/print/FlowWeldCardPrint2.vue

@@ -0,0 +1,291 @@
+<template>
+  <div>
+    <div class="tools" style="width: 900px;height:40px; display: flex; justify-content: space-between; align-items: center;position: relative;  margin-top: 50px;margin-bottom: 10px">
+      <div style="width:700px;height: 80px">
+        <pagination
+          v-show="total>0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="flowWeldCardList"
+          :page-sizes="[25]"
+          style="left: -280px"
+        />
+      </div>
+      <div style="width: 200px;height: 80px">
+        <el-button type="primary" icon="el-icon-search"  size="mini"  v-print="printViewInfo" style="position:absolute;right: 0px;top: 8px">打印</el-button>
+      </div>
+    </div>
+    <div class="base_box" id="printView">
+      <div class="top">
+        <div  class="imgs" style="position: relative">
+          <img :src="imgUrl" alt="" style="position: absolute;top: -44px">
+        </div>
+        <div class="title">
+          <h1 >福建铨一电源科技有限公司</h1>
+        </div>
+        <div>
+          <h1 style="font-size:35px">{{formatDateTime(listDate[0].completionTime)}}</h1>
+        </div>
+      </div>
+      <div class="center">
+        <p>焊接生产订单</p>
+      </div>
+      <div class="center_order">
+        <ul>
+          <li style="margin-left: 5px;"><span>订单号:</span><em>{{queryParams.orderNumber}}</em></li>
+          <li><span>生产单位:</span> <em>焊接车间</em></li>
+          <li ><span>业务类型:</span> <em>普通生产</em></li>
+        </ul>
+      </div>
+      <div class="tableNr">
+        <table border="2">
+          <tr>
+            <td style="width:60px">序号</td>
+            <td style="width: 18%">物料名称</td>
+            <td>型号</td>
+            <td>铁心长度</td>
+            <td>单位</td>
+            <td>数量</td>
+            <td>备注</td>
+          </tr>
+          <tr v-for="(item,index) in listDate">
+            <td>{{index+1}}</td>
+            <td :rowspan="rowSpanMap[item.materialName]" v-if="isFirstRow(item.materialName)">
+              {{ item.materialName }}
+            </td>
+            <td>{{item.modelNumber}}</td>
+            <td>{{item.specification}}</td>
+            <td>{{item.materialUnit}}</td>
+            <td>{{parseInt(item.quantity)}}</td>
+            <td></td>
+          </tr>
+          <tr>
+            <td colspan="5" class="hj">合计:</td>
+            <td>{{parseInt(totalNumber)}}</td>
+            <td></td>
+          </tr>
+        </table>
+      </div>
+      <div class="center_order">
+        <ul>
+          <li style="margin-left: 5px;"><span>制单人:</span> <em>{{loginName}}</em>&nbsp;<em>{{currentDate}}</em></li>
+          <li><span>审核:</span> <em></em></li>
+          <li><span>审批:</span> <em></em></li>
+        </ul>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import {flowWeldCardListApi} from "@/api/amichi/planTask/planTaskDetails.js";
+import img from '@/assets/qy/7477781c76b6b2e1466f46d53bee05b.png'
+import {userInfoAndSection} from "@/api/system/user";
+
+export default {
+  name: "FlowWeldCardPrint",
+  data () {
+    return {
+      seenMaterials: {},
+      rowSpanMap: {},
+      currentDate:"",
+      imgUrl: img,
+      queryParams:{
+        pageNum: 1,
+        pageSize: 25,
+        orderNumber:"",
+      },
+      total:0,
+      listDate:[],
+      loginName:"",
+      dialogVisible: false,
+      msg: "打印",
+      printViewInfo: {
+        id: "printView", //打印区域的唯一的id属性
+        // popTitle: '配置页眉标题', // 页眉文字 (不设置时显示undifined)(页眉页脚可以在打印页面的更多设置的选项中取消勾选)
+        // extraHead: '打印,印刷', // 最左上方的头部文字,附加在head标签上的额外标签,使用逗号分割
+        preview: false, // 是否启动预览模式,默认是false (开启预览模式ture会占满整个屏幕,不建议开启,除非业务需要)
+        // previewTitle: '预览的标题', // 打印预览的标题(预览模式preview为true时才显示)
+        // previewPrintBtnLabel: '预览结束,开始打印', // 打印预览的标题下方的按钮文本,点击可进入打印(预览模式preview为true时才显示)
+        zIndex: 20002, // 预览窗口的z-index,默认是20002,最好比默认值更高
+        previewBeforeOpenCallback (that) { console.log('正在加载预览窗口!'); console.log(that.msg, this) }, // 预览窗口打开之前的callback (预览模式preview为true时才执行) (that可以取到data里的变量值)
+        previewOpenCallback () { console.log('已经加载完预览窗口,预览打开了!') }, // 预览窗口打开时的callback (预览模式preview为true时才执行)
+        beforeOpenCallback () { console.log('开始打印之前!') }, // 开始打印之前的callback
+        openCallback () { console.log('执行打印了!') }, // 调用打印时的callback
+        closeCallback () { console.log('关闭了打印工具!') }, // 关闭打印的callback(无法区分确认or取消)
+        clickMounted () { console.log('点击v-print绑定的按钮了!') },
+        // url: 'http://localhost:8080/', // 打印指定的URL,确保同源策略相同
+        // asyncUrl (reslove) {
+        //   setTimeout(() => {
+        //     reslove('http://localhost:8080/')
+        //   }, 2000)
+        // },
+        standard: '',
+        extarCss: ''
+      }
+    }
+  },
+  methods: {
+    calculateRowSpans() {
+      const counts = {};
+      this.listDate.forEach(item => {
+        if (counts[item.materialName]) {
+          counts[item.materialName]++;
+        } else {
+          counts[item.materialName] = 1;
+        }
+      });
+      this.rowSpanMap = counts;
+    },
+    isFirstRow(materialName) {
+      if (!this.seenMaterials[materialName]) {
+        this.seenMaterials[materialName] = true;
+        return true;
+      }
+      return false;
+    },
+    formatDateTime(dateTimeString) {
+      if (!dateTimeString) return '';
+      const date = new Date(dateTimeString);
+      const year = date.getFullYear();
+      const month = String(date.getMonth() + 1).padStart(2, '0');
+      const day = String(date.getDate()).padStart(2, '0');
+      return `${year}-${month}-${day}`;
+    },
+    processData() {
+      this.calculateRowSpans();
+    },
+    //异步获取焊接数据
+    async flowWeldCardList(){
+      let res = await flowWeldCardListApi(this.queryParams)
+      if (res.code == 200) {
+        this.listDate = res.rows;
+        this.total = res.total;
+        this.getUserInfo();
+        this.getCurrentDate();
+        this.processData();
+      }
+    },
+    //得到用户信息
+    getUserInfo(){
+      console.log(this.$store.state.user.name);
+      this.loginName=this.$store.state.user.name;
+      //通过用户id查询当前用户的部门信息
+      // userInfoAndSection(this.$store.state.user.userId).then(data => {
+      //   // this.wtform.submittingDepartment=data.deptInfo.deptName;
+      //   // if (data.deptInfo.deptName==undefined){
+      //   //   this.wtform.submittingDepartment="当前用户未设置部门";
+      //   // }
+      // })
+    },
+    //当前时间格式化
+    getCurrentDate() {
+      const now = new Date();
+      const year = now.getFullYear();
+      const month = String(now.getMonth() + 1).padStart(2, '0');
+      const day = String(now.getDate()).padStart(2, '0');
+      this.currentDate = `${year}-${month}-${day}`;
+    }
+  },
+  mounted() {
+    // this.flowWeldCardList();
+    // console.log(this.$store.state.user);
+  },
+  computed: {
+    totalNumber() {
+      return this.listDate.reduce((sum, item) => {
+        const quantity = parseFloat(item.quantity);
+        const roundedQuantity = quantity.toFixed(2);
+        return sum + parseFloat(roundedQuantity);
+      }, 0).toFixed(2);
+    },
+  },
+  created(){
+    this.queryParams.orderNumber =this.$route.query.orderNumberS[0];
+    this.flowWeldCardList();
+  }
+}
+</script>
+<style media="print">
+@media print {
+  /* 隐藏页眉页脚 */
+  @page {
+    size: auto;
+    //margin: 3mm;
+    margin-top: 10px;
+  }
+  html {
+    zoom: 85%; /* 缩放比例设置 */
+  }
+  .noprint {
+    display: none; /* 隐藏打印区域不需要打印的内容 */
+  }
+}
+*{
+  margin: 0 auto;
+  padding: 0;
+}
+.base_box{
+  width: 900px;
+  box-sizing: border-box;
+}
+.base_box .top{
+  display: flex;
+  justify-content: flex-start;
+  line-height: 100px;
+  height: 80px;
+  //border: 1px solid  red;
+  align-items: center
+}
+.base_box .top .imgs{
+  flex: 1;
+}
+.base_box .top .title{
+  flex:1.6;
+}
+.center{
+  width: 100%;
+  text-align: center;
+}
+.center p{
+  font-weight: 500;
+  font-size: 24px;
+}
+.center_order{
+  margin-top: 25px;
+  margin-bottom: 20px;
+}
+.center_order   ul li{
+  list-style: none;
+}
+.center_order   ul li em{
+  font-style: normal;
+  font-style:normal;
+
+}
+.center_order  ul{
+  width: 100%;
+  overflow: hidden;
+}
+.center_order ul li{
+  text-align: left;
+  float: left;
+  width: 33%;
+  font-size: 19px;
+}
+.tableNr table{
+  width: 100%;
+  border: 1px solid black;
+  border-collapse: collapse;
+  text-align: center;
+}
+.tableNr table tr td{
+  border: 2px solid black;
+  padding: 8px 7px;
+}
+.tableNr table tr .hj{
+  text-align: left;
+  padding-left: 30px;
+}
+</style>

+ 26 - 13
zkqy-ui/src/views/lims/detectionResult/detectionDetection.vue

@@ -3,7 +3,7 @@
     <!-- 查询表单 start-->
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
 
-      <el-form-item label="委托单号" prop="supplier">
+      <el-form-item label="委托单号" prop="wtNumber">
         <el-input
           v-model="queryParams.wtNumber"
           placeholder="请输入委托单号"
@@ -34,15 +34,17 @@
             ></el-option>
           </el-select>
       </el-form-item>
-      <el-form-item label="日期" prop="date">
-        <el-date-picker clearable
-          v-model="queryParams.date"
-          type="date"
+      <el-form-item label="日期" prop="dateList">
+        <el-date-picker
+          v-model="queryParams.dateList"
+          type="daterange"
+          range-separator="至"
+          @keyup.enter.native="handleQuery"
           value-format="yyyy-MM-dd"
-          placeholder="请选择日期">
+          start-placeholder="开始日期"
+          end-placeholder="结束日期">
         </el-date-picker>
       </el-form-item>
-
       <el-form-item label="规格" prop="specification">
         <el-input
           v-model="queryParams.specification"
@@ -59,15 +61,19 @@
           @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>
     <!-- 查询表单 end-->
-
+    <el-row>
+      <el-radio-group v-model="queryParams.tabPosition" style="margin-bottom: 30px;float: right"  @change="tabHandleClick" >
+        <el-radio-button label="0">未审核</el-radio-button>
+        <el-radio-button label="1">已审核</el-radio-button>
+        <el-radio-button label="2">已作废</el-radio-button>
+      </el-radio-group>
+    </el-row>
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
@@ -83,7 +89,7 @@
     </el-row>
 
     <!-- 表格start -->
-    <selsetHeader style="margin-top: 20px" :tLength="9" :options="tableHeadData.slice(1, tableHeadData.length -1 )" @change="cascaderChangeFun"></selsetHeader>
+    <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 :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">
@@ -101,7 +107,7 @@
 <!--              <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==1||scope.row.dataApprovalStatus==0"  command="bgsh">报告审核</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>
           </el-dropdown>
         </template>
@@ -364,8 +370,10 @@ export default {
       open: false,
       // 查询参数
       queryParams: {
+        tabPosition:0,
         pageNum: 1,
         pageSize: 10,
+        dateList:null,
         serialNumber: null,
         date: null,
         lotNumber: null,
@@ -397,6 +405,7 @@ export default {
         taskProcessKey: null,
         taskNodeKey: null
       },
+
       // 表单参数
       form: {},
       // 表单校验
@@ -416,6 +425,10 @@ export default {
     this.getList();
   },
   methods: {
+    tabHandleClick(){
+      console.log("tab选项切换")
+      this.getList();
+    },
     //下拉菜单点击事件
     handleCommand(command, row) {
       switch (command) {
@@ -594,7 +607,7 @@ export default {
         dataApprovalStatus: null,
         processKey: null,
         taskProcessKey: null,
-        taskNodeKey: null
+        taskNodeKey: null,
       };
       this.resetForm("form");
     },

+ 27 - 27
zkqy-ui/src/views/lims/detectionResult/detectionProcess.vue

@@ -63,8 +63,8 @@
               操作<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"  command="handleUpdate">查看</el-dropdown-item>
+<!--              <el-dropdown-item  icon="el-icon-delete" command="handleDelete">删除</el-dropdown-item>-->
             </el-dropdown-menu>
           </el-dropdown>
         </template>
@@ -80,8 +80,8 @@
     />
 
     <!-- 添加或修改性能检测结果对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+    <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-form-item label="序号" prop="serialNumber">
           <el-input v-model="form.serialNumber" placeholder="请输入序号" />
         </el-form-item>
@@ -159,29 +159,29 @@
         <el-form-item label="备注" prop="remark">
           <el-input v-model="form.remark" placeholder="请输入备注" />
         </el-form-item>
-        <el-form-item label="创建者id" prop="createById">
-          <el-input v-model="form.createById" placeholder="请输入创建者id" />
-        </el-form-item>
-        <el-form-item label="更新者id" prop="updateById">
-          <el-input v-model="form.updateById" placeholder="请输入更新者id" />
-        </el-form-item>
-        <el-form-item label="删除标志" prop="delFlag">
-          <el-input v-model="form.delFlag" placeholder="请输入删除标志" />
-        </el-form-item>
-        <el-form-item label="流程编号" prop="processKey">
-          <el-input v-model="form.processKey" placeholder="请输入流程编号" />
-        </el-form-item>
-        <el-form-item label="任务编码" prop="taskProcessKey">
-          <el-input v-model="form.taskProcessKey" placeholder="请输入任务编码" />
-        </el-form-item>
-        <el-form-item label="任务节点编码" prop="taskNodeKey">
-          <el-input v-model="form.taskNodeKey" placeholder="请输入任务节点编码" />
-        </el-form-item>
+<!--        <el-form-item label="创建者id" prop="createById">-->
+<!--          <el-input v-model="form.createById" placeholder="请输入创建者id" />-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="更新者id" prop="updateById">-->
+<!--          <el-input v-model="form.updateById" placeholder="请输入更新者id" />-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="删除标志" prop="delFlag">-->
+<!--          <el-input v-model="form.delFlag" placeholder="请输入删除标志" />-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="流程编号" prop="processKey">-->
+<!--          <el-input v-model="form.processKey" placeholder="请输入流程编号" />-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="任务编码" prop="taskProcessKey">-->
+<!--          <el-input v-model="form.taskProcessKey" placeholder="请输入任务编码" />-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="任务节点编码" prop="taskNodeKey">-->
+<!--          <el-input v-model="form.taskNodeKey" 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>
+<!--      <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>
@@ -386,7 +386,7 @@ export default {
       getDetectionResult(id).then(response => {
         this.form = response.data;
         this.open = true;
-        this.title = "修改性能检测结果";
+        this.title = "查看性能检测结果";
       });
     },
     //下拉菜单点击事件

+ 11 - 5
zkqy-ui/src/views/lims/report/detectionDetectionReport.vue

@@ -51,7 +51,6 @@
       </el-form-item>
     </el-form>
     <!-- 查询表单 end-->
-
     <el-row :gutter="10" class="mb8">
 <!--      <el-col :span="1.5">-->
 <!--        <el-button-->
@@ -260,7 +259,7 @@
             <tr class="nrfontsize">
               <td>{{jgForm.lotNumber}}</td>
               <td>{{jgForm.tensileValueMpaTwo}}</td>
-              <td>{{jgForm.rateOfElongation}}</td>
+              <td>{{jgForm.rateOfElongationTwo}}</td>
               <td>{{jgForm.decisionResult}}</td>
             </tr>
             <tr class="trbj">
@@ -378,7 +377,15 @@
 </template>
 
 <script>
-import { listDetectionResult, getDetectionResult, delDetectionResult, addDetectionResult, updateDetectionResult } from "@/api/lims/materielInfo/detectionResult";
+import {
+  listDetectionResult,
+  getDetectionResult,
+  delDetectionResult,
+  addDetectionResult,
+  updateDetectionResult,
+  getDetectionResultBywtNumber,
+  getDetectionResultByWtNumber
+} from "@/api/lims/materielInfo/detectionResult";
 import selsetHeader from "@/views/amichi/materiel/components/selsetHeader.vue";
 import {getToken} from "@/utils/auth";
 // 引入
@@ -567,13 +574,12 @@ export default {
     ckbgsj(row){
       console.log("查看报告");
       this.jgForm={};
-      getDetectionResult(row.id).then(resp=>{
+      getDetectionResultByWtNumber(row.wtNumber).then(resp=>{
         console.log(resp)
         this.jgROpen=true;
         this.jgForm=resp.data
         this.title="查看检测报告详情";
       })
-      debugger;
     },
     bgsh(row){
       this.$modal.confirm('是否审核通过委托单号为"' + row.wtNumber + '"的报告信息?').then(function() {

+ 2 - 2
zkqy-ui/src/views/lims/wtform/wtFormIndex.vue

@@ -158,7 +158,8 @@
       </el-form-item>
     </el-form>
     <el-row >
-        <el-radio-group v-model="tabPosition" style="margin-bottom: 30px;float: right"  @change="tabHandleClick" >
+        <el-radio-group v-model="wTQueryParams.orderStatus" style="margin-bottom: 30px;float: right"  @change="tabHandleClick" >
+          <el-radio-button label="0">全部</el-radio-button>
           <el-radio-button label="1">待送样</el-radio-button>
           <el-radio-button label="2">已送样</el-radio-button>
           <el-radio-button label="3">待测试</el-radio-button>
@@ -1218,7 +1219,6 @@ export default {
   },
   methods: {
     tabHandleClick() {
-      this.wTQueryParams.orderStatus=this.tabPosition;
       this.getListInformation()
     },
     beforeLeave(){

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

@@ -307,9 +307,9 @@ 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=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.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=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://172.20.10.5:8066/oauth/callback",

+ 3 - 1
zkqy-ui/src/views/pageTransferPage.vue

@@ -83,6 +83,7 @@ export default {
       console.log("dddddddddddddddddddddddddddddddddddddddddddddd")
       if (userInfo) {
         let loginData = Base64.decode(userInfo).split("#");
+        console.log()
         let tenantId = loginData[0];
         let tenantCode = loginData[1];
         let userName = loginData[2];
@@ -90,7 +91,8 @@ export default {
         try {
             await this.getConfig(tenantCode);
             // 登录
-            let res = await limsLoginBy(userName);
+            console.log("tenantId我发送的请求",tenantId)
+            let res = await limsLoginBy(userName,tenantId);
             if (res.code == 200) {
               // 存储token 用户信息
               this.$store

+ 4 - 4
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";
@@ -41,9 +41,9 @@ module.exports = {
          // target: `http://172.20.10.5:8066`,
         // target: `http://192.168.110.83:8066`,
         // target: `http://192.168.128.171:8066`,
-        //  target: `http://192.168.0.17:8066`, //铨一开发
-        // target: `http://192.168.2.135:8066`,
-         target: `http://192.168.2.127:8066`,
+        // target: `http://192.168.2.135:8066`, //铨一开发
+        target: `http://192.168.2.127:8066`,
+        //  target: `http://192.168.2.127:8066`,
         // target: `http://192.168.0.17:8066`,
         changeOrigin: true,
         pathRewrite: {