Compare commits
423 Commits
6aa8f0d1ea
...
test
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d8a5c1e88 | |||
|
|
9014e8bcc8 | ||
|
|
fa43a6579a | ||
| 33b5ec7be5 | |||
| 5a82d9abd8 | |||
|
|
a96fa0ed9b | ||
|
|
8121c7a97f | ||
| a8330ade63 | |||
| e9259122b7 | |||
| fbd13f50d4 | |||
|
|
58ab9961c4 | ||
| 3302a2ee7c | |||
|
|
1bbfa9a950 | ||
|
|
57bf9b0cd5 | ||
|
|
5bf435b08e | ||
|
|
3bf8ee09b7 | ||
|
|
4444d9e3c0 | ||
| 9348c33f1b | |||
| 969fb2edf7 | |||
| e6d08d975f | |||
| 3cd25f68ef | |||
|
|
5a03ed1cab | ||
|
|
1c5588a05a | ||
|
|
2111c8b3ad | ||
|
|
675e1fe850 | ||
|
|
c7d4399e53 | ||
|
|
2fae2ccac2 | ||
|
|
533b96fb6a | ||
|
|
525d588c20 | ||
| be2f28cef5 | |||
| ce9aff5583 | |||
|
|
71206f43a3 | ||
|
|
0d164c660e | ||
| 2336c370fa | |||
| a578426458 | |||
| 892596fc2e | |||
| 50a868e0a0 | |||
|
|
99b6521c19 | ||
|
|
215ec8b5aa | ||
| b408d1e726 | |||
| 23babc6795 | |||
|
|
6d7caf5738 | ||
|
|
3cb93ce84c | ||
|
|
ac44920fa7 | ||
|
|
53d40a4b27 | ||
|
|
7d8b8c55f1 | ||
|
|
b529df9860 | ||
|
|
34277c921a | ||
|
|
0b936b7b8f | ||
| e20827cd0e | |||
| e64c3a8791 | |||
|
|
ae34b13023 | ||
|
|
9e67e1c784 | ||
| 77b1be3e0a | |||
|
|
ccfa341429 | ||
|
|
0ddf5cb33f | ||
|
|
7e7295cb74 | ||
|
|
c78f6b0992 | ||
|
|
908a18b6f1 | ||
| 6e3972d5a0 | |||
| 202cfe4d26 | |||
|
|
cd27be0fa5 | ||
|
|
0b7fb7748a | ||
| 18bece858d | |||
|
|
10716a0ec5 | ||
| 2b59974442 | |||
| 68831680fd | |||
| 8a1b2f0eb3 | |||
| 8945098344 | |||
| d1c26d70f6 | |||
|
|
b7db2d34ac | ||
| e179cbdd0d | |||
|
|
8fa11eb44c | ||
|
|
520e5a9add | ||
|
|
9e3b402b1f | ||
| 0a9348cd60 | |||
| 80a932e802 | |||
|
|
3ea0b06cc3 | ||
|
|
3c4b951c7b | ||
| cc2812c458 | |||
| 28a8970c03 | |||
| 227960e9b1 | |||
|
|
8af535b12c | ||
|
|
5e71453113 | ||
| f5fc940f54 | |||
| 286d512bfe | |||
|
|
96e3e9567e | ||
|
|
e7a844cc8f | ||
|
|
91815c5e84 | ||
|
|
cc5e04bb40 | ||
|
|
778b5f751d | ||
| 09b31ad940 | |||
| df9747044d | |||
| 635c30f850 | |||
| 69a3f75f89 | |||
|
|
58f9c9a350 | ||
|
|
b78c9ed179 | ||
| 94074868d9 | |||
|
|
f9f87648af | ||
|
|
b8bf7a3d9d | ||
|
|
71bb44e053 | ||
|
|
363185faed | ||
| 2b8f9da407 | |||
|
|
d0aff7840d | ||
|
|
575e40773d | ||
| 3659edb3f5 | |||
| b4bfece4b3 | |||
| 5ca2253522 | |||
| 76b44686fb | |||
|
|
dc23a86c29 | ||
| b0d45e5cde | |||
|
|
d9f7330f57 | ||
|
|
f4e4d56e97 | ||
|
|
171c406b29 | ||
| 4019440537 | |||
| 6de99cec7d | |||
| ef7285f95d | |||
|
|
8c3a1bdff8 | ||
|
|
2fc4cb1f6b | ||
|
|
b0a9a9b4fc | ||
|
|
dd63f9e1dc | ||
| 668df796ed | |||
| dbf678e8a6 | |||
| ee4f7aba86 | |||
| da39c68aa1 | |||
| 054c3ddda1 | |||
| 9110b2a546 | |||
| b6b576e2ae | |||
| 9faf6091cf | |||
| 0f379a035b | |||
| 05ce6a8aa6 | |||
| d6f2470104 | |||
| 20d87e67fe | |||
| 9ddb1857e6 | |||
| 6607abd6c5 | |||
| e75ebd9a2c | |||
| ae90142aad | |||
|
|
8977be538d | ||
|
|
24f4e011be | ||
|
|
e30b19cec0 | ||
| 3e8deaf7b5 | |||
| 8309ac0f4e | |||
| 45ba58cadb | |||
| eb757e8271 | |||
|
|
11bb57b1a4 | ||
|
|
a536f5c841 | ||
| 607dc05409 | |||
| dd6df68061 | |||
|
|
468e939ab1 | ||
|
|
90b0aa5202 | ||
|
|
33543e5330 | ||
|
|
6a3d585802 | ||
|
|
9eec0bb05e | ||
|
|
8fd750a82f | ||
|
|
2790ed7ea1 | ||
|
|
9f4369bcb2 | ||
|
|
920292cfac | ||
|
|
1187038ba8 | ||
|
|
e2678fe7b4 | ||
|
|
c1b975cca0 | ||
|
|
b7f30012c8 | ||
|
|
000cfca842 | ||
| 6b006513af | |||
|
|
f2571944c1 | ||
|
|
8e3994b6a8 | ||
|
|
c7f3bc0a46 | ||
| 54bc4b8b37 | |||
|
|
d0ee704939 | ||
|
|
9cf4af15c2 | ||
|
|
ac308f30a2 | ||
|
|
60b2761b2c | ||
|
|
a17621b0dd | ||
| 9ec70c1721 | |||
|
|
3a5f6994a7 | ||
|
|
b355668284 | ||
| 8d75bc0765 | |||
| 0b44562b58 | |||
| 90a1dfbd37 | |||
| 61d91d29b0 | |||
|
|
212a28059c | ||
|
|
d84f1adf65 | ||
|
|
4b9d27e8fc | ||
| d41f69cc51 | |||
| 15621a9a56 | |||
|
|
06be110e5d | ||
|
|
ae0f0d79c5 | ||
| 93cf620376 | |||
| be89a965d8 | |||
|
|
8fa69a0906 | ||
|
|
3bb70a94f2 | ||
| 433ac9124b | |||
| 3285e6050a | |||
|
|
c68c7cfbf2 | ||
| 04596350b6 | |||
|
|
927731c217 | ||
| 2b60bd7c7b | |||
|
|
9a2b45e29c | ||
| 7c7e7b4761 | |||
|
|
39d720c1df | ||
|
|
d6fc03b199 | ||
|
|
04ac449897 | ||
|
|
eff36758c2 | ||
|
|
9323bb3706 | ||
|
|
b2c34982f9 | ||
|
|
cb50244685 | ||
|
|
246e6391b8 | ||
| 4c129dee4e | |||
| 63fc44a7d1 | |||
| 9a4e50b081 | |||
|
|
7f1c4dd8c4 | ||
| 7a03bc6293 | |||
| 171de4c8d4 | |||
|
|
60bc01201b | ||
|
|
8fdeb65895 | ||
|
|
41b4e53db1 | ||
| 600e8bcd92 | |||
| 353a6dcb3e | |||
| ab505189f3 | |||
| 3b306b4137 | |||
| 9b99e41676 | |||
|
|
1dbbeba233 | ||
|
|
b92d61648f | ||
| b85eb7ea91 | |||
| 76069855ec | |||
| ea948a70bc | |||
| e133ec82c8 | |||
| be75cb4cf9 | |||
| b320d36181 | |||
|
|
172f04a260 | ||
| 821ce6a7cf | |||
|
|
c7fe2db73c | ||
| 984ae17431 | |||
| 4fd689c530 | |||
|
|
2c377a76ec | ||
|
|
2f71bc7fb1 | ||
| 30ce46ce4d | |||
|
|
d25658f202 | ||
|
|
8aa329d989 | ||
|
|
a3a31d8600 | ||
| daafd3ae37 | |||
| 91df898e09 | |||
|
|
baa7884fd7 | ||
|
|
c522cf5f8f | ||
|
|
46aa2c9692 | ||
|
|
411983986f | ||
|
|
94757f31de | ||
|
|
42afe2adb3 | ||
|
|
5657f8cf09 | ||
| a49bee0abd | |||
| d0673f36b1 | |||
|
|
eaea741480 | ||
|
|
44a6e11803 | ||
| cc79a15a16 | |||
| 1e82c22284 | |||
| c2d067e47c | |||
| 92ec9454ba | |||
|
|
57041e4adc | ||
|
|
a8580e1e30 | ||
|
|
82934c153d | ||
| 87fbd54692 | |||
| 918f8465a9 | |||
| 5ef620fa9a | |||
| 2b45f932dc | |||
| 6ca60e94cd | |||
| 8b3bfe2083 | |||
|
|
9037a27cb8 | ||
|
|
a26327d4e7 | ||
|
|
3028d478fe | ||
| c6c44828e0 | |||
| 1f8aebf598 | |||
| caba1edf4c | |||
|
|
3c70d53533 | ||
|
|
d814fae16d | ||
|
|
0e07b41c22 | ||
|
|
e6113058c0 | ||
| 5ec35399de | |||
|
|
49b6f956ff | ||
|
|
d80d5da026 | ||
|
|
c3f891095f | ||
|
|
ac2295cac9 | ||
|
|
36289be12b | ||
| c858ecf8b4 | |||
| 18e4245eff | |||
| 376902462b | |||
|
|
c80aeece47 | ||
|
|
12cd5a4d94 | ||
| 524ea2687f | |||
| 24a6e95f26 | |||
| dddf21c94f | |||
| 6e3e604fca | |||
|
|
4394c4ecf8 | ||
|
|
e0f6d288b1 | ||
| 6e0886ca5b | |||
| c79590d36e | |||
| 6e39ca51c5 | |||
| 0c13b35433 | |||
| 398fd2d303 | |||
| d7554b49dc | |||
| d9d63ab587 | |||
|
|
3afd68cbfe | ||
|
|
174f720f65 | ||
| f2fe7455ed | |||
| 3129b88a21 | |||
| 95b7b6e011 | |||
|
|
52ab580346 | ||
| da9db180ca | |||
| 182a1fb4a6 | |||
|
|
9ffc32d964 | ||
| c7bcf07f72 | |||
| d51637e44a | |||
| 23ee4831c7 | |||
|
|
dd2b7ac290 | ||
|
|
f13681ca8a | ||
|
|
6551a18d28 | ||
| a3cd8a0a55 | |||
|
|
3e40ed2e61 | ||
|
|
4897329644 | ||
|
|
498dd4cd8d | ||
| 9eb42b930f | |||
| 4440288479 | |||
| 78d80280e3 | |||
|
|
dafdefd378 | ||
|
|
166cb7304f | ||
| fb8706441b | |||
|
|
fc0d3f5da4 | ||
|
|
a4105aef49 | ||
| 09ca90355d | |||
|
|
b3e11fe92e | ||
|
|
536f971e8e | ||
| 56807cfdcf | |||
|
|
e75217009f | ||
| 9fb261cf12 | |||
|
|
b2e275a2d8 | ||
|
|
d218383a9a | ||
|
|
a084efdcdd | ||
| 04d9746fb7 | |||
| 8fa9f5fc69 | |||
| 308e2781bf | |||
| 7221f6bf1b | |||
| 4c9a4959c8 | |||
|
|
3782b3a7c6 | ||
| b75c389b84 | |||
| 7375539ede | |||
| d3ea0b5d31 | |||
|
|
b0c4a773af | ||
|
|
966d8a3cf7 | ||
|
|
c90169ab00 | ||
|
|
defb49748f | ||
|
|
92529782f8 | ||
| b60630b2cd | |||
| abd0ff713e | |||
| 313e80b1b2 | |||
| e225f7c1d1 | |||
|
|
2529349399 | ||
|
|
ec3e594951 | ||
| 52cff53c8f | |||
| 0435209d34 | |||
|
|
41cbab20e3 | ||
|
|
1dc0671cf0 | ||
|
|
b629e0358a | ||
| 6353b71192 | |||
| f0f4daac15 | |||
| 565b545968 | |||
|
|
c0ec5a7fc7 | ||
|
|
6286b0da30 | ||
|
|
5b32ff274f | ||
| 6d0e27996f | |||
| 71d5eb061d | |||
| 2db9525b4b | |||
|
|
910b997bc5 | ||
|
|
8e89318376 | ||
| 766a749d15 | |||
| 95f0a63c06 | |||
|
|
024673c75b | ||
|
|
11cb3426d4 | ||
|
|
ea135d3fb7 | ||
|
|
f9740ed667 | ||
|
|
ba4b7239ac | ||
| 62d76557fd | |||
|
|
bdd5636a47 | ||
|
|
3128dc4219 | ||
|
|
bf8aba849f | ||
| 730b1812aa | |||
| a7c079436b | |||
| 021f6c087b | |||
| 51c7748c8c | |||
|
|
797827afe2 | ||
|
|
5f7072cbd6 | ||
| 28cc5a9157 | |||
| 7fdb79d32a | |||
|
|
e03410ba17 | ||
|
|
da2d97caf5 | ||
|
|
1773769979 | ||
| 0dd61c6867 | |||
| 7fd6bb5e29 | |||
| 4df7931523 | |||
| ad667e6fb4 | |||
| c7a673b88a | |||
| 1721a201ff | |||
| 09fd13af72 | |||
|
|
e80a5437df | ||
| 7603f8c6c3 | |||
|
|
848015ad26 | ||
|
|
e556fb9397 | ||
| b42265dc81 | |||
| 9a82e22131 | |||
|
|
8dedb9854c | ||
| 1b6e9f5dcb | |||
| 42ec7fc228 | |||
|
|
11205c7406 | ||
|
|
4636fc6696 | ||
|
|
4a9da2245e | ||
|
|
07877f589f | ||
|
|
e5b181d894 | ||
|
|
3fd0146054 | ||
|
|
b9827084fb | ||
|
|
055c1b1b72 | ||
|
|
1aada7a58c | ||
|
|
704792f485 | ||
|
|
62bb81db6e | ||
|
|
f93883cc22 | ||
|
|
7f573cff41 | ||
|
|
c9dfb6dacf |
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2021 yudao-cloud
|
||||
Copyright (c) 2021 cloud-cloud
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
|
||||
@@ -11,7 +11,7 @@ metadata:
|
||||
description: DESC_PLACEHOLDER
|
||||
rollout.kubernetes.io/change-cause: "DESC_PLACEHOLDER:VERSION_PLACEHOLDER"
|
||||
spec:
|
||||
replicas: 1
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: qms-server
|
||||
@@ -23,18 +23,21 @@ spec:
|
||||
containers:
|
||||
- name: qms-server
|
||||
image: 172.16.46.66:10043/yudao/qms-server:VERSION_PLACEHOLDER
|
||||
env:
|
||||
- name: TZ
|
||||
value: Asia/Shanghai
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 48104
|
||||
initialDelaySeconds: 10
|
||||
initialDelaySeconds: 50
|
||||
periodSeconds: 5
|
||||
failureThreshold: 3
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 48104
|
||||
initialDelaySeconds: 30
|
||||
initialDelaySeconds: 50
|
||||
periodSeconds: 10
|
||||
failureThreshold: 5
|
||||
resources:
|
||||
@@ -61,7 +64,23 @@ spec:
|
||||
selector:
|
||||
app: qms-server
|
||||
ports:
|
||||
- protocol: TCP
|
||||
- name: http-health
|
||||
protocol: TCP
|
||||
port: 48104
|
||||
targetPort: 48104
|
||||
nodePort: 30100
|
||||
- name: tcp-9999
|
||||
protocol: TCP
|
||||
port: 9999
|
||||
targetPort: 9999
|
||||
nodePort: 30194
|
||||
- name: websocket-8320
|
||||
protocol: TCP
|
||||
port: 8320
|
||||
targetPort: 8320
|
||||
nodePort: 30320
|
||||
- name: tcp-8330
|
||||
protocol: TCP
|
||||
port: 8330
|
||||
targetPort: 8330
|
||||
nodePort: 30330
|
||||
|
||||
158
doc/中铜技术文档/Seata分布式事务集成参考.md
Normal file
158
doc/中铜技术文档/Seata分布式事务集成参考.md
Normal file
@@ -0,0 +1,158 @@
|
||||
[Seata分布式事务集成参考.md](Seata%E5%88%86%E5%B8%83%E5%BC%8F%E4%BA%8B%E5%8A%A1%E9%9B%86%E6%88%90%E5%8F%82%E8%80%83.md)# Seata 分布式事务集成参考
|
||||
|
||||
## 一、架构说明
|
||||
|
||||
### 多环境 Seata 配置管理
|
||||
|
||||
所有环境的 Seata 配置统一通过 Nacos 管理,本地配置文件不包含 Seata 配置。
|
||||
|
||||
```
|
||||
├── dev 环境: base-server-dev.yaml (dev_tx_group, namespace: dev)
|
||||
├── test 环境: base-server-test.yaml (test_tx_group, namespace: test)
|
||||
└── prod 环境: base-server-prod.yaml (prod_tx_group, namespace: prod)
|
||||
|
||||
Seata Server: 172.16.46.63:30088
|
||||
```
|
||||
|
||||
### 为什么使用 IP 直连?
|
||||
|
||||
Nacos 的 namespace 隔离机制导致不同命名空间的应用无法跨 namespace 发现服务。Seata Server 通过 IP 直连(`registry.type=file`)避免此限制,所有环境共享同一个 Seata Server,通过不同的 `tx-service-group` 实现逻辑隔离。
|
||||
|
||||
---
|
||||
|
||||
## 二、Nacos 配置
|
||||
|
||||
在对应环境的 Nacos 配置中心创建配置文件。以 `base-server-dev.yaml` 为例(其他环境只需修改 `tx-service-group`):
|
||||
|
||||
```yaml
|
||||
seata:
|
||||
enabled: true
|
||||
application-id: base-server
|
||||
tx-service-group: dev_tx_group
|
||||
enable-auto-data-source-proxy: true
|
||||
data-source-proxy-mode: AT
|
||||
registry:
|
||||
type: file
|
||||
config:
|
||||
type: file
|
||||
service:
|
||||
vgroupMapping:
|
||||
default_tx_group: default
|
||||
dev_tx_group: default
|
||||
test_tx_group: default
|
||||
prod_tx_group: default
|
||||
default:
|
||||
grouplist: 172.16.46.63:30088
|
||||
client:
|
||||
tm:
|
||||
defaultGlobalTransactionTimeout: 60000
|
||||
undo:
|
||||
logTable: undo_log
|
||||
dataValidation: true
|
||||
logSerialization: jackson
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 三、业务集成步骤
|
||||
|
||||
### 步骤 1:在 pom.xml 中添加依赖
|
||||
|
||||
Seata 2.4.0 版本已在 `zt-dependencies` 中统一管理。业务模块只需在 `pom.xml` 中添加:
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>io.seata</groupId>
|
||||
<artifactId>seata-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
版本号会从 `zt-dependencies` 继承。
|
||||
|
||||
### 步骤 2:创建 undo_log 表
|
||||
|
||||
在业务数据库执行:
|
||||
|
||||
```sql
|
||||
CREATE TABLE "UNDO_LOG" (
|
||||
"BRANCH_ID" BIGINT NOT NULL,
|
||||
"XID" VARCHAR(128) NOT NULL,
|
||||
"CONTEXT" VARCHAR(128) NOT NULL,
|
||||
"ROLLBACK_INFO" BLOB NOT NULL,
|
||||
"LOG_STATUS" INT NOT NULL,
|
||||
"LOG_CREATED" DATETIME DEFAULT SYSDATE,
|
||||
"LOG_MODIFIED" DATETIME DEFAULT SYSDATE,
|
||||
PRIMARY KEY ("BRANCH_ID")
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX "UX_UNDO_LOG" ON "UNDO_LOG" ("XID", "BRANCH_ID");
|
||||
```
|
||||
|
||||
### 步骤 3:在 Service 方法上添加 @GlobalTransactional 注解
|
||||
|
||||
```java
|
||||
import io.seata.spring.annotation.GlobalTransactional;
|
||||
|
||||
@Service
|
||||
public class OrderServiceImpl implements OrderService {
|
||||
|
||||
@GlobalTransactional(name = "create-order", rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Long createOrder(OrderCreateReqVO req) {
|
||||
// 本地操作
|
||||
orderMapper.insert(order);
|
||||
|
||||
// 跨服务调用自动参与分布式事务
|
||||
inventoryApi.deduct(productId, quantity);
|
||||
|
||||
return order.getId();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**说明**:
|
||||
- 只在事务发起方添加注解
|
||||
- 被调用的其他服务自动参与,无需额外配置
|
||||
- Seata 自动通过 HTTP Header 传递事务 ID
|
||||
|
||||
---
|
||||
|
||||
## 四、配置汇总
|
||||
|
||||
| 配置项 | 开发环境 | 测试环境 | 生产环境 |
|
||||
|--------|---------|---------|---------|
|
||||
| **tx-service-group** | `dev_tx_group` | `test_tx_group` | `prod_tx_group` |
|
||||
| **Nacos 命名空间** | `hwc` | `test` | `prod` |
|
||||
| **Seata Server** | `172.16.46.63:30088` | `172.16.46.63:30088` | `172.16.46.63:30088` |
|
||||
|
||||
---
|
||||
|
||||
## 五、其他事务模式
|
||||
|
||||
当前配置默认使用 **AT 模式**(自动事务模式)。Seata 还支持其他事务模式,需要业务自己实现:
|
||||
|
||||
### TCC 模式
|
||||
|
||||
需要实现 Try、Confirm、Cancel 三个业务方法,使用 `@TwoPhaseBusinessAction` 注解标记。详见官方文档。
|
||||
|
||||
### Saga 模式
|
||||
|
||||
需要定义 Saga 流程和状态机。详见官方文档。
|
||||
|
||||
### XA 模式
|
||||
|
||||
需要数据库支持 XA 事务,配置中修改 `data-source-proxy-mode: XA`。
|
||||
|
||||
**详见**: https://seata.apache.org/zh-cn/docs/overview/what-is-seata
|
||||
|
||||
---
|
||||
|
||||
## 六、Seata 控制台
|
||||
|
||||
**地址**: `http://172.16.46.63:30087`
|
||||
|
||||
可查看全局事务、分支事务、全局锁等监控信息。
|
||||
|
||||
---
|
||||
|
||||
**官方文档**: https://seata.apache.org/zh-cn/docs/overview/what-is-seata
|
||||
BIN
doc/中铜技术文档/api 平台使用说明.pdf
Normal file
BIN
doc/中铜技术文档/api 平台使用说明.pdf
Normal file
Binary file not shown.
1191
doc/中铜技术文档/iWork集成说明.md
Normal file
1191
doc/中铜技术文档/iWork集成说明.md
Normal file
File diff suppressed because it is too large
Load Diff
212
doc/中铜技术文档/计量单位转换使用文档.md
Normal file
212
doc/中铜技术文档/计量单位转换使用文档.md
Normal file
@@ -0,0 +1,212 @@
|
||||
# 计量单位转换业务使用文档
|
||||
|
||||
## 一、系统概述
|
||||
|
||||
计量单位转换提供统一的计量单位转换服务,支持同一量纲内的单位自动转换。采用**单向配置、双向生效**机制,只需配置"非基准单位 → 基准单位"的转换规则,自动推导反向和间接转换。
|
||||
|
||||
**核心特性**:
|
||||
- 单向配置、双向生效的转换机制
|
||||
- 支持按单位ID、符号、名称进行转换
|
||||
- 高精度计算,支持批量操作
|
||||
- 跨模块统一服务
|
||||
|
||||
## 二、内容配置
|
||||
|
||||
### 2.1 管理菜单路径
|
||||
后台管理 → 基础管理 → 计量单位 → 计量单位管理
|
||||
|
||||
### 2.2 配置功能
|
||||
|
||||
#### 计量量纲管理
|
||||
- **功能**:创建和管理不同的量纲类型(如重量、长度、体积等)
|
||||
- **操作**:新增量纲、编辑量纲信息、删除量纲
|
||||
- **每个量纲只能设置一个基准单位**
|
||||
|
||||
#### 计量单位管理
|
||||
- **功能**:创建和管理具体的计量单位
|
||||
- **操作**:新增单位、编辑单位信息、删除单位
|
||||
- **关联量纲**:将单位归属到具体的量纲下
|
||||
|
||||
#### 转换规则配置
|
||||
- **功能**:配置单位间的转换规则
|
||||
- **配置原则**:只需配置"非基准单位 → 基准单位"
|
||||
- **自动推导**:系统自动推导反向转换和间接转换
|
||||
|
||||
### 2.3 配置建议
|
||||
|
||||
1. **量纲规划**:提前规划好业务需要的量纲类型
|
||||
2. **基准单位选择**:选择业务中最常用、最稳定的单位作为基准
|
||||
3. **转换规则**:优先使用整数转换系数,提高计算精度
|
||||
4. **定期校验**:使用转换路径校验功能确保配置正确性
|
||||
5. **转换完整性校验**:系统提供同一量纲内所有单位能否互相转换的校验功能,确保转换配置的完整性
|
||||
|
||||
## 三、API接口清单
|
||||
|
||||
### 3.1 单位管理接口
|
||||
|
||||
| 接口 | 方法 | 路径 | 说明 | API文档 |
|
||||
|------|------|------|------|---------|
|
||||
| 获取量纲树 | GET | `/admin-api/base/unit-management/unit-quantity/tree` | 获取量纲和单位树形结构 | [文档](http://172.16.46.63:30081/doc.html#/base-server/%E7%AE%A1%E7%90%86%E5%90%8E%E5%8F%B0%20-%20%E8%AE%A1%E9%87%8F%E5%8D%95%E4%BD%8D%E9%87%8F/getUnitQuantityTree) |
|
||||
| 获取单位列表 | GET | `/admin-api/base/unit-management/unt-info/page` | 获取单位列表(用于下拉选择) | [文档](http://172.16.46.63:30081/doc.html#/base-server/%E7%AE%A1%E7%90%86%E5%90%8E%E5%8F%B0%20-%20%E8%AE%A1%E9%87%8F%E5%8D%95%E4%BD%8D/getUntInfoPage) |
|
||||
|
||||
### 3.2 单位转换接口
|
||||
|
||||
| 接口 | 方法 | 路径 | 说明 | API文档 |
|
||||
|------|------|------|------|---------|
|
||||
| 按ID转换单位 | POST | `/admin-api/base/unit-management/unit-conversion/convert` | 通过单位ID转换 | [文档](http://172.16.46.63:30081/doc.html#/base-server/%E7%AE%A1%E7%90%86%E5%90%8E%E5%8F%B0%20-%20%E5%8D%95%E4%BD%8D%E8%BD%AC%E6%8D%A2/convert) |
|
||||
| 按符号转换单位 | POST | `/admin-api/base/unit-management/unit-conversion/convert-by-symbol` | 通过单位符号转换 | [文档](http://172.16.46.63:30081/doc.html#/base-server/%E7%AE%A1%E7%90%86%E5%90%8E%E5%8F%B0%20-%20%E5%8D%95%E4%BD%8D%E8%BD%AC%E6%8D%A2/convertBySymbol) |
|
||||
| 按名称转换单位 | POST | `/admin-api/base/unit-management/unit-conversion/convert-by-name` | 通过单位名称转换 | [文档](http://172.16.46.63:30081/doc.html#/base-server/%E7%AE%A1%E7%90%86%E5%90%8E%E5%8F%B0%20-%20%E5%8D%95%E4%BD%8D%E8%BD%AC%E6%8D%A2/convertByName) |
|
||||
| 批量ID转换 | POST | `/admin-api/base/unit-management/unit-conversion/batch-convert` | 按ID批量转换 | [文档](http://172.16.46.63:30081/doc.html#/base-server/%E7%AE%A1%E7%90%86%E5%90%8E%E5%8F%B0%20-%20%E5%8D%95%E4%BD%8D%E8%BD%AC%E6%8D%A2/batchConvert) |
|
||||
| 批量符号转换 | POST | `/admin-api/base/unit-management/unit-conversion/batch-convert-by-symbol` | 按符号批量转换 | [文档](http://172.16.46.63:30081/doc.html#/base-server/%E7%AE%A1%E7%90%86%E5%90%8E%E5%8F%B0%20-%20%E5%8D%95%E4%BD%8D%E8%BD%AC%E6%8D%A2/batchConvertBySymbol) |
|
||||
| 批量名称转换 | POST | `/admin-api/base/unit-management/unit-conversion/batch-convert-by-name` | 按名称批量转换 | [文档](http://172.16.46.63:30081/doc.html#/base-server/%E7%AE%A1%E7%90%86%E5%90%8E%E5%8F%B0%20-%20%E5%8D%95%E4%BD%8D%E8%BD%AC%E6%8D%A2/batchConvertByName) |
|
||||
|
||||
|
||||
---
|
||||
|
||||
## 三、后端业务调用示例
|
||||
|
||||
### base模块内使用
|
||||
|
||||
```java
|
||||
@Service
|
||||
public class PurchaseOrderServiceImpl {
|
||||
|
||||
@Resource
|
||||
private UnitConversionService unitConversionService;
|
||||
|
||||
/**
|
||||
* 处理采购订单,统一转换为千克计算
|
||||
*/
|
||||
public void processPurchaseOrder(PurchaseOrderSaveReqVO orderVO) {
|
||||
for (PurchaseOrderDetailVO detail : orderVO.getDetails()) {
|
||||
// 方式1:按符号转换
|
||||
UnitConvertBySymbolReqVO convertReq = new UnitConvertBySymbolReqVO();
|
||||
convertReq.setSrcUnitSymbol(detail.getUnt());
|
||||
convertReq.setTgtUnitSymbol("kg");
|
||||
convertReq.setValue(detail.getQty());
|
||||
convertReq.setPrecision(6);
|
||||
|
||||
UnitConvertRespVO result = unitConversionService.convertBySymbol(convertReq);
|
||||
BigDecimal standardQuantity = result.getConvertedValue();
|
||||
|
||||
// 方式2:按ID转换(如果有单位ID)
|
||||
// UnitConvertReqVO convertReq = new UnitConvertReqVO();
|
||||
// convertReq.setSrcUntId(detail.getUntId());
|
||||
// convertReq.setTgtUntId(kgUnitId);
|
||||
// ...
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 四、跨模块调用
|
||||
|
||||
### 4.1 直接Service调用(推荐)
|
||||
|
||||
在同一服务内直接注入使用:
|
||||
```java
|
||||
@Resource
|
||||
private UnitConversionService unitConversionService;
|
||||
```
|
||||
|
||||
### 4.2 跨服务调用(按需使用)
|
||||
|
||||
**1. 在 API 模块中定义 Feign 接口:**
|
||||
|
||||
```java
|
||||
package com.zt.plat.module.base.api;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.base.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME)
|
||||
@Tag(name = "RPC 服务 - 单位转换")
|
||||
public interface UnitConversionApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/unit-conversion";
|
||||
|
||||
@PostMapping(PREFIX + "/convert")
|
||||
@Operation(summary = "按ID转换单位")
|
||||
CommonResult<UnitConvertRespVO> convert(@RequestBody UnitConvertReqVO reqVO);
|
||||
|
||||
@PostMapping(PREFIX + "/convert-by-symbol")
|
||||
@Operation(summary = "按符号转换单位")
|
||||
CommonResult<UnitConvertRespVO> convertBySymbol(@RequestBody UnitConvertBySymbolReqVO reqVO);
|
||||
}
|
||||
```
|
||||
|
||||
**2. 在其他服务中调用:**
|
||||
|
||||
```java
|
||||
@Service
|
||||
public class PurchaseServiceImpl {
|
||||
|
||||
@Resource
|
||||
private UnitConversionApi unitConversionApi;
|
||||
|
||||
public void processPurchase(PurchaseVO purchase) {
|
||||
UnitConvertBySymbolReqVO convertReq = new UnitConvertBySymbolReqVO();
|
||||
convertReq.setSrcUnitSymbol(purchase.getUnit());
|
||||
convertReq.setTgtUnitSymbol("kg");
|
||||
convertReq.setValue(purchase.getQuantity());
|
||||
convertReq.setPrecision(6);
|
||||
|
||||
CommonResult<UnitConvertRespVO> result = unitConversionApi.convertBySymbol(convertReq);
|
||||
if (result.isSuccess()) {
|
||||
BigDecimal standardQty = result.getData().getConvertedValue();
|
||||
// 业务处理
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 五、前端使用
|
||||
|
||||
### 5.1 基本API调用
|
||||
|
||||
```typescript
|
||||
// 获取量纲树
|
||||
export const getUnitQuantityTree = () => {
|
||||
return request.get('/admin-api/base/unit-management/unit-quantity/tree')
|
||||
}
|
||||
|
||||
// 获取单位列表
|
||||
export const getUntInfoPage = (params: any) => {
|
||||
return request.get('/admin-api/base/unit-management/unt-info/page', { params })
|
||||
}
|
||||
|
||||
// 单位转换
|
||||
export const convertUnitBySymbol = (data: any) => {
|
||||
return request.post('/admin-api/base/unit-management/unit-conversion/convert-by-symbol', data)
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 六、常见问题
|
||||
|
||||
**Q1: 前端如何获取单位选项?**
|
||||
|
||||
A: 使用 `/admin-api/base/unit-management/unit-quantity/tree` 获取量纲树,然后根据选择的量纲调用 `/admin-api/base/unit-management/unt-info/page` 获取单位列表。
|
||||
|
||||
**Q2: 按ID转换和按符号转换哪个更好?**
|
||||
|
||||
A: 按ID转换更稳定,因为数据库ID不会变化。建议在前端保存单位ID,在业务转换时使用ID调用。
|
||||
|
||||
**Q3: 跨服务调用需要特殊配置吗?**
|
||||
|
||||
A: 不需要,项目已经统一配置好。所有Feign客户端都使用 `name = "base-server"`,路径使用 `/rpc-api` 前缀。
|
||||
|
||||
**Q4: 批量转换性能问题?**
|
||||
|
||||
A: 使用批量接口,设置ignoreErrors=true。
|
||||
|
||||
290
doc/外部对接/iwork/iwork电子用印后回调.md
Normal file
290
doc/外部对接/iwork/iwork电子用印后回调.md
Normal file
@@ -0,0 +1,290 @@
|
||||
# 检验检测模块 IWork电子用印后回调
|
||||
|
||||
**简介**:检测报告在用印环节会调用iwork接口发起用印流程。iwork在用印完毕后,调用接口返回结果。
|
||||
|
||||
**基础地址**
|
||||
|
||||
测试系统地址:http://172.16.46.63:30081/admin-api/databus/api/portal
|
||||
|
||||
生产系统地址:待定
|
||||
|
||||
**版本**:V1
|
||||
|
||||
## 1.总体说明
|
||||
|
||||
先调用【上传附件】接口,上传盖章后的文件。然后调用【用印回调】接口,返回用印结果。接口调用时需要进行签名和加密,详见【接口签名】章节。
|
||||
|
||||
## 2.上传附件接口
|
||||
**接口地址**:`/qms_uploadAtt/v1`
|
||||
|
||||
**请求方式**:`POST`
|
||||
|
||||
**请求数据类型**:`application/json`
|
||||
|
||||
**请求参数**:
|
||||
|
||||
| 参数名称 | 参数说明 | 数据类型 | 是否必须 |
|
||||
|---------------|---------------|--------|------|
|
||||
| base64Content | 文件内容 | string | 是 |
|
||||
| fileName | 文件名称 | string | 是 |
|
||||
| directory | 文件目录 | long | 否 |
|
||||
| encrypt | 是否加密(默认false) | bool | 否 |
|
||||
|
||||
|
||||
**响应参数**:
|
||||
|
||||
| 参数名称 | 参数说明 | 类型 |
|
||||
|----------------------|---------|----------------|
|
||||
| code | 返回代码 | integer(int32) |
|
||||
| msg | 返回处理消息 | string |
|
||||
| data | 返回数据对象 | object |
|
||||
| $\qquad$ id | id | string |
|
||||
| $\qquad$ path | 文件存储路径 | string |
|
||||
| $\qquad$ name | 文件名 | string |
|
||||
| $\qquad$ url | 文件访问url | string |
|
||||
| $\qquad$ previewUrl | 文件预览url | string |
|
||||
| $\qquad$ isEncrypted | 是否加密 | bool |
|
||||
| $\qquad$ type | 类型 | string |
|
||||
| $\qquad$ size | 大小 | long |
|
||||
| $\qquad$ createTime | 创建时间 | 时间戳 |
|
||||
|
||||
|
||||
|
||||
## 3.用印回调接口
|
||||
**接口地址**:`/qms_sealReply/v1`
|
||||
|
||||
**请求方式**:`POST`
|
||||
|
||||
**请求数据类型**:`application/json`
|
||||
|
||||
**请求参数**:
|
||||
|
||||
| 参数名称 | 参数说明 | 请求类型 | 是否必须 |
|
||||
|------------|----------------|--------|------|
|
||||
| mainId | 报告id | string | 是 |
|
||||
| fileIds | 附件id,多值用半角逗号分隔 | string | 是 |
|
||||
|
||||
**响应参数**:
|
||||
|
||||
| 参数名称 | 参数说明 | 类型 |
|
||||
|----------------------|-----------------|----------------|
|
||||
| code | 错误码:0-成功,其他值-失败 | integer(int32) |
|
||||
| msg | 返回处理消息 | string |
|
||||
|
||||
|
||||
|
||||
## 4.接口签名
|
||||
接口签名和加密参考以下代码:
|
||||
|
||||
APP_ID和APP_SECRET请联系相关人员获取
|
||||
|
||||
|
||||
```java
|
||||
public class ApiForIworkExample {
|
||||
public static final String TIMESTAMP = Long.toString(System.currentTimeMillis());
|
||||
private static final String APP_ID = "";
|
||||
private static final String APP_SECRET = "";
|
||||
private static final String ENCRYPTION_TYPE = CryptoSignatureUtils.ENCRYPT_TYPE_AES;
|
||||
private static final String TARGET_API = "http://172.16.46.63:30081/admin-api/databus/api/portal/";
|
||||
private static final HttpClient HTTP_CLIENT = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(5)).build();
|
||||
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
|
||||
private static final PrintStream OUT = buildConsolePrintStream();
|
||||
public static final String ZT_APP_ID = "ZT-App-Id";
|
||||
public static final String ZT_TIMESTAMP = "ZT-Timestamp";
|
||||
public static final String ZT_NONCE = "ZT-Nonce";
|
||||
public static final String ZT_SIGNATURE = "ZT-Signature";
|
||||
public static final String ZT_AUTH_TOKEN = "ZT-Auth-Token";
|
||||
public static final String CONTENT_TYPE = "Content-Type";
|
||||
|
||||
private ApiForIworkExample() {}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
executePostExample();
|
||||
}
|
||||
|
||||
private static void executePostExample() throws Exception {
|
||||
Map<String, Object> queryParams = new LinkedHashMap<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("mainId", "1983446576685900000");
|
||||
jsonObject.put("fileIds", "1983446576685900001,1983446576685900002");
|
||||
String bodyJson = jsonObject.toJSONString();
|
||||
Map<String, Object> bodyParams = parseBodyJson(bodyJson);
|
||||
String signature = generateSignature(queryParams, bodyParams);
|
||||
String url = TARGET_API + "qms_sealReply/v1";
|
||||
URI requestUri = buildUri(url, queryParams);
|
||||
String nonce = randomNonce();
|
||||
String cipherBody = encryptPayload(bodyJson);
|
||||
OUT.println("原始 Request Body: " + bodyJson);
|
||||
OUT.println("加密 Request Body: " + cipherBody);
|
||||
HttpRequest request = HttpRequest.newBuilder(requestUri)
|
||||
.timeout(Duration.ofSeconds(10))
|
||||
.header(ZT_APP_ID, APP_ID)
|
||||
.header(ZT_TIMESTAMP, TIMESTAMP)
|
||||
.header(ZT_NONCE, nonce)
|
||||
.header(ZT_SIGNATURE, signature)
|
||||
// .header(ZT_AUTH_TOKEN, "82e5c281ddfa4386988fa4074e8794d7")
|
||||
.header(CONTENT_TYPE, "application/json")
|
||||
.POST(HttpRequest.BodyPublishers.ofString(cipherBody, StandardCharsets.UTF_8))
|
||||
.build();
|
||||
HttpResponse<String> response = HTTP_CLIENT.send(request, HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8));
|
||||
printResponse(response);
|
||||
}
|
||||
|
||||
private static String encryptPayload(String plaintext) {
|
||||
try {
|
||||
return CryptoSignatureUtils.encrypt(plaintext, APP_SECRET, ENCRYPTION_TYPE);
|
||||
} catch (Exception ex) {
|
||||
throw new IllegalStateException("Failed to encrypt request body", ex);
|
||||
}
|
||||
}
|
||||
|
||||
private static void printResponse(HttpResponse<String> response) {
|
||||
OUT.println("HTTP Status: " + response.statusCode());
|
||||
String cipherText = response.body();
|
||||
OUT.println("加密 Response: " + cipherText);
|
||||
String plain = tryDecrypt(cipherText);
|
||||
OUT.println("原始 Response: " + normalizePotentialMojibake(plain));
|
||||
}
|
||||
|
||||
private static String randomNonce() {
|
||||
return UUID.randomUUID().toString().replace("-", "");
|
||||
}
|
||||
|
||||
private static URI buildUri(String baseUrl, Map<String, Object> queryParams) {
|
||||
if (queryParams == null || queryParams.isEmpty()) {
|
||||
return URI.create(baseUrl);
|
||||
}
|
||||
StringBuilder builder = new StringBuilder(baseUrl);
|
||||
builder.append(baseUrl.contains("?") ? '&' : '?');
|
||||
boolean first = true;
|
||||
for (Map.Entry<String, Object> entry : queryParams.entrySet()) {
|
||||
if (!first) {
|
||||
builder.append('&');
|
||||
}
|
||||
first = false;
|
||||
builder.append(URLEncoder.encode(entry.getKey(), StandardCharsets.UTF_8));
|
||||
builder.append('=');
|
||||
builder.append(URLEncoder.encode(String.valueOf(entry.getValue()), StandardCharsets.UTF_8));
|
||||
}
|
||||
return URI.create(builder.toString());
|
||||
}
|
||||
|
||||
private static String generateSignature(Map<String, Object> queryParams, Map<String, Object> bodyParams) {
|
||||
TreeMap<String, Object> sorted = new TreeMap<>();
|
||||
if (queryParams != null) {
|
||||
queryParams.forEach((key, value) -> sorted.put(key, normalizeValue(value)));
|
||||
}
|
||||
if (bodyParams != null) {
|
||||
bodyParams.forEach((key, value) -> sorted.put(key, normalizeValue(value)));
|
||||
}
|
||||
sorted.put(ZT_APP_ID, APP_ID);
|
||||
sorted.put(ZT_TIMESTAMP, TIMESTAMP);
|
||||
StringBuilder canonical = new StringBuilder();
|
||||
sorted.forEach((key, value) -> {
|
||||
if (value == null) {
|
||||
return;
|
||||
}
|
||||
if (canonical.length() > 0) {
|
||||
canonical.append('&');
|
||||
}
|
||||
canonical.append(key).append('=').append(value);
|
||||
});
|
||||
OUT.println("原始 签名串: " + canonical);
|
||||
String md5Hex = md5Hex(canonical.toString());
|
||||
OUT.println("原始签名: " + md5Hex);
|
||||
return md5Hex;
|
||||
}
|
||||
|
||||
private static Object normalizeValue(Object value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
if (value instanceof Map || value instanceof Iterable) {
|
||||
try {
|
||||
return OBJECT_MAPPER.writeValueAsString(value);
|
||||
} catch (JsonProcessingException ignored) {
|
||||
return value.toString();
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
private static Map<String, Object> parseBodyJson(String bodyJson) {
|
||||
if (bodyJson == null || bodyJson.isBlank()) {
|
||||
return Map.of();
|
||||
}
|
||||
try {
|
||||
return OBJECT_MAPPER.readValue(bodyJson, new TypeReference<Map<String, Object>>() { });
|
||||
} catch (IOException ex) {
|
||||
throw new IllegalArgumentException("Failed to parse request body JSON", ex);
|
||||
}
|
||||
}
|
||||
|
||||
private static String md5Hex(String input) {
|
||||
try {
|
||||
MessageDigest digest = MessageDigest.getInstance("MD5");
|
||||
byte[] bytes = digest.digest(input.getBytes(StandardCharsets.UTF_8));
|
||||
StringBuilder hex = new StringBuilder(bytes.length * 2);
|
||||
for (byte b : bytes) {
|
||||
String segment = Integer.toHexString(b & 0xFF);
|
||||
if (segment.length() == 1) {
|
||||
hex.append('0');
|
||||
}
|
||||
hex.append(segment);
|
||||
}
|
||||
return hex.toString();
|
||||
} catch (NoSuchAlgorithmException ex) {
|
||||
throw new IllegalStateException("MD5 algorithm not available", ex);
|
||||
}
|
||||
}
|
||||
|
||||
private static String tryDecrypt(String cipherText) {
|
||||
if (cipherText == null || cipherText.isBlank()) {
|
||||
return cipherText;
|
||||
}
|
||||
try {
|
||||
// Databus 会在凭证开启加密时返回密文,这里做一次解密展示真实响应。
|
||||
return CryptoSignatureUtils.decrypt(cipherText, APP_SECRET, ENCRYPTION_TYPE);
|
||||
} catch (Exception ex) {
|
||||
return "<unable to decrypt> " + ex.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
// 解决控制台打印 乱码问题
|
||||
private static String normalizePotentialMojibake(String value) {
|
||||
if (value == null || value.isEmpty()) {
|
||||
return value;
|
||||
}
|
||||
long suspectCount = value.chars().filter(ch -> ch >= 0x80 && ch <= 0xFF).count();
|
||||
long highCount = value.chars().filter(ch -> ch > 0xFF).count();
|
||||
if (suspectCount > 0 && highCount == 0) {
|
||||
try {
|
||||
byte[] decoded = value.getBytes(StandardCharsets.ISO_8859_1);
|
||||
String converted = new String(decoded, StandardCharsets.UTF_8);
|
||||
if (converted.chars().anyMatch(ch -> ch > 0xFF)) {
|
||||
return converted;
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 输出流编码与当前控制台保持一致,避免中文字符再次出现编码差异。
|
||||
*/
|
||||
private static PrintStream buildConsolePrintStream() {
|
||||
try {
|
||||
String consoleEncoding = System.getProperty("sun.stdout.encoding");
|
||||
if (consoleEncoding != null && !consoleEncoding.isBlank()) {
|
||||
return new PrintStream(System.out, true, Charset.forName(consoleEncoding));
|
||||
}
|
||||
return new PrintStream(System.out, true, Charset.defaultCharset());
|
||||
} catch (Exception ignored) {
|
||||
return System.out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
BIN
doc/外部对接/iwork/iwork电子用印后回调.pdf
Normal file
BIN
doc/外部对接/iwork/iwork电子用印后回调.pdf
Normal file
Binary file not shown.
78
pom.xml
78
pom.xml
@@ -3,12 +3,12 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>dsc-qms</artifactId>
|
||||
<version>${revision}</version>
|
||||
<packaging>pom</packaging>
|
||||
<modules>
|
||||
<module>yudao-module-qms</module>
|
||||
<module>zt-module-qms</module>
|
||||
<module>qms-server</module>
|
||||
</modules>
|
||||
|
||||
@@ -17,7 +17,10 @@
|
||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
||||
|
||||
<properties>
|
||||
<revision>3.0.34</revision>
|
||||
<revision>3.0.47-SNAPSHOT</revision>
|
||||
<!-- qms服务相关 -->
|
||||
<zzjc.tio.version>3.9.1.v20251204-RELEASE</zzjc.tio.version>
|
||||
<liteflow.version>2.15.3</liteflow.version>
|
||||
<!-- Maven 相关 -->
|
||||
<java.version>17</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
@@ -35,12 +38,46 @@
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-dependencies</artifactId>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-dependencies</artifactId>
|
||||
<version>${revision}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- liteflow -->
|
||||
<dependency>
|
||||
<groupId>com.yomahub</groupId>
|
||||
<artifactId>liteflow-spring-boot-starter</artifactId>
|
||||
<version>${liteflow.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yomahub</groupId>
|
||||
<artifactId>liteflow-script-javax-pro</artifactId>
|
||||
<version>${liteflow.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yomahub</groupId>
|
||||
<artifactId>liteflow-script-groovy</artifactId>
|
||||
<version>${liteflow.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yomahub</groupId>
|
||||
<artifactId>liteflow-script-qlexpress</artifactId>
|
||||
<version>${liteflow.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yomahub</groupId>
|
||||
<artifactId>liteflow-script-graaljs</artifactId>
|
||||
<version>${liteflow.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- tio -->
|
||||
<dependency>
|
||||
<groupId>tech.zzjc.tio</groupId>
|
||||
<artifactId>zzjc-tio-spring-boot-starter</artifactId>
|
||||
<version>${zzjc.tio.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
@@ -143,10 +180,15 @@
|
||||
<repository>
|
||||
<id>ZT</id>
|
||||
<name>中铜 ZStack 私服</name>
|
||||
<url>http://172.16.46.63:30708/repository/test/</url>
|
||||
<url>http://172.16.46.63:30708/repository/zt-cloud/</url>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
<checksumPolicy>warn</checksumPolicy>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
@@ -156,11 +198,11 @@
|
||||
<name>中铜 ZStack 私服</name>
|
||||
<url>http://172.16.46.63:30708/repository/test/</url>
|
||||
</repository>
|
||||
<!-- <snapshotRepository>-->
|
||||
<!-- <id>ZT</id>-->
|
||||
<!-- <name>中铜 ZStack 私服</name>-->
|
||||
<!-- <url>https://your-nexus.example.com/repository/maven-snapshots/</url>-->
|
||||
<!-- </snapshotRepository>-->
|
||||
<snapshotRepository>
|
||||
<id>ZT-snap</id>
|
||||
<name>中铜 ZStack 私服</name>
|
||||
<url>http://172.16.46.63:30708/repository/test-snap/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<profiles>
|
||||
@@ -172,8 +214,8 @@
|
||||
<config.server-addr>172.16.46.63:30848</config.server-addr>
|
||||
<config.namespace>dev</config.namespace>
|
||||
<config.group>DEFAULT_GROUP</config.group>
|
||||
<config.username/>
|
||||
<config.password/>
|
||||
<config.username>nacos</config.username>
|
||||
<config.password>P@ssword25</config.password>
|
||||
<config.version>1.0.0</config.version>
|
||||
</properties>
|
||||
</profile>
|
||||
@@ -185,8 +227,8 @@
|
||||
<config.server-addr>172.16.46.63:30848</config.server-addr>
|
||||
<config.namespace>prod</config.namespace>
|
||||
<config.group>DEFAULT_GROUP</config.group>
|
||||
<config.username/>
|
||||
<config.password/>
|
||||
<config.username>nacos</config.username>
|
||||
<config.password>P@ssword25</config.password>
|
||||
<config.version>1.0.0</config.version>
|
||||
</properties>
|
||||
</profile>
|
||||
@@ -198,8 +240,8 @@
|
||||
<config.server-addr>172.16.46.63:30848</config.server-addr>
|
||||
<config.namespace>local</config.namespace>
|
||||
<config.group>DEFAULT_GROUP</config.group>
|
||||
<config.username/>
|
||||
<config.password/>
|
||||
<config.username>nacos</config.username>
|
||||
<config.password>P@ssword25</config.password>
|
||||
<config.version>1.0.0</config.version>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
FROM ynwxr/report-base:x86_64-ubuntu_22-jre21-2.0.0
|
||||
|
||||
FROM 172.16.46.66:10043/base-service/report-base:x86_64-ubuntu_22-jre21-2.0.0
|
||||
#ARG BASE_IMAGE=172.16.46.66:10043/base-service/skywalking-agent-jre:9.7.0
|
||||
#FROM ${BASE_IMAGE}
|
||||
RUN mkdir -p /appdata/server
|
||||
WORKDIR /appdata/server
|
||||
## 将后端项目的 Jar 文件,复制到镜像中
|
||||
@@ -7,9 +8,14 @@ COPY ./target/qms-server.jar app.jar
|
||||
|
||||
## 设置 TZ 时区
|
||||
ENV TZ=Asia/Shanghai
|
||||
ENV JAVA_OPTS="-Xms512m -Xmx512m"
|
||||
#ENV SW_AGENT_HOME=/opt/skywalking/agent
|
||||
#ENV SW_AGENT_NAME=qms-server
|
||||
#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}"
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE 48205
|
||||
|
||||
## 启动后端项目
|
||||
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
|
||||
CMD java ${AGENT_JAVA_OPTS} ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar app.jar
|
||||
|
||||
11
qms-server/build-docker-push.bat
Normal file
11
qms-server/build-docker-push.bat
Normal 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
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>dsc-qms</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
@@ -16,18 +16,18 @@
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-module-system-api</artifactId>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-system-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-module-infra-api</artifactId>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-infra-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-module-qms-server</artifactId>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-qms-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -38,8 +38,8 @@
|
||||
|
||||
<!-- 服务保障相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-protection</artifactId>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-protection</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Registry 注册中心相关 -->
|
||||
@@ -56,9 +56,9 @@
|
||||
|
||||
<!-- RPC 远程调用相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-rpc</artifactId>
|
||||
<!-- 目的:yudao-server 单体启动,禁用 openfeign -->
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-rpc</artifactId>
|
||||
<!-- 目的:zt-server 单体启动,禁用 openfeign -->
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
package cn.iocoder.yudao.qms;
|
||||
package com.zt.plat.qms;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import tech.zzjc.tio.starter.TioServerAutoConfiguration;
|
||||
import tech.zzjc.tio.starter.annotation.EnableTioServerServer;
|
||||
|
||||
/**
|
||||
* Qms 服务器的启动类
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${yudao.info.base-package}
|
||||
@SpringBootApplication(scanBasePackages = {"${yudao.info.base-package}.qms", "${yudao.info.base-package}.module"},
|
||||
@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${zt.info.base-package}
|
||||
@SpringBootApplication(scanBasePackages = {"${zt.info.base-package}.qms", "${zt.info.base-package}.module"},
|
||||
excludeName = {})
|
||||
@EnableTioServerServer
|
||||
@Import(TioServerAutoConfiguration.class)
|
||||
public class QmsServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.qms.controller.qms;
|
||||
package com.zt.plat.qms.controller.qms;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -6,9 +6,9 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* qms 控制器
|
||||
@@ -105,3 +105,87 @@ justauth:
|
||||
prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
|
||||
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的自定义线程池Builder,LiteFlow提供了默认的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
|
||||
#全局异步节点线程池自定义Builder,LiteFlow提供了默认的线程池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 # 数据库索引
|
||||
@@ -56,6 +56,12 @@ spring:
|
||||
database: 0 # 数据库索引
|
||||
# password: 123456 # 密码,建议生产环境开启
|
||||
|
||||
--- #################### MQ 消息队列相关配置 ####################
|
||||
|
||||
# rocketmq 配置项,对应 RocketMQProperties 配置类
|
||||
rocketmq:
|
||||
name-server: 172.16.46.63:30876 # RocketMQ Namesrv
|
||||
|
||||
xxl:
|
||||
job:
|
||||
admin:
|
||||
@@ -78,16 +84,42 @@ management:
|
||||
logging:
|
||||
level:
|
||||
# 配置自己写的 MyBatis Mapper 打印日志
|
||||
cn.iocoder.yudao.module.base.dal.mysql: debug
|
||||
com.zt.plat.module.base.dal.mysql: debug
|
||||
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
|
||||
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
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 分钟
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
yudao:
|
||||
zt:
|
||||
env: # 多环境的配置项
|
||||
tag: ${HOSTNAME}
|
||||
security:
|
||||
@@ -95,3 +127,87 @@ yudao:
|
||||
access-log: # 访问日志的配置项
|
||||
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的自定义线程池Builder,LiteFlow提供了默认的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
|
||||
#全局异步节点线程池自定义Builder,LiteFlow提供了默认的线程池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 # 数据库索引
|
||||
@@ -24,7 +24,7 @@ spring:
|
||||
|
||||
config:
|
||||
import:
|
||||
- optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
|
||||
# - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
|
||||
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
|
||||
|
||||
# Servlet 配置
|
||||
@@ -83,7 +83,7 @@ mybatis-plus:
|
||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
||||
banner: false # 关闭控制台的 Banner 打印
|
||||
type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
|
||||
type-aliases-package: com.zt.plat.module.*.dal.dataobject
|
||||
encryptor:
|
||||
password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
|
||||
|
||||
@@ -101,23 +101,27 @@ xxl:
|
||||
logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
|
||||
accessToken: default_token # 执行器通讯TOKEN
|
||||
|
||||
yudao:
|
||||
zt:
|
||||
info:
|
||||
version: 1.0.0
|
||||
base-package: cn.iocoder.yudao
|
||||
base-package: com.zt.plat
|
||||
web:
|
||||
admin-ui:
|
||||
url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
|
||||
url: http://dashboard.zt.iocoder.cn # Admin 管理后台 UI 的地址
|
||||
xss:
|
||||
enable: false
|
||||
exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
|
||||
- ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
|
||||
- ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
|
||||
swagger:
|
||||
title: 管理后台
|
||||
description: 提供管理员管理的所有功能
|
||||
version: ${yudao.info.version}
|
||||
title: Qms 模块
|
||||
description: 提供 Qms 管理的所有功能
|
||||
version: ${zt.info.version}
|
||||
tenant: # 多租户相关配置项
|
||||
enable: true
|
||||
|
||||
ignore-urls:
|
||||
- /admin-api/qms/system-version-management/get-by-platform/**
|
||||
security:
|
||||
permit-all-urls:
|
||||
- /admin-api/qms/system-version-management/get-by-platform/**
|
||||
debug: false
|
||||
|
||||
146
qms-server/src/test/java/com/zt/plat/ProjectReactor.java
Normal file
146
qms-server/src/test/java/com/zt/plat/ProjectReactor.java
Normal file
@@ -0,0 +1,146 @@
|
||||
package com.zt.plat;
|
||||
|
||||
import cn.hutool.core.io.FileTypeUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.zt.plat.framework.common.util.collection.SetUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static java.io.File.separator;
|
||||
|
||||
/**
|
||||
* 项目修改器,一键替换 Maven 的 groupId、artifactId,项目的 package 等
|
||||
* <p>
|
||||
* 通过修改 groupIdNew、artifactIdNew、projectBaseDirNew 三个变量
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@Slf4j
|
||||
public class ProjectReactor {
|
||||
|
||||
private static final String GROUP_ID = "com.zt.plat";
|
||||
private static final String ARTIFACT_ID = "cloud";
|
||||
private static final String PACKAGE_NAME = "com.zt.plat";
|
||||
private static final String TITLE = "中铜系统平台";
|
||||
|
||||
/**
|
||||
* 白名单文件,不进行重写,避免出问题
|
||||
*/
|
||||
private static final Set<String> WHITE_FILE_TYPES = SetUtils.asSet("gif", "jpg", "svg", "png", // 图片
|
||||
"eot", "woff2", "ttf", "woff", // 字体
|
||||
"xdb"); // IP 库
|
||||
|
||||
public static void main(String[] args) {
|
||||
long start = System.currentTimeMillis();
|
||||
String projectBaseDir = getProjectBaseDir();
|
||||
log.info("[main][原项目路劲改地址 ({})]", projectBaseDir);
|
||||
|
||||
// ========== 配置,需要你手动修改 ==========
|
||||
String groupIdNew = "com.zt.plat";
|
||||
String artifactIdNew = "zt";
|
||||
String packageNameNew = "com.zt.plat";
|
||||
String titleNew = "中铜系统平台";
|
||||
String projectBaseDirNew = projectBaseDir + "-new"; // 一键改名后,“新”项目所在的目录
|
||||
log.info("[main][检测新项目目录 ({})是否存在]", projectBaseDirNew);
|
||||
if (FileUtil.exist(projectBaseDirNew)) {
|
||||
log.error("[main][新项目目录检测 ({})已存在,请更改新的目录!程序退出]", projectBaseDirNew);
|
||||
return;
|
||||
}
|
||||
// 如果新目录中存在 PACKAGE_NAME,ARTIFACT_ID 等关键字,路径会被替换,导致生成的文件不在预期目录
|
||||
if (StrUtil.containsAny(projectBaseDirNew, PACKAGE_NAME, ARTIFACT_ID, StrUtil.upperFirst(ARTIFACT_ID))) {
|
||||
log.error("[main][新项目目录 `projectBaseDirNew` 检测 ({}) 存在冲突名称「{}」或者「{}」,请更改新的目录!程序退出]",
|
||||
projectBaseDirNew, PACKAGE_NAME, ARTIFACT_ID);
|
||||
return;
|
||||
}
|
||||
log.info("[main][完成新项目目录检测,新项目路径地址 ({})]", projectBaseDirNew);
|
||||
// 获得需要复制的文件
|
||||
log.info("[main][开始获得需要重写的文件,预计需要 10-20 秒]");
|
||||
Collection<File> files = listFiles(projectBaseDir);
|
||||
log.info("[main][需要重写的文件数量:{},预计需要 15-30 秒]", files.size());
|
||||
// 写入文件
|
||||
files.forEach(file -> {
|
||||
// 如果是白名单的文件类型,不进行重写,直接拷贝
|
||||
String fileType = getFileType(file);
|
||||
if (WHITE_FILE_TYPES.contains(fileType)) {
|
||||
copyFile(file, projectBaseDir, projectBaseDirNew, packageNameNew, artifactIdNew);
|
||||
return;
|
||||
}
|
||||
// 如果非白名单的文件类型,重写内容,在生成文件
|
||||
String content = replaceFileContent(file, groupIdNew, artifactIdNew, packageNameNew, titleNew);
|
||||
writeFile(file, content, projectBaseDir, projectBaseDirNew, packageNameNew, artifactIdNew);
|
||||
});
|
||||
log.info("[main][重写完成]共耗时:{} 秒", (System.currentTimeMillis() - start) / 1000);
|
||||
}
|
||||
|
||||
private static String getProjectBaseDir() {
|
||||
String baseDir = System.getProperty("user.dir");
|
||||
if (StrUtil.isEmpty(baseDir)) {
|
||||
throw new NullPointerException("项目基础路径不存在");
|
||||
}
|
||||
return baseDir;
|
||||
}
|
||||
|
||||
private static Collection<File> listFiles(String projectBaseDir) {
|
||||
Collection<File> files = FileUtil.loopFiles(projectBaseDir);
|
||||
// 移除 IDEA、Git 自身的文件、Node 编译出来的文件
|
||||
files = files.stream()
|
||||
.filter(file -> !file.getPath().contains(separator + "target" + separator)
|
||||
&& !file.getPath().contains(separator + "node_modules" + separator)
|
||||
&& !file.getPath().contains(separator + ".idea" + separator)
|
||||
&& !file.getPath().contains(separator + ".git" + separator)
|
||||
&& !file.getPath().contains(separator + "dist" + separator)
|
||||
&& !file.getPath().contains(".iml")
|
||||
&& !file.getPath().contains(".html.gz"))
|
||||
.collect(Collectors.toList());
|
||||
return files;
|
||||
}
|
||||
|
||||
private static String replaceFileContent(File file, String groupIdNew,
|
||||
String artifactIdNew, String packageNameNew,
|
||||
String titleNew) {
|
||||
String content = FileUtil.readString(file, StandardCharsets.UTF_8);
|
||||
// 如果是白名单的文件类型,不进行重写
|
||||
String fileType = getFileType(file);
|
||||
if (WHITE_FILE_TYPES.contains(fileType)) {
|
||||
return content;
|
||||
}
|
||||
// 执行文件内容都重写
|
||||
return content.replaceAll(GROUP_ID, groupIdNew)
|
||||
.replaceAll(PACKAGE_NAME, packageNameNew)
|
||||
.replaceAll(ARTIFACT_ID, artifactIdNew) // 必须放在最后替换,因为 ARTIFACT_ID 太短!
|
||||
.replaceAll(StrUtil.upperFirst(ARTIFACT_ID), StrUtil.upperFirst(artifactIdNew))
|
||||
.replaceAll(TITLE, titleNew);
|
||||
}
|
||||
|
||||
private static void writeFile(File file, String fileContent, String projectBaseDir,
|
||||
String projectBaseDirNew, String packageNameNew, String artifactIdNew) {
|
||||
String newPath = buildNewFilePath(file, projectBaseDir, projectBaseDirNew, packageNameNew, artifactIdNew);
|
||||
FileUtil.writeUtf8String(fileContent, newPath);
|
||||
}
|
||||
|
||||
private static void copyFile(File file, String projectBaseDir,
|
||||
String projectBaseDirNew, String packageNameNew, String artifactIdNew) {
|
||||
String newPath = buildNewFilePath(file, projectBaseDir, projectBaseDirNew, packageNameNew, artifactIdNew);
|
||||
FileUtil.copyFile(file, new File(newPath));
|
||||
}
|
||||
|
||||
private static String buildNewFilePath(File file, String projectBaseDir,
|
||||
String projectBaseDirNew, String packageNameNew, String artifactIdNew) {
|
||||
return file.getPath().replace(projectBaseDir, projectBaseDirNew) // 新目录
|
||||
.replace(PACKAGE_NAME.replaceAll("\\.", Matcher.quoteReplacement(separator)),
|
||||
packageNameNew.replaceAll("\\.", Matcher.quoteReplacement(separator)))
|
||||
.replace(ARTIFACT_ID, artifactIdNew) //
|
||||
.replaceAll(StrUtil.upperFirst(ARTIFACT_ID), StrUtil.upperFirst(artifactIdNew));
|
||||
}
|
||||
|
||||
private static String getFileType(File file) {
|
||||
return file.length() > 0 ? FileTypeUtil.getType(file) : "";
|
||||
}
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.enums;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
|
||||
|
||||
/**
|
||||
* <b>ErrorCodeConstants</b>
|
||||
* 错误码枚举类
|
||||
* qms 系统,使用 1_200_000_000 段
|
||||
*/
|
||||
public interface ErrorCodeConstants {
|
||||
/**
|
||||
* 可用号段: 1_032_000_000 ~1_033_000_000
|
||||
* */
|
||||
|
||||
/*==============================公共错误 1_032_000_000 ~1_033_000_999 ===============================*/
|
||||
Integer ERROR_CODE_MODULE_QMS_BPM = 1_032_000_010;
|
||||
ErrorCode MISS_PARAMETER = new ErrorCode(1_032_000_000, "缺少参数");
|
||||
ErrorCode SQL_INJECTION_EXCEPTION = new ErrorCode(1_032_000_001, "表名不合法,存在SQL注入风险,联系管理员处理");
|
||||
|
||||
|
||||
/*==============================common 公共模块 1_032_001_000 ~ 1_032_049_999 ===============================*/
|
||||
Integer ERROR_CODE_MODULE_COMMON = 1_032_001_000;
|
||||
ErrorCode DATA_COLLECTION_NOT_EXISTS = new ErrorCode(1_032_001_000, "数据集不存在");
|
||||
ErrorCode DATA_COLLECTION_CLASSIFY_DUPLICATE = new ErrorCode(1_032_001_000, "分类名称重复,请重新输入");
|
||||
ErrorCode DATA_COLLECTION_CLASSIFY_PARENT_ERROR = new ErrorCode(1_032_001_000, "上级分类不能设置为当前分类及其的后代分类");
|
||||
ErrorCode DATA_COLLECTION_FIELD_NOT_EXISTS = new ErrorCode(1_032_001_000, "数据集字段不存在");
|
||||
ErrorCode DATA_COLLECTION_EMPTY_WF_KEY = new ErrorCode(1_032_001_000, "数据集未配置流程key!");
|
||||
ErrorCode DATA_FORM_NOT_EXISTS = new ErrorCode(1_032_001_000, "通用数据不存在");
|
||||
ErrorCode DATA_FORM_EMPTY_COLLECTION_ID = new ErrorCode(1_032_001_000, "未指定数据集ID");
|
||||
ErrorCode DICTIONARY_BUSINESS_NOT_EXISTS = new ErrorCode(1_032_001_000, "业务参数字典不存在");
|
||||
ErrorCode DICTIONARY_BUSINESS_DATA_MORE_THAN_ONE = new ErrorCode(1_032_001_000, "业务参数字典[数据]key重名,请联系管理员处理!");
|
||||
ErrorCode DICTIONARY_BUSINESS_CATEGORY_MORE_THAN_ONE = new ErrorCode(1_032_001_000, "业务参数字典[分类]key重名,请联系管理员处理!");
|
||||
ErrorCode DICTIONARY_BUSINESS_CLASSIFY_DUPLICATE = new ErrorCode(1_032_001_000, "分类名称重复,请重新输入");
|
||||
|
||||
/*==============================config 配置模块 1_032_050_000 ~ 1_032_099_999 ===============================*/
|
||||
ErrorCode CONFIG_REPORT_TEMPLATE_NOT_EXISTS = new ErrorCode(1_032_050_000, "报表模版配置不存在");
|
||||
ErrorCode CONFIG_ASSAY_METHOD_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法配置不存在");
|
||||
ErrorCode CONFIG_ASSAY_METHOD_PROJECT_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法分析项目配置不存在");
|
||||
ErrorCode CONFIG_REPORT_FIELD_NOT_EXISTS = new ErrorCode(1_032_050_000, "报表字段配置不存在");
|
||||
ErrorCode CONFIG_STANDARD_SAMPLE_TYPE_NOT_EXISTS = new ErrorCode(1_032_050_000, "标准样类型配置不存在");
|
||||
ErrorCode CONFIG_STANDARD_SAMPLE_PROJECT_NOT_EXISTS = new ErrorCode(1_032_050_000, "标准样检测项目配置不存在");
|
||||
ErrorCode CONFIG_SUB_SAMPLE_PARENT_NOT_EXISTS = new ErrorCode(1_032_050_000, "分样配置不存在");
|
||||
ErrorCode CONFIG_SUB_SAMPLE_METHOD_NOT_EXISTS = new ErrorCode(1_032_050_000, "子样与检测方法配置不存在");
|
||||
ErrorCode CONFIG_SUB_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_050_000, "子样配置不存在");
|
||||
ErrorCode CONFIG_SAMPLE_REPORT_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品报表关系不存在");
|
||||
ErrorCode CONFIG_SAMPLE_FLOW_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品流程配置不存在");
|
||||
ErrorCode CONFIG_REPORT_TYPE_NOT_EXISTS = new ErrorCode(1_032_050_000, "报表类型配置不存在");
|
||||
ErrorCode CONFIG_PROJECT_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测项目配置不存在");
|
||||
ErrorCode CONFIG_ENTRUST_SOURCE_NOT_EXISTS = new ErrorCode(1_032_050_000, "检验委托来源配置不存在");
|
||||
ErrorCode CONFIG_DOCUMENT_TYPE_NOT_EXISTS = new ErrorCode(1_032_050_000, "报告类型配置不存在");
|
||||
ErrorCode CONFIG_BASE_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_050_000, "主样配置不存在");
|
||||
ErrorCode CONFIG_ASSAY_METHOD_PROJECT_PARAMETER_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法分析项目参数配置不存在");
|
||||
ErrorCode CONFIG_WAREHOUSE_LOCATION_INFOMATION_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品库位信息不存在");
|
||||
ErrorCode CONFIG_SIMPLE_FLOW_RULE_NOT_EXISTS = new ErrorCode(1_032_050_000, "LiteFlow规则配置不存在");
|
||||
ErrorCode CONFIG_SIMPLE_FLOW_CODE_NOT_EXISTS = new ErrorCode(1_032_050_000, "LiteFlow脚本配置不存在");
|
||||
|
||||
ErrorCode BASE_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品大类管理不存在");
|
||||
ErrorCode MATERIAL_ASSAY_STANDARD_DETAIL_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测标准明细不存在");
|
||||
ErrorCode MATERIAL_ASSAY_STANDARD_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测标准不存在");
|
||||
ErrorCode MATERIAL_ASSAY_STANDARD_METHOD_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测标准方法不存在");
|
||||
ErrorCode CONFIG_SAMPLE_HANDOVER_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品交接配置不存在");
|
||||
|
||||
//dictionary
|
||||
ErrorCode DICTIONARY_SAMPLE_FLOW_NODE_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品流程节点字典不存在");
|
||||
ErrorCode DICTIONARY_PARAMETER_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测参数字典不存在");
|
||||
ErrorCode DICTIONARY_PROJECT_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测项目字典不存在");
|
||||
ErrorCode DICTIONARY_SAMPLE_TYPE_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品类型字典不存在");
|
||||
|
||||
/*=================================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_DETAIL_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记样品明细不存在");
|
||||
ErrorCode BUSINESS_SAMPLE_ENTRUST_PROJECT_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检样品检测项目业务不存在");
|
||||
|
||||
ErrorCode BUSINESS_BASE_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_100_000, "主样业务不存在");
|
||||
ErrorCode BUSINESS_SUB_PARENT_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_100_000, "分样业务不存在");
|
||||
ErrorCode BUSINESS_SUB_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样业务不存在");
|
||||
ErrorCode BUSINESS_HANDOVER_RECORD_SUB_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样交接记录业务不存在");
|
||||
ErrorCode BUSINESS_SAMPLE_ASSAY_RESULT_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记来样品位不存在");
|
||||
ErrorCode BUSINESS_ASSAY_TASK_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样检测任务业务不存在");
|
||||
ErrorCode BUSINESS_ASSAY_PROJECT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测项目数据业务不存在");
|
||||
ErrorCode BUSINESS_ASSAY_PARAMETER_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测参数数据业务不存在");
|
||||
ErrorCode BUSINESS_SUB_SAMPLE_ASSESSMENT_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样判定数据业务不存在");
|
||||
ErrorCode BUSINESS_SAMPLE_HANDOVER_NOT_EXISTS = new ErrorCode(1_032_100_000, "样品交接单业务不存在");
|
||||
ErrorCode BUSINESS_SAMPLE_HANDOVER_DETAIL_NOT_EXISTS = new ErrorCode(1_032_100_000, "样品交接明细不存在");
|
||||
ErrorCode BUSINESS_ASSAY_TASK_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测任务分配业务不存在");
|
||||
ErrorCode BUSINESS_ASSAY_TASK_DETAIL_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测任务分配明细不存在");
|
||||
|
||||
|
||||
/*=================================resource 资源管理 1_032_150_000 ~ 1_032_199_999 ==================================*/
|
||||
ErrorCode DEVICE_INFOMATION_NOT_EXISTS = new ErrorCode(1_032_150_000, "设备_设备信息不存在");
|
||||
ErrorCode DEVICE_PRODUCT_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, "试剂耗材大类不存在");
|
||||
|
||||
|
||||
/*================================= tx 1_032_200_000 ~ 1_032_249_999 ==================================*/
|
||||
|
||||
|
||||
|
||||
|
||||
/*================================= office 办公 1_032_250_000 ~ 1_032_299_999 ==================================*/
|
||||
|
||||
|
||||
/*================================= dzj 大质检 1_032_300_000 ~ 1_032_349_999 ==================================*/
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* 项目的启动类
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class QmsServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(QmsServerApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.api.task;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.qms.api.task.dto.QmsBpmDTO;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
public interface BMPCallbackInterface {
|
||||
|
||||
CommonResult<JSONObject> callback(QmsBpmDTO reqDTO);
|
||||
|
||||
|
||||
}
|
||||
@@ -1,121 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.controller.admin;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.service.BusinessSubSampleService;
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
@Tag(name = "管理后台 - 子样业务")
|
||||
@RestController
|
||||
@RequestMapping("/qms/business-sub-sample")
|
||||
@Validated
|
||||
public class BusinessSubSampleController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private BusinessSubSampleService businessSubSampleService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建子样业务")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-sub-sample:create')")
|
||||
public CommonResult<BusinessSubSampleRespVO> createBusinessSubSample(@Valid @RequestBody BusinessSubSampleSaveReqVO createReqVO) {
|
||||
return success(businessSubSampleService.createBusinessSubSample(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新子样业务")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-sub-sample:update')")
|
||||
public CommonResult<Boolean> updateBusinessSubSample(@Valid @RequestBody BusinessSubSampleSaveReqVO updateReqVO) {
|
||||
businessSubSampleService.updateBusinessSubSample(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除子样业务")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-sub-sample:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessSubSample(@RequestParam("id") Long id) {
|
||||
businessSubSampleService.deleteBusinessSubSample(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除子样业务")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-sub-sample:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessSubSampleList(@RequestBody BatchDeleteReqVO req) {
|
||||
businessSubSampleService.deleteBusinessSubSampleListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得子样业务")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-sub-sample:query')")
|
||||
public CommonResult<BusinessSubSampleRespVO> getBusinessSubSample(@RequestParam("id") Long id) {
|
||||
BusinessSubSampleDO businessSubSample = businessSubSampleService.getBusinessSubSample(id);
|
||||
return success(BeanUtils.toBean(businessSubSample, BusinessSubSampleRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得子样业务列表")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-sub-sample:query')")
|
||||
public CommonResult<?> getBusinessSubSampleList(@Valid BusinessSubSampleReqVO reqVO) {
|
||||
List<BusinessSubSampleExtendRespVO> listResult = businessSubSampleService.getBusinessSubSampleList(reqVO);
|
||||
return success(listResult);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得子样业务分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-sub-sample:query')")
|
||||
public CommonResult<PageResult<BusinessSubSampleExtendRespVO>> getBusinessSubSamplePage(@Valid BusinessSubSamplePageReqVO pageReqVO) {
|
||||
PageResult<BusinessSubSampleExtendRespVO> pageResult = businessSubSampleService.getBusinessSubSamplePage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/getBySampleCodeAndFlowKey")
|
||||
@Operation(summary = "根据样品编号及样品流程节点key获取样品信息")
|
||||
public CommonResult<?> getBySampleCodeAndFlowKey(@Valid BusinessSubSampleReqVO reqVO) {
|
||||
BusinessSubSampleExtendRespVO result = businessSubSampleService.getBySampleCodeAndFlowKey(reqVO);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出子样业务 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:business-sub-sample:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportBusinessSubSampleExcel(@Valid BusinessSubSamplePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<BusinessSubSampleExtendRespVO> list = businessSubSampleService.getBusinessSubSamplePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "子样业务.xls", "数据", BusinessSubSampleRespVO.class,
|
||||
BeanUtils.toBean(list, BusinessSubSampleRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.controller.admin;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.yomahub.liteflow.core.FlowExecutor;
|
||||
import com.yomahub.liteflow.flow.LiteflowResponse;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleEntrustDetail;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleEntrustDetailProject;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleEntrustParam;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleEntrustContext;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.service.SampleEntrustService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@Tag(name = "管理后台 - 样品委托")
|
||||
@RestController
|
||||
@RequestMapping("/qms/bus/sample/entrust")
|
||||
@Validated
|
||||
public class SampleEntrustController {
|
||||
|
||||
@Resource
|
||||
private FlowExecutor flowExecutor;
|
||||
|
||||
@Resource
|
||||
private SampleEntrustService sampleEntrustService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建委托登记")
|
||||
public CommonResult<?> create(@Valid @RequestBody SampleEntrustParam sampleEntrustParam) {
|
||||
LiteflowResponse response = sampleEntrustService.create(sampleEntrustParam);
|
||||
if (response.isSuccess()) {
|
||||
return success(response.getContextBean(SampleEntrustContext.class));
|
||||
} else {
|
||||
return error(500, response.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/detail")
|
||||
@Operation(summary = "委托登记详情")
|
||||
public CommonResult<?> detail(@RequestParam("id") Long id) {
|
||||
BusinessSampleEntrustRegistrationExtendRespVO sampleEntrustRegistration = sampleEntrustService.detail(id);
|
||||
return success(sampleEntrustRegistration);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@Operation(summary = "修改委托登记")
|
||||
public CommonResult<?> update(@Valid @RequestBody SampleEntrustParam sampleEntrustParam) {
|
||||
LiteflowResponse response = sampleEntrustService.update(sampleEntrustParam);
|
||||
if (response.isSuccess()) {
|
||||
return success(response.getContextBean(SampleEntrustContext.class));
|
||||
} else {
|
||||
return error(500, response.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/submit")
|
||||
@Operation(summary = "提交托登记")
|
||||
public CommonResult<?> submit(@Valid @RequestBody BusinessSampleEntrustRegistrationSubmitReqVO req) {
|
||||
//如果仅勾选了送样,则需要把收样也勾选
|
||||
if (req.getIsSendSample().equals(1) && req.getIsReceiveSample().equals(0)) {
|
||||
req.setIsReceiveSample(1);
|
||||
}
|
||||
sampleEntrustService.submit(req);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除委托登记")
|
||||
@Parameter(name = "id", description = "ID", required = true)
|
||||
public CommonResult<Boolean> delete(@RequestParam("id") Long id) {
|
||||
sampleEntrustService.delete(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "ID", required = true)
|
||||
@Operation(summary = "批量删除委托登记")
|
||||
public CommonResult<Boolean> deleteList(@RequestBody BatchDeleteReqVO req) {
|
||||
sampleEntrustService.deleteList(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/test")
|
||||
public CommonResult<?> test() {
|
||||
|
||||
Long tenantId = TenantContextHolder.getRequiredTenantId();
|
||||
|
||||
SampleEntrustDetail sampleEntrustDetail_1 = new SampleEntrustDetail();
|
||||
sampleEntrustDetail_1.setBaseSampleId(1000000000000000001L);//铜精矿(结算样)
|
||||
sampleEntrustDetail_1.setDictionaryBusinessId(1965289473129664514L);
|
||||
sampleEntrustDetail_1.setSampleName("铜精矿");
|
||||
sampleEntrustDetail_1.setEntrustSampleCode("SRC0001");
|
||||
sampleEntrustDetail_1.setEntrustSampleName("来样名称-铜精矿");
|
||||
sampleEntrustDetail_1.setSort(1);
|
||||
sampleEntrustDetail_1.setAssayProject("");
|
||||
sampleEntrustDetail_1.setForecastResult("");
|
||||
sampleEntrustDetail_1.setRemark("");
|
||||
|
||||
List<SampleEntrustDetailProject> sampleEntrustDetailProjectList_1 = new ArrayList<>();
|
||||
SampleEntrustDetailProject sampleEntrustDetailProject_1_1 = new SampleEntrustDetailProject();
|
||||
sampleEntrustDetailProject_1_1.setMaterialAssayStandardDetailId(1000000000000000001L);
|
||||
sampleEntrustDetailProject_1_1.setIsEnabled(1);
|
||||
sampleEntrustDetailProjectList_1.add(sampleEntrustDetailProject_1_1);
|
||||
sampleEntrustDetail_1.setSampleEntrustDetailProjectList(sampleEntrustDetailProjectList_1);
|
||||
|
||||
SampleEntrustDetail sampleEntrustDetail_2 = new SampleEntrustDetail();
|
||||
sampleEntrustDetail_2.setBaseSampleId(1000000000000000001L);//铜精矿(结算样)
|
||||
sampleEntrustDetail_2.setDictionaryBusinessId(1965289473129664514L);
|
||||
sampleEntrustDetail_2.setSampleName("铜精矿");
|
||||
sampleEntrustDetail_2.setEntrustSampleCode("SRC0002");
|
||||
sampleEntrustDetail_2.setEntrustSampleName("来样名称-铜精矿");
|
||||
sampleEntrustDetail_2.setSort(2);
|
||||
sampleEntrustDetail_2.setAssayProject("");
|
||||
sampleEntrustDetail_2.setForecastResult("");
|
||||
sampleEntrustDetail_2.setRemark("");
|
||||
|
||||
List<SampleEntrustDetailProject> sampleEntrustDetailProjectList_2 = new ArrayList<>();
|
||||
SampleEntrustDetailProject sampleEntrustDetailProject_2_1 = new SampleEntrustDetailProject();
|
||||
sampleEntrustDetailProject_2_1.setMaterialAssayStandardDetailId(1000000000000000001L);
|
||||
sampleEntrustDetailProject_2_1.setIsEnabled(1);
|
||||
sampleEntrustDetailProjectList_2.add(sampleEntrustDetailProject_2_1);
|
||||
sampleEntrustDetail_2.setSampleEntrustDetailProjectList(sampleEntrustDetailProjectList_2);
|
||||
|
||||
List<SampleEntrustDetail> sampleEntrustDetailList = new ArrayList<>();
|
||||
sampleEntrustDetailList.add(sampleEntrustDetail_1);
|
||||
sampleEntrustDetailList.add(sampleEntrustDetail_2);
|
||||
|
||||
|
||||
SampleEntrustParam sampleEntrustParam = new SampleEntrustParam();
|
||||
sampleEntrustParam.setId(1965960610828763137L);
|
||||
sampleEntrustParam.setEntrustUnit("西南铜业");
|
||||
sampleEntrustParam.setSampleSender("送样人");
|
||||
sampleEntrustParam.setConfigEntrustSourceId(1000000000000000001L);
|
||||
sampleEntrustParam.setSampleSendDate(LocalDateTime.now());
|
||||
sampleEntrustParam.setSampleQuantity(2);
|
||||
sampleEntrustParam.setRemaineSampleRequirement("放弃1");
|
||||
sampleEntrustParam.setSampleEntrustDetailList(sampleEntrustDetailList);
|
||||
|
||||
String jsonString = JSON.toJSONString(sampleEntrustParam);
|
||||
System.out.println(jsonString);
|
||||
|
||||
LiteflowResponse response = flowExecutor.execute2Resp("sampleEntrustChain" + tenantId, sampleEntrustParam, SampleEntrustContext.class);
|
||||
if (response.isSuccess()) {
|
||||
return success(response.getContextBean(SampleEntrustContext.class));
|
||||
} else {
|
||||
return error(500, response.getMessage());
|
||||
}
|
||||
//return success(FlowBus.getNodeMap());
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.controller.admin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.yomahub.liteflow.core.FlowExecutor;
|
||||
import com.yomahub.liteflow.flow.LiteflowResponse;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleFlowInfo;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleFlowParam;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleFlowContext;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.service.SampleFlowService;
|
||||
import cn.iocoder.yudao.module.qms.core.sampleflow.SampleFlowDefinition;
|
||||
import cn.iocoder.yudao.module.qms.core.sampleflow.SampleFlowNode;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error;
|
||||
|
||||
@Tag(name = "管理后台 - 样品流转")
|
||||
@RestController
|
||||
@RequestMapping("/qms/bus/sample/flow")
|
||||
@Validated
|
||||
public class SampleFlowController {
|
||||
|
||||
@Resource
|
||||
private SampleFlowService sampleFlowService;
|
||||
|
||||
@Resource
|
||||
private FlowExecutor flowExecutor;
|
||||
|
||||
@PostMapping("/sampleFlow")
|
||||
public CommonResult<?> sampleFlow(@Validated @RequestBody SampleFlowParam sampleFlowParam) {
|
||||
LiteflowResponse response = sampleFlowService.sampleFlow(sampleFlowParam);
|
||||
return success(response.getContextBean(SampleFlowContext.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BusinessAssayTaskDataExtendRespVO extends BusinessAssayTaskDataRespVO {
|
||||
|
||||
/** 分析方法名称 **/
|
||||
@Schema(description = "分析方法名称")
|
||||
private String configAssayMethodName;
|
||||
|
||||
@Schema(description = "样品名称")
|
||||
private String sampleName;
|
||||
|
||||
@Schema(description = "样品编号")
|
||||
private String sampleCode;
|
||||
|
||||
@Schema(description = "分析编号")
|
||||
private String sampleAssayCode;
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.controller.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 子样检测任务业务分页 Request VO")
|
||||
@Data
|
||||
public class BusinessAssayTaskDataPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "样品主样ID", example = "11587")
|
||||
private Long businessBaseSampleId;
|
||||
|
||||
@Schema(description = "样品分样ID", example = "2157")
|
||||
private Long businessSubParentSampleId;
|
||||
|
||||
@Schema(description = "分样子样ID", example = "2427")
|
||||
private Long businessSubSampleId;
|
||||
|
||||
@Schema(description = "检测方法ID", example = "21835")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "指派单ID", example = "15392")
|
||||
private Long businessAssayTaskId;
|
||||
|
||||
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", example = "2")
|
||||
private String taskType;
|
||||
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...", example = "1")
|
||||
private String assayType;
|
||||
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "任务指派时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] taskTime;
|
||||
|
||||
@Schema(description = "是否已指派")
|
||||
private Integer isTasked;
|
||||
|
||||
@Schema(description = "是否已上报")
|
||||
private Integer isReported;
|
||||
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] reportTime;
|
||||
|
||||
@Schema(description = "流程节点")
|
||||
private String flowNode;
|
||||
|
||||
@Schema(description = "复检次数,0代表正常分析", example = "27671")
|
||||
private Integer recheckCount;
|
||||
|
||||
@Schema(description = "乐观锁", example = "4946")
|
||||
private Integer updateCount;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.controller.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 子样检测任务业务分页 Request VO")
|
||||
@Data
|
||||
public class BusinessAssayTaskDataReqVO {
|
||||
|
||||
@Schema(description = "样品主样ID", example = "11587")
|
||||
private Long businessBaseSampleId;
|
||||
|
||||
@Schema(description = "样品分样ID", example = "2157")
|
||||
private Long businessSubParentSampleId;
|
||||
|
||||
@Schema(description = "分样子样ID", example = "2427")
|
||||
private Long businessSubSampleId;
|
||||
|
||||
@Schema(description = "检测方法ID", example = "21835")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "指派单ID", example = "15392")
|
||||
private Long businessAssayTaskId;
|
||||
|
||||
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", example = "2")
|
||||
private String taskType;
|
||||
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...", example = "1")
|
||||
private String assayType;
|
||||
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "任务指派时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] taskTime;
|
||||
|
||||
@Schema(description = "是否已指派")
|
||||
private Integer isTasked;
|
||||
|
||||
@Schema(description = "是否已上报")
|
||||
private Integer isReported;
|
||||
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] reportTime;
|
||||
|
||||
@Schema(description = "流程节点")
|
||||
private String flowNode;
|
||||
|
||||
@Schema(description = "复检次数,0代表正常分析", example = "27671")
|
||||
private Integer recheckCount;
|
||||
|
||||
@Schema(description = "乐观锁", example = "4946")
|
||||
private Integer updateCount;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 子样检测任务业务 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class BusinessAssayTaskDataRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32383")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "样品主样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11587")
|
||||
@ExcelProperty("样品主样ID")
|
||||
private Long businessBaseSampleId;
|
||||
|
||||
@Schema(description = "样品分样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2157")
|
||||
@ExcelProperty("样品分样ID")
|
||||
private Long businessSubParentSampleId;
|
||||
|
||||
@Schema(description = "分样子样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2427")
|
||||
@ExcelProperty("分样子样ID")
|
||||
private Long businessSubSampleId;
|
||||
|
||||
@Schema(description = "检测方法ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21835")
|
||||
@ExcelProperty("检测方法ID")
|
||||
private String configAssayMethodId;
|
||||
|
||||
@Schema(description = "指派单ID", example = "15392")
|
||||
@ExcelProperty("指派单ID")
|
||||
private Long businessAssayTaskId;
|
||||
|
||||
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("任务类型,【字典】【jy_sample_task_type】常规、抽查...")
|
||||
private String taskType;
|
||||
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...")
|
||||
private String assayType;
|
||||
|
||||
@Schema(description = "分析人")
|
||||
@ExcelProperty("分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "任务指派时间")
|
||||
@ExcelProperty("任务指派时间")
|
||||
private LocalDateTime taskTime;
|
||||
|
||||
@Schema(description = "是否已指派")
|
||||
@ExcelProperty("是否已指派")
|
||||
private Integer isTasked;
|
||||
|
||||
@Schema(description = "是否已上报")
|
||||
@ExcelProperty("是否已上报")
|
||||
private Integer isReported;
|
||||
|
||||
@Schema(description = "上报人")
|
||||
@ExcelProperty("上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@ExcelProperty("上报时间")
|
||||
private LocalDateTime reportTime;
|
||||
|
||||
@Schema(description = "流程节点", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("流程节点")
|
||||
private String flowNode;
|
||||
|
||||
@Schema(description = "复检次数,0代表正常分析", requiredMode = Schema.RequiredMode.REQUIRED, example = "27671")
|
||||
@ExcelProperty("复检次数,0代表正常分析")
|
||||
private Integer recheckCount;
|
||||
|
||||
@Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "4946")
|
||||
@ExcelProperty("乐观锁")
|
||||
private Integer updateCount;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建日期")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 子样检测任务业务新增/修改 Request VO")
|
||||
@Data
|
||||
public class BusinessAssayTaskDataSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32383")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "样品主样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11587")
|
||||
@NotNull(message = "样品主样ID不能为空")
|
||||
private Long businessBaseSampleId;
|
||||
|
||||
@Schema(description = "样品分样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2157")
|
||||
@NotNull(message = "样品分样ID不能为空")
|
||||
private Long businessSubParentSampleId;
|
||||
|
||||
@Schema(description = "分样子样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2427")
|
||||
@NotNull(message = "分样子样ID不能为空")
|
||||
private Long businessSubSampleId;
|
||||
|
||||
@Schema(description = "检测方法ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21835")
|
||||
@NotEmpty(message = "检测方法ID不能为空")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "指派单ID", example = "15392")
|
||||
private Long businessAssayTaskId;
|
||||
|
||||
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "任务类型,【字典】【jy_sample_task_type】常规、抽查...不能为空")
|
||||
private String taskType;
|
||||
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...不能为空")
|
||||
private String assayType;
|
||||
|
||||
@Schema(description = "分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "任务指派时间")
|
||||
private LocalDateTime taskTime;
|
||||
|
||||
@Schema(description = "是否已指派")
|
||||
private Integer isTasked;
|
||||
|
||||
@Schema(description = "是否已上报")
|
||||
private Integer isReported;
|
||||
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
private LocalDateTime reportTime;
|
||||
|
||||
@Schema(description = "流程节点", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "流程节点不能为空")
|
||||
private String flowNode;
|
||||
|
||||
@Schema(description = "复检次数,0代表正常分析", requiredMode = Schema.RequiredMode.REQUIRED, example = "27671")
|
||||
@NotNull(message = "复检次数,0代表正常分析不能为空")
|
||||
private Integer recheckCount;
|
||||
|
||||
@Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "4946")
|
||||
@NotNull(message = "乐观锁不能为空")
|
||||
private Integer updateCount;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "所属部门不能为空")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.controller.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 检测任务分配业务分页 Request VO")
|
||||
@Data
|
||||
public class BusinessAssayTaskPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "指派编号")
|
||||
private String taskNo;
|
||||
|
||||
@Schema(description = "指派单名称", example = "芋艿")
|
||||
private String taskName;
|
||||
|
||||
@Schema(description = "检测方法ID", example = "18615")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "任务单来源", example = "1")
|
||||
private String taskSourceType;
|
||||
|
||||
@Schema(description = "指派人")
|
||||
private String taskOperator;
|
||||
|
||||
@Schema(description = "指派时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] taskOperatorTime;
|
||||
|
||||
@Schema(description = "指派分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] reportTime;
|
||||
|
||||
@Schema(description = "上报人")
|
||||
private String reportOperator;
|
||||
|
||||
@Schema(description = "提交时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] submitTime;
|
||||
|
||||
@Schema(description = "指派单状态,【字典】【jy_assay_task_status】0-初始状态,1-已提交", example = "1")
|
||||
private String taskStatus;
|
||||
|
||||
@Schema(description = "同步状态,【字典】【jy_assay_task_syn_status】0-未同步,1-已同步", example = "2")
|
||||
private String synchronousStatus;
|
||||
|
||||
@Schema(description = "标样业务ID", example = "21760")
|
||||
private Long standardSampleId;
|
||||
|
||||
@Schema(description = "标样编号")
|
||||
private String standardSampleCode;
|
||||
|
||||
@Schema(description = "标准样类型ID", example = "31587")
|
||||
private Long standardSampleTypeId;
|
||||
|
||||
@Schema(description = "质控样编号")
|
||||
private String qualitySampleCode;
|
||||
|
||||
@Schema(description = "质控样分析时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] qualitySampleAssayTime;
|
||||
|
||||
@Schema(description = "流程实例id", example = "15616")
|
||||
private Long flowInstanceId;
|
||||
|
||||
@Schema(description = "顶部字段配置")
|
||||
private String formConfig;
|
||||
|
||||
@Schema(description = "顶部字段值")
|
||||
private String formValue;
|
||||
|
||||
@Schema(description = "签名信息")
|
||||
private String documentSignature;
|
||||
|
||||
@Schema(description = "完成状态,【字典】【jy_assay_task_finish_status】默认;待处理;已完成(待提交);已提交", example = "2")
|
||||
private String finishStatus;
|
||||
|
||||
@Schema(description = "流程状态,【字典】【jy_assay_task_flow_status】默认;审批中;打回;已完成", example = "1")
|
||||
private String flowStatus;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 检测任务分配业务 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class BusinessAssayTaskRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5973")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "指派编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("指派编号")
|
||||
private String taskNo;
|
||||
|
||||
@Schema(description = "指派单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@ExcelProperty("指派单名称")
|
||||
private String taskName;
|
||||
|
||||
@Schema(description = "检测方法ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18615")
|
||||
@ExcelProperty("检测方法ID")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "任务单来源", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("任务单来源")
|
||||
private String taskSourceType;
|
||||
|
||||
@Schema(description = "指派人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("指派人")
|
||||
private String taskOperator;
|
||||
|
||||
@Schema(description = "指派时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("指派时间")
|
||||
private LocalDateTime taskOperatorTime;
|
||||
|
||||
@Schema(description = "指派分析人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("指派分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@ExcelProperty("上报时间")
|
||||
private LocalDateTime reportTime;
|
||||
|
||||
@Schema(description = "上报人")
|
||||
@ExcelProperty("上报人")
|
||||
private String reportOperator;
|
||||
|
||||
@Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("提交时间")
|
||||
private LocalDateTime submitTime;
|
||||
|
||||
@Schema(description = "指派单状态,【字典】【jy_assay_task_status】0-初始状态,1-已提交", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("指派单状态,【字典】【jy_assay_task_status】0-初始状态,1-已提交")
|
||||
private String taskStatus;
|
||||
|
||||
@Schema(description = "同步状态,【字典】【jy_assay_task_syn_status】0-未同步,1-已同步", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("同步状态,【字典】【jy_assay_task_syn_status】0-未同步,1-已同步")
|
||||
private String synchronousStatus;
|
||||
|
||||
@Schema(description = "标样业务ID", example = "21760")
|
||||
@ExcelProperty("标样业务ID")
|
||||
private Long standardSampleId;
|
||||
|
||||
@Schema(description = "标样编号")
|
||||
@ExcelProperty("标样编号")
|
||||
private String standardSampleCode;
|
||||
|
||||
@Schema(description = "标准样类型ID", example = "31587")
|
||||
@ExcelProperty("标准样类型ID")
|
||||
private Long standardSampleTypeId;
|
||||
|
||||
@Schema(description = "质控样编号")
|
||||
@ExcelProperty("质控样编号")
|
||||
private String qualitySampleCode;
|
||||
|
||||
@Schema(description = "质控样分析时间")
|
||||
@ExcelProperty("质控样分析时间")
|
||||
private LocalDateTime qualitySampleAssayTime;
|
||||
|
||||
@Schema(description = "流程实例id", example = "15616")
|
||||
@ExcelProperty("流程实例id")
|
||||
private Long flowInstanceId;
|
||||
|
||||
@Schema(description = "顶部字段配置", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("顶部字段配置")
|
||||
private String formConfig;
|
||||
|
||||
@Schema(description = "顶部字段值")
|
||||
@ExcelProperty("顶部字段值")
|
||||
private String formValue;
|
||||
|
||||
@Schema(description = "签名信息")
|
||||
@ExcelProperty("签名信息")
|
||||
private String documentSignature;
|
||||
|
||||
@Schema(description = "完成状态,【字典】【jy_assay_task_finish_status】默认;待处理;已完成(待提交);已提交", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("完成状态,【字典】【jy_assay_task_finish_status】默认;待处理;已完成(待提交);已提交")
|
||||
private String finishStatus;
|
||||
|
||||
@Schema(description = "流程状态,【字典】【jy_assay_task_flow_status】默认;审批中;打回;已完成", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("流程状态,【字典】【jy_assay_task_flow_status】默认;审批中;打回;已完成")
|
||||
private String flowStatus;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建日期")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 检测任务分配业务新增/修改 Request VO")
|
||||
@Data
|
||||
public class BusinessAssayTaskSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5973")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "指派编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "指派编号不能为空")
|
||||
private String taskNo;
|
||||
|
||||
@Schema(description = "指派单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@NotEmpty(message = "指派单名称不能为空")
|
||||
private String taskName;
|
||||
|
||||
@Schema(description = "检测方法ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18615")
|
||||
@NotNull(message = "检测方法ID不能为空")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "任务单来源", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "任务单来源不能为空")
|
||||
private String taskSourceType;
|
||||
|
||||
@Schema(description = "指派人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "指派人不能为空")
|
||||
private String taskOperator;
|
||||
|
||||
@Schema(description = "指派时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "指派时间不能为空")
|
||||
private LocalDateTime taskOperatorTime;
|
||||
|
||||
@Schema(description = "指派分析人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "指派分析人不能为空")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
private LocalDateTime reportTime;
|
||||
|
||||
@Schema(description = "上报人")
|
||||
private String reportOperator;
|
||||
|
||||
@Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "提交时间不能为空")
|
||||
private LocalDateTime submitTime;
|
||||
|
||||
@Schema(description = "指派单状态,【字典】【jy_assay_task_status】0-初始状态,1-已提交", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "指派单状态,【字典】【jy_assay_task_status】0-初始状态,1-已提交不能为空")
|
||||
private String taskStatus;
|
||||
|
||||
@Schema(description = "同步状态,【字典】【jy_assay_task_syn_status】0-未同步,1-已同步", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "同步状态,【字典】【jy_assay_task_syn_status】0-未同步,1-已同步不能为空")
|
||||
private String synchronousStatus;
|
||||
|
||||
@Schema(description = "标样业务ID", example = "21760")
|
||||
private Long standardSampleId;
|
||||
|
||||
@Schema(description = "标样编号")
|
||||
private String standardSampleCode;
|
||||
|
||||
@Schema(description = "标准样类型ID", example = "31587")
|
||||
private Long standardSampleTypeId;
|
||||
|
||||
@Schema(description = "质控样编号")
|
||||
private String qualitySampleCode;
|
||||
|
||||
@Schema(description = "质控样分析时间")
|
||||
private LocalDateTime qualitySampleAssayTime;
|
||||
|
||||
@Schema(description = "流程实例id", example = "15616")
|
||||
private Long flowInstanceId;
|
||||
|
||||
@Schema(description = "顶部字段配置", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "顶部字段配置不能为空")
|
||||
private String formConfig;
|
||||
|
||||
@Schema(description = "顶部字段值")
|
||||
private String formValue;
|
||||
|
||||
@Schema(description = "签名信息")
|
||||
private String documentSignature;
|
||||
|
||||
@Schema(description = "完成状态,【字典】【jy_assay_task_finish_status】默认;待处理;已完成(待提交);已提交", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "完成状态,【字典】【jy_assay_task_finish_status】默认;待处理;已完成(待提交);已提交不能为空")
|
||||
private String finishStatus;
|
||||
|
||||
@Schema(description = "流程状态,【字典】【jy_assay_task_flow_status】默认;审批中;打回;已完成", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "流程状态,【字典】【jy_assay_task_flow_status】默认;审批中;打回;已完成不能为空")
|
||||
private String flowStatus;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "所属部门不能为空")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.controller.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BusinessSampleEntrustDetailExtendRespVO extends BusinessSampleEntrustDetailRespVO {
|
||||
|
||||
private List<BusinessSampleEntrustProjectExtendRespVO> sampleEntrustDetailProjectList;
|
||||
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.controller.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 子样判定数据业务分页 Request VO")
|
||||
@Data
|
||||
public class BusinessSubSampleAssessmentPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "子样样ID", example = "21287")
|
||||
private Long businessSubSampleId;
|
||||
|
||||
@Schema(description = "检测项目ID,字典表【T_DIC_PRJ】", example = "19965")
|
||||
private Long dictionaryProjectId;
|
||||
|
||||
@Schema(description = "检测方法分析项目配置ID", example = "11904")
|
||||
private Long configAssayMethodProjectId;
|
||||
|
||||
@Schema(description = "检测方法配置ID", example = "11800")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", example = "1")
|
||||
private Long taskType;
|
||||
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...", example = "1")
|
||||
private Long assayType;
|
||||
|
||||
@Schema(description = "数据类型,【字典】【jy_sample_data_type】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", example = "2")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "小数位")
|
||||
private Integer decimalPosition;
|
||||
|
||||
@Schema(description = "判定值")
|
||||
private String assessmentValue;
|
||||
|
||||
@Schema(description = "超差标注", example = "1")
|
||||
private String assessmentStatus;
|
||||
|
||||
@Schema(description = "是否已上报")
|
||||
private Integer isReported;
|
||||
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] reportTime;
|
||||
|
||||
@Schema(description = "复检次数", example = "3971")
|
||||
private Integer recheckCount;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "乐观锁", example = "21743")
|
||||
private Integer updateCount;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 子样判定数据业务新增/修改 Request VO")
|
||||
@Data
|
||||
public class BusinessSubSampleAssessmentSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18232")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "子样样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21287")
|
||||
@NotNull(message = "子样样ID不能为空")
|
||||
private Long businessSubSampleId;
|
||||
|
||||
@Schema(description = "检测项目ID,字典表【T_DIC_PRJ】", requiredMode = Schema.RequiredMode.REQUIRED, example = "19965")
|
||||
@NotNull(message = "检测项目ID,字典表【T_DIC_PRJ】不能为空")
|
||||
private Long dictionaryProjectId;
|
||||
|
||||
@Schema(description = "检测方法分析项目配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11904")
|
||||
@NotNull(message = "检测方法分析项目配置ID不能为空")
|
||||
private Long configAssayMethodProjectId;
|
||||
|
||||
@Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11800")
|
||||
@NotNull(message = "检测方法配置ID不能为空")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "任务类型,【字典】【jy_sample_task_type】常规、抽查...不能为空")
|
||||
private Long taskType;
|
||||
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...不能为空")
|
||||
private Long assayType;
|
||||
|
||||
@Schema(description = "数据类型,【字典】【jy_sample_data_type】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "数据类型,【字典】【jy_sample_data_type】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间不能为空")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "小数位")
|
||||
private Integer decimalPosition;
|
||||
|
||||
@Schema(description = "判定值")
|
||||
private String assessmentValue;
|
||||
|
||||
@Schema(description = "超差标注", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "超差标注不能为空")
|
||||
private String assessmentStatus;
|
||||
|
||||
@Schema(description = "是否已上报", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "是否已上报不能为空")
|
||||
private Integer isReported;
|
||||
|
||||
@Schema(description = "上报人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "上报人不能为空")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "上报时间不能为空")
|
||||
private LocalDateTime reportTime;
|
||||
|
||||
@Schema(description = "复检次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "3971")
|
||||
@NotNull(message = "复检次数不能为空")
|
||||
private Integer recheckCount;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "所属部门不能为空")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "21743")
|
||||
@NotNull(message = "乐观锁不能为空")
|
||||
private Integer updateCount;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BusinessSubSampleExtendRespVO extends BusinessSubSampleRespVO {
|
||||
|
||||
/** 子样类型名称 **/
|
||||
@Schema(description = "子样类型名称")
|
||||
private String dictionaryBusinessName;
|
||||
|
||||
}
|
||||
@@ -1,129 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.controller.vo;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 子样业务 Request VO")
|
||||
@Data
|
||||
public class BusinessSubSampleReqVO {
|
||||
|
||||
@Schema(description = "样品主样ID", example = "11587")
|
||||
private Long businessBaseSampleId;
|
||||
|
||||
@Schema(description = "样品分样ID", example = "2157")
|
||||
private Long businessSubParentSampleId;
|
||||
|
||||
@Schema(description = "子样配置ID", example = "20299")
|
||||
private Long configSubSampleId;
|
||||
|
||||
@Schema(description = "子样类型ID,字典表:【T_DIC_BSN】化学分析样、试金分析样、仪器分析样", example = "30304")
|
||||
private Long dictionaryBusinessId;
|
||||
|
||||
@Schema(description = "库位信息ID", example = "28807")
|
||||
private Long configWarehouseLocationInfomationId;
|
||||
|
||||
@Schema(description = "样品ID", example = "13062")
|
||||
private Long sampleId;
|
||||
|
||||
@Schema(description = "组ID,如果是委托创建的,则组ID和样品分样ID一致", example = "29885")
|
||||
private String groupId;
|
||||
|
||||
@Schema(description = "样品名称", example = "赵六")
|
||||
private String sampleName;
|
||||
|
||||
@Schema(description = "样品编号")
|
||||
private String sampleCode;
|
||||
|
||||
@Schema(description = "分析编号")
|
||||
private String sampleAssayCode;
|
||||
|
||||
@Schema(description = "归库编号")
|
||||
private String sampleReturnCode;
|
||||
|
||||
@Schema(description = "是否称重,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer isWeighing;
|
||||
|
||||
@Schema(description = "末次样品重量")
|
||||
private BigDecimal lastSampleWeight;
|
||||
|
||||
@Schema(description = "样品流程ID", example = "18294")
|
||||
private Long sampleFlowId;
|
||||
|
||||
@Schema(description = "样品流程KEY")
|
||||
private String sampleFlowKey;
|
||||
|
||||
@Schema(description = "下一步样品流程名称")
|
||||
private String nextSampleFlow;
|
||||
|
||||
@Schema(description = "是否已生成归库码")
|
||||
private Integer isGenerateReturnCode;
|
||||
|
||||
@Schema(description = "任务指派给分析人")
|
||||
private String assayOperator;
|
||||
|
||||
@Schema(description = "是否已指派")
|
||||
private Integer isTasked;
|
||||
|
||||
@Schema(description = "指派时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] taskTime;
|
||||
|
||||
@Schema(description = "是否已上报")
|
||||
private Integer isReported;
|
||||
|
||||
@Schema(description = "上报人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] reportTime;
|
||||
|
||||
@Schema(description = "归库时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] returnTime;
|
||||
|
||||
@Schema(description = "归库状态,【字典】【jy_sample_return_status】待归库、已归库、已调拨、已下架、待销毁、已销毁", example = "1")
|
||||
private Integer returnStatus;
|
||||
|
||||
@Schema(description = "打印次数", example = "28859")
|
||||
private Integer returnCodePrintCount;
|
||||
|
||||
@Schema(description = "末次打印时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] printLastTime;
|
||||
|
||||
@Schema(description = "样品流程节点时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] sampleFlowTime;
|
||||
|
||||
@Schema(description = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废", example = "2")
|
||||
private String sampleStatus;
|
||||
|
||||
@Schema(description = "是否启用,1-启用,0-不启用")
|
||||
private Integer isEnabled;
|
||||
|
||||
@Schema(description = "分析元素备注")
|
||||
private String analysisRemark;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "乐观锁", example = "8971")
|
||||
private Integer updateCount;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessAssayParameterDataDO;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 检测参数数据业务 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusinessAssayParameterDataMapper extends BaseMapperX<BusinessAssayParameterDataDO> {
|
||||
|
||||
default PageResult<BusinessAssayParameterDataDO> selectPage(BusinessAssayParameterDataPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessAssayParameterDataDO>()
|
||||
.eqIfPresent(BusinessAssayParameterDataDO::getBusinessAssayProjectDataId, reqVO.getBusinessAssayProjectDataId())
|
||||
.eqIfPresent(BusinessAssayParameterDataDO::getConfigAssayMethodProjectParameterId, reqVO.getConfigAssayMethodProjectParameterId())
|
||||
.eqIfPresent(BusinessAssayParameterDataDO::getDictionaryParameterId, reqVO.getDictionaryParameterId())
|
||||
.eqIfPresent(BusinessAssayParameterDataDO::getValue, reqVO.getValue())
|
||||
.eqIfPresent(BusinessAssayParameterDataDO::getDataType, reqVO.getDataType())
|
||||
.eqIfPresent(BusinessAssayParameterDataDO::getDecimalPosition, reqVO.getDecimalPosition())
|
||||
.eqIfPresent(BusinessAssayParameterDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessAssayParameterDataDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessAssayParameterDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(BusinessAssayParameterDataDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessAssayParameterDataDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 检测项目数据业务 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusinessAssayProjectDataMapper extends BaseMapperX<BusinessAssayProjectDataDO> {
|
||||
|
||||
default PageResult<BusinessAssayProjectDataDO> selectPage(BusinessAssayProjectDataPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessAssayProjectDataDO>()
|
||||
.eqIfPresent(BusinessAssayProjectDataDO::getBusinessAssayTaskDataId, reqVO.getBusinessAssayTaskDataId())
|
||||
.eqIfPresent(BusinessAssayProjectDataDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
|
||||
.eqIfPresent(BusinessAssayProjectDataDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
||||
.eqIfPresent(BusinessAssayProjectDataDO::getValue, reqVO.getValue())
|
||||
.eqIfPresent(BusinessAssayProjectDataDO::getDataType, reqVO.getDataType())
|
||||
.eqIfPresent(BusinessAssayProjectDataDO::getDecimalPosition, reqVO.getDecimalPosition())
|
||||
.eqIfPresent(BusinessAssayProjectDataDO::getIsNotAssessment, reqVO.getIsNotAssessment())
|
||||
.eqIfPresent(BusinessAssayProjectDataDO::getIsEnabled, reqVO.getIsEnabled())
|
||||
.eqIfPresent(BusinessAssayProjectDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(BusinessAssayProjectDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessAssayProjectDataDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessAssayProjectDataDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessAssayProjectDataDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
||||
import jakarta.validation.Valid;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 子样检测任务业务 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTaskDataDO> {
|
||||
|
||||
|
||||
List<Map<String, Object>> selectUnAssayTaskGroupList();
|
||||
|
||||
default List<BusinessAssayTaskDataExtendRespVO> selectList(BusinessAssayTaskDataReqVO reqVO) {
|
||||
return selectJoinList(BusinessAssayTaskDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayTaskDataDO>()
|
||||
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessAssayTaskDataDO::getConfigAssayMethodId)
|
||||
.leftJoin(BusinessSubSampleDO.class, BusinessSubSampleDO::getId, BusinessAssayTaskDataDO::getBusinessSubSampleId)
|
||||
.selectAll(BusinessAssayTaskDataDO.class)
|
||||
.selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskDataExtendRespVO::getConfigAssayMethodName)
|
||||
.selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName)
|
||||
.selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode)
|
||||
.selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessAssayTaskDataExtendRespVO::getSampleAssayCode)
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getTaskType, reqVO.getTaskType())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getAssayType, reqVO.getAssayType())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getAssayOperator, reqVO.getAssayOperator())
|
||||
.betweenIfPresent(BusinessAssayTaskDataDO::getTaskTime, reqVO.getTaskTime())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getIsTasked, reqVO.getIsTasked())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getIsReported, reqVO.getIsReported())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getReporter, reqVO.getReporter())
|
||||
.betweenIfPresent(BusinessAssayTaskDataDO::getReportTime, reqVO.getReportTime())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getFlowNode, reqVO.getFlowNode())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getRecheckCount, reqVO.getRecheckCount())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessAssayTaskDataDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessAssayTaskDataDO::getId));
|
||||
}
|
||||
|
||||
default PageResult<BusinessAssayTaskDataExtendRespVO> selectPage(BusinessAssayTaskDataPageReqVO reqVO) {
|
||||
return selectJoinPage(reqVO, BusinessAssayTaskDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayTaskDataDO>()
|
||||
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessAssayTaskDataDO::getConfigAssayMethodId)
|
||||
.leftJoin(BusinessSubSampleDO.class, BusinessSubSampleDO::getId, BusinessAssayTaskDataDO::getBusinessSubSampleId)
|
||||
.selectAll(BusinessAssayTaskDataDO.class)
|
||||
.selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskDataExtendRespVO::getConfigAssayMethodName)
|
||||
.selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName)
|
||||
.selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode)
|
||||
.selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessAssayTaskDataExtendRespVO::getSampleAssayCode)
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getTaskType, reqVO.getTaskType())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getAssayType, reqVO.getAssayType())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getAssayOperator, reqVO.getAssayOperator())
|
||||
.betweenIfPresent(BusinessAssayTaskDataDO::getTaskTime, reqVO.getTaskTime())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getIsTasked, reqVO.getIsTasked())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getIsReported, reqVO.getIsReported())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getReporter, reqVO.getReporter())
|
||||
.betweenIfPresent(BusinessAssayTaskDataDO::getReportTime, reqVO.getReportTime())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getFlowNode, reqVO.getFlowNode())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getRecheckCount, reqVO.getRecheckCount())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessAssayTaskDataDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessAssayTaskDataDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
||||
/**
|
||||
* 委检登记样品明细 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusinessSampleEntrustDetailMapper extends BaseMapperX<BusinessSampleEntrustDetailDO> {
|
||||
|
||||
default PageResult<BusinessSampleEntrustDetailDO> selectPage(BusinessSampleEntrustDetailPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>()
|
||||
.eqIfPresent(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, reqVO.getBusinessSampleEntrustRegistrationId())
|
||||
.eqIfPresent(BusinessSampleEntrustDetailDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId())
|
||||
.eqIfPresent(BusinessSampleEntrustDetailDO::getBaseSampleId, reqVO.getBaseSampleId())
|
||||
.eqIfPresent(BusinessSampleEntrustDetailDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
|
||||
.likeIfPresent(BusinessSampleEntrustDetailDO::getSampleName, reqVO.getSampleName())
|
||||
.eqIfPresent(BusinessSampleEntrustDetailDO::getSampleCode, reqVO.getSampleCode())
|
||||
.likeIfPresent(BusinessSampleEntrustDetailDO::getEntrustSampleName, reqVO.getEntrustSampleName())
|
||||
.eqIfPresent(BusinessSampleEntrustDetailDO::getEntrustSampleCode, reqVO.getEntrustSampleCode())
|
||||
.eqIfPresent(BusinessSampleEntrustDetailDO::getSort, reqVO.getSort())
|
||||
.eqIfPresent(BusinessSampleEntrustDetailDO::getAssayProject, reqVO.getAssayProject())
|
||||
.eqIfPresent(BusinessSampleEntrustDetailDO::getForecastResult, reqVO.getForecastResult())
|
||||
.eqIfPresent(BusinessSampleEntrustDetailDO::getIsWeighing, reqVO.getIsWeighing())
|
||||
.eqIfPresent(BusinessSampleEntrustDetailDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessSampleEntrustDetailDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessSampleEntrustDetailDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(BusinessSampleEntrustDetailDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessSampleEntrustDetailDO::getId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 物理批量删除删除
|
||||
* @param idList
|
||||
* @return
|
||||
*/
|
||||
int physicalDeleteByIds(@Param("idList") List<Long> idList);
|
||||
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustProjectPageReqVO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustProjectDO;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
||||
/**
|
||||
* 委检样品检测项目业务 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusinessSampleEntrustProjectMapper extends BaseMapperX<BusinessSampleEntrustProjectDO> {
|
||||
|
||||
default PageResult<BusinessSampleEntrustProjectDO> selectPage(BusinessSampleEntrustProjectPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessSampleEntrustProjectDO>()
|
||||
.eqIfPresent(BusinessSampleEntrustProjectDO::getBusinessSampleEntrustDetailId, reqVO.getBusinessSampleEntrustDetailId())
|
||||
.eqIfPresent(BusinessSampleEntrustProjectDO::getMaterialAssayStandardDetailId, reqVO.getMaterialAssayStandardDetailId())
|
||||
.eqIfPresent(BusinessSampleEntrustProjectDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
||||
.eqIfPresent(BusinessSampleEntrustProjectDO::getIsEnabled, reqVO.getIsEnabled())
|
||||
.eqIfPresent(BusinessSampleEntrustProjectDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessSampleEntrustProjectDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessSampleEntrustProjectDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(BusinessSampleEntrustProjectDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessSampleEntrustProjectDO::getId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 物理批量删除删除
|
||||
* @param idList
|
||||
* @return
|
||||
*/
|
||||
int physicalDeleteByIds(@Param("idList") List<Long> idList);
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleHandoverDetailDO;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 样品交接明细 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusinessSampleHandoverDetailMapper extends BaseMapperX<BusinessSampleHandoverDetailDO> {
|
||||
|
||||
default PageResult<BusinessSampleHandoverDetailDO> selectPage(BusinessSampleHandoverDetailPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessSampleHandoverDetailDO>()
|
||||
.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));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleAssessmentDO;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 子样判定数据业务 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusinessSubSampleAssessmentMapper extends BaseMapperX<BusinessSubSampleAssessmentDO> {
|
||||
|
||||
default PageResult<BusinessSubSampleAssessmentDO> selectPage(BusinessSubSampleAssessmentPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessSubSampleAssessmentDO>()
|
||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId())
|
||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
|
||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getTaskType, reqVO.getTaskType())
|
||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getAssayType, reqVO.getAssayType())
|
||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getDataType, reqVO.getDataType())
|
||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getDecimalPosition, reqVO.getDecimalPosition())
|
||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getAssessmentValue, reqVO.getAssessmentValue())
|
||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getAssessmentStatus, reqVO.getAssessmentStatus())
|
||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getIsReported, reqVO.getIsReported())
|
||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getReporter, reqVO.getReporter())
|
||||
.betweenIfPresent(BusinessSubSampleAssessmentDO::getReportTime, reqVO.getReportTime())
|
||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getRecheckCount, reqVO.getRecheckCount())
|
||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessSubSampleAssessmentDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(BusinessSubSampleAssessmentDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessSubSampleAssessmentDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||
import cn.iocoder.yudao.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO;
|
||||
import jakarta.validation.Valid;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 子样业务 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO> {
|
||||
|
||||
default PageResult<BusinessSubSampleExtendRespVO> selectPage(BusinessSubSamplePageReqVO reqVO) {
|
||||
return selectJoinPage(reqVO, BusinessSubSampleExtendRespVO.class, new MPJLambdaWrapperX<BusinessSubSampleDO>()
|
||||
.leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, BusinessSubSampleDO::getDictionaryBusinessId)
|
||||
.selectAll(BusinessSubSampleDO.class)
|
||||
.selectAs(DictionaryBusinessDO::getName, BusinessSubSampleExtendRespVO::getDictionaryBusinessName)
|
||||
.eqIfPresent(BusinessSubSampleDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId())
|
||||
.eqIfPresent(BusinessSubSampleDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId())
|
||||
.eqIfPresent(BusinessSubSampleDO::getConfigSubSampleId, reqVO.getConfigSubSampleId())
|
||||
.eqIfPresent(BusinessSubSampleDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
|
||||
.eqIfPresent(BusinessSubSampleDO::getConfigWarehouseLocationInfomationId, reqVO.getConfigWarehouseLocationInfomationId())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleId, reqVO.getSampleId())
|
||||
.eqIfPresent(BusinessSubSampleDO::getGroupId, reqVO.getGroupId())
|
||||
.likeIfPresent(BusinessSubSampleDO::getSampleName, reqVO.getSampleName())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleCode, reqVO.getSampleCode())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleAssayCode, reqVO.getSampleAssayCode())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleReturnCode, reqVO.getSampleReturnCode())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleFlowId, reqVO.getSampleFlowId())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleFlowKey, reqVO.getSampleFlowKey())
|
||||
.eqIfPresent(BusinessSubSampleDO::getNextSampleFlow, reqVO.getNextSampleFlow())
|
||||
.eqIfPresent(BusinessSubSampleDO::getIsGenerateReturnCode, reqVO.getIsGenerateReturnCode())
|
||||
.eqIfPresent(BusinessSubSampleDO::getAssayOperator, reqVO.getAssayOperator())
|
||||
.eqIfPresent(BusinessSubSampleDO::getIsTasked, reqVO.getIsTasked())
|
||||
.betweenIfPresent(BusinessSubSampleDO::getTaskTime, reqVO.getTaskTime())
|
||||
.eqIfPresent(BusinessSubSampleDO::getIsReported, reqVO.getIsReported())
|
||||
.eqIfPresent(BusinessSubSampleDO::getReporter, reqVO.getReporter())
|
||||
.betweenIfPresent(BusinessSubSampleDO::getReportTime, reqVO.getReportTime())
|
||||
.betweenIfPresent(BusinessSubSampleDO::getReturnTime, reqVO.getReturnTime())
|
||||
.eqIfPresent(BusinessSubSampleDO::getReturnStatus, reqVO.getReturnStatus())
|
||||
.eqIfPresent(BusinessSubSampleDO::getReturnCodePrintCount, reqVO.getReturnCodePrintCount())
|
||||
.betweenIfPresent(BusinessSubSampleDO::getPrintLastTime, reqVO.getPrintLastTime())
|
||||
.betweenIfPresent(BusinessSubSampleDO::getSampleFlowTime, reqVO.getSampleFlowTime())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleStatus, reqVO.getSampleStatus())
|
||||
.eqIfPresent(BusinessSubSampleDO::getIsEnabled, reqVO.getIsEnabled())
|
||||
.eqIfPresent(BusinessSubSampleDO::getAnalysisRemark, reqVO.getAnalysisRemark())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessSubSampleDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessSubSampleDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(BusinessSubSampleDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessSubSampleDO::getSampleFlowTime).orderByAsc(BusinessSubSampleDO::getSampleCode));
|
||||
}
|
||||
|
||||
default List<BusinessSubSampleExtendRespVO> selectlist(@Valid BusinessSubSampleReqVO reqVO) {
|
||||
return selectJoinList(BusinessSubSampleExtendRespVO.class, new MPJLambdaWrapperX<BusinessSubSampleDO>()
|
||||
.leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, BusinessSubSampleDO::getDictionaryBusinessId)
|
||||
.selectAll(BusinessSubSampleDO.class)
|
||||
.selectAs(DictionaryBusinessDO::getName, BusinessSubSampleExtendRespVO::getDictionaryBusinessName)
|
||||
.eqIfPresent(BusinessSubSampleDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId())
|
||||
.eqIfPresent(BusinessSubSampleDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId())
|
||||
.eqIfPresent(BusinessSubSampleDO::getConfigSubSampleId, reqVO.getConfigSubSampleId())
|
||||
.eqIfPresent(BusinessSubSampleDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
|
||||
.eqIfPresent(BusinessSubSampleDO::getConfigWarehouseLocationInfomationId, reqVO.getConfigWarehouseLocationInfomationId())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleId, reqVO.getSampleId())
|
||||
.eqIfPresent(BusinessSubSampleDO::getGroupId, reqVO.getGroupId())
|
||||
.likeIfPresent(BusinessSubSampleDO::getSampleName, reqVO.getSampleName())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleCode, reqVO.getSampleCode())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleAssayCode, reqVO.getSampleAssayCode())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleReturnCode, reqVO.getSampleReturnCode())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleFlowId, reqVO.getSampleFlowId())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleFlowKey, reqVO.getSampleFlowKey())
|
||||
.eqIfPresent(BusinessSubSampleDO::getNextSampleFlow, reqVO.getNextSampleFlow())
|
||||
.eqIfPresent(BusinessSubSampleDO::getIsGenerateReturnCode, reqVO.getIsGenerateReturnCode())
|
||||
.eqIfPresent(BusinessSubSampleDO::getAssayOperator, reqVO.getAssayOperator())
|
||||
.eqIfPresent(BusinessSubSampleDO::getIsTasked, reqVO.getIsTasked())
|
||||
.betweenIfPresent(BusinessSubSampleDO::getTaskTime, reqVO.getTaskTime())
|
||||
.eqIfPresent(BusinessSubSampleDO::getIsReported, reqVO.getIsReported())
|
||||
.eqIfPresent(BusinessSubSampleDO::getReporter, reqVO.getReporter())
|
||||
.betweenIfPresent(BusinessSubSampleDO::getReportTime, reqVO.getReportTime())
|
||||
.betweenIfPresent(BusinessSubSampleDO::getReturnTime, reqVO.getReturnTime())
|
||||
.eqIfPresent(BusinessSubSampleDO::getReturnStatus, reqVO.getReturnStatus())
|
||||
.eqIfPresent(BusinessSubSampleDO::getReturnCodePrintCount, reqVO.getReturnCodePrintCount())
|
||||
.betweenIfPresent(BusinessSubSampleDO::getPrintLastTime, reqVO.getPrintLastTime())
|
||||
.betweenIfPresent(BusinessSubSampleDO::getSampleFlowTime, reqVO.getSampleFlowTime())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleStatus, reqVO.getSampleStatus())
|
||||
.eqIfPresent(BusinessSubSampleDO::getIsEnabled, reqVO.getIsEnabled())
|
||||
.eqIfPresent(BusinessSubSampleDO::getAnalysisRemark, reqVO.getAnalysisRemark())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessSubSampleDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessSubSampleDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(BusinessSubSampleDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessSubSampleDO::getId));
|
||||
}
|
||||
|
||||
default BusinessSubSampleExtendRespVO getBySampleCodeAndFlowKey(@Valid BusinessSubSampleReqVO reqVO) {
|
||||
return selectJoinOne(BusinessSubSampleExtendRespVO.class, new MPJLambdaWrapperX<BusinessSubSampleDO>()
|
||||
.leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, BusinessSubSampleDO::getDictionaryBusinessId)
|
||||
.selectAll(BusinessSubSampleDO.class)
|
||||
.selectAs(DictionaryBusinessDO::getName, BusinessSubSampleExtendRespVO::getDictionaryBusinessName)
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleCode, reqVO.getSampleCode())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleFlowKey, reqVO.getSampleFlowKey())
|
||||
.eqIfPresent(BusinessSubSampleDO::getSampleStatus, "normal")
|
||||
.eqIfPresent(BusinessSubSampleDO::getIsEnabled, 1)
|
||||
.orderByDesc(BusinessSubSampleDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.entrust;
|
||||
|
||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleEntrustContext;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigEntrustSourceDO;
|
||||
|
||||
/**
|
||||
* 样品委托检查
|
||||
*/
|
||||
@LiteflowComponent(id = "sampleEntrustCheckCmp", name = "样品委托检查")
|
||||
public class SampleEntrustCheckCmp extends NodeComponent {
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
//获取样品委托上下文
|
||||
SampleEntrustContext sampleEntrustContext = this.getContextBean(SampleEntrustContext.class);
|
||||
//获取样品委托单
|
||||
BusinessSampleEntrustRegistrationDO sampleEntrustRegistration = sampleEntrustContext.getSampleEntrustRegistration();
|
||||
|
||||
if ("entrust_registration".equals(sampleEntrustRegistration.getEntrustType())) {
|
||||
if (sampleEntrustRegistration.getConfigEntrustSourceId() == null) {
|
||||
throw new ServiceException(500, "委托来源id不允许为空");
|
||||
}
|
||||
ConfigEntrustSourceDO configEntrustSource = sampleEntrustContext.getConfigEntrustSourceById(sampleEntrustRegistration.getConfigEntrustSourceId());
|
||||
if (configEntrustSource == null) {
|
||||
throw new ServiceException(500, "委托来源id不正确");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sampleEntrustRegistration.setDataCheckStatus("success");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.entrust;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleAssayResultDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustProjectDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleAssayResultMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustDetailMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustProjectMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustRegistrationMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleEntrustContext;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigEntrustSourceDO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailDO;
|
||||
import cn.iocoder.yudao.module.qms.core.code.SequenceUtil;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
@LiteflowComponent(id = "sampleEntrustCreateDataCmp", name = "样品委托创建委托数据" )
|
||||
public class SampleEntrustCreateDataCmp extends NodeComponent {
|
||||
|
||||
@Resource
|
||||
private SequenceUtil sequenceUtil;
|
||||
|
||||
@Resource
|
||||
private BusinessSampleEntrustRegistrationMapper businessSampleEntrustRegistrationMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessSampleEntrustDetailMapper businessSampleEntrustDetailMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessSampleEntrustProjectMapper businessSampleEntrustProjectMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessSampleAssayResultMapper businessSampleAssayResultMapper;
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
//获取样品委托上下文
|
||||
SampleEntrustContext sampleEntrustContext = this.getContextBean(SampleEntrustContext.class);
|
||||
//样品委托
|
||||
BusinessSampleEntrustRegistrationDO sampleEntrustRegistration = sampleEntrustContext.getSampleEntrustRegistration();
|
||||
|
||||
//获取委托来源配置
|
||||
String codeRule = "QMS_YTJY_ENTT_SRC_CD";
|
||||
if (sampleEntrustRegistration.getConfigEntrustSourceId() != null) {
|
||||
ConfigEntrustSourceDO configEntrustSource = sampleEntrustContext.getConfigEntrustSourceById(sampleEntrustRegistration.getConfigEntrustSourceId());
|
||||
codeRule = configEntrustSource.getCodeRule();
|
||||
}
|
||||
|
||||
//赋值id
|
||||
sampleEntrustRegistration.setId(IdWorker.getId());
|
||||
//设置委托单号
|
||||
sampleEntrustRegistration.setEntrustNumber(sequenceUtil.genCode(codeRule));
|
||||
sampleEntrustRegistration.setRegistrationStatus("in_progress");
|
||||
sampleEntrustRegistration.setCreateOperator(sampleEntrustContext.getLoginRealname());
|
||||
|
||||
List<BusinessSampleAssayResultDO> sampleAssayResultList = new ArrayList<>();
|
||||
|
||||
|
||||
List<BusinessSampleEntrustDetailDO> sampleEntrustDetailList = sampleEntrustContext.getSampleEntrustDetailList();
|
||||
for (BusinessSampleEntrustDetailDO businessSampleEntrustDetail : sampleEntrustDetailList) {
|
||||
businessSampleEntrustDetail.setBusinessSampleEntrustRegistrationId(sampleEntrustRegistration.getId());
|
||||
|
||||
if (StringUtils.isNotBlank(businessSampleEntrustDetail.getForecastResult())) {
|
||||
BusinessSampleAssayResultDO sampleAssayResult = new BusinessSampleAssayResultDO();
|
||||
sampleAssayResult.setBusinessSampleEntrustDetailId(businessSampleEntrustDetail.getId());
|
||||
sampleAssayResult.setData(businessSampleEntrustDetail.getForecastResult());
|
||||
sampleAssayResultList.add(sampleAssayResult);
|
||||
}
|
||||
}
|
||||
|
||||
List<BusinessSampleEntrustProjectDO> sampleEntrustProjectList = sampleEntrustContext.getSampleEntrustProjectList();
|
||||
for (BusinessSampleEntrustProjectDO businessSampleEntrustProject : sampleEntrustProjectList) {
|
||||
MaterialAssayStandardDetailDO materialAssayStandardDetail = sampleEntrustContext.getMaterialAssayStandardDetailById(businessSampleEntrustProject.getMaterialAssayStandardDetailId());
|
||||
businessSampleEntrustProject.setDictionaryProjectId(materialAssayStandardDetail.getDictionaryProjectId());
|
||||
}
|
||||
|
||||
//保存样品委托登记
|
||||
businessSampleEntrustRegistrationMapper.insert(sampleEntrustRegistration);
|
||||
|
||||
//保存样品明细
|
||||
if (CollUtil.isNotEmpty(sampleEntrustDetailList)) {
|
||||
businessSampleEntrustDetailMapper.insertBatch(sampleEntrustDetailList);
|
||||
}
|
||||
|
||||
//保存检测项目
|
||||
if (CollUtil.isNotEmpty(sampleEntrustProjectList)) {
|
||||
businessSampleEntrustProjectMapper.insertBatch(sampleEntrustProjectList);
|
||||
}
|
||||
|
||||
//保存来样元素
|
||||
if (CollUtil.isNotEmpty(sampleAssayResultList)) {
|
||||
businessSampleAssayResultMapper.insertBatch(sampleAssayResultList);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,347 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.entrust;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessAssayParameterDataDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleAssayResultDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustProjectDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessAssayParameterDataMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessAssayProjectDataMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessBaseSampleMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleAssayResultMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustDetailMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustProjectMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustRegistrationMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSubParentSampleMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleEntrustContext;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectParameterDO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigBaseSampleDO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSampleFlowDO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleDO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleMethodDO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleParentDO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardMethodDO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigAssayMethodMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectParameterMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigBaseSampleMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigSampleFlowMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigSubSampleMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigSubSampleMethodMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigSubSampleParentMapper;
|
||||
import cn.iocoder.yudao.module.qms.core.code.SequenceUtil;
|
||||
import cn.iocoder.yudao.module.qms.core.sampleflow.SampleFlowDefinition;
|
||||
import cn.iocoder.yudao.module.qms.core.sampleflow.SampleFlowNode;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
@LiteflowComponent(id = "sampleEntrustGenSampleDataCmp", name = "样品委托生成系统样品数据")
|
||||
public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
||||
|
||||
@Resource
|
||||
private SequenceUtil sequenceUtil;
|
||||
|
||||
@Resource
|
||||
private BusinessSampleEntrustRegistrationMapper businessSampleEntrustRegistrationMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessSampleEntrustDetailMapper businessSampleEntrustDetailMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessSampleEntrustProjectMapper businessSampleEntrustProjectMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessSampleAssayResultMapper businessSampleAssayResultMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigBaseSampleMapper configBaseSampleMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessBaseSampleMapper businessBaseSampleMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigSubSampleParentMapper configSubSampleParentMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessSubParentSampleMapper businessSubParentSampleMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigSubSampleMapper configSubSampleMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessSubSampleMapper businessSubSampleMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigAssayMethodMapper configAssayMethodMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigSubSampleMethodMapper configSubSampleMethodMapper;//子样分析方法关联配置
|
||||
|
||||
@Resource
|
||||
private BusinessAssayTaskDataMapper businessAssayTaskDataMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigAssayMethodProjectMapper configAssayMethodProjectMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessAssayProjectDataMapper businessAssayProjectDataMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigAssayMethodProjectParameterMapper configAssayMethodProjectParameterMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessAssayParameterDataMapper businessAssayParameterDataMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigSampleFlowMapper configSampleFlowMapper;
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
//获取样品委托上下文
|
||||
SampleEntrustContext sampleEntrustContext = this.getContextBean(SampleEntrustContext.class);
|
||||
|
||||
//当前登录用户
|
||||
String loginRealname = sampleEntrustContext.getLoginRealname();
|
||||
|
||||
LocalDateTime currentDateTime = sampleEntrustContext.getCurrentDateTime();
|
||||
//样品委托登记
|
||||
BusinessSampleEntrustRegistrationDO sampleEntrustRegistration = sampleEntrustContext.getSampleEntrustRegistration();
|
||||
//样品委托登记明细
|
||||
List<BusinessSampleEntrustDetailDO> sampleEntrustDetailList = sampleEntrustContext.getSampleEntrustDetailList();
|
||||
//样品检测项目
|
||||
List<BusinessSampleEntrustProjectDO> sampleEntrustProjectList = sampleEntrustContext.getSampleEntrustProjectList();
|
||||
//样品来样品位
|
||||
List<BusinessSampleAssayResultDO> sampleAssayResultList = sampleEntrustContext.getSampleAssayResultList();
|
||||
|
||||
|
||||
|
||||
//主样配置
|
||||
List<ConfigBaseSampleDO> configBaseSampleList = configBaseSampleMapper.selectList();
|
||||
//分样配置
|
||||
List<ConfigSubSampleParentDO> configSubSampleParentList = configSubSampleParentMapper.selectList();
|
||||
//子样配置
|
||||
List<ConfigSubSampleDO> configSubSampleList = configSubSampleMapper.selectList();
|
||||
//子样分析方法配置
|
||||
List<ConfigSubSampleMethodDO> configSubSampleMethodList = configSubSampleMethodMapper.selectList();
|
||||
//分析方法配置
|
||||
List<ConfigAssayMethodDO> configAssayMethodList = configAssayMethodMapper.selectList();
|
||||
//分析方法检测项目配置
|
||||
List<ConfigAssayMethodProjectDO> configAssayMethodProjectList = configAssayMethodProjectMapper.selectList();
|
||||
//分析方法检测项目参数配置
|
||||
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterList = configAssayMethodProjectParameterMapper.selectList();
|
||||
//样品流程配置
|
||||
List<ConfigSampleFlowDO> configSampleFlowList = configSampleFlowMapper.selectList();
|
||||
|
||||
List<BusinessBaseSampleDO> businessBaseSampleDOList = new ArrayList<>();
|
||||
List<BusinessSubParentSampleDO> businessSubParentSampleDOList = new ArrayList<>();
|
||||
List<BusinessSubSampleDO> businessSubSampleDOList = new ArrayList<>();
|
||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = new ArrayList<>();
|
||||
List<BusinessAssayProjectDataDO> businessAssayProjectDataDOList = new ArrayList<>();
|
||||
List<BusinessAssayParameterDataDO> businessAssayParameterDataDOList = new ArrayList<>();
|
||||
|
||||
List<BusinessSampleEntrustDetailDO> sampleEntrustDetailListSort = sampleEntrustDetailList.stream().sorted(Comparator.comparingInt(BusinessSampleEntrustDetailDO::getSort)).collect(Collectors.toList());
|
||||
BusinessBaseSampleDO businessBaseSampleDO = null;
|
||||
for (BusinessSampleEntrustDetailDO businessSampleEntrustDetailDO : sampleEntrustDetailListSort) {//委托样品明细
|
||||
//获取当前样品的检测项目
|
||||
List<BusinessSampleEntrustProjectDO> sampleEntrustProjectDOList = sampleEntrustProjectList.stream().filter(f -> businessSampleEntrustDetailDO.getId().equals(f.getBusinessSampleEntrustDetailId())).collect(Collectors.toList());
|
||||
for (BusinessSampleEntrustProjectDO businessSampleEntrustProjectDO : sampleEntrustProjectDOList) {//循环检测项目
|
||||
//获取默认的分析方法对应的检测项目
|
||||
MaterialAssayStandardMethodDO materialAssayStandardMethodDefault = sampleEntrustContext.getMaterialAssayStandardMethodDefaultByMaterialAssayStandardDetailId(businessSampleEntrustProjectDO.getMaterialAssayStandardDetailId());
|
||||
// if (materialAssayStandardMethodDefault == null) {
|
||||
// throw new ServiceException(500, "未找到对应的检测项目方法");
|
||||
// }
|
||||
//获取检测方法id
|
||||
Long configAssayMethodId = materialAssayStandardMethodDefault.getConfigAssayMethodId();
|
||||
//通过方法id在子样分析方法配置中查找子样配置
|
||||
ConfigSubSampleMethodDO configSubSampleMethod = configSubSampleMethodList.stream().filter(f -> configAssayMethodId.equals(f.getConfigAssayMethodId())).findFirst().orElse(null);
|
||||
//获取到子样配置id
|
||||
Long configSubSampleId = configSubSampleMethod.getConfigSubSampleId();
|
||||
//获取到子样配置
|
||||
ConfigSubSampleDO configSubSample = configSubSampleList.stream().filter(f -> configSubSampleId.equals(f.getId())).findFirst().orElse(null);
|
||||
Long configSubSampleParentId = configSubSample.getConfigSubSampleParentId();
|
||||
ConfigSubSampleParentDO configSubSampleParent = configSubSampleParentList.stream().filter(f -> configSubSampleParentId.equals(f.getId())).findFirst().orElse(null);
|
||||
Long configBaseSampleId = configSubSampleParent.getConfigBaseSampleId();
|
||||
ConfigBaseSampleDO configBaseSample = configBaseSampleList.stream().filter(f -> configBaseSampleId.equals(f.getId())).findFirst().orElse(null);
|
||||
|
||||
//子样检测任务
|
||||
BusinessAssayTaskDataDO businessAssayTaskDataDO = null;
|
||||
|
||||
if (businessSampleEntrustDetailDO.getBusinessBaseSampleId() == null) {
|
||||
|
||||
//主样流程
|
||||
ConfigSampleFlowDO configSampleFlowBase = configSampleFlowList.stream().filter(f -> f.getKey().equals(configBaseSample.getFlowKey())).findFirst().orElse(null);
|
||||
//样品流程定义
|
||||
SampleFlowDefinition sampleFlowDefinitionBase = JSON.parseObject(configSampleFlowBase.getContent(), SampleFlowDefinition.class);
|
||||
List<SampleFlowNode> flowNodeBaseList = sampleFlowDefinitionBase.getFlowNodeList().stream().sorted(Comparator.comparing(SampleFlowNode::getSort)).collect(Collectors.toList());
|
||||
SampleFlowNode sampleFlowNodeBase = flowNodeBaseList.get(0);
|
||||
|
||||
//主样
|
||||
businessBaseSampleDO = new BusinessBaseSampleDO();
|
||||
businessBaseSampleDO.setId(IdWorker.getId());
|
||||
//设置配置id
|
||||
businessBaseSampleDO.setConfigBaseSampleId(configBaseSampleId);
|
||||
//样品名称为委托登记来的样品名称
|
||||
businessBaseSampleDO.setSampleName(businessSampleEntrustDetailDO.getSampleName());
|
||||
//样品类型字典与委托一致
|
||||
businessBaseSampleDO.setDictionaryBusinessId(businessSampleEntrustDetailDO.getDictionaryBusinessId());
|
||||
//生成样品编号
|
||||
String sampleCode = sequenceUtil.genCode(configBaseSample.getCodeRule());
|
||||
businessBaseSampleDO.setSampleCode(sampleCode);
|
||||
//样品生成时间为当前时间
|
||||
businessBaseSampleDO.setSampleTime(currentDateTime);
|
||||
//样品状态正常
|
||||
businessBaseSampleDO.setSampleStatus("normal");
|
||||
|
||||
businessBaseSampleDO.setSampleFlowKey(sampleFlowNodeBase.getNodeKey());
|
||||
businessBaseSampleDO.setSampleFlowTime(currentDateTime);
|
||||
|
||||
businessBaseSampleDO.setOperator(loginRealname);
|
||||
|
||||
//添加到列表
|
||||
businessBaseSampleDOList.add(businessBaseSampleDO);
|
||||
|
||||
//分样
|
||||
BusinessSubParentSampleDO businessSubParentSampleDO = new BusinessSubParentSampleDO();
|
||||
businessSubParentSampleDO.setId(IdWorker.getId());
|
||||
businessSubParentSampleDO.setDictionaryBusinessId(configSubSampleParent.getDictionaryBusinessId());
|
||||
businessSubParentSampleDO.setBusinessBaseSampleId(businessBaseSampleDO.getId());
|
||||
businessSubParentSampleDO.setConfigSubSampleParentId(configSubSampleParentId);
|
||||
businessSubParentSampleDO.setSampleName(businessBaseSampleDO.getSampleName());
|
||||
businessSubParentSampleDO.setSampleCode(businessBaseSampleDO.getSampleCode());
|
||||
businessSubParentSampleDO.setSubSampleCode(businessBaseSampleDO.getSampleCode());
|
||||
businessSubParentSampleDO.setSampleStatus("normal");
|
||||
businessSubParentSampleDOList.add(businessSubParentSampleDO);
|
||||
|
||||
//子样
|
||||
ConfigSampleFlowDO configSampleFlowSub = configSampleFlowList.stream().filter(f -> f.getKey().equals(configSubSample.getFlowKey())).findFirst().orElse(null);
|
||||
//样品流程定义
|
||||
SampleFlowDefinition sampleFlowDefinitionSub = JSON.parseObject(configSampleFlowSub.getContent(), SampleFlowDefinition.class);
|
||||
List<SampleFlowNode> flowNodeSubList = sampleFlowDefinitionSub.getFlowNodeList().stream().sorted(Comparator.comparing(SampleFlowNode::getSort)).collect(Collectors.toList());
|
||||
SampleFlowNode sampleFlowNodeSub = flowNodeSubList.get(0);
|
||||
|
||||
BusinessSubSampleDO businessSubSampleDO = new BusinessSubSampleDO();
|
||||
businessSubSampleDO.setId(IdWorker.getId());
|
||||
businessSubSampleDO.setBusinessBaseSampleId(businessBaseSampleDO.getId());
|
||||
businessSubSampleDO.setBusinessSubParentSampleId(businessSubParentSampleDO.getId());
|
||||
businessSubSampleDO.setConfigSubSampleId(configSubSampleId);
|
||||
businessSubSampleDO.setDictionaryBusinessId(configSubSample.getDictionaryBusinessId());
|
||||
businessSubSampleDO.setSampleName(businessBaseSampleDO.getSampleName());
|
||||
businessSubSampleDO.setSampleCode(businessBaseSampleDO.getSampleCode());
|
||||
businessSubSampleDO.setIsWeighing(businessSampleEntrustDetailDO.getIsWeighing());
|
||||
businessSubSampleDO.setSampleStatus("normal");
|
||||
businessSubSampleDO.setSampleFlowKey(sampleFlowNodeSub.getNodeKey());
|
||||
businessSubSampleDO.setSampleFlowTime(currentDateTime);
|
||||
|
||||
businessSubSampleDOList.add(businessSubSampleDO);
|
||||
|
||||
//子样检测任务
|
||||
businessAssayTaskDataDO = new BusinessAssayTaskDataDO();
|
||||
businessAssayTaskDataDO.setId(IdWorker.getId());
|
||||
businessAssayTaskDataDO.setBusinessBaseSampleId(businessSubSampleDO.getBusinessBaseSampleId());
|
||||
businessAssayTaskDataDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId());
|
||||
businessAssayTaskDataDO.setBusinessSubSampleId(businessSubSampleDO.getId());
|
||||
businessAssayTaskDataDO.setConfigAssayMethodId(configAssayMethodId);
|
||||
businessAssayTaskDataDO.setAssayType("单杯");
|
||||
businessAssayTaskDataDO.setTaskType("常规");
|
||||
|
||||
businessAssayTaskDataDOList.add(businessAssayTaskDataDO);
|
||||
|
||||
//设置主样id
|
||||
businessSampleEntrustDetailDO.setBusinessBaseSampleId(businessBaseSampleDO.getId());
|
||||
//设置主样编号
|
||||
businessSampleEntrustDetailDO.setSampleCode(businessBaseSampleDO.getSampleCode());
|
||||
}
|
||||
|
||||
if (businessAssayTaskDataDO == null) {
|
||||
businessAssayTaskDataDO = businessAssayTaskDataDOList.stream().filter(f -> f.getBusinessBaseSampleId().equals(businessSampleEntrustDetailDO.getBusinessBaseSampleId()) && f.getConfigAssayMethodId().equals(configAssayMethodId) ).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
ConfigAssayMethodProjectDO configAssayMethodProjectDO = configAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId) && f.getDictionaryProjectId().equals(businessSampleEntrustProjectDO.getDictionaryProjectId())).findFirst().orElse(null);
|
||||
|
||||
//检测项目
|
||||
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.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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
sampleEntrustRegistration.setRegistrationStatus("submit");
|
||||
|
||||
businessSampleEntrustRegistrationMapper.updateById(sampleEntrustRegistration);
|
||||
if (CollUtil.isNotEmpty(sampleEntrustDetailList)) {
|
||||
businessSampleEntrustDetailMapper.updateBatch(sampleEntrustDetailList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(sampleEntrustProjectList)) {
|
||||
businessSampleEntrustProjectMapper.updateBatch(sampleEntrustProjectList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(sampleAssayResultList)) {
|
||||
businessSampleAssayResultMapper.updateBatch(sampleAssayResultList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessBaseSampleDOList)) {
|
||||
businessBaseSampleMapper.insertBatch(businessBaseSampleDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessSubParentSampleDOList)) {
|
||||
businessSubParentSampleMapper.insertBatch(businessSubParentSampleDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessSubSampleDOList)) {
|
||||
businessSubSampleMapper.insertBatch(businessSubSampleDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessAssayTaskDataDOList)) {
|
||||
businessAssayTaskDataMapper.insertBatch(businessAssayTaskDataDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessAssayProjectDataDOList)) {
|
||||
businessAssayProjectDataMapper.insertBatch(businessAssayProjectDataDOList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(businessAssayParameterDataDOList)) {
|
||||
businessAssayParameterDataMapper.insertBatch(businessAssayParameterDataDOList);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.entrust;
|
||||
|
||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
|
||||
import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleEntrustContext;
|
||||
|
||||
@LiteflowComponent(id = "sampleEntrustReceiveDataCmp", name = "中心接收样品委托的样品数据")
|
||||
public class SampleEntrustReceiveDataCmp extends NodeComponent {
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAccess() {
|
||||
SampleEntrustContext sampleEntrustContext = this.getContextBean(SampleEntrustContext.class);
|
||||
if (sampleEntrustContext.getIsReceiveSample().equals(1)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.entrust;
|
||||
|
||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
|
||||
import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleEntrustContext;
|
||||
|
||||
@LiteflowComponent(id = "sampleEntrustSendDataCmp", name = "中心送样品委托的样品数据到分析室")
|
||||
public class SampleEntrustSendDataCmp extends NodeComponent {
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAccess() {
|
||||
SampleEntrustContext sampleEntrustContext = this.getContextBean(SampleEntrustContext.class);
|
||||
if (sampleEntrustContext.getIsSendSample().equals(1)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.flow;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessHandoverRecordSubDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleHandoverDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleHandoverDetailDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessBaseSampleMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessHandoverRecordSubMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleHandoverDetailMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleHandoverMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSubParentSampleMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleFlowContext;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
@LiteflowComponent(id = "sampleDataSaveOrUpdateCmp", name = "样品相关数据保存或更新")
|
||||
public class SampleDataSaveOrUpdateCmp extends NodeComponent {
|
||||
|
||||
@Resource
|
||||
private BusinessBaseSampleMapper businessBaseSampleMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessSubParentSampleMapper businessSubParentSampleMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessSubSampleMapper businessSubSampleMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessHandoverRecordSubMapper businessHandoverRecordSubMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessSampleHandoverMapper businessSampleHandoverMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessSampleHandoverDetailMapper businessSampleHandoverDetailMapper;
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
SampleFlowContext sampleFlowContext = this.getContextBean(SampleFlowContext.class);
|
||||
//主样
|
||||
List<BusinessBaseSampleDO> businessBaseSampleList = sampleFlowContext.getBusinessBaseSampleList();
|
||||
if (CollUtil.isNotEmpty(businessBaseSampleList)) {
|
||||
businessBaseSampleMapper.updateBatch(businessBaseSampleList);
|
||||
}
|
||||
//分样
|
||||
List<BusinessSubParentSampleDO> busSubPsampleList = sampleFlowContext.getBusinessSubParentSampleList();
|
||||
if (CollUtil.isNotEmpty(busSubPsampleList)) {
|
||||
businessSubParentSampleMapper.updateBatch(busSubPsampleList);
|
||||
}
|
||||
//子样
|
||||
List<BusinessSubSampleDO> busSubCsampleList = sampleFlowContext.getBusinessSubSampleList();
|
||||
if (CollUtil.isNotEmpty(busSubCsampleList)) {
|
||||
businessSubSampleMapper.updateBatch(busSubCsampleList);
|
||||
}
|
||||
//交接记录
|
||||
List<BusinessHandoverRecordSubDO> busHandoverRecordSubList = sampleFlowContext.getBusinessHandoverRecordSubList();
|
||||
if (CollUtil.isNotEmpty(busHandoverRecordSubList)) {
|
||||
businessHandoverRecordSubMapper.insertBatch(busHandoverRecordSubList);
|
||||
}
|
||||
//交接记录单
|
||||
BusinessSampleHandoverDO businessSampleHandover = sampleFlowContext.getBusinessSampleHandover();
|
||||
if (businessSampleHandover != null) {
|
||||
businessSampleHandoverMapper.insert(businessSampleHandover);
|
||||
}
|
||||
//交接记录单明细
|
||||
List<BusinessSampleHandoverDetailDO> businessSampleHandoverDetailList = sampleFlowContext.getBusinessSampleHandoverDetailList();
|
||||
if (CollUtil.isNotEmpty(businessSampleHandoverDetailList)) {
|
||||
businessSampleHandoverDetailMapper.insertBatch(businessSampleHandoverDetailList);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.flow;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleFlowInfo;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleFlowContext;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleDO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigSubSampleMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
@LiteflowComponent(id = "sampleSubCheckCmp", name = "子样检查")
|
||||
public class SampleSubCheckCmp extends NodeComponent {
|
||||
|
||||
@Resource
|
||||
private BusinessSubSampleMapper businessSubSampleMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigSubSampleMapper configSubSampleMapper;
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
SampleFlowContext sampleFlowContext = this.getContextBean(SampleFlowContext.class);
|
||||
String currentSampleFlowKey = sampleFlowContext.getCurrentSampleFlowKey();
|
||||
List<Long> sampleIdList = sampleFlowContext.getSampleIdList();
|
||||
if (CollUtil.isEmpty(sampleIdList)) {
|
||||
throw new ServiceException(500, "样品ID列表不允许为空");
|
||||
}
|
||||
List<BusinessSubSampleDO> businessSubSampleDOList = businessSubSampleMapper.selectByIds(sampleIdList);
|
||||
|
||||
//赋值样品重量
|
||||
for (BusinessSubSampleDO businessSubSampleDO : businessSubSampleDOList) {
|
||||
SampleFlowInfo sampleFlowInfo = sampleFlowContext.getSampleFlowInfoById(businessSubSampleDO.getId());
|
||||
if (sampleFlowInfo != null) {
|
||||
businessSubSampleDO.setLastSampleWeight(sampleFlowInfo.getSampleWeight());
|
||||
}
|
||||
}
|
||||
|
||||
boolean isSampleFlowKeyFail = businessSubSampleDOList.stream().anyMatch(p -> !p.getSampleFlowKey().equals(currentSampleFlowKey));
|
||||
if (isSampleFlowKeyFail) {
|
||||
throw new ServiceException(500, "样品列表与当前流程不符");
|
||||
}
|
||||
|
||||
List<Long> configSubSampleIdList = businessSubSampleDOList.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
|
||||
List<ConfigSubSampleDO> configSubSampleList = configSubSampleMapper.selectByIds(configSubSampleIdList);
|
||||
|
||||
sampleFlowContext.setBusinessSubSampleList(businessSubSampleDOList);
|
||||
sampleFlowContext.setConfigSubSampleList(configSubSampleList);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.flow;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleFlowContext;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSampleFlowDO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleDO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.service.ConfigSampleFlowService;
|
||||
import cn.iocoder.yudao.module.qms.business.config.service.ConfigSubSampleService;
|
||||
import cn.iocoder.yudao.module.qms.core.sampleflow.SampleFlowDefinition;
|
||||
import cn.iocoder.yudao.module.qms.core.sampleflow.SampleFlowNode;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
@LiteflowComponent(id = "sampleSubProcessUpdateCmp", name = "子样流程节点更新")
|
||||
public class SampleSubProcessUpdateCmp extends NodeComponent {
|
||||
|
||||
@Resource
|
||||
private ConfigSubSampleService configSubSampleService;
|
||||
|
||||
@Resource
|
||||
private ConfigSampleFlowService configSampleFlowService;
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
SampleFlowContext sampleFlowContext = this.getContextBean(SampleFlowContext.class);
|
||||
String currentSampleFlowKey = sampleFlowContext.getCurrentSampleFlowKey();
|
||||
// LoginUser loginUser = sampleFlowContext.getLoginUser();
|
||||
// String loginRealname = sampleFlowContext.getLoginRealname();
|
||||
LocalDateTime currentDateTime = sampleFlowContext.getCurrentDateTime();
|
||||
List<BusinessSubSampleDO> busSubCsampleList = sampleFlowContext.getBusinessSubSampleList();
|
||||
for (BusinessSubSampleDO businessSubSample : busSubCsampleList) {
|
||||
Long configSubSampleId = businessSubSample.getConfigSubSampleId();
|
||||
ConfigSubSampleDO configSubSample = configSubSampleService.getConfigSubSample(configSubSampleId);
|
||||
String sampleFlowKey = configSubSample.getFlowKey();
|
||||
ConfigSampleFlowDO configSampleFlow = configSampleFlowService.getConfigSampleFlowByKey(sampleFlowKey);
|
||||
String configSampleFlowContent = configSampleFlow.getContent();
|
||||
//样品流程定义
|
||||
SampleFlowDefinition sampleFlowDefinition = JSON.parseObject(configSampleFlowContent, SampleFlowDefinition.class);
|
||||
List<SampleFlowNode> flowNodeList = sampleFlowDefinition.getFlowNodeList();
|
||||
SampleFlowNode flowNode = flowNodeList.stream().filter(f -> f.getNodeKey().equals(currentSampleFlowKey)).findFirst().orElse(null);
|
||||
List<SampleFlowNode> nextFlowNodeList = flowNode.getNextFlowNodeList();
|
||||
SampleFlowNode nextFlowNode = nextFlowNodeList.stream().filter(f -> f.getIsDefault()).findFirst().orElse(null);
|
||||
businessSubSample.setSampleFlowKey(nextFlowNode.getNodeKey());
|
||||
businessSubSample.setSampleFlowTime(currentDateTime);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList;
|
||||
import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 子样检测任务业务 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class BusinessAssayTaskDataServiceImpl implements BusinessAssayTaskDataService {
|
||||
|
||||
@Resource
|
||||
private BusinessAssayTaskDataMapper businessAssayTaskDataMapper;
|
||||
|
||||
@Override
|
||||
public BusinessAssayTaskDataRespVO createBusinessAssayTaskData(BusinessAssayTaskDataSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
BusinessAssayTaskDataDO businessAssayTaskData = BeanUtils.toBean(createReqVO, BusinessAssayTaskDataDO.class);
|
||||
businessAssayTaskDataMapper.insert(businessAssayTaskData);
|
||||
// 返回
|
||||
return BeanUtils.toBean(businessAssayTaskData, BusinessAssayTaskDataRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBusinessAssayTaskData(BusinessAssayTaskDataSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateBusinessAssayTaskDataExists(updateReqVO.getId());
|
||||
// 更新
|
||||
BusinessAssayTaskDataDO updateObj = BeanUtils.toBean(updateReqVO, BusinessAssayTaskDataDO.class);
|
||||
businessAssayTaskDataMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBusinessAssayTaskData(Long id) {
|
||||
// 校验存在
|
||||
validateBusinessAssayTaskDataExists(id);
|
||||
// 删除
|
||||
businessAssayTaskDataMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBusinessAssayTaskDataListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateBusinessAssayTaskDataExists(ids);
|
||||
// 删除
|
||||
businessAssayTaskDataMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateBusinessAssayTaskDataExists(List<Long> ids) {
|
||||
List<BusinessAssayTaskDataDO> list = businessAssayTaskDataMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(BUSINESS_ASSAY_TASK_DATA_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateBusinessAssayTaskDataExists(Long id) {
|
||||
if (businessAssayTaskDataMapper.selectById(id) == null) {
|
||||
throw exception(BUSINESS_ASSAY_TASK_DATA_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessAssayTaskDataDO getBusinessAssayTaskData(Long id) {
|
||||
return businessAssayTaskDataMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getUnAssayTaskGroupList() {
|
||||
return businessAssayTaskDataMapper.selectUnAssayTaskGroupList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessAssayTaskDataExtendRespVO> getBusinessAssayTaskDataList(BusinessAssayTaskDataReqVO reqVO) {
|
||||
return businessAssayTaskDataMapper.selectList(reqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<BusinessAssayTaskDataExtendRespVO> getBusinessAssayTaskDataPage(BusinessAssayTaskDataPageReqVO pageReqVO) {
|
||||
return businessAssayTaskDataMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.service;
|
||||
|
||||
import java.util.*;
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 子样业务 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface BusinessSubSampleService {
|
||||
|
||||
/**
|
||||
* 创建子样业务
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
BusinessSubSampleRespVO createBusinessSubSample(@Valid BusinessSubSampleSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新子样业务
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateBusinessSubSample(@Valid BusinessSubSampleSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除子样业务
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteBusinessSubSample(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除子样业务
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteBusinessSubSampleListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得子样业务
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 子样业务
|
||||
*/
|
||||
BusinessSubSampleDO getBusinessSubSample(Long id);
|
||||
|
||||
/**
|
||||
* 获得子样业务分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 子样业务分页
|
||||
*/
|
||||
PageResult<BusinessSubSampleExtendRespVO> getBusinessSubSamplePage(BusinessSubSamplePageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得子样业务列表
|
||||
* @param reqVO 查询
|
||||
* @return 子样业务列表
|
||||
*/
|
||||
List<BusinessSubSampleExtendRespVO> getBusinessSubSampleList(@Valid BusinessSubSampleReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 根据样品编号及样品流程节点获取样品信息
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
BusinessSubSampleExtendRespVO getBySampleCodeAndFlowKey(@Valid BusinessSubSampleReqVO reqVO);
|
||||
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.bus.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||
import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList;
|
||||
import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 子样业务 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
|
||||
|
||||
@Resource
|
||||
private BusinessSubSampleMapper businessSubSampleMapper;
|
||||
|
||||
@Override
|
||||
public BusinessSubSampleRespVO createBusinessSubSample(BusinessSubSampleSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
BusinessSubSampleDO businessSubSample = BeanUtils.toBean(createReqVO, BusinessSubSampleDO.class);
|
||||
businessSubSampleMapper.insert(businessSubSample);
|
||||
// 返回
|
||||
return BeanUtils.toBean(businessSubSample, BusinessSubSampleRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBusinessSubSample(BusinessSubSampleSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateBusinessSubSampleExists(updateReqVO.getId());
|
||||
// 更新
|
||||
BusinessSubSampleDO updateObj = BeanUtils.toBean(updateReqVO, BusinessSubSampleDO.class);
|
||||
businessSubSampleMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBusinessSubSample(Long id) {
|
||||
// 校验存在
|
||||
validateBusinessSubSampleExists(id);
|
||||
// 删除
|
||||
businessSubSampleMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBusinessSubSampleListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateBusinessSubSampleExists(ids);
|
||||
// 删除
|
||||
businessSubSampleMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateBusinessSubSampleExists(List<Long> ids) {
|
||||
List<BusinessSubSampleDO> list = businessSubSampleMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(BUSINESS_SUB_SAMPLE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateBusinessSubSampleExists(Long id) {
|
||||
if (businessSubSampleMapper.selectById(id) == null) {
|
||||
throw exception(BUSINESS_SUB_SAMPLE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessSubSampleDO getBusinessSubSample(Long id) {
|
||||
return businessSubSampleMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<BusinessSubSampleExtendRespVO> getBusinessSubSamplePage(BusinessSubSamplePageReqVO pageReqVO) {
|
||||
return businessSubSampleMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessSubSampleExtendRespVO> getBusinessSubSampleList(@Valid BusinessSubSampleReqVO reqVO) {
|
||||
return businessSubSampleMapper.selectlist(reqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessSubSampleExtendRespVO getBySampleCodeAndFlowKey(@Valid BusinessSubSampleReqVO reqVO) {
|
||||
return businessSubSampleMapper.getBySampleCodeAndFlowKey(reqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,251 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.controller.admin;
|
||||
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigReportTemplatePageReqVO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigReportTemplateRespVO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigReportTemplateSaveReqVO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.GenReportBody;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.util.UriUtils;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.text.StringEscapeUtils;
|
||||
import org.springframework.core.io.ByteArrayResource;
|
||||
import org.springframework.core.io.FileSystemResource;
|
||||
import org.springframework.core.io.support.ResourceRegion;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.security.config.SecurityProperties;
|
||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.codec.Base64;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigReportTemplateDO;
|
||||
import cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants;
|
||||
import cn.iocoder.yudao.module.qms.business.config.service.ConfigReportTemplateService;
|
||||
import gridreport.jni.BinaryObject;
|
||||
import gridreport.jni.ExportImageType;
|
||||
import gridreport.jni.ExportType;
|
||||
import gridreport.jni.Report;
|
||||
|
||||
@Tag(name = "管理后台 - 报表模版配置")
|
||||
@RestController
|
||||
@RequestMapping("/qms/config-report-template")
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class ConfigReportTemplateController implements BusinessControllerMarker {
|
||||
|
||||
@Resource
|
||||
private SecurityProperties securityProperties;
|
||||
|
||||
@Resource
|
||||
private ConfigReportTemplateService configReportTemplateService;
|
||||
|
||||
@GetMapping("/info")
|
||||
@Operation(summary = "获取报表信息")
|
||||
public CommonResult<?> info() {
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
try {
|
||||
String moduleInfo = Report.getModuleInfo();
|
||||
String moduleVersion = Report.getModuleVersion();
|
||||
String modulePath = Report.getModulePath();
|
||||
data.put("moduleInfo", moduleInfo);
|
||||
data.put("moduleVersion", moduleVersion);
|
||||
data.put("modulePath", modulePath);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
return success(data);
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建报表模版配置")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-report-template:create')")
|
||||
public CommonResult<ConfigReportTemplateRespVO> createConfigReportTemplate(@Valid @RequestBody ConfigReportTemplateSaveReqVO createReqVO) {
|
||||
return success(configReportTemplateService.createConfigReportTemplate(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新报表模版配置")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-report-template:update')")
|
||||
public CommonResult<Boolean> updateConfigReportTemplate(@Valid @RequestBody ConfigReportTemplateSaveReqVO updateReqVO) {
|
||||
configReportTemplateService.updateConfigReportTemplate(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除报表模版配置")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-report-template:delete')")
|
||||
public CommonResult<Boolean> deleteConfigReportTemplate(@RequestParam("id") Long id) {
|
||||
configReportTemplateService.deleteConfigReportTemplate(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除报表模版配置")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-report-template:delete')")
|
||||
public CommonResult<Boolean> deleteConfigReportTemplateList(@RequestParam("ids") List<Long> ids) {
|
||||
configReportTemplateService.deleteConfigReportTemplateListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得报表模版配置")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-report-template:query')")
|
||||
public CommonResult<ConfigReportTemplateRespVO> getConfigReportTemplate(@RequestParam("id") Long id) {
|
||||
ConfigReportTemplateDO configReportTemplate = configReportTemplateService.getConfigReportTemplate(id);
|
||||
return success(BeanUtils.toBean(configReportTemplate, ConfigReportTemplateRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得报表模版配置分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-report-template:query')")
|
||||
public CommonResult<PageResult<ConfigReportTemplateRespVO>> getConfigReportTemplatePage(@Valid ConfigReportTemplatePageReqVO pageReqVO) {
|
||||
PageResult<ConfigReportTemplateDO> pageResult = configReportTemplateService.getConfigReportTemplatePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ConfigReportTemplateRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出报表模版配置 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-report-template:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportConfigReportTemplateExcel(@Valid ConfigReportTemplatePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ConfigReportTemplateDO> list = configReportTemplateService.getConfigReportTemplatePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "报表模版配置.xls", "数据", ConfigReportTemplateRespVO.class,
|
||||
BeanUtils.toBean(list, ConfigReportTemplateRespVO.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
*
|
||||
* @param file 文件
|
||||
* @return {ResponseEntity}
|
||||
* @throws IOException io异常
|
||||
*/
|
||||
protected ResponseEntity<ResourceRegion> download(File file) throws IOException {
|
||||
String fileName = file.getName();
|
||||
return download(file, fileName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载
|
||||
*
|
||||
* @param file 文件
|
||||
* @param fileName 生成的文件名
|
||||
* @return {ResponseEntity}
|
||||
* @throws IOException io异常
|
||||
*/
|
||||
protected ResponseEntity<ResourceRegion> download(File file, String fileName) throws IOException {
|
||||
org.springframework.core.io.Resource resource = new FileSystemResource(file);
|
||||
return download(resource, fileName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载
|
||||
*
|
||||
* @param resource 资源
|
||||
* @param fileName 生成的文件名
|
||||
* @return {ResponseEntity}
|
||||
* @throws IOException io异常
|
||||
*/
|
||||
protected ResponseEntity<ResourceRegion> download(org.springframework.core.io.Resource resource, String fileName) throws IOException {
|
||||
HttpServletRequest request = ServletUtils.getRequest();
|
||||
String header = request.getHeader(HttpHeaders.USER_AGENT);
|
||||
// 避免空指针
|
||||
header = header == null ? StringPool.EMPTY : header.toUpperCase();
|
||||
HttpStatus status= HttpStatus.OK;
|
||||
// 断点续传
|
||||
long position = 0;
|
||||
long count = resource.contentLength();
|
||||
String range = request.getHeader(HttpHeaders.RANGE);
|
||||
if (null != range) {
|
||||
status = HttpStatus.PARTIAL_CONTENT;
|
||||
String[] rangeRange = range.replace("bytes=", StringPool.EMPTY).split(StringPool.DASH);
|
||||
position = Long.parseLong(rangeRange[0]);
|
||||
if (rangeRange.length > 1) {
|
||||
long end = Long.parseLong(rangeRange[1]);
|
||||
count = end - position + 1;
|
||||
}
|
||||
}
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
|
||||
String encodeFileName = UriUtils.encode(fileName, StandardCharsets.UTF_8);
|
||||
// 兼容各种浏览器下载:
|
||||
// https://blog.robotshell.org/2012/deal-with-http-header-encoding-for-file-download/
|
||||
String disposition = "attachment;" +
|
||||
"filename=\"" + encodeFileName + "\";" +
|
||||
"filename*=utf-8''" + encodeFileName;
|
||||
headers.set(HttpHeaders.CONTENT_DISPOSITION, disposition);
|
||||
return new ResponseEntity<>(new ResourceRegion(resource, position, count), headers, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 浏览器打开
|
||||
*
|
||||
* @param resource 资源
|
||||
* @param fileName 生成的文件名
|
||||
* @return {ResponseEntity}
|
||||
* @throws IOException io异常
|
||||
*/
|
||||
protected ResponseEntity<org.springframework.core.io.Resource> browser(org.springframework.core.io.Resource resource, String fileName, MediaType mediaType) throws IOException {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.setContentType(mediaType);
|
||||
headers.setContentLength(resource.contentLength());
|
||||
String encodeFileName = UriUtils.encode(fileName, StandardCharsets.UTF_8);
|
||||
// 兼容各种浏览器下载:
|
||||
// https://blog.robotshell.org/2012/deal-with-http-header-encoding-for-file-download/
|
||||
String disposition = "inline;" +
|
||||
"filename=\"" + encodeFileName + "\";" +
|
||||
"filename*=utf-8''" + encodeFileName;
|
||||
headers.set(HttpHeaders.CONTENT_DISPOSITION, disposition);
|
||||
return new ResponseEntity<>(resource, headers, HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,108 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.controller.admin;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigWarehouseLocationInfomationDO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.service.ConfigWarehouseLocationInfomationService;
|
||||
|
||||
@Tag(name = "管理后台 - 样品库位信息")
|
||||
@RestController
|
||||
@RequestMapping("/qms/config-warehouse-location-infomation")
|
||||
@Validated
|
||||
public class ConfigWarehouseLocationInfomationController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private ConfigWarehouseLocationInfomationService configWarehouseLocationInfomationService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建样品库位信息")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-warehouse-location-infomation:create')")
|
||||
public CommonResult<ConfigWarehouseLocationInfomationRespVO> createConfigWarehouseLocationInfomation(@Valid @RequestBody ConfigWarehouseLocationInfomationSaveReqVO createReqVO) {
|
||||
return success(configWarehouseLocationInfomationService.createConfigWarehouseLocationInfomation(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新样品库位信息")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-warehouse-location-infomation:update')")
|
||||
public CommonResult<Boolean> updateConfigWarehouseLocationInfomation(@Valid @RequestBody ConfigWarehouseLocationInfomationSaveReqVO updateReqVO) {
|
||||
configWarehouseLocationInfomationService.updateConfigWarehouseLocationInfomation(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除样品库位信息")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-warehouse-location-infomation:delete')")
|
||||
public CommonResult<Boolean> deleteConfigWarehouseLocationInfomation(@RequestParam("id") Long id) {
|
||||
configWarehouseLocationInfomationService.deleteConfigWarehouseLocationInfomation(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除样品库位信息")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-warehouse-location-infomation:delete')")
|
||||
public CommonResult<Boolean> deleteConfigWarehouseLocationInfomationList(@RequestBody BatchDeleteReqVO req) {
|
||||
configWarehouseLocationInfomationService.deleteConfigWarehouseLocationInfomationListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得样品库位信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-warehouse-location-infomation:query')")
|
||||
public CommonResult<ConfigWarehouseLocationInfomationRespVO> getConfigWarehouseLocationInfomation(@RequestParam("id") Long id) {
|
||||
ConfigWarehouseLocationInfomationDO configWarehouseLocationInfomation = configWarehouseLocationInfomationService.getConfigWarehouseLocationInfomation(id);
|
||||
return success(BeanUtils.toBean(configWarehouseLocationInfomation, ConfigWarehouseLocationInfomationRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得样品库位信息分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-warehouse-location-infomation:query')")
|
||||
public CommonResult<PageResult<ConfigWarehouseLocationInfomationRespVO>> getConfigWarehouseLocationInfomationPage(@Valid ConfigWarehouseLocationInfomationPageReqVO pageReqVO) {
|
||||
PageResult<ConfigWarehouseLocationInfomationDO> pageResult = configWarehouseLocationInfomationService.getConfigWarehouseLocationInfomationPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ConfigWarehouseLocationInfomationRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出样品库位信息 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:config-warehouse-location-infomation:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportConfigWarehouseLocationInfomationExcel(@Valid ConfigWarehouseLocationInfomationPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ConfigWarehouseLocationInfomationDO> list = configWarehouseLocationInfomationService.getConfigWarehouseLocationInfomationPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "样品库位信息.xls", "数据", ConfigWarehouseLocationInfomationRespVO.class,
|
||||
BeanUtils.toBean(list, ConfigWarehouseLocationInfomationRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.controller.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ConfigAssayMethodExtendRespVO extends ConfigAssayMethodRespVO {
|
||||
|
||||
private List<ConfigAssayMethodProjectDO> configAssayMethodProjectList;
|
||||
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.controller.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 报告类型配置分页 Request VO")
|
||||
@Data
|
||||
public class ConfigDocumentTypePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "报表类型ID", example = "21445")
|
||||
private Long configReportTypeId;
|
||||
|
||||
@Schema(description = "类型名称", example = "王五")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "流程模型key")
|
||||
private String flowModelKey;
|
||||
|
||||
@Schema(description = "流程表单key")
|
||||
private String flowFormKey;
|
||||
|
||||
@Schema(description = "报告模板key")
|
||||
private String reportKey;
|
||||
|
||||
@Schema(description = "报告编号规则")
|
||||
private String codeRule;
|
||||
|
||||
@Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", example = "1")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "版本")
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 报告类型配置 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ConfigDocumentTypeRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32458")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "报表类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21445")
|
||||
@ExcelProperty("报表类型ID")
|
||||
private Long configReportTypeId;
|
||||
|
||||
@Schema(description = "类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@ExcelProperty("类型名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "流程模型key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("流程模型key")
|
||||
private String flowModelKey;
|
||||
|
||||
@Schema(description = "流程表单key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("流程表单key")
|
||||
private String flowFormKey;
|
||||
|
||||
@Schema(description = "报告模板key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("报告模板key")
|
||||
private String reportKey;
|
||||
|
||||
@Schema(description = "报告编号规则", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("报告编号规则")
|
||||
private String codeRule;
|
||||
|
||||
@Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建日期")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("版本")
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 报告类型配置新增/修改 Request VO")
|
||||
@Data
|
||||
public class ConfigDocumentTypeSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32458")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "报表类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21445")
|
||||
@NotNull(message = "报表类型ID不能为空")
|
||||
private Long configReportTypeId;
|
||||
|
||||
@Schema(description = "类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@NotEmpty(message = "类型名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "流程模型key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "流程模型key不能为空")
|
||||
private String flowModelKey;
|
||||
|
||||
@Schema(description = "流程表单key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "流程表单key不能为空")
|
||||
private String flowFormKey;
|
||||
|
||||
@Schema(description = "报告模板key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "报告模板key不能为空")
|
||||
private String reportKey;
|
||||
|
||||
@Schema(description = "报告编号规则", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "报告编号规则不能为空")
|
||||
private String codeRule;
|
||||
|
||||
@Schema(description = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "报告类型,【字典】【jy_doc_main_type】化验报告、典型性报告、检测报告不能为空")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "所属部门不能为空")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "版本不能为空")
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.controller.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 检验委托来源配置分页 Request VO")
|
||||
@Data
|
||||
public class ConfigEntrustSourcePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "名称,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托", example = "李四")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "模版Key")
|
||||
private String key;
|
||||
|
||||
@Schema(description = "数据集key,T_DAT_COLT_FLD")
|
||||
private String dataCollectionKey;
|
||||
|
||||
@Schema(description = "委托单模版")
|
||||
private String template;
|
||||
|
||||
@Schema(description = "委托单号规则")
|
||||
private String codeRule;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.controller.vo;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 检验委托来源配置 Request VO")
|
||||
@Data
|
||||
public class ConfigEntrustSourceReqVO {
|
||||
|
||||
@Schema(description = "名称,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托", example = "王五")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "模版Key")
|
||||
private String key;
|
||||
|
||||
@Schema(description = "数据集key,T_DAT_COLT_FLD", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String dataCollectionKey;
|
||||
|
||||
@Schema(description = "委托单模版")
|
||||
private String template;
|
||||
|
||||
@Schema(description = "委托单号规则")
|
||||
private String codeRule;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 检验委托来源配置 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ConfigEntrustSourceRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6861")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "名称,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@ExcelProperty("名称,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "模版Key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("模版Key")
|
||||
private String key;
|
||||
|
||||
@Schema(description = "数据集key,T_DAT_COLT_FLD", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("数据集key,T_DAT_COLT_FLD")
|
||||
private String dataCollectionKey;
|
||||
|
||||
@Schema(description = "委托单模版")
|
||||
@ExcelProperty("委托单模版")
|
||||
private String template;
|
||||
|
||||
@Schema(description = "委托单号规则")
|
||||
@ExcelProperty("委托单号规则")
|
||||
private String codeRule;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建日期")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 检验委托来源配置新增/修改 Request VO")
|
||||
@Data
|
||||
public class ConfigEntrustSourceSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6861")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "名称,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@NotEmpty(message = "名称,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "模版Key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "模版Key不能为空")
|
||||
private String key;
|
||||
|
||||
@Schema(description = "数据集key,T_DAT_COLT_FLD", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "数据集key,T_DAT_COLT_FLD不能为空")
|
||||
private String dataCollectionKey;
|
||||
|
||||
@Schema(description = "委托单模版")
|
||||
private String template;
|
||||
|
||||
@Schema(description = "委托单号规则")
|
||||
private String codeRule;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "所属部门不能为空")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.controller.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 子样与检测方法配置分页 Request VO")
|
||||
@Data
|
||||
public class ConfigSubSampleMethodPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "子样配置ID", example = "19245")
|
||||
private Long configSubSampleId;
|
||||
|
||||
@Schema(description = "分析方法ID", example = "15616")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "是否默认使用,1-启用,0-不启用")
|
||||
private Integer isDefaultUse;
|
||||
|
||||
@Schema(description = "任务数", example = "3171")
|
||||
private Integer taskCount;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 子样与检测方法配置 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ConfigSubSampleMethodRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26039")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "子样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19245")
|
||||
@ExcelProperty("子样配置ID")
|
||||
private Long configSubSampleId;
|
||||
|
||||
@Schema(description = "分析方法ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15616")
|
||||
@ExcelProperty("分析方法ID")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "是否默认使用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("是否默认使用,1-启用,0-不启用")
|
||||
private Integer isDefaultUse;
|
||||
|
||||
@Schema(description = "任务数", example = "3171")
|
||||
@ExcelProperty("任务数")
|
||||
private Integer taskCount;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建日期")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 子样与检测方法配置新增/修改 Request VO")
|
||||
@Data
|
||||
public class ConfigSubSampleMethodSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26039")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "子样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19245")
|
||||
@NotNull(message = "子样配置ID不能为空")
|
||||
private Long configSubSampleId;
|
||||
|
||||
@Schema(description = "分析方法ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15616")
|
||||
@NotNull(message = "分析方法ID不能为空")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "是否默认使用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "是否默认使用,1-启用,0-不启用不能为空")
|
||||
private Integer isDefaultUse;
|
||||
|
||||
@Schema(description = "任务数", example = "3171")
|
||||
private Integer taskCount;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "所属部门不能为空")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.controller.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 样品库位信息分页 Request VO")
|
||||
@Data
|
||||
public class ConfigWarehouseLocationInfomationPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "样品库名称", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "库位编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "仓库编码")
|
||||
private String warehouseCoding;
|
||||
|
||||
@Schema(description = "样品容量")
|
||||
private Integer capacity;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 样品库位信息 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ConfigWarehouseLocationInfomationRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22903")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "样品库名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("样品库名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "库位编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("库位编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "仓库编码")
|
||||
@ExcelProperty("仓库编码")
|
||||
private String warehouseCoding;
|
||||
|
||||
@Schema(description = "样品容量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("样品容量")
|
||||
private Integer capacity;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建日期")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 样品库位信息新增/修改 Request VO")
|
||||
@Data
|
||||
public class ConfigWarehouseLocationInfomationSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22903")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "样品库名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@NotEmpty(message = "样品库名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "库位编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "库位编号不能为空")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "仓库编码")
|
||||
private String warehouseCoding;
|
||||
|
||||
@Schema(description = "样品容量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "样品容量不能为空")
|
||||
private Integer capacity;
|
||||
|
||||
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "所属部门不能为空")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.dal.mapper;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSamplePageReqVO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.BaseSampleDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 样品大类管理 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseSampleMapper extends BaseMapperX<BaseSampleDO> {
|
||||
|
||||
default PageResult<BaseSampleDO> selectPage(BaseSamplePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BaseSampleDO>()
|
||||
.likeIfPresent(BaseSampleDO::getSampleName, reqVO.getSampleName())
|
||||
.eqIfPresent(BaseSampleDO::getMaterialId, reqVO.getMaterialId())
|
||||
.eqIfPresent(BaseSampleDO::getMaterialCode, reqVO.getMaterialCode())
|
||||
.likeIfPresent(BaseSampleDO::getMaterialName, reqVO.getMaterialName())
|
||||
.eqIfPresent(BaseSampleDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId())
|
||||
.eqIfPresent(BaseSampleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BaseSampleDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BaseSampleDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BaseSampleDO::getId));
|
||||
}
|
||||
|
||||
List<BaseSampleDO> getBaseSampleListWithAssayStandardCount();
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 检测方法分析项目配置 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConfigAssayMethodProjectMapper extends BaseMapperX<ConfigAssayMethodProjectDO> {
|
||||
|
||||
default PageResult<ConfigAssayMethodProjectDO> selectPage(ConfigAssayMethodProjectPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigAssayMethodProjectDO>()
|
||||
.eqIfPresent(ConfigAssayMethodProjectDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||
.eqIfPresent(ConfigAssayMethodProjectDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
||||
.eqIfPresent(ConfigAssayMethodProjectDO::getUnitId, reqVO.getUnitId())
|
||||
.eqIfPresent(ConfigAssayMethodProjectDO::getDictionaryProjectUnit, reqVO.getDictionaryProjectUnit())
|
||||
.eqIfPresent(ConfigAssayMethodProjectDO::getIsNull, reqVO.getIsNull())
|
||||
.eqIfPresent(ConfigAssayMethodProjectDO::getDataType, reqVO.getDataType())
|
||||
.eqIfPresent(ConfigAssayMethodProjectDO::getDecimalPosition, reqVO.getDecimalPosition())
|
||||
.eqIfPresent(ConfigAssayMethodProjectDO::getFormula, reqVO.getFormula())
|
||||
.eqIfPresent(ConfigAssayMethodProjectDO::getAssessmentAccuracy, reqVO.getAssessmentAccuracy())
|
||||
.eqIfPresent(ConfigAssayMethodProjectDO::getIsDefaultEnabled, reqVO.getIsDefaultEnabled())
|
||||
.eqIfPresent(ConfigAssayMethodProjectDO::getSort, reqVO.getSort())
|
||||
.eqIfPresent(ConfigAssayMethodProjectDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(ConfigAssayMethodProjectDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ConfigAssayMethodProjectDO::getRemark, reqVO.getRemark())
|
||||
.eqIfPresent(ConfigAssayMethodProjectDO::getVersion, reqVO.getVersion())
|
||||
.orderByDesc(ConfigAssayMethodProjectDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectParameterDO;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 检测方法分析项目参数配置 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConfigAssayMethodProjectParameterMapper extends BaseMapperX<ConfigAssayMethodProjectParameterDO> {
|
||||
|
||||
default PageResult<ConfigAssayMethodProjectParameterDO> selectPage(ConfigAssayMethodProjectParameterPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigAssayMethodProjectParameterDO>()
|
||||
.eqIfPresent(ConfigAssayMethodProjectParameterDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId())
|
||||
.eqIfPresent(ConfigAssayMethodProjectParameterDO::getDictionaryParameterId, reqVO.getDictionaryParameterId())
|
||||
.eqIfPresent(ConfigAssayMethodProjectParameterDO::getDataType, reqVO.getDataType())
|
||||
.eqIfPresent(ConfigAssayMethodProjectParameterDO::getDecimalPosition, reqVO.getDecimalPosition())
|
||||
.eqIfPresent(ConfigAssayMethodProjectParameterDO::getDefaultValue, reqVO.getDefaultValue())
|
||||
.eqIfPresent(ConfigAssayMethodProjectParameterDO::getIsNull, reqVO.getIsNull())
|
||||
.eqIfPresent(ConfigAssayMethodProjectParameterDO::getFormula, reqVO.getFormula())
|
||||
.eqIfPresent(ConfigAssayMethodProjectParameterDO::getIsShow, reqVO.getIsShow())
|
||||
.eqIfPresent(ConfigAssayMethodProjectParameterDO::getSort, reqVO.getSort())
|
||||
.eqIfPresent(ConfigAssayMethodProjectParameterDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(ConfigAssayMethodProjectParameterDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ConfigAssayMethodProjectParameterDO::getRemark, reqVO.getRemark())
|
||||
.eqIfPresent(ConfigAssayMethodProjectParameterDO::getVersion, reqVO.getVersion())
|
||||
.orderByDesc(ConfigAssayMethodProjectParameterDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigProjectDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.*;
|
||||
|
||||
/**
|
||||
* 检测项目配置 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConfigProjectMapper extends BaseMapperX<ConfigProjectDO> {
|
||||
|
||||
default PageResult<ConfigProjectDO> selectPage(ConfigProjectPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigProjectDO>()
|
||||
.eqIfPresent(ConfigProjectDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
||||
.eqIfPresent(ConfigProjectDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||
.eqIfPresent(ConfigProjectDO::getSaveColumn, reqVO.getSaveColumn())
|
||||
.eqIfPresent(ConfigProjectDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(ConfigProjectDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ConfigProjectDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(ConfigProjectDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigReportFieldDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.*;
|
||||
|
||||
/**
|
||||
* 报表字段配置 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConfigReportFieldMapper extends BaseMapperX<ConfigReportFieldDO> {
|
||||
|
||||
default PageResult<ConfigReportFieldDO> selectPage(ConfigReportFieldPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigReportFieldDO>()
|
||||
.eqIfPresent(ConfigReportFieldDO::getConfigReportTypeId, reqVO.getConfigReportTypeId())
|
||||
.eqIfPresent(ConfigReportFieldDO::getField, reqVO.getField())
|
||||
.likeIfPresent(ConfigReportFieldDO::getFieldName, reqVO.getFieldName())
|
||||
.eqIfPresent(ConfigReportFieldDO::getNo, reqVO.getNo())
|
||||
.eqIfPresent(ConfigReportFieldDO::getDataType, reqVO.getDataType())
|
||||
.eqIfPresent(ConfigReportFieldDO::getDecimal, reqVO.getDecimal())
|
||||
.eqIfPresent(ConfigReportFieldDO::getFieldWidth, reqVO.getFieldWidth())
|
||||
.eqIfPresent(ConfigReportFieldDO::getIsGroup, reqVO.getIsGroup())
|
||||
.betweenIfPresent(ConfigReportFieldDO::getIsUpdate, reqVO.getIsUpdate())
|
||||
.eqIfPresent(ConfigReportFieldDO::getFormula, reqVO.getFormula())
|
||||
.eqIfPresent(ConfigReportFieldDO::getTitleGroup, reqVO.getTitleGroup())
|
||||
.eqIfPresent(ConfigReportFieldDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(ConfigReportFieldDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ConfigReportFieldDO::getRemark, reqVO.getRemark())
|
||||
.eqIfPresent(ConfigReportFieldDO::getVersion, reqVO.getVersion())
|
||||
.orderByDesc(ConfigReportFieldDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.dal.mapper;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigReportTemplatePageReqVO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigReportTemplateDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 报表模版配置 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConfigReportTemplateMapper extends BaseMapperX<ConfigReportTemplateDO> {
|
||||
|
||||
default PageResult<ConfigReportTemplateDO> selectPage(ConfigReportTemplatePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigReportTemplateDO>()
|
||||
.likeIfPresent(ConfigReportTemplateDO::getName, reqVO.getName())
|
||||
.eqIfPresent(ConfigReportTemplateDO::getKey, reqVO.getKey())
|
||||
.eqIfPresent(ConfigReportTemplateDO::getContent, reqVO.getContent())
|
||||
.eqIfPresent(ConfigReportTemplateDO::getDataUrl, reqVO.getDataUrl())
|
||||
.eqIfPresent(ConfigReportTemplateDO::getData, reqVO.getData())
|
||||
.eqIfPresent(ConfigReportTemplateDO::getIsAuthority, reqVO.getIsAuthority())
|
||||
.eqIfPresent(ConfigReportTemplateDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(ConfigReportTemplateDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ConfigReportTemplateDO::getUpdateCount, reqVO.getUpdateCount())
|
||||
.eqIfPresent(ConfigReportTemplateDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(ConfigReportTemplateDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSampleFlowDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.*;
|
||||
|
||||
/**
|
||||
* 样品流程配置 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConfigSampleFlowMapper extends BaseMapperX<ConfigSampleFlowDO> {
|
||||
|
||||
default PageResult<ConfigSampleFlowDO> selectPage(ConfigSampleFlowPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigSampleFlowDO>()
|
||||
.likeIfPresent(ConfigSampleFlowDO::getName, reqVO.getName())
|
||||
.eqIfPresent(ConfigSampleFlowDO::getKey, reqVO.getKey())
|
||||
.eqIfPresent(ConfigSampleFlowDO::getContent, reqVO.getContent())
|
||||
.eqIfPresent(ConfigSampleFlowDO::getDescription, reqVO.getDescription())
|
||||
.eqIfPresent(ConfigSampleFlowDO::getType, reqVO.getType())
|
||||
.eqIfPresent(ConfigSampleFlowDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(ConfigSampleFlowDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ConfigSampleFlowDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(ConfigSampleFlowDO::getId));
|
||||
}
|
||||
|
||||
default ConfigSampleFlowDO selectByKey(String key) {
|
||||
return selectOne(new LambdaQueryWrapperX<ConfigSampleFlowDO>()
|
||||
.eq(ConfigSampleFlowDO::getKey, key));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSampleReportDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.*;
|
||||
|
||||
/**
|
||||
* 样品报表关系 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConfigSampleReportMapper extends BaseMapperX<ConfigSampleReportDO> {
|
||||
|
||||
default PageResult<ConfigSampleReportDO> selectPage(ConfigSampleReportPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigSampleReportDO>()
|
||||
.eqIfPresent(ConfigSampleReportDO::getConfigReportTypeId, reqVO.getConfigReportTypeId())
|
||||
.eqIfPresent(ConfigSampleReportDO::getConfigBaseSampleId, reqVO.getConfigBaseSampleId())
|
||||
.likeIfPresent(ConfigSampleReportDO::getSampleName, reqVO.getSampleName())
|
||||
.eqIfPresent(ConfigSampleReportDO::getDataSource, reqVO.getDataSource())
|
||||
.eqIfPresent(ConfigSampleReportDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(ConfigSampleReportDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ConfigSampleReportDO::getRemark, reqVO.getRemark())
|
||||
.eqIfPresent(ConfigSampleReportDO::getVersion, reqVO.getVersion())
|
||||
.orderByDesc(ConfigSampleReportDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleMethodDO;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 子样与检测方法配置 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConfigSubSampleMethodMapper extends BaseMapperX<ConfigSubSampleMethodDO> {
|
||||
|
||||
default PageResult<ConfigSubSampleMethodDO> selectPage(ConfigSubSampleMethodPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigSubSampleMethodDO>()
|
||||
.eqIfPresent(ConfigSubSampleMethodDO::getConfigSubSampleId, reqVO.getConfigSubSampleId())
|
||||
.eqIfPresent(ConfigSubSampleMethodDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||
.eqIfPresent(ConfigSubSampleMethodDO::getIsDefaultUse, reqVO.getIsDefaultUse())
|
||||
.eqIfPresent(ConfigSubSampleMethodDO::getTaskCount, reqVO.getTaskCount())
|
||||
.eqIfPresent(ConfigSubSampleMethodDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(ConfigSubSampleMethodDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ConfigSubSampleMethodDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(ConfigSubSampleMethodDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.dal.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigWarehouseLocationInfomationDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.*;
|
||||
|
||||
/**
|
||||
* 样品库位信息 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConfigWarehouseLocationInfomationMapper extends BaseMapperX<ConfigWarehouseLocationInfomationDO> {
|
||||
|
||||
default PageResult<ConfigWarehouseLocationInfomationDO> selectPage(ConfigWarehouseLocationInfomationPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigWarehouseLocationInfomationDO>()
|
||||
.likeIfPresent(ConfigWarehouseLocationInfomationDO::getName, reqVO.getName())
|
||||
.eqIfPresent(ConfigWarehouseLocationInfomationDO::getCode, reqVO.getCode())
|
||||
.eqIfPresent(ConfigWarehouseLocationInfomationDO::getWarehouseCoding, reqVO.getWarehouseCoding())
|
||||
.eqIfPresent(ConfigWarehouseLocationInfomationDO::getCapacity, reqVO.getCapacity())
|
||||
.eqIfPresent(ConfigWarehouseLocationInfomationDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(ConfigWarehouseLocationInfomationDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ConfigWarehouseLocationInfomationDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(ConfigWarehouseLocationInfomationDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.dal.mapper;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodPageReqVO;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardMethodDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 物料检测标准与方法 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface MaterialAssayStandardMethodMapper extends BaseMapperX<MaterialAssayStandardMethodDO> {
|
||||
|
||||
default PageResult<MaterialAssayStandardMethodDO> selectPage(MaterialAssayStandardMethodPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<MaterialAssayStandardMethodDO>()
|
||||
.eqIfPresent(MaterialAssayStandardMethodDO::getMaterialAssayStandardDetailId, reqVO.getMaterialAssayStandardDetailId())
|
||||
.eqIfPresent(MaterialAssayStandardMethodDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||
.eqIfPresent(MaterialAssayStandardMethodDO::getIsDefault, reqVO.getIsDefault())
|
||||
.eqIfPresent(MaterialAssayStandardMethodDO::getIsDualCup, reqVO.getIsDualCup())
|
||||
.eqIfPresent(MaterialAssayStandardMethodDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(MaterialAssayStandardMethodDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(MaterialAssayStandardMethodDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(MaterialAssayStandardMethodDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.service;
|
||||
|
||||
import java.util.*;
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleMethodDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 子样与检测方法配置 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface ConfigSubSampleMethodService {
|
||||
|
||||
/**
|
||||
* 创建子样与检测方法配置
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
ConfigSubSampleMethodRespVO createConfigSubSampleMethod(@Valid ConfigSubSampleMethodSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新子样与检测方法配置
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateConfigSubSampleMethod(@Valid ConfigSubSampleMethodSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除子样与检测方法配置
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteConfigSubSampleMethod(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除子样与检测方法配置
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteConfigSubSampleMethodListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得子样与检测方法配置
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 子样与检测方法配置
|
||||
*/
|
||||
ConfigSubSampleMethodDO getConfigSubSampleMethod(Long id);
|
||||
|
||||
/**
|
||||
* 获得子样与检测方法配置分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 子样与检测方法配置分页
|
||||
*/
|
||||
PageResult<ConfigSubSampleMethodDO> getConfigSubSampleMethodPage(ConfigSubSampleMethodPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.service;
|
||||
|
||||
import java.util.*;
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigWarehouseLocationInfomationDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 样品库位信息 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface ConfigWarehouseLocationInfomationService {
|
||||
|
||||
/**
|
||||
* 创建样品库位信息
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
ConfigWarehouseLocationInfomationRespVO createConfigWarehouseLocationInfomation(@Valid ConfigWarehouseLocationInfomationSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新样品库位信息
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateConfigWarehouseLocationInfomation(@Valid ConfigWarehouseLocationInfomationSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除样品库位信息
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteConfigWarehouseLocationInfomation(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除样品库位信息
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteConfigWarehouseLocationInfomationListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得样品库位信息
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 样品库位信息
|
||||
*/
|
||||
ConfigWarehouseLocationInfomationDO getConfigWarehouseLocationInfomation(Long id);
|
||||
|
||||
/**
|
||||
* 获得样品库位信息分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 样品库位信息分页
|
||||
*/
|
||||
PageResult<ConfigWarehouseLocationInfomationDO> getConfigWarehouseLocationInfomationPage(ConfigWarehouseLocationInfomationPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.business.config.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.qms.business.config.controller.vo.*;
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigWarehouseLocationInfomationDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigWarehouseLocationInfomationMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
|
||||
import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.CONFIG_WAREHOUSE_LOCATION_INFOMATION_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 样品库位信息 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ConfigWarehouseLocationInfomationServiceImpl implements ConfigWarehouseLocationInfomationService {
|
||||
|
||||
@Resource
|
||||
private ConfigWarehouseLocationInfomationMapper configWarehouseLocationInfomationMapper;
|
||||
|
||||
@Override
|
||||
public ConfigWarehouseLocationInfomationRespVO createConfigWarehouseLocationInfomation(ConfigWarehouseLocationInfomationSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ConfigWarehouseLocationInfomationDO configWarehouseLocationInfomation = BeanUtils.toBean(createReqVO, ConfigWarehouseLocationInfomationDO.class);
|
||||
configWarehouseLocationInfomationMapper.insert(configWarehouseLocationInfomation);
|
||||
// 返回
|
||||
return BeanUtils.toBean(configWarehouseLocationInfomation, ConfigWarehouseLocationInfomationRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateConfigWarehouseLocationInfomation(ConfigWarehouseLocationInfomationSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateConfigWarehouseLocationInfomationExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ConfigWarehouseLocationInfomationDO updateObj = BeanUtils.toBean(updateReqVO, ConfigWarehouseLocationInfomationDO.class);
|
||||
configWarehouseLocationInfomationMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteConfigWarehouseLocationInfomation(Long id) {
|
||||
// 校验存在
|
||||
validateConfigWarehouseLocationInfomationExists(id);
|
||||
// 删除
|
||||
configWarehouseLocationInfomationMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteConfigWarehouseLocationInfomationListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateConfigWarehouseLocationInfomationExists(ids);
|
||||
// 删除
|
||||
configWarehouseLocationInfomationMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateConfigWarehouseLocationInfomationExists(List<Long> ids) {
|
||||
List<ConfigWarehouseLocationInfomationDO> list = configWarehouseLocationInfomationMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(CONFIG_WAREHOUSE_LOCATION_INFOMATION_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateConfigWarehouseLocationInfomationExists(Long id) {
|
||||
if (configWarehouseLocationInfomationMapper.selectById(id) == null) {
|
||||
throw exception(CONFIG_WAREHOUSE_LOCATION_INFOMATION_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigWarehouseLocationInfomationDO getConfigWarehouseLocationInfomation(Long id) {
|
||||
return configWarehouseLocationInfomationMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ConfigWarehouseLocationInfomationDO> getConfigWarehouseLocationInfomationPage(ConfigWarehouseLocationInfomationPageReqVO pageReqVO) {
|
||||
return configWarehouseLocationInfomationMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.core.liteflow.handler;
|
||||
|
||||
import cn.iocoder.yudao.framework.mq.redis.core.pubsub.AbstractRedisChannelMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RedisLiteFlowMessage extends AbstractRedisChannelMessage {
|
||||
|
||||
private Long id;
|
||||
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package cn.iocoder.yudao.module.qms.framework.rpc.config;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.api.task.BpmProcessInstanceApi;
|
||||
import cn.iocoder.yudao.module.infra.api.file.FileApi;
|
||||
import cn.iocoder.yudao.module.system.api.sequence.SequenceApi;
|
||||
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration(value = "qmsRpcConfiguration", proxyBeanMethods = false)
|
||||
@EnableFeignClients(clients = {FileApi.class, SequenceApi.class, BpmProcessInstanceApi.class})
|
||||
public class RpcConfiguration {
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* 占位
|
||||
*/
|
||||
package cn.iocoder.yudao.module.qms.framework.rpc;
|
||||
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<select id="selectUnAssayTaskGroupList" resultType="map">
|
||||
SELECT
|
||||
tbatd.CFG_ASY_MTHD_ID AS configAssayMethodId,
|
||||
tcam.NAME AS configAssayMethodName,
|
||||
COUNT(tbatd.ID) AS sampleTaskCount
|
||||
FROM
|
||||
T_BSN_ASY_TSK_DAT tbatd
|
||||
LEFT JOIN T_CFG_ASY_MTHD tcam ON
|
||||
tbatd.CFG_ASY_MTHD_ID = tcam.ID
|
||||
WHERE
|
||||
tbatd.IS_TSKD = 0
|
||||
AND tbatd.IS_RPOD = 0
|
||||
AND tbatd.DELETED = 0
|
||||
GROUP BY
|
||||
tbatd.CFG_ASY_MTHD_ID,
|
||||
tcam.NAME
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigWarehouseLocationInfomationMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@@ -4,16 +4,16 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>dsc-qms</artifactId>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modules>
|
||||
<module>yudao-module-qms-api</module>
|
||||
<module>yudao-module-qms-server</module>
|
||||
<module>zt-module-qms-api</module>
|
||||
<module>zt-module-qms-server</module>
|
||||
</modules>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>yudao-module-qms</artifactId>
|
||||
<artifactId>zt-module-qms</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
@@ -3,12 +3,12 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>yudao-module-qms</artifactId>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>zt-module-qms</artifactId>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>yudao-module-qms-api</artifactId>
|
||||
<artifactId>zt-module-qms-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-common</artifactId>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-common</artifactId>
|
||||
</dependency>
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
@@ -1,8 +1,8 @@
|
||||
package cn.iocoder.yudao.module.qms.api.task;
|
||||
package com.zt.plat.module.qms.api.task;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.qms.api.task.dto.QmsBpmDTO;
|
||||
import cn.iocoder.yudao.module.qms.enums.ApiConstants;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.qms.api.task.dto.QmsBpmDTO;
|
||||
import com.zt.plat.module.qms.enums.ApiConstants;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.qms.api.task;
|
||||
package com.zt.plat.module.qms.api.task;
|
||||
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.qms.api.task.dto;
|
||||
package com.zt.plat.module.qms.api.task.dto;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -1,6 +1,6 @@
|
||||
package cn.iocoder.yudao.module.qms.enums;
|
||||
package com.zt.plat.module.qms.enums;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.enums.RpcConstants;
|
||||
import com.zt.plat.framework.common.enums.RpcConstants;
|
||||
|
||||
/**
|
||||
* API 相关的枚举
|
||||
@@ -0,0 +1,220 @@
|
||||
package com.zt.plat.module.qms.enums;
|
||||
|
||||
|
||||
import com.zt.plat.framework.common.exception.ErrorCode;
|
||||
|
||||
/**
|
||||
* <b>ErrorCodeConstants</b>
|
||||
* 错误码枚举类
|
||||
* qms 系统,使用 1_200_000_000 段
|
||||
*/
|
||||
public interface ErrorCodeConstants {
|
||||
/**
|
||||
* 可用号段: 1_032_000_000 ~1_033_000_000
|
||||
* */
|
||||
|
||||
/*==============================公共错误 1_032_000_000 ~1_033_000_999 ===============================*/
|
||||
Integer ERROR_CODE_MODULE_QMS_BPM = 1_032_000_010;
|
||||
ErrorCode MISS_PARAMETER = new ErrorCode(1_032_000_000, "缺少参数");
|
||||
ErrorCode SQL_INJECTION_EXCEPTION = new ErrorCode(1_032_000_001, "表名不合法,存在SQL注入风险,联系管理员处理");
|
||||
|
||||
|
||||
/*==============================common 公共模块 1_032_001_000 ~ 1_032_049_999 ===============================*/
|
||||
Integer ERROR_CODE_MODULE_COMMON = 1_032_001_000;
|
||||
ErrorCode DATA_COLLECTION_NOT_EXISTS = new ErrorCode(1_032_001_000, "数据集不存在");
|
||||
ErrorCode DATA_COLLECTION_CLASSIFY_DUPLICATE = new ErrorCode(1_032_001_000, "分类名称重复,请重新输入");
|
||||
ErrorCode DATA_COLLECTION_CLASSIFY_PARENT_ERROR = new ErrorCode(1_032_001_000, "上级分类不能设置为当前分类及其的后代分类");
|
||||
ErrorCode DATA_COLLECTION_FIELD_NOT_EXISTS = new ErrorCode(1_032_001_000, "数据集字段不存在");
|
||||
ErrorCode DATA_COLLECTION_EMPTY_WF_KEY = new ErrorCode(1_032_001_000, "数据集未配置流程key!");
|
||||
ErrorCode DATA_FORM_NOT_EXISTS = new ErrorCode(1_032_001_000, "通用数据不存在");
|
||||
ErrorCode DATA_FORM_EMPTY_COLLECTION_ID = new ErrorCode(1_032_001_000, "未指定数据集ID");
|
||||
ErrorCode DICTIONARY_BUSINESS_NOT_EXISTS = new ErrorCode(1_032_001_000, "业务参数字典不存在");
|
||||
ErrorCode DATA_TEMPLATE_NOT_EXISTS = new ErrorCode(1_032_001_000, "表单设计器模板不存在");
|
||||
ErrorCode DICTIONARY_BUSINESS_DATA_MORE_THAN_ONE = new ErrorCode(1_032_001_000, "业务参数字典[数据]key重名,请联系管理员处理!");
|
||||
ErrorCode DICTIONARY_BUSINESS_CATEGORY_MORE_THAN_ONE = new ErrorCode(1_032_001_000, "业务参数字典[分类]key重名,请联系管理员处理!");
|
||||
ErrorCode DICTIONARY_BUSINESS_CLASSIFY_DUPLICATE = new ErrorCode(1_032_001_000, "分类名称重复,请重新输入");
|
||||
|
||||
/*==============================config 配置模块 1_032_050_000 ~ 1_032_099_999 ===============================*/
|
||||
ErrorCode CONFIG_REPORT_TEMPLATE_NOT_EXISTS = new ErrorCode(1_032_050_000, "报表模版配置不存在");
|
||||
ErrorCode CONFIG_ASSAY_METHOD_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法配置不存在");
|
||||
ErrorCode CONFIG_ASSAY_METHOD_PARAMETER_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法参数配置不存在");
|
||||
ErrorCode CONFIG_ASSAY_METHOD_PROJECT_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法分析项目配置不存在");
|
||||
ErrorCode CONFIG_ASSAY_METHOD_PROJECT_RANGE_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法分析项目区间不存在");
|
||||
ErrorCode CONFIG_ASSAY_METHOD_PROJECT_ASSESSMENT_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法分析项目判定不存在");
|
||||
ErrorCode CONFIG_ASSAY_METHOD_PROJECT_COEFFICIENT_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法分析项目补正系数不存在");
|
||||
ErrorCode CONFIG_REPORT_FIELD_NOT_EXISTS = new ErrorCode(1_032_050_000, "报表字段配置不存在");
|
||||
ErrorCode CONFIG_STANDARD_SAMPLE_TYPE_NOT_EXISTS = new ErrorCode(1_032_050_000, "标准样类型配置不存在");
|
||||
ErrorCode CONFIG_STANDARD_SAMPLE_PROJECT_NOT_EXISTS = new ErrorCode(1_032_050_000, "标准样检测项目配置不存在");
|
||||
ErrorCode CONFIG_SUB_SAMPLE_PARENT_NOT_EXISTS = new ErrorCode(1_032_050_000, "分样配置不存在");
|
||||
ErrorCode CONFIG_SUB_SAMPLE_PARENT_METHOD_NOT_EXISTS = new ErrorCode(1_032_050_000, "分样与检测方法配置不存在");
|
||||
//ErrorCode CONFIG_SUB_SAMPLE_PARENT_RECHECK_NOT_EXISTS = new ErrorCode(1_032_050_000, "分样与复检配置不存在");
|
||||
ErrorCode CONFIG_SUB_SAMPLE_METHOD_NOT_EXISTS = new ErrorCode(1_032_050_000, "子样与分样检测方法配置表不存在");
|
||||
ErrorCode CONFIG_SUB_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_050_000, "子样配置不存在");
|
||||
ErrorCode CONFIG_SAMPLE_REPORT_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品报表关系不存在");
|
||||
ErrorCode CONFIG_SAMPLE_FLOW_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品流程配置不存在");
|
||||
ErrorCode CONFIG_REPORT_TYPE_NOT_EXISTS = new ErrorCode(1_032_050_000, "报表类型配置不存在");
|
||||
ErrorCode CONFIG_PROJECT_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测项目配置不存在");
|
||||
ErrorCode CONFIG_ENTRUST_SOURCE_NOT_EXISTS = new ErrorCode(1_032_050_000, "检验委托来源配置不存在");
|
||||
ErrorCode CONFIG_ENTRUST_SOURCE_SAMPLE_TYPE_NOT_EXISTS = new ErrorCode(1_032_050_000, "检验委托来源与样品类型配置不存在");
|
||||
|
||||
ErrorCode CONFIG_BASE_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_050_000, "主样配置不存在");
|
||||
ErrorCode CONFIG_ASSAY_METHOD_PROJECT_PARAMETER_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法分析项目参数配置不存在");
|
||||
ErrorCode CONFIG_WAREHOUSE_LOCATION_INFOMATION_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品库位信息不存在");
|
||||
ErrorCode CONFIG_SIMPLE_FLOW_RULE_NOT_EXISTS = new ErrorCode(1_032_050_000, "LiteFlow规则配置不存在");
|
||||
ErrorCode CONFIG_SIMPLE_FLOW_CODE_NOT_EXISTS = new ErrorCode(1_032_050_000, "LiteFlow脚本配置不存在");
|
||||
ErrorCode CONFIG_RULE_NOT_EXISTS = new ErrorCode(1_032_050_000, "规则配置不存在");
|
||||
|
||||
ErrorCode CONFIG_XRF_LINE_NOT_EXISTS = new ErrorCode(1_032_050_000, "荧光分析线不存在");
|
||||
ErrorCode CONFIG_XRF_PROJECT_NOT_EXISTS = new ErrorCode(1_032_050_000, "荧光采集检测项目配置不存在");
|
||||
ErrorCode CONFIG_XRF_CONVERSION_RATE_NOT_EXISTS = new ErrorCode(1_032_050_000, "荧光数据采集特殊检测项目转换率配置不存在");
|
||||
|
||||
ErrorCode BASE_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品大类管理不存在");
|
||||
ErrorCode MATERIAL_ASSAY_STANDARD_DETAIL_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测标准明细不存在");
|
||||
ErrorCode MATERIAL_ASSAY_STANDARD_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测标准不存在");
|
||||
ErrorCode MATERIAL_ASSAY_STANDARD_METHOD_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测标准方法不存在");
|
||||
ErrorCode MATERIAL_ASSAY_STANDARD_FORECAST_PROJECT_NOT_EXISTS = new ErrorCode(1_032_050_000, "物料检测标准来样品位配置不存在");
|
||||
|
||||
ErrorCode CONFIG_SAMPLE_HANDOVER_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品交接配置不存在");
|
||||
ErrorCode CONFIG_USER_SIGNATURE_NOT_EXISTS = new ErrorCode(1_032_050_000, "手写签名不存在");
|
||||
|
||||
//dictionary
|
||||
ErrorCode DICTIONARY_SAMPLE_FLOW_NODE_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品流程节点字典不存在");
|
||||
ErrorCode DICTIONARY_PARAMETER_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测参数字典不存在");
|
||||
ErrorCode DICTIONARY_PROJECT_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测项目字典不存在");
|
||||
ErrorCode DICTIONARY_SAMPLE_TYPE_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品类型字典不存在");
|
||||
|
||||
ErrorCode CONFIG_QC_SAMPLE_METHOD_NOT_EXISTS = new ErrorCode(1_032_050_000, "质控样与检测方法配置不存在");
|
||||
ErrorCode CONFIG_QC_STANDARD_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_050_000, "质控与定值样关系不存在");
|
||||
ErrorCode CONFIG_QC_SAMPLE_METHOD_PARAMETER_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_WAREHOUSE_LOCATION_NOT_EXISTS = 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==================================*/
|
||||
ErrorCode BUSINESS_SAMPLE_ENTRUST_REGISTRATION_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记业务不存在");
|
||||
ErrorCode BUSINESS_SAMPLE_ENTRUST_DETAIL_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记样品明细不存在");
|
||||
ErrorCode BUSINESS_SAMPLE_ENTRUST_PROJECT_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检样品检测项目业务不存在");
|
||||
|
||||
ErrorCode BUSINESS_BASE_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_100_000, "主样业务不存在");
|
||||
ErrorCode BUSINESS_SUB_PARENT_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_100_000, "分样业务不存在");
|
||||
ErrorCode BUSINESS_SUB_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样业务不存在");
|
||||
ErrorCode BUSINESS_HANDOVER_RECORD_SUB_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样交接记录业务不存在");
|
||||
ErrorCode BUSINESS_SAMPLE_ASSAY_RESULT_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记来样品位不存在");
|
||||
ErrorCode BUSINESS_ASSAY_TASK_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样检测任务业务不存在");
|
||||
ErrorCode BUSINESS_ASSAY_TASK_PARAMETER_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样检测任务参数业务不存在");
|
||||
ErrorCode BUSINESS_ASSAY_PROJECT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测项目数据业务不存在");
|
||||
ErrorCode BUSINESS_ASSAY_PARAMETER_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测参数数据业务不存在");
|
||||
ErrorCode BUSINESS_SUB_SAMPLE_ASSESSMENT_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样判定业务不存在");
|
||||
ErrorCode BUSINESS_SUB_SAMPLE_ASSESSMENT_PROJECT_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样判定检测项目数据业务不存在");
|
||||
ErrorCode BUSINESS_SAMPLE_HANDOVER_NOT_EXISTS = new ErrorCode(1_032_100_000, "样品交接单业务不存在");
|
||||
ErrorCode BUSINESS_SAMPLE_HANDOVER_DETAIL_NOT_EXISTS = new ErrorCode(1_032_100_000, "样品交接明细不存在");
|
||||
ErrorCode BUSINESS_ASSAY_TASK_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测任务分配业务不存在");
|
||||
ErrorCode BUSINESS_ASSAY_TASK_DETAIL_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测任务分配明细不存在");
|
||||
ErrorCode BUSINESS_SUB_SAMPLE_ANALYSIS_GROUP_NOT_EXISTS = new ErrorCode(1_032_100_000, "子样分析班组业务不存在");
|
||||
|
||||
ErrorCode BUSINESS_ASSAY_REPORT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测报表数据业务不存在");
|
||||
|
||||
ErrorCode BUSINESS_QUALITY_CONTROL_SAMPLE_PROJECT_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控样检测项目业务不存在");
|
||||
ErrorCode BUSINESS_STANDARD_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_100_000, "标准样业务不存在");
|
||||
ErrorCode BUSINESS_STANDARD_SAMPLE_PROJECT_NOT_EXISTS = new ErrorCode(1_032_100_000, "标准样检测项目业务不存在");
|
||||
|
||||
ErrorCode BUSINESS_SUB_PARENT_SAMPLE_ASSESSMENT_NOT_EXISTS = new ErrorCode(1_032_100_000, "班组判定数据业务不存在");
|
||||
ErrorCode BUSINESS_SUB_PARENT_SAMPLE_ASSESSMENT_PROJECT_NOT_EXISTS = new ErrorCode(1_032_100_000, "班组判定检测项目数据业务不存在");
|
||||
|
||||
ErrorCode BUSINESS_SUB_SAMPLE_PARENT_RETEST_NOT_EXISTS = new ErrorCode(1_032_100_000, "分样复测业务数据不存在");
|
||||
|
||||
ErrorCode BUSINESS_QC_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控样业务不存在");
|
||||
ErrorCode BUSINESS_QC_PROJECT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控样检测项目数据业务不存在");
|
||||
ErrorCode BUSINESS_QC_PARAMETER_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控样检测参数数据业务不存在");
|
||||
|
||||
ErrorCode BUSINESS_QC_MANAGEMENT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控管理样检测任务数据,管理样、标准样不存在");
|
||||
ErrorCode BUSINESS_QC_MANAGEMENT_PROJECT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控样检测项目数据业务不存在");
|
||||
ErrorCode BUSINESS_QC_MANAGEMENT_PARAMETER_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控样检测参数数据业务不存在");
|
||||
ErrorCode BUSINESS_QC_MANAGEMENT_SAMPLE_PARAMETER_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控管理样检测任务参数业务表,与子样检测任务参数业务表T_BSN_ASY_TSK_PRM_DAT一样,针对标准样、管理样、质控样、监控样等样品的参数不存在");
|
||||
ErrorCode BUSINESS_QC_COEFFICIENT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控样检测系数任务数据,空白样、标样不存在");
|
||||
ErrorCode BUSINESS_QC_COEFFICIENT_PARAMETER_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "质控样检测系数参数业务不存在");
|
||||
|
||||
ErrorCode BUSINESS_XRF_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "荧光采集记录不存在");
|
||||
|
||||
|
||||
//检测报告
|
||||
ErrorCode REPORT_DOCUMENT_MAIN_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测报告业务不存在");
|
||||
ErrorCode REPORT_DOCUMENT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测报告明细不存在");
|
||||
ErrorCode REPORT_DOCUMENT_TYPE_NOT_EXISTS = new ErrorCode(1_032_100_000, "报告类型配置不存在");
|
||||
ErrorCode REPORT_DOCUMENT_MAIN_CORRELATION_NOT_EXISTS = new ErrorCode(1_032_100_000, "报告主数据关系不存在");
|
||||
ErrorCode REPORT_DOCUMENT_FILE_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测报告附件不存在");
|
||||
|
||||
ErrorCode BUSINESS_SAMPLE_DISPATCH_NOT_EXISTS = new ErrorCode(1_032_100_000, "样品调拨不存在");
|
||||
ErrorCode BUSINESS_SAMPLE_DISPATCH_DETAIL_NOT_EXISTS = new ErrorCode(1_032_100_000, "样品调拨明细不存在");
|
||||
|
||||
/*=================================resource 资源管理 1_032_150_000 ~ 1_032_199_999 ==================================*/
|
||||
// ----------设备管理----------
|
||||
ErrorCode DEVICE_INFOMATION_NOT_EXISTS = new ErrorCode(1_032_150_000, "设备信息不存在");
|
||||
ErrorCode DEVICE_PRODUCT_NOT_EXISTS = new ErrorCode(1_032_150_000, "设备大类不存在");
|
||||
ErrorCode DEVICE_MAINTAIN_NOT_EXISTS = new ErrorCode(1_032_150_000, "设备维护数据不存在");
|
||||
ErrorCode DEVICE_MAINTAIN_ITEM_NOT_EXISTS = new ErrorCode(1_032_150_000, "设备维护项不存在");
|
||||
ErrorCode DEVICE_CONFIG_BUSINESS_RULE_NOT_EXISTS = new ErrorCode(1_032_150_000, "设备业务配置不存在");
|
||||
ErrorCode DEVICE_CONFIG_BUSINESS_ITEM_NOT_EXISTS = new ErrorCode(1_032_150_000, "设备业务配置项不存在");
|
||||
ErrorCode DEVICE_PERIOD_CHECK_NOT_EXISTS = new ErrorCode(1_032_150_000, "期间核查数据不存在");
|
||||
|
||||
ErrorCode DEVICE_PERIOD_CHECK_PLAN_NOT_EXISTS = new ErrorCode(1_032_150_000, "期间核查计划不存在");
|
||||
ErrorCode DEVICE_REPAIR_APPLY_NOT_EXISTS = new ErrorCode(1_032_150_000, "设备维修申请数据不存在");
|
||||
ErrorCode DEVICE_REPAIR_RESULT_DETAIL_NOT_EXISTS = new ErrorCode(1_032_150_000, "设备维修结果明细不存在");
|
||||
ErrorCode DEVICE_REPAIR_DETAIL_NOT_EXISTS = new ErrorCode(1_032_150_000, "设备维修明细不存在");
|
||||
ErrorCode DEVICE_CALIBRATION_PLAN_NOT_EXISTS = new ErrorCode(1_032_150_000, "检定校准计划不存在");
|
||||
ErrorCode DEVICE_CALIBRATION_NOT_EXISTS = new ErrorCode(1_032_150_000, "检定校准数据不存在");
|
||||
ErrorCode DEVICE_USE_RECORD_NOT_EXISTS = new ErrorCode(1_032_150_000, "设备使用记录不存在");
|
||||
ErrorCode DEVICE_AFFILIATION_RELATIVITY_NOT_EXISTS = new ErrorCode(1_032_150_000, "附属设备关系不存在");
|
||||
ErrorCode DEVICE_APPLY_DETAIL_NOT_EXISTS = new ErrorCode(1_032_150_000, "设备申请明细数据不存在");
|
||||
ErrorCode DEVICE_APPLY_NOT_EXISTS = new ErrorCode(1_032_150_000, "设备申请数据不存在");
|
||||
ErrorCode DEVICE_CONFIG_FLOW_NOT_EXISTS = new ErrorCode(1_032_150_000, "设备通用流程配置不存在");
|
||||
|
||||
// -------------物料试剂-------------
|
||||
ErrorCode MATERIAL_INFOMATION_NOT_EXISTS = new ErrorCode(1_032_160_000, "试剂耗材不存在");
|
||||
ErrorCode MATERIAL_PRODUCT_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料分类/大类不存在");
|
||||
ErrorCode MATERIAL_PRODUCT_PARENT_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料分类/大类的父类不存在");
|
||||
ErrorCode MATERIAL_PRODUCT_CODE_EXISTED = new ErrorCode(1_032_160_000, "物料大类编码重复");
|
||||
ErrorCode MATERIAL_CATEGORY_EXISTS_CHILDREN = new ErrorCode(1_032_160_000, "分类下含有子分类或物料大类,不可删除");
|
||||
ErrorCode MATERIAL_PRODUCT_EXISTS_BATCH = new ErrorCode(1_032_160_000, "物料大类下存在物料批次,不可删除");
|
||||
ErrorCode MATERIAL_PRODUCTS_EXISTS_CATEGORY = new ErrorCode(1_032_160_000, "物料大类列表中存在分类数据");
|
||||
ErrorCode MATERIAL_LIFECYCLE_DETAIL_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料通用流程明细不存在");
|
||||
ErrorCode MATERIAL_LIFECYCLE_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料通用流程不存在");
|
||||
|
||||
ErrorCode MATERIAL_BATCH_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料批次不存在");
|
||||
ErrorCode MATERIAL_BATCH_ASSIGN_END = new ErrorCode(1_032_160_000, "物料批次已拆分,不可操作");
|
||||
ErrorCode GONGDUAN_BELONG_MATERIAL_BATCH_NOT_EQUAL = new ErrorCode(1_032_160_000, "工段所属的物料批次不一致");
|
||||
ErrorCode GONGDUAN_QUANTITY_MATERIAL_BATCH_NOT_EQUAL = new ErrorCode(1_032_160_000, "工段累加数量和批次数量不一致");
|
||||
ErrorCode MATERIAL_BATCH_NOT_ASSIGN_FOR_SUBMIT = new ErrorCode(1_032_160_000, "物料批次未拆分,不可提交");
|
||||
ErrorCode MATERIAL_BATCH_ASSIGN_NOT_EXISTS = new ErrorCode(1_032_160_000, "物料批次分发不存在");
|
||||
ErrorCode MATERIAL_INVENTORY_INBOUND_NOT_EXISTS = new ErrorCode(1_032_160_000, "入库,出库不存在");
|
||||
ErrorCode MATERIAL_INVENTORY_INBOUND_DETAIL_NOT_EXISTS = new ErrorCode(1_032_160_000, "入库明细,出库明细等不存在");
|
||||
|
||||
ErrorCode SYSTEM_VERSION_MANAGEMENT_NOT_EXISTS = new ErrorCode(1_032_160_000, "客户端版本管理不存在");
|
||||
|
||||
ErrorCode MATERIAL_LOCATION_NOT_EXISTS = new ErrorCode(1_032_160_000, "存放位置不存在");
|
||||
ErrorCode MATERIAL_INVENTORY_CHECK_NOT_EXISTS = new ErrorCode(1_032_160_000, "库存盘点不存在");
|
||||
ErrorCode MATERIAL_INVENTORY_CHECK_BATCH_NOT_EXISTS = new ErrorCode(1_032_160_000, "库存盘点项不存在");
|
||||
ErrorCode MATERIAL_INVENTORY_CHECK_DETAIL_NOT_EXISTS = new ErrorCode(1_032_160_000, "库存盘点明细不存在");
|
||||
ErrorCode MATERIAL_INVENTORY_OUTBOUND_NOT_EXISTS = new ErrorCode(1_032_160_000, "出库不存在");
|
||||
ErrorCode MATERIAL_INVENTORY_OUTBOUND_DETAIL_NOT_EXISTS = new ErrorCode(1_032_160_000, "出库明细,出库明细,含领用出库、退货出库、盘亏出库、销毁出库等不存在");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*================================= tx 1_032_200_000 ~ 1_032_249_999 ==================================*/
|
||||
|
||||
|
||||
|
||||
|
||||
/*================================= office 办公 1_032_250_000 ~ 1_032_299_999 ==================================*/
|
||||
ErrorCode SUPPLIER_NOT_EXISTS = new ErrorCode(1_032_250_000, "供应商不存在");
|
||||
ErrorCode SUPPLIER_PROPERTIES_NOT_EXISTS = new ErrorCode(1_032_250_000, "供应商属性不存在");
|
||||
ErrorCode SUPPLIER_EVALUATION_NOT_EXISTS = new ErrorCode(1_032_250_000, "供应商评价不存在");
|
||||
ErrorCode SUPPLIER_EVALUATION_AT_NOT_EXISTS = new ErrorCode(1_032_250_000, "供应商评价关系不存在");
|
||||
|
||||
|
||||
|
||||
/*================================= dzj 大质检 1_032_300_000 ~ 1_032_349_999 ==================================*/
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.qms.enums;
|
||||
package com.zt.plat.module.qms.enums;
|
||||
|
||||
public class QmsBpmConstant {
|
||||
|
||||
@@ -7,6 +7,20 @@ public class QmsBpmConstant {
|
||||
* */
|
||||
public static final String BPM_CALLBACK_BEAN_NAME = "bpmCallbackBean";
|
||||
|
||||
/**
|
||||
* 流程回调时使用的ActivityId Key
|
||||
* */
|
||||
public static final String BPM_CALLBACK_ACTIVITY_ID = "bpmCallbackActivityId";
|
||||
public static final String BPM_FIELD_EXTENSIONS = "bpmFieldExtensions";
|
||||
public static final String BPM_FIRST_ACTIVITY_FLAG = "firstActivityFlag";
|
||||
public static final String BPM_LAST_ACTIVITY_FLAG = "lastActivityFlag";
|
||||
public static final String BPM_REJECT_TO_FIRST_FLAG = "rejectToFirstActivity";
|
||||
public static final String BPM_CUR_ACTIVITY_INS_ID = "currentActivityInsId"; //当前活动实例id
|
||||
public static final String BPM_PROCESS_INS_ID = "processInstanceId"; //当前活动实例id
|
||||
|
||||
//驳回标记前缀
|
||||
public static final String BPM_CALLBACK_RETURN_FLAG_PREFIX_KEY = "RETURN_FLAG_";
|
||||
|
||||
/**
|
||||
* 流程回调时使用的beanName Key
|
||||
* */
|
||||
@@ -0,0 +1,215 @@
|
||||
package com.zt.plat.module.qms.enums;
|
||||
|
||||
/**
|
||||
* <b>QmsCommonConstant</b>
|
||||
* <p>
|
||||
* 更新历史:
|
||||
* <pre> 版本 更新时间 更新者 更新内容<hr/>
|
||||
* V1.0 2025年9月24日 wxr Add</pre>
|
||||
* <b>Copyright (C) 云南志者竟成科技有限公司</b>
|
||||
* </p>
|
||||
* @author 王兴荣<wxr@wangxingrong.com>
|
||||
* @version V1.0
|
||||
* @since 2025年9月24日
|
||||
*/
|
||||
public interface QmsCommonConstant {
|
||||
|
||||
/** 是 **/
|
||||
Integer YES = 1;
|
||||
|
||||
/** 否 **/
|
||||
Integer NO = 0;
|
||||
|
||||
/** 成功 **/
|
||||
String SUCCESS = "success";
|
||||
|
||||
/** 失败 **/
|
||||
String FAILURE = "failure";
|
||||
|
||||
/** 已失败 **/
|
||||
//String FAILED = "failed";
|
||||
|
||||
/** 正常 **/
|
||||
String NORMAL = "normal";
|
||||
|
||||
/** 超差 **/
|
||||
String EXCEEDS_TOLERANCE = "exceeds_tolerance";
|
||||
|
||||
/** 隔离 **/
|
||||
String ISOLATION = "isolation";
|
||||
|
||||
/** 进行中 **/
|
||||
String IN_PROGRESS = "in_progress";
|
||||
|
||||
/** 已保存 **/
|
||||
String SAVED = "saved";
|
||||
|
||||
/** 提交 **/
|
||||
//String SUBMIT = "submit";
|
||||
|
||||
/** 已提交 **/
|
||||
String SUBMITTED = "submitted";
|
||||
|
||||
/** 未开始 **/
|
||||
String NOT_START = "not_start";
|
||||
|
||||
/** 审核中 **/
|
||||
String RUNNING = "running";
|
||||
|
||||
/** 待处理 **/
|
||||
String PENDING = "pending";
|
||||
|
||||
/** 退回 **/
|
||||
String RETURN = "return";
|
||||
|
||||
/** 已退回 **/
|
||||
String RETURNED = "returned";
|
||||
|
||||
/** 同意 **/
|
||||
String APPROVE = "approve";
|
||||
|
||||
/** 已同意 **/
|
||||
String APPROVED = "approved";
|
||||
|
||||
/** 驳回 **/
|
||||
String REJECT = "reject";
|
||||
|
||||
/** 已驳回 **/
|
||||
String REJECTED = "rejected";
|
||||
|
||||
/** 作废 **/
|
||||
String VOID = "void";
|
||||
|
||||
/** 已完成 **/
|
||||
String COMPLETED = "completed";
|
||||
|
||||
/** 已下架 **/
|
||||
String TAKEN_OFF = "taken_off";
|
||||
|
||||
/** 分配任务 **/
|
||||
String TASK_ASSIGN = "task_assign";
|
||||
|
||||
/** 领取任务 **/
|
||||
String TASK_CLAIM = "task_claim";
|
||||
|
||||
/** 固定字段 **/
|
||||
String FIELD_FIXED = "field_fixed";
|
||||
|
||||
/** 动态字段 **/
|
||||
String FIELD_DYNAMIC = "field_dynamic";
|
||||
|
||||
/** 计算字段 **/
|
||||
String FIELD_CALCULATED = "field_calculated";
|
||||
|
||||
/** 委托登记 **/
|
||||
String ENTRUST_REGISTRATION = "entrust_registration";
|
||||
|
||||
/** 检验委托 **/
|
||||
String ENTRUST_INSPECTION = "entrust_inspection";
|
||||
|
||||
/** 委托样品类型: 委检样 **/
|
||||
String ENTRUST_COMMISSION_INSPECTION_SAMPLE = "commissionInspectionSample";
|
||||
|
||||
/** 委托样品类型: 商检分析样 **/
|
||||
String ENTRUST_INSPECTION_ANALYSIS_SAMPLE = "inspectionAnalysisSample";
|
||||
|
||||
/** 委托样品类型: 商检综合 **/
|
||||
String ENTRUST_COMPREHENSIVE_INSPECTION_SAMPLE = "comprehensiveInspectionSample";
|
||||
|
||||
/** 中心收样 **/
|
||||
String FLOW_NODE_CENTER_RECEIVE = "flw_center_receive";
|
||||
|
||||
/** 中心送样 **/
|
||||
String FLOW_NODE_CENTER_SEND = "flw_center_send";
|
||||
|
||||
/** 班组收样 **/
|
||||
String FLOW_NODE_TEAM_RECEIVE = "flw_team_receive";
|
||||
|
||||
/** 样品编密(内部简码) **/
|
||||
String FlOW_NODE_SAMPLE_ENCRYPT = "flw_sample_encrypt";
|
||||
|
||||
/** 分析收样 **/
|
||||
String FLOW_NODE_ANALYSIS_RECEIVE = "flw_analysis_receive";
|
||||
|
||||
/** 分析 **/
|
||||
String FLOW_NODE_ANALYSIS = "flw_analysis";
|
||||
|
||||
/** 分析送样 **/
|
||||
String FLOW_NODE_ANALYSIS_SEND = "flw_analysis_send";
|
||||
|
||||
/** 班组送样 **/
|
||||
String FLOW_NODE_TEAM_SEND = "flw_team_send";
|
||||
|
||||
/** 样品归库 **/
|
||||
String FLOW_SAMPLE_STORAGE = "flw_sample_storage";
|
||||
|
||||
/** 结束 **/
|
||||
String FLOW_NODE_END = "flw_end";
|
||||
|
||||
/** 单杯 **/
|
||||
String ASSAY_TYPE_SINGLE_CUP = "single_cup";
|
||||
|
||||
/** 双杯 **/
|
||||
String ASSAY_TYPE_DOUBLE_CUP = "double_cup";
|
||||
|
||||
/** 平行 **/
|
||||
String ASSAY_TYPE_SINGLE_PARALLEL = "single_parallel";
|
||||
|
||||
/** 配料 **/
|
||||
String ASSAY_PROJECT_USAGE_INGREDIENT = "ingredient";
|
||||
|
||||
/** 报出 **/
|
||||
String ASSAY_PROJECT_USAGE_REPORT = "report";
|
||||
|
||||
/** 配料和报出 **/
|
||||
String ASSAY_PROJECT_USAGE_INGREDIENT_REPORT = "ingredient_report";
|
||||
|
||||
/** 品质控制 **/
|
||||
String ASSAY_PROJECT_USAGE_QUALITY_CONTROL = "quality_control";
|
||||
|
||||
/** 结果判定-初始值 **/
|
||||
String ASMT_INITIAL = "initial";
|
||||
|
||||
/** 结果判定-待上报 **/
|
||||
String ASMT_PENDING_REPORT = "pending_report";
|
||||
|
||||
/** 结果判定-待判定 **/
|
||||
String ASMT_PENDING_ASSESSMENT = "pending_assessment";
|
||||
|
||||
/** 结果判定-复测中 **/
|
||||
String ASMT_RE_INSPECTED = "re_inspected";
|
||||
|
||||
/** 结果判定-已上报 */
|
||||
String ASMT_REPORTED = "reported";
|
||||
|
||||
/** 检验完成状态-完成 **/
|
||||
String CHECKED = "checked";
|
||||
|
||||
/** 检验完成状态-未完成 **/
|
||||
String UNCHECKED = "unchecked";
|
||||
|
||||
/** 数据回报状态 未回报 **/
|
||||
String UNRETURNED = "unreturned";
|
||||
|
||||
|
||||
/** 自动 **/
|
||||
String AUTOMATIC = "automatic";
|
||||
|
||||
/** 手动 **/
|
||||
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";
|
||||
|
||||
/** 临时数据标识 **/
|
||||
String TEMP_DATA_CODE = "-1";
|
||||
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user