diff --git a/qms-server/src/main/java/com/zt/plat/qms/QmsServerApplication.java b/qms-server/src/main/java/com/zt/plat/qms/QmsServerApplication.java
index e283ad3..d0ea2a0 100644
--- a/qms-server/src/main/java/com/zt/plat/qms/QmsServerApplication.java
+++ b/qms-server/src/main/java/com/zt/plat/qms/QmsServerApplication.java
@@ -2,6 +2,9 @@ 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 服务器的启动类
@@ -11,6 +14,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
@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) {
diff --git a/qms-server/src/main/resources/application-dev.yml b/qms-server/src/main/resources/application-dev.yml
index 499327f..f1717d1 100644
--- a/qms-server/src/main/resources/application-dev.yml
+++ b/qms-server/src/main/resources/application-dev.yml
@@ -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 # 数据库索引
\ No newline at end of file
diff --git a/qms-server/src/main/resources/application-local.yml b/qms-server/src/main/resources/application-local.yml
index 8b1b778..1728ced 100644
--- a/qms-server/src/main/resources/application-local.yml
+++ b/qms-server/src/main/resources/application-local.yml
@@ -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:
@@ -85,6 +91,32 @@ 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 分钟
# 芋道配置项,设置当前项目所有自定义的配置
zt:
@@ -95,3 +127,87 @@ zt:
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 # 数据库索引
\ No newline at end of file
diff --git a/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/ErrorCodeConstants.java b/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/ErrorCodeConstants.java
index 86429d9..0b1af9c 100644
--- a/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/ErrorCodeConstants.java
+++ b/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/ErrorCodeConstants.java
@@ -29,6 +29,7 @@ public interface ErrorCodeConstants {
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, "分类名称重复,请重新输入");
@@ -45,6 +46,7 @@ public interface ErrorCodeConstants {
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, "样品报表关系不存在");
@@ -59,6 +61,10 @@ public interface ErrorCodeConstants {
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, "检测标准明细不存在");
@@ -67,6 +73,7 @@ public interface ErrorCodeConstants {
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, "样品流程节点字典不存在");
@@ -74,6 +81,14 @@ public interface ErrorCodeConstants {
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, "委检登记样品明细不存在");
@@ -101,11 +116,30 @@ public interface ErrorCodeConstants {
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_SAMPLE_PARENT_RECHECK_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_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_050_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 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, "设备_设备信息不存在");
diff --git a/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/QmsBpmConstant.java b/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/QmsBpmConstant.java
index 14b7477..16af761 100644
--- a/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/QmsBpmConstant.java
+++ b/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/QmsBpmConstant.java
@@ -7,6 +7,17 @@ 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_CALLBACK_RETURN_FLAG_PREFIX_KEY = "RETURN_FLAG_";
+
/**
* 流程回调时使用的beanName Key
* */
diff --git a/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/QmsCommonConstant.java b/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/QmsCommonConstant.java
index 3dc7c48..09dc5af 100644
--- a/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/QmsCommonConstant.java
+++ b/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/QmsCommonConstant.java
@@ -82,7 +82,10 @@ public interface QmsCommonConstant {
/** 已完成 **/
String COMPLETED = "completed";
-
+
+ /** 已下架 **/
+ String TAKEN_OFF = "taken_off";
+
/** 分配任务 **/
String TASK_ASSIGN = "task_assign";
@@ -105,23 +108,56 @@ public interface QmsCommonConstant {
String ENTRUST_INSPECTION = "entrust_inspection";
/** 中心收样 **/
- String FLOW_NODE_CENTER_RECEIVE = "flw_zx_receive";
+ String FLOW_NODE_CENTER_RECEIVE = "flw_center_receive";
/** 中心送样 **/
- String FLOW_NODE_CENTER_SEND = "flw_zx_send";
+ String FLOW_NODE_CENTER_SEND = "flw_center_send";
/** 班组收样 **/
- String FLOW_NODE_TEAM_RECEIVE = "flw_bz_receive";
+ String FLOW_NODE_TEAM_RECEIVE = "flw_team_receive";
- /** 样品编密 **/
- String FlOW_NODE_SAMPLE_ENCRYPT = "flw_ypbm";
+ /** 样品编密(内部简码) **/
+ String FlOW_NODE_SAMPLE_ENCRYPT = "flw_sample_encrypt";
/** 分析收样 **/
- String FLOW_NODE_ANALYSIS_RECEIVE = "flw_fx_receive";
+ String FLOW_NODE_ANALYSIS_RECEIVE = "flw_analysis_receive";
/** 分析送样 **/
- String FLOW_NODE_ANALYSIS_SEND = "flw_fx_send";
+ String FLOW_NODE_ANALYSIS_SEND = "flw_analysis_send";
/** 班组送样 **/
- String FLOW_NODE_TEAM_SEND = "flw_bz_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 CHECKED = "checked";
+
+ /** 检验完成状态-未完成 **/
+ String UNCHECKED = "unchecked";
}
diff --git a/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/QmsPermissionConstant.java b/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/QmsPermissionConstant.java
new file mode 100644
index 0000000..8ea6100
--- /dev/null
+++ b/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/QmsPermissionConstant.java
@@ -0,0 +1,23 @@
+package com.zt.plat.module.qms.enums;
+
+/**
+ * 权限模块常量
+ */
+public interface QmsPermissionConstant {
+ //目标权限类型-角色
+ String TARGET_TYPE_ROLE = "role";
+
+ //目标权限类型-用户
+ String TARGET_TYPE_USER = "user";
+
+ //目标权限类型-部门
+ String TARGET_TYPE_DEPT = "dept";
+
+ //目标权限类型-自定义
+ String TARGET_TYPE_CUSTOM = "custom";
+
+ //======================各业务模块权限常量=============================
+ //报告发起权限
+ String REPORT_DOCUMENT_TYPE_START = "report_document_type_start";
+
+}
diff --git a/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/QmsWarehouseLocationConstant.java b/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/QmsWarehouseLocationConstant.java
new file mode 100644
index 0000000..5a16074
--- /dev/null
+++ b/zt-module-qms/zt-module-qms-api/src/main/java/com/zt/plat/module/qms/enums/QmsWarehouseLocationConstant.java
@@ -0,0 +1,21 @@
+package com.zt.plat.module.qms.enums;
+
+/**
+ * 权限模块常量
+ */
+public interface QmsWarehouseLocationConstant {
+ //数据类型
+ String DATA_TYPE_LOCATION = "库位";
+
+ String DATA_TYPE_WAREHOUSE = "仓库";
+
+
+ //仓库分类
+ String WAREHOUSE_TYPE_SAMPLE = "样品库";
+ String WAREHOUSE_TYPE_MATERIAL = "物料试剂";
+
+ //样品下架操作方式
+ String SAMPLE_TAKE_OFF_ACTION_WAY_SAMPLE = "sample";
+ String SAMPLE_TAKE_OFF_ACTION_WAY_LOCATION = "warehouseLocation";
+
+}
diff --git a/zt-module-qms/zt-module-qms-server/pom.xml b/zt-module-qms/zt-module-qms-server/pom.xml
index ffde40c..798ba07 100644
--- a/zt-module-qms/zt-module-qms-server/pom.xml
+++ b/zt-module-qms/zt-module-qms-server/pom.xml
@@ -17,7 +17,7 @@
QMS模块。
- 3.8.3.v20230112-RELEASE
+ 3.9.1.v20251013-RELEASE
@@ -189,11 +189,11 @@
-
-
-
-
-
+
+ tech.zzjc.tio
+ zzjc-tio-spring-boot-starter
+ ${zzjc.tio.version}
+
diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessAssayParameterDataController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessAssayParameterDataController.java
index f96d29a..20e30e1 100644
--- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessAssayParameterDataController.java
+++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessAssayParameterDataController.java
@@ -1,5 +1,9 @@
package com.zt.plat.module.qms.business.bus.controller.admin;
+
+import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayParameterDataPageReqVO;
+import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayParameterDataRespVO;
+import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayParameterDataSaveReqVO;
import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@@ -10,7 +14,6 @@ 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.*;
@@ -20,9 +23,8 @@ import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
import com.zt.plat.framework.common.pojo.PageParam;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.pojo.CommonResult;
-import com.zt.plat.framework.common.util.object.BeanUtils;
import static com.zt.plat.framework.common.pojo.CommonResult.success;
-
+import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.framework.excel.core.util.ExcelUtils;
import com.zt.plat.module.qms.business.bus.controller.vo.*;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayParameterDataDO;
@@ -42,14 +44,14 @@ public class BusinessAssayParameterDataController implements BusinessControllerM
@PostMapping("/create")
@Operation(summary = "创建检测参数数据业务")
- @PreAuthorize("@ss.hasPermission('qms:business-assay-parameter-data:create')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-parameter-data:create')")
public CommonResult createBusinessAssayParameterData(@Valid @RequestBody BusinessAssayParameterDataSaveReqVO createReqVO) {
return success(businessAssayParameterDataService.createBusinessAssayParameterData(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新检测参数数据业务")
- @PreAuthorize("@ss.hasPermission('qms:business-assay-parameter-data:update')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-parameter-data:update')")
public CommonResult updateBusinessAssayParameterData(@Valid @RequestBody BusinessAssayParameterDataSaveReqVO updateReqVO) {
businessAssayParameterDataService.updateBusinessAssayParameterData(updateReqVO);
return success(true);
@@ -58,7 +60,7 @@ public class BusinessAssayParameterDataController implements BusinessControllerM
@DeleteMapping("/delete")
@Operation(summary = "删除检测参数数据业务")
@Parameter(name = "id", description = "编号", required = true)
- @PreAuthorize("@ss.hasPermission('qms:business-assay-parameter-data:delete')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-parameter-data:delete')")
public CommonResult deleteBusinessAssayParameterData(@RequestParam("id") Long id) {
businessAssayParameterDataService.deleteBusinessAssayParameterData(id);
return success(true);
@@ -67,7 +69,7 @@ public class BusinessAssayParameterDataController implements BusinessControllerM
@DeleteMapping("/delete-list")
@Parameter(name = "ids", description = "编号", required = true)
@Operation(summary = "批量删除检测参数数据业务")
- @PreAuthorize("@ss.hasPermission('qms:business-assay-parameter-data:delete')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-parameter-data:delete')")
public CommonResult deleteBusinessAssayParameterDataList(@RequestBody BatchDeleteReqVO req) {
businessAssayParameterDataService.deleteBusinessAssayParameterDataListByIds(req.getIds());
return success(true);
@@ -76,7 +78,7 @@ public class BusinessAssayParameterDataController implements BusinessControllerM
@GetMapping("/get")
@Operation(summary = "获得检测参数数据业务")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
- @PreAuthorize("@ss.hasPermission('qms:business-assay-parameter-data:query')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-parameter-data:query')")
public CommonResult getBusinessAssayParameterData(@RequestParam("id") Long id) {
BusinessAssayParameterDataDO businessAssayParameterData = businessAssayParameterDataService.getBusinessAssayParameterData(id);
return success(BeanUtils.toBean(businessAssayParameterData, BusinessAssayParameterDataRespVO.class));
@@ -84,7 +86,7 @@ public class BusinessAssayParameterDataController implements BusinessControllerM
@GetMapping("/page")
@Operation(summary = "获得检测参数数据业务分页")
- @PreAuthorize("@ss.hasPermission('qms:business-assay-parameter-data:query')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-parameter-data:query')")
public CommonResult> getBusinessAssayParameterDataPage(@Valid BusinessAssayParameterDataPageReqVO pageReqVO) {
PageResult pageResult = businessAssayParameterDataService.getBusinessAssayParameterDataPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, BusinessAssayParameterDataRespVO.class));
@@ -92,7 +94,7 @@ public class BusinessAssayParameterDataController implements BusinessControllerM
@GetMapping("/export-excel")
@Operation(summary = "导出检测参数数据业务 Excel")
- @PreAuthorize("@ss.hasPermission('qms:business-assay-parameter-data:export')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-parameter-data:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportBusinessAssayParameterDataExcel(@Valid BusinessAssayParameterDataPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessAssayProjectDataController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessAssayProjectDataController.java
index 49b0b90..6cb3769 100644
--- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessAssayProjectDataController.java
+++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessAssayProjectDataController.java
@@ -1,5 +1,8 @@
package com.zt.plat.module.qms.business.bus.controller.admin;
+import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectDataPageReqVO;
+import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectDataRespVO;
+import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectDataSaveReqVO;
import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@@ -10,7 +13,6 @@ 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.*;
@@ -43,14 +45,14 @@ public class BusinessAssayProjectDataController implements BusinessControllerMar
@PostMapping("/create")
@Operation(summary = "创建检测项目数据业务")
- @PreAuthorize("@ss.hasPermission('qms:business-assay-project-data:create')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-project-data:create')")
public CommonResult createBusinessAssayProjectData(@Valid @RequestBody BusinessAssayProjectDataSaveReqVO createReqVO) {
return success(businessAssayProjectDataService.createBusinessAssayProjectData(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新检测项目数据业务")
- @PreAuthorize("@ss.hasPermission('qms:business-assay-project-data:update')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-project-data:update')")
public CommonResult updateBusinessAssayProjectData(@Valid @RequestBody BusinessAssayProjectDataSaveReqVO updateReqVO) {
businessAssayProjectDataService.updateBusinessAssayProjectData(updateReqVO);
return success(true);
@@ -59,7 +61,7 @@ public class BusinessAssayProjectDataController implements BusinessControllerMar
@DeleteMapping("/delete")
@Operation(summary = "删除检测项目数据业务")
@Parameter(name = "id", description = "编号", required = true)
- @PreAuthorize("@ss.hasPermission('qms:business-assay-project-data:delete')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-project-data:delete')")
public CommonResult deleteBusinessAssayProjectData(@RequestParam("id") Long id) {
businessAssayProjectDataService.deleteBusinessAssayProjectData(id);
return success(true);
@@ -68,7 +70,7 @@ public class BusinessAssayProjectDataController implements BusinessControllerMar
@DeleteMapping("/delete-list")
@Parameter(name = "ids", description = "编号", required = true)
@Operation(summary = "批量删除检测项目数据业务")
- @PreAuthorize("@ss.hasPermission('qms:business-assay-project-data:delete')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-project-data:delete')")
public CommonResult deleteBusinessAssayProjectDataList(@RequestBody BatchDeleteReqVO req) {
businessAssayProjectDataService.deleteBusinessAssayProjectDataListByIds(req.getIds());
return success(true);
@@ -77,7 +79,7 @@ public class BusinessAssayProjectDataController implements BusinessControllerMar
@GetMapping("/get")
@Operation(summary = "获得检测项目数据业务")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
- @PreAuthorize("@ss.hasPermission('qms:business-assay-project-data:query')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-project-data:query')")
public CommonResult getBusinessAssayProjectData(@RequestParam("id") Long id) {
BusinessAssayProjectDataDO businessAssayProjectData = businessAssayProjectDataService.getBusinessAssayProjectData(id);
return success(BeanUtils.toBean(businessAssayProjectData, BusinessAssayProjectDataRespVO.class));
@@ -85,7 +87,7 @@ public class BusinessAssayProjectDataController implements BusinessControllerMar
@GetMapping("/page")
@Operation(summary = "获得检测项目数据业务分页")
- @PreAuthorize("@ss.hasPermission('qms:business-assay-project-data:query')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-project-data:query')")
public CommonResult> getBusinessAssayProjectDataPage(@Valid BusinessAssayProjectDataPageReqVO pageReqVO) {
PageResult pageResult = businessAssayProjectDataService.getBusinessAssayProjectDataPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, BusinessAssayProjectDataRespVO.class));
@@ -93,7 +95,7 @@ public class BusinessAssayProjectDataController implements BusinessControllerMar
@GetMapping("/export-excel")
@Operation(summary = "导出检测项目数据业务 Excel")
- @PreAuthorize("@ss.hasPermission('qms:business-assay-project-data:export')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-project-data:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportBusinessAssayProjectDataExcel(@Valid BusinessAssayProjectDataPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessAssayReportDataController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessAssayReportDataController.java
new file mode 100644
index 0000000..3c9a0a2
--- /dev/null
+++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessAssayReportDataController.java
@@ -0,0 +1,117 @@
+package com.zt.plat.module.qms.business.bus.controller.admin;
+
+import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayReportDataPageReqVO;
+import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayReportDataRespVO;
+import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayReportDataSaveReqVO;
+import org.springframework.web.bind.annotation.*;
+import jakarta.annotation.Resource;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.security.access.prepost.PreAuthorize;
+import com.zt.plat.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.*;
+import jakarta.servlet.http.*;
+import java.util.*;
+import java.io.IOException;
+
+import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
+import com.zt.plat.framework.common.pojo.PageParam;
+import com.zt.plat.framework.common.pojo.PageResult;
+import com.zt.plat.framework.common.pojo.CommonResult;
+import com.zt.plat.framework.common.util.object.BeanUtils;
+import static com.zt.plat.framework.common.pojo.CommonResult.success;
+
+import com.zt.plat.framework.excel.core.util.ExcelUtils;
+import com.zt.plat.module.qms.business.bus.controller.vo.*;
+import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayReportDataDO;
+import com.zt.plat.module.qms.business.bus.service.BusinessAssayReportDataService;
+import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
+import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
+
+@Tag(name = "管理后台 - 检测报表数据业务")
+@RestController
+@RequestMapping("/qms/business-assay-report-data")
+@Validated
+public class BusinessAssayReportDataController implements BusinessControllerMarker {
+
+
+ @Resource
+ private BusinessAssayReportDataService businessAssayReportDataService;
+
+ @PostMapping("/create")
+ @Operation(summary = "创建检测报表数据业务")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-report-data:create')")
+ public CommonResult createBusinessAssayReportData(@Valid @RequestBody BusinessAssayReportDataSaveReqVO createReqVO) {
+ return success(businessAssayReportDataService.createBusinessAssayReportData(createReqVO));
+ }
+
+ @PutMapping("/update")
+ @Operation(summary = "更新检测报表数据业务")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-report-data:update')")
+ public CommonResult updateBusinessAssayReportData(@Valid @RequestBody BusinessAssayReportDataSaveReqVO updateReqVO) {
+ businessAssayReportDataService.updateBusinessAssayReportData(updateReqVO);
+ return success(true);
+ }
+
+ @DeleteMapping("/delete")
+ @Operation(summary = "删除检测报表数据业务")
+ @Parameter(name = "id", description = "编号", required = true)
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-report-data:delete')")
+ public CommonResult deleteBusinessAssayReportData(@RequestParam("id") Long id) {
+ businessAssayReportDataService.deleteBusinessAssayReportData(id);
+ return success(true);
+ }
+
+ @DeleteMapping("/delete-list")
+ @Parameter(name = "ids", description = "编号", required = true)
+ @Operation(summary = "批量删除检测报表数据业务")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-report-data:delete')")
+ public CommonResult deleteBusinessAssayReportDataList(@RequestBody BatchDeleteReqVO req) {
+ businessAssayReportDataService.deleteBusinessAssayReportDataListByIds(req.getIds());
+ return success(true);
+ }
+
+ @GetMapping("/get")
+ @Operation(summary = "获得检测报表数据业务")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-report-data:query')")
+ public CommonResult getBusinessAssayReportData(@RequestParam("id") Long id) {
+ BusinessAssayReportDataDO businessAssayReportData = businessAssayReportDataService.getBusinessAssayReportData(id);
+ return success(BeanUtils.toBean(businessAssayReportData, BusinessAssayReportDataRespVO.class));
+ }
+
+ @GetMapping("/page")
+ @Operation(summary = "获得检测报表数据业务分页")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-report-data:query')")
+ public CommonResult> getBusinessAssayReportDataPage(@Valid BusinessAssayReportDataPageReqVO pageReqVO) {
+ PageResult pageResult = businessAssayReportDataService.getBusinessAssayReportDataPage(pageReqVO);
+ return success(BeanUtils.toBean(pageResult, BusinessAssayReportDataRespVO.class));
+ }
+
+ @GetMapping("/export-excel")
+ @Operation(summary = "导出检测报表数据业务 Excel")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-report-data:export')")
+ @ApiAccessLog(operateType = EXPORT)
+ public void exportBusinessAssayReportDataExcel(@Valid BusinessAssayReportDataPageReqVO pageReqVO,
+ HttpServletResponse response) throws IOException {
+ pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
+ List list = businessAssayReportDataService.getBusinessAssayReportDataPage(pageReqVO).getList();
+ // 导出 Excel
+ ExcelUtils.write(response, "检测报表数据业务.xls", "数据", BusinessAssayReportDataRespVO.class,
+ BeanUtils.toBean(list, BusinessAssayReportDataRespVO.class));
+ }
+
+ @GetMapping("/queryWaitingToAddData")
+ @Operation(summary = "待编制报表数据查询")
+ @Parameter(name = "mainId", description = "报告id", required = true, example = "1024")
+ public CommonResult> queryWaitingToAddData(BusinessAssayReportDataPageReqVO pageReqVO) {
+ PageResult page = businessAssayReportDataService.queryWaitingDataForReport(pageReqVO);
+
+ return success(BeanUtils.toBean(page, BusinessAssayReportDataRespVO.class));
+ }
+
+}
\ No newline at end of file
diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessAssayTaskController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessAssayTaskController.java
new file mode 100644
index 0000000..17c1b91
--- /dev/null
+++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessAssayTaskController.java
@@ -0,0 +1,117 @@
+package com.zt.plat.module.qms.business.bus.controller.admin;
+
+import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskExtendRespVO;
+import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskPageReqVO;
+import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskRespVO;
+import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskSaveReqVO;
+import org.springframework.web.bind.annotation.*;
+import jakarta.annotation.Resource;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.security.access.prepost.PreAuthorize;
+import com.zt.plat.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.*;
+import jakarta.servlet.http.*;
+import java.util.*;
+import java.io.IOException;
+
+import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
+import com.zt.plat.framework.common.pojo.PageParam;
+import com.zt.plat.framework.common.pojo.PageResult;
+import com.zt.plat.framework.common.pojo.CommonResult;
+import com.zt.plat.framework.common.util.object.BeanUtils;
+import static com.zt.plat.framework.common.pojo.CommonResult.success;
+
+import com.zt.plat.framework.excel.core.util.ExcelUtils;
+import com.zt.plat.module.qms.business.bus.controller.vo.*;
+import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO;
+import com.zt.plat.module.qms.business.bus.service.BusinessAssayTaskService;
+import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
+import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
+
+@Tag(name = "管理后台 - 检测任务分配业务")
+@RestController
+@RequestMapping("/qms/business-assay-task")
+@Validated
+public class BusinessAssayTaskController implements BusinessControllerMarker {
+
+
+ @Resource
+ private BusinessAssayTaskService businessAssayTaskService;
+
+ @PostMapping("/create")
+ @Operation(summary = "创建检测任务分配业务")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-task:create')")
+ public CommonResult createBusinessAssayTask(@Valid @RequestBody BusinessAssayTaskSaveReqVO createReqVO) {
+ return success(businessAssayTaskService.createBusinessAssayTask(createReqVO));
+ }
+
+ @PutMapping("/update")
+ @Operation(summary = "更新检测任务分配业务")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-task:update')")
+ public CommonResult updateBusinessAssayTask(@Valid @RequestBody BusinessAssayTaskSaveReqVO updateReqVO) {
+ businessAssayTaskService.updateBusinessAssayTask(updateReqVO);
+ return success(true);
+ }
+
+ @DeleteMapping("/delete")
+ @Operation(summary = "删除检测任务分配业务")
+ @Parameter(name = "id", description = "编号", required = true)
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-task:delete')")
+ public CommonResult deleteBusinessAssayTask(@RequestParam("id") Long id) {
+ businessAssayTaskService.deleteBusinessAssayTask(id);
+ return success(true);
+ }
+
+ @DeleteMapping("/delete-list")
+ @Parameter(name = "ids", description = "编号", required = true)
+ @Operation(summary = "批量删除检测任务分配业务")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-task:delete')")
+ public CommonResult deleteBusinessAssayTaskList(@RequestBody BatchDeleteReqVO req) {
+ businessAssayTaskService.deleteBusinessAssayTaskListByIds(req.getIds());
+ return success(true);
+ }
+
+ @GetMapping("/get")
+ @Operation(summary = "获得检测任务分配业务")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-task:query')")
+ public CommonResult getBusinessAssayTask(@RequestParam("id") Long id) {
+ BusinessAssayTaskExtendRespVO businessAssayTask = businessAssayTaskService.getBusinessAssayTask(id);
+ return success(businessAssayTask);
+ }
+
+ @GetMapping("/page")
+ @Operation(summary = "获得检测任务分配业务分页")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-task:query')")
+ public CommonResult> getBusinessAssayTaskPage(@Valid BusinessAssayTaskPageReqVO pageReqVO) {
+ PageResult pageResult = businessAssayTaskService.getBusinessAssayTaskPage(pageReqVO);
+ return success(pageResult);
+ }
+
+ @GetMapping("/list")
+ @Operation(summary = "获得检测任务分配业务分页")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-task:query')")
+ public CommonResult> getBusinessAssayTaskList(@Valid BusinessAssayTaskPageReqVO reqVO) {
+ List listResult = businessAssayTaskService.getBusinessAssayTaskList(reqVO);
+ return success(listResult);
+ }
+
+ @GetMapping("/export-excel")
+ @Operation(summary = "导出检测任务分配业务 Excel")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-task:export')")
+ @ApiAccessLog(operateType = EXPORT)
+ public void exportBusinessAssayTaskExcel(@Valid BusinessAssayTaskPageReqVO pageReqVO,
+ HttpServletResponse response) throws IOException {
+ pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
+ List list = businessAssayTaskService.getBusinessAssayTaskPage(pageReqVO).getList();
+ // 导出 Excel
+ ExcelUtils.write(response, "检测任务分配业务.xls", "数据", BusinessAssayTaskRespVO.class,
+ BeanUtils.toBean(list, BusinessAssayTaskRespVO.class));
+ }
+
+}
\ No newline at end of file
diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessAssayTaskDataController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessAssayTaskDataController.java
index 50c1237..a14ce69 100644
--- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessAssayTaskDataController.java
+++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/bus/controller/admin/BusinessAssayTaskDataController.java
@@ -1,5 +1,6 @@
package com.zt.plat.module.qms.business.bus.controller.admin;
+import com.zt.plat.module.qms.business.bus.controller.vo.*;
import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@@ -10,7 +11,6 @@ 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.*;
@@ -42,14 +42,14 @@ public class BusinessAssayTaskDataController implements BusinessControllerMarker
@PostMapping("/create")
@Operation(summary = "创建子样检测任务业务")
- @PreAuthorize("@ss.hasPermission('qms:business-assay-task-data:create')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-task-data:create')")
public CommonResult createBusinessAssayTaskData(@Valid @RequestBody BusinessAssayTaskDataSaveReqVO createReqVO) {
return success(businessAssayTaskDataService.createBusinessAssayTaskData(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新子样检测任务业务")
- @PreAuthorize("@ss.hasPermission('qms:business-assay-task-data:update')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-task-data:update')")
public CommonResult updateBusinessAssayTaskData(@Valid @RequestBody BusinessAssayTaskDataSaveReqVO updateReqVO) {
businessAssayTaskDataService.updateBusinessAssayTaskData(updateReqVO);
return success(true);
@@ -58,7 +58,7 @@ public class BusinessAssayTaskDataController implements BusinessControllerMarker
@DeleteMapping("/delete")
@Operation(summary = "删除子样检测任务业务")
@Parameter(name = "id", description = "编号", required = true)
- @PreAuthorize("@ss.hasPermission('qms:business-assay-task-data:delete')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-task-data:delete')")
public CommonResult deleteBusinessAssayTaskData(@RequestParam("id") Long id) {
businessAssayTaskDataService.deleteBusinessAssayTaskData(id);
return success(true);
@@ -67,7 +67,7 @@ public class BusinessAssayTaskDataController implements BusinessControllerMarker
@DeleteMapping("/delete-list")
@Parameter(name = "ids", description = "编号", required = true)
@Operation(summary = "批量删除子样检测任务业务")
- @PreAuthorize("@ss.hasPermission('qms:business-assay-task-data:delete')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-task-data:delete')")
public CommonResult deleteBusinessAssayTaskDataList(@RequestBody BatchDeleteReqVO req) {
businessAssayTaskDataService.deleteBusinessAssayTaskDataListByIds(req.getIds());
return success(true);
@@ -76,7 +76,7 @@ public class BusinessAssayTaskDataController implements BusinessControllerMarker
@GetMapping("/get")
@Operation(summary = "获得子样检测任务业务")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
- @PreAuthorize("@ss.hasPermission('qms:business-assay-task-data:query')")
+ //@PreAuthorize("@ss.hasPermission('qms:business-assay-task-data:query')")
public CommonResult getBusinessAssayTaskData(@RequestParam("id") Long id) {
BusinessAssayTaskDataDO businessAssayTaskData = businessAssayTaskDataService.getBusinessAssayTaskData(id);
return success(BeanUtils.toBean(businessAssayTaskData, BusinessAssayTaskDataRespVO.class));
@@ -84,15 +84,23 @@ public class BusinessAssayTaskDataController implements BusinessControllerMarker
@GetMapping("/getUnAssayTaskGroupList")
@Operation(summary = "获得未指派的子样检测任务业务分组列表")
- @PreAuthorize("@ss.hasPermission('qms:business-assay-task-data:query')")
- public CommonResult> getUnAssayTaskGroupList() {
- List