Compare commits

..

65 Commits

Author SHA1 Message Date
yd
927731c217 feat:物料通用流程 2025-12-02 16:42:26 +08:00
wxr
2b60bd7c7b 委托登记修改 2025-12-02 10:53:11 +08:00
FCL
9a2b45e29c fix:存放位置编码重复校验 2025-12-01 16:07:59 +08:00
wxr
7c7e7b4761 分析取S值,参数修改 2025-12-01 15:31:40 +08:00
FCL
39d720c1df fix:业务参数字典权限调整 2025-11-28 17:43:12 +08:00
FCL
d6fc03b199 fix:自动火试金接口签名测试 2025-11-28 17:07:40 +08:00
FCL
04ac449897 feat:自动火试金接口签名测试 2025-11-28 16:47:23 +08:00
FCL
eff36758c2 fix:设备接口,取消部分权限 2025-11-28 16:47:05 +08:00
FCL
cb50244685 Merge branch 'refs/heads/zt-test' into test 2025-11-28 15:13:41 +08:00
FCL
246e6391b8 fix:检测标准细节优化 2025-11-28 15:09:53 +08:00
wxr
4c129dee4e 结果判定分析方法为0还显示,处理。 2025-11-28 11:22:41 +08:00
wxr
63fc44a7d1 Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test 2025-11-28 10:49:08 +08:00
wxr
9a4e50b081 商检委托,S值检查bug修复 2025-11-28 10:49:00 +08:00
FCL
7f1c4dd8c4 fix:Dict注解优化 2025-11-28 09:04:01 +08:00
wxr
7a03bc6293 Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test 2025-11-27 18:23:45 +08:00
wxr
171de4c8d4 分析样顺序调整 2025-11-27 18:23:34 +08:00
FCL
60bc01201b fix:样品调拨细节修复 2025-11-27 18:10:35 +08:00
FCL
8fdeb65895 Merge remote-tracking branch 'origin/test' into test 2025-11-27 17:33:35 +08:00
FCL
41b4e53db1 fix:测试问题修复:样品库、报告 2025-11-27 17:33:31 +08:00
wxr
600e8bcd92 分析项目根据字典id过滤 2025-11-27 17:30:18 +08:00
wxr
353a6dcb3e 样品分析获取修改 2025-11-27 16:27:09 +08:00
wxr
ab505189f3 商检样S值分样判定bug修复 2025-11-27 15:45:45 +08:00
wxr
3b306b4137 Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test 2025-11-27 14:16:56 +08:00
wxr
9b99e41676 下发配料添加检查是否都存在配料必填数据 2025-11-27 14:16:44 +08:00
FCL
1dbbeba233 Merge remote-tracking branch 'origin/test' into test 2025-11-27 11:42:19 +08:00
FCL
b92d61648f fix:样品库接口调整 2025-11-27 11:42:14 +08:00
wxr
b85eb7ea91 原始记录单,无数据时bug修复 2025-11-27 10:19:53 +08:00
wxr
76069855ec 新增内部简码标签打印数据查询 2025-11-27 09:44:08 +08:00
wxr
ea948a70bc 镜像名称修改 2025-11-26 19:31:05 +08:00
wxr
e133ec82c8 样品接收查询修改 2025-11-26 17:59:27 +08:00
wxr
be75cb4cf9 结果报送,bug修复 2025-11-26 16:09:25 +08:00
wxr
b320d36181 Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test 2025-11-26 15:01:29 +08:00
FCL
172f04a260 fix:样品库接口调整 2025-11-26 12:00:22 +08:00
wxr
821ce6a7cf Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test 2025-11-26 10:43:01 +08:00
FCL
c7fe2db73c fix:样品库接口调整 2025-11-26 10:38:57 +08:00
wxr
984ae17431 Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test 2025-11-26 10:25:24 +08:00
wxr
4fd689c530 分析任务加上分析人员id。自动配料根据分析人员id查询用户数据,设置分析人账号。 2025-11-26 10:25:13 +08:00
FCL
2c377a76ec fix:样品库接口调整 2025-11-26 09:38:43 +08:00
FCL
2f71bc7fb1 Merge remote-tracking branch 'origin/test' into test 2025-11-26 09:16:46 +08:00
wxr
30ce46ce4d qms发布 2025-11-26 09:15:18 +08:00
FCL
d25658f202 Merge remote-tracking branch 'origin/test' into test
# Conflicts:
#	zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/QmsCommonConstant.java
2025-11-26 08:44:33 +08:00
chenbowen
8aa329d989 1. 同步 nacos 配置到业务系统 2025-11-25 18:54:38 +08:00
FCL
a3a31d8600 fix:样品库接口调整 2025-11-25 18:21:59 +08:00
wxr
daafd3ae37 fix 2025-11-25 17:37:10 +08:00
wxr
91df898e09 自动火试金配料接口 2025-11-25 14:46:36 +08:00
FCL
baa7884fd7 fix:报告明细数据接口改造,修改“固定列”的处理逻辑 2025-11-25 14:09:46 +08:00
FCL
c522cf5f8f Merge branch 'zt-test' into test 2025-11-25 09:59:43 +08:00
chenbowen
46aa2c9692 1. 修复升级私有包版本错误 2025-11-25 09:54:37 +08:00
chenbowen
411983986f 1. 升级私有包版本 2025-11-25 09:38:20 +08:00
FCL
94757f31de Merge branch 'zt-test' into test 2025-11-25 09:36:47 +08:00
FCL
42afe2adb3 feat:qms阶段性提交:检验流程调整、报告、样品库等 2025-11-25 09:36:22 +08:00
FCL
5657f8cf09 feat:qms阶段性提交:检验流程调整、报告、样品库等 2025-11-25 09:34:25 +08:00
wxr
a49bee0abd Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test 2025-11-25 09:17:53 +08:00
wxr
d0673f36b1 自动火试金接口-未完 2025-11-25 09:17:39 +08:00
FCL
eaea741480 Merge remote-tracking branch 'origin/test' into test 2025-11-24 18:11:54 +08:00
FCL
44a6e11803 fix:样品库联调调整 2025-11-24 18:11:49 +08:00
wxr
cc79a15a16 参数错误修改 2025-11-24 15:07:02 +08:00
wxr
1e82c22284 超差判定修改 2025-11-24 14:50:13 +08:00
FCL
82934c153d fix:qms启动2个实例 2025-11-21 13:35:32 +08:00
chenbowen
d814fae16d 1. 升级私有包版本 2025-11-19 14:48:09 +08:00
FCL
e6113058c0 fix:子样查询修改 2025-11-19 09:55:48 +08:00
chenbowen
49b6f956ff 1. 新增 qms 绑定端口 2025-11-18 18:03:31 +08:00
FCL
d80d5da026 feat:部署调试 2025-11-18 17:51:11 +08:00
FCL
c3f891095f feat:部署调试 2025-11-18 17:48:06 +08:00
FCL
ac2295cac9 feat:阶段性代码合并 2025-11-18 10:59:14 +08:00
157 changed files with 4672 additions and 585 deletions

View File

@@ -11,7 +11,7 @@ metadata:
description: DESC_PLACEHOLDER description: DESC_PLACEHOLDER
rollout.kubernetes.io/change-cause: "DESC_PLACEHOLDER:VERSION_PLACEHOLDER" rollout.kubernetes.io/change-cause: "DESC_PLACEHOLDER:VERSION_PLACEHOLDER"
spec: spec:
replicas: 1 replicas: 2
selector: selector:
matchLabels: matchLabels:
app: qms-server app: qms-server
@@ -74,3 +74,13 @@ spec:
port: 9999 port: 9999
targetPort: 9999 targetPort: 9999
nodePort: 30194 nodePort: 30194
- name: websocket-8320
protocol: TCP
port: 8320
targetPort: 8320
nodePort: 30320
- name: tcp-8330
protocol: TCP
port: 8330
targetPort: 8330
nodePort: 30330

14
pom.xml
View File

@@ -17,7 +17,7 @@
<url>https://github.com/YunaiV/ruoyi-vue-pro</url> <url>https://github.com/YunaiV/ruoyi-vue-pro</url>
<properties> <properties>
<revision>3.0.43</revision> <revision>3.0.45</revision>
<!-- Maven 相关 --> <!-- Maven 相关 -->
<java.version>17</java.version> <java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source> <maven.compiler.source>${java.version}</maven.compiler.source>
@@ -177,8 +177,8 @@
<config.server-addr>172.16.46.63:30848</config.server-addr> <config.server-addr>172.16.46.63:30848</config.server-addr>
<config.namespace>dev</config.namespace> <config.namespace>dev</config.namespace>
<config.group>DEFAULT_GROUP</config.group> <config.group>DEFAULT_GROUP</config.group>
<config.username/> <config.username>nacos</config.username>
<config.password/> <config.password>P@ssword25</config.password>
<config.version>1.0.0</config.version> <config.version>1.0.0</config.version>
</properties> </properties>
</profile> </profile>
@@ -190,8 +190,8 @@
<config.server-addr>172.16.46.63:30848</config.server-addr> <config.server-addr>172.16.46.63:30848</config.server-addr>
<config.namespace>prod</config.namespace> <config.namespace>prod</config.namespace>
<config.group>DEFAULT_GROUP</config.group> <config.group>DEFAULT_GROUP</config.group>
<config.username/> <config.username>nacos</config.username>
<config.password/> <config.password>P@ssword25</config.password>
<config.version>1.0.0</config.version> <config.version>1.0.0</config.version>
</properties> </properties>
</profile> </profile>
@@ -203,8 +203,8 @@
<config.server-addr>172.16.46.63:30848</config.server-addr> <config.server-addr>172.16.46.63:30848</config.server-addr>
<config.namespace>local</config.namespace> <config.namespace>local</config.namespace>
<config.group>DEFAULT_GROUP</config.group> <config.group>DEFAULT_GROUP</config.group>
<config.username/> <config.username>nacos</config.username>
<config.password/> <config.password>P@ssword25</config.password>
<config.version>1.0.0</config.version> <config.version>1.0.0</config.version>
</properties> </properties>
</profile> </profile>

View File

@@ -1,5 +1,6 @@
ARG BASE_IMAGE=172.16.46.66:10043/base-service/skywalking-agent-jre:9.7.0 FROM 172.16.46.66:10043/base-service/report-base:x86_64-ubuntu_22-jre21-2.0.0
FROM ${BASE_IMAGE} #ARG BASE_IMAGE=172.16.46.66:10043/base-service/skywalking-agent-jre:9.7.0
#FROM ${BASE_IMAGE}
RUN mkdir -p /appdata/server RUN mkdir -p /appdata/server
WORKDIR /appdata/server WORKDIR /appdata/server
## 将后端项目的 Jar 文件,复制到镜像中 ## 将后端项目的 Jar 文件,复制到镜像中
@@ -8,10 +9,10 @@ COPY ./target/qms-server.jar app.jar
## 设置 TZ 时区 ## 设置 TZ 时区
ENV TZ=Asia/Shanghai ENV TZ=Asia/Shanghai
ENV JAVA_OPTS="-Xms512m -Xmx512m" ENV JAVA_OPTS="-Xms512m -Xmx512m"
ENV SW_AGENT_HOME=/opt/skywalking/agent #ENV SW_AGENT_HOME=/opt/skywalking/agent
ENV SW_AGENT_NAME=qms-server #ENV SW_AGENT_NAME=qms-server
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES=172.16.46.63:30201 #ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES=172.16.46.63:30201
ENV AGENT_JAVA_OPTS="-javaagent:${SW_AGENT_HOME}/skywalking-agent.jar -Dskywalking.agent.service_name=${SW_AGENT_NAME} -Dskywalking.collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES}" #ENV AGENT_JAVA_OPTS="-javaagent:${SW_AGENT_HOME}/skywalking-agent.jar -Dskywalking.agent.service_name=${SW_AGENT_NAME} -Dskywalking.collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES}"
# 暴露端口 # 暴露端口
EXPOSE 48205 EXPOSE 48205

View File

@@ -0,0 +1,11 @@
call docker build -t zgty-qms:v6.0.0 .
call docker tag zgty-qms:v6.0.0 192.168.26.103:8075/zgty/zgty-qms:v6.0.0
call docker push 192.168.26.103:8075/zgty/zgty-qms:v6.0.0
call docker rmi 192.168.26.103:8075/zgty/zgty-qms:v6.0.0
call docker rmi zgty-qms:v6.0.0
pause

View File

@@ -105,3 +105,87 @@ justauth:
prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE:: prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟 timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
--- #################### liteflow相关配置 ####################
liteflow:
#规则文件路径
rule-source: el_xml:com.zt.plat.module.qms.core.liteflow.parser.QmsXmlFlowELParser
#-----------------以下非必须-----------------
#liteflow是否开启默认为true
enable: true
#liteflow的banner打印是否开启默认为true
print-banner: true
#上下文的初始数量槽默认值为1024这个值不用刻意配置这个值会自动扩容
slot-size: 1024
#FlowExecutor的execute2Future的线程数默认为64
main-executor-works: 64
#FlowExecutor的execute2Future的自定义线程池BuilderLiteFlow提供了默认的Builder
main-executor-class: com.yomahub.liteflow.thread.LiteFlowDefaultMainExecutorBuilder
#自定义请求ID的生成类LiteFlow提供了默认的生成类
request-id-generator-class: com.yomahub.liteflow.flow.id.DefaultRequestIdGenerator
#全局异步节点线程池大小默认为64
global-thread-pool-size: 64
#全局异步节点线程池队列大小默认为512
global-thread-pool-queue-size: 512
#全局异步节点线程池自定义BuilderLiteFlow提供了默认的线程池Builder
global-thread-pool-executor-class: com.yomahub.liteflow.thread.LiteFlowDefaultGlobalExecutorBuilder
#异步线程最长的等待时间(只用于when)默认值为15000
when-max-wait-time: 15000
#异步线程最长的等待时间(只用于when)默认值为MILLISECONDS毫秒
when-max-wait-time-unit: MILLISECONDS
#每个WHEN是否用单独的线程池
when-thread-pool-isolate: false
#设置解析模式一共有三种模式PARSE_ALL_ON_START | PARSE_ALL_ON_FIRST_EXEC | PARSE_ONE_ON_FIRST_EXEC
parse-mode: PARSE_ONE_ON_FIRST_EXEC
#全局重试次数默认为0
retry-count: 0
#是否支持不同类型的加载方式混用默认为false
support-multiple-type: false
#全局默认节点执行器
node-executor-class: com.yomahub.liteflow.flow.executor.DefaultNodeExecutor
#是否打印执行中过程中的日志默认为true
print-execution-log: true
#是否开启本地文件监听默认为false
enable-monitor-file: false
#是否开启快速解析模式默认为false
fast-load: false
#是否开启Node节点实例ID持久化默认为false
enable-node-instance-id: false
#是否开启虚拟线程(只在JDK21+环境有效)默认为true
enable-virtual-thread: true
#简易监控配置选项
monitor:
#监控是否开启,默认不开启
enable-log: false
#监控队列存储大小默认值为200
queue-limit: 200
#监控一开始延迟多少执行默认值为300000毫秒也就是5分钟
delay: 300000
#监控日志打印每过多少时间执行一次默认值为300000毫秒也就是5分钟
period: 300000
zzjc:
druid:
sql-log: true
snowflake:
data-center-id: 30
tio:
server:
# port
port: 8320
# 心跳时间
heartbeat-timeout: 20000
websocket:
# enable websocket default false
enable: true
# websocket port
port: 8330
# 集群配置 默认关闭集群开启需要redis
cluster:
enabled: true
group: true
redis:
mode: single
ip: 172.16.46.63 # 地址
port: 30379 # 端口
database: 0 # 数据库索引

View File

@@ -56,6 +56,12 @@ spring:
database: 0 # 数据库索引 database: 0 # 数据库索引
# password: 123456 # 密码,建议生产环境开启 # password: 123456 # 密码,建议生产环境开启
--- #################### MQ 消息队列相关配置 ####################
# rocketmq 配置项,对应 RocketMQProperties 配置类
rocketmq:
name-server: 172.16.46.63:30876 # RocketMQ Namesrv
xxl: xxl:
job: job:
admin: admin:
@@ -85,6 +91,32 @@ mybatis-plus:
configuration: configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
justauth:
enabled: true
type:
DINGTALK: # 钉钉
client-id: dingvrnreaje3yqvzhxg
client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
ignore-check-redirect-uri: true
WECHAT_ENTERPRISE: # 企业微信
client-id: wwd411c69a39ad2e54
client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
agent-id: 1000004
ignore-check-redirect-uri: true
# noinspection SpringBootApplicationYaml
WECHAT_MINI_PROGRAM: # 微信小程序
client-id: ${dollar}{wx.miniapp.appid}
client-secret: ${dollar}{wx.miniapp.secret}
ignore-check-redirect-uri: true
ignore-check-state: true # 微信小程序,不会使用到 state所以不进行校验
WECHAT_MP: # 微信公众号
client-id: ${dollar}{wx.mp.app-id}
client-secret: ${dollar}{wx.mp.secret}
ignore-check-redirect-uri: true
cache:
type: REDIS
prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
# 芋道配置项,设置当前项目所有自定义的配置 # 芋道配置项,设置当前项目所有自定义的配置
zt: zt:
@@ -95,3 +127,87 @@ zt:
access-log: # 访问日志的配置项 access-log: # 访问日志的配置项
enable: true enable: true
--- #################### liteflow相关配置 ####################
liteflow:
#规则文件路径
rule-source: el_xml:com.zt.plat.module.qms.core.liteflow.parser.QmsXmlFlowELParser
#-----------------以下非必须-----------------
#liteflow是否开启默认为true
enable: true
#liteflow的banner打印是否开启默认为true
print-banner: true
#上下文的初始数量槽默认值为1024这个值不用刻意配置这个值会自动扩容
slot-size: 1024
#FlowExecutor的execute2Future的线程数默认为64
main-executor-works: 64
#FlowExecutor的execute2Future的自定义线程池BuilderLiteFlow提供了默认的Builder
main-executor-class: com.yomahub.liteflow.thread.LiteFlowDefaultMainExecutorBuilder
#自定义请求ID的生成类LiteFlow提供了默认的生成类
request-id-generator-class: com.yomahub.liteflow.flow.id.DefaultRequestIdGenerator
#全局异步节点线程池大小默认为64
global-thread-pool-size: 64
#全局异步节点线程池队列大小默认为512
global-thread-pool-queue-size: 512
#全局异步节点线程池自定义BuilderLiteFlow提供了默认的线程池Builder
global-thread-pool-executor-class: com.yomahub.liteflow.thread.LiteFlowDefaultGlobalExecutorBuilder
#异步线程最长的等待时间(只用于when)默认值为15000
when-max-wait-time: 15000
#异步线程最长的等待时间(只用于when)默认值为MILLISECONDS毫秒
when-max-wait-time-unit: MILLISECONDS
#每个WHEN是否用单独的线程池
when-thread-pool-isolate: false
#设置解析模式一共有三种模式PARSE_ALL_ON_START | PARSE_ALL_ON_FIRST_EXEC | PARSE_ONE_ON_FIRST_EXEC
parse-mode: PARSE_ONE_ON_FIRST_EXEC
#全局重试次数默认为0
retry-count: 0
#是否支持不同类型的加载方式混用默认为false
support-multiple-type: false
#全局默认节点执行器
node-executor-class: com.yomahub.liteflow.flow.executor.DefaultNodeExecutor
#是否打印执行中过程中的日志默认为true
print-execution-log: true
#是否开启本地文件监听默认为false
enable-monitor-file: false
#是否开启快速解析模式默认为false
fast-load: false
#是否开启Node节点实例ID持久化默认为false
enable-node-instance-id: false
#是否开启虚拟线程(只在JDK21+环境有效)默认为true
enable-virtual-thread: true
#简易监控配置选项
monitor:
#监控是否开启,默认不开启
enable-log: false
#监控队列存储大小默认值为200
queue-limit: 200
#监控一开始延迟多少执行默认值为300000毫秒也就是5分钟
delay: 300000
#监控日志打印每过多少时间执行一次默认值为300000毫秒也就是5分钟
period: 300000
zzjc:
druid:
sql-log: true
snowflake:
data-center-id: 30
tio:
server:
# port
port: 8320
# 心跳时间
heartbeat-timeout: 20000
websocket:
# enable websocket default false
enable: true
# websocket port
port: 8330
# 集群配置 默认关闭集群开启需要redis
cluster:
enabled: true
group: true
redis:
mode: single
ip: 172.16.46.63 # 地址
port: 30379 # 端口
database: 0 # 数据库索引

View File

@@ -87,7 +87,7 @@ public interface ErrorCodeConstants {
ErrorCode CONFIG_PERMISSION_NOT_EXISTS = new ErrorCode(1_032_050_000, "权限配置不存在"); ErrorCode CONFIG_PERMISSION_NOT_EXISTS = new ErrorCode(1_032_050_000, "权限配置不存在");
ErrorCode CONFIG_PERMISSION_DUPLICATE = new ErrorCode(1_032_050_000, "权限配置数据有误"); ErrorCode CONFIG_PERMISSION_DUPLICATE = new ErrorCode(1_032_050_000, "权限配置数据有误");
ErrorCode CONFIG_WAREHOUSE_LOCATION_NOT_EXISTS = new ErrorCode(1_032_050_000, "存放位置不存在"); ErrorCode CONFIG_WAREHOUSE_LOCATION_NOT_EXISTS = new ErrorCode(1_032_050_000, "存放位置不存在");
ErrorCode CONFIG_WAREHOUSE_LOCATION_CODE_DUPLICATE = new ErrorCode(1_032_050_000, "库位编码重复,请检查库位数据,或联系管理员处理"); ErrorCode CONFIG_WAREHOUSE_LOCATION_CODE_DUPLICATE = new ErrorCode(1_032_050_000, "库位编码重复,请检查!");
/*=================================bus 检验业务 1_032_100_000 ~ 1_032_149_999==================================*/ /*=================================bus 检验业务 1_032_100_000 ~ 1_032_149_999==================================*/
ErrorCode BUSINESS_SAMPLE_ENTRUST_REGISTRATION_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记业务不存在"); ErrorCode BUSINESS_SAMPLE_ENTRUST_REGISTRATION_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记业务不存在");
@@ -149,6 +149,9 @@ public interface ErrorCodeConstants {
ErrorCode MATERIAL_INFOMATION_NOT_EXISTS = new ErrorCode(1_032_150_000, "试剂耗材不存在"); ErrorCode MATERIAL_INFOMATION_NOT_EXISTS = new ErrorCode(1_032_150_000, "试剂耗材不存在");
ErrorCode MATERIAL_PRODUCT_NOT_EXISTS = new ErrorCode(1_032_150_000, "试剂耗材大类不存在"); ErrorCode MATERIAL_PRODUCT_NOT_EXISTS = new ErrorCode(1_032_150_000, "试剂耗材大类不存在");
ErrorCode MATERIAL_LIFECYCLE_DETAIL_NOT_EXISTS = new ErrorCode(1_032_150_000, "物料通用流程明细不存在");
ErrorCode MATERIAL_LIFECYCLE_NOT_EXISTS = new ErrorCode(1_032_150_000, "物料通用流程不存在");
/*================================= tx 1_032_200_000 ~ 1_032_249_999 ==================================*/ /*================================= tx 1_032_200_000 ~ 1_032_249_999 ==================================*/

View File

@@ -184,4 +184,14 @@ public interface QmsCommonConstant {
/** 手动 **/ /** 手动 **/
String MANUAL = "manual"; String MANUAL = "manual";
/** 样品库操作类型: 归库、调拨、下架 **/
String SAMPLE_STORAGE_OPERATION_TYPE_STORAGE = "storage";
String SAMPLE_STORAGE_OPERATION_TYPE_TRANSFER = "dispatch";
String SAMPLE_STORAGE_OPERATION_TYPE_TAKEN_OFF = "take_off";
/** 允许提交 **/
String ALLOW_SUBMIT = "allow_submit";
} }

View File

@@ -17,7 +17,8 @@ public interface QmsPermissionConstant {
String TARGET_TYPE_CUSTOM = "custom"; String TARGET_TYPE_CUSTOM = "custom";
//======================各业务模块权限常量============================= //======================各业务模块权限常量=============================
//报告发起权限
String REPORT_DOCUMENT_TYPE_START = "report_document_type_start"; String REPORT_DOCUMENT_TYPE_START = "report_document_type_start"; //报告发起权限
String SAMPLE_WAREHOUSE_ADMIN = "sample_warehouse_admin"; //样品库管理员
} }

View File

@@ -1,12 +1,16 @@
package com.zt.plat.module.qms.business.bus.controller.admin; package com.zt.plat.module.qms.business.bus.controller.admin;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessSampleDispatchPageReqVO; import com.zt.plat.module.qms.business.bus.controller.vo.*;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessSampleDispatchRespVO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleDispatchDetailDO;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessSampleDispatchSaveReqVO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
import com.zt.plat.module.qms.business.bus.service.BusinessSampleDispatchDetailService;
import com.zt.plat.module.qms.business.bus.service.BusinessSubSampleService; import com.zt.plat.module.qms.business.bus.service.BusinessSubSampleService;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationPageReqVO;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationRespVO;
import com.zt.plat.module.qms.business.config.service.ConfigWarehouseLocationService;
import com.zt.plat.module.qms.enums.QmsCommonConstant; import com.zt.plat.module.qms.enums.QmsCommonConstant;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@@ -46,7 +50,9 @@ public class BusinessSampleDispatchController implements BusinessControllerMarke
@Resource private BusinessSampleDispatchService businessSampleDispatchService; @Resource private BusinessSampleDispatchService businessSampleDispatchService;
@Resource private BusinessSampleDispatchDetailService businessSampleDispatchDetailService;
@Resource private BusinessSubSampleService businessSubSampleService; @Resource private BusinessSubSampleService businessSubSampleService;
@Resource private ConfigWarehouseLocationService configWarehouseLocationService;
@PostMapping("/createTempData") @PostMapping("/createTempData")
@Operation(summary = "创建临时数据") @Operation(summary = "创建临时数据")
@@ -60,6 +66,7 @@ public class BusinessSampleDispatchController implements BusinessControllerMarke
@Operation(summary = "更新样品调拨") @Operation(summary = "更新样品调拨")
public CommonResult<Boolean> updateBusinessSampleDispatch(@Valid @RequestBody BusinessSampleDispatchSaveReqVO updateReqVO) { public CommonResult<Boolean> updateBusinessSampleDispatch(@Valid @RequestBody BusinessSampleDispatchSaveReqVO updateReqVO) {
updateReqVO.setCancelStatus("0"); updateReqVO.setCancelStatus("0");
updateReqVO.setFlowStatus(QmsCommonConstant.NOT_START);
businessSampleDispatchService.updateBusinessSampleDispatch(updateReqVO); businessSampleDispatchService.updateBusinessSampleDispatch(updateReqVO);
return success(true); return success(true);
} }
@@ -67,19 +74,35 @@ public class BusinessSampleDispatchController implements BusinessControllerMarke
@PostMapping("/addOrRemoveSample") @PostMapping("/addOrRemoveSample")
@Operation(summary = "增加或移除样品") @Operation(summary = "增加或移除样品")
public CommonResult<Boolean> addOrRemoveSample(@Valid @RequestBody BusinessSampleDispatchSaveReqVO updateReqVO) { public CommonResult<Boolean> addOrRemoveSample(@Valid @RequestBody BusinessSampleDispatchSaveReqVO updateReqVO) {
businessSampleDispatchService.addOrRemoveSample(updateReqVO); businessSampleDispatchService.addOrRemoveSample(updateReqVO, true);
return success(true); return success(true);
} }
@PostMapping("/addBySampleCode") @PostMapping("/addBySampleReturnCode")
@Operation(summary = "增加或移除样品") @Operation(summary = "按归库码增加样品")
public CommonResult<Boolean> addBySampleCode(@RequestBody JSONObject param) { public CommonResult<Boolean> addBySampleReturnCode(@RequestBody JSONObject param) {
String id = param.getString("id"); String id = param.getString("id");
String sampleCode = param.getString("sampleCode"); String sampleReturnCode = param.getString("sampleReturnCode");
BusinessSubSampleDO businessSubSampleDO = businessSubSampleService.getBySampleCode(sampleCode); String warehouseCode = param.getString("warehouseCode");
if(ObjectUtils.isEmpty(warehouseCode)){
return CommonResult.error(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "请选择仓库,再扫描样品!");
}
BusinessSubSampleDO businessSubSampleDO = businessSubSampleService.getBySampleReturnCode(sampleReturnCode);
if(businessSubSampleDO == null) if(businessSubSampleDO == null)
return CommonResult.error(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "未查询到此样品!"); return CommonResult.error(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "未查询到此样品!");
//判断样品状态 //判断样品状态、库位
// String sampleWarehouseCode = businessSubSampleDO.getWarehouseCode(); //todo 判断库位
ConfigWarehouseLocationPageReqVO warehouseReqVO = new ConfigWarehouseLocationPageReqVO();
warehouseReqVO.setId(businessSubSampleDO.getConfigWarehouseLocationInfomationId());
PageResult<ConfigWarehouseLocationRespVO> warehousePage = configWarehouseLocationService.getConfigWarehouseLocationPage(warehouseReqVO);
if(warehousePage.getTotal() == 0){
return CommonResult.error(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "未查询到样品所在仓库,请检查样品码是否正确!");
}
ConfigWarehouseLocationRespVO warehouse = warehousePage.getList().get(0);
if(!warehouseCode.equals(warehouse.getWarehouseCode())){
return CommonResult.error(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "此样品所在仓库为:"+warehouse.getWarehouseName()+",请检查样品码是否正确!");
}
String returnStatus = businessSubSampleDO.getReturnStatus(); String returnStatus = businessSubSampleDO.getReturnStatus();
if(!QmsCommonConstant.COMPLETED.equals(returnStatus)){ if(!QmsCommonConstant.COMPLETED.equals(returnStatus)){
return CommonResult.error(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "样品状态为:"+returnStatus+",不能调拨!"); return CommonResult.error(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "样品状态为:"+returnStatus+",不能调拨!");
@@ -88,14 +111,19 @@ public class BusinessSampleDispatchController implements BusinessControllerMarke
if("1".equals(dispatchStatus)){ if("1".equals(dispatchStatus)){
return CommonResult.error(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "样品已被调拨:请归还后再调拨!"); return CommonResult.error(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "样品已被调拨:请归还后再调拨!");
} }
//todo 重复校验 BusinessSampleDispatchDetailPageReqVO reqVO = new BusinessSampleDispatchDetailPageReqVO();
reqVO.setParentId(Long.valueOf(id));
reqVO.setSampleReturnCode(sampleReturnCode);
PageResult<BusinessSampleDispatchDetailExtendRespVO> pageDetailList = businessSampleDispatchDetailService.getBusinessSampleDispatchDetailPage(reqVO);
if(pageDetailList.getTotal() > 0){
return CommonResult.error(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "次样品已添加,请勿重复添加!");
}
List<Long> sampleIds = new ArrayList<>(); List<Long> sampleIds = new ArrayList<>();
sampleIds.add(businessSubSampleDO.getId()); sampleIds.add(businessSubSampleDO.getId());
BusinessSampleDispatchSaveReqVO updateReqVO = new BusinessSampleDispatchSaveReqVO(); BusinessSampleDispatchSaveReqVO updateReqVO = new BusinessSampleDispatchSaveReqVO();
updateReqVO.setId(Long.valueOf(id)); updateReqVO.setId(Long.valueOf(id));
updateReqVO.setAddSubSampleIds(sampleIds); updateReqVO.setAddSubSampleIds(sampleIds);
businessSampleDispatchService.addOrRemoveSample(updateReqVO); businessSampleDispatchService.addOrRemoveSample(updateReqVO, false);
return success(true); return success(true);
} }

View File

@@ -50,11 +50,11 @@ public class BusinessSampleDispatchDetailController implements BusinessControlle
@GetMapping("/searchBySampleCode") @GetMapping("/searchBySampleCode")
@Operation(summary = "扫码查询待归还样品") @Operation(summary = "扫码查询待归还样品")
public CommonResult<BusinessSampleDispatchDetailExtendRespVO> searchBySampleCode(HttpServletRequest request) { public CommonResult<BusinessSampleDispatchDetailExtendRespVO> searchBySampleCode(HttpServletRequest request) {
String sampleCode = request.getParameter("sampleCode"); String sampleReturnCode = request.getParameter("sampleReturnCode");
if(ObjectUtils.isEmpty(sampleCode)) if(ObjectUtils.isEmpty(sampleReturnCode))
return CommonResult.error(BUSINESS_SAMPLE_DISPATCH_DETAIL_NOT_EXISTS.getCode(), "请输入样品编号!"); return CommonResult.error(BUSINESS_SAMPLE_DISPATCH_DETAIL_NOT_EXISTS.getCode(), "请输入样品编号!");
BusinessSampleDispatchDetailPageReqVO reqVO = new BusinessSampleDispatchDetailPageReqVO(); BusinessSampleDispatchDetailPageReqVO reqVO = new BusinessSampleDispatchDetailPageReqVO();
reqVO.setSampleCode(sampleCode); reqVO.setSampleReturnCode(sampleReturnCode);
reqVO.setBorrowStatus("1"); reqVO.setBorrowStatus("1");
reqVO.setGivebackStatus("0"); reqVO.setGivebackStatus("0");

View File

@@ -37,7 +37,7 @@ import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
@RestController @RestController
@RequestMapping("/qms/business-sample-handover") @RequestMapping("/qms/business-sample-handover")
@Validated @Validated
public class BusinessSampleHandoverController implements BusinessControllerMarker { public class BusinessSampleHandoverController {
@Resource @Resource

View File

@@ -92,6 +92,14 @@ public class BusinessSampleHandoverDetailController implements BusinessControlle
return success(BeanUtils.toBean(pageResult, BusinessSampleHandoverDetailRespVO.class)); return success(BeanUtils.toBean(pageResult, BusinessSampleHandoverDetailRespVO.class));
} }
@GetMapping("/takeOffPageList")
@Operation(summary = "获得样品交接明细分页")
//@PreAuthorize("@ss.hasPermission('qms:business-sample-handover-detail:query')")
public CommonResult<PageResult<BusinessSampleHandoverDetailRespVO>> takeOffPageList(@Valid BusinessSampleHandoverDetailPageReqVO pageReqVO) {
PageResult<BusinessSampleHandoverDetailRespVO> pageResult = businessSampleHandoverDetailService.takeOffPageList(pageReqVO);
return success(pageResult);
}
@GetMapping("/export-excel") @GetMapping("/export-excel")
@Operation(summary = "导出样品交接明细 Excel") @Operation(summary = "导出样品交接明细 Excel")
//@PreAuthorize("@ss.hasPermission('qms:business-sample-handover-detail:export')") //@PreAuthorize("@ss.hasPermission('qms:business-sample-handover-detail:export')")

View File

@@ -90,6 +90,14 @@ public class BusinessSubSampleController implements BusinessControllerMarker {
return success(result); return success(result);
} }
@GetMapping("/getPrintSubSample")
@Operation(summary = "获得打印子样业务")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
public CommonResult<BusinessSubSampleExtendRespVO> getPrintSubSample(@RequestParam("id") Long id) {
BusinessSubSampleExtendRespVO result = businessSubSampleService.getPrintSubSample(id);
return success(result);
}
@GetMapping("/list") @GetMapping("/list")
@Operation(summary = "获得子样业务列表") @Operation(summary = "获得子样业务列表")
//@PreAuthorize("@ss.hasPermission('qms:business-sub-sample:query')") //@PreAuthorize("@ss.hasPermission('qms:business-sub-sample:query')")
@@ -121,6 +129,13 @@ public class BusinessSubSampleController implements BusinessControllerMarker {
return success(pageResult); return success(pageResult);
} }
@GetMapping("/selectPageForDispatch")
@Operation(summary = "查询可申请调拨子样")
public CommonResult<PageResult<BusinessSubSampleExtendRespVO>> selectPageForDispatch(@Valid BusinessSubSamplePageReqVO pageReqVO) {
PageResult<BusinessSubSampleExtendRespVO> pageResult = businessSubSampleService.selectPageForDispatch(pageReqVO);
return success(pageResult);
}
@GetMapping("/page-task") @GetMapping("/page-task")
@Operation(summary = "获得子样业务分页") @Operation(summary = "获得子样业务分页")
//@PreAuthorize("@ss.hasPermission('qms:business-sub-sample:query')") //@PreAuthorize("@ss.hasPermission('qms:business-sub-sample:query')")

View File

@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
import com.zt.plat.framework.common.pojo.CommonResult; import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.qms.business.bus.controller.vo.*; import com.zt.plat.module.qms.business.bus.controller.vo.*;
import com.zt.plat.module.qms.business.bus.service.SampleAnalysisAuditService; import com.zt.plat.module.qms.business.bus.service.SampleAnalysisAuditService;
@@ -25,7 +26,7 @@ import static com.zt.plat.framework.common.pojo.CommonResult.success;
@RestController @RestController
@RequestMapping("/qms/bus/sample/analysis-audit") @RequestMapping("/qms/bus/sample/analysis-audit")
@Validated @Validated
public class SampleAnalysisAuditController { public class SampleAnalysisAuditController implements BusinessControllerMarker {
@Resource @Resource
private SampleAnalysisAuditService sampleAnalysisAuditService; private SampleAnalysisAuditService sampleAnalysisAuditService;

View File

@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
import com.zt.plat.framework.common.pojo.CommonResult; import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.qms.business.bus.controller.vo.*; import com.zt.plat.module.qms.business.bus.controller.vo.*;
import com.zt.plat.module.qms.business.bus.service.SampleAnalysisService; import com.zt.plat.module.qms.business.bus.service.SampleAnalysisService;
@@ -23,7 +24,7 @@ import static com.zt.plat.framework.common.pojo.CommonResult.success;
@RestController @RestController
@RequestMapping("/qms/bus/sample/analysis") @RequestMapping("/qms/bus/sample/analysis")
@Validated @Validated
public class SampleAnalysisController { public class SampleAnalysisController implements BusinessControllerMarker {
@Resource @Resource
private SampleAnalysisService sampleAnalysisService ; private SampleAnalysisService sampleAnalysisService ;

View File

@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.yomahub.liteflow.core.FlowExecutor; import com.yomahub.liteflow.core.FlowExecutor;
import com.yomahub.liteflow.flow.LiteflowResponse; import com.yomahub.liteflow.flow.LiteflowResponse;
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
import com.zt.plat.framework.common.pojo.CommonResult; import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO; import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
import com.zt.plat.module.qms.business.bus.controller.vo.*; import com.zt.plat.module.qms.business.bus.controller.vo.*;
@@ -34,7 +34,7 @@ import jakarta.validation.Valid;
@RestController @RestController
@RequestMapping("/qms/bus/sample/entrust") @RequestMapping("/qms/bus/sample/entrust")
@Validated @Validated
public class SampleEntrustController { public class SampleEntrustController implements BusinessControllerMarker {
@Resource @Resource
private FlowExecutor flowExecutor; private FlowExecutor flowExecutor;

View File

@@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSON;
import com.yomahub.liteflow.core.FlowExecutor; import com.yomahub.liteflow.core.FlowExecutor;
import com.yomahub.liteflow.flow.LiteflowResponse; import com.yomahub.liteflow.flow.LiteflowResponse;
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
import com.zt.plat.framework.common.pojo.CommonResult; import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.util.object.BeanUtils; import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.framework.tenant.core.context.TenantContextHolder; import com.zt.plat.framework.tenant.core.context.TenantContextHolder;
@@ -33,7 +33,7 @@ import static com.zt.plat.framework.common.pojo.CommonResult.error;
@RestController @RestController
@RequestMapping("/qms/bus/sample/flow") @RequestMapping("/qms/bus/sample/flow")
@Validated @Validated
public class SampleFlowController { public class SampleFlowController implements BusinessControllerMarker {
@Resource @Resource
private SampleFlowService sampleFlowService; private SampleFlowService sampleFlowService;

View File

@@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
import com.zt.plat.framework.common.pojo.CommonResult; import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.qms.business.bus.controller.vo.*; import com.zt.plat.module.qms.business.bus.controller.vo.*;
import com.zt.plat.module.qms.business.bus.service.SampleResultReportingService; import com.zt.plat.module.qms.business.bus.service.SampleResultReportingService;
@@ -28,7 +29,7 @@ import org.springframework.web.bind.annotation.RequestBody;
@RestController @RestController
@RequestMapping("/qms/bus/sample/result-reporting") @RequestMapping("/qms/bus/sample/result-reporting")
@Validated @Validated
public class SampleResultReportingController { public class SampleResultReportingController implements BusinessControllerMarker {
@Resource @Resource
private SampleResultReportingService sampleResultReportingService; private SampleResultReportingService sampleResultReportingService;

View File

@@ -11,6 +11,7 @@ import static com.zt.plat.framework.common.pojo.CommonResult.success;
import java.util.List; import java.util.List;
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
import com.zt.plat.framework.common.pojo.CommonResult; import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO; import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
import com.zt.plat.module.qms.business.bus.controller.vo.*; import com.zt.plat.module.qms.business.bus.controller.vo.*;
@@ -27,7 +28,7 @@ import jakarta.annotation.Resource;
@RestController @RestController
@RequestMapping("/qms/bus/sample/task-assign") @RequestMapping("/qms/bus/sample/task-assign")
@Validated @Validated
public class SampleTaskAssignController { public class SampleTaskAssignController implements BusinessControllerMarker {
@Resource @Resource
private SampleTaskAssignService sampleTaskAssignService; private SampleTaskAssignService sampleTaskAssignService;

View File

@@ -0,0 +1,12 @@
package com.zt.plat.module.qms.business.bus.controller.vo;
import lombok.Data;
@Data
public class BusinessAssayParameterDataExtendRespVO extends BusinessAssayParameterDataRespVO {
private String parameterName;
private String parameterKey;
}

View File

@@ -65,4 +65,8 @@ public class BusinessAssayProjectDataReqVO {
@Schema(description = "备注") @Schema(description = "备注")
private String remark; private String remark;
//========================扩展字段==================================
@Schema(description = "检测任务ID列表", example = "16505")
private List<Long> businessAssayTaskDataIdList;
} }

View File

@@ -18,6 +18,9 @@ public class BusinessAssayTaskDataExtendRespVO extends BusinessAssayTaskDataResp
@Schema(description = "分析方法名称") @Schema(description = "分析方法名称")
private String configAssayMethodName; private String configAssayMethodName;
@Schema(description = "子样配置id")
private Long configSubSampleId;
@Schema(description = "样品名称") @Schema(description = "样品名称")
private String sampleName; private String sampleName;

View File

@@ -49,6 +49,9 @@ public class BusinessAssayTaskDataPageReqVO extends PageParam {
@Schema(description = "分析人") @Schema(description = "分析人")
private String assayOperator; private String assayOperator;
@Schema(description = "分析人ID", example = "27835")
private Long assayOperatorId;
@Schema(description = "分配任务时间") @Schema(description = "分配任务时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] assignTaskTime; private LocalDateTime[] assignTaskTime;
@@ -62,6 +65,9 @@ public class BusinessAssayTaskDataPageReqVO extends PageParam {
@Schema(description = "上报人") @Schema(description = "上报人")
private String reporter; private String reporter;
@Schema(description = "上报人ID", example = "15920")
private Long reporterId;
@Schema(description = "上报时间") @Schema(description = "上报时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] reportTime; private LocalDateTime[] reportTime;
@@ -92,4 +98,8 @@ public class BusinessAssayTaskDataPageReqVO extends PageParam {
@Schema(description = "备注") @Schema(description = "备注")
private String remark; private String remark;
//===================================扩展字段===============================================
@Schema(description = "样品状态")
private String sampleStatus;
} }

View File

@@ -49,6 +49,9 @@ public class BusinessAssayTaskDataReqVO {
@Schema(description = "分析人") @Schema(description = "分析人")
private String assayOperator; private String assayOperator;
@Schema(description = "分析人ID", example = "27835")
private Long assayOperatorId;
@Schema(description = "分配任务时间") @Schema(description = "分配任务时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] assignTaskTime; private LocalDateTime[] assignTaskTime;
@@ -62,6 +65,9 @@ public class BusinessAssayTaskDataReqVO {
@Schema(description = "上报人") @Schema(description = "上报人")
private String reporter; private String reporter;
@Schema(description = "上报人ID", example = "15920")
private Long reporterId;
@Schema(description = "上报时间") @Schema(description = "上报时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] reportTime; private LocalDateTime[] reportTime;
@@ -96,5 +102,7 @@ public class BusinessAssayTaskDataReqVO {
@Schema(description = "判定上报状态") @Schema(description = "判定上报状态")
private String asmtReportedStatus; private String asmtReportedStatus;
@Schema(description = "样品状态")
private String sampleStatus;
} }

View File

@@ -63,6 +63,10 @@ public class BusinessAssayTaskDataRespVO {
@ExcelProperty("分析人") @ExcelProperty("分析人")
private String assayOperator; private String assayOperator;
@Schema(description = "分析人ID", example = "27835")
@ExcelProperty("分析人ID")
private Long assayOperatorId;
@Schema(description = "分配任务时间") @Schema(description = "分配任务时间")
@ExcelProperty("分配任务时间") @ExcelProperty("分配任务时间")
private LocalDateTime assignTaskTime; private LocalDateTime assignTaskTime;
@@ -79,6 +83,10 @@ public class BusinessAssayTaskDataRespVO {
@ExcelProperty("上报人") @ExcelProperty("上报人")
private String reporter; private String reporter;
@Schema(description = "上报人ID", example = "15920")
@ExcelProperty("上报人ID")
private Long reporterId;
@Schema(description = "上报时间") @Schema(description = "上报时间")
@ExcelProperty("上报时间") @ExcelProperty("上报时间")
private LocalDateTime reportTime; private LocalDateTime reportTime;

View File

@@ -2,9 +2,7 @@ package com.zt.plat.module.qms.business.bus.controller.vo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import lombok.*;
import java.util.*;
import jakarta.validation.constraints.*; import jakarta.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@Schema(description = "管理后台 - 子样检测任务业务新增/修改 Request VO") @Schema(description = "管理后台 - 子样检测任务业务新增/修改 Request VO")
@@ -59,6 +57,9 @@ public class BusinessAssayTaskDataSaveReqVO {
@Schema(description = "分析人") @Schema(description = "分析人")
private String assayOperator; private String assayOperator;
@Schema(description = "分析人ID", example = "27835")
private Long assayOperatorId;
@Schema(description = "分配任务时间") @Schema(description = "分配任务时间")
private LocalDateTime assignTaskTime; private LocalDateTime assignTaskTime;
@@ -71,6 +72,9 @@ public class BusinessAssayTaskDataSaveReqVO {
@Schema(description = "上报人") @Schema(description = "上报人")
private String reporter; private String reporter;
@Schema(description = "上报人ID", example = "15920")
private Long reporterId;
@Schema(description = "上报时间") @Schema(description = "上报时间")
private LocalDateTime reportTime; private LocalDateTime reportTime;

View File

@@ -34,6 +34,9 @@ public class BusinessAssayTaskPageReqVO extends PageParam {
@Schema(description = "任务单分配人") @Schema(description = "任务单分配人")
private String taskAssignOperator; private String taskAssignOperator;
@Schema(description = "任务单分配人ID", example = "14545")
private Long taskAssignOperatorId;
@Schema(description = "任务单分配时间") @Schema(description = "任务单分配时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] taskAssignTime; private LocalDateTime[] taskAssignTime;
@@ -54,6 +57,9 @@ public class BusinessAssayTaskPageReqVO extends PageParam {
@Schema(description = "分析人") @Schema(description = "分析人")
private String assayOperator; private String assayOperator;
@Schema(description = "分析人", example = "17685")
private Long assayOperatorId;
@Schema(description = "分析时间") @Schema(description = "分析时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] assayTime; private LocalDateTime[] assayTime;
@@ -75,6 +81,9 @@ public class BusinessAssayTaskPageReqVO extends PageParam {
@Schema(description = "上报人") @Schema(description = "上报人")
private String reportOperator; private String reportOperator;
@Schema(description = "上报人ID", example = "7393")
private Long reportOperatorId;
@Schema(description = "任务单完成时间") @Schema(description = "任务单完成时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] taskFinishTime; private LocalDateTime[] taskFinishTime;

View File

@@ -33,6 +33,9 @@ public class BusinessAssayTaskReqVO {
@Schema(description = "任务单分配人") @Schema(description = "任务单分配人")
private String taskAssignOperator; private String taskAssignOperator;
@Schema(description = "任务单分配人ID", example = "14545")
private Long taskAssignOperatorId;
@Schema(description = "任务单分配时间") @Schema(description = "任务单分配时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] taskAssignTime; private LocalDateTime[] taskAssignTime;
@@ -53,6 +56,9 @@ public class BusinessAssayTaskReqVO {
@Schema(description = "分析人") @Schema(description = "分析人")
private String assayOperator; private String assayOperator;
@Schema(description = "分析人", example = "17685")
private Long assayOperatorId;
@Schema(description = "分析时间") @Schema(description = "分析时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] assayTime; private LocalDateTime[] assayTime;
@@ -74,6 +80,9 @@ public class BusinessAssayTaskReqVO {
@Schema(description = "上报人") @Schema(description = "上报人")
private String reportOperator; private String reportOperator;
@Schema(description = "上报人ID", example = "7393")
private Long reportOperatorId;
@Schema(description = "任务单完成时间") @Schema(description = "任务单完成时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] taskFinishTime; private LocalDateTime[] taskFinishTime;

View File

@@ -42,6 +42,10 @@ public class BusinessAssayTaskRespVO {
@ExcelProperty("任务单分配人") @ExcelProperty("任务单分配人")
private String taskAssignOperator; private String taskAssignOperator;
@Schema(description = "任务单分配人ID", example = "14545")
@ExcelProperty("任务单分配人ID")
private Long taskAssignOperatorId;
@Schema(description = "任务单分配时间", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "任务单分配时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("任务单分配时间") @ExcelProperty("任务单分配时间")
private LocalDateTime taskAssignTime; private LocalDateTime taskAssignTime;
@@ -64,6 +68,10 @@ public class BusinessAssayTaskRespVO {
@ExcelProperty("分析人") @ExcelProperty("分析人")
private String assayOperator; private String assayOperator;
@Schema(description = "分析人", example = "17685")
@ExcelProperty("分析人")
private Long assayOperatorId;
@Schema(description = "分析时间") @Schema(description = "分析时间")
@ExcelProperty("分析时间") @ExcelProperty("分析时间")
private LocalDateTime assayTime; private LocalDateTime assayTime;
@@ -84,6 +92,10 @@ public class BusinessAssayTaskRespVO {
@ExcelProperty("上报人") @ExcelProperty("上报人")
private String reportOperator; private String reportOperator;
@Schema(description = "上报人ID", example = "7393")
@ExcelProperty("上报人ID")
private Long reportOperatorId;
@Schema(description = "任务单完成时间") @Schema(description = "任务单完成时间")
@ExcelProperty("任务单完成时间") @ExcelProperty("任务单完成时间")
private LocalDateTime taskFinishTime; private LocalDateTime taskFinishTime;

View File

@@ -40,9 +40,11 @@ public class BusinessAssayTaskSaveReqVO {
private String taskSourceType; private String taskSourceType;
@Schema(description = "任务单分配人", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "任务单分配人", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "任务单分配人不能为空")
private String taskAssignOperator; private String taskAssignOperator;
@Schema(description = "任务单分配人ID", example = "14545")
private Long taskAssignOperatorId;
@Schema(description = "任务单分配时间", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "任务单分配时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "任务单分配时间不能为空") @NotNull(message = "任务单分配时间不能为空")
private LocalDateTime taskAssignTime; private LocalDateTime taskAssignTime;
@@ -64,6 +66,9 @@ public class BusinessAssayTaskSaveReqVO {
@Schema(description = "分析人") @Schema(description = "分析人")
private String assayOperator; private String assayOperator;
@Schema(description = "分析人", example = "17685")
private Long assayOperatorId;
@Schema(description = "分析时间") @Schema(description = "分析时间")
private LocalDateTime assayTime; private LocalDateTime assayTime;
@@ -79,6 +84,9 @@ public class BusinessAssayTaskSaveReqVO {
@Schema(description = "上报人") @Schema(description = "上报人")
private String reportOperator; private String reportOperator;
@Schema(description = "上报人ID", example = "7393")
private Long reportOperatorId;
@Schema(description = "任务单完成时间") @Schema(description = "任务单完成时间")
private LocalDateTime taskFinishTime; private LocalDateTime taskFinishTime;

View File

@@ -46,6 +46,9 @@ public class BusinessQCCoefficientDataPageReqVO extends PageParam {
@Schema(description = "分析人") @Schema(description = "分析人")
private String assayOperator; private String assayOperator;
@Schema(description = "分析人ID", example = "10644")
private Long assayOperatorId;
@Schema(description = "分配任务时间") @Schema(description = "分配任务时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] assignTaskTime; private LocalDateTime[] assignTaskTime;
@@ -59,6 +62,9 @@ public class BusinessQCCoefficientDataPageReqVO extends PageParam {
@Schema(description = "上报人") @Schema(description = "上报人")
private String reporter; private String reporter;
@Schema(description = "上报人ID", example = "2683")
private Long reporterId;
@Schema(description = "上报时间") @Schema(description = "上报时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] reportTime; private LocalDateTime[] reportTime;

View File

@@ -46,6 +46,9 @@ public class BusinessQCCoefficientDataReqVO {
@Schema(description = "分析人") @Schema(description = "分析人")
private String assayOperator; private String assayOperator;
@Schema(description = "分析人ID", example = "10644")
private Long assayOperatorId;
@Schema(description = "分配任务时间") @Schema(description = "分配任务时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] assignTaskTime; private LocalDateTime[] assignTaskTime;
@@ -59,6 +62,9 @@ public class BusinessQCCoefficientDataReqVO {
@Schema(description = "上报人") @Schema(description = "上报人")
private String reporter; private String reporter;
@Schema(description = "上报人ID", example = "2683")
private Long reporterId;
@Schema(description = "上报时间") @Schema(description = "上报时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] reportTime; private LocalDateTime[] reportTime;

View File

@@ -60,6 +60,9 @@ public class BusinessQCCoefficientDataRespVO {
@ExcelProperty("分析人") @ExcelProperty("分析人")
private String assayOperator; private String assayOperator;
@Schema(description = "分析人ID", example = "10644")
private Long assayOperatorId;
@Schema(description = "分配任务时间") @Schema(description = "分配任务时间")
@ExcelProperty("分配任务时间") @ExcelProperty("分配任务时间")
private LocalDateTime assignTaskTime; private LocalDateTime assignTaskTime;
@@ -76,6 +79,9 @@ public class BusinessQCCoefficientDataRespVO {
@ExcelProperty("上报人") @ExcelProperty("上报人")
private String reporter; private String reporter;
@Schema(description = "上报人ID", example = "2683")
private Long reporterId;
@Schema(description = "上报时间") @Schema(description = "上报时间")
@ExcelProperty("上报时间") @ExcelProperty("上报时间")
private LocalDateTime reportTime; private LocalDateTime reportTime;

View File

@@ -50,6 +50,9 @@ public class BusinessQCCoefficientDataSaveReqVO {
@Schema(description = "分析人") @Schema(description = "分析人")
private String assayOperator; private String assayOperator;
@Schema(description = "分析人ID", example = "10644")
private Long assayOperatorId;
@Schema(description = "分配任务时间") @Schema(description = "分配任务时间")
private LocalDateTime assignTaskTime; private LocalDateTime assignTaskTime;
@@ -59,6 +62,9 @@ public class BusinessQCCoefficientDataSaveReqVO {
@Schema(description = "是否已上报") @Schema(description = "是否已上报")
private Integer isReported; private Integer isReported;
@Schema(description = "上报人ID", example = "2683")
private Long reporterId;
@Schema(description = "上报人") @Schema(description = "上报人")
private String reporter; private String reporter;

View File

@@ -46,6 +46,9 @@ public class BusinessQCManagementDataPageReqVO extends PageParam {
@Schema(description = "分析人") @Schema(description = "分析人")
private String assayOperator; private String assayOperator;
@Schema(description = "分析人ID", example = "6498")
private Long assayOperatorId;
@Schema(description = "分配任务时间") @Schema(description = "分配任务时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] assignTaskTime; private LocalDateTime[] assignTaskTime;
@@ -59,6 +62,9 @@ public class BusinessQCManagementDataPageReqVO extends PageParam {
@Schema(description = "上报人") @Schema(description = "上报人")
private String reporter; private String reporter;
@Schema(description = "上报人ID", example = "17517")
private Long reporterId;
@Schema(description = "上报时间") @Schema(description = "上报时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] reportTime; private LocalDateTime[] reportTime;

View File

@@ -46,6 +46,9 @@ public class BusinessQCManagementDataReqVO {
@Schema(description = "分析人") @Schema(description = "分析人")
private String assayOperator; private String assayOperator;
@Schema(description = "分析人ID", example = "6498")
private Long assayOperatorId;
@Schema(description = "分配任务时间") @Schema(description = "分配任务时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] assignTaskTime; private LocalDateTime[] assignTaskTime;
@@ -59,6 +62,9 @@ public class BusinessQCManagementDataReqVO {
@Schema(description = "上报人") @Schema(description = "上报人")
private String reporter; private String reporter;
@Schema(description = "上报人ID", example = "17517")
private Long reporterId;
@Schema(description = "上报时间") @Schema(description = "上报时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] reportTime; private LocalDateTime[] reportTime;

View File

@@ -60,6 +60,9 @@ public class BusinessQCManagementDataRespVO {
@ExcelProperty("分析人") @ExcelProperty("分析人")
private String assayOperator; private String assayOperator;
@Schema(description = "分析人ID", example = "6498")
private Long assayOperatorId;
@Schema(description = "分配任务时间") @Schema(description = "分配任务时间")
@ExcelProperty("分配任务时间") @ExcelProperty("分配任务时间")
private LocalDateTime assignTaskTime; private LocalDateTime assignTaskTime;
@@ -76,6 +79,9 @@ public class BusinessQCManagementDataRespVO {
@ExcelProperty("上报人") @ExcelProperty("上报人")
private String reporter; private String reporter;
@Schema(description = "上报人ID", example = "17517")
private Long reporterId;
@Schema(description = "上报时间") @Schema(description = "上报时间")
@ExcelProperty("上报时间") @ExcelProperty("上报时间")
private LocalDateTime reportTime; private LocalDateTime reportTime;

View File

@@ -51,6 +51,9 @@ public class BusinessQCManagementDataSaveReqVO {
@Schema(description = "分析人") @Schema(description = "分析人")
private String assayOperator; private String assayOperator;
@Schema(description = "分析人ID", example = "6498")
private Long assayOperatorId;
@Schema(description = "分配任务时间") @Schema(description = "分配任务时间")
private LocalDateTime assignTaskTime; private LocalDateTime assignTaskTime;
@@ -63,6 +66,9 @@ public class BusinessQCManagementDataSaveReqVO {
@Schema(description = "上报人") @Schema(description = "上报人")
private String reporter; private String reporter;
@Schema(description = "上报人ID", example = "17517")
private Long reporterId;
@Schema(description = "上报时间") @Schema(description = "上报时间")
private LocalDateTime reportTime; private LocalDateTime reportTime;

View File

@@ -60,8 +60,8 @@ public class BusinessSampleDispatchDetailPageReqVO extends PageParam {
//================================扩展字段============================================= //================================扩展字段=============================================
@Schema(description = "样品") @Schema(description = "样品归库码")
private String sampleCode; private String sampleReturnCode;
@Schema(description = "idsList") @Schema(description = "idsList")
private List<Long> idList; private List<Long> idList;

View File

@@ -64,6 +64,12 @@ public class BusinessSampleDispatchPageReqVO extends PageParam {
@Schema(description = "备注") @Schema(description = "备注")
private String remark; private String remark;
@Schema(description = "仓库名称")
private String warehouseName;
@Schema(description = "仓库编码")
private String warehouseCode;
@Schema(description = "创建时间") @Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime; private LocalDateTime[] createTime;

View File

@@ -1,5 +1,6 @@
package com.zt.plat.module.qms.business.bus.controller.vo; package com.zt.plat.module.qms.business.bus.controller.vo;
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import lombok.*;
@@ -65,6 +66,7 @@ public class BusinessSampleDispatchRespVO {
@Schema(description = "流程审批状态", example = "1") @Schema(description = "流程审批状态", example = "1")
@ExcelProperty("流程审批状态") @ExcelProperty("流程审批状态")
@Dict(dicCode = "flow_status")
private String flowStatus; private String flowStatus;
@Schema(description = "完成状态", example = "1") @Schema(description = "完成状态", example = "1")
@@ -83,6 +85,14 @@ public class BusinessSampleDispatchRespVO {
@ExcelProperty("备注") @ExcelProperty("备注")
private String remark; private String remark;
@Schema(description = "仓库名称")
@ExcelProperty("仓库名称")
private String warehouseName;
@Schema(description = "仓库编码")
@ExcelProperty("仓库编码")
private String warehouseCode;
@Schema(description = "创建时间") @Schema(description = "创建时间")
@ExcelProperty("创建时间") @ExcelProperty("创建时间")
private LocalDateTime createTime; private LocalDateTime createTime;

View File

@@ -64,6 +64,12 @@ public class BusinessSampleDispatchSaveReqVO {
@Schema(description = "备注") @Schema(description = "备注")
private String remark; private String remark;
@Schema(description = "仓库名称")
private String warehouseName;
@Schema(description = "仓库编码")
private String warehouseCode;
//=========================扩展字段======================================= //=========================扩展字段=======================================
@Schema(description = "新增子样id") @Schema(description = "新增子样id")
List<Long> addSubSampleIds; List<Long> addSubSampleIds;

View File

@@ -1,7 +1,17 @@
package com.zt.plat.module.qms.business.bus.controller.vo; package com.zt.plat.module.qms.business.bus.controller.vo;
import java.time.LocalDateTime;
import java.util.List; import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
@Data @Data
@@ -16,6 +26,12 @@ public class BusinessSampleEntrustDetailExtendRespVO extends BusinessSampleEntru
/** 打印标签 **/ /** 打印标签 **/
private String printTemplate; private String printTemplate;
@JsonSerialize(using = LocalDateTimeSerializer.class) // 序列化(响应)
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "任务结束时间(yyyy-MM-dd HH:mm:ss)")
private LocalDateTime createTime;
private List<BusinessSampleEntrustProjectExtendRespVO> sampleEntrustDetailProjectList; private List<BusinessSampleEntrustProjectExtendRespVO> sampleEntrustDetailProjectList;
} }

View File

@@ -61,4 +61,19 @@ public class BusinessSampleHandoverDetailRespVO {
@ExcelProperty("备注") @ExcelProperty("备注")
private String remark; private String remark;
//==================================扩展字段==================================
@Schema(description = "原样品编号")
@ExcelProperty("原样品编号")
private String originalSampleCode;
@Schema(description = "库位编码")
@ExcelProperty("归库时间")
private String warehouseLocationCode;
@Schema(description = "归库时间")
@ExcelProperty("归库时间")
private LocalDateTime returnTime;
} }

View File

@@ -0,0 +1,23 @@
package com.zt.plat.module.qms.business.bus.controller.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class BusinessSubParentSampleAssessmentExtendRespVO extends BusinessSubParentSampleAssessmentRespVO {
@Schema(description = "检测项目key")
private String dictionaryProjectKey;
@Schema(description = "检测项目单位")
private String dictionaryProjectUnit;
@Schema(description = "检测项目缩写")
private String simpleName;
@Schema(description = "显示名称")
private String showName;
@Schema(description = "分析方法")
private String configAssayMethodName;
}

View File

@@ -0,0 +1,24 @@
package com.zt.plat.module.qms.business.bus.controller.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class BusinessSubSampleAssessmentExtendRespVO extends BusinessSubSampleAssessmentRespVO {
/** 分析方法名称 **/
@Schema(description = "分析方法名称")
private String configAssayMethodName;
@Schema(description = "检测项目key")
private String dictionaryProjectKey;
@Schema(description = "检测项目单位")
private String dictionaryProjectUnit;
@Schema(description = "检测项目缩写")
private String simpleName;
@Schema(description = "显示名称")
private String showName;
}

View File

@@ -1,9 +1,15 @@
package com.zt.plat.module.qms.business.bus.controller.vo; package com.zt.plat.module.qms.business.bus.controller.vo;
import java.time.LocalDateTime;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
@@ -64,6 +70,21 @@ public class BusinessSubSampleExtendRespVO extends BusinessSubSampleRespVO {
@Schema(description = "样品标签打印模版") @Schema(description = "样品标签打印模版")
private String printTemplate; private String printTemplate;
@Schema(description = "样品标签打印份数")
private Integer codePrintQuantity;
@Schema(description = "收样人")
private String sampleReceiver;
@Schema(description = "分析项目")
private String assayProject;
@JsonSerialize(using = LocalDateTimeSerializer.class) // 序列化(响应)
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "收样时间")
private LocalDateTime sampleReceiveTime;
@Schema(description = "库位编码") @Schema(description = "库位编码")
private String warehouseLocationCode; private String warehouseLocationCode;

View File

@@ -6,6 +6,7 @@ import com.zt.plat.framework.common.pojo.PageParam;
import java.math.BigDecimal; import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List;
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@@ -133,6 +134,8 @@ public class BusinessSubSamplePageReqVO extends PageParam {
@Schema(description = "备注") @Schema(description = "备注")
private String remark; private String remark;
//=======================================扩展字段=======================================
@Schema(description = "分析部门id") @Schema(description = "分析部门id")
private Long assayDepartmentId; private Long assayDepartmentId;
@@ -142,8 +145,17 @@ public class BusinessSubSamplePageReqVO extends PageParam {
@Schema(description = "分析部门状态") @Schema(description = "分析部门状态")
private String assayDepartmentStatus; private String assayDepartmentStatus;
//扩展字段 @Schema(description = "样品流程节点KEY列表")
private List<String> sampleFlowNodeKeyList;
@Schema(description = "库位编码") @Schema(description = "库位编码")
private String warehouseLocationCode; private String warehouseLocationCode;
@Schema(description = "仓库编码")
private String warehouseCode;
//是否过滤已申请调拨的数据: 1-是, 其他值:否
@Schema(description = "是否过滤已申请调拨的数据")
private String hideDispatchData;
} }

View File

@@ -134,4 +134,29 @@ public class BusinessSubSampleReqVO {
@Schema(description = "备注") @Schema(description = "备注")
private String remark; private String remark;
//=======================================扩展字段=======================================
@Schema(description = "分析部门id")
private Long assayDepartmentId;
@Schema(description = "分析部门名称")
private String assayDepartmentName;
@Schema(description = "分析部门状态")
private String assayDepartmentStatus;
@Schema(description = "样品流程节点KEY列表")
private List<String> sampleFlowNodeKeyList;
@Schema(description = "库位编码")
private String warehouseLocationCode;
@Schema(description = "仓库编码")
private String warehouseCode;
//是否过滤已申请调拨的数据: 1-是, 其他值:否
@Schema(description = "是否过滤已申请调拨的数据")
private String hideDispatchData;
} }

View File

@@ -24,7 +24,6 @@ import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
public class BusinessAssayTaskDO extends BusinessBaseDO { public class BusinessAssayTaskDO extends BusinessBaseDO {
/** /**
* ID * ID
*/ */
@@ -66,6 +65,11 @@ public class BusinessAssayTaskDO extends BusinessBaseDO {
@TableField("TSK_ASN_OPTR") @TableField("TSK_ASN_OPTR")
private String taskAssignOperator; private String taskAssignOperator;
/** /**
* 任务单分配人ID
*/
@TableField("TSK_ASN_OPTR_ID")
private Long taskAssignOperatorId;
/**
* 任务单分配时间 * 任务单分配时间
*/ */
@TableField("TSK_ASN_TM") @TableField("TSK_ASN_TM")
@@ -76,8 +80,8 @@ public class BusinessAssayTaskDO extends BusinessBaseDO {
@TableField("TSK_ASN_STS") @TableField("TSK_ASN_STS")
private String taskAssignStatus; private String taskAssignStatus;
/** /**
* 任务单分配提交时间 * 任务单分配提交时间
*/ */
@TableField("TSK_ASN_SBM_TM") @TableField("TSK_ASN_SBM_TM")
private LocalDateTime taskAssignSubmitTime; private LocalDateTime taskAssignSubmitTime;
/** /**
@@ -96,6 +100,11 @@ public class BusinessAssayTaskDO extends BusinessBaseDO {
@TableField("ASY_OPTR") @TableField("ASY_OPTR")
private String assayOperator; private String assayOperator;
/** /**
* 分析人
*/
@TableField("ASY_OPTR_ID")
private Long assayOperatorId;
/**
* 分析时间 * 分析时间
*/ */
@TableField("ASY_TM") @TableField("ASY_TM")
@@ -121,6 +130,11 @@ public class BusinessAssayTaskDO extends BusinessBaseDO {
@TableField("RPT_OPTR") @TableField("RPT_OPTR")
private String reportOperator; private String reportOperator;
/** /**
* 上报人ID
*/
@TableField("RPT_OPTR_ID")
private Long reportOperatorId;
/**
* 任务单完成时间 * 任务单完成时间
*/ */
@TableField("TSK_FIN_TM") @TableField("TSK_FIN_TM")

View File

@@ -46,11 +46,6 @@ public class BusinessAssayTaskDataDO extends BusinessBaseDO {
@TableField("BSN_SB_SMP_ID") @TableField("BSN_SB_SMP_ID")
private Long businessSubSampleId; private Long businessSubSampleId;
/** /**
* 分样子样判定ID
*/
@TableField("BSN_SB_SMP_ASMT_ID")
private Long businessSubSampleAssessmentId;
/**
* 检测方法配置ID * 检测方法配置ID
*/ */
@TableField("CFG_ASY_MTHD_ID") @TableField("CFG_ASY_MTHD_ID")
@@ -61,6 +56,11 @@ public class BusinessAssayTaskDataDO extends BusinessBaseDO {
@TableField(value = "BSN_ASY_TSK_ID", updateStrategy = FieldStrategy.ALWAYS) @TableField(value = "BSN_ASY_TSK_ID", updateStrategy = FieldStrategy.ALWAYS)
private Long businessAssayTaskId; private Long businessAssayTaskId;
/** /**
* 子样判定ID
*/
@TableField("BSN_SB_SMP_ASMT_ID")
private Long businessSubSampleAssessmentId;
/**
* 任务类型,【字典】【jy_sample_task_type】常规、抽查... * 任务类型,【字典】【jy_sample_task_type】常规、抽查...
*/ */
@TableField("TSK_TP") @TableField("TSK_TP")
@@ -91,6 +91,11 @@ public class BusinessAssayTaskDataDO extends BusinessBaseDO {
@TableField(value = "ASY_OPTR", updateStrategy = FieldStrategy.ALWAYS) @TableField(value = "ASY_OPTR", updateStrategy = FieldStrategy.ALWAYS)
private String assayOperator; private String assayOperator;
/** /**
* 分析人ID
*/
@TableField(value = "ASY_OPTR_ID", updateStrategy = FieldStrategy.ALWAYS)
private Long assayOperatorId;
/**
* 分配任务时间 * 分配任务时间
*/ */
@TableField(value = "ASN_TSK_TM", updateStrategy = FieldStrategy.ALWAYS) @TableField(value = "ASN_TSK_TM", updateStrategy = FieldStrategy.ALWAYS)
@@ -111,6 +116,11 @@ public class BusinessAssayTaskDataDO extends BusinessBaseDO {
@TableField("RPTR") @TableField("RPTR")
private String reporter; private String reporter;
/** /**
* 上报人ID
*/
@TableField("RPTR_ID")
private Long reporterId;
/**
* 上报时间 * 上报时间
*/ */
@TableField("RPT_TM") @TableField("RPT_TM")
@@ -131,7 +141,7 @@ public class BusinessAssayTaskDataDO extends BusinessBaseDO {
@TableField("SMP_FLW_NDE_TM") @TableField("SMP_FLW_NDE_TM")
private LocalDateTime sampleFlowNodeTime; private LocalDateTime sampleFlowNodeTime;
/** /**
* 分析次数,复检的累加次数 * 分析次数,值为0为分析大于0为第几次复检
*/ */
@TableField("ANL_CNT") @TableField("ANL_CNT")
private Integer analysisCount; private Integer analysisCount;

View File

@@ -89,6 +89,11 @@ public class BusinessQCCoefficientDataDO extends BusinessBaseDO {
@TableField("ASY_OPTR") @TableField("ASY_OPTR")
private String assayOperator; private String assayOperator;
/** /**
* 分析人ID
*/
@TableField("ASY_OPTR_ID")
private Long assayOperatorId;
/**
* 分配任务时间 * 分配任务时间
*/ */
@TableField("ASN_TSK_TM") @TableField("ASN_TSK_TM")
@@ -109,6 +114,11 @@ public class BusinessQCCoefficientDataDO extends BusinessBaseDO {
@TableField("RPTR") @TableField("RPTR")
private String reporter; private String reporter;
/** /**
* 上报人ID
*/
@TableField("RPTR_ID")
private Long reporterId;
/**
* 上报时间 * 上报时间
*/ */
@TableField("RPT_TM") @TableField("RPT_TM")
@@ -129,4 +139,5 @@ public class BusinessQCCoefficientDataDO extends BusinessBaseDO {
@TableField("RMK") @TableField("RMK")
private String remark; private String remark;
} }

View File

@@ -89,6 +89,11 @@ public class BusinessQCManagementDataDO extends BusinessBaseDO {
@TableField("ASY_OPTR") @TableField("ASY_OPTR")
private String assayOperator; private String assayOperator;
/** /**
* 分析人ID
*/
@TableField("ASY_OPTR_ID")
private Long assayOperatorId;
/**
* 分配任务时间 * 分配任务时间
*/ */
@TableField("ASN_TSK_TM") @TableField("ASN_TSK_TM")
@@ -109,6 +114,11 @@ public class BusinessQCManagementDataDO extends BusinessBaseDO {
@TableField("RPTR") @TableField("RPTR")
private String reporter; private String reporter;
/** /**
* 上报人ID
*/
@TableField("RPTR_ID")
private Long reporterId;
/**
* 上报时间 * 上报时间
*/ */
@TableField("RPT_TM") @TableField("RPT_TM")
@@ -128,5 +138,4 @@ public class BusinessQCManagementDataDO extends BusinessBaseDO {
*/ */
@TableField("RMK") @TableField("RMK")
private String remark; private String remark;
} }

View File

@@ -119,4 +119,11 @@ public class BusinessSampleDispatchDO extends BusinessBaseDO {
@TableField("RMK") @TableField("RMK")
private String remark; private String remark;
//仓库编码
@TableField("WRH_CD")
private String warehouseCode;
//仓库名称
@TableField("WRH_NAME")
private String warehouseName;
} }

View File

@@ -38,6 +38,11 @@ public class BusinessSubParentSampleAssessmentProjectDO extends BusinessBaseDO {
@TableField("BSN_SB_PRN_SMP_ID") @TableField("BSN_SB_PRN_SMP_ID")
private Long businessSubParentSampleId; private Long businessSubParentSampleId;
/** /**
* 班组判定数据业务ID
*/
@TableField("BSN_SB_PRN_SMP_ASMT_ID")
private Long businessSubParentSampleAssessmentId;
/**
* 检测项目ID,字典表【T_DIC_PRJ】 * 检测项目ID,字典表【T_DIC_PRJ】
*/ */
@TableField("DIC_PRJ_ID") @TableField("DIC_PRJ_ID")

View File

@@ -10,8 +10,10 @@ import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayParameterD
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayParameterDataReqVO; import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayParameterDataReqVO;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectAndParameterRespVO; import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectAndParameterRespVO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayParameterDataDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayParameterDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectParameterDO; import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectParameterDO;
import com.zt.plat.module.qms.business.dic.dal.dataobject.DictionaryParameterDO; import com.zt.plat.module.qms.business.dic.dal.dataobject.DictionaryProjectDO;
import com.zt.plat.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO; import com.zt.plat.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX; import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@@ -27,21 +29,20 @@ public interface BusinessAssayParameterDataMapper extends BaseMapperX<BusinessAs
default List<BusinessAssayProjectAndParameterRespVO> selectProjectAndParameterBy(BusinessAssayParameterDataReqVO reqVO) { default List<BusinessAssayProjectAndParameterRespVO> selectProjectAndParameterBy(BusinessAssayParameterDataReqVO reqVO) {
return selectJoinList(BusinessAssayProjectAndParameterRespVO.class, new MPJLambdaWrapperX<BusinessAssayParameterDataDO>() return selectJoinList(BusinessAssayProjectAndParameterRespVO.class, new MPJLambdaWrapperX<BusinessAssayParameterDataDO>()
.leftJoin(ConfigAssayMethodProjectParameterDO.class, ConfigAssayMethodProjectParameterDO::getId, BusinessAssayParameterDataDO::getConfigAssayMethodProjectParameterId) .leftJoin(ConfigAssayMethodProjectParameterDO.class, ConfigAssayMethodProjectParameterDO::getId, BusinessAssayParameterDataDO::getConfigAssayMethodProjectParameterId)
.leftJoin(DictionaryParameterDO.class, DictionaryParameterDO::getId, BusinessAssayParameterDataDO::getDictionaryParameterId)
.leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, ConfigAssayMethodProjectParameterDO::getDictionaryBusinessId) .leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, ConfigAssayMethodProjectParameterDO::getDictionaryBusinessId)
.selectAs(BusinessAssayParameterDataDO::getId, BusinessAssayProjectAndParameterRespVO::getId) .selectAs(BusinessAssayParameterDataDO::getId, BusinessAssayProjectAndParameterRespVO::getId)
.selectAs(BusinessAssayParameterDataDO::getDictionaryParameterId, BusinessAssayProjectAndParameterRespVO::getDicId) .selectAs(BusinessAssayParameterDataDO::getConfigAssayMethodProjectParameterId, BusinessAssayProjectAndParameterRespVO::getDicId)
.selectAs(DictionaryParameterDO::getKey, BusinessAssayProjectAndParameterRespVO::getDicKey) .selectAs(ConfigAssayMethodProjectParameterDO::getKey, BusinessAssayProjectAndParameterRespVO::getDicKey)
.selectAs(DictionaryParameterDO::getName, BusinessAssayProjectAndParameterRespVO::getName) .selectAs(ConfigAssayMethodProjectParameterDO::getParameterName, BusinessAssayProjectAndParameterRespVO::getName)
.selectAs(DictionaryParameterDO::getName, BusinessAssayProjectAndParameterRespVO::getShowName) .selectAs(ConfigAssayMethodProjectParameterDO::getParameterName, BusinessAssayProjectAndParameterRespVO::getShowName)
.selectAs(DictionaryParameterDO::getFillingWay, BusinessAssayProjectAndParameterRespVO::getFillingWay) .selectAs(ConfigAssayMethodProjectParameterDO::getFillingWay, BusinessAssayProjectAndParameterRespVO::getFillingWay)
.selectAs(BusinessAssayParameterDataDO::getDataType, BusinessAssayProjectAndParameterRespVO::getDataType) .selectAs(BusinessAssayParameterDataDO::getDataType, BusinessAssayProjectAndParameterRespVO::getDataType)
.selectAs(BusinessAssayParameterDataDO::getDecimalPosition, BusinessAssayProjectAndParameterRespVO::getDecimalPosition) .selectAs(BusinessAssayParameterDataDO::getDecimalPosition, BusinessAssayProjectAndParameterRespVO::getDecimalPosition)
.selectAs(BusinessAssayParameterDataDO::getValue, BusinessAssayProjectAndParameterRespVO::getValue) .selectAs(BusinessAssayParameterDataDO::getValue, BusinessAssayProjectAndParameterRespVO::getValue)
.selectAs(DictionaryParameterDO::getUnit, BusinessAssayProjectAndParameterRespVO::getUnit) .selectAs(ConfigAssayMethodProjectParameterDO::getUnit, BusinessAssayProjectAndParameterRespVO::getUnit)
.selectAs(ConfigAssayMethodProjectParameterDO::getIsNull, BusinessAssayProjectAndParameterRespVO::getIsNull) .selectAs(ConfigAssayMethodProjectParameterDO::getIsNull, BusinessAssayProjectAndParameterRespVO::getIsNull)
.selectAs(ConfigAssayMethodProjectParameterDO::getFormula, BusinessAssayProjectAndParameterRespVO::getFormula) .selectAs(ConfigAssayMethodProjectParameterDO::getFormula, BusinessAssayProjectAndParameterRespVO::getFormula)
.selectAs(ConfigAssayMethodProjectParameterDO::getSortNo, BusinessAssayProjectAndParameterRespVO::getParamNo) .selectAs(ConfigAssayMethodProjectParameterDO::getNo, BusinessAssayProjectAndParameterRespVO::getParamNo)
.selectAs("'parameter'", BusinessAssayProjectAndParameterRespVO::getType) .selectAs("'parameter'", BusinessAssayProjectAndParameterRespVO::getType)
.selectAs(ConfigAssayMethodProjectParameterDO::getDictionaryBusinessId, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessId) .selectAs(ConfigAssayMethodProjectParameterDO::getDictionaryBusinessId, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessId)
.selectAs(ConfigAssayMethodProjectParameterDO::getDictionaryBusinessKey, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessKey) .selectAs(ConfigAssayMethodProjectParameterDO::getDictionaryBusinessKey, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessKey)
@@ -84,4 +85,24 @@ public interface BusinessAssayParameterDataMapper extends BaseMapperX<BusinessAs
.in(BusinessAssayParameterDataDO::getBusinessAssayProjectDataId, businessAssayProjectDataIds)); .in(BusinessAssayParameterDataDO::getBusinessAssayProjectDataId, businessAssayProjectDataIds));
} }
default List<BusinessAssayParameterDataExtendRespVO> selectExtendByBusinessAssayProjectDataIds(List<Long> businessAssayProjectDataIds) {
return selectJoinList(BusinessAssayParameterDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayParameterDataDO>()
.leftJoin(ConfigAssayMethodProjectParameterDO.class, ConfigAssayMethodProjectParameterDO::getId, BusinessAssayParameterDataDO::getConfigAssayMethodProjectParameterId)
.selectAll(BusinessAssayParameterDataDO.class)
.selectAs(ConfigAssayMethodProjectParameterDO::getParameterName, BusinessAssayParameterDataExtendRespVO::getParameterName)
.selectAs(ConfigAssayMethodProjectParameterDO::getKey, BusinessAssayParameterDataExtendRespVO::getParameterKey)
.in(BusinessAssayParameterDataDO::getBusinessAssayProjectDataId, businessAssayProjectDataIds));
}
default BusinessAssayParameterDataDO selectByBusinessAssayTaskDataIdAndProjectSimpleNameAndParameterKey(Long businessAssayTaskDataId, String projectSimpleName, String parameterKey) {
return selectJoinOne(BusinessAssayParameterDataDO.class, new MPJLambdaWrapperX<BusinessAssayParameterDataDO>()
.leftJoin(ConfigAssayMethodProjectParameterDO.class, ConfigAssayMethodProjectParameterDO::getId, BusinessAssayParameterDataDO::getConfigAssayMethodProjectParameterId)
.leftJoin(BusinessAssayProjectDataDO.class, BusinessAssayProjectDataDO::getId, BusinessAssayParameterDataDO::getBusinessAssayProjectDataId)
.leftJoin(ConfigAssayMethodProjectDO.class, ConfigAssayMethodProjectDO::getId, BusinessAssayProjectDataDO::getConfigAssayMethodProjectId)
.leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessAssayProjectDataDO::getDictionaryProjectId)
.eq(BusinessAssayProjectDataDO::getBusinessAssayTaskDataId, businessAssayTaskDataId)
.eq(DictionaryProjectDO::getSimpleName, projectSimpleName)
.eq(ConfigAssayMethodProjectParameterDO::getKey, parameterKey));
}
} }

View File

@@ -32,7 +32,7 @@ public interface BusinessAssayProjectDataMapper extends BaseMapperX<BusinessAssa
.leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessAssayProjectDataDO::getDictionaryProjectId) .leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessAssayProjectDataDO::getDictionaryProjectId)
.leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, ConfigAssayMethodProjectDO::getDictionaryBusinessId) .leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, ConfigAssayMethodProjectDO::getDictionaryBusinessId)
.selectAs(BusinessAssayProjectDataDO::getId, BusinessAssayProjectAndParameterRespVO::getId) .selectAs(BusinessAssayProjectDataDO::getId, BusinessAssayProjectAndParameterRespVO::getId)
.selectAs(BusinessAssayProjectDataDO::getDictionaryProjectId, BusinessAssayProjectAndParameterRespVO::getDicId) .selectAs(BusinessAssayProjectDataDO::getConfigAssayMethodProjectId, BusinessAssayProjectAndParameterRespVO::getDicId)
.selectAs(DictionaryProjectDO::getKey, BusinessAssayProjectAndParameterRespVO::getDicKey) .selectAs(DictionaryProjectDO::getKey, BusinessAssayProjectAndParameterRespVO::getDicKey)
//.selectAs(DictionaryProjectDO::getName, BusinessAssayProjectAndParameterRespVO::getName) //.selectAs(DictionaryProjectDO::getName, BusinessAssayProjectAndParameterRespVO::getName)
.selectAs(DictionaryProjectDO::getSimpleName, BusinessAssayProjectAndParameterRespVO::getName) .selectAs(DictionaryProjectDO::getSimpleName, BusinessAssayProjectAndParameterRespVO::getName)
@@ -49,6 +49,7 @@ public interface BusinessAssayProjectDataMapper extends BaseMapperX<BusinessAssa
.selectAs(ConfigAssayMethodProjectDO::getDictionaryBusinessKey, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessKey) .selectAs(ConfigAssayMethodProjectDO::getDictionaryBusinessKey, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessKey)
.selectAs(DictionaryBusinessDO::getName, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessName) .selectAs(DictionaryBusinessDO::getName, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessName)
.eqIfPresent(BusinessAssayProjectDataDO::getBusinessAssayTaskDataId, reqVO.getBusinessAssayTaskDataId()) .eqIfPresent(BusinessAssayProjectDataDO::getBusinessAssayTaskDataId, reqVO.getBusinessAssayTaskDataId())
.inIfPresent(BusinessAssayProjectDataDO::getBusinessAssayTaskDataId, reqVO.getBusinessAssayTaskDataIdList())
.eqIfPresent(BusinessAssayProjectDataDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId()) .eqIfPresent(BusinessAssayProjectDataDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
.eqIfPresent(BusinessAssayProjectDataDO::getDictionaryProjectId, reqVO.getDictionaryProjectId()) .eqIfPresent(BusinessAssayProjectDataDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
.eqIfPresent(BusinessAssayProjectDataDO::getUsage, reqVO.getUsage()) .eqIfPresent(BusinessAssayProjectDataDO::getUsage, reqVO.getUsage())

View File

@@ -39,77 +39,207 @@ import org.apache.ibatis.annotations.Param;
public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTaskDataDO> { public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTaskDataDO> {
default List<BusinessAssayTaskDataExtendRespVO> selectList(BusinessAssayTaskDataReqVO reqVO) { default List<BusinessAssayTaskDataExtendRespVO> selectList(BusinessAssayTaskDataReqVO reqVO) {
return selectJoinList(BusinessAssayTaskDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayTaskDataDO>() MPJLambdaWrapper<BusinessAssayTaskDataDO> mpjLambdaWrapper = new MPJLambdaWrapperX<BusinessAssayTaskDataDO>()
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessAssayTaskDataDO::getConfigAssayMethodId) .leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessAssayTaskDataDO::getConfigAssayMethodId)
.leftJoin(BusinessSubSampleDO.class, BusinessSubSampleDO::getId, BusinessAssayTaskDataDO::getBusinessSubSampleId) .leftJoin(BusinessSubSampleDO.class, BusinessSubSampleDO::getId, BusinessAssayTaskDataDO::getBusinessSubSampleId)
.selectAll(BusinessAssayTaskDataDO.class) .leftJoin(BusinessSubSampleAnalysisGroupDO.class, on -> on
.selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskDataExtendRespVO::getConfigAssayMethodName) .eq(BusinessSubSampleAnalysisGroupDO::getBusinessSubSampleId, BusinessAssayTaskDataDO::getBusinessSubSampleId)
.selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName) .eq(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentId, BusinessAssayTaskDataDO::getAssayDepartmentId))
.selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode) .selectAll(BusinessAssayTaskDataDO.class)
.selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessAssayTaskDataExtendRespVO::getSampleAssayCode) .selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskDataExtendRespVO::getConfigAssayMethodName)
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId()) .selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName)
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId()) .selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode)
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId()) .selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessAssayTaskDataExtendRespVO::getSampleAssayCode)
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubSampleAssessmentId, reqVO.getBusinessSubSampleAssessmentId()) .selectAs(BusinessSubSampleDO::getConfigSubSampleId, BusinessAssayTaskDataExtendRespVO::getConfigSubSampleId);
.eqIfPresent(BusinessAssayTaskDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId()) if (ObjectUtil.isNotEmpty(reqVO.getBusinessBaseSampleId())) {
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId()) mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId());
.eqIfPresent(BusinessAssayTaskDataDO::getTaskType, reqVO.getTaskType()) }
.eqIfPresent(BusinessAssayTaskDataDO::getAssayType, reqVO.getAssayType()) if (ObjectUtil.isNotEmpty(reqVO.getBusinessSubParentSampleId())) {
.eqIfPresent(BusinessAssayTaskDataDO::getAssayProject, reqVO.getAssayProject()) mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId());
.eqIfPresent(BusinessAssayTaskDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId()) }
.likeIfPresent(BusinessAssayTaskDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName()) if (ObjectUtil.isNotEmpty(reqVO.getBusinessSubSampleId())) {
.eqIfPresent(BusinessAssayTaskDataDO::getAssayOperator, reqVO.getAssayOperator()) mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId());
.betweenIfPresent(BusinessAssayTaskDataDO::getAssignTaskTime, reqVO.getAssignTaskTime()) }
.eqIfPresent(BusinessAssayTaskDataDO::getIsAssignTasked, reqVO.getIsAssignTasked()) if (ObjectUtil.isNotEmpty(reqVO.getConfigAssayMethodId())) {
.eqIfPresent(BusinessAssayTaskDataDO::getIsReported, reqVO.getIsReported()) mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId());
.eqIfPresent(BusinessAssayTaskDataDO::getReporter, reqVO.getReporter()) }
.betweenIfPresent(BusinessAssayTaskDataDO::getReportTime, reqVO.getReportTime()) if (ObjectUtil.isNotEmpty(reqVO.getBusinessAssayTaskId())) {
.eqIfPresent(BusinessAssayTaskDataDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId()) mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId());
.eqIfPresent(BusinessAssayTaskDataDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey()) }
.betweenIfPresent(BusinessAssayTaskDataDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime()) if (ObjectUtil.isNotEmpty(reqVO.getBusinessSubSampleAssessmentId())) {
.eqIfPresent(BusinessAssayTaskDataDO::getAnalysisCount, reqVO.getAnalysisCount()) mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessSubSampleAssessmentId, reqVO.getBusinessSubSampleAssessmentId());
.eqIfPresent(BusinessAssayTaskDataDO::getUpdateCount, reqVO.getUpdateCount()) }
.eqIfPresent(BusinessAssayTaskDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) if (ObjectUtil.isNotEmpty(reqVO.getTaskType())) {
.betweenIfPresent(BusinessAssayTaskDataDO::getCreateTime, reqVO.getCreateTime()) mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getTaskType, reqVO.getTaskType());
.eqIfPresent(BusinessAssayTaskDataDO::getRemark, reqVO.getRemark()) }
.orderByDesc(BusinessAssayTaskDataDO::getId)); if (ObjectUtil.isNotEmpty(reqVO.getAssayType())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayType, reqVO.getAssayType());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayProject())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayProject, reqVO.getAssayProject());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayDepartmentId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayDepartmentName())) {
mpjLambdaWrapper.like(BusinessAssayTaskDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayOperator())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayOperator, reqVO.getAssayOperator());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayOperatorId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayOperatorId, reqVO.getAssayOperatorId());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssignTaskTime()) && ObjectUtil.isNotEmpty(reqVO.getAssignTaskTime()[0]) && ObjectUtil.isNotEmpty(reqVO.getAssignTaskTime()[1])) {
mpjLambdaWrapper.between(BusinessAssayTaskDataDO::getAssignTaskTime, reqVO.getAssignTaskTime()[0], reqVO.getAssignTaskTime()[1]);
}
if (ObjectUtil.isNotEmpty(reqVO.getIsAssignTasked())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getIsAssignTasked, reqVO.getIsAssignTasked());
}
if (ObjectUtil.isNotEmpty(reqVO.getIsReported())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getIsReported, reqVO.getIsReported());
}
if (ObjectUtil.isNotEmpty(reqVO.getReporter())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getReporter, reqVO.getReporter());
}
if (ObjectUtil.isNotEmpty(reqVO.getReporterId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getReporterId, reqVO.getReporterId());
}
if (ObjectUtil.isNotEmpty(reqVO.getReportTime()) && ObjectUtil.isNotEmpty(reqVO.getReportTime()[0]) && ObjectUtil.isNotEmpty(reqVO.getReportTime()[1])) {
mpjLambdaWrapper.between(BusinessAssayTaskDataDO::getReportTime, reqVO.getReportTime()[0], reqVO.getReportTime()[1]);
}
if (ObjectUtil.isNotEmpty(reqVO.getConfigSampleFlowId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId());
}
if (ObjectUtil.isNotEmpty(reqVO.getSampleFlowNodeKey())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey());
}
if (ObjectUtil.isNotEmpty(reqVO.getSampleFlowNodeTime()) && ObjectUtil.isNotEmpty(reqVO.getSampleFlowNodeTime()[0]) && ObjectUtil.isNotEmpty(reqVO.getSampleFlowNodeTime()[1])) {
mpjLambdaWrapper.between(BusinessAssayTaskDataDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime()[0], reqVO.getSampleFlowNodeTime()[1]);
}
if (ObjectUtil.isNotEmpty(reqVO.getAnalysisCount())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAnalysisCount, reqVO.getAnalysisCount());
}
if (ObjectUtil.isNotEmpty(reqVO.getUpdateCount())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getUpdateCount, reqVO.getUpdateCount());
}
if (ObjectUtil.isNotEmpty(reqVO.getSystemDepartmentCode())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode());
}
if (ObjectUtil.isNotEmpty(reqVO.getCreateTime()) && ObjectUtil.isNotEmpty(reqVO.getCreateTime()[0]) && ObjectUtil.isNotEmpty(reqVO.getCreateTime()[1])) {
mpjLambdaWrapper.between(BusinessAssayTaskDataDO::getCreateTime, reqVO.getCreateTime()[0], reqVO.getCreateTime()[1]);
}
if (ObjectUtil.isNotEmpty(reqVO.getRemark())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getRemark, reqVO.getRemark());
}
if (ObjectUtil.isNotEmpty(reqVO.getSampleStatus())) {
mpjLambdaWrapper.eq(BusinessSubSampleAnalysisGroupDO::getSampleStatus, reqVO.getSampleStatus());
}
mpjLambdaWrapper.orderByDesc(BusinessAssayTaskDataDO::getId);
return selectJoinList(BusinessAssayTaskDataExtendRespVO.class, mpjLambdaWrapper);
} }
default PageResult<BusinessAssayTaskDataExtendRespVO> selectPage(BusinessAssayTaskDataPageReqVO reqVO) { default PageResult<BusinessAssayTaskDataExtendRespVO> selectPage(BusinessAssayTaskDataPageReqVO reqVO) {
return selectJoinPage(reqVO, BusinessAssayTaskDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayTaskDataDO>() MPJLambdaWrapper<BusinessAssayTaskDataDO> mpjLambdaWrapper = new MPJLambdaWrapperX<BusinessAssayTaskDataDO>()
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessAssayTaskDataDO::getConfigAssayMethodId) .leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessAssayTaskDataDO::getConfigAssayMethodId)
.leftJoin(BusinessSubSampleDO.class, BusinessSubSampleDO::getId, BusinessAssayTaskDataDO::getBusinessSubSampleId) .leftJoin(BusinessSubSampleDO.class, BusinessSubSampleDO::getId, BusinessAssayTaskDataDO::getBusinessSubSampleId)
.selectAll(BusinessAssayTaskDataDO.class) .leftJoin(BusinessSubSampleAnalysisGroupDO.class, on -> on
.selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskDataExtendRespVO::getConfigAssayMethodName) .eq(BusinessSubSampleAnalysisGroupDO::getBusinessSubSampleId, BusinessAssayTaskDataDO::getBusinessSubSampleId)
.selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName) .eq(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentId, BusinessAssayTaskDataDO::getAssayDepartmentId))
.selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode) .selectAll(BusinessAssayTaskDataDO.class)
.selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessAssayTaskDataExtendRespVO::getSampleAssayCode) .selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskDataExtendRespVO::getConfigAssayMethodName)
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId()) .selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName)
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId()) .selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode)
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId()) .selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessAssayTaskDataExtendRespVO::getSampleAssayCode)
.eqIfPresent(BusinessAssayTaskDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId()) .selectAs(BusinessSubSampleDO::getConfigSubSampleId, BusinessAssayTaskDataExtendRespVO::getConfigSubSampleId);
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId()) if (ObjectUtil.isNotEmpty(reqVO.getBusinessBaseSampleId())) {
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubSampleAssessmentId, reqVO.getBusinessSubSampleAssessmentId()) mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId());
.eqIfPresent(BusinessAssayTaskDataDO::getTaskType, reqVO.getTaskType()) }
.eqIfPresent(BusinessAssayTaskDataDO::getAssayType, reqVO.getAssayType()) if (ObjectUtil.isNotEmpty(reqVO.getBusinessSubParentSampleId())) {
.eqIfPresent(BusinessAssayTaskDataDO::getAssayProject, reqVO.getAssayProject()) mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId());
.eqIfPresent(BusinessAssayTaskDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId()) }
.likeIfPresent(BusinessAssayTaskDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName()) if (ObjectUtil.isNotEmpty(reqVO.getBusinessSubSampleId())) {
.eqIfPresent(BusinessAssayTaskDataDO::getAssayOperator, reqVO.getAssayOperator()) mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId());
.betweenIfPresent(BusinessAssayTaskDataDO::getAssignTaskTime, reqVO.getAssignTaskTime()) }
.eqIfPresent(BusinessAssayTaskDataDO::getIsAssignTasked, reqVO.getIsAssignTasked()) if (ObjectUtil.isNotEmpty(reqVO.getConfigAssayMethodId())) {
.eqIfPresent(BusinessAssayTaskDataDO::getIsReported, reqVO.getIsReported()) mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId());
.eqIfPresent(BusinessAssayTaskDataDO::getReporter, reqVO.getReporter()) }
.betweenIfPresent(BusinessAssayTaskDataDO::getReportTime, reqVO.getReportTime()) if (ObjectUtil.isNotEmpty(reqVO.getBusinessAssayTaskId())) {
.eqIfPresent(BusinessAssayTaskDataDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId()) mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId());
.eqIfPresent(BusinessAssayTaskDataDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey()) }
.betweenIfPresent(BusinessAssayTaskDataDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime()) if (ObjectUtil.isNotEmpty(reqVO.getBusinessSubSampleAssessmentId())) {
.eqIfPresent(BusinessAssayTaskDataDO::getAnalysisCount, reqVO.getAnalysisCount()) mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessSubSampleAssessmentId, reqVO.getBusinessSubSampleAssessmentId());
.eqIfPresent(BusinessAssayTaskDataDO::getUpdateCount, reqVO.getUpdateCount()) }
.eqIfPresent(BusinessAssayTaskDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) if (ObjectUtil.isNotEmpty(reqVO.getTaskType())) {
.betweenIfPresent(BusinessAssayTaskDataDO::getCreateTime, reqVO.getCreateTime()) mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getTaskType, reqVO.getTaskType());
.eqIfPresent(BusinessAssayTaskDataDO::getRemark, reqVO.getRemark()) }
.orderByDesc(BusinessAssayTaskDataDO::getId)); if (ObjectUtil.isNotEmpty(reqVO.getAssayType())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayType, reqVO.getAssayType());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayProject())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayProject, reqVO.getAssayProject());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayDepartmentId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayDepartmentName())) {
mpjLambdaWrapper.like(BusinessAssayTaskDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayOperator())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayOperator, reqVO.getAssayOperator());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayOperatorId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayOperatorId, reqVO.getAssayOperatorId());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssignTaskTime()) && ObjectUtil.isNotEmpty(reqVO.getAssignTaskTime()[0]) && ObjectUtil.isNotEmpty(reqVO.getAssignTaskTime()[1])) {
mpjLambdaWrapper.between(BusinessAssayTaskDataDO::getAssignTaskTime, reqVO.getAssignTaskTime()[0], reqVO.getAssignTaskTime()[1]);
}
if (ObjectUtil.isNotEmpty(reqVO.getIsAssignTasked())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getIsAssignTasked, reqVO.getIsAssignTasked());
}
if (ObjectUtil.isNotEmpty(reqVO.getIsReported())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getIsReported, reqVO.getIsReported());
}
if (ObjectUtil.isNotEmpty(reqVO.getReporter())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getReporter, reqVO.getReporter());
}
if (ObjectUtil.isNotEmpty(reqVO.getReporterId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getReporterId, reqVO.getReporterId());
}
if (ObjectUtil.isNotEmpty(reqVO.getReportTime()) && ObjectUtil.isNotEmpty(reqVO.getReportTime()[0]) && ObjectUtil.isNotEmpty(reqVO.getReportTime()[1])) {
mpjLambdaWrapper.between(BusinessAssayTaskDataDO::getReportTime, reqVO.getReportTime()[0], reqVO.getReportTime()[1]);
}
if (ObjectUtil.isNotEmpty(reqVO.getConfigSampleFlowId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId());
}
if (ObjectUtil.isNotEmpty(reqVO.getSampleFlowNodeKey())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey());
}
if (ObjectUtil.isNotEmpty(reqVO.getSampleFlowNodeTime()) && ObjectUtil.isNotEmpty(reqVO.getSampleFlowNodeTime()[0]) && ObjectUtil.isNotEmpty(reqVO.getSampleFlowNodeTime()[1])) {
mpjLambdaWrapper.between(BusinessAssayTaskDataDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime()[0], reqVO.getSampleFlowNodeTime()[1]);
}
if (ObjectUtil.isNotEmpty(reqVO.getAnalysisCount())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAnalysisCount, reqVO.getAnalysisCount());
}
if (ObjectUtil.isNotEmpty(reqVO.getUpdateCount())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getUpdateCount, reqVO.getUpdateCount());
}
if (ObjectUtil.isNotEmpty(reqVO.getSystemDepartmentCode())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode());
}
if (ObjectUtil.isNotEmpty(reqVO.getCreateTime()) && ObjectUtil.isNotEmpty(reqVO.getCreateTime()[0]) && ObjectUtil.isNotEmpty(reqVO.getCreateTime()[1])) {
mpjLambdaWrapper.between(BusinessAssayTaskDataDO::getCreateTime, reqVO.getCreateTime()[0], reqVO.getCreateTime()[1]);
}
if (ObjectUtil.isNotEmpty(reqVO.getRemark())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getRemark, reqVO.getRemark());
}
if (ObjectUtil.isNotEmpty(reqVO.getSampleStatus())) {
mpjLambdaWrapper.eq(BusinessSubSampleAnalysisGroupDO::getSampleStatus, reqVO.getSampleStatus());
}
mpjLambdaWrapper.orderByDesc(BusinessAssayTaskDataDO::getId);
return selectJoinPage(reqVO, BusinessAssayTaskDataExtendRespVO.class, mpjLambdaWrapper);
} }
@@ -212,6 +342,20 @@ public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTa
.eq(BusinessAssayTaskDataDO::getBusinessSubSampleId, businessSubSampleId)); .eq(BusinessAssayTaskDataDO::getBusinessSubSampleId, businessSubSampleId));
} }
/**
* 根据子样及分析部门查询分析任务
* @param businessSubSampleId 子样id
* @param assayDepartmentId 分析部门id
* @return
*/
default List<BusinessAssayTaskDataDO> selectByBusinessSubSampleIdAndAssayDepartmentId(Long businessSubSampleId, Long assayDepartmentId) {
return selectList(new LambdaQueryWrapperX<BusinessAssayTaskDataDO>()
.eq(BusinessAssayTaskDataDO::getBusinessSubSampleId, businessSubSampleId)
.eq(BusinessAssayTaskDataDO::getAssayDepartmentId, assayDepartmentId));
}
/** /**
* 根据子样查询分析任务 * 根据子样查询分析任务
* @param businessSubSampleId 子样id * @param businessSubSampleId 子样id

View File

@@ -9,8 +9,6 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetai
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO; import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
import com.zt.plat.module.qms.enums.QmsCommonConstant; import com.zt.plat.module.qms.enums.QmsCommonConstant;
import jakarta.validation.Valid;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX; import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import java.util.List; import java.util.List;
@@ -38,18 +36,21 @@ public interface BusinessAssayTaskMapper extends BaseMapperX<BusinessAssayTaskDO
.eqIfPresent(BusinessAssayTaskDO::getConfigReportTemplateKey, reqVO.getConfigReportTemplateKey()) .eqIfPresent(BusinessAssayTaskDO::getConfigReportTemplateKey, reqVO.getConfigReportTemplateKey())
.eqIfPresent(BusinessAssayTaskDO::getTaskSourceType, reqVO.getTaskSourceType()) .eqIfPresent(BusinessAssayTaskDO::getTaskSourceType, reqVO.getTaskSourceType())
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignOperator, reqVO.getTaskAssignOperator()) .eqIfPresent(BusinessAssayTaskDO::getTaskAssignOperator, reqVO.getTaskAssignOperator())
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignOperatorId, reqVO.getTaskAssignOperatorId())
.betweenIfPresent(BusinessAssayTaskDO::getTaskAssignTime, reqVO.getTaskAssignTime()) .betweenIfPresent(BusinessAssayTaskDO::getTaskAssignTime, reqVO.getTaskAssignTime())
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignStatus, reqVO.getTaskAssignStatus()) .eqIfPresent(BusinessAssayTaskDO::getTaskAssignStatus, reqVO.getTaskAssignStatus())
.betweenIfPresent(BusinessAssayTaskDO::getTaskAssignSubmitTime, reqVO.getTaskAssignSubmitTime()) .betweenIfPresent(BusinessAssayTaskDO::getTaskAssignSubmitTime, reqVO.getTaskAssignSubmitTime())
.eqIfPresent(BusinessAssayTaskDO::getIsIngredients, reqVO.getIsIngredients()) .eqIfPresent(BusinessAssayTaskDO::getIsIngredients, reqVO.getIsIngredients())
.eqIfPresent(BusinessAssayTaskDO::getIngredientsStatus, reqVO.getIngredientsStatus()) .eqIfPresent(BusinessAssayTaskDO::getIngredientsStatus, reqVO.getIngredientsStatus())
.eqIfPresent(BusinessAssayTaskDO::getAssayOperator, reqVO.getAssayOperator()) .eqIfPresent(BusinessAssayTaskDO::getAssayOperator, reqVO.getAssayOperator())
.eqIfPresent(BusinessAssayTaskDO::getAssayOperatorId, reqVO.getAssayOperatorId())
.betweenIfPresent(BusinessAssayTaskDO::getAssayTime, reqVO.getAssayTime()) .betweenIfPresent(BusinessAssayTaskDO::getAssayTime, reqVO.getAssayTime())
.betweenIfPresent(BusinessAssayTaskDO::getAssaySubmitTime, reqVO.getAssaySubmitTime()) .betweenIfPresent(BusinessAssayTaskDO::getAssaySubmitTime, reqVO.getAssaySubmitTime())
.eqIfPresent(BusinessAssayTaskDO::getTaskAssayStatus, reqVO.getTaskAssayStatus()) .eqIfPresent(BusinessAssayTaskDO::getTaskAssayStatus, reqVO.getTaskAssayStatus())
.inIfPresent(BusinessAssayTaskDO::getTaskAssayStatus, reqVO.getTaskAssayStatusList()) .inIfPresent(BusinessAssayTaskDO::getTaskAssayStatus, reqVO.getTaskAssayStatusList())
.betweenIfPresent(BusinessAssayTaskDO::getReportTime, reqVO.getReportTime()) .betweenIfPresent(BusinessAssayTaskDO::getReportTime, reqVO.getReportTime())
.eqIfPresent(BusinessAssayTaskDO::getReportOperator, reqVO.getReportOperator()) .eqIfPresent(BusinessAssayTaskDO::getReportOperator, reqVO.getReportOperator())
.eqIfPresent(BusinessAssayTaskDO::getReportOperatorId, reqVO.getReportOperatorId())
.betweenIfPresent(BusinessAssayTaskDO::getTaskFinishTime, reqVO.getTaskFinishTime()) .betweenIfPresent(BusinessAssayTaskDO::getTaskFinishTime, reqVO.getTaskFinishTime())
.eqIfPresent(BusinessAssayTaskDO::getFlowInstanceId, reqVO.getFlowInstanceId()) .eqIfPresent(BusinessAssayTaskDO::getFlowInstanceId, reqVO.getFlowInstanceId())
.eqIfPresent(BusinessAssayTaskDO::getFormDataCollectionId, reqVO.getFormDataCollectionId()) .eqIfPresent(BusinessAssayTaskDO::getFormDataCollectionId, reqVO.getFormDataCollectionId())
@@ -79,18 +80,21 @@ public interface BusinessAssayTaskMapper extends BaseMapperX<BusinessAssayTaskDO
.eqIfPresent(BusinessAssayTaskDO::getConfigReportTemplateKey, reqVO.getConfigReportTemplateKey()) .eqIfPresent(BusinessAssayTaskDO::getConfigReportTemplateKey, reqVO.getConfigReportTemplateKey())
.eqIfPresent(BusinessAssayTaskDO::getTaskSourceType, reqVO.getTaskSourceType()) .eqIfPresent(BusinessAssayTaskDO::getTaskSourceType, reqVO.getTaskSourceType())
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignOperator, reqVO.getTaskAssignOperator()) .eqIfPresent(BusinessAssayTaskDO::getTaskAssignOperator, reqVO.getTaskAssignOperator())
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignOperatorId, reqVO.getTaskAssignOperatorId())
.betweenIfPresent(BusinessAssayTaskDO::getTaskAssignTime, reqVO.getTaskAssignTime()) .betweenIfPresent(BusinessAssayTaskDO::getTaskAssignTime, reqVO.getTaskAssignTime())
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignStatus, reqVO.getTaskAssignStatus()) .eqIfPresent(BusinessAssayTaskDO::getTaskAssignStatus, reqVO.getTaskAssignStatus())
.betweenIfPresent(BusinessAssayTaskDO::getTaskAssignSubmitTime, reqVO.getTaskAssignSubmitTime()) .betweenIfPresent(BusinessAssayTaskDO::getTaskAssignSubmitTime, reqVO.getTaskAssignSubmitTime())
.eqIfPresent(BusinessAssayTaskDO::getIsIngredients, reqVO.getIsIngredients()) .eqIfPresent(BusinessAssayTaskDO::getIsIngredients, reqVO.getIsIngredients())
.eqIfPresent(BusinessAssayTaskDO::getIngredientsStatus, reqVO.getIngredientsStatus()) .eqIfPresent(BusinessAssayTaskDO::getIngredientsStatus, reqVO.getIngredientsStatus())
.eqIfPresent(BusinessAssayTaskDO::getAssayOperator, reqVO.getAssayOperator()) .eqIfPresent(BusinessAssayTaskDO::getAssayOperator, reqVO.getAssayOperator())
.eqIfPresent(BusinessAssayTaskDO::getAssayOperatorId, reqVO.getAssayOperatorId())
.betweenIfPresent(BusinessAssayTaskDO::getAssayTime, reqVO.getAssayTime()) .betweenIfPresent(BusinessAssayTaskDO::getAssayTime, reqVO.getAssayTime())
.betweenIfPresent(BusinessAssayTaskDO::getAssaySubmitTime, reqVO.getAssaySubmitTime()) .betweenIfPresent(BusinessAssayTaskDO::getAssaySubmitTime, reqVO.getAssaySubmitTime())
.eqIfPresent(BusinessAssayTaskDO::getTaskAssayStatus, reqVO.getTaskAssayStatus()) .eqIfPresent(BusinessAssayTaskDO::getTaskAssayStatus, reqVO.getTaskAssayStatus())
.inIfPresent(BusinessAssayTaskDO::getTaskAssayStatus, reqVO.getTaskAssayStatusList()) .inIfPresent(BusinessAssayTaskDO::getTaskAssayStatus, reqVO.getTaskAssayStatusList())
.betweenIfPresent(BusinessAssayTaskDO::getReportTime, reqVO.getReportTime()) .betweenIfPresent(BusinessAssayTaskDO::getReportTime, reqVO.getReportTime())
.eqIfPresent(BusinessAssayTaskDO::getReportOperator, reqVO.getReportOperator()) .eqIfPresent(BusinessAssayTaskDO::getReportOperator, reqVO.getReportOperator())
.eqIfPresent(BusinessAssayTaskDO::getReportOperatorId, reqVO.getReportOperatorId())
.betweenIfPresent(BusinessAssayTaskDO::getTaskFinishTime, reqVO.getTaskFinishTime()) .betweenIfPresent(BusinessAssayTaskDO::getTaskFinishTime, reqVO.getTaskFinishTime())
.eqIfPresent(BusinessAssayTaskDO::getFlowInstanceId, reqVO.getFlowInstanceId()) .eqIfPresent(BusinessAssayTaskDO::getFlowInstanceId, reqVO.getFlowInstanceId())
.eqIfPresent(BusinessAssayTaskDO::getFormDataCollectionId, reqVO.getFormDataCollectionId()) .eqIfPresent(BusinessAssayTaskDO::getFormDataCollectionId, reqVO.getFormDataCollectionId())

View File

@@ -30,10 +30,12 @@ public interface BusinessQCCoefficientDataMapper extends BaseMapperX<BusinessQCC
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId()) .eqIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
.likeIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName()) .likeIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperator, reqVO.getAssayOperator()) .eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperator, reqVO.getAssayOperator())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
.betweenIfPresent(BusinessQCCoefficientDataDO::getAssignTaskTime, reqVO.getAssignTaskTime()) .betweenIfPresent(BusinessQCCoefficientDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
.eqIfPresent(BusinessQCCoefficientDataDO::getIsAssignTasked, reqVO.getIsAssignTasked()) .eqIfPresent(BusinessQCCoefficientDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
.eqIfPresent(BusinessQCCoefficientDataDO::getIsReported, reqVO.getIsReported()) .eqIfPresent(BusinessQCCoefficientDataDO::getIsReported, reqVO.getIsReported())
.eqIfPresent(BusinessQCCoefficientDataDO::getReporter, reqVO.getReporter()) .eqIfPresent(BusinessQCCoefficientDataDO::getReporter, reqVO.getReporter())
.eqIfPresent(BusinessQCCoefficientDataDO::getReporterId, reqVO.getReporterId())
.betweenIfPresent(BusinessQCCoefficientDataDO::getReportTime, reqVO.getReportTime()) .betweenIfPresent(BusinessQCCoefficientDataDO::getReportTime, reqVO.getReportTime())
.eqIfPresent(BusinessQCCoefficientDataDO::getUpdateCount, reqVO.getUpdateCount()) .eqIfPresent(BusinessQCCoefficientDataDO::getUpdateCount, reqVO.getUpdateCount())
.eqIfPresent(BusinessQCCoefficientDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) .eqIfPresent(BusinessQCCoefficientDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
@@ -55,10 +57,12 @@ public interface BusinessQCCoefficientDataMapper extends BaseMapperX<BusinessQCC
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId()) .eqIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
.likeIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName()) .likeIfPresent(BusinessQCCoefficientDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperator, reqVO.getAssayOperator()) .eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperator, reqVO.getAssayOperator())
.eqIfPresent(BusinessQCCoefficientDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
.betweenIfPresent(BusinessQCCoefficientDataDO::getAssignTaskTime, reqVO.getAssignTaskTime()) .betweenIfPresent(BusinessQCCoefficientDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
.eqIfPresent(BusinessQCCoefficientDataDO::getIsAssignTasked, reqVO.getIsAssignTasked()) .eqIfPresent(BusinessQCCoefficientDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
.eqIfPresent(BusinessQCCoefficientDataDO::getIsReported, reqVO.getIsReported()) .eqIfPresent(BusinessQCCoefficientDataDO::getIsReported, reqVO.getIsReported())
.eqIfPresent(BusinessQCCoefficientDataDO::getReporter, reqVO.getReporter()) .eqIfPresent(BusinessQCCoefficientDataDO::getReporter, reqVO.getReporter())
.eqIfPresent(BusinessQCCoefficientDataDO::getReporterId, reqVO.getReporterId())
.betweenIfPresent(BusinessQCCoefficientDataDO::getReportTime, reqVO.getReportTime()) .betweenIfPresent(BusinessQCCoefficientDataDO::getReportTime, reqVO.getReportTime())
.eqIfPresent(BusinessQCCoefficientDataDO::getUpdateCount, reqVO.getUpdateCount()) .eqIfPresent(BusinessQCCoefficientDataDO::getUpdateCount, reqVO.getUpdateCount())
.eqIfPresent(BusinessQCCoefficientDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) .eqIfPresent(BusinessQCCoefficientDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())

View File

@@ -10,7 +10,6 @@ import com.zt.plat.module.qms.business.bus.controller.vo.BusinessQCCoefficientPa
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessQCCoefficientParameterDataReqVO; import com.zt.plat.module.qms.business.bus.controller.vo.BusinessQCCoefficientParameterDataReqVO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientParameterDataDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientParameterDataDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigQCSampleMethodParameterDO; import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigQCSampleMethodParameterDO;
import com.zt.plat.module.qms.business.dic.dal.dataobject.DictionaryParameterDO;
import com.zt.plat.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO; import com.zt.plat.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX; import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@@ -41,21 +40,20 @@ public interface BusinessQCCoefficientParameterDataMapper extends BaseMapperX<Bu
default List<BusinessAssayProjectAndParameterRespVO> selectProjectAndParameterBy(BusinessQCCoefficientParameterDataReqVO reqVO) { default List<BusinessAssayProjectAndParameterRespVO> selectProjectAndParameterBy(BusinessQCCoefficientParameterDataReqVO reqVO) {
return selectJoinList(BusinessAssayProjectAndParameterRespVO.class, new MPJLambdaWrapperX<BusinessQCCoefficientParameterDataDO>() return selectJoinList(BusinessAssayProjectAndParameterRespVO.class, new MPJLambdaWrapperX<BusinessQCCoefficientParameterDataDO>()
.leftJoin(ConfigQCSampleMethodParameterDO.class, ConfigQCSampleMethodParameterDO::getId, BusinessQCCoefficientParameterDataDO::getConfigQCSampleMethodParameterId) .leftJoin(ConfigQCSampleMethodParameterDO.class, ConfigQCSampleMethodParameterDO::getId, BusinessQCCoefficientParameterDataDO::getConfigQCSampleMethodParameterId)
.leftJoin(DictionaryParameterDO.class, DictionaryParameterDO::getId, BusinessQCCoefficientParameterDataDO::getDictionaryParameterId)
.leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, ConfigQCSampleMethodParameterDO::getDictionaryBusinessId) .leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, ConfigQCSampleMethodParameterDO::getDictionaryBusinessId)
.selectAs(BusinessQCCoefficientParameterDataDO::getId, BusinessAssayProjectAndParameterRespVO::getId) .selectAs(BusinessQCCoefficientParameterDataDO::getId, BusinessAssayProjectAndParameterRespVO::getId)
.selectAs(BusinessQCCoefficientParameterDataDO::getDictionaryParameterId, BusinessAssayProjectAndParameterRespVO::getDicId) .selectAs(BusinessQCCoefficientParameterDataDO::getConfigQCSampleMethodParameterId, BusinessAssayProjectAndParameterRespVO::getDicId)
.selectAs(DictionaryParameterDO::getKey, BusinessAssayProjectAndParameterRespVO::getDicKey) .selectAs(ConfigQCSampleMethodParameterDO::getKey, BusinessAssayProjectAndParameterRespVO::getDicKey)
.selectAs(DictionaryParameterDO::getName, BusinessAssayProjectAndParameterRespVO::getName) .selectAs(ConfigQCSampleMethodParameterDO::getParameterName, BusinessAssayProjectAndParameterRespVO::getName)
.selectAs(DictionaryParameterDO::getName, BusinessAssayProjectAndParameterRespVO::getShowName) .selectAs(ConfigQCSampleMethodParameterDO::getParameterName, BusinessAssayProjectAndParameterRespVO::getShowName)
.selectAs(DictionaryParameterDO::getFillingWay, BusinessAssayProjectAndParameterRespVO::getFillingWay) .selectAs(ConfigQCSampleMethodParameterDO::getFillingWay, BusinessAssayProjectAndParameterRespVO::getFillingWay)
.selectAs(BusinessQCCoefficientParameterDataDO::getDataType, BusinessAssayProjectAndParameterRespVO::getDataType) .selectAs(BusinessQCCoefficientParameterDataDO::getDataType, BusinessAssayProjectAndParameterRespVO::getDataType)
.selectAs(BusinessQCCoefficientParameterDataDO::getDecimalPosition, BusinessAssayProjectAndParameterRespVO::getDecimalPosition) .selectAs(BusinessQCCoefficientParameterDataDO::getDecimalPosition, BusinessAssayProjectAndParameterRespVO::getDecimalPosition)
.selectAs(BusinessQCCoefficientParameterDataDO::getValue, BusinessAssayProjectAndParameterRespVO::getValue) .selectAs(BusinessQCCoefficientParameterDataDO::getValue, BusinessAssayProjectAndParameterRespVO::getValue)
.selectAs(DictionaryParameterDO::getUnit, BusinessAssayProjectAndParameterRespVO::getUnit) .selectAs(ConfigQCSampleMethodParameterDO::getUnit, BusinessAssayProjectAndParameterRespVO::getUnit)
.selectAs(ConfigQCSampleMethodParameterDO::getIsNull, BusinessAssayProjectAndParameterRespVO::getIsNull) .selectAs(ConfigQCSampleMethodParameterDO::getIsNull, BusinessAssayProjectAndParameterRespVO::getIsNull)
.selectAs(ConfigQCSampleMethodParameterDO::getFormula, BusinessAssayProjectAndParameterRespVO::getFormula) .selectAs(ConfigQCSampleMethodParameterDO::getFormula, BusinessAssayProjectAndParameterRespVO::getFormula)
.selectAs(ConfigQCSampleMethodParameterDO::getSortNo, BusinessAssayProjectAndParameterRespVO::getParamNo) .selectAs(ConfigQCSampleMethodParameterDO::getNo, BusinessAssayProjectAndParameterRespVO::getParamNo)
.selectAs("'parameter'", BusinessAssayProjectAndParameterRespVO::getType) .selectAs("'parameter'", BusinessAssayProjectAndParameterRespVO::getType)
.selectAs(ConfigQCSampleMethodParameterDO::getDictionaryBusinessId, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessId) .selectAs(ConfigQCSampleMethodParameterDO::getDictionaryBusinessId, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessId)
.selectAs(ConfigQCSampleMethodParameterDO::getDictionaryBusinessKey, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessKey) .selectAs(ConfigQCSampleMethodParameterDO::getDictionaryBusinessKey, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessKey)

View File

@@ -30,10 +30,12 @@ public interface BusinessQCManagementDataMapper extends BaseMapperX<BusinessQCMa
.eqIfPresent(BusinessQCManagementDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId()) .eqIfPresent(BusinessQCManagementDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
.likeIfPresent(BusinessQCManagementDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName()) .likeIfPresent(BusinessQCManagementDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperator, reqVO.getAssayOperator()) .eqIfPresent(BusinessQCManagementDataDO::getAssayOperator, reqVO.getAssayOperator())
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
.betweenIfPresent(BusinessQCManagementDataDO::getAssignTaskTime, reqVO.getAssignTaskTime()) .betweenIfPresent(BusinessQCManagementDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
.eqIfPresent(BusinessQCManagementDataDO::getIsAssignTasked, reqVO.getIsAssignTasked()) .eqIfPresent(BusinessQCManagementDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
.eqIfPresent(BusinessQCManagementDataDO::getIsReported, reqVO.getIsReported()) .eqIfPresent(BusinessQCManagementDataDO::getIsReported, reqVO.getIsReported())
.eqIfPresent(BusinessQCManagementDataDO::getReporter, reqVO.getReporter()) .eqIfPresent(BusinessQCManagementDataDO::getReporter, reqVO.getReporter())
.eqIfPresent(BusinessQCManagementDataDO::getReporterId, reqVO.getReporterId())
.betweenIfPresent(BusinessQCManagementDataDO::getReportTime, reqVO.getReportTime()) .betweenIfPresent(BusinessQCManagementDataDO::getReportTime, reqVO.getReportTime())
.eqIfPresent(BusinessQCManagementDataDO::getUpdateCount, reqVO.getUpdateCount()) .eqIfPresent(BusinessQCManagementDataDO::getUpdateCount, reqVO.getUpdateCount())
.eqIfPresent(BusinessQCManagementDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) .eqIfPresent(BusinessQCManagementDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
@@ -55,10 +57,12 @@ public interface BusinessQCManagementDataMapper extends BaseMapperX<BusinessQCMa
.eqIfPresent(BusinessQCManagementDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId()) .eqIfPresent(BusinessQCManagementDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
.likeIfPresent(BusinessQCManagementDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName()) .likeIfPresent(BusinessQCManagementDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperator, reqVO.getAssayOperator()) .eqIfPresent(BusinessQCManagementDataDO::getAssayOperator, reqVO.getAssayOperator())
.eqIfPresent(BusinessQCManagementDataDO::getAssayOperatorId, reqVO.getAssayOperatorId())
.betweenIfPresent(BusinessQCManagementDataDO::getAssignTaskTime, reqVO.getAssignTaskTime()) .betweenIfPresent(BusinessQCManagementDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
.eqIfPresent(BusinessQCManagementDataDO::getIsAssignTasked, reqVO.getIsAssignTasked()) .eqIfPresent(BusinessQCManagementDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
.eqIfPresent(BusinessQCManagementDataDO::getIsReported, reqVO.getIsReported()) .eqIfPresent(BusinessQCManagementDataDO::getIsReported, reqVO.getIsReported())
.eqIfPresent(BusinessQCManagementDataDO::getReporter, reqVO.getReporter()) .eqIfPresent(BusinessQCManagementDataDO::getReporter, reqVO.getReporter())
.eqIfPresent(BusinessQCManagementDataDO::getReporterId, reqVO.getReporterId())
.betweenIfPresent(BusinessQCManagementDataDO::getReportTime, reqVO.getReportTime()) .betweenIfPresent(BusinessQCManagementDataDO::getReportTime, reqVO.getReportTime())
.eqIfPresent(BusinessQCManagementDataDO::getUpdateCount, reqVO.getUpdateCount()) .eqIfPresent(BusinessQCManagementDataDO::getUpdateCount, reqVO.getUpdateCount())
.eqIfPresent(BusinessQCManagementDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) .eqIfPresent(BusinessQCManagementDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())

View File

@@ -39,21 +39,20 @@ public interface BusinessQCManagementParameterDataMapper extends BaseMapperX<Bus
default List<BusinessAssayProjectAndParameterRespVO> selectProjectAndParameterBy(BusinessQCManagementParameterDataReqVO reqVO) { default List<BusinessAssayProjectAndParameterRespVO> selectProjectAndParameterBy(BusinessQCManagementParameterDataReqVO reqVO) {
return selectJoinList(BusinessAssayProjectAndParameterRespVO.class, new MPJLambdaWrapperX<BusinessQCManagementParameterDataDO>() return selectJoinList(BusinessAssayProjectAndParameterRespVO.class, new MPJLambdaWrapperX<BusinessQCManagementParameterDataDO>()
.leftJoin(ConfigAssayMethodProjectParameterDO.class, ConfigAssayMethodProjectParameterDO::getId, BusinessQCManagementParameterDataDO::getConfigAssayMethodProjectParameterId) .leftJoin(ConfigAssayMethodProjectParameterDO.class, ConfigAssayMethodProjectParameterDO::getId, BusinessQCManagementParameterDataDO::getConfigAssayMethodProjectParameterId)
.leftJoin(DictionaryParameterDO.class, DictionaryParameterDO::getId, BusinessQCManagementParameterDataDO::getDictionaryParameterId)
.leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, ConfigAssayMethodProjectParameterDO::getDictionaryBusinessId) .leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, ConfigAssayMethodProjectParameterDO::getDictionaryBusinessId)
.selectAs(BusinessQCManagementParameterDataDO::getId, BusinessAssayProjectAndParameterRespVO::getId) .selectAs(BusinessQCManagementParameterDataDO::getId, BusinessAssayProjectAndParameterRespVO::getId)
.selectAs(BusinessQCManagementParameterDataDO::getDictionaryParameterId, BusinessAssayProjectAndParameterRespVO::getDicId) .selectAs(BusinessQCManagementParameterDataDO::getConfigAssayMethodProjectParameterId, BusinessAssayProjectAndParameterRespVO::getDicId)
.selectAs(DictionaryParameterDO::getKey, BusinessAssayProjectAndParameterRespVO::getDicKey) .selectAs(ConfigAssayMethodProjectParameterDO::getKey, BusinessAssayProjectAndParameterRespVO::getDicKey)
.selectAs(DictionaryParameterDO::getName, BusinessAssayProjectAndParameterRespVO::getName) .selectAs(ConfigAssayMethodProjectParameterDO::getParameterName, BusinessAssayProjectAndParameterRespVO::getName)
.selectAs(DictionaryParameterDO::getName, BusinessAssayProjectAndParameterRespVO::getShowName) .selectAs(ConfigAssayMethodProjectParameterDO::getParameterName, BusinessAssayProjectAndParameterRespVO::getShowName)
.selectAs(DictionaryParameterDO::getFillingWay, BusinessAssayProjectAndParameterRespVO::getFillingWay) .selectAs(ConfigAssayMethodProjectParameterDO::getFillingWay, BusinessAssayProjectAndParameterRespVO::getFillingWay)
.selectAs(BusinessQCManagementParameterDataDO::getDataType, BusinessAssayProjectAndParameterRespVO::getDataType) .selectAs(BusinessQCManagementParameterDataDO::getDataType, BusinessAssayProjectAndParameterRespVO::getDataType)
.selectAs(BusinessQCManagementParameterDataDO::getDecimalPosition, BusinessAssayProjectAndParameterRespVO::getDecimalPosition) .selectAs(BusinessQCManagementParameterDataDO::getDecimalPosition, BusinessAssayProjectAndParameterRespVO::getDecimalPosition)
.selectAs(BusinessQCManagementParameterDataDO::getValue, BusinessAssayProjectAndParameterRespVO::getValue) .selectAs(BusinessQCManagementParameterDataDO::getValue, BusinessAssayProjectAndParameterRespVO::getValue)
.selectAs(DictionaryParameterDO::getUnit, BusinessAssayProjectAndParameterRespVO::getUnit) .selectAs(ConfigAssayMethodProjectParameterDO::getUnit, BusinessAssayProjectAndParameterRespVO::getUnit)
.selectAs(ConfigAssayMethodProjectParameterDO::getIsNull, BusinessAssayProjectAndParameterRespVO::getIsNull) .selectAs(ConfigAssayMethodProjectParameterDO::getIsNull, BusinessAssayProjectAndParameterRespVO::getIsNull)
.selectAs(ConfigAssayMethodProjectParameterDO::getFormula, BusinessAssayProjectAndParameterRespVO::getFormula) .selectAs(ConfigAssayMethodProjectParameterDO::getFormula, BusinessAssayProjectAndParameterRespVO::getFormula)
.selectAs(ConfigAssayMethodProjectParameterDO::getSortNo, BusinessAssayProjectAndParameterRespVO::getParamNo) .selectAs(ConfigAssayMethodProjectParameterDO::getNo, BusinessAssayProjectAndParameterRespVO::getParamNo)
.selectAs("'parameter'", BusinessAssayProjectAndParameterRespVO::getType) .selectAs("'parameter'", BusinessAssayProjectAndParameterRespVO::getType)
.selectAs(ConfigAssayMethodProjectParameterDO::getDictionaryBusinessId, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessId) .selectAs(ConfigAssayMethodProjectParameterDO::getDictionaryBusinessId, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessId)
.selectAs(ConfigAssayMethodProjectParameterDO::getDictionaryBusinessKey, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessKey) .selectAs(ConfigAssayMethodProjectParameterDO::getDictionaryBusinessKey, BusinessAssayProjectAndParameterRespVO::getGroupDictionaryBusinessKey)

View File

@@ -46,7 +46,7 @@ public interface BusinessQCManagementProjectDataMapper extends BaseMapperX<Busin
.leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessQCManagementProjectDataDO::getDictionaryProjectId) .leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessQCManagementProjectDataDO::getDictionaryProjectId)
.leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, ConfigAssayMethodProjectDO::getDictionaryBusinessId) .leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, ConfigAssayMethodProjectDO::getDictionaryBusinessId)
.selectAs(BusinessQCManagementProjectDataDO::getId, BusinessAssayProjectAndParameterRespVO::getId) .selectAs(BusinessQCManagementProjectDataDO::getId, BusinessAssayProjectAndParameterRespVO::getId)
.selectAs(BusinessQCManagementProjectDataDO::getDictionaryProjectId, BusinessAssayProjectAndParameterRespVO::getDicId) .selectAs(BusinessQCManagementProjectDataDO::getConfigAssayMethodProjectId, BusinessAssayProjectAndParameterRespVO::getDicId)
.selectAs(DictionaryProjectDO::getKey, BusinessAssayProjectAndParameterRespVO::getDicKey) .selectAs(DictionaryProjectDO::getKey, BusinessAssayProjectAndParameterRespVO::getDicKey)
//.selectAs(DictionaryProjectDO::getName, BusinessAssayProjectAndParameterRespVO::getName) //.selectAs(DictionaryProjectDO::getName, BusinessAssayProjectAndParameterRespVO::getName)
.selectAs(DictionaryProjectDO::getSimpleName, BusinessAssayProjectAndParameterRespVO::getName) .selectAs(DictionaryProjectDO::getSimpleName, BusinessAssayProjectAndParameterRespVO::getName)

View File

@@ -44,7 +44,7 @@ public interface BusinessSampleDispatchDetailMapper extends BaseMapperX<Business
.inIfPresent(BusinessSampleDispatchDetailDO::getId, reqVO.getIdList()) .inIfPresent(BusinessSampleDispatchDetailDO::getId, reqVO.getIdList())
.eqIfPresent(BusinessSampleDispatchDetailDO::getParentId, reqVO.getParentId()) .eqIfPresent(BusinessSampleDispatchDetailDO::getParentId, reqVO.getParentId())
.eqIfPresent(BusinessSampleDispatchDetailDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId()) .eqIfPresent(BusinessSampleDispatchDetailDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId())
.eqIfPresent(BusinessSubSampleDO::getSampleCode, reqVO.getSampleCode()) .eqIfPresent(BusinessSubSampleDO::getSampleReturnCode, reqVO.getSampleReturnCode())
.eqIfPresent(BusinessSampleDispatchDetailDO::getBorrowUser, reqVO.getBorrowUser()) .eqIfPresent(BusinessSampleDispatchDetailDO::getBorrowUser, reqVO.getBorrowUser())
.eqIfPresent(BusinessSampleDispatchDetailDO::getBorrowUserId, reqVO.getBorrowUserId()) .eqIfPresent(BusinessSampleDispatchDetailDO::getBorrowUserId, reqVO.getBorrowUserId())
.betweenIfPresent(BusinessSampleDispatchDetailDO::getBorrowTime, reqVO.getBorrowTime()) .betweenIfPresent(BusinessSampleDispatchDetailDO::getBorrowTime, reqVO.getBorrowTime())

View File

@@ -83,6 +83,25 @@ public interface BusinessSampleEntrustDetailMapper extends BaseMapperX<BusinessS
return selectList(new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>().eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, businessSampleEntrustRegistrationId)); return selectList(new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>().eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, businessSampleEntrustRegistrationId));
} }
default BusinessSampleEntrustDetailDO selectByBusinessBaseSampleId(Long businessBaseSampleId) {
return selectOne(new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>().eq(BusinessSampleEntrustDetailDO::getBusinessBaseSampleId, businessBaseSampleId));
}
/**
* 查询当前批次的第一条数据
* @param businessBaseSampleId 任意一条的主样id
* @return
*/
default BusinessSampleEntrustDetailDO selectCurrBatchFirstByBusinessBaseSampleId(Long businessBaseSampleId) {
BusinessSampleEntrustDetailDO businessSampleEntrustDetailDO = selectByBusinessBaseSampleId(businessBaseSampleId);
//查询当前委托的第一条
return selectOne(new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>()
.eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, businessSampleEntrustDetailDO.getBusinessSampleEntrustRegistrationId())
.orderByAsc(BusinessSampleEntrustDetailDO::getSort)
.last(" limit 1 "));
}
/** /**
* 物理批量删除删除 * 物理批量删除删除
* @param idList * @param idList

View File

@@ -2,6 +2,7 @@ package com.zt.plat.module.qms.business.bus.dal.mapper;
import com.zt.plat.framework.common.pojo.PageResult; import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX; import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
import com.zt.plat.module.qms.business.bus.controller.vo.*; import com.zt.plat.module.qms.business.bus.controller.vo.*;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessSampleHandoverDetailPageReqVO; import com.zt.plat.module.qms.business.bus.controller.vo.BusinessSampleHandoverDetailPageReqVO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleHandoverDetailDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleHandoverDetailDO;
@@ -9,6 +10,8 @@ import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import java.util.List; import java.util.List;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigWarehouseLocationDO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
/** /**
@@ -40,4 +43,28 @@ public interface BusinessSampleHandoverDetailMapper extends BaseMapperX<Business
.eq(BusinessSampleHandoverDetailDO::getBusinessSampleHandoverId, businessSampleHandoverId)); .eq(BusinessSampleHandoverDetailDO::getBusinessSampleHandoverId, businessSampleHandoverId));
} }
/*
* 归库明细分页查询*/
default PageResult<BusinessSampleHandoverDetailRespVO> takeOffPageList(BusinessSampleHandoverDetailPageReqVO reqVO) {
return selectJoinPage(reqVO, BusinessSampleHandoverDetailRespVO.class, new MPJLambdaWrapperX<BusinessSampleHandoverDetailDO>()
.leftJoin(BusinessSubSampleDO.class, BusinessSubSampleDO::getId, BusinessSampleHandoverDetailDO::getBusinessSubSampleId)
.leftJoin(ConfigWarehouseLocationDO.class, ConfigWarehouseLocationDO::getId, BusinessSubSampleDO::getConfigWarehouseLocationInfomationId)
.selectAll(BusinessSampleHandoverDetailDO.class)
.selectAs(BusinessSubSampleDO::getSampleCode, BusinessSampleHandoverDetailRespVO::getOriginalSampleCode)
.selectAs(BusinessSubSampleDO::getReturnTime, BusinessSampleHandoverDetailRespVO::getReturnTime)
.selectAs(ConfigWarehouseLocationDO::getCode, BusinessSampleHandoverDetailRespVO::getWarehouseLocationCode)
.eqIfPresent(BusinessSampleHandoverDetailDO::getBusinessSampleHandoverId, reqVO.getBusinessSampleHandoverId())
.eqIfPresent(BusinessSampleHandoverDetailDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId())
.likeIfPresent(BusinessSampleHandoverDetailDO::getSampleName, reqVO.getSampleName())
.eqIfPresent(BusinessSampleHandoverDetailDO::getSampleCode, reqVO.getSampleCode())
.eqIfPresent(BusinessSampleHandoverDetailDO::getSampleWeight, reqVO.getSampleWeight())
.eqIfPresent(BusinessSampleHandoverDetailDO::getBalanceCode, reqVO.getBalanceCode())
.eqIfPresent(BusinessSampleHandoverDetailDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
.likeIfPresent(BusinessSampleHandoverDetailDO::getDictionaryBusinessName, reqVO.getDictionaryBusinessName())
.eqIfPresent(BusinessSampleHandoverDetailDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.betweenIfPresent(BusinessSampleHandoverDetailDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(BusinessSampleHandoverDetailDO::getRemark, reqVO.getRemark())
.orderByDesc(BusinessSampleHandoverDetailDO::getId));
}
} }

View File

@@ -35,4 +35,17 @@ public interface BusinessSubParentSampleAssessmentMapper extends BaseMapperX<Bus
.orderByDesc(BusinessSubParentSampleAssessmentDO::getId)); .orderByDesc(BusinessSubParentSampleAssessmentDO::getId));
} }
default BusinessSubParentSampleAssessmentDO selectByBusinessSubParentSampleIdAndConfigAssayMethodId(Long businessSubParentSampleId, Long configAssayMethodId) {
return selectOne(new LambdaQueryWrapperX<BusinessSubParentSampleAssessmentDO>()
.eq(BusinessSubParentSampleAssessmentDO::getBusinessSubParentSampleId, businessSubParentSampleId)
.eq(BusinessSubParentSampleAssessmentDO::getConfigAssayMethodId, configAssayMethodId));
}
default List<BusinessSubParentSampleAssessmentDO> selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(List<Long> businessSubParentSampleIds,
Long configAssayMethodId) {
return selectList(new LambdaQueryWrapperX<BusinessSubParentSampleAssessmentDO>()
.in(BusinessSubParentSampleAssessmentDO::getBusinessSubParentSampleId, businessSubParentSampleIds)
.eq(BusinessSubParentSampleAssessmentDO::getConfigAssayMethodId, configAssayMethodId));
}
} }

View File

@@ -49,7 +49,7 @@ public interface BusinessSubParentSampleAssessmentProjectMapper extends BaseMapp
.orderByDesc(BusinessSubParentSampleAssessmentProjectDO::getId)); .orderByDesc(BusinessSubParentSampleAssessmentProjectDO::getId));
} }
default List<BusinessSubParentSampleAssessmentProjectExtendRespVO> selectByBusinessSubParentSampleIdAndConfigAssayMethodId(List<Long> businessSubParentSampleIds, Long configAssayMethodId) { default List<BusinessSubParentSampleAssessmentProjectExtendRespVO> selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(List<Long> businessSubParentSampleIds, Long configAssayMethodId) {
return selectJoinList(BusinessSubParentSampleAssessmentProjectExtendRespVO.class, new MPJLambdaWrapperX<BusinessSubParentSampleAssessmentProjectDO>() return selectJoinList(BusinessSubParentSampleAssessmentProjectExtendRespVO.class, new MPJLambdaWrapperX<BusinessSubParentSampleAssessmentProjectDO>()
.leftJoin(ConfigAssayMethodProjectDO.class, ConfigAssayMethodProjectDO::getId, BusinessSubParentSampleAssessmentProjectDO::getConfigAssayMethodProjectId) .leftJoin(ConfigAssayMethodProjectDO.class, ConfigAssayMethodProjectDO::getId, BusinessSubParentSampleAssessmentProjectDO::getConfigAssayMethodProjectId)
.leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessSubParentSampleAssessmentProjectDO::getDictionaryProjectId) .leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessSubParentSampleAssessmentProjectDO::getDictionaryProjectId)

View File

@@ -5,6 +5,9 @@ import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessSubParentSamplePageReqVO; import com.zt.plat.module.qms.business.bus.controller.vo.BusinessSubParentSamplePageReqVO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX; import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import java.util.List;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
/** /**
@@ -38,4 +41,9 @@ public interface BusinessSubParentSampleMapper extends BaseMapperX<BusinessSubPa
.orderByDesc(BusinessSubParentSampleDO::getId)); .orderByDesc(BusinessSubParentSampleDO::getId));
} }
default List<BusinessSubParentSampleDO> selectByBusinessBaseSampleId(Long businessBaseSampleId) {
return selectList(new LambdaQueryWrapperX<BusinessSubParentSampleDO>()
.eq(BusinessSubParentSampleDO::getBusinessBaseSampleId, businessBaseSampleId));
}
} }

View File

@@ -62,4 +62,10 @@ public interface BusinessSubSampleAnalysisGroupMapper extends BaseMapperX<Busine
.eq(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentId, assayDepartmentId)); .eq(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentId, assayDepartmentId));
} }
default BusinessSubSampleAnalysisGroupDO selectByBusinessSubSampleIdAndAssayDepartmentId(Long businessSubSampleId, Long assayDepartmentId) {
return selectOne(new LambdaQueryWrapperX<BusinessSubSampleAnalysisGroupDO>()
.eq(BusinessSubSampleAnalysisGroupDO::getBusinessSubSampleId, businessSubSampleId)
.eq(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentId, assayDepartmentId));
}
} }

View File

@@ -37,7 +37,7 @@ public interface BusinessSubSampleAssessmentMapper extends BaseMapperX<BusinessS
.orderByDesc(BusinessSubSampleAssessmentDO::getId)); .orderByDesc(BusinessSubSampleAssessmentDO::getId));
} }
default BusinessSubSampleAssessmentDO selectByBusinessSubSampleIdsAndConfigAssayMethodId(Long businessSubSampleId, Long configAssayMethodId) { default BusinessSubSampleAssessmentDO selectByBusinessSubSampleIdAndConfigAssayMethodId(Long businessSubSampleId, Long configAssayMethodId) {
return selectOne(new LambdaQueryWrapperX<BusinessSubSampleAssessmentDO>() return selectOne(new LambdaQueryWrapperX<BusinessSubSampleAssessmentDO>()
.eq(BusinessSubSampleAssessmentDO::getBusinessSubSampleId, businessSubSampleId) .eq(BusinessSubSampleAssessmentDO::getBusinessSubSampleId, businessSubSampleId)
.eq(BusinessSubSampleAssessmentDO::getConfigAssayMethodId, configAssayMethodId)); .eq(BusinessSubSampleAssessmentDO::getConfigAssayMethodId, configAssayMethodId));

View File

@@ -20,6 +20,9 @@ import com.zt.plat.module.qms.enums.QmsWarehouseLocationConstant;
import jakarta.validation.Valid; import jakarta.validation.Valid;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX; import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
/** /**
* 子样业务 Mapper * 子样业务 Mapper
@@ -60,6 +63,7 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
.eqIfPresent(BusinessSubSampleDO::getLastBalanceCode, reqVO.getLastBalanceCode()) .eqIfPresent(BusinessSubSampleDO::getLastBalanceCode, reqVO.getLastBalanceCode())
.eqIfPresent(BusinessSubSampleDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId()) .eqIfPresent(BusinessSubSampleDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId())
.eqIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey()) .eqIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey())
.inIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKeyList())
.betweenIfPresent(BusinessSubSampleDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime()) .betweenIfPresent(BusinessSubSampleDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime())
.eqIfPresent(BusinessSubSampleDO::getNextSampleFlowNode, reqVO.getNextSampleFlowNode()) .eqIfPresent(BusinessSubSampleDO::getNextSampleFlowNode, reqVO.getNextSampleFlowNode())
.eqIfPresent(BusinessSubSampleDO::getSampleStatus, reqVO.getSampleStatus()) .eqIfPresent(BusinessSubSampleDO::getSampleStatus, reqVO.getSampleStatus())
@@ -115,6 +119,7 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
.eqIfPresent(BusinessSubSampleDO::getLastBalanceCode, reqVO.getLastBalanceCode()) .eqIfPresent(BusinessSubSampleDO::getLastBalanceCode, reqVO.getLastBalanceCode())
.eqIfPresent(BusinessSubSampleDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId()) .eqIfPresent(BusinessSubSampleDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId())
.eqIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey()) .eqIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey())
.inIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKeyList())
.betweenIfPresent(BusinessSubSampleDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime()) .betweenIfPresent(BusinessSubSampleDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime())
.eqIfPresent(BusinessSubSampleDO::getNextSampleFlowNode, reqVO.getNextSampleFlowNode()) .eqIfPresent(BusinessSubSampleDO::getNextSampleFlowNode, reqVO.getNextSampleFlowNode())
.eqIfPresent(BusinessSubSampleDO::getSampleStatus, reqVO.getSampleStatus()) .eqIfPresent(BusinessSubSampleDO::getSampleStatus, reqVO.getSampleStatus())
@@ -168,6 +173,7 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
.eqIfPresent(BusinessSubSampleDO::getLastBalanceCode, reqVO.getLastBalanceCode()) .eqIfPresent(BusinessSubSampleDO::getLastBalanceCode, reqVO.getLastBalanceCode())
.eqIfPresent(BusinessSubSampleDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId()) .eqIfPresent(BusinessSubSampleDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId())
.eqIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey()) .eqIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey())
.inIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKeyList())
.betweenIfPresent(BusinessSubSampleDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime()) .betweenIfPresent(BusinessSubSampleDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime())
.eqIfPresent(BusinessSubSampleDO::getNextSampleFlowNode, reqVO.getNextSampleFlowNode()) .eqIfPresent(BusinessSubSampleDO::getNextSampleFlowNode, reqVO.getNextSampleFlowNode())
.eqIfPresent(BusinessSubSampleDO::getSampleStatus, reqVO.getSampleStatus()) .eqIfPresent(BusinessSubSampleDO::getSampleStatus, reqVO.getSampleStatus())
@@ -200,12 +206,27 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
.selectAs(DictionaryBusinessDO::getName, BusinessSubSampleExtendRespVO::getDictionaryBusinessName) .selectAs(DictionaryBusinessDO::getName, BusinessSubSampleExtendRespVO::getDictionaryBusinessName)
.selectAs(ConfigSubSampleDO::getIsPrint, BusinessSubSampleExtendRespVO::getIsPrint) .selectAs(ConfigSubSampleDO::getIsPrint, BusinessSubSampleExtendRespVO::getIsPrint)
.selectAs(ConfigSubSampleDO::getPrintTemplate, BusinessSubSampleExtendRespVO::getPrintTemplate) .selectAs(ConfigSubSampleDO::getPrintTemplate, BusinessSubSampleExtendRespVO::getPrintTemplate)
.selectAs(ConfigSubSampleDO::getCodePrintQuantity, BusinessSubSampleExtendRespVO::getCodePrintQuantity)
.eq(BusinessSubSampleDO::getId, id) .eq(BusinessSubSampleDO::getId, id)
.eq(BusinessSubSampleDO::getSampleStatus, QmsCommonConstant.NORMAL) .eq(BusinessSubSampleDO::getSampleStatus, QmsCommonConstant.NORMAL)
.eq(BusinessSubSampleDO::getIsEnabled, QmsCommonConstant.YES) .eq(BusinessSubSampleDO::getIsEnabled, QmsCommonConstant.YES)
.orderByDesc(BusinessSubSampleDO::getId)); .orderByDesc(BusinessSubSampleDO::getId));
} }
default BusinessSubSampleExtendRespVO getBySampleCode(BusinessSubSampleReqVO reqVO) {
return selectJoinOne(BusinessSubSampleExtendRespVO.class, new MPJLambdaWrapperX<BusinessSubSampleDO>()
.leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, BusinessSubSampleDO::getDictionaryBusinessId)
.leftJoin(ConfigSubSampleDO.class, ConfigSubSampleDO::getId, BusinessSubSampleDO::getConfigSubSampleId)
.selectAll(BusinessSubSampleDO.class)
.selectAs(DictionaryBusinessDO::getName, BusinessSubSampleExtendRespVO::getDictionaryBusinessName)
.selectAs(ConfigSubSampleDO::getIsPrint, BusinessSubSampleExtendRespVO::getIsPrint)
.selectAs(ConfigSubSampleDO::getPrintTemplate, BusinessSubSampleExtendRespVO::getPrintTemplate)
.eqIfPresent(BusinessSubSampleDO::getSampleCode, reqVO.getSampleCode())
.eqIfPresent(BusinessSubSampleDO::getSampleStatus, QmsCommonConstant.NORMAL)
.eqIfPresent(BusinessSubSampleDO::getIsEnabled, QmsCommonConstant.YES)
.orderByDesc(BusinessSubSampleDO::getId));
}
default BusinessSubSampleExtendRespVO getBySampleCodeAndFlowKey(BusinessSubSampleReqVO reqVO) { default BusinessSubSampleExtendRespVO getBySampleCodeAndFlowKey(BusinessSubSampleReqVO reqVO) {
return selectJoinOne(BusinessSubSampleExtendRespVO.class, new MPJLambdaWrapperX<BusinessSubSampleDO>() return selectJoinOne(BusinessSubSampleExtendRespVO.class, new MPJLambdaWrapperX<BusinessSubSampleDO>()
.leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, BusinessSubSampleDO::getDictionaryBusinessId) .leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, BusinessSubSampleDO::getDictionaryBusinessId)
@@ -216,9 +237,13 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
.selectAs(ConfigSubSampleDO::getPrintTemplate, BusinessSubSampleExtendRespVO::getPrintTemplate) .selectAs(ConfigSubSampleDO::getPrintTemplate, BusinessSubSampleExtendRespVO::getPrintTemplate)
.eqIfPresent(BusinessSubSampleDO::getSampleCode, reqVO.getSampleCode()) .eqIfPresent(BusinessSubSampleDO::getSampleCode, reqVO.getSampleCode())
.eqIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey()) .eqIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey())
.inIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKeyList())
.eqIfPresent(BusinessSubSampleDO::getSampleStatus, QmsCommonConstant.NORMAL) .eqIfPresent(BusinessSubSampleDO::getSampleStatus, QmsCommonConstant.NORMAL)
.eqIfPresent(BusinessSubSampleDO::getIsEnabled, QmsCommonConstant.YES) .eqIfPresent(BusinessSubSampleDO::getIsEnabled, QmsCommonConstant.YES)
.orderByDesc(BusinessSubSampleDO::getId)); .orderByDesc(BusinessSubSampleDO::getId));
} }
Page<BusinessSubSampleExtendRespVO> selectPageForDispatch(IPage<?> page, @Param("param") BusinessSubSamplePageReqVO reqVO);
} }

View File

@@ -6,6 +6,8 @@ import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils;
import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.yomahub.liteflow.annotation.LiteflowComponent; import com.yomahub.liteflow.annotation.LiteflowComponent;
@@ -44,6 +46,8 @@ import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleAssessmen
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
import com.zt.plat.module.qms.business.bus.liteflow.param.SampleFlowInfo; import com.zt.plat.module.qms.business.bus.liteflow.param.SampleFlowInfo;
import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleEntrustContext; import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleEntrustContext;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfAdd;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfInfo;
import com.zt.plat.module.qms.business.config.dal.dataobject.BaseSampleDO; import com.zt.plat.module.qms.business.config.dal.dataobject.BaseSampleDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO; import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO; import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO;
@@ -179,23 +183,23 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
List<BusinessSampleAssayResultDO> sampleAssayResultList = sampleEntrustContext.getSampleAssayResultList(); List<BusinessSampleAssayResultDO> sampleAssayResultList = sampleEntrustContext.getSampleAssayResultList();
//金银检测项目字典id列表 //金银检测项目字典id列表
List<Long> auAgDictionaryProjectIdList = new ArrayList<>() { // List<Long> auAgDictionaryProjectIdList = new ArrayList<>() {
private static final long serialVersionUID = 1L; // private static final long serialVersionUID = 1L;
//
{ // {
add(1000000000000000002L); // add(1000000000000000002L);
add(1000000000000000003L); // add(1000000000000000003L);
}}; // }};
//硫的检测项目字典id //硫的检测项目字典id
Long sDictionaryProjectId = 1000000000000000004L; // Long sDictionaryProjectId = 1000000000000000004L;
//商检样品来源id //商检样品来源id
List<Long> sjEntrustSourceIdList = new ArrayList<>() { // List<Long> sjEntrustSourceIdList = new ArrayList<>() {
private static final long serialVersionUID = 1L; // private static final long serialVersionUID = 1L;
//
{ // {
add(1000000000000000002L);//中铜国贸 // add(1000000000000000002L);//中铜国贸
}}; // }};
//样品大类列表 //样品大类列表
List<BaseSampleDO> baseSampleList = baseSampleMapper.selectList(); List<BaseSampleDO> baseSampleList = baseSampleMapper.selectList();
@@ -250,11 +254,11 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
List<BusinessAssayReportDataDO> businessAssayReportDataDOList = new ArrayList<>(); List<BusinessAssayReportDataDO> businessAssayReportDataDOList = new ArrayList<>();
//是否为商检委托 //是否为商检委托
Boolean isSjEntrust = sjEntrustSourceIdList.contains(sampleEntrustRegistration.getConfigEntrustSourceId()); // Boolean isSjEntrust = sjEntrustSourceIdList.contains(sampleEntrustRegistration.getConfigEntrustSourceId());
//是否分析金银 //是否分析金银
Boolean isAssayAuAg = sampleEntrustProjectList.stream().anyMatch(f -> auAgDictionaryProjectIdList.contains(f.getDictionaryProjectId())); // Boolean isAssayAuAg = sampleEntrustProjectList.stream().anyMatch(f -> auAgDictionaryProjectIdList.contains(f.getDictionaryProjectId()));
//是否分析硫 //是否分析硫
Boolean isAssayS = sampleEntrustProjectList.stream().anyMatch(f -> f.getDictionaryProjectId().equals(sDictionaryProjectId)); // Boolean isAssayS = sampleEntrustProjectList.stream().anyMatch(f -> f.getDictionaryProjectId().equals(sDictionaryProjectId));
//子样流转信息列表 //子样流转信息列表
List<SampleFlowInfo> sampleFlowInfoList = new ArrayList<>(); List<SampleFlowInfo> sampleFlowInfoList = new ArrayList<>();
@@ -295,26 +299,26 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
//是否创建综合样S分析 //是否创建综合样S分析
Boolean isCreateZhy = false; // Boolean isCreateZhy = false;
//综合样分析方法 //综合样分析方法
ConfigAssayMethodDO configAssayMethodZhy = null; // ConfigAssayMethodDO configAssayMethodZhy = null;
//是商检样品,分析金银,第一个样品 //是商检样品,分析金银,第一个样品
if (isSjEntrust && isAssayAuAg && sort == 0) { // if (isSjEntrust && isAssayAuAg && sort == 0) {
//是否分析硫 //是否分析硫
isAssayS = dictionaryProjectIdList.contains(sDictionaryProjectId); // isAssayS = dictionaryProjectIdList.contains(sDictionaryProjectId);
if (isAssayS) { // if (isAssayS) {
isCreateZhy = false; // isCreateZhy = false;
} else { // } else {
isCreateZhy = true; // isCreateZhy = true;
MaterialAssayStandardMethodDO materialAssayStandardMethodDO = materialAssayStandardMethodMapper.selectByBaseSampleIdAndDictionaryProjectId(businessSampleEntrustDetailDO.getBaseSampleId(), sDictionaryProjectId); // MaterialAssayStandardMethodDO materialAssayStandardMethodDO = materialAssayStandardMethodMapper.selectByBaseSampleIdAndDictionaryProjectId(businessSampleEntrustDetailDO.getBaseSampleId(), sDictionaryProjectId);
if (materialAssayStandardMethodDO == null) { // if (materialAssayStandardMethodDO == null) {
throw new ServiceException(1_032_100_000, "商检样品检测项目存在金银但未找到S配置"); // throw new ServiceException(1_032_100_000, "商检样品检测项目存在金银但未找到S配置");
} // }
configAssayMethodZhy = configAssayMethodMapper.selectById(materialAssayStandardMethodDO.getConfigAssayMethodId()); // configAssayMethodZhy = configAssayMethodMapper.selectById(materialAssayStandardMethodDO.getConfigAssayMethodId());
} // }
//
} // }
@@ -440,6 +444,140 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
//查询子样对应的分析方法 //查询子样对应的分析方法
ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodList.stream().filter(f -> f.getIsDefaultUse().equals(QmsCommonConstant.YES) && f.getConfigAssayMethodId().equals(configAssayMethodId) && f.getConfigSubSampleId().equals(configSubSample.getId())).findFirst().orElse(null); ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodList.stream().filter(f -> f.getIsDefaultUse().equals(QmsCommonConstant.YES) && f.getConfigAssayMethodId().equals(configAssayMethodId) && f.getConfigSubSampleId().equals(configSubSample.getId())).findFirst().orElse(null);
//扩展配置信息
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
if (StringUtils.isNotBlank(configInfomation)) {
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
ConfigSubSampleMethodConfAdd addAssayTask = configSubSampleMethodConfInfo.getAddAssayTask();
if (addAssayTask != null) {//需要添加任务
List<Long> conditionProjectIdList = addAssayTask.getConditionProjectIdList();
Long methodId = addAssayTask.getMethodId();
List<Long> projectIdList = addAssayTask.getProjectIdList();
//判定检测项目包含条件中的检测项目
Boolean isAssayConditionProjectList = sampleEntrustProjectList.stream().anyMatch(f -> conditionProjectIdList.contains(f.getDictionaryProjectId()));
if (isAssayConditionProjectList && sort == 0) {
ConfigAssayMethodDO addAssayTaskConfigAssayMethod = configAssayMethodMapper.selectById(methodId);
Long addAssayTaskAssayDepartmentId = addAssayTaskConfigAssayMethod.getAssayDepartmentId();
//查询子样对应的分析方法
ConfigSubSampleMethodDO addAssayTaskConfigSubSampleMethodDO = configSubSampleMethodList.stream().filter(f -> f.getIsDefaultUse().equals(QmsCommonConstant.YES) && f.getConfigAssayMethodId().equals(methodId) && f.getConfigSubSampleId().equals(configSubSample.getId())).findFirst().orElse(null);
businessSubSampleAnalysisGroupDO = businessSubSampleAnalysisGroupDOList.stream().filter(f -> f.getBusinessSubSampleId().equals(businessSubSampleDO.getId()) && f.getAssayDepartmentId().equals(addAssayTaskAssayDepartmentId)).findFirst().orElse(null);
if (businessSubSampleAnalysisGroupDO == null) {
businessSubSampleAnalysisGroupDO = new BusinessSubSampleAnalysisGroupDO();
businessSubSampleAnalysisGroupDO.setId(IdWorker.getId());
businessSubSampleAnalysisGroupDO.setBusinessBaseSampleId(businessSubSampleDO.getBusinessBaseSampleId());
businessSubSampleAnalysisGroupDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId());
businessSubSampleAnalysisGroupDO.setBusinessSubSampleId(businessSubSampleDO.getId());
businessSubSampleAnalysisGroupDO.setAssayDepartmentId(addAssayTaskConfigAssayMethod.getAssayDepartmentId());
businessSubSampleAnalysisGroupDO.setAssayDepartmentName(addAssayTaskConfigAssayMethod.getAssayDepartmentName());
businessSubSampleAnalysisGroupDO.setSampleStatus("待收样");
businessSubSampleAnalysisGroupDOList.add(businessSubSampleAnalysisGroupDO);
}
//根据任务数判断是平行还是
String assayType = addAssayTaskConfigSubSampleMethodDO.getTaskCount() > 1 ? QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL : QmsCommonConstant.ASSAY_TYPE_SINGLE_CUP;
//分样判定数据
BusinessSubParentSampleAssessmentDO businessSubParentSampleAssessmentDO = new BusinessSubParentSampleAssessmentDO();
businessSubParentSampleAssessmentDO.setId(IdWorker.getId());
businessSubParentSampleAssessmentDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId());
businessSubParentSampleAssessmentDO.setConfigAssayMethodId(addAssayTaskConfigAssayMethod.getId());
businessSubParentSampleAssessmentDO.setAssayType(assayType);
businessSubParentSampleAssessmentDO.setTaskType("常规");
businessSubParentSampleAssessmentDOList.add(businessSubParentSampleAssessmentDO);
//子样判定数据
BusinessSubSampleAssessmentDO businessSubSampleAssessmentDO = new BusinessSubSampleAssessmentDO();
businessSubSampleAssessmentDO.setId(IdWorker.getId());
businessSubSampleAssessmentDO.setBusinessBaseSampleId(businessSubSampleDO.getBusinessBaseSampleId());
businessSubSampleAssessmentDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId());
businessSubSampleAssessmentDO.setBusinessSubParentSampleAssessmentId(businessSubParentSampleAssessmentDO.getId());
businessSubSampleAssessmentDO.setBusinessSubSampleId(businessSubSampleDO.getId());
businessSubSampleAssessmentDO.setConfigAssayMethodId(addAssayTaskConfigAssayMethod.getId());
businessSubSampleAssessmentDO.setAssayType(assayType);
businessSubSampleAssessmentDO.setTaskType("常规");
businessSubSampleAssessmentDOList.add(businessSubSampleAssessmentDO);
//根据检测方法循环
BusinessAssayTaskDataDO businessAssayTaskDataDO = null;
//根据任务数循环
for (int i = 0; i < addAssayTaskConfigSubSampleMethodDO.getTaskCount(); i++) {
//子样检测任务
businessAssayTaskDataDO = new BusinessAssayTaskDataDO();
businessAssayTaskDataDO.setId(IdWorker.getId());
businessAssayTaskDataDO.setBusinessBaseSampleId(businessSubSampleDO.getBusinessBaseSampleId());
businessAssayTaskDataDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId());
businessAssayTaskDataDO.setBusinessSubSampleId(businessSubSampleDO.getId());
businessAssayTaskDataDO.setBusinessSubSampleAssessmentId(businessSubSampleAssessmentDO.getId());//子样判定id
businessAssayTaskDataDO.setConfigAssayMethodId(addAssayTaskConfigAssayMethod.getId());
businessAssayTaskDataDO.setAssayType(assayType);
businessAssayTaskDataDO.setTaskType("常规");
businessAssayTaskDataDO.setConfigSampleFlowId(configSampleFlowSub.getId());
businessAssayTaskDataDO.setSampleFlowNodeKey(sampleFlowNodeSub.getNodeKey());
businessAssayTaskDataDO.setSampleFlowNodeTime(currentDateTime);
businessAssayTaskDataDO.setAssayDepartmentId(addAssayTaskConfigAssayMethod.getAssayDepartmentId());
businessAssayTaskDataDO.setAssayDepartmentName(addAssayTaskConfigAssayMethod.getAssayDepartmentName());
List<ConfigAssayMethodProjectDO> configAssayMethodProjectDOList = configAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(methodId)).collect(Collectors.toList());
StringBuilder assayProjectBuilder = new StringBuilder();
for (ConfigAssayMethodProjectDO configAssayMethodProjectDO : configAssayMethodProjectDOList) {
//如果当前分析方法的项目不在当前检测项目中,则跳出循环继续
if (!projectIdList.contains(configAssayMethodProjectDO.getDictionaryProjectId())) {
continue;
}
DictionaryProjectDO dictionaryProject = dictionaryProjectList.stream().filter(f -> f.getId().equals(configAssayMethodProjectDO.getDictionaryProjectId())).findFirst().orElse(null);
assayProjectBuilder.append(dictionaryProject.getShowName()).append(",");
//检测项目
BusinessAssayProjectDataDO businessAssayProjectDataDO = new BusinessAssayProjectDataDO();
businessAssayProjectDataDO.setId(IdWorker.getId());
businessAssayProjectDataDO.setBusinessAssayTaskDataId(businessAssayTaskDataDO.getId());
businessAssayProjectDataDO.setConfigAssayMethodProjectId(configAssayMethodProjectDO.getId());
businessAssayProjectDataDO.setDictionaryProjectId(configAssayMethodProjectDO.getDictionaryProjectId());
businessAssayProjectDataDO.setDataType(configAssayMethodProjectDO.getDataType());
businessAssayProjectDataDO.setDecimalPosition(configAssayMethodProjectDO.getDecimalPosition());
businessAssayProjectDataDO.setUsage(QmsCommonConstant.ASSAY_PROJECT_USAGE_INGREDIENT);
businessAssayProjectDataDO.setMinimumLimitValue(configAssayMethodProjectDO.getMinimumLimitValue());
businessAssayProjectDataDO.setIsEnabled(1);
businessAssayProjectDataDO.setIsNotAssessment(0);
businessAssayProjectDataDOList.add(businessAssayProjectDataDO);
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterDOList = configAssayMethodProjectParameterList.stream().filter(f -> f.getConfigAssayMethodProjectId().equals(configAssayMethodProjectDO.getId())).collect(Collectors.toList());
for (ConfigAssayMethodProjectParameterDO configAssayMethodProjectParameterDO : configAssayMethodProjectParameterDOList) {
BusinessAssayParameterDataDO businessAssayParameterDataDO = new BusinessAssayParameterDataDO();
businessAssayParameterDataDO.setId(IdWorker.getId());
businessAssayParameterDataDO.setConfigAssayMethodProjectParameterId(configAssayMethodProjectParameterDO.getId());
businessAssayParameterDataDO.setBusinessAssayProjectDataId(businessAssayProjectDataDO.getId());
businessAssayParameterDataDO.setDictionaryParameterId(configAssayMethodProjectParameterDO.getDictionaryParameterId());
businessAssayParameterDataDO.setDataType(configAssayMethodProjectParameterDO.getDataType());
businessAssayParameterDataDO.setDecimalPosition(configAssayMethodProjectParameterDO.getDecimalPosition());
businessAssayParameterDataDOList.add(businessAssayParameterDataDO);
}
}
assayProjectBuilder.delete(assayProjectBuilder.length() - 1 , assayProjectBuilder.length());
businessAssayTaskDataDO.setAssayProject(assayProjectBuilder.toString());
businessAssayTaskDataDOList.add(businessAssayTaskDataDO);
}
}
}
}
businessSubSampleAnalysisGroupDO = businessSubSampleAnalysisGroupDOList.stream().filter(f -> f.getBusinessSubSampleId().equals(businessSubSampleDO.getId()) && f.getAssayDepartmentId().equals(configAssayMethodDO.getAssayDepartmentId())).findFirst().orElse(null); businessSubSampleAnalysisGroupDO = businessSubSampleAnalysisGroupDOList.stream().filter(f -> f.getBusinessSubSampleId().equals(businessSubSampleDO.getId()) && f.getAssayDepartmentId().equals(configAssayMethodDO.getAssayDepartmentId())).findFirst().orElse(null);
if (businessSubSampleAnalysisGroupDO == null) { if (businessSubSampleAnalysisGroupDO == null) {
businessSubSampleAnalysisGroupDO = new BusinessSubSampleAnalysisGroupDO(); businessSubSampleAnalysisGroupDO = new BusinessSubSampleAnalysisGroupDO();
@@ -523,9 +661,9 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
businessAssayProjectDataDO.setDataType(configAssayMethodProjectDO.getDataType()); businessAssayProjectDataDO.setDataType(configAssayMethodProjectDO.getDataType());
businessAssayProjectDataDO.setDecimalPosition(configAssayMethodProjectDO.getDecimalPosition()); businessAssayProjectDataDO.setDecimalPosition(configAssayMethodProjectDO.getDecimalPosition());
businessAssayProjectDataDO.setUsage(QmsCommonConstant.ASSAY_PROJECT_USAGE_REPORT); businessAssayProjectDataDO.setUsage(QmsCommonConstant.ASSAY_PROJECT_USAGE_REPORT);
if (isSjEntrust && isAssayAuAg && sort == 0 && !isCreateZhy && sDictionaryProjectId.equals(configAssayMethodProjectDO.getDictionaryProjectId())) {//是商检样品分析金银第一个样品不创建综合样并且是S值 // if (isSjEntrust && isAssayAuAg && sort == 0 && !isCreateZhy && sDictionaryProjectId.equals(configAssayMethodProjectDO.getDictionaryProjectId())) {//是商检样品分析金银第一个样品不创建综合样并且是S值
businessAssayProjectDataDO.setUsage(QmsCommonConstant.ASSAY_PROJECT_USAGE_INGREDIENT_REPORT); // businessAssayProjectDataDO.setUsage(QmsCommonConstant.ASSAY_PROJECT_USAGE_INGREDIENT_REPORT);
} // }
businessAssayProjectDataDO.setMinimumLimitValue(configAssayMethodProjectDO.getMinimumLimitValue()); businessAssayProjectDataDO.setMinimumLimitValue(configAssayMethodProjectDO.getMinimumLimitValue());
businessAssayProjectDataDO.setIsEnabled(1); businessAssayProjectDataDO.setIsEnabled(1);
@@ -556,6 +694,7 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
} }
/**
//判定是商检 分析金银 需要创建综合样样品为第1个 //判定是商检 分析金银 需要创建综合样样品为第1个
if (isSjEntrust && isAssayAuAg && sort == 0 && isCreateZhy && configAssayMethodZhy != null) { if (isSjEntrust && isAssayAuAg && sort == 0 && isCreateZhy && configAssayMethodZhy != null) {
Long configAssayMethodIdZhy = configAssayMethodZhy.getId(); Long configAssayMethodIdZhy = configAssayMethodZhy.getId();
@@ -581,10 +720,21 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
//根据任务数判断是平行还是 //根据任务数判断是平行还是
String assayType = configSubSampleMethodDO.getTaskCount() > 1 ? QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL : QmsCommonConstant.ASSAY_TYPE_SINGLE_CUP; String assayType = configSubSampleMethodDO.getTaskCount() > 1 ? QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL : QmsCommonConstant.ASSAY_TYPE_SINGLE_CUP;
//分样判定数据
BusinessSubParentSampleAssessmentDO businessSubParentSampleAssessmentDO = new BusinessSubParentSampleAssessmentDO();
businessSubParentSampleAssessmentDO.setId(IdWorker.getId());
businessSubParentSampleAssessmentDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId());
businessSubParentSampleAssessmentDO.setConfigAssayMethodId(configAssayMethodZhy.getId());
businessSubParentSampleAssessmentDO.setAssayType(assayType);
businessSubParentSampleAssessmentDO.setTaskType("常规");
businessSubParentSampleAssessmentDOList.add(businessSubParentSampleAssessmentDO);
//子样判定数据
BusinessSubSampleAssessmentDO businessSubSampleAssessmentDO = new BusinessSubSampleAssessmentDO(); BusinessSubSampleAssessmentDO businessSubSampleAssessmentDO = new BusinessSubSampleAssessmentDO();
businessSubSampleAssessmentDO.setId(IdWorker.getId()); businessSubSampleAssessmentDO.setId(IdWorker.getId());
businessSubSampleAssessmentDO.setBusinessBaseSampleId(businessSubSampleDO.getBusinessBaseSampleId()); businessSubSampleAssessmentDO.setBusinessBaseSampleId(businessSubSampleDO.getBusinessBaseSampleId());
businessSubSampleAssessmentDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId()); businessSubSampleAssessmentDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId());
businessSubSampleAssessmentDO.setBusinessSubParentSampleAssessmentId(businessSubParentSampleAssessmentDO.getId());
businessSubSampleAssessmentDO.setBusinessSubSampleId(businessSubSampleDO.getId()); businessSubSampleAssessmentDO.setBusinessSubSampleId(businessSubSampleDO.getId());
businessSubSampleAssessmentDO.setConfigAssayMethodId(configAssayMethodZhy.getId()); businessSubSampleAssessmentDO.setConfigAssayMethodId(configAssayMethodZhy.getId());
businessSubSampleAssessmentDO.setAssayType(assayType); businessSubSampleAssessmentDO.setAssayType(assayType);
@@ -651,6 +801,7 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
businessAssayTaskDataDOList.add(businessAssayTaskDataDO); businessAssayTaskDataDOList.add(businessAssayTaskDataDO);
} }
} }
**/
sort++; sort++;
} }
@@ -669,43 +820,33 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
businessSampleAssayResultMapper.updateBatch(sampleAssayResultList); businessSampleAssayResultMapper.updateBatch(sampleAssayResultList);
} }
if (CollUtil.isNotEmpty(businessBaseSampleDOList)) { if (CollUtil.isNotEmpty(businessBaseSampleDOList)) {
log.info("插入 businessBaseSampleDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessBaseSampleMapper.insertBatch(businessBaseSampleDOList); businessBaseSampleMapper.insertBatch(businessBaseSampleDOList);
} }
if (CollUtil.isNotEmpty(businessSubParentSampleDOList)) { if (CollUtil.isNotEmpty(businessSubParentSampleDOList)) {
log.info("插入 businessSubParentSampleDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessSubParentSampleMapper.insertBatch(businessSubParentSampleDOList); businessSubParentSampleMapper.insertBatch(businessSubParentSampleDOList);
} }
if (CollUtil.isNotEmpty(businessSubParentSampleAssessmentDOList)) { if (CollUtil.isNotEmpty(businessSubParentSampleAssessmentDOList)) {
log.info("插入 businessSubParentSampleAssessmentDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessSubParentSampleAssessmentMapper.insertBatch(businessSubParentSampleAssessmentDOList); businessSubParentSampleAssessmentMapper.insertBatch(businessSubParentSampleAssessmentDOList);
} }
if (CollUtil.isNotEmpty(businessSubSampleDOList)) { if (CollUtil.isNotEmpty(businessSubSampleDOList)) {
log.info("插入 businessSubSampleDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessSubSampleMapper.insertBatch(businessSubSampleDOList); businessSubSampleMapper.insertBatch(businessSubSampleDOList);
} }
if (CollUtil.isNotEmpty(businessSubSampleAnalysisGroupDOList)) { if (CollUtil.isNotEmpty(businessSubSampleAnalysisGroupDOList)) {
log.info("插入 businessSubSampleAnalysisGroupDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessSubSampleAnalysisGroupMapper.insertBatch(businessSubSampleAnalysisGroupDOList); businessSubSampleAnalysisGroupMapper.insertBatch(businessSubSampleAnalysisGroupDOList);
} }
if (CollUtil.isNotEmpty(businessSubSampleAssessmentDOList)) { if (CollUtil.isNotEmpty(businessSubSampleAssessmentDOList)) {
log.info("插入 businessSubSampleAssessmentDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessSubSampleAssessmentMapper.insertBatch(businessSubSampleAssessmentDOList); businessSubSampleAssessmentMapper.insertBatch(businessSubSampleAssessmentDOList);
} }
if (CollUtil.isNotEmpty(businessAssayTaskDataDOList)) { if (CollUtil.isNotEmpty(businessAssayTaskDataDOList)) {
log.info("插入 businessAssayTaskDataDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessAssayTaskDataMapper.insertBatch(businessAssayTaskDataDOList); businessAssayTaskDataMapper.insertBatch(businessAssayTaskDataDOList);
} }
if (CollUtil.isNotEmpty(businessAssayProjectDataDOList)) { if (CollUtil.isNotEmpty(businessAssayProjectDataDOList)) {
log.info("插入 businessAssayProjectDataDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessAssayProjectDataMapper.insertBatch(businessAssayProjectDataDOList); businessAssayProjectDataMapper.insertBatch(businessAssayProjectDataDOList);
} }
if (CollUtil.isNotEmpty(businessAssayParameterDataDOList)) { if (CollUtil.isNotEmpty(businessAssayParameterDataDOList)) {
log.info("插入 businessAssayParameterDataDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessAssayParameterDataMapper.insertBatch(businessAssayParameterDataDOList); businessAssayParameterDataMapper.insertBatch(businessAssayParameterDataDOList);
} }
if (CollUtil.isNotEmpty(businessAssayReportDataDOList)) { if (CollUtil.isNotEmpty(businessAssayReportDataDOList)) {
log.info("插入 businessAssayReportDataDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessAssayReportDataMapper.insertBatch(businessAssayReportDataDOList); businessAssayReportDataMapper.insertBatch(businessAssayReportDataDOList);
} }
} }

View File

@@ -29,6 +29,7 @@ public class SampleSimpleEncryptCmp extends NodeComponent {
String simpleCode = sequenceUtil.genCode(simpleCodeRule); String simpleCode = sequenceUtil.genCode(simpleCodeRule);
businessSubSampleDO.setSampleAssayCode(simpleCode); businessSubSampleDO.setSampleAssayCode(simpleCode);
businessSubSampleDO.setSampleReturnCode(simpleCode); businessSubSampleDO.setSampleReturnCode(simpleCode);
businessSubSampleDO.setIsGenerateReturnCode(QmsCommonConstant.YES);
} }
} }

View File

@@ -9,6 +9,7 @@ import java.util.stream.Collectors;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.yomahub.liteflow.annotation.LiteflowComponent; import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent; import com.yomahub.liteflow.core.NodeComponent;
import com.zt.plat.framework.security.core.LoginUser;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO;
@@ -53,6 +54,7 @@ public class SampleTaskAssignManualCmp extends NodeComponent {
public void process() throws Exception { public void process() throws Exception {
SampleTaskAssignContext sampleTaskAssignContext = this.getContextBean(SampleTaskAssignContext.class); SampleTaskAssignContext sampleTaskAssignContext = this.getContextBean(SampleTaskAssignContext.class);
String loginRealname = sampleTaskAssignContext.getLoginRealname(); String loginRealname = sampleTaskAssignContext.getLoginRealname();
LoginUser loginUser = sampleTaskAssignContext.getLoginUser();
LocalDateTime currentDateTime = sampleTaskAssignContext.getCurrentDateTime(); LocalDateTime currentDateTime = sampleTaskAssignContext.getCurrentDateTime();
AssignAssayUser assignAssayUser = sampleTaskAssignContext.getAssignAssayUser(); AssignAssayUser assignAssayUser = sampleTaskAssignContext.getAssignAssayUser();
List<Long> assayTaskDataIdList = sampleTaskAssignContext.getAssayTaskDataIdList(); List<Long> assayTaskDataIdList = sampleTaskAssignContext.getAssayTaskDataIdList();
@@ -91,12 +93,14 @@ public class SampleTaskAssignManualCmp extends NodeComponent {
businessAssayTaskDO.setTaskNo(taskNo); businessAssayTaskDO.setTaskNo(taskNo);
businessAssayTaskDO.setTaskName(configAssayMethod.getName()); businessAssayTaskDO.setTaskName(configAssayMethod.getName());
businessAssayTaskDO.setAssayOperator(assignAssayUser.getRealName()); businessAssayTaskDO.setAssayOperator(assignAssayUser.getRealName());
businessAssayTaskDO.setAssayOperatorId(assignAssayUser.getUserId());
businessAssayTaskDO.setConfigAssayMethodId(key); businessAssayTaskDO.setConfigAssayMethodId(key);
businessAssayTaskDO.setTaskSourceType(QmsCommonConstant.TASK_ASSIGN); businessAssayTaskDO.setTaskSourceType(QmsCommonConstant.TASK_ASSIGN);
businessAssayTaskDO.setConfigReportTemplateId(configReportTemplate.getId()); businessAssayTaskDO.setConfigReportTemplateId(configReportTemplate.getId());
businessAssayTaskDO.setConfigReportTemplateKey(configReportTemplate.getKey()); businessAssayTaskDO.setConfigReportTemplateKey(configReportTemplate.getKey());
businessAssayTaskDO.setTaskAssignOperator(loginRealname); businessAssayTaskDO.setTaskAssignOperator(loginRealname);
businessAssayTaskDO.setTaskAssignOperatorId(loginUser.getId());
businessAssayTaskDO.setTaskAssignTime(currentDateTime); businessAssayTaskDO.setTaskAssignTime(currentDateTime);
businessAssayTaskDO.setTaskAssignStatus(QmsCommonConstant.IN_PROGRESS); businessAssayTaskDO.setTaskAssignStatus(QmsCommonConstant.IN_PROGRESS);
businessAssayTaskDO.setTaskAssayStatus(QmsCommonConstant.NOT_START); businessAssayTaskDO.setTaskAssayStatus(QmsCommonConstant.NOT_START);
@@ -116,6 +120,7 @@ public class SampleTaskAssignManualCmp extends NodeComponent {
val.setIsAssignTasked(QmsCommonConstant.YES); val.setIsAssignTasked(QmsCommonConstant.YES);
val.setAssignTaskTime(currentDateTime); val.setAssignTaskTime(currentDateTime);
val.setAssayOperator(assignAssayUser.getRealName()); val.setAssayOperator(assignAssayUser.getRealName());
val.setAssayOperatorId(assignAssayUser.getUserId());
val.setBusinessAssayTaskId(businessAssayTaskDO.getId()); val.setBusinessAssayTaskId(businessAssayTaskDO.getId());
BusinessSubSampleDO businessSubSampleDO = sampleTaskAssignContext.getBusinessSubSampleById(val.getBusinessSubSampleId()); BusinessSubSampleDO businessSubSampleDO = sampleTaskAssignContext.getBusinessSubSampleById(val.getBusinessSubSampleId());

View File

@@ -11,6 +11,7 @@ import com.yomahub.liteflow.core.NodeComponent;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX; import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.framework.security.core.LoginUser;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO;
@@ -54,6 +55,7 @@ public class SampleTaskAssignMethodCmp extends NodeComponent {
public void process() throws Exception { public void process() throws Exception {
SampleTaskAssignContext sampleTaskAssignContext = this.getContextBean(SampleTaskAssignContext.class); SampleTaskAssignContext sampleTaskAssignContext = this.getContextBean(SampleTaskAssignContext.class);
String loginRealname = sampleTaskAssignContext.getLoginRealname(); String loginRealname = sampleTaskAssignContext.getLoginRealname();
LoginUser loginUser = sampleTaskAssignContext.getLoginUser();
LocalDateTime currentDateTime = sampleTaskAssignContext.getCurrentDateTime(); LocalDateTime currentDateTime = sampleTaskAssignContext.getCurrentDateTime();
Long assignConfigAssayMethodId = sampleTaskAssignContext.getAssignConfigAssayMethodId(); Long assignConfigAssayMethodId = sampleTaskAssignContext.getAssignConfigAssayMethodId();
List<AssignAssayUser> assignAssayUserList = sampleTaskAssignContext.getAssignAssayUserList(); List<AssignAssayUser> assignAssayUserList = sampleTaskAssignContext.getAssignAssayUserList();
@@ -100,8 +102,10 @@ public class SampleTaskAssignMethodCmp extends NodeComponent {
businessAssayTaskDO.setConfigReportTemplateId(configReportTemplate.getId()); businessAssayTaskDO.setConfigReportTemplateId(configReportTemplate.getId());
businessAssayTaskDO.setConfigReportTemplateKey(configReportTemplate.getKey()); businessAssayTaskDO.setConfigReportTemplateKey(configReportTemplate.getKey());
businessAssayTaskDO.setAssayOperator(assignAssayUser.getRealName()); businessAssayTaskDO.setAssayOperator(assignAssayUser.getRealName());
businessAssayTaskDO.setAssayOperatorId(assignAssayUser.getUserId());
businessAssayTaskDO.setTaskAssignOperator(loginRealname); businessAssayTaskDO.setTaskAssignOperator(loginRealname);
businessAssayTaskDO.setTaskAssignOperatorId(loginUser.getId());
businessAssayTaskDO.setTaskAssignTime(currentDateTime); businessAssayTaskDO.setTaskAssignTime(currentDateTime);
businessAssayTaskDO.setTaskAssignStatus(QmsCommonConstant.IN_PROGRESS); businessAssayTaskDO.setTaskAssignStatus(QmsCommonConstant.IN_PROGRESS);
businessAssayTaskDO.setTaskAssayStatus(QmsCommonConstant.NOT_START); businessAssayTaskDO.setTaskAssayStatus(QmsCommonConstant.NOT_START);
@@ -120,6 +124,7 @@ public class SampleTaskAssignMethodCmp extends NodeComponent {
businessAssayTaskDataDO.setIsAssignTasked(QmsCommonConstant.YES); businessAssayTaskDataDO.setIsAssignTasked(QmsCommonConstant.YES);
businessAssayTaskDataDO.setAssignTaskTime(currentDateTime); businessAssayTaskDataDO.setAssignTaskTime(currentDateTime);
businessAssayTaskDataDO.setAssayOperator(assignAssayUser.getRealName()); businessAssayTaskDataDO.setAssayOperator(assignAssayUser.getRealName());
businessAssayTaskDataDO.setAssayOperatorId(assignAssayUser.getUserId());
businessAssayTaskDataDO.setBusinessAssayTaskId(businessAssayTaskDO.getId()); businessAssayTaskDataDO.setBusinessAssayTaskId(businessAssayTaskDO.getId());
BusinessSubSampleDO businessSubSampleDO = sampleTaskAssignContext.getBusinessSubSampleById(businessAssayTaskDataDO.getBusinessSubSampleId()); BusinessSubSampleDO businessSubSampleDO = sampleTaskAssignContext.getBusinessSubSampleById(businessAssayTaskDataDO.getBusinessSubSampleId());

View File

@@ -118,6 +118,7 @@ public class SampleTaskAssignQCSampleCmp extends NodeComponent {
businessQCCoefficientDataDO.setAssayDepartmentId(configAssayMethodDO.getAssayDepartmentId()); businessQCCoefficientDataDO.setAssayDepartmentId(configAssayMethodDO.getAssayDepartmentId());
businessQCCoefficientDataDO.setAssayDepartmentName(configAssayMethodDO.getAssayDepartmentName()); businessQCCoefficientDataDO.setAssayDepartmentName(configAssayMethodDO.getAssayDepartmentName());
businessQCCoefficientDataDO.setAssayOperator(businessAssayTaskDO.getAssayOperator()); businessQCCoefficientDataDO.setAssayOperator(businessAssayTaskDO.getAssayOperator());
businessQCCoefficientDataDO.setAssayOperatorId(businessAssayTaskDO.getAssayOperatorId());
businessQCCoefficientDataDO.setAssayProject(""); businessQCCoefficientDataDO.setAssayProject("");
businessQCCoefficientDataDO.setAssignTaskTime(businessAssayTaskDO.getTaskAssignTime()); businessQCCoefficientDataDO.setAssignTaskTime(businessAssayTaskDO.getTaskAssignTime());
businessQCCoefficientDataDO.setIsAssignTasked(QmsCommonConstant.YES); businessQCCoefficientDataDO.setIsAssignTasked(QmsCommonConstant.YES);

View File

@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.yomahub.liteflow.annotation.LiteflowComponent; import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent; import com.yomahub.liteflow.core.NodeComponent;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX; import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.framework.security.core.LoginUser;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO;
@@ -53,6 +54,7 @@ public class SampleTaskAssignSampleCmp extends NodeComponent {
public void process() throws Exception { public void process() throws Exception {
SampleTaskAssignContext sampleTaskAssignContext = this.getContextBean(SampleTaskAssignContext.class); SampleTaskAssignContext sampleTaskAssignContext = this.getContextBean(SampleTaskAssignContext.class);
String loginRealname = sampleTaskAssignContext.getLoginRealname(); String loginRealname = sampleTaskAssignContext.getLoginRealname();
LoginUser loginUser = sampleTaskAssignContext.getLoginUser();
LocalDateTime currentDateTime = sampleTaskAssignContext.getCurrentDateTime(); LocalDateTime currentDateTime = sampleTaskAssignContext.getCurrentDateTime();
AssignAssayUser assignAssayUser = sampleTaskAssignContext.getAssignAssayUser(); AssignAssayUser assignAssayUser = sampleTaskAssignContext.getAssignAssayUser();
List<Long> assignSampleIdList = sampleTaskAssignContext.getAssignSampleIdList(); List<Long> assignSampleIdList = sampleTaskAssignContext.getAssignSampleIdList();
@@ -91,12 +93,14 @@ public class SampleTaskAssignSampleCmp extends NodeComponent {
businessAssayTaskDO.setTaskNo(taskNo); businessAssayTaskDO.setTaskNo(taskNo);
businessAssayTaskDO.setTaskName(configAssayMethod.getName()); businessAssayTaskDO.setTaskName(configAssayMethod.getName());
businessAssayTaskDO.setAssayOperator(assignAssayUser.getRealName()); businessAssayTaskDO.setAssayOperator(assignAssayUser.getRealName());
businessAssayTaskDO.setAssayOperatorId(assignAssayUser.getUserId());
businessAssayTaskDO.setConfigAssayMethodId(key); businessAssayTaskDO.setConfigAssayMethodId(key);
businessAssayTaskDO.setTaskSourceType(QmsCommonConstant.TASK_ASSIGN); businessAssayTaskDO.setTaskSourceType(QmsCommonConstant.TASK_ASSIGN);
businessAssayTaskDO.setConfigReportTemplateId(configReportTemplate.getId()); businessAssayTaskDO.setConfigReportTemplateId(configReportTemplate.getId());
businessAssayTaskDO.setConfigReportTemplateKey(configReportTemplate.getKey()); businessAssayTaskDO.setConfigReportTemplateKey(configReportTemplate.getKey());
businessAssayTaskDO.setTaskAssignOperator(loginRealname); businessAssayTaskDO.setTaskAssignOperator(loginRealname);
businessAssayTaskDO.setTaskAssignOperatorId(loginUser.getId());
businessAssayTaskDO.setTaskAssignTime(currentDateTime); businessAssayTaskDO.setTaskAssignTime(currentDateTime);
businessAssayTaskDO.setTaskAssignStatus(QmsCommonConstant.IN_PROGRESS); businessAssayTaskDO.setTaskAssignStatus(QmsCommonConstant.IN_PROGRESS);
businessAssayTaskDO.setTaskAssayStatus(QmsCommonConstant.NOT_START); businessAssayTaskDO.setTaskAssayStatus(QmsCommonConstant.NOT_START);
@@ -116,6 +120,7 @@ public class SampleTaskAssignSampleCmp extends NodeComponent {
val.setIsAssignTasked(QmsCommonConstant.YES); val.setIsAssignTasked(QmsCommonConstant.YES);
val.setAssignTaskTime(currentDateTime); val.setAssignTaskTime(currentDateTime);
val.setAssayOperator(assignAssayUser.getRealName()); val.setAssayOperator(assignAssayUser.getRealName());
val.setAssayOperatorId(assignAssayUser.getUserId());
val.setBusinessAssayTaskId(businessAssayTaskDO.getId()); val.setBusinessAssayTaskId(businessAssayTaskDO.getId());
BusinessSubSampleDO businessSubSampleDO = sampleTaskAssignContext.getBusinessSubSampleById(val.getBusinessSubSampleId()); BusinessSubSampleDO businessSubSampleDO = sampleTaskAssignContext.getBusinessSubSampleById(val.getBusinessSubSampleId());

View File

@@ -89,7 +89,7 @@ public class BusinessAssayTaskDataServiceImpl implements BusinessAssayTaskDataSe
@Override @Override
public List<BusinessAssayTaskDataGroupRespVO> getUnAssayTaskGroupList(BusinessAssayTaskDataReqVO reqVO) { public List<BusinessAssayTaskDataGroupRespVO> getUnAssayTaskGroupList(BusinessAssayTaskDataReqVO reqVO) {
System.out.println("查询时租户id" + TenantContextHolder.getTenantId()); // System.out.println("查询时租户id" + TenantContextHolder.getTenantId());
return businessAssayTaskDataMapper.selectUnAssayTaskGroupList(reqVO); return businessAssayTaskDataMapper.selectUnAssayTaskGroupList(reqVO);
} }

View File

@@ -19,7 +19,7 @@ import com.zt.plat.framework.common.pojo.PageResult;
public interface BusinessSampleDispatchService { public interface BusinessSampleDispatchService {
//增加样品 //增加样品
void addOrRemoveSample(@Valid BusinessSampleDispatchSaveReqVO paramVo); void addOrRemoveSample(@Valid BusinessSampleDispatchSaveReqVO paramVo, boolean updateCancelFlag);
//发起流程 //发起流程
CommonResult<BusinessSampleDispatchRespVO> createProcessInstance(BusinessSampleDispatchSaveReqVO paramVo); CommonResult<BusinessSampleDispatchRespVO> createProcessInstance(BusinessSampleDispatchSaveReqVO paramVo);

View File

@@ -22,6 +22,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
@@ -59,17 +60,17 @@ public class BusinessSampleDispatchServiceImpl implements BusinessSampleDispatch
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void addOrRemoveSample(BusinessSampleDispatchSaveReqVO paramVo) { public void addOrRemoveSample(BusinessSampleDispatchSaveReqVO paramVo, boolean updateCancelFlag) {
Long id = paramVo.getId(); Long id = paramVo.getId();
List<Long> addSubSampleIds = paramVo.getAddSubSampleIds(); List<Long> addSubSampleIds = paramVo.getAddSubSampleIds();
List<Long> removeDetailIds = paramVo.getRemoveDetailIds(); List<Long> removeDetailIds = paramVo.getRemoveDetailIds();
BusinessSampleDispatchDO entity = getBusinessSampleDispatch(id);
//处理移除 //处理移除
if(removeDetailIds != null && !removeDetailIds.isEmpty()){ if(removeDetailIds != null && !removeDetailIds.isEmpty()){
businessSampleDispatchDetailService.deleteBusinessSampleDispatchDetailListByIds(removeDetailIds); businessSampleDispatchDetailService.deleteBusinessSampleDispatchDetailListByIds(removeDetailIds);
} }
//处理新增 //处理新增
if(!addSubSampleIds.isEmpty()){ if(addSubSampleIds != null && !addSubSampleIds.isEmpty()){
List<BusinessSampleDispatchDetailDO> detailList = businessSampleDispatchDetailService.listByParID(id); List<BusinessSampleDispatchDetailDO> detailList = businessSampleDispatchDetailService.listByParID(id);
//去除已添加过的 //去除已添加过的
List<Long> hasIds = detailList.stream().map(BusinessSampleDispatchDetailDO::getBusinessSubSampleId).toList(); List<Long> hasIds = detailList.stream().map(BusinessSampleDispatchDetailDO::getBusinessSubSampleId).toList();
@@ -81,8 +82,14 @@ public class BusinessSampleDispatchServiceImpl implements BusinessSampleDispatch
detail.setParentId(id); detail.setParentId(id);
insertList.add(detail); insertList.add(detail);
} }
if(!insertList.isEmpty()) if(!insertList.isEmpty()){
businessSampleDispatchDetailService.insertBatch(insertList); businessSampleDispatchDetailService.insertBatch(insertList);
if(updateCancelFlag && "-1".equals(entity.getCancelStatus())){
//如果有新增,修改临时数据状态
entity.setCancelStatus("0");
businessSampleDispatchMapper.updateById(entity);
}
}
} }
} }
@@ -137,8 +144,11 @@ public class BusinessSampleDispatchServiceImpl implements BusinessSampleDispatch
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public CommonResult<String> execDispatch(BusinessSampleDispatchSaveReqVO paramVo) { public CommonResult<String> execDispatch(BusinessSampleDispatchSaveReqVO paramVo) {
Long id = paramVo.getId(); Long id = paramVo.getId();
String warehouseUser = paramVo.getWarehouseUser(); //库管员
Long warehouseUserId = paramVo.getWarehouseUserId(); LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
String nickName = SecurityFrameworkUtils.getLoginUserNickname();
String warehouseUser = nickName; //库管员
Long warehouseUserId = loginUser.getId();
BusinessSampleDispatchDO entity = getBusinessSampleDispatch( id); BusinessSampleDispatchDO entity = getBusinessSampleDispatch( id);
BusinessSampleDispatchDetailPageReqVO pageReqVO = new BusinessSampleDispatchDetailPageReqVO(); BusinessSampleDispatchDetailPageReqVO pageReqVO = new BusinessSampleDispatchDetailPageReqVO();
pageReqVO.setParentId(id); pageReqVO.setParentId(id);
@@ -150,8 +160,10 @@ public class BusinessSampleDispatchServiceImpl implements BusinessSampleDispatch
List<BusinessHandoverRecordSubDO> handoverRecordList = new ArrayList<>(); List<BusinessHandoverRecordSubDO> handoverRecordList = new ArrayList<>();
for (BusinessSampleDispatchDetailExtendRespVO detail : detailList) { for (BusinessSampleDispatchDetailExtendRespVO detail : detailList) {
BusinessSampleDispatchDetailDO u = new BusinessSampleDispatchDetailDO(); BusinessSampleDispatchDetailDO u = new BusinessSampleDispatchDetailDO();
u.setId(detail.getId());
u.setUseStatus("1"); u.setUseStatus("1");
u.setBorrowStatus("1"); u.setBorrowStatus("1");
u.setGivebackStatus("0");
u.setBorrowUser(entity.getApplyUser()); u.setBorrowUser(entity.getApplyUser());
u.setBorrowUserId(entity.getApplyUserId()); u.setBorrowUserId(entity.getApplyUserId());
u.setBorrowTime(borrowTime); u.setBorrowTime(borrowTime);
@@ -160,6 +172,7 @@ public class BusinessSampleDispatchServiceImpl implements BusinessSampleDispatch
BusinessHandoverRecordSubDO handoverRecord = new BusinessHandoverRecordSubDO(); BusinessHandoverRecordSubDO handoverRecord = new BusinessHandoverRecordSubDO();
handoverRecord.setBusinessSubSampleId(detail.getBusinessSubSampleId()); handoverRecord.setBusinessSubSampleId(detail.getBusinessSubSampleId());
handoverRecord.setSampleCode(detail.getSampleCode()); handoverRecord.setSampleCode(detail.getSampleCode());
handoverRecord.setSampleFlowNodeKey(QmsCommonConstant.FLOW_SAMPLE_STORAGE);
handoverRecord.setOperationTime(borrowTime); handoverRecord.setOperationTime(borrowTime);
handoverRecord.setOperator(warehouseUser); handoverRecord.setOperator(warehouseUser);
handoverRecord.setOperatorId(warehouseUserId); handoverRecord.setOperatorId(warehouseUserId);
@@ -221,6 +234,7 @@ public class BusinessSampleDispatchServiceImpl implements BusinessSampleDispatch
handoverRecord.setOperatorId(givebackUserId); handoverRecord.setOperatorId(givebackUserId);
handoverRecord.setSendSampleOperator(givebackUser); //送样人 handoverRecord.setSendSampleOperator(givebackUser); //送样人
handoverRecord.setReceiveSampleOperator(warehouseUser); //收样人 handoverRecord.setReceiveSampleOperator(warehouseUser); //收样人
handoverRecord.setSampleFlowNodeKey(QmsCommonConstant.FLOW_SAMPLE_STORAGE);
handoverRecordList.add(handoverRecord); handoverRecordList.add(handoverRecord);
} }
businessSampleDispatchDetailService.updateBatch(detailUpdateList); businessSampleDispatchDetailService.updateBatch(detailUpdateList);

View File

@@ -61,5 +61,7 @@ public interface BusinessSampleHandoverDetailService {
*/ */
PageResult<BusinessSampleHandoverDetailDO> getBusinessSampleHandoverDetailPage(BusinessSampleHandoverDetailPageReqVO pageReqVO); PageResult<BusinessSampleHandoverDetailDO> getBusinessSampleHandoverDetailPage(BusinessSampleHandoverDetailPageReqVO pageReqVO);
PageResult<BusinessSampleHandoverDetailRespVO> takeOffPageList(BusinessSampleHandoverDetailPageReqVO pageReqVO);
void insertBatch(List<BusinessSampleHandoverDetailDO> list); void insertBatch(List<BusinessSampleHandoverDetailDO> list);
} }

View File

@@ -91,6 +91,11 @@ public class BusinessSampleHandoverDetailServiceImpl implements BusinessSampleHa
return businessSampleHandoverDetailMapper.selectPage(pageReqVO); return businessSampleHandoverDetailMapper.selectPage(pageReqVO);
} }
@Override
public PageResult<BusinessSampleHandoverDetailRespVO> takeOffPageList(BusinessSampleHandoverDetailPageReqVO pageReqVO) {
return businessSampleHandoverDetailMapper.takeOffPageList(pageReqVO);
}
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void insertBatch(List<BusinessSampleHandoverDetailDO> list) { public void insertBatch(List<BusinessSampleHandoverDetailDO> list) {

View File

@@ -57,6 +57,13 @@ public interface BusinessSubSampleService {
*/ */
BusinessSubSampleExtendRespVO getBusinessSubSample(Long id); BusinessSubSampleExtendRespVO getBusinessSubSample(Long id);
/**
* 获取打印子样业务数据
* @param id
* @return
*/
BusinessSubSampleExtendRespVO getPrintSubSample(Long id);
BusinessSubSampleDO getBySampleCode(String sampleCode); BusinessSubSampleDO getBySampleCode(String sampleCode);
BusinessSubSampleDO getBySampleReturnCode(String sampleReturnCode); BusinessSubSampleDO getBySampleReturnCode(String sampleReturnCode);
@@ -68,6 +75,8 @@ public interface BusinessSubSampleService {
*/ */
PageResult<BusinessSubSampleExtendRespVO> getBusinessSubSamplePage(BusinessSubSamplePageReqVO pageReqVO); PageResult<BusinessSubSampleExtendRespVO> getBusinessSubSamplePage(BusinessSubSamplePageReqVO pageReqVO);
PageResult<BusinessSubSampleExtendRespVO> selectPageForDispatch(BusinessSubSamplePageReqVO pageReqVO);
/** /**
* 获取子样分析班组分页 * 获取子样分析班组分页
* @param pageReqVO * @param pageReqVO

View File

@@ -3,17 +3,21 @@ package com.zt.plat.module.qms.business.bus.service;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zt.plat.framework.security.core.LoginUser; import com.zt.plat.framework.security.core.LoginUser;
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils; import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
import com.zt.plat.module.qms.business.bus.controller.vo.*; import com.zt.plat.module.qms.business.bus.controller.vo.*;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessHandoverRecordSubDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessHandoverRecordSubDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleHandoverDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleHandoverDetailDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleHandoverDetailDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAnalysisGroupDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAnalysisGroupDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleDO; import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigWarehouseLocationDO; import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigWarehouseLocationDO;
import com.zt.plat.module.qms.business.config.service.ConfigSubSampleService; import com.zt.plat.module.qms.business.config.service.ConfigSubSampleService;
import com.zt.plat.module.qms.business.config.service.ConfigWarehouseLocationService; import com.zt.plat.module.qms.business.config.service.ConfigWarehouseLocationService;
import com.zt.plat.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO;
import com.zt.plat.module.qms.common.dic.dal.mapper.DictionaryBusinessMapper;
import com.zt.plat.module.qms.common.dic.service.DictionaryBusinessService; import com.zt.plat.module.qms.common.dic.service.DictionaryBusinessService;
import com.zt.plat.module.qms.core.code.SequenceUtil; import com.zt.plat.module.qms.core.code.SequenceUtil;
import com.zt.plat.module.qms.enums.QmsCommonConstant; import com.zt.plat.module.qms.enums.QmsCommonConstant;
@@ -34,6 +38,7 @@ import com.zt.plat.framework.common.exception.ServiceException;
import com.zt.plat.framework.common.pojo.PageResult; import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.util.object.BeanUtils; import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleAnalysisGroupMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleAnalysisGroupMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
import com.zt.plat.module.qms.enums.QmsCommonConstant; import com.zt.plat.module.qms.enums.QmsCommonConstant;
@@ -42,6 +47,7 @@ import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.e
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception0; import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception0;
import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertList; import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertList;
import static com.zt.plat.module.qms.enums.ErrorCodeConstants.*; import static com.zt.plat.module.qms.enums.ErrorCodeConstants.*;
import static com.zt.plat.module.qms.enums.QmsCommonConstant.SAMPLE_STORAGE_OPERATION_TYPE_TAKEN_OFF;
/** /**
* 子样业务 Service 实现类 * 子样业务 Service 实现类
@@ -58,6 +64,9 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
@Resource @Resource
private BusinessSubSampleAnalysisGroupMapper businessSubSampleAnalysisGroupMapper; private BusinessSubSampleAnalysisGroupMapper businessSubSampleAnalysisGroupMapper;
@Resource
private BusinessAssayTaskDataMapper businessAssayTaskDataMapper;
@Resource private ConfigWarehouseLocationService configWarehouseLocationService; @Resource private ConfigWarehouseLocationService configWarehouseLocationService;
@Resource private BusinessSampleHandoverService businessSampleHandoverService; @Resource private BusinessSampleHandoverService businessSampleHandoverService;
@Resource private BusinessSampleHandoverDetailService businessSampleHandoverDetailService; @Resource private BusinessSampleHandoverDetailService businessSampleHandoverDetailService;
@@ -65,6 +74,8 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
@Resource private DictionaryBusinessService dictionaryBusinessService; @Resource private DictionaryBusinessService dictionaryBusinessService;
@Resource private ConfigSubSampleService configSubSampleService; @Resource private ConfigSubSampleService configSubSampleService;
@Resource private SequenceUtil sequenceUtil; @Resource private SequenceUtil sequenceUtil;
@Resource
private DictionaryBusinessMapper dictionaryBusinessMapper;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@@ -129,6 +140,33 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
return businessSubSampleMapper.selectExtendById(id); return businessSubSampleMapper.selectExtendById(id);
} }
@Override
public BusinessSubSampleExtendRespVO getPrintSubSample(Long id) {
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
BusinessSubSampleExtendRespVO businessSubSample = businessSubSampleMapper.selectExtendById(id);
BusinessSubSampleAnalysisGroupDO businessSubSampleAnalysisGroupDO = businessSubSampleAnalysisGroupMapper.selectByBusinessSubSampleIdAndAssayDepartmentId(id, loginUser.getVisitDeptId());
businessSubSample.setAssayDepartmentId(businessSubSampleAnalysisGroupDO.getAssayDepartmentId());
businessSubSample.setAssayDepartmentName(businessSubSampleAnalysisGroupDO.getAssayDepartmentName());
businessSubSample.setSampleReceiver(businessSubSampleAnalysisGroupDO.getSampleReceiver());
businessSubSample.setSampleReceiveTime(businessSubSampleAnalysisGroupDO.getSampleReceiveTime());
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessSubSampleIdAndAssayDepartmentId(id, loginUser.getVisitDeptId());
Map<Long, List<BusinessAssayTaskDataDO>> businessAssayTaskDataDOMap = businessAssayTaskDataDOList.stream().collect(Collectors.groupingBy(BusinessAssayTaskDataDO::getConfigAssayMethodId));
List<String> assayProjectList = new ArrayList<>();
for (Map.Entry<Long, List<BusinessAssayTaskDataDO>> entry : businessAssayTaskDataDOMap.entrySet()) {
List<BusinessAssayTaskDataDO> val = entry.getValue();
BusinessAssayTaskDataDO businessAssayTaskDataDO = val.get(0);
String assayProject = businessAssayTaskDataDO.getAssayProject();
String[] split = assayProject.split(",");
for (String s : split) {
if (!assayProjectList.contains(s)) {
assayProjectList.add(s);
}
}
}
businessSubSample.setAssayProject(CollUtil.join(assayProjectList, ","));
return businessSubSample;
}
@Override @Override
public BusinessSubSampleDO getBySampleCode(String sampleCode) { public BusinessSubSampleDO getBySampleCode(String sampleCode) {
LambdaQueryWrapper<BusinessSubSampleDO> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<BusinessSubSampleDO> queryWrapper = new LambdaQueryWrapper<>();
@@ -159,7 +197,15 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
return page; return page;
} }
@Override @Override
public PageResult<BusinessSubSampleExtendRespVO> selectPageForDispatch(BusinessSubSamplePageReqVO pageReqVO) {
IPage<BusinessSubSampleExtendRespVO> page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize());
Page<BusinessSubSampleExtendRespVO> pageList = businessSubSampleMapper.selectPageForDispatch(page, pageReqVO);
PageResult<BusinessSubSampleExtendRespVO> ret = new PageResult<>(pageList.getRecords(), pageList.getTotal());
return ret;
}
@Override
public PageResult<BusinessSubSampleExtendRespVO> getAnalysisGroupPage(BusinessSubSamplePageReqVO pageReqVO) { public PageResult<BusinessSubSampleExtendRespVO> getAnalysisGroupPage(BusinessSubSamplePageReqVO pageReqVO) {
PageResult<BusinessSubSampleExtendRespVO> page = businessSubSampleMapper.selectAnalysisGroupPage(pageReqVO); PageResult<BusinessSubSampleExtendRespVO> page = businessSubSampleMapper.selectAnalysisGroupPage(pageReqVO);
List<BusinessSubSampleExtendRespVO> list = page.getList(); List<BusinessSubSampleExtendRespVO> list = page.getList();
@@ -193,13 +239,16 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
@Override @Override
public BusinessSubSampleExtendRespVO getBySampleCodeAndFlowKey(@Valid BusinessSubSampleReqVO reqVO) { public BusinessSubSampleExtendRespVO getBySampleCodeAndFlowKey(@Valid BusinessSubSampleReqVO reqVO) {
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
BusinessSubSampleExtendRespVO subSample = businessSubSampleMapper.getBySampleCodeAndFlowKey(reqVO); BusinessSubSampleExtendRespVO subSample = null;
if (QmsCommonConstant.FLOW_NODE_TEAM_RECEIVE.equals(reqVO.getSampleFlowNodeKey())) { if (QmsCommonConstant.FLOW_NODE_TEAM_RECEIVE.equals(reqVO.getSampleFlowNodeKey())) {
subSample = businessSubSampleMapper.getBySampleCode(reqVO);
List<BusinessSubSampleAnalysisGroupDO> businessSubSampleAnalysisGroupList = businessSubSampleAnalysisGroupMapper.selectByBusinessSubSampleId(subSample.getId()); List<BusinessSubSampleAnalysisGroupDO> businessSubSampleAnalysisGroupList = businessSubSampleAnalysisGroupMapper.selectByBusinessSubSampleId(subSample.getId());
BusinessSubSampleAnalysisGroupDO receiveSample = businessSubSampleAnalysisGroupList.stream().filter(f -> "已收样".equals(f.getSampleStatus()) && !f.getAssayDepartmentId().equals(loginUser.getVisitDeptId())).findFirst().orElse(null); BusinessSubSampleAnalysisGroupDO receiveSample = businessSubSampleAnalysisGroupList.stream().filter(f -> "已收样".equals(f.getSampleStatus()) && !f.getAssayDepartmentId().equals(loginUser.getVisitDeptId())).findFirst().orElse(null);
if (receiveSample != null) { if (receiveSample != null) {
throw new ServiceException(1_032_100_000, "当前样品在" + receiveSample.getAssayDepartmentName() + ",不允许收样!"); throw new ServiceException(1_032_100_000, "当前样品在" + receiveSample.getAssayDepartmentName() + ",不允许收样!");
} }
} else {
subSample = businessSubSampleMapper.getBySampleCodeAndFlowKey(reqVO);
} }
return subSample; return subSample;
} }
@@ -210,9 +259,9 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
public BusinessSubSampleRespVO execReturnToStock(BusinessSubSampleSaveReqVO reqVo) { public BusinessSubSampleRespVO execReturnToStock(BusinessSubSampleSaveReqVO reqVo) {
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
String loginUserName = SecurityFrameworkUtils.getLoginUserNickname(); String loginUserName = SecurityFrameworkUtils.getLoginUserNickname();
BusinessSubSampleDO businessSubSampleDO = this.getBySampleReturnCode(reqVo.getSampleCode()); BusinessSubSampleDO businessSubSampleDO = this.getBySampleReturnCode(reqVo.getSampleReturnCode());
if(businessSubSampleDO == null) if(businessSubSampleDO == null)
throw exception(BUSINESS_SUB_SAMPLE_NOT_EXISTS); throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "未查询到子样数据,请检查:样品所处环节和是否已归库!");
//检查样品状态 //检查样品状态
if(!QmsCommonConstant.FLOW_SAMPLE_STORAGE.equals(businessSubSampleDO.getSampleFlowNodeKey())) if(!QmsCommonConstant.FLOW_SAMPLE_STORAGE.equals(businessSubSampleDO.getSampleFlowNodeKey()))
throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "子样任务不在“归库”环节,请检查前置任务是否已完成!"); throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "子样任务不在“归库”环节,请检查前置任务是否已完成!");
@@ -222,6 +271,16 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
//判断仓库位置 //判断仓库位置
Long configSubSampleId = businessSubSampleDO.getConfigSubSampleId(); Long configSubSampleId = businessSubSampleDO.getConfigSubSampleId();
ConfigSubSampleDO configSubSampleDO = configSubSampleService.getConfigSubSample(configSubSampleId); ConfigSubSampleDO configSubSampleDO = configSubSampleService.getConfigSubSample(configSubSampleId);
String cfgLocationCode = configSubSampleDO.getConfigWarehouseLocationCode(); //子样配置表的仓库编码
ConfigWarehouseLocationDO locationDO = configWarehouseLocationService.getLocationByCode(reqVo.getWarehouseLocationCode(), QmsWarehouseLocationConstant.WAREHOUSE_TYPE_SAMPLE);
if(locationDO == null)
throw exception(CONFIG_WAREHOUSE_LOCATION_NOT_EXISTS);
ConfigWarehouseLocationDO warehouseDO = configWarehouseLocationService.getConfigWarehouseLocation(locationDO.getParentId());
if(warehouseDO == null)
throw exception0(CONFIG_WAREHOUSE_LOCATION_NOT_EXISTS.getCode(), "库位编码对应的仓库不存在,请联系管理员处理!");
if(!warehouseDO.getCode().equals(cfgLocationCode))
throw exception0(CONFIG_WAREHOUSE_LOCATION_NOT_EXISTS.getCode(), "您归库的样品不该进入此库,请检查后再重新归库。应归入仓库(编码):" + cfgLocationCode);
//判断归库码
Integer isGenerateSimpleCode = configSubSampleDO.getIsGenerateSimpleCode(); Integer isGenerateSimpleCode = configSubSampleDO.getIsGenerateSimpleCode();
Integer printFlag = 0; Integer printFlag = 0;
if(1 == isGenerateSimpleCode){ if(1 == isGenerateSimpleCode){
@@ -235,9 +294,7 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
} }
} }
ConfigWarehouseLocationDO locationDO = configWarehouseLocationService.getLocationByCode(reqVo.getWarehouseLocationCode(), QmsWarehouseLocationConstant.WAREHOUSE_TYPE_SAMPLE);
if(locationDO == null)
throw exception(CONFIG_WAREHOUSE_LOCATION_NOT_EXISTS);
//更新入库状态 //更新入库状态
businessSubSampleDO.setReturnStatus(QmsCommonConstant.COMPLETED); businessSubSampleDO.setReturnStatus(QmsCommonConstant.COMPLETED);
@@ -272,8 +329,8 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Integer execTakeOff(JSONObject reqVo) { public Integer execTakeOff(JSONObject reqVo) {
String actionWay = reqVo.getString("actionWay"); String actionWay = reqVo.getString("actionWay");
String warehouseLocationCode = reqVo.getString("warehouseLocationCode"); String warehouseLocationCode = reqVo.getString("locationCode");
String sampleCode = reqVo.getString("sampleCode"); String sampleReturnCode = reqVo.getString("sampleReturnCodes");
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
String loginUserName = SecurityFrameworkUtils.getLoginUserNickname(); String loginUserName = SecurityFrameworkUtils.getLoginUserNickname();
//查询要操作的样品 //查询要操作的样品
@@ -282,10 +339,10 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
queryWrapper.eq(BusinessSubSampleDO::getReturnStatus, QmsCommonConstant.COMPLETED); queryWrapper.eq(BusinessSubSampleDO::getReturnStatus, QmsCommonConstant.COMPLETED);
if(QmsWarehouseLocationConstant.SAMPLE_TAKE_OFF_ACTION_WAY_SAMPLE.equals(actionWay)){ if(QmsWarehouseLocationConstant.SAMPLE_TAKE_OFF_ACTION_WAY_SAMPLE.equals(actionWay)){
//按编号查询样品 //按编号查询样品
if(ObjectUtils.isEmpty(sampleCode)) if(ObjectUtils.isEmpty(sampleReturnCode))
throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "缺少样品编号参数!"); throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "缺少样品编号参数!");
List<String> sampleCodes = Arrays.asList(sampleCode.split( ",")); List<String> sampleReturnCodes = Arrays.asList(sampleReturnCode.split( ","));
queryWrapper.in(BusinessSubSampleDO::getSampleCode, sampleCodes); queryWrapper.in(BusinessSubSampleDO::getSampleReturnCode, sampleReturnCodes);
} }
else if(QmsWarehouseLocationConstant.SAMPLE_TAKE_OFF_ACTION_WAY_LOCATION.equals(actionWay)){ else if(QmsWarehouseLocationConstant.SAMPLE_TAKE_OFF_ACTION_WAY_LOCATION.equals(actionWay)){
//按库位查询样品 //按库位查询样品
@@ -294,7 +351,7 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
ConfigWarehouseLocationDO locationDO = configWarehouseLocationService.getLocationByCode(warehouseLocationCode, QmsWarehouseLocationConstant.WAREHOUSE_TYPE_SAMPLE); ConfigWarehouseLocationDO locationDO = configWarehouseLocationService.getLocationByCode(warehouseLocationCode, QmsWarehouseLocationConstant.WAREHOUSE_TYPE_SAMPLE);
if(locationDO == null) if(locationDO == null)
throw exception(CONFIG_WAREHOUSE_LOCATION_NOT_EXISTS); throw exception(CONFIG_WAREHOUSE_LOCATION_NOT_EXISTS);
queryWrapper.eq(BusinessSubSampleDO::getConfigWarehouseLocationInfomationId, warehouseLocationCode); queryWrapper.eq(BusinessSubSampleDO::getConfigWarehouseLocationInfomationId, locationDO.getId());
}else{ }else{
throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "actionWay参数错误"); throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "actionWay参数错误");
} }
@@ -305,35 +362,34 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
//创建交接抬头 //创建交接抬头
BusinessSampleHandoverSaveReqVO handoverVO = new BusinessSampleHandoverSaveReqVO(); BusinessSampleHandoverSaveReqVO handoverVO = new BusinessSampleHandoverSaveReqVO();
String codeTemplate = dictionaryBusinessService.getValueByDataKey("sample_take_off_serial"); String code = sequenceUtil.genCode("QMS_SAMPLE_TAKE_OFF_SERIAL");
if(ObjectUtils.isEmpty(codeTemplate))
throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "缺少“样品下架记录编号规则”的配置,请在业务参数字典增加此配置!");
String code = sequenceUtil.genCode(codeTemplate);
handoverVO.setCode(code); handoverVO.setCode(code);
handoverVO.setName("样品下架记录"); handoverVO.setName("样品下架记录");
handoverVO.setSampleFlowNodeKey(QmsCommonConstant.FLOW_SAMPLE_STORAGE); handoverVO.setSampleFlowNodeKey(QmsCommonConstant.FLOW_SAMPLE_STORAGE);
handoverVO.setOperationTime(LocalDateTime.now()); handoverVO.setOperationTime(LocalDateTime.now());
handoverVO.setOperator(loginUserName); handoverVO.setOperator(loginUserName);
handoverVO.setOperatorId(loginUser.getId()); handoverVO.setOperatorId(loginUser.getId());
handoverVO.setOperationType(SAMPLE_STORAGE_OPERATION_TYPE_TAKEN_OFF);
BusinessSampleHandoverRespVO handoverRespVO = businessSampleHandoverService.createBusinessSampleHandover(handoverVO); BusinessSampleHandoverRespVO handoverRespVO = businessSampleHandoverService.createBusinessSampleHandover(handoverVO);
List<Long> dictionaryBusinessIdList = waitingList.stream().map(m -> m.getDictionaryBusinessId()).distinct().collect(Collectors.toList());
List<DictionaryBusinessDO> dictionaryBusinessList = dictionaryBusinessMapper.selectByIds(dictionaryBusinessIdList);
//更新下架状态 //更新下架状态
List<BusinessHandoverRecordSubDO> recordList = new ArrayList<>(); List<BusinessHandoverRecordSubDO> recordList = new ArrayList<>();
List<BusinessSampleHandoverDetailDO> detailList = new ArrayList<>(); //通过样品交接明细记录下架记录 List<BusinessSampleHandoverDetailDO> detailList = new ArrayList<>(); //通过样品交接明细记录下架记录
for(BusinessSubSampleDO businessSubSampleDO : waitingList){ for(BusinessSubSampleDO businessSubSampleDO : waitingList){
businessSubSampleDO.setReturnStatus(QmsCommonConstant.TAKEN_OFF); businessSubSampleDO.setReturnStatus(QmsCommonConstant.TAKEN_OFF);
//创建流转记录 //创建流转记录
BusinessHandoverRecordSubDO reecordDO = new BusinessHandoverRecordSubDO(); BusinessHandoverRecordSubDO record = new BusinessHandoverRecordSubDO();
reecordDO.setBusinessSubSampleId(businessSubSampleDO.getId()); record.setBusinessSubSampleId(businessSubSampleDO.getId());
reecordDO.setSampleFlowNodeKey(QmsCommonConstant.FLOW_SAMPLE_STORAGE); record.setSampleFlowNodeKey(QmsCommonConstant.FLOW_SAMPLE_STORAGE);
reecordDO.setSampleCode(businessSubSampleDO.getSampleReturnCode()); record.setSampleCode(businessSubSampleDO.getSampleReturnCode());
reecordDO.setOperationTime(LocalDateTime.now()); record.setOperationTime(LocalDateTime.now());
reecordDO.setOperator(loginUserName); record.setOperator(loginUserName);
reecordDO.setOperatorId(loginUser.getId()); record.setOperatorId(loginUser.getId());
reecordDO.setSendSampleOperator(""); record.setSendSampleOperator("");
reecordDO.setReceiveSampleOperator(""); record.setReceiveSampleOperator("");
reecordDO.setConfigSampleFlowId(0L); record.setConfigSampleFlowId(0L);
recordList.add(reecordDO); recordList.add(record);
BusinessSampleHandoverDetailDO detailDO = new BusinessSampleHandoverDetailDO(); BusinessSampleHandoverDetailDO detailDO = new BusinessSampleHandoverDetailDO();
@@ -341,6 +397,11 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
detailDO.setBusinessSubSampleId(businessSubSampleDO.getId()); detailDO.setBusinessSubSampleId(businessSubSampleDO.getId());
detailDO.setSampleName(businessSubSampleDO.getSampleName()); detailDO.setSampleName(businessSubSampleDO.getSampleName());
detailDO.setSampleCode(businessSubSampleDO.getSampleReturnCode()); detailDO.setSampleCode(businessSubSampleDO.getSampleReturnCode());
detailDO.setDictionaryBusinessId(businessSubSampleDO.getDictionaryBusinessId());
DictionaryBusinessDO dictionaryBusiness = dictionaryBusinessList.stream().filter(f -> f.getId().equals(businessSubSampleDO.getDictionaryBusinessId())).findFirst().orElse(null);
detailDO.setDictionaryBusinessName("");
if(dictionaryBusiness != null)
detailDO.setDictionaryBusinessName(dictionaryBusiness.getName());
detailList.add(detailDO); detailList.add(detailDO);
} }
businessHandoverRecordSubService.insertBatch(recordList); businessHandoverRecordSubService.insertBatch(recordList);
@@ -355,20 +416,22 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
String actionWay = reqVo.getString("actionWay"); String actionWay = reqVo.getString("actionWay");
String targetLocation = reqVo.getString("targetLocation"); String targetLocation = reqVo.getString("targetLocation");
String warehouseLocationCode = reqVo.getString("warehouseLocationCode"); String warehouseLocationCode = reqVo.getString("warehouseLocationCode");
String sampleCode = reqVo.getString("sampleCode"); String sampleReturnCode = reqVo.getString("sampleReturnCode");
if(ObjectUtils.isEmpty(targetLocation)) if(ObjectUtils.isEmpty(targetLocation))
throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "缺少目标库位参数!"); throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "缺少“变更后库位参数!");
ConfigWarehouseLocationDO targetLocationDO = configWarehouseLocationService.getLocationByCode(targetLocation, QmsWarehouseLocationConstant.WAREHOUSE_TYPE_SAMPLE); ConfigWarehouseLocationDO targetLocationDO = configWarehouseLocationService.getLocationByCode(targetLocation, QmsWarehouseLocationConstant.WAREHOUSE_TYPE_SAMPLE);
if(targetLocationDO == null)
throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "“变更后库位”不存在,请检查编码是否正确!");
//查询要操作的样品 //查询要操作的样品
LambdaQueryWrapper<BusinessSubSampleDO> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<BusinessSubSampleDO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(BusinessSubSampleDO::getSampleFlowNodeKey, QmsCommonConstant.FLOW_SAMPLE_STORAGE); queryWrapper.eq(BusinessSubSampleDO::getSampleFlowNodeKey, QmsCommonConstant.FLOW_SAMPLE_STORAGE);
queryWrapper.eq(BusinessSubSampleDO::getReturnStatus, QmsCommonConstant.COMPLETED); queryWrapper.eq(BusinessSubSampleDO::getReturnStatus, QmsCommonConstant.COMPLETED);
if(QmsWarehouseLocationConstant.SAMPLE_TAKE_OFF_ACTION_WAY_SAMPLE.equals(actionWay)){ if(QmsWarehouseLocationConstant.SAMPLE_TAKE_OFF_ACTION_WAY_SAMPLE.equals(actionWay)){
//按编号查询样品 //按编号查询样品
if(ObjectUtils.isEmpty(sampleCode)) if(ObjectUtils.isEmpty(sampleReturnCode))
throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "缺少样品编号参数!"); throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "缺少样品编号参数!");
List<String> sampleCodes = Arrays.asList(sampleCode.split( ",")); List<String> sampleReturnCodes = Arrays.asList(sampleReturnCode.split( ","));
queryWrapper.in(BusinessSubSampleDO::getSampleCode, sampleCodes); queryWrapper.in(BusinessSubSampleDO::getSampleReturnCode, sampleReturnCodes);
} }
else if(QmsWarehouseLocationConstant.SAMPLE_TAKE_OFF_ACTION_WAY_LOCATION.equals(actionWay)){ else if(QmsWarehouseLocationConstant.SAMPLE_TAKE_OFF_ACTION_WAY_LOCATION.equals(actionWay)){
//按库位查询样品 //按库位查询样品
@@ -377,7 +440,7 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
ConfigWarehouseLocationDO locationDO = configWarehouseLocationService.getLocationByCode(warehouseLocationCode, QmsWarehouseLocationConstant.WAREHOUSE_TYPE_SAMPLE); ConfigWarehouseLocationDO locationDO = configWarehouseLocationService.getLocationByCode(warehouseLocationCode, QmsWarehouseLocationConstant.WAREHOUSE_TYPE_SAMPLE);
if(locationDO == null) if(locationDO == null)
throw exception(CONFIG_WAREHOUSE_LOCATION_NOT_EXISTS); throw exception(CONFIG_WAREHOUSE_LOCATION_NOT_EXISTS);
queryWrapper.eq(BusinessSubSampleDO::getConfigWarehouseLocationInfomationId, warehouseLocationCode); queryWrapper.eq(BusinessSubSampleDO::getConfigWarehouseLocationInfomationId, locationDO.getId());
}else{ }else{
throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "actionWay参数错误"); throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "actionWay参数错误");
} }

View File

@@ -6,15 +6,6 @@ import com.alibaba.fastjson2.JSONObject;
/** /**
* <b>SampleAnalysisAuditService</b> * <b>SampleAnalysisAuditService</b>
* <p>
* 更新历史:
* <pre> 版本 更新时间 更新者 更新内容<hr/>
* V1.0 2025年9月29日 wxr Add</pre>
* <b>Copyright (C) 云南志者竟成科技有限公司</b>
* </p>
* @author 王兴荣<wxr@wangxingrong.com>
* @version V1.0
* @since 2025年9月29日
*/ */
public interface SampleAnalysisAuditService { public interface SampleAnalysisAuditService {

View File

@@ -41,6 +41,7 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetai
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientDataDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleAssessmentDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleAssessmentProjectDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleAssessmentProjectDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAssessmentDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAssessmentDO;
@@ -58,6 +59,7 @@ import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientParam
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementDataMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementDataMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementParameterDataMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementParameterDataMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementProjectDataMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementProjectDataMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleAssessmentMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleAssessmentProjectMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleAssessmentProjectMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleAssessmentMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleAssessmentMapper;
@@ -292,15 +294,18 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
if (businessAssayTaskDO == null) { if (businessAssayTaskDO == null) {
throw new ServiceException(1_032_100_000, "未找到任务分配单"); throw new ServiceException(1_032_100_000, "未找到任务分配单");
} }
String formValue = businessAssayTaskDO.getFormValue(); JSONArray jsonArray = new JSONArray();
JSONObject formValueJsonObject = JSON.parseObject(formValue);
String jsonString = JSON.toJSONString(businessAssayTaskDO, context); String jsonString = JSON.toJSONString(businessAssayTaskDO, context);
JSONObject businessAssayTaskJson = JSON.parseObject(jsonString); JSONObject businessAssayTaskJson = JSON.parseObject(jsonString);
formValueJsonObject.forEach((key, value) -> {
businessAssayTaskJson.put(key, value); String formValue = businessAssayTaskDO.getFormValue();
}); if (StringUtils.isNotBlank(formValue)) {
JSONArray jsonArray = new JSONArray(); JSONObject formValueJsonObject = JSON.parseObject(formValue);
formValueJsonObject.forEach((key, value) -> {
businessAssayTaskJson.put(key, value);
});
}
jsonArray.add(businessAssayTaskJson); jsonArray.add(businessAssayTaskJson);
resultJsonObject.put("businessAssayTask", jsonArray); resultJsonObject.put("businessAssayTask", jsonArray);
@@ -435,6 +440,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.APPROVED); businessAssayTaskDO.setFlowStatus(QmsCommonConstant.APPROVED);
businessAssayTaskDO.setReportTime(LocalDateTime.now()); businessAssayTaskDO.setReportTime(LocalDateTime.now());
businessAssayTaskDO.setReportOperator(SecurityFrameworkUtils.getLoginUserNickname()); businessAssayTaskDO.setReportOperator(SecurityFrameworkUtils.getLoginUserNickname());
businessAssayTaskDO.setReportOperatorId(SecurityFrameworkUtils.getLoginUserId());
//查询分析任务明细 //查询分析任务明细
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessAssayTaskId(businessAssayTaskId); List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessAssayTaskId(businessAssayTaskId);
@@ -725,6 +731,9 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
@Resource @Resource
private BusinessSubParentSampleMapper businessSubParentSampleMapper; private BusinessSubParentSampleMapper businessSubParentSampleMapper;
@Resource
private BusinessSubParentSampleAssessmentMapper businessSubParentSampleAssessmentMapper;
@Resource @Resource
private BusinessSubParentSampleAssessmentProjectMapper businessSubParentSampleAssessmentProjectMapper; private BusinessSubParentSampleAssessmentProjectMapper businessSubParentSampleAssessmentProjectMapper;
@@ -740,9 +749,8 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
if (unReportedList.size() > 0) { if (unReportedList.size() > 0) {
throw new ServiceException(1_032_100_000, "存在未上报的数据"); throw new ServiceException(1_032_100_000, "存在未上报的数据");
} }
//自动上报
List<Long> automaticBusinessSubParentSampleIdList = new ArrayList<>(); List<Long> automaticBusinessSubParentSampleIdList = new ArrayList<>();
// List<BusinessAssayReportDataDO> saveBusinessAssayReportDataDOList = new ArrayList<>();
// List<BusinessAssayReportDataDO> updateBusinessAssayReportDataDOList = new ArrayList<>();
List<BusinessSubParentSampleAssessmentProjectDO> businessSubParentSampleAssessmentDOList = new ArrayList<>(); List<BusinessSubParentSampleAssessmentProjectDO> businessSubParentSampleAssessmentDOList = new ArrayList<>();
@@ -758,18 +766,23 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
//查询主样 //查询主样
BusinessBaseSampleDO businessBaseSampleDO = businessBaseSampleMapper.selectById(businessAssayTaskDataDO.getBusinessBaseSampleId()); BusinessBaseSampleDO businessBaseSampleDO = businessBaseSampleMapper.selectById(businessAssayTaskDataDO.getBusinessBaseSampleId());
// List<Long> businessSubParentSampleIdList = reportedList.stream().map(m -> m.getBusinessSubParentSampleId()).distinct().collect(Collectors.toList());
//查询分样 //查询分样
BusinessSubParentSampleDO businessSubParentSampleDO = businessSubParentSampleMapper.selectById(businessAssayTaskDataDO.getBusinessSubParentSampleId()); BusinessSubParentSampleDO businessSubParentSampleDO = businessSubParentSampleMapper.selectById(businessAssayTaskDataDO.getBusinessSubParentSampleId());
//查询分样对应的方法 //查询分样对应的方法
ConfigSubSampleParentMethodDO configSubSampleParentMethodDO = configSubSampleParentMethodMapper.selectByConfigSubSampleParentIdAndConfigAssayMethodId(businessSubParentSampleDO.getConfigSubSampleParentId(), configAssayMethodId); ConfigSubSampleParentMethodDO configSubSampleParentMethodDO = configSubSampleParentMethodMapper.selectByConfigSubSampleParentIdAndConfigAssayMethodId(businessSubParentSampleDO.getConfigSubSampleParentId(), configAssayMethodId);
//子样判定
BusinessSubSampleAssessmentDO businessSubSampleAssessmentDO = businessSubSampleAssessmentMapper.selectByBusinessSubSampleIdAndConfigAssayMethodId(businessSubSampleId, configAssayMethodId);
//分样判定
BusinessSubParentSampleAssessmentDO businessSubParentSampleAssessmentDO = businessSubParentSampleAssessmentMapper.selectByBusinessSubParentSampleIdAndConfigAssayMethodId(businessSubParentSampleDO.getId(), configAssayMethodId);
//循环判定值 //循环判定值
BusinessSubParentSampleAssessmentProjectDO businessSubParentSampleAssessmentProjectDO = null; BusinessSubParentSampleAssessmentProjectDO businessSubParentSampleAssessmentProjectDO = null;
for (BusinessSubSampleAssessmentProjectExtendRespVO businessSubSampleAssessment : businessSubSampleAssessmentList) { for (BusinessSubSampleAssessmentProjectExtendRespVO businessSubSampleAssessment : businessSubSampleAssessmentList) {
businessSubParentSampleAssessmentProjectDO = new BusinessSubParentSampleAssessmentProjectDO(); businessSubParentSampleAssessmentProjectDO = new BusinessSubParentSampleAssessmentProjectDO();
businessSubParentSampleAssessmentProjectDO.setBusinessSubParentSampleAssessmentId(businessSubParentSampleAssessmentDO.getId());
businessSubParentSampleAssessmentProjectDO.setBusinessSubParentSampleId(businessAssayTaskDataDO.getBusinessSubParentSampleId()); businessSubParentSampleAssessmentProjectDO.setBusinessSubParentSampleId(businessAssayTaskDataDO.getBusinessSubParentSampleId());
businessSubParentSampleAssessmentProjectDO.setAssessmentStatus(QmsCommonConstant.NORMAL); businessSubParentSampleAssessmentProjectDO.setAssessmentStatus(QmsCommonConstant.NORMAL);
businessSubParentSampleAssessmentProjectDO.setAssessmentValue(businessSubSampleAssessment.getAssessmentValue()); businessSubParentSampleAssessmentProjectDO.setAssessmentValue(businessSubSampleAssessment.getAssessmentValue());
@@ -787,101 +800,18 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
} }
/**
//查询报表
List<BusinessAssayReportDataDO> businessAssayReportDataDOList = businessAssayReportDataMapper.selectBytBusinessBaseSampleId(businessAssayTaskDataDO.getBusinessBaseSampleId());
ConfigSampleReportReqVO configSampleReportSearch = new ConfigSampleReportReqVO();
configSampleReportSearch.setConfigBaseSampleId(businessBaseSampleDO.getConfigBaseSampleId());
List<ConfigSampleReportExtendRespVO> configSampleReportList = configSampleReportMapper.selectList(configSampleReportSearch);
List<Long> configReportTypeIdList = configSampleReportList.stream().map(m -> m.getConfigReportTypeId()).collect(Collectors.toList());
//查询动态和计算的报表字段
List<ConfigReportFieldDO> configReportFieldList = configReportFieldMapper.selectByConfigReportTypeIds(configReportTypeIdList, Arrays.asList(QmsCommonConstant.FIELD_DYNAMIC, QmsCommonConstant.FIELD_CALCULATED));
//动态报表字段
List<ConfigReportFieldDO> configReportFieldDynamicList = configReportFieldList.stream().filter(f -> QmsCommonConstant.FIELD_DYNAMIC.equals(f.getFieldType())).collect(Collectors.toList());
//根据检测方法查询字段配置
List<ConfigProjectExtendRespVO> configProjectList = configProjectMapper.selectByConfigAssayMethodId(configAssayMethodId);
for (ConfigSampleReportExtendRespVO configSampleReport : configSampleReportList) {
BusinessAssayReportDataDO businessAssayReportDataDO = businessAssayReportDataDOList.stream().filter(f -> f.getConfigReportTypeId().equals(configSampleReport.getConfigReportTypeId()) && f.getConfigSampleReportId().equals(configSampleReport.getId())).findFirst().orElse(null);
if (businessAssayReportDataDO == null) {
businessAssayReportDataDO = new BusinessAssayReportDataDO();
businessAssayReportDataDO.setBusinessBaseSampleId(businessAssayTaskDataDO.getBusinessBaseSampleId());
businessAssayReportDataDO.setConfigReportTypeId(configSampleReport.getConfigReportTypeId());
businessAssayReportDataDO.setConfigSampleReportId(configSampleReport.getId());
businessAssayReportDataDO.setSampleCode(businessBaseSampleDO.getSampleCode());
saveBusinessAssayReportDataDOList.add(businessAssayReportDataDO);
} else {
updateBusinessAssayReportDataDOList.add(businessAssayReportDataDO);
}
JSONObject assayDataJson = new JSONObject();
String assayData = businessAssayReportDataDO.getAssayData();
if (StringUtils.isNotBlank(assayData)) {
assayDataJson = JSON.parseObject(assayData);
}
//循环判定值
for (BusinessSubSampleAssessmentExtendRespVO businessSubSampleAssessment : businessSubSampleAssessmentList) {
Long configAssayMethodProjectId = businessSubSampleAssessment.getConfigAssayMethodProjectId();
List<ConfigProjectExtendRespVO> configProjectFeildList = configProjectList.stream().filter(f -> f.getConfigAssayMethodProjectId().equals(configAssayMethodProjectId)).collect(Collectors.toList());
for (ConfigProjectExtendRespVO configProjectFeild : configProjectFeildList) {
//查询动态报表字段
ConfigReportFieldDO configReportField = configReportFieldDynamicList.stream().filter(f -> f.getConfigReportTypeId().equals(configSampleReport.getConfigReportTypeId()) && f.getField().equals(configProjectFeild.getSaveColumn())).findFirst().orElse(null);
if (configReportField == null) {
continue;
}
ReportFieldValueData reportFieldValueData = new ReportFieldValueData();
reportFieldValueData.setFieldName(configReportField.getFieldName());
reportFieldValueData.setFieldValue(businessSubSampleAssessment.getAssessmentValue());
reportFieldValueData.setDataType(configReportField.getDataType());
reportFieldValueData.setMathSymbol("=");
reportFieldValueData.setUnit(configProjectFeild.getDictionaryProjectUnit());
assayDataJson.put(configReportField.getField(), reportFieldValueData);
}
}
businessAssayReportDataDO.setAssayData(assayDataJson.toJSONString());
//修改已上报数据来源
String dataSource = businessAssayReportDataDO.getDataSource();
Set<String> dataSources = StringUtils.isBlank(dataSource) ? new HashSet<>() : new HashSet<>(Arrays.asList(dataSource.split(",")));
String reportedSource = businessAssayReportDataDO.getReportedSource();
ReportedDataSource reportedDataSource = null;
if (StringUtils.isNotBlank(reportedSource)) {
reportedDataSource = JSON.parseObject(reportedSource, ReportedDataSource.class);
} else {
reportedDataSource = new ReportedDataSource();
}
reportedDataSource.addDataSource(configAssayMethodId.toString(), nickName, LocalDateTime.now());
Set<String> busDataSources = reportedDataSource.getDetails().stream().map(m -> m.getSourceCode()).collect(Collectors.toSet());
if (busDataSources.size() == dataSources.size() && busDataSources.equals(dataSources)) {
businessAssayReportDataDO.setIsAllReported(QmsCommonConstant.YES);
}
if (busDataSources.size() > 0) {
//计算
// TODO
}
businessAssayReportDataDO.setReportedSource(JSON.toJSONString(reportedDataSource));
}
if (saveBusinessAssayReportDataDOList.size() > 0) {
businessAssayReportDataMapper.insertBatch(saveBusinessAssayReportDataDOList);
}
if (updateBusinessAssayReportDataDOList.size() > 0) {
businessAssayReportDataMapper.updateBatch(updateBusinessAssayReportDataDOList);
}
**/
if (businessSubParentSampleAssessmentDOList.size() > 0) { if (businessSubParentSampleAssessmentDOList.size() > 0) {
businessSubParentSampleAssessmentProjectMapper.insertBatch(businessSubParentSampleAssessmentDOList); businessSubParentSampleAssessmentProjectMapper.insertBatch(businessSubParentSampleAssessmentDOList);
} }
//修改子样判定为已上报
businessSubSampleAssessmentDO.setIsReported(QmsCommonConstant.YES);
businessSubSampleAssessmentDO.setReporter(nickName);
businessSubSampleAssessmentDO.setReportTime(LocalDateTime.now());
businessSubSampleAssessmentDO.setReportedStatus(QmsCommonConstant.ASMT_REPORTED);
businessSubSampleAssessmentMapper.updateById(businessSubSampleAssessmentDO);
businessSubSampleAssessmentProjectMapper.update(new LambdaUpdateWrapper<BusinessSubSampleAssessmentProjectDO>() businessSubSampleAssessmentProjectMapper.update(new LambdaUpdateWrapper<BusinessSubSampleAssessmentProjectDO>()
.set(BusinessSubSampleAssessmentProjectDO::getIsReported, QmsCommonConstant.YES) .set(BusinessSubSampleAssessmentProjectDO::getIsReported, QmsCommonConstant.YES)
.set(BusinessSubSampleAssessmentProjectDO::getReporter, nickName) .set(BusinessSubSampleAssessmentProjectDO::getReporter, nickName)
@@ -894,7 +824,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
batchResultDataReportingReqVO.setBusinessSubParentSampleIds(automaticBusinessSubParentSampleIdList); batchResultDataReportingReqVO.setBusinessSubParentSampleIds(automaticBusinessSubParentSampleIdList);
batchResultDataReportingReqVO.setConfigAssayMethodId(configAssayMethodId); batchResultDataReportingReqVO.setConfigAssayMethodId(configAssayMethodId);
sampleResultReportingService.batchResultDataReporting(null); sampleResultReportingService.batchResultDataReporting(batchResultDataReportingReqVO);
} }
} }
@@ -923,7 +853,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
List<BusinessAssayProjectDataDO> newBusinessAssayProjectDataDOList = new ArrayList<>(); List<BusinessAssayProjectDataDO> newBusinessAssayProjectDataDOList = new ArrayList<>();
List<BusinessAssayParameterDataDO> newBusinessAssayParameterDataDOList = new ArrayList<>(); List<BusinessAssayParameterDataDO> newBusinessAssayParameterDataDOList = new ArrayList<>();
BusinessSubSampleAssessmentDO businessSubSampleAssessmentDO = businessSubSampleAssessmentMapper.selectByBusinessSubSampleIdsAndConfigAssayMethodId(businessSubSampleId, configAssayMethodId); BusinessSubSampleAssessmentDO businessSubSampleAssessmentDO = businessSubSampleAssessmentMapper.selectByBusinessSubSampleIdAndConfigAssayMethodId(businessSubSampleId, configAssayMethodId);
BusinessAssayTaskDataDO newBusinessAssayTaskDataDO = null; BusinessAssayTaskDataDO newBusinessAssayTaskDataDO = null;
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectMaxAnalysisCountByBusinessSubSampleIdAndConfigAssayMethodId(businessSubSampleId, configAssayMethodId); List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectMaxAnalysisCountByBusinessSubSampleIdAndConfigAssayMethodId(businessSubSampleId, configAssayMethodId);
@@ -1085,6 +1015,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
throw new ServiceException(1_032_100_000, "超差判定计算出错检测项目ID: " + businessSubSampleAssessmentProjectDO.getDictionaryProjectId()); throw new ServiceException(1_032_100_000, "超差判定计算出错检测项目ID: " + businessSubSampleAssessmentProjectDO.getDictionaryProjectId());
} }
businessSubSampleAssessmentProjectDO.setAssessmentStatus(QmsCommonConstant.NORMAL);
// 判断相邻差值是否超差 // 判断相邻差值是否超差
for (int i = 0; i < sortedValues.size() - 1; i++) { for (int i = 0; i < sortedValues.size() - 1; i++) {
BigDecimal diff = sortedValues.get(i + 1).subtract(sortedValues.get(i)).abs(); BigDecimal diff = sortedValues.get(i + 1).subtract(sortedValues.get(i)).abs();

View File

@@ -5,14 +5,6 @@ import com.zt.plat.module.qms.business.bus.controller.vo.*;
/** /**
* <b>SampleAnalysisService</b> * <b>SampleAnalysisService</b>
* <p>
* 更新历史:
* <pre> 版本 更新时间 更新者 更新内容<hr/>
* V1.0 2025年9月22日 wxr Add</pre>
* <b>Copyright (C) 云南志者竟成科技有限公司</b>
* </p>
* @author 王兴荣<wxr@wangxingrong.com>
* @version V1.0
* @since 2025年9月22日 * @since 2025年9月22日
*/ */
public interface SampleAnalysisService { public interface SampleAnalysisService {

View File

@@ -4,7 +4,10 @@ import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@@ -21,8 +24,10 @@ import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX; import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils; import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
import com.zt.plat.module.qms.business.bus.controller.vo.BatchSampleAnalysisColumnRespVO; import com.zt.plat.module.qms.business.bus.controller.vo.BatchSampleAnalysisColumnRespVO;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayParameterDataExtendRespVO;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayParameterDataReqVO; import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayParameterDataReqVO;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectAndParameterRespVO; import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectAndParameterRespVO;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectDataExtendRespVO;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectDataReqVO; import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectDataReqVO;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskAnalysisSampleAndQcProjectRespVO; import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskAnalysisSampleAndQcProjectRespVO;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskAnalysisSampleProjectRespVO; import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskAnalysisSampleProjectRespVO;
@@ -31,6 +36,7 @@ import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskDataEx
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessQCCoefficientParameterDataReqVO; import com.zt.plat.module.qms.business.bus.controller.vo.BusinessQCCoefficientParameterDataReqVO;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessQCManagementParameterDataReqVO; import com.zt.plat.module.qms.business.bus.controller.vo.BusinessQCManagementParameterDataReqVO;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessQCManagementProjectDataReqVO; import com.zt.plat.module.qms.business.bus.controller.vo.BusinessQCManagementProjectDataReqVO;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessSubParentSampleAssessmentProjectExtendRespVO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayParameterDataDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayParameterDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO;
@@ -41,6 +47,9 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientP
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementParameterDataDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementParameterDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementProjectDataDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementProjectDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayParameterDataMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayParameterDataMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayProjectDataMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayProjectDataMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
@@ -51,36 +60,34 @@ import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientParam
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementDataMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementDataMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementParameterDataMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementParameterDataMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementProjectDataMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementProjectDataMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSampleEntrustDetailMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleAssessmentProjectMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
import com.zt.plat.module.qms.business.config.controller.vo.BusinessAssayTaskAnalysisDataRespVO; import com.zt.plat.module.qms.business.config.controller.vo.BusinessAssayTaskAnalysisDataRespVO;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodProjectCoefficientRespVO; import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodProjectCoefficientRespVO;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodProjectRangeRespVO; import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodProjectRangeRespVO;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigQCSampleMethodExtendRespVO; import com.zt.plat.module.qms.business.config.controller.vo.ConfigQCSampleMethodExtendRespVO;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfInfo;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfItem;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfPoint;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO; import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectCoefficientDO; import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectCoefficientDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectRangeDO; import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectRangeDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleMethodDO;
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodMapper; import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodMapper;
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectCoefficientMapper; import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectCoefficientMapper;
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectRangeMapper; import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectRangeMapper;
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigQCSampleMethodMapper; import com.zt.plat.module.qms.business.config.dal.mapper.ConfigQCSampleMethodMapper;
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigSubSampleMethodMapper;
import com.zt.plat.module.qms.common.data.dal.dataobject.DataCollectionDO; import com.zt.plat.module.qms.common.data.dal.dataobject.DataCollectionDO;
import com.zt.plat.module.qms.common.data.service.DataCollectionService; import com.zt.plat.module.qms.common.data.service.DataCollectionService;
import com.zt.plat.module.qms.enums.QmsCommonConstant; import com.zt.plat.module.qms.enums.QmsCommonConstant;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
/**
* <b>SampleAnalysisServiceImpl</b>
* <p>
* 更新历史:
* <pre> 版本 更新时间 更新者 更新内容<hr/>
* V1.0 2025年9月22日 wxr Add</pre>
* <b>Copyright (C) 云南志者竟成科技有限公司</b>
* </p>
* @author 王兴荣<wxr@wangxingrong.com>
* @version V1.0
* @since 2025年9月22日
*/
@Service @Service
public class SampleAnalysisServiceImpl implements SampleAnalysisService { public class SampleAnalysisServiceImpl implements SampleAnalysisService {
@@ -93,6 +100,12 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
@Resource @Resource
private ConfigAssayMethodProjectCoefficientMapper configAssayMethodProjectCoefficientMapper; private ConfigAssayMethodProjectCoefficientMapper configAssayMethodProjectCoefficientMapper;
@Resource
private ConfigSubSampleMethodMapper configSubSampleMethodMapper;
@Resource
private BusinessSubSampleMapper businessSubSampleMapper;
@Resource @Resource
private BusinessAssayTaskMapper businessAssayTaskMapper; private BusinessAssayTaskMapper businessAssayTaskMapper;
@@ -126,6 +139,15 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
@Resource @Resource
private BusinessQCManagementParameterDataMapper businessQCManagementParameterDataMapper; private BusinessQCManagementParameterDataMapper businessQCManagementParameterDataMapper;
@Resource
private BusinessSampleEntrustDetailMapper businessSampleEntrustDetailMapper;
@Resource
private BusinessSubParentSampleMapper businessSubParentSampleMapper;
@Resource
private BusinessSubParentSampleAssessmentProjectMapper businessSubParentSampleAssessmentProjectMapper;
@Resource @Resource
private DataCollectionService dataCollectionService; private DataCollectionService dataCollectionService;
@@ -161,12 +183,20 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
List<BusinessAssayTaskDetailDO> businessAssayTaskDetailList = businessAssayTaskDetailMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskDetailDO>().eq(BusinessAssayTaskDetailDO::getBusinessAssayTaskId, businessAssayTaskId)); List<BusinessAssayTaskDetailDO> businessAssayTaskDetailList = businessAssayTaskDetailMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskDetailDO>().eq(BusinessAssayTaskDetailDO::getBusinessAssayTaskId, businessAssayTaskId));
List<BusinessAssayTaskDataDO> businessAssayTaskDataList = businessAssayTaskDataMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskDataDO>().eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, businessAssayTaskId).eq(BusinessAssayTaskDataDO::getConfigAssayMethodId, businessAssayTaskDO.getConfigAssayMethodId())); List<BusinessAssayTaskDataDO> businessAssayTaskDataList = businessAssayTaskDataMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskDataDO>().eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, businessAssayTaskId).eq(BusinessAssayTaskDataDO::getConfigAssayMethodId, businessAssayTaskDO.getConfigAssayMethodId()));
BusinessAssayTaskDataDO businessAssayTaskData = businessAssayTaskDataList.get(0); List<Long> businessAssayTaskDataIdList = businessAssayTaskDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
//BusinessAssayTaskDataDO businessAssayTaskData = businessAssayTaskDataList.get(0);
BusinessAssayProjectDataReqVO projectDataSearch = new BusinessAssayProjectDataReqVO(); BusinessAssayProjectDataReqVO projectDataSearch = new BusinessAssayProjectDataReqVO();
projectDataSearch.setBusinessAssayTaskDataId(businessAssayTaskData.getId()); // projectDataSearch.setBusinessAssayTaskDataId(businessAssayTaskData.getId());
projectDataSearch.setBusinessAssayTaskDataIdList(businessAssayTaskDataIdList);
List<BusinessAssayProjectAndParameterRespVO> projectAndParameterList = businessAssayProjectDataMapper.selectProjectAndParameterBy(projectDataSearch); List<BusinessAssayProjectAndParameterRespVO> projectAndParameterList = businessAssayProjectDataMapper.selectProjectAndParameterBy(projectDataSearch);
for (BusinessAssayProjectAndParameterRespVO ep : projectAndParameterList) {
Map<Long, List<BusinessAssayProjectAndParameterRespVO>> projectAndParameterMap = projectAndParameterList.stream().sorted(Comparator.comparing(BusinessAssayProjectAndParameterRespVO::getParamNo)).collect(Collectors.groupingBy(BusinessAssayProjectAndParameterRespVO::getDicId,
LinkedHashMap::new, // 保持组首次出现的顺序(可选)
Collectors.toList() // ArrayList 保持组内顺序
));
for (Map.Entry<Long, List<BusinessAssayProjectAndParameterRespVO>> entry : projectAndParameterMap.entrySet()) {
BusinessAssayProjectAndParameterRespVO ep = entry.getValue().get(0);
String fieldIndex = "e" + ep.getDicId(); String fieldIndex = "e" + ep.getDicId();
String title = ep.getShowName() + (StringUtils.isBlank(ep.getUnit()) ? "" : "(" + ep.getUnit() + ")"); String title = ep.getShowName() + (StringUtils.isBlank(ep.getUnit()) ? "" : "(" + ep.getUnit() + ")");
boolean isEdit = StringUtils.isBlank(ep.getFormula()); boolean isEdit = StringUtils.isBlank(ep.getFormula());
@@ -183,7 +213,26 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", p.getDataType(), p.getDecimalPosition(), null, p.getFormula(), p.getParamNo(), isEdit, p.getUnit(), "parameter", p.getFillingWay(), p.getGroupDictionaryBusinessId(), p.getGroupDictionaryBusinessKey(), p.getGroupDictionaryBusinessName())); cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", p.getDataType(), p.getDecimalPosition(), null, p.getFormula(), p.getParamNo(), isEdit, p.getUnit(), "parameter", p.getFillingWay(), p.getGroupDictionaryBusinessId(), p.getGroupDictionaryBusinessKey(), p.getGroupDictionaryBusinessName()));
} }
} }
} }
// for (BusinessAssayProjectAndParameterRespVO ep : projectAndParameterList) {
// String fieldIndex = "e" + ep.getDicId();
// String title = ep.getShowName() + (StringUtils.isBlank(ep.getUnit()) ? "" : "(" + ep.getUnit() + ")");
// boolean isEdit = StringUtils.isBlank(ep.getFormula());
// cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", ep.getDataType(), ep.getDecimalPosition(), null, ep.getFormula(), ep.getParamNo(), isEdit, ep.getUnit(), "project", ep.getFillingWay(), ep.getGroupDictionaryBusinessId(), ep.getGroupDictionaryBusinessKey(), ep.getGroupDictionaryBusinessName()));
//
// if (StringUtils.isNotEmpty(ep.getFormula())) {
// BusinessAssayParameterDataReqVO parameterDataSearch = new BusinessAssayParameterDataReqVO();
// parameterDataSearch.setBusinessAssayProjectDataId(ep.getId());
// List<BusinessAssayProjectAndParameterRespVO> plist = businessAssayParameterDataMapper.selectProjectAndParameterBy(parameterDataSearch);
// for (BusinessAssayProjectAndParameterRespVO p : plist) {
// fieldIndex = "p" + p.getDicId();
// title = p.getShowName() + (StringUtils.isBlank(p.getUnit()) ? "" : "(" + p.getUnit() + ")");
// isEdit = StringUtils.isBlank(p.getFormula());
// cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", p.getDataType(), p.getDecimalPosition(), null, p.getFormula(), p.getParamNo(), isEdit, p.getUnit(), "parameter", p.getFillingWay(), p.getGroupDictionaryBusinessId(), p.getGroupDictionaryBusinessKey(), p.getGroupDictionaryBusinessName()));
// }
// }
// }
businessAssayTaskAnalysisSampleProjectRespVO.setColumns(cloumns); businessAssayTaskAnalysisSampleProjectRespVO.setColumns(cloumns);
@@ -419,12 +468,32 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
List<BusinessAssayTaskDetailDO> businessAssayTaskDetailList = businessAssayTaskDetailMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskDetailDO>().eq(BusinessAssayTaskDetailDO::getBusinessAssayTaskId, businessAssayTaskDO.getId())); List<BusinessAssayTaskDetailDO> businessAssayTaskDetailList = businessAssayTaskDetailMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskDetailDO>().eq(BusinessAssayTaskDetailDO::getBusinessAssayTaskId, businessAssayTaskDO.getId()));
List<BusinessAssayTaskDataDO> businessAssayTaskDataList = businessAssayTaskDataMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskDataDO>().eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, businessAssayTaskDO.getId()).eq(BusinessAssayTaskDataDO::getConfigAssayMethodId, businessAssayTaskDO.getConfigAssayMethodId())); List<BusinessAssayTaskDataDO> businessAssayTaskDataList = businessAssayTaskDataMapper.selectList(new LambdaQueryWrapperX<BusinessAssayTaskDataDO>().eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, businessAssayTaskDO.getId()).eq(BusinessAssayTaskDataDO::getConfigAssayMethodId, businessAssayTaskDO.getConfigAssayMethodId()));
BusinessAssayTaskDataDO businessAssayTaskData = businessAssayTaskDataList.get(0);
//子样Id列表
List<Long> businessSubSampleIdList = businessAssayTaskDataList.stream().map(m -> m.getBusinessSubSampleId()).distinct().collect(Collectors.toList());
//子样列表
List<BusinessSubSampleDO> businessSubSampleDOList = businessSubSampleMapper.selectByIds(businessSubSampleIdList);
//子样配置id列表
List<Long> configSubSampleIdList = businessSubSampleDOList.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
//子样方法配置列表
List<ConfigSubSampleMethodDO> configSubSampleMethodDOList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodId(configSubSampleIdList, businessAssayTaskDO.getConfigAssayMethodId());
List<Long> businessAssayTaskDataIdList = businessAssayTaskDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
// BusinessAssayTaskDataDO businessAssayTaskData = businessAssayTaskDataList.get(0);
BusinessAssayProjectDataReqVO projectDataSearch = new BusinessAssayProjectDataReqVO(); BusinessAssayProjectDataReqVO projectDataSearch = new BusinessAssayProjectDataReqVO();
projectDataSearch.setBusinessAssayTaskDataId(businessAssayTaskData.getId()); // projectDataSearch.setBusinessAssayTaskDataId(businessAssayTaskData.getId());
projectDataSearch.setBusinessAssayTaskDataIdList(businessAssayTaskDataIdList);
List<BusinessAssayProjectAndParameterRespVO> projectAndParameterList = businessAssayProjectDataMapper.selectProjectAndParameterBy(projectDataSearch); List<BusinessAssayProjectAndParameterRespVO> projectAndParameterList = businessAssayProjectDataMapper.selectProjectAndParameterBy(projectDataSearch);
for (BusinessAssayProjectAndParameterRespVO ep : projectAndParameterList) { Map<Long, List<BusinessAssayProjectAndParameterRespVO>> projectAndParameterMap = projectAndParameterList.stream().sorted(Comparator.comparing(BusinessAssayProjectAndParameterRespVO::getParamNo)).collect(Collectors.groupingBy(BusinessAssayProjectAndParameterRespVO::getDicId,
LinkedHashMap::new, // 保持组首次出现的顺序(可选)
Collectors.toList() // ArrayList 保持组内顺序
));
for (Map.Entry<Long, List<BusinessAssayProjectAndParameterRespVO>> entry : projectAndParameterMap.entrySet()) {
BusinessAssayProjectAndParameterRespVO ep = entry.getValue().get(0);
String fieldIndex = "e" + ep.getDicId(); String fieldIndex = "e" + ep.getDicId();
String title = ep.getShowName() + (StringUtils.isBlank(ep.getUnit()) ? "" : "(" + ep.getUnit() + ")"); String title = ep.getShowName() + (StringUtils.isBlank(ep.getUnit()) ? "" : "(" + ep.getUnit() + ")");
boolean isEdit = StringUtils.isBlank(ep.getFormula()); boolean isEdit = StringUtils.isBlank(ep.getFormula());
@@ -441,7 +510,25 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", p.getDataType(), p.getDecimalPosition(), null, p.getFormula(), p.getParamNo(), isEdit, p.getUnit(), "parameter", p.getFillingWay(), p.getGroupDictionaryBusinessId(), p.getGroupDictionaryBusinessKey(), p.getGroupDictionaryBusinessName())); cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", p.getDataType(), p.getDecimalPosition(), null, p.getFormula(), p.getParamNo(), isEdit, p.getUnit(), "parameter", p.getFillingWay(), p.getGroupDictionaryBusinessId(), p.getGroupDictionaryBusinessKey(), p.getGroupDictionaryBusinessName()));
} }
} }
} }
// for (BusinessAssayProjectAndParameterRespVO ep : projectAndParameterList) {
// String fieldIndex = "e" + ep.getDicId();
// String title = ep.getShowName() + (StringUtils.isBlank(ep.getUnit()) ? "" : "(" + ep.getUnit() + ")");
// boolean isEdit = StringUtils.isBlank(ep.getFormula());
// cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", ep.getDataType(), ep.getDecimalPosition(), null, ep.getFormula(), ep.getParamNo(), isEdit, ep.getUnit(), "project", ep.getFillingWay(), ep.getGroupDictionaryBusinessId(), ep.getGroupDictionaryBusinessKey(), ep.getGroupDictionaryBusinessName()));
//
// if (StringUtils.isNotEmpty(ep.getFormula())) {
// BusinessAssayParameterDataReqVO parameterDataSearch = new BusinessAssayParameterDataReqVO();
// parameterDataSearch.setBusinessAssayProjectDataId(ep.getId());
// List<BusinessAssayProjectAndParameterRespVO> plist = businessAssayParameterDataMapper.selectProjectAndParameterBy(parameterDataSearch);
// for (BusinessAssayProjectAndParameterRespVO p : plist) {
// fieldIndex = "p" + p.getDicId();
// title = p.getShowName() + (StringUtils.isBlank(p.getUnit()) ? "" : "(" + p.getUnit() + ")");
// isEdit = StringUtils.isBlank(p.getFormula());
// cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", p.getDataType(), p.getDecimalPosition(), null, p.getFormula(), p.getParamNo(), isEdit, p.getUnit(), "parameter", p.getFillingWay(), p.getGroupDictionaryBusinessId(), p.getGroupDictionaryBusinessKey(), p.getGroupDictionaryBusinessName()));
// }
// }
// }
businessAssayTaskAnalysisDataRespVO.setColumns(cloumns); businessAssayTaskAnalysisDataRespVO.setColumns(cloumns);
@@ -450,6 +537,62 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
for (BusinessAssayTaskDataDO businessAssayTaskDataDO : businessAssayTaskDataList) { for (BusinessAssayTaskDataDO businessAssayTaskDataDO : businessAssayTaskDataList) {
BusinessAssayTaskDetailDO businessAssayTaskDetailDO = businessAssayTaskDetailList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(businessAssayTaskDataDO.getId())).findFirst().orElse(null); BusinessAssayTaskDetailDO businessAssayTaskDetailDO = businessAssayTaskDetailList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(businessAssayTaskDataDO.getId())).findFirst().orElse(null);
BusinessSubSampleDO businessSubSampleDO = businessSubSampleDOList.stream().filter(f -> f.getId().equals(businessAssayTaskDataDO.getBusinessSubSampleId())).findFirst().orElse(null);
ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodDOList.stream().filter(f -> f.getConfigAssayMethodId().equals(businessAssayTaskDataDO.getConfigAssayMethodId()) && f.getConfigSubSampleId().equals(businessSubSampleDO.getConfigSubSampleId())).findFirst().orElse(null);
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
if (StringUtils.isNotBlank(configInfomation)) {
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
List<ConfigSubSampleMethodConfItem> getParamList = configSubSampleMethodConfInfo.getGetParam();
for (ConfigSubSampleMethodConfItem configSubSampleMethodConfItem: getParamList) {
//Boolean required = configSubSampleMethodConfItem.getRequired();//是否必须
ConfigSubSampleMethodConfPoint source = configSubSampleMethodConfItem.getSource();//来源
Long configMethodId = source.getMethodId();
String sourceProject = source.getProject();
//String sourceParameter = source.getParameter();
ConfigSubSampleMethodConfPoint target = configSubSampleMethodConfItem.getTarget();//目标
String targetProject = target.getProject();
String targetParameter = target.getParameter();
BusinessAssayParameterDataDO businessAssayParameterDataDO = businessAssayParameterDataMapper.selectByBusinessAssayTaskDataIdAndProjectSimpleNameAndParameterKey(businessAssayTaskDataDO.getId(), targetProject, targetParameter);
if (StringUtils.isBlank(businessAssayParameterDataDO.getValue())) {
//1 查询来源品位
BusinessSampleEntrustDetailDO businessSampleEntrustDetailDO = businessSampleEntrustDetailMapper.selectByBusinessBaseSampleId(businessAssayTaskDataDO.getBusinessBaseSampleId());
String forecastResult = businessSampleEntrustDetailDO.getForecastResult();//预报品位
if (StringUtils.isBlank(forecastResult)) {
//2 查询当前样品其他分析方法的结果 (废弃-20251202)
// List<Long> businessSubParentSampleIdList = Arrays.asList(businessAssayTaskDataDO.getBusinessSubParentSampleId());
// List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentProjectList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIdList, configMethodId);
// BusinessSubParentSampleAssessmentProjectExtendRespVO businessSubParentSampleAssessmentProject = businessSubParentSampleAssessmentProjectList.stream().filter(f -> f.getSimpleName().equals(sourceProject)).findFirst().orElse(null);
// if (businessSubParentSampleAssessmentProject == null || StringUtils.isBlank(businessSubParentSampleAssessmentProject.getAssessmentValue())) {
//3 查询当前批次委托的第一个样品对应的分析方法的结果
BusinessSampleEntrustDetailDO currBatchFirstBusinessSampleEntrustDetailDO = businessSampleEntrustDetailMapper.selectCurrBatchFirstByBusinessBaseSampleId(businessAssayTaskDataDO.getBusinessBaseSampleId());
List<BusinessSubParentSampleDO> currBusinessSubParentSampleDOList = businessSubParentSampleMapper.selectByBusinessBaseSampleId(currBatchFirstBusinessSampleEntrustDetailDO.getBusinessBaseSampleId());
List<Long> currBusinessSubParentSampleIdList = currBusinessSubParentSampleDOList.stream().map(m -> m.getId()).collect(Collectors.toList());
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentProjectList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(currBusinessSubParentSampleIdList, configMethodId);
BusinessSubParentSampleAssessmentProjectExtendRespVO businessSubParentSampleAssessmentProject = businessSubParentSampleAssessmentProjectList.stream().filter(f -> f.getSimpleName().equals(sourceProject)).findFirst().orElse(null);
if (businessSubParentSampleAssessmentProject != null && StringUtils.isNotBlank(businessSubParentSampleAssessmentProject.getAssessmentValue())) {
businessAssayParameterDataDO.setValue(businessSubParentSampleAssessmentProject.getAssessmentValue());
}
// } else {
// businessAssayParameterDataDO.setValue(businessSubParentSampleAssessmentProject.getAssessmentValue());
// }
} else {
JSONObject forecastResultJson = JSON.parseObject(forecastResult);
}
businessAssayParameterDataMapper.updateById(businessAssayParameterDataDO);
}
}
}
Map<String, Object> map = new HashedMap<>(); Map<String, Object> map = new HashedMap<>();
map.put("businessAssayTaskDataId", businessAssayTaskDataDO.getId()); map.put("businessAssayTaskDataId", businessAssayTaskDataDO.getId());
map.put("businessAssayTaskId", businessAssayTaskDataDO.getBusinessAssayTaskId()); map.put("businessAssayTaskId", businessAssayTaskDataDO.getBusinessAssayTaskId());
@@ -931,7 +1074,49 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void issuedIngredients(Long businessAssayTaskId) { public void issuedIngredients(Long businessAssayTaskId) {
BusinessAssayTaskDO businessAssayTaskDO = businessAssayTaskMapper.selectById(businessAssayTaskId); BusinessAssayTaskDO businessAssayTaskDO = businessAssayTaskMapper.selectById(businessAssayTaskId);
businessAssayTaskDO.setIngredientsStatus("in_progress"); List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessAssayTaskId(businessAssayTaskId);
List<Long> businessAssayTaskDataIdList = businessAssayTaskDataDOList.stream().map(m -> m.getId()).collect(Collectors.toList());
//获取子样id列表
List<Long> businessSubSampleIdList = businessAssayTaskDataDOList.stream().map(m -> m.getBusinessSubSampleId()).distinct().collect(Collectors.toList());
//获取子样
List<BusinessSubSampleDO> businessSubSampleDOList = businessSubSampleMapper.selectByIds(businessSubSampleIdList);
//子样配置id列表
List<Long> configSubSampleIdList = businessSubSampleDOList.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
//子样配置方法
List<ConfigSubSampleMethodDO> configSubSampleMethodList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodId(configSubSampleIdList, businessAssayTaskDO.getConfigAssayMethodId());
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataIds(businessAssayTaskDataIdList);
List<Long> businessAssayProjectDataIdList = businessAssayProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
//查询检测项目参数
List<BusinessAssayParameterDataExtendRespVO> businessAssayParameterDataList = businessAssayParameterDataMapper.selectExtendByBusinessAssayProjectDataIds(businessAssayProjectDataIdList);
for (BusinessAssayTaskDataDO businessAssayTaskDataDO : businessAssayTaskDataDOList) {
//获取子样
BusinessSubSampleDO businessSubSampleDO = businessSubSampleDOList.stream().filter(f -> f.getId().equals(businessAssayTaskDataDO.getBusinessSubSampleId())).findFirst().orElse(null);
//子样配置信息
ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodList.stream().filter(f -> f.getConfigSubSampleId().equals(businessSubSampleDO.getConfigSubSampleId())).findFirst().orElse(null);
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
if (StringUtils.isNotBlank(configInfomation)) {
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
//获取下发配置
List<ConfigSubSampleMethodConfItem> downIngredients = configSubSampleMethodConfInfo.getDownIngredients();
for (ConfigSubSampleMethodConfItem configSubSampleMethodConfItem : downIngredients) {
if (configSubSampleMethodConfItem.getRequired()) {
ConfigSubSampleMethodConfPoint source = configSubSampleMethodConfItem.getSource();
String project = source.getProject();
String parameter = source.getParameter();
BusinessAssayProjectDataExtendRespVO currentBusinessAssayProjectData = businessAssayProjectDataList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(businessAssayTaskDataDO.getId()) && f.getSimpleName().equals(project)).findFirst().orElse(null);
BusinessAssayParameterDataExtendRespVO currentBusinessAssayParameterData = businessAssayParameterDataList.stream().filter(f -> f.getBusinessAssayProjectDataId().equals(currentBusinessAssayProjectData.getId()) && f.getParameterKey().equals(parameter)).findFirst().orElse(null);
if (StringUtils.isBlank(currentBusinessAssayParameterData.getValue())) {
throw new ServiceException(1_032_050_000, "当前分析任务,存在下发配料必填为空情况。请检查后再下发!");
}
}
}
}
}
businessAssayTaskDO.setIngredientsStatus(QmsCommonConstant.IN_PROGRESS);
businessAssayTaskMapper.updateById(businessAssayTaskDO); businessAssayTaskMapper.updateById(businessAssayTaskDO);
} }

View File

@@ -36,6 +36,7 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDa
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayReportDataDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayReportDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleAssessmentDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleAssessmentProjectDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleAssessmentProjectDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAnalysisGroupDO; import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAnalysisGroupDO;
@@ -47,6 +48,7 @@ import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayProjectDataMa
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayReportDataMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayReportDataMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessBaseSampleMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessBaseSampleMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleAssessmentMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleAssessmentProjectMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleAssessmentProjectMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleAnalysisGroupMapper; import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleAnalysisGroupMapper;
@@ -131,10 +133,18 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
//查询结果报送未上报的样品 //查询结果报送未上报的样品
List<NoReportSubParentSampleAssessmentRespVO> noReportSubParentSampleAssessmentRespList = businessSubParentSampleAssessmentProjectMapper.selectNoReportSubParentSampleAssessment(configAssayMethodId); List<NoReportSubParentSampleAssessmentRespVO> noReportSubParentSampleAssessmentRespList = businessSubParentSampleAssessmentProjectMapper.selectNoReportSubParentSampleAssessment(configAssayMethodId);
if (CollUtil.isEmpty(noReportSubParentSampleAssessmentRespList)) {//没有查询到未上报的数据
JSONObject json = new JSONObject();
json.put("columns", columnList);
json.put("datas", dataList);
return json;
}
//分样id列表 //分样id列表
List<Long> businessSubParentSampleIds = noReportSubParentSampleAssessmentRespList.stream().map(m -> m.getBusinessSubParentSampleId()).collect(Collectors.toList()); List<Long> businessSubParentSampleIds = noReportSubParentSampleAssessmentRespList.stream().map(m -> m.getBusinessSubParentSampleId()).collect(Collectors.toList());
//报送的检测项目数据 //报送的检测项目数据
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentDOList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdAndConfigAssayMethodId(businessSubParentSampleIds, configAssayMethodId); List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentDOList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIds, configAssayMethodId);
//获取分析任务数 //获取分析任务数
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIds, configAssayMethodId); List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIds, configAssayMethodId);
List<Long> businessSubSampleIds = businessAssayTaskDataDOList.stream().map(m -> m.getBusinessSubSampleId()).distinct().collect(Collectors.toList()); List<Long> businessSubSampleIds = businessAssayTaskDataDOList.stream().map(m -> m.getBusinessSubSampleId()).distinct().collect(Collectors.toList());
@@ -410,6 +420,9 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
@Resource @Resource
private BusinessSubSampleAnalysisGroupMapper businessSubSampleAnalysisGroupMapper; private BusinessSubSampleAnalysisGroupMapper businessSubSampleAnalysisGroupMapper;
@Resource
private BusinessSubParentSampleAssessmentMapper businessSubParentSampleAssessmentMapper;
@Resource @Resource
private SampleFlowService sampleFlowService; private SampleFlowService sampleFlowService;
@@ -427,10 +440,12 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
List<BusinessAssayReportDataDO> saveBusinessAssayReportDataDOList = new ArrayList<>(); List<BusinessAssayReportDataDO> saveBusinessAssayReportDataDOList = new ArrayList<>();
List<BusinessAssayReportDataDO> updateBusinessAssayReportDataDOList = new ArrayList<>(); List<BusinessAssayReportDataDO> updateBusinessAssayReportDataDOList = new ArrayList<>();
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentExtendList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdAndConfigAssayMethodId(reqVO.getBusinessSubParentSampleIds(), reqVO.getConfigAssayMethodId()); List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentExtendList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(reqVO.getBusinessSubParentSampleIds(), reqVO.getConfigAssayMethodId());
List<BusinessSubParentSampleDO> businessSubParentSampleDOList = businessSubParentSampleMapper.selectByIds(reqVO.getBusinessSubParentSampleIds()); List<BusinessSubParentSampleDO> businessSubParentSampleDOList = businessSubParentSampleMapper.selectByIds(reqVO.getBusinessSubParentSampleIds());
// List<BusinessSubParentSampleAssessmentDO> businessSubParentSampleAssessmentDOList = businessSubParentSampleAssessmentMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(reqVO.getBusinessSubParentSampleIds(), reqVO.getConfigAssayMethodId());
//循环分样主样数据 //循环分样主样数据
for (BusinessSubParentSampleDO businessSubParentSampleDO : businessSubParentSampleDOList) { for (BusinessSubParentSampleDO businessSubParentSampleDO : businessSubParentSampleDOList) {
@@ -572,6 +587,14 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
.set(BusinessSubParentSampleAssessmentProjectDO::getReportTime, LocalDateTime.now()) .set(BusinessSubParentSampleAssessmentProjectDO::getReportTime, LocalDateTime.now())
.in(BusinessSubParentSampleAssessmentProjectDO::getId, businessSubParentSampleAssessmentIdList)); .in(BusinessSubParentSampleAssessmentProjectDO::getId, businessSubParentSampleAssessmentIdList));
businessSubParentSampleAssessmentMapper.update(new LambdaUpdateWrapper<BusinessSubParentSampleAssessmentDO>()
.set(BusinessSubParentSampleAssessmentDO::getIsReported, QmsCommonConstant.YES)
.set(BusinessSubParentSampleAssessmentDO::getReporter, nickName)
.set(BusinessSubParentSampleAssessmentDO::getReportTime, LocalDateTime.now())
.in(BusinessSubParentSampleAssessmentDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleIds())
.eq(BusinessSubParentSampleAssessmentDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId()));
if (updateBusinessSubSampleDOList.size() > 0) { if (updateBusinessSubSampleDOList.size() > 0) {
SampleFlowParam sampleFlowParam = new SampleFlowParam(); SampleFlowParam sampleFlowParam = new SampleFlowParam();

View File

@@ -519,6 +519,7 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
businessQCCoefficientDataDO.setAssayDepartmentId(configAssayMethodDO.getAssayDepartmentId()); businessQCCoefficientDataDO.setAssayDepartmentId(configAssayMethodDO.getAssayDepartmentId());
businessQCCoefficientDataDO.setAssayDepartmentName(configAssayMethodDO.getAssayDepartmentName()); businessQCCoefficientDataDO.setAssayDepartmentName(configAssayMethodDO.getAssayDepartmentName());
businessQCCoefficientDataDO.setAssayOperator(businessAssayTaskDO.getAssayOperator()); businessQCCoefficientDataDO.setAssayOperator(businessAssayTaskDO.getAssayOperator());
businessQCCoefficientDataDO.setAssayOperatorId(businessAssayTaskDO.getAssayOperatorId());
businessQCCoefficientDataDO.setAssayProject(""); businessQCCoefficientDataDO.setAssayProject("");
businessQCCoefficientDataDO.setAssignTaskTime(businessAssayTaskDO.getTaskAssignTime()); businessQCCoefficientDataDO.setAssignTaskTime(businessAssayTaskDO.getTaskAssignTime());
businessQCCoefficientDataDO.setIsAssignTasked(QmsCommonConstant.YES); businessQCCoefficientDataDO.setIsAssignTasked(QmsCommonConstant.YES);
@@ -562,6 +563,7 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
businessQCManagementDataDO.setAssayDepartmentId(configAssayMethodDO.getAssayDepartmentId()); businessQCManagementDataDO.setAssayDepartmentId(configAssayMethodDO.getAssayDepartmentId());
businessQCManagementDataDO.setAssayDepartmentName(configAssayMethodDO.getAssayDepartmentName()); businessQCManagementDataDO.setAssayDepartmentName(configAssayMethodDO.getAssayDepartmentName());
businessQCManagementDataDO.setAssayOperator(businessAssayTaskDO.getAssayOperator()); businessQCManagementDataDO.setAssayOperator(businessAssayTaskDO.getAssayOperator());
businessQCManagementDataDO.setAssayOperatorId(businessAssayTaskDO.getAssayOperatorId());
businessQCManagementDataDO.setAssayProject(assayProject); businessQCManagementDataDO.setAssayProject(assayProject);
businessQCManagementDataDO.setAssignTaskTime(businessAssayTaskDO.getTaskAssignTime()); businessQCManagementDataDO.setAssignTaskTime(businessAssayTaskDO.getTaskAssignTime());
businessQCManagementDataDO.setIsAssignTasked(QmsCommonConstant.YES); businessQCManagementDataDO.setIsAssignTasked(QmsCommonConstant.YES);

View File

@@ -1,8 +1,16 @@
package com.zt.plat.module.qms.business.config.controller.admin; package com.zt.plat.module.qms.business.config.controller.admin;
import com.zt.plat.framework.security.core.LoginUser;
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigPermissionRespVO;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationPageReqVO; import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationPageReqVO;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationRespVO; import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationRespVO;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationSaveReqVO; import com.zt.plat.module.qms.business.config.controller.vo.ConfigWarehouseLocationSaveReqVO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigPermissionDO;
import com.zt.plat.module.qms.business.config.service.ConfigPermissionService;
import com.zt.plat.module.qms.enums.QmsPermissionConstant;
import com.zt.plat.module.qms.enums.QmsWarehouseLocationConstant;
import com.zt.plat.module.system.api.permission.PermissionApi;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@@ -40,8 +48,16 @@ import com.zt.plat.module.qms.business.config.service.ConfigWarehouseLocationSer
public class ConfigWarehouseLocationController implements BusinessControllerMarker { public class ConfigWarehouseLocationController implements BusinessControllerMarker {
@Resource @Resource private ConfigWarehouseLocationService configWarehouseLocationService;
private ConfigWarehouseLocationService configWarehouseLocationService; @Resource private ConfigPermissionService configPermissionService;
@Resource private PermissionApi permissionApi;
@PostMapping("/save")
@Operation(summary = "创建存放位置")
// @PreAuthorize("@ss.hasPermission('qms:config-warehouse-location:create')")
public CommonResult<ConfigWarehouseLocationRespVO> save(@Valid @RequestBody ConfigWarehouseLocationSaveReqVO createReqVO) {
return success(configWarehouseLocationService.save(createReqVO));
}
@PostMapping("/create") @PostMapping("/create")
@Operation(summary = "创建存放位置") @Operation(summary = "创建存放位置")
@@ -82,15 +98,35 @@ public class ConfigWarehouseLocationController implements BusinessControllerMark
// @PreAuthorize("@ss.hasPermission('qms:config-warehouse-location:query')") // @PreAuthorize("@ss.hasPermission('qms:config-warehouse-location:query')")
public CommonResult<ConfigWarehouseLocationRespVO> getConfigWarehouseLocation(@RequestParam("id") Long id) { public CommonResult<ConfigWarehouseLocationRespVO> getConfigWarehouseLocation(@RequestParam("id") Long id) {
ConfigWarehouseLocationDO configWarehouseLocation = configWarehouseLocationService.getConfigWarehouseLocation(id); ConfigWarehouseLocationDO configWarehouseLocation = configWarehouseLocationService.getConfigWarehouseLocation(id);
return success(BeanUtils.toBean(configWarehouseLocation, ConfigWarehouseLocationRespVO.class)); List<ConfigPermissionDO> permissionList = configPermissionService.getPermissionList(id, QmsPermissionConstant.SAMPLE_WAREHOUSE_ADMIN, "");
List<ConfigPermissionRespVO> permissionRespVOList= BeanUtils.toBean(permissionList, ConfigPermissionRespVO.class);
ConfigWarehouseLocationRespVO vo = BeanUtils.toBean(configWarehouseLocation, ConfigWarehouseLocationRespVO.class);
vo.setPermissionList(permissionRespVOList);
return success(vo);
} }
@GetMapping("/page") @GetMapping("/page")
@Operation(summary = "获得存放位置分页") @Operation(summary = "获得存放位置分页")
// @PreAuthorize("@ss.hasPermission('qms:config-warehouse-location:query')") // @PreAuthorize("@ss.hasPermission('qms:config-warehouse-location:query')")
public CommonResult<PageResult<ConfigWarehouseLocationRespVO>> getConfigWarehouseLocationPage(@Valid ConfigWarehouseLocationPageReqVO pageReqVO) { public CommonResult<PageResult<ConfigWarehouseLocationRespVO>> getConfigWarehouseLocationPage(@Valid ConfigWarehouseLocationPageReqVO pageReqVO) {
PageResult<ConfigWarehouseLocationDO> pageResult = configWarehouseLocationService.getConfigWarehouseLocationPage(pageReqVO); PageResult<ConfigWarehouseLocationRespVO> pageResult = configWarehouseLocationService.getConfigWarehouseLocationPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, ConfigWarehouseLocationRespVO.class)); return success(pageResult);
}
@GetMapping("/selectListWithPermission")
@Operation(summary = "安权限查询报告类型")
public CommonResult<List<ConfigWarehouseLocationRespVO>> selectListWithPermission(@Valid ConfigWarehouseLocationPageReqVO pageReqVO) {
pageReqVO.setPermissionFilterFlag("1");
pageReqVO.setSrcPermissionType(QmsPermissionConstant.SAMPLE_WAREHOUSE_ADMIN);
pageReqVO.setDataType(QmsWarehouseLocationConstant.DATA_TYPE_WAREHOUSE);
//查询权限
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
Long userId = loginUser.getId();
CommonResult<Set<Long>> roleRet = permissionApi.getUserRoleIdListByUserId(userId);
Set<Long> roleIds = roleRet.getData();
pageReqVO.setRoleIds(roleIds);
List<ConfigWarehouseLocationDO> list = configWarehouseLocationService.selectListWithPermission(pageReqVO);
return success(BeanUtils.toBean(list, ConfigWarehouseLocationRespVO.class));
} }
@GetMapping("/export-excel") @GetMapping("/export-excel")
@@ -100,10 +136,9 @@ public class ConfigWarehouseLocationController implements BusinessControllerMark
public void exportConfigWarehouseLocationExcel(@Valid ConfigWarehouseLocationPageReqVO pageReqVO, public void exportConfigWarehouseLocationExcel(@Valid ConfigWarehouseLocationPageReqVO pageReqVO,
HttpServletResponse response) throws IOException { HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<ConfigWarehouseLocationDO> list = configWarehouseLocationService.getConfigWarehouseLocationPage(pageReqVO).getList(); List<ConfigWarehouseLocationRespVO> list = configWarehouseLocationService.getConfigWarehouseLocationPage(pageReqVO).getList();
// 导出 Excel // 导出 Excel
ExcelUtils.write(response, "存放位置.xls", "数据", ConfigWarehouseLocationRespVO.class, ExcelUtils.write(response, "存放位置.xls", "数据", ConfigWarehouseLocationRespVO.class, list);
BeanUtils.toBean(list, ConfigWarehouseLocationRespVO.class));
} }
} }

View File

@@ -70,6 +70,10 @@ public class MaterialAssayStandardController implements BusinessControllerMarker
@Operation(summary = "更新检测标准") @Operation(summary = "更新检测标准")
//@PreAuthorize("@ss.hasPermission('qms:material-assay-standard:update')") //@PreAuthorize("@ss.hasPermission('qms:material-assay-standard:update')")
public CommonResult<Boolean> updateMaterialAssayStandard(@Valid @RequestBody MaterialAssayStandardSaveReqVO updateReqVO) { public CommonResult<Boolean> updateMaterialAssayStandard(@Valid @RequestBody MaterialAssayStandardSaveReqVO updateReqVO) {
Long id = updateReqVO.getId();
MaterialAssayStandardDO entity = materialAssayStandardService.getMaterialAssayStandard(id);
if("tempDataKey".equals(entity.getRemark()))
updateReqVO.setRemark("");
materialAssayStandardService.updateMaterialAssayStandard(updateReqVO); materialAssayStandardService.updateMaterialAssayStandard(updateReqVO);
return success(true); return success(true);
} }

View File

@@ -74,6 +74,14 @@ public class MaterialAssayStandardDetailController implements BusinessController
return success(jsonArray); return success(jsonArray);
} }
@GetMapping("/getByStandardId")
@Operation(summary = "获得物料检测标准检测项目分页")
//@PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:query')")
public CommonResult<List<MaterialAssayStandardDetailRespVO>> getByStandardId(@Valid MaterialAssayStandardDetailPageReqVO pageReqVO) {
List<MaterialAssayStandardDetailRespVO> list = materialAssayStandardDetailService.getByStandardId(pageReqVO.getMaterialAssayStandardId());
return success(list);
}
@PostMapping("/create") @PostMapping("/create")
@Operation(summary = "创建物料检测标准检测项目") @Operation(summary = "创建物料检测标准检测项目")
//@PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:create')") //@PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:create')")

View File

@@ -19,6 +19,27 @@ public class ConfigAssayMethodProjectParameterPageReqVO extends PageParam {
@Schema(description = "参数ID,字典表【T_DIC_PRM】", example = "1283") @Schema(description = "参数ID,字典表【T_DIC_PRM】", example = "1283")
private Long dictionaryParameterId; private Long dictionaryParameterId;
@Schema(description = "参数名称", example = "李四")
private String parameterName;
@Schema(description = "参数简称", example = "李四")
private String shortName;
@Schema(description = "参数序号")
private Integer no;
@Schema(description = "键值")
private String key;
@Schema(description = "单位ID,UNT表", example = "31081")
private Long unitId;
@Schema(description = "单位")
private String unit;
@Schema(description = "填写方式,字典表【T_DIC_BSN】keyboard-人工数字键盘录入input-人工文本录入,collect-天平采集,calculate-计算", requiredMode = Schema.RequiredMode.REQUIRED)
private String fillingWay;
@Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串整数小数,日期,时间", example = "2") @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串整数小数,日期,时间", example = "2")
private String dataType; private String dataType;

View File

@@ -24,6 +24,27 @@ public class ConfigAssayMethodProjectParameterRespVO {
@ExcelProperty("参数ID,字典表【T_DIC_PRM】") @ExcelProperty("参数ID,字典表【T_DIC_PRM】")
private Long dictionaryParameterId; private Long dictionaryParameterId;
@Schema(description = "参数名称", example = "李四")
private String parameterName;
@Schema(description = "参数简称", example = "李四")
private String shortName;
@Schema(description = "参数序号")
private Integer no;
@Schema(description = "键值")
private String key;
@Schema(description = "单位ID,UNT表", example = "31081")
private Long unitId;
@Schema(description = "单位")
private String unit;
@Schema(description = "填写方式,字典表【T_DIC_BSN】keyboard-人工数字键盘录入input-人工文本录入,collect-天平采集,calculate-计算", requiredMode = Schema.RequiredMode.REQUIRED)
private String fillingWay;
@Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串整数小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串整数小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("数据类型,【字典】【jy_sample_data_type】字符串整数小数,日期,时间") @ExcelProperty("数据类型,【字典】【jy_sample_data_type】字符串整数小数,日期,时间")
private String dataType; private String dataType;

View File

@@ -20,6 +20,27 @@ public class ConfigAssayMethodProjectParameterSaveReqVO {
@NotNull(message = "参数ID,字典表【T_DIC_PRM】不能为空") @NotNull(message = "参数ID,字典表【T_DIC_PRM】不能为空")
private Long dictionaryParameterId; private Long dictionaryParameterId;
@Schema(description = "参数名称", example = "李四")
private String parameterName;
@Schema(description = "参数简称", example = "李四")
private String shortName;
@Schema(description = "参数序号")
private Integer no;
@Schema(description = "键值")
private String key;
@Schema(description = "单位ID,UNT表", example = "31081")
private Long unitId;
@Schema(description = "单位")
private String unit;
@Schema(description = "填写方式,字典表【T_DIC_BSN】keyboard-人工数字键盘录入input-人工文本录入,collect-天平采集,calculate-计算", requiredMode = Schema.RequiredMode.REQUIRED)
private String fillingWay;
@Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串整数小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串整数小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotEmpty(message = "数据类型,【字典】【jy_sample_data_type】字符串整数小数,日期,时间不能为空") @NotEmpty(message = "数据类型,【字典】【jy_sample_data_type】字符串整数小数,日期,时间不能为空")
private String dataType; private String dataType;

View File

@@ -1,23 +1,8 @@
package com.zt.plat.module.qms.business.config.controller.vo; package com.zt.plat.module.qms.business.config.controller.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
@Data @Data
public class ConfigQCSampleMethodParameterExtendRespVO extends ConfigQCSampleMethodParameterRespVO { public class ConfigQCSampleMethodParameterExtendRespVO extends ConfigQCSampleMethodParameterRespVO {
@Schema(description = "参数序号")
private Integer dictionaryParameterNo;
@Schema(description = "名称", example = "王五")
private String dictionaryParameterName;
@Schema(description = "键值")
private String dictionaryParameterKey;
@Schema(description = "检测单位ID,UNT表", example = "20894")
private Long dictionaryParameterUnitId;
@Schema(description = "单位")
private String dictionaryParameterUnit;
} }

Some files were not shown because too many files have changed in this diff Show More