diff --git a/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/jybusiness/enums/ErrorCodeConstants.java b/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/jybusiness/enums/ErrorCodeConstants.java deleted file mode 100644 index 11c856e..0000000 --- a/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/jybusiness/enums/ErrorCodeConstants.java +++ /dev/null @@ -1,17 +0,0 @@ -package cn.iocoder.yudao.module.jybusiness.enums; - -import cn.iocoder.yudao.framework.common.exception.ErrorCode; - -/** - * jy-business 错误码枚举类 - * - * jy-business 系统,使用 1-xxx-xxx-xxx 段 - * - * @author ZT - */ -public interface ErrorCodeConstants { - - // ========== 示例模块 1-001-000-000 ========== - ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在"); - -} diff --git a/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/api/task/QmsApi.java b/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/api/task/QmsApi.java new file mode 100644 index 0000000..cfb36a0 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/api/task/QmsApi.java @@ -0,0 +1,24 @@ +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 cn.iocoder.yudao.module.qms.enums.ApiConstants; +import com.alibaba.fastjson.JSONObject; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +@FeignClient(name = ApiConstants.NAME, fallbackFactory = QmsApiFallback.class) +@Tag(name = "RPC 服务 - 检验检测") +public interface QmsApi { + + String PREFIX = ApiConstants.PREFIX + "/process-instance"; + + @PostMapping(PREFIX + "/updateQmdDataByWf") + @Operation(summary = "流程节点触发业务数据改变") + CommonResult bpmCallback(@Valid @RequestBody QmsBpmDTO reqDTO); + +} diff --git a/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/api/task/QmsApiFallback.java b/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/api/task/QmsApiFallback.java new file mode 100644 index 0000000..3448bbf --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/api/task/QmsApiFallback.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.qms.api.task; + +import lombok.Setter; +import lombok.extern.slf4j.Slf4j; +import org.springframework.cloud.openfeign.FallbackFactory; +import org.springframework.stereotype.Component; + +@Slf4j +@Component +public class QmsApiFallback implements FallbackFactory { + + @Setter private Throwable cause; + @Override + public QmsApi create(Throwable cause) { + log.error("QMS微服务接口调用失败:{}", cause.getMessage()); + return null; + } +} diff --git a/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/api/task/dto/QmsBpmDTO.java b/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/api/task/dto/QmsBpmDTO.java new file mode 100644 index 0000000..b2feb9e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/api/task/dto/QmsBpmDTO.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.qms.api.task.dto; + +import com.alibaba.fastjson.JSONObject; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Schema(description = "RPC 服务 - 流程回调 Request DTO") +@Data +@AllArgsConstructor +@NoArgsConstructor +public class QmsBpmDTO { + @Schema(description = "流程实例ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "流程实例ID不能为空") + private String processInstanceId; + + @Schema(description = "业务的唯一标识") + private String businessKey; + + @Schema(description = "传入数据", requiredMode = Schema.RequiredMode.REQUIRED) + private JSONObject variables; + + @Schema(description = "状态") + private String state; + + /* variables,传入业务类型 + { + "beanName": "dataFormService" + + } + * */ + +} diff --git a/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/enums/ApiConstants.java b/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/enums/ApiConstants.java new file mode 100644 index 0000000..b787f48 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/enums/ApiConstants.java @@ -0,0 +1,23 @@ +package cn.iocoder.yudao.module.qms.enums; + +import cn.iocoder.yudao.framework.common.enums.RpcConstants; + +/** + * API 相关的枚举 + * + * @author ZT + */ +public class ApiConstants { + + /** + * 服务名 + * + * 注意,需要保证和 spring.application.name 保持一致 + */ + public static final String NAME = "qms-server"; + + public static final String PREFIX = RpcConstants.RPC_API_PREFIX + "/qms"; + + public static final String VERSION = "1.0.0"; + +} diff --git a/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/enums/ErrorCodeConstants.java b/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/enums/ErrorCodeConstants.java new file mode 100644 index 0000000..72ead67 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/enums/ErrorCodeConstants.java @@ -0,0 +1,105 @@ +package cn.iocoder.yudao.module.qms.enums; + +import cn.iocoder.yudao.framework.common.exception.ErrorCode; + +/** + * ErrorCodeConstants + * 错误码枚举类 + * 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 ==================================*/ +} diff --git a/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/enums/QmsBpmConstant.java b/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/enums/QmsBpmConstant.java new file mode 100644 index 0000000..7b936b6 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-api/src/main/java/cn/iocoder/yudao/module/qms/enums/QmsBpmConstant.java @@ -0,0 +1,102 @@ +package cn.iocoder.yudao.module.qms.enums; + +public class QmsBpmConstant { + + /** + * 流程回调时使用的beanName Key + * */ + public static final String BPM_CALLBACK_BEAN_NAME = "bpmCallbackBean"; + + /** + * 流程回调时使用的beanName Key + * */ +// public static final String BPM_CALLBACK_BEAN_NAME = "bpmCallbackBean"; + + + /**========================以下代码从bmp模块复制,详见 BpmnVariableConstants类 ===================**/ + /** + * 流程实例的变量 - 状态 + * + */ + public static final String PROCESS_INSTANCE_VARIABLE_STATUS = "PROCESS_STATUS"; + /** + * 流程实例的变量 - 理由 + * + * 例如说:审批不通过的理由(目前审核通过暂时不会记录) + * + */ + public static final String PROCESS_INSTANCE_VARIABLE_REASON = "PROCESS_REASON"; + /** + * 流程实例的变量 - 发起用户选择的审批人 Map + * + * ProcessInstance#getProcessVariables() + * BpmTaskCandidateStrategyEnum#START_USER_SELECT + */ + public static final String PROCESS_INSTANCE_VARIABLE_START_USER_SELECT_ASSIGNEES = "PROCESS_START_USER_SELECT_ASSIGNEES"; + /** + * 流程实例的变量 - 审批人选择的审批人 Map + * + * ProcessInstance#getProcessVariables() + * BpmTaskCandidateStrategyEnum#APPROVE_USER_SELECT + */ + public static final String PROCESS_INSTANCE_VARIABLE_APPROVE_USER_SELECT_ASSIGNEES = "PROCESS_APPROVE_USER_SELECT_ASSIGNEES"; + /** + * 流程实例的变量 - 发起用户 ID + * + * ProcessInstance#getProcessVariables() + */ + public static final String PROCESS_INSTANCE_VARIABLE_START_USER_ID = "PROCESS_START_USER_ID"; + /** + * 流程实例的变量 - 用于判断流程实例变量节点是否驳回. 格式 RETURN_FLAG_{节点 id} + * + * 目的是:驳回到发起节点时,因为审批人与发起人相同,所以被自动通过。但是,此时还是希望不要自动通过 + * + * ProcessInstance#getProcessVariables() + */ + public static final String PROCESS_INSTANCE_VARIABLE_RETURN_FLAG = "RETURN_FLAG_%s"; + /** + * 流程实例的变量 - 是否跳过表达式 + * + * ProcessInstance#getProcessVariables() + * Flowable/Activiti之SkipExpression 完成自动审批 + */ + public static final String PROCESS_INSTANCE_SKIP_EXPRESSION_ENABLED = "_FLOWABLE_SKIP_EXPRESSION_ENABLED"; + + /** + * 流程实例的变量 - 用于判断流程是否需要跳过发起人节点 + * + * ProcessInstance#getProcessVariables() + */ + public static final String PROCESS_INSTANCE_VARIABLE_SKIP_START_USER_NODE = "PROCESS_SKIP_START_USER_NODE"; + + /** + * 流程实例的变量 - 流程开始时间 + * + * 【非存储变量】用于部分需要 format 的场景,例如说:流程实例的自定义标题 + */ + public static final String PROCESS_START_TIME = "PROCESS_START_TIME"; + /** + * 流程实例的变量 - 流程定义名称 + */ + public static final String PROCESS_DEFINITION_NAME = "PROCESS_DEFINITION_NAME"; + + /** + * 任务的变量 - 状态 + * + * org.flowable.task.api.Task#getTaskLocalVariables() + */ + public static final String TASK_VARIABLE_STATUS = "TASK_STATUS"; + /** + * 任务的变量 - 理由 + * + * 例如说:审批通过、不通过的理由 + * + * org.flowable.task.api.Task#getTaskLocalVariables() + */ + public static final String TASK_VARIABLE_REASON = "TASK_REASON"; + /** + * 任务变量 - 签名图片 URL + */ + public static final String TASK_SIGN_PIC_URL = "TASK_SIGN_PIC_URL"; + +} diff --git a/yudao-module-qms/yudao-module-qms-server/pom.xml b/yudao-module-qms/yudao-module-qms-server/pom.xml index bea9568..12ef488 100644 --- a/yudao-module-qms/yudao-module-qms-server/pom.xml +++ b/yudao-module-qms/yudao-module-qms-server/pom.xml @@ -14,9 +14,11 @@ ${project.artifactId} - JyBusiness 模块。 + QMS模块。 - + + 3.8.3.v20230112-RELEASE + @@ -116,6 +118,60 @@ yudao-spring-boot-starter-excel + + org.apache.commons + commons-text + 1.14.0 + + + + + cn.rubylong + gridreport + 20240506.RELEASE + + + + + com.yomahub + liteflow-spring-boot-starter + 2.15.0 + + + com.yomahub + liteflow-script-javax-pro + 2.15.0 + + + com.yomahub + liteflow-script-groovy + 2.15.0 + + + com.yomahub + liteflow-script-qlexpress + 2.15.0 + + + com.yomahub + liteflow-script-graaljs + 2.15.0 + + + + + org.apache.pdfbox + pdfbox + 2.0.33 + + + + + e-iceblue + spire.pdf.free + 9.13.0 + + cn.iocoder.cloud @@ -126,8 +182,28 @@ yudao-spring-boot-starter-biz-business ${revision} + + cn.iocoder.cloud + yudao-module-bpm-api + ${revision} + + + + + + + + + + + zzjc-release + Release Repository + https://mvn.will-way.cn/repository/zzjc-releases/ + + + ${project.artifactId} @@ -147,5 +223,4 @@ - diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/jybusiness/JyBusinessServerApplication.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/jybusiness/JyBusinessServerApplication.java deleted file mode 100644 index 8af808d..0000000 --- a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/jybusiness/JyBusinessServerApplication.java +++ /dev/null @@ -1,18 +0,0 @@ -package cn.iocoder.yudao.module.jybusiness; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * JyBusiness 模块的启动类 - * - * @author ZT - */ -//@SpringBootApplication -public class JyBusinessServerApplication { - - public static void main(String[] args) { - SpringApplication.run(JyBusinessServerApplication.class, args); - } - -} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/jybusiness/controller/admin/jybusiness/JyBusinessController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/jybusiness/controller/admin/jybusiness/JyBusinessController.java deleted file mode 100644 index ebafc19..0000000 --- a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/jybusiness/controller/admin/jybusiness/JyBusinessController.java +++ /dev/null @@ -1,29 +0,0 @@ -package cn.iocoder.yudao.module.jybusiness.controller.admin.jybusiness; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -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 static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -/** - * JyBusiness 控制器 - * - * @author ZT - */ -@Tag(name = "管理后台 - JyBusiness") -@RestController -@RequestMapping("/admin/jy-business/jy-business") -public class JyBusinessController { - - @GetMapping("/hello") - @Operation(summary = "Hello JyBusiness") - public CommonResult hello() { - return success("Hello, JyBusiness!"); - } - -} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/jybusiness/framework/rpc/config/RpcConfiguration.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/jybusiness/framework/rpc/config/RpcConfiguration.java deleted file mode 100644 index 384c6f1..0000000 --- a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/jybusiness/framework/rpc/config/RpcConfiguration.java +++ /dev/null @@ -1,10 +0,0 @@ -package cn.iocoder.yudao.module.jybusiness.framework.rpc.config; - -import cn.iocoder.yudao.module.system.api.dept.DeptApi; -import org.springframework.cloud.openfeign.EnableFeignClients; -import org.springframework.context.annotation.Configuration; - -@Configuration(value = "jybusinessRpcConfiguration", proxyBeanMethods = false) -@EnableFeignClients(clients = {DeptApi.class}) -public class RpcConfiguration { -} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/QmsServerApplication.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/QmsServerApplication.java new file mode 100644 index 0000000..4c6280f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/QmsServerApplication.java @@ -0,0 +1,16 @@ +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); + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/api/task/BMPCallbackInterface.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/api/task/BMPCallbackInterface.java new file mode 100644 index 0000000..2418c8f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/api/task/BMPCallbackInterface.java @@ -0,0 +1,12 @@ +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 callback(QmsBpmDTO reqDTO); + + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/api/task/QmsApiImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/api/task/QmsApiImpl.java new file mode 100644 index 0000000..f53aaf3 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/api/task/QmsApiImpl.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.qms.api.task; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.spring.SpringUtils; +import cn.iocoder.yudao.module.qms.api.task.dto.QmsBpmDTO; +import com.alibaba.fastjson.JSONObject; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RestController; + +import static cn.iocoder.yudao.module.qms.enums.QmsBpmConstant.BPM_CALLBACK_BEAN_NAME; + + +@RestController +@Validated +public class QmsApiImpl implements QmsApi{ + + @Override + public CommonResult bpmCallback(QmsBpmDTO reqDTO) { + JSONObject variables = reqDTO.getVariables(); + String beanName = variables.getString(BPM_CALLBACK_BEAN_NAME); + BMPCallbackInterface bean = SpringUtils.getBean(beanName); + return bean.callback(reqDTO); + } +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessAssayParameterDataController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessAssayParameterDataController.java new file mode 100644 index 0000000..1bc50fa --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessAssayParameterDataController.java @@ -0,0 +1,106 @@ +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.BusinessAssayParameterDataDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessAssayParameterDataService; +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-assay-parameter-data") +@Validated +public class BusinessAssayParameterDataController implements BusinessControllerMarker { + + + @Resource + private BusinessAssayParameterDataService businessAssayParameterDataService; + + @PostMapping("/create") + @Operation(summary = "创建检测参数数据业务") + @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')") + public CommonResult updateBusinessAssayParameterData(@Valid @RequestBody BusinessAssayParameterDataSaveReqVO updateReqVO) { + businessAssayParameterDataService.updateBusinessAssayParameterData(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检测参数数据业务") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-assay-parameter-data:delete')") + public CommonResult deleteBusinessAssayParameterData(@RequestParam("id") Long id) { + businessAssayParameterDataService.deleteBusinessAssayParameterData(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除检测参数数据业务") + @PreAuthorize("@ss.hasPermission('qms:business-assay-parameter-data:delete')") + public CommonResult deleteBusinessAssayParameterDataList(@RequestBody BatchDeleteReqVO req) { + businessAssayParameterDataService.deleteBusinessAssayParameterDataListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检测参数数据业务") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @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)); + } + + @GetMapping("/page") + @Operation(summary = "获得检测参数数据业务分页") + @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)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出检测参数数据业务 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-assay-parameter-data:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessAssayParameterDataExcel(@Valid BusinessAssayParameterDataPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessAssayParameterDataService.getBusinessAssayParameterDataPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检测参数数据业务.xls", "数据", BusinessAssayParameterDataRespVO.class, + BeanUtils.toBean(list, BusinessAssayParameterDataRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessAssayProjectDataController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessAssayProjectDataController.java new file mode 100644 index 0000000..4a75bc9 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessAssayProjectDataController.java @@ -0,0 +1,107 @@ +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.BusinessAssayProjectDataDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessAssayProjectDataService; +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-assay-project-data") +@Validated +public class BusinessAssayProjectDataController implements BusinessControllerMarker { + + + @Resource + private BusinessAssayProjectDataService businessAssayProjectDataService; + + @PostMapping("/create") + @Operation(summary = "创建检测项目数据业务") + @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')") + public CommonResult updateBusinessAssayProjectData(@Valid @RequestBody BusinessAssayProjectDataSaveReqVO updateReqVO) { + businessAssayProjectDataService.updateBusinessAssayProjectData(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检测项目数据业务") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-assay-project-data:delete')") + public CommonResult deleteBusinessAssayProjectData(@RequestParam("id") Long id) { + businessAssayProjectDataService.deleteBusinessAssayProjectData(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除检测项目数据业务") + @PreAuthorize("@ss.hasPermission('qms:business-assay-project-data:delete')") + public CommonResult deleteBusinessAssayProjectDataList(@RequestBody BatchDeleteReqVO req) { + businessAssayProjectDataService.deleteBusinessAssayProjectDataListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检测项目数据业务") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @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)); + } + + @GetMapping("/page") + @Operation(summary = "获得检测项目数据业务分页") + @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)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出检测项目数据业务 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-assay-project-data:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessAssayProjectDataExcel(@Valid BusinessAssayProjectDataPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessAssayProjectDataService.getBusinessAssayProjectDataPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检测项目数据业务.xls", "数据", BusinessAssayProjectDataRespVO.class, + BeanUtils.toBean(list, BusinessAssayProjectDataRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessAssayTaskDataController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessAssayTaskDataController.java new file mode 100644 index 0000000..d54f309 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessAssayTaskDataController.java @@ -0,0 +1,122 @@ +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.BusinessAssayTaskDataDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessAssayTaskDataService; +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-assay-task-data") +@Validated +public class BusinessAssayTaskDataController implements BusinessControllerMarker { + + + @Resource + private BusinessAssayTaskDataService businessAssayTaskDataService; + + @PostMapping("/create") + @Operation(summary = "创建子样检测任务业务") + @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')") + public CommonResult updateBusinessAssayTaskData(@Valid @RequestBody BusinessAssayTaskDataSaveReqVO updateReqVO) { + businessAssayTaskDataService.updateBusinessAssayTaskData(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除子样检测任务业务") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-assay-task-data:delete')") + public CommonResult deleteBusinessAssayTaskData(@RequestParam("id") Long id) { + businessAssayTaskDataService.deleteBusinessAssayTaskData(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除子样检测任务业务") + @PreAuthorize("@ss.hasPermission('qms:business-assay-task-data:delete')") + public CommonResult deleteBusinessAssayTaskDataList(@RequestBody BatchDeleteReqVO req) { + businessAssayTaskDataService.deleteBusinessAssayTaskDataListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得子样检测任务业务") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @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)); + } + + @GetMapping("/getUnAssayTaskGroupList") + @Operation(summary = "获得未指派的子样检测任务业务分组列表") + @PreAuthorize("@ss.hasPermission('qms:business-assay-task-data:query')") + public CommonResult getUnAssayTaskGroupList() { + List> list = businessAssayTaskDataService.getUnAssayTaskGroupList(); + return success(list); + } + + @GetMapping("/list") + @Operation(summary = "获得子样检测任务业务列表") + @PreAuthorize("@ss.hasPermission('qms:business-assay-task-data:query')") + public CommonResult> getBusinessAssayTaskDataPage(@Valid BusinessAssayTaskDataReqVO reqVO) { + List listResult = businessAssayTaskDataService.getBusinessAssayTaskDataList(reqVO); + return success(listResult); + } + + @GetMapping("/page") + @Operation(summary = "获得子样检测任务业务分页") + @PreAuthorize("@ss.hasPermission('qms:business-assay-task-data:query')") + public CommonResult> getBusinessAssayTaskDataPage(@Valid BusinessAssayTaskDataPageReqVO pageReqVO) { + PageResult pageResult = businessAssayTaskDataService.getBusinessAssayTaskDataPage(pageReqVO); + return success(pageResult); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出子样检测任务业务 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-assay-task-data:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessAssayTaskDataExcel(@Valid BusinessAssayTaskDataPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessAssayTaskDataService.getBusinessAssayTaskDataPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "子样检测任务业务.xls", "数据", BusinessAssayTaskDataRespVO.class, + BeanUtils.toBean(list, BusinessAssayTaskDataRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessBaseSampleController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessBaseSampleController.java new file mode 100644 index 0000000..6d6df32 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessBaseSampleController.java @@ -0,0 +1,106 @@ +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.BusinessBaseSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessBaseSampleService; +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-base-sample") +@Validated +public class BusinessBaseSampleController implements BusinessControllerMarker { + + + @Resource + private BusinessBaseSampleService businessBaseSampleService; + + @PostMapping("/create") + @Operation(summary = "创建主样业务") + @PreAuthorize("@ss.hasPermission('qms:business-base-sample:create')") + public CommonResult createBusinessBaseSample(@Valid @RequestBody BusinessBaseSampleSaveReqVO createReqVO) { + return success(businessBaseSampleService.createBusinessBaseSample(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新主样业务") + @PreAuthorize("@ss.hasPermission('qms:business-base-sample:update')") + public CommonResult updateBusinessBaseSample(@Valid @RequestBody BusinessBaseSampleSaveReqVO updateReqVO) { + businessBaseSampleService.updateBusinessBaseSample(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除主样业务") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-base-sample:delete')") + public CommonResult deleteBusinessBaseSample(@RequestParam("id") Long id) { + businessBaseSampleService.deleteBusinessBaseSample(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除主样业务") + @PreAuthorize("@ss.hasPermission('qms:business-base-sample:delete')") + public CommonResult deleteBusinessBaseSampleList(@RequestBody BatchDeleteReqVO req) { + businessBaseSampleService.deleteBusinessBaseSampleListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得主样业务") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:business-base-sample:query')") + public CommonResult getBusinessBaseSample(@RequestParam("id") Long id) { + BusinessBaseSampleDO businessBaseSample = businessBaseSampleService.getBusinessBaseSample(id); + return success(BeanUtils.toBean(businessBaseSample, BusinessBaseSampleRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得主样业务分页") + @PreAuthorize("@ss.hasPermission('qms:business-base-sample:query')") + public CommonResult> getBusinessBaseSamplePage(@Valid BusinessBaseSamplePageReqVO pageReqVO) { + PageResult pageResult = businessBaseSampleService.getBusinessBaseSamplePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BusinessBaseSampleRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出主样业务 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-base-sample:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessBaseSampleExcel(@Valid BusinessBaseSamplePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessBaseSampleService.getBusinessBaseSamplePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "主样业务.xls", "数据", BusinessBaseSampleRespVO.class, + BeanUtils.toBean(list, BusinessBaseSampleRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessHandoverRecordSubController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessHandoverRecordSubController.java new file mode 100644 index 0000000..55f52b3 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessHandoverRecordSubController.java @@ -0,0 +1,106 @@ +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.BusinessHandoverRecordSubDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessHandoverRecordSubService; +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-handover-record-sub") +@Validated +public class BusinessHandoverRecordSubController implements BusinessControllerMarker { + + + @Resource + private BusinessHandoverRecordSubService businessHandoverRecordSubService; + + @PostMapping("/create") + @Operation(summary = "创建子样交接记录业务") + @PreAuthorize("@ss.hasPermission('qms:business-handover-record-sub:create')") + public CommonResult createBusinessHandoverRecordSub(@Valid @RequestBody BusinessHandoverRecordSubSaveReqVO createReqVO) { + return success(businessHandoverRecordSubService.createBusinessHandoverRecordSub(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新子样交接记录业务") + @PreAuthorize("@ss.hasPermission('qms:business-handover-record-sub:update')") + public CommonResult updateBusinessHandoverRecordSub(@Valid @RequestBody BusinessHandoverRecordSubSaveReqVO updateReqVO) { + businessHandoverRecordSubService.updateBusinessHandoverRecordSub(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除子样交接记录业务") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-handover-record-sub:delete')") + public CommonResult deleteBusinessHandoverRecordSub(@RequestParam("id") Long id) { + businessHandoverRecordSubService.deleteBusinessHandoverRecordSub(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除子样交接记录业务") + @PreAuthorize("@ss.hasPermission('qms:business-handover-record-sub:delete')") + public CommonResult deleteBusinessHandoverRecordSubList(@RequestBody BatchDeleteReqVO req) { + businessHandoverRecordSubService.deleteBusinessHandoverRecordSubListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得子样交接记录业务") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:business-handover-record-sub:query')") + public CommonResult getBusinessHandoverRecordSub(@RequestParam("id") Long id) { + BusinessHandoverRecordSubDO businessHandoverRecordSub = businessHandoverRecordSubService.getBusinessHandoverRecordSub(id); + return success(BeanUtils.toBean(businessHandoverRecordSub, BusinessHandoverRecordSubRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得子样交接记录业务分页") + @PreAuthorize("@ss.hasPermission('qms:business-handover-record-sub:query')") + public CommonResult> getBusinessHandoverRecordSubPage(@Valid BusinessHandoverRecordSubPageReqVO pageReqVO) { + PageResult pageResult = businessHandoverRecordSubService.getBusinessHandoverRecordSubPage(pageReqVO); + return success(pageResult); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出子样交接记录业务 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-handover-record-sub:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessHandoverRecordSubExcel(@Valid BusinessHandoverRecordSubPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessHandoverRecordSubService.getBusinessHandoverRecordSubPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "子样交接记录业务.xls", "数据", BusinessHandoverRecordSubRespVO.class, + BeanUtils.toBean(list, BusinessHandoverRecordSubRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleAssayResultController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleAssayResultController.java new file mode 100644 index 0000000..c4afd25 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleAssayResultController.java @@ -0,0 +1,106 @@ +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.BusinessSampleAssayResultDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessSampleAssayResultService; +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-sample-assay-result") +@Validated +public class BusinessSampleAssayResultController implements BusinessControllerMarker { + + + @Resource + private BusinessSampleAssayResultService businessSampleAssayResultService; + + @PostMapping("/create") + @Operation(summary = "创建委检登记来样品位") + @PreAuthorize("@ss.hasPermission('qms:business-sample-assay-result:create')") + public CommonResult createBusinessSampleAssayResult(@Valid @RequestBody BusinessSampleAssayResultSaveReqVO createReqVO) { + return success(businessSampleAssayResultService.createBusinessSampleAssayResult(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新委检登记来样品位") + @PreAuthorize("@ss.hasPermission('qms:business-sample-assay-result:update')") + public CommonResult updateBusinessSampleAssayResult(@Valid @RequestBody BusinessSampleAssayResultSaveReqVO updateReqVO) { + businessSampleAssayResultService.updateBusinessSampleAssayResult(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除委检登记来样品位") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-sample-assay-result:delete')") + public CommonResult deleteBusinessSampleAssayResult(@RequestParam("id") Long id) { + businessSampleAssayResultService.deleteBusinessSampleAssayResult(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除委检登记来样品位") + @PreAuthorize("@ss.hasPermission('qms:business-sample-assay-result:delete')") + public CommonResult deleteBusinessSampleAssayResultList(@RequestBody BatchDeleteReqVO req) { + businessSampleAssayResultService.deleteBusinessSampleAssayResultListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得委检登记来样品位") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:business-sample-assay-result:query')") + public CommonResult getBusinessSampleAssayResult(@RequestParam("id") Long id) { + BusinessSampleAssayResultDO businessSampleAssayResult = businessSampleAssayResultService.getBusinessSampleAssayResult(id); + return success(BeanUtils.toBean(businessSampleAssayResult, BusinessSampleAssayResultRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得委检登记来样品位分页") + @PreAuthorize("@ss.hasPermission('qms:business-sample-assay-result:query')") + public CommonResult> getBusinessSampleAssayResultPage(@Valid BusinessSampleAssayResultPageReqVO pageReqVO) { + PageResult pageResult = businessSampleAssayResultService.getBusinessSampleAssayResultPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BusinessSampleAssayResultRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出委检登记来样品位 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-sample-assay-result:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessSampleAssayResultExcel(@Valid BusinessSampleAssayResultPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessSampleAssayResultService.getBusinessSampleAssayResultPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "委检登记来样品位.xls", "数据", BusinessSampleAssayResultRespVO.class, + BeanUtils.toBean(list, BusinessSampleAssayResultRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustDetailController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustDetailController.java new file mode 100644 index 0000000..5e6a383 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustDetailController.java @@ -0,0 +1,108 @@ +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.BusinessSampleEntrustDetailDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessSampleEntrustDetailService; +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-sample-entrust-detail") +@Validated +public class BusinessSampleEntrustDetailController implements BusinessControllerMarker { + + + @Resource + private BusinessSampleEntrustDetailService businessSampleEntrustDetailService; + + @PostMapping("/create") + @Operation(summary = "创建委检登记样品明细") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-detail:create')") + public CommonResult createBusinessSampleEntrustDetail(@Valid @RequestBody BusinessSampleEntrustDetailSaveReqVO createReqVO) { + return success(businessSampleEntrustDetailService.createBusinessSampleEntrustDetail(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新委检登记样品明细") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-detail:update')") + public CommonResult updateBusinessSampleEntrustDetail(@Valid @RequestBody BusinessSampleEntrustDetailSaveReqVO updateReqVO) { + businessSampleEntrustDetailService.updateBusinessSampleEntrustDetail(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除委检登记样品明细") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-detail:delete')") + public CommonResult deleteBusinessSampleEntrustDetail(@RequestParam("id") Long id) { + businessSampleEntrustDetailService.deleteBusinessSampleEntrustDetail(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除委检登记样品明细") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-detail:delete')") + public CommonResult deleteBusinessSampleEntrustDetailList(@RequestBody BatchDeleteReqVO req) { + businessSampleEntrustDetailService.deleteBusinessSampleEntrustDetailListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得委检登记样品明细") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-detail:query')") + public CommonResult getBusinessSampleEntrustDetail(@RequestParam("id") Long id) { + BusinessSampleEntrustDetailDO businessSampleEntrustDetail = businessSampleEntrustDetailService.getBusinessSampleEntrustDetail(id); + return success(BeanUtils.toBean(businessSampleEntrustDetail, BusinessSampleEntrustDetailRespVO.class)); + } + + + + @GetMapping("/page") + @Operation(summary = "获得委检登记样品明细分页") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-detail:query')") + public CommonResult> getBusinessSampleEntrustDetailPage(@Valid BusinessSampleEntrustDetailPageReqVO pageReqVO) { + PageResult pageResult = businessSampleEntrustDetailService.getBusinessSampleEntrustDetailPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BusinessSampleEntrustDetailRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出委检登记样品明细 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-detail:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessSampleEntrustDetailExcel(@Valid BusinessSampleEntrustDetailPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessSampleEntrustDetailService.getBusinessSampleEntrustDetailPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "委检登记样品明细.xls", "数据", BusinessSampleEntrustDetailRespVO.class, + BeanUtils.toBean(list, BusinessSampleEntrustDetailRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustProjectController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustProjectController.java new file mode 100644 index 0000000..5454121 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustProjectController.java @@ -0,0 +1,106 @@ +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.BusinessSampleEntrustProjectDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessSampleEntrustProjectService; +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-sample-entrust-project") +@Validated +public class BusinessSampleEntrustProjectController implements BusinessControllerMarker { + + + @Resource + private BusinessSampleEntrustProjectService businessSampleEntrustProjectService; + + @PostMapping("/create") + @Operation(summary = "创建委检样品检测项目业务") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-project:create')") + public CommonResult createBusinessSampleEntrustProject(@Valid @RequestBody BusinessSampleEntrustProjectSaveReqVO createReqVO) { + return success(businessSampleEntrustProjectService.createBusinessSampleEntrustProject(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新委检样品检测项目业务") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-project:update')") + public CommonResult updateBusinessSampleEntrustProject(@Valid @RequestBody BusinessSampleEntrustProjectSaveReqVO updateReqVO) { + businessSampleEntrustProjectService.updateBusinessSampleEntrustProject(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除委检样品检测项目业务") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-project:delete')") + public CommonResult deleteBusinessSampleEntrustProject(@RequestParam("id") Long id) { + businessSampleEntrustProjectService.deleteBusinessSampleEntrustProject(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除委检样品检测项目业务") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-project:delete')") + public CommonResult deleteBusinessSampleEntrustProjectList(@RequestBody BatchDeleteReqVO req) { + businessSampleEntrustProjectService.deleteBusinessSampleEntrustProjectListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得委检样品检测项目业务") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-project:query')") + public CommonResult getBusinessSampleEntrustProject(@RequestParam("id") Long id) { + BusinessSampleEntrustProjectDO businessSampleEntrustProject = businessSampleEntrustProjectService.getBusinessSampleEntrustProject(id); + return success(BeanUtils.toBean(businessSampleEntrustProject, BusinessSampleEntrustProjectRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得委检样品检测项目业务分页") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-project:query')") + public CommonResult> getBusinessSampleEntrustProjectPage(@Valid BusinessSampleEntrustProjectPageReqVO pageReqVO) { + PageResult pageResult = businessSampleEntrustProjectService.getBusinessSampleEntrustProjectPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BusinessSampleEntrustProjectRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出委检样品检测项目业务 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-project:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessSampleEntrustProjectExcel(@Valid BusinessSampleEntrustProjectPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessSampleEntrustProjectService.getBusinessSampleEntrustProjectPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "委检样品检测项目业务.xls", "数据", BusinessSampleEntrustProjectRespVO.class, + BeanUtils.toBean(list, BusinessSampleEntrustProjectRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustRegistrationController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustRegistrationController.java new file mode 100644 index 0000000..80b28d0 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleEntrustRegistrationController.java @@ -0,0 +1,107 @@ +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.BusinessSampleEntrustRegistrationDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessSampleEntrustRegistrationService; +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-sample-entrust-registration") +@Validated +public class BusinessSampleEntrustRegistrationController implements BusinessControllerMarker { + + + @Resource + private BusinessSampleEntrustRegistrationService businessSampleEntrustRegistrationService; + + @PostMapping("/create") + @Operation(summary = "创建委检登记业务") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-registration:create')") + public CommonResult createBusinessSampleEntrustRegistration(@Valid @RequestBody BusinessSampleEntrustRegistrationSaveReqVO createReqVO) { + return success(businessSampleEntrustRegistrationService.createBusinessSampleEntrustRegistration(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新委检登记业务") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-registration:update')") + public CommonResult updateBusinessSampleEntrustRegistration(@Valid @RequestBody BusinessSampleEntrustRegistrationSaveReqVO updateReqVO) { + businessSampleEntrustRegistrationService.updateBusinessSampleEntrustRegistration(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除委检登记业务") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-registration:delete')") + public CommonResult deleteBusinessSampleEntrustRegistration(@RequestParam("id") Long id) { + businessSampleEntrustRegistrationService.deleteBusinessSampleEntrustRegistration(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除委检登记业务") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-registration:delete')") + public CommonResult deleteBusinessSampleEntrustRegistrationList(@RequestBody BatchDeleteReqVO req) { + businessSampleEntrustRegistrationService.deleteBusinessSampleEntrustRegistrationListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得委检登记业务") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-registration:query')") + public CommonResult getBusinessSampleEntrustRegistration(@RequestParam("id") Long id) { + BusinessSampleEntrustRegistrationDO businessSampleEntrustRegistration = businessSampleEntrustRegistrationService.getBusinessSampleEntrustRegistration(id); + return success(BeanUtils.toBean(businessSampleEntrustRegistration, BusinessSampleEntrustRegistrationRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得委检登记业务分页") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-registration:query')") + public CommonResult> getBusinessSampleEntrustRegistrationPage(@Valid BusinessSampleEntrustRegistrationPageReqVO pageReqVO) { + PageResult pageResult = businessSampleEntrustRegistrationService.getBusinessSampleEntrustRegistrationPage(pageReqVO); + return success(pageResult); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出委检登记业务 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-sample-entrust-registration:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessSampleEntrustRegistrationExcel(@Valid BusinessSampleEntrustRegistrationPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessSampleEntrustRegistrationService.getBusinessSampleEntrustRegistrationPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "委检登记业务.xls", "数据", BusinessSampleEntrustRegistrationRespVO.class, + BeanUtils.toBean(list, BusinessSampleEntrustRegistrationRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleHandoverController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleHandoverController.java new file mode 100644 index 0000000..d0f5464 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleHandoverController.java @@ -0,0 +1,106 @@ +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.BusinessSampleHandoverDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessSampleHandoverService; +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-sample-handover") +@Validated +public class BusinessSampleHandoverController implements BusinessControllerMarker { + + + @Resource + private BusinessSampleHandoverService businessSampleHandoverService; + + @PostMapping("/create") + @Operation(summary = "创建样品交接单业务") + @PreAuthorize("@ss.hasPermission('qms:business-sample-handover:create')") + public CommonResult createBusinessSampleHandover(@Valid @RequestBody BusinessSampleHandoverSaveReqVO createReqVO) { + return success(businessSampleHandoverService.createBusinessSampleHandover(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新样品交接单业务") + @PreAuthorize("@ss.hasPermission('qms:business-sample-handover:update')") + public CommonResult updateBusinessSampleHandover(@Valid @RequestBody BusinessSampleHandoverSaveReqVO updateReqVO) { + businessSampleHandoverService.updateBusinessSampleHandover(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除样品交接单业务") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-sample-handover:delete')") + public CommonResult deleteBusinessSampleHandover(@RequestParam("id") Long id) { + businessSampleHandoverService.deleteBusinessSampleHandover(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除样品交接单业务") + @PreAuthorize("@ss.hasPermission('qms:business-sample-handover:delete')") + public CommonResult deleteBusinessSampleHandoverList(@RequestBody BatchDeleteReqVO req) { + businessSampleHandoverService.deleteBusinessSampleHandoverListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得样品交接单业务") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:business-sample-handover:query')") + public CommonResult getBusinessSampleHandover(@RequestParam("id") Long id) { + BusinessSampleHandoverDO businessSampleHandover = businessSampleHandoverService.getBusinessSampleHandover(id); + return success(BeanUtils.toBean(businessSampleHandover, BusinessSampleHandoverRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得样品交接单业务分页") + @PreAuthorize("@ss.hasPermission('qms:business-sample-handover:query')") + public CommonResult> getBusinessSampleHandoverPage(@Valid BusinessSampleHandoverPageReqVO pageReqVO) { + PageResult pageResult = businessSampleHandoverService.getBusinessSampleHandoverPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BusinessSampleHandoverRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出样品交接单业务 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-sample-handover:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessSampleHandoverExcel(@Valid BusinessSampleHandoverPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessSampleHandoverService.getBusinessSampleHandoverPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "样品交接单业务.xls", "数据", BusinessSampleHandoverRespVO.class, + BeanUtils.toBean(list, BusinessSampleHandoverRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleHandoverDetailController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleHandoverDetailController.java new file mode 100644 index 0000000..a7cf952 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSampleHandoverDetailController.java @@ -0,0 +1,106 @@ +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.BusinessSampleHandoverDetailDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessSampleHandoverDetailService; +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-sample-handover-detail") +@Validated +public class BusinessSampleHandoverDetailController implements BusinessControllerMarker { + + + @Resource + private BusinessSampleHandoverDetailService businessSampleHandoverDetailService; + + @PostMapping("/create") + @Operation(summary = "创建样品交接明细") + @PreAuthorize("@ss.hasPermission('qms:business-sample-handover-detail:create')") + public CommonResult createBusinessSampleHandoverDetail(@Valid @RequestBody BusinessSampleHandoverDetailSaveReqVO createReqVO) { + return success(businessSampleHandoverDetailService.createBusinessSampleHandoverDetail(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新样品交接明细") + @PreAuthorize("@ss.hasPermission('qms:business-sample-handover-detail:update')") + public CommonResult updateBusinessSampleHandoverDetail(@Valid @RequestBody BusinessSampleHandoverDetailSaveReqVO updateReqVO) { + businessSampleHandoverDetailService.updateBusinessSampleHandoverDetail(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除样品交接明细") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-sample-handover-detail:delete')") + public CommonResult deleteBusinessSampleHandoverDetail(@RequestParam("id") Long id) { + businessSampleHandoverDetailService.deleteBusinessSampleHandoverDetail(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除样品交接明细") + @PreAuthorize("@ss.hasPermission('qms:business-sample-handover-detail:delete')") + public CommonResult deleteBusinessSampleHandoverDetailList(@RequestBody BatchDeleteReqVO req) { + businessSampleHandoverDetailService.deleteBusinessSampleHandoverDetailListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得样品交接明细") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:business-sample-handover-detail:query')") + public CommonResult getBusinessSampleHandoverDetail(@RequestParam("id") Long id) { + BusinessSampleHandoverDetailDO businessSampleHandoverDetail = businessSampleHandoverDetailService.getBusinessSampleHandoverDetail(id); + return success(BeanUtils.toBean(businessSampleHandoverDetail, BusinessSampleHandoverDetailRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得样品交接明细分页") + @PreAuthorize("@ss.hasPermission('qms:business-sample-handover-detail:query')") + public CommonResult> getBusinessSampleHandoverDetailPage(@Valid BusinessSampleHandoverDetailPageReqVO pageReqVO) { + PageResult pageResult = businessSampleHandoverDetailService.getBusinessSampleHandoverDetailPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BusinessSampleHandoverDetailRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出样品交接明细 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-sample-handover-detail:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessSampleHandoverDetailExcel(@Valid BusinessSampleHandoverDetailPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessSampleHandoverDetailService.getBusinessSampleHandoverDetailPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "样品交接明细.xls", "数据", BusinessSampleHandoverDetailRespVO.class, + BeanUtils.toBean(list, BusinessSampleHandoverDetailRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSubParentSampleController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSubParentSampleController.java new file mode 100644 index 0000000..7e1691a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSubParentSampleController.java @@ -0,0 +1,106 @@ +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.BusinessSubParentSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessSubParentSampleService; +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-parent-sample") +@Validated +public class BusinessSubParentSampleController implements BusinessControllerMarker { + + + @Resource + private BusinessSubParentSampleService businessSubParentSampleService; + + @PostMapping("/create") + @Operation(summary = "创建分样业务") + @PreAuthorize("@ss.hasPermission('qms:business-sub-parent-sample:create')") + public CommonResult createBusinessSubParentSample(@Valid @RequestBody BusinessSubParentSampleSaveReqVO createReqVO) { + return success(businessSubParentSampleService.createBusinessSubParentSample(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新分样业务") + @PreAuthorize("@ss.hasPermission('qms:business-sub-parent-sample:update')") + public CommonResult updateBusinessSubParentSample(@Valid @RequestBody BusinessSubParentSampleSaveReqVO updateReqVO) { + businessSubParentSampleService.updateBusinessSubParentSample(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除分样业务") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-sub-parent-sample:delete')") + public CommonResult deleteBusinessSubParentSample(@RequestParam("id") Long id) { + businessSubParentSampleService.deleteBusinessSubParentSample(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除分样业务") + @PreAuthorize("@ss.hasPermission('qms:business-sub-parent-sample:delete')") + public CommonResult deleteBusinessSubParentSampleList(@RequestBody BatchDeleteReqVO req) { + businessSubParentSampleService.deleteBusinessSubParentSampleListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得分样业务") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:business-sub-parent-sample:query')") + public CommonResult getBusinessSubParentSample(@RequestParam("id") Long id) { + BusinessSubParentSampleDO businessSubParentSample = businessSubParentSampleService.getBusinessSubParentSample(id); + return success(BeanUtils.toBean(businessSubParentSample, BusinessSubParentSampleRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得分样业务分页") + @PreAuthorize("@ss.hasPermission('qms:business-sub-parent-sample:query')") + public CommonResult> getBusinessSubParentSamplePage(@Valid BusinessSubParentSamplePageReqVO pageReqVO) { + PageResult pageResult = businessSubParentSampleService.getBusinessSubParentSamplePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BusinessSubParentSampleRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出分样业务 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-sub-parent-sample:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessSubParentSampleExcel(@Valid BusinessSubParentSamplePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessSubParentSampleService.getBusinessSubParentSamplePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "分样业务.xls", "数据", BusinessSubParentSampleRespVO.class, + BeanUtils.toBean(list, BusinessSubParentSampleRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSubSampleAssessmentController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSubSampleAssessmentController.java new file mode 100644 index 0000000..5e44c4e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSubSampleAssessmentController.java @@ -0,0 +1,106 @@ +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.BusinessSubSampleAssessmentDO; +import cn.iocoder.yudao.module.qms.business.bus.service.BusinessSubSampleAssessmentService; +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-assessment") +@Validated +public class BusinessSubSampleAssessmentController implements BusinessControllerMarker { + + + @Resource + private BusinessSubSampleAssessmentService businessSubSampleAssessmentService; + + @PostMapping("/create") + @Operation(summary = "创建子样判定数据业务") + @PreAuthorize("@ss.hasPermission('qms:business-sub-sample-assessment:create')") + public CommonResult createBusinessSubSampleAssessment(@Valid @RequestBody BusinessSubSampleAssessmentSaveReqVO createReqVO) { + return success(businessSubSampleAssessmentService.createBusinessSubSampleAssessment(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新子样判定数据业务") + @PreAuthorize("@ss.hasPermission('qms:business-sub-sample-assessment:update')") + public CommonResult updateBusinessSubSampleAssessment(@Valid @RequestBody BusinessSubSampleAssessmentSaveReqVO updateReqVO) { + businessSubSampleAssessmentService.updateBusinessSubSampleAssessment(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除子样判定数据业务") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:business-sub-sample-assessment:delete')") + public CommonResult deleteBusinessSubSampleAssessment(@RequestParam("id") Long id) { + businessSubSampleAssessmentService.deleteBusinessSubSampleAssessment(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除子样判定数据业务") + @PreAuthorize("@ss.hasPermission('qms:business-sub-sample-assessment:delete')") + public CommonResult deleteBusinessSubSampleAssessmentList(@RequestBody BatchDeleteReqVO req) { + businessSubSampleAssessmentService.deleteBusinessSubSampleAssessmentListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得子样判定数据业务") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:business-sub-sample-assessment:query')") + public CommonResult getBusinessSubSampleAssessment(@RequestParam("id") Long id) { + BusinessSubSampleAssessmentDO businessSubSampleAssessment = businessSubSampleAssessmentService.getBusinessSubSampleAssessment(id); + return success(BeanUtils.toBean(businessSubSampleAssessment, BusinessSubSampleAssessmentRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得子样判定数据业务分页") + @PreAuthorize("@ss.hasPermission('qms:business-sub-sample-assessment:query')") + public CommonResult> getBusinessSubSampleAssessmentPage(@Valid BusinessSubSampleAssessmentPageReqVO pageReqVO) { + PageResult pageResult = businessSubSampleAssessmentService.getBusinessSubSampleAssessmentPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BusinessSubSampleAssessmentRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出子样判定数据业务 Excel") + @PreAuthorize("@ss.hasPermission('qms:business-sub-sample-assessment:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBusinessSubSampleAssessmentExcel(@Valid BusinessSubSampleAssessmentPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = businessSubSampleAssessmentService.getBusinessSubSampleAssessmentPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "子样判定数据业务.xls", "数据", BusinessSubSampleAssessmentRespVO.class, + BeanUtils.toBean(list, BusinessSubSampleAssessmentRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSubSampleController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSubSampleController.java new file mode 100644 index 0000000..96775af --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/BusinessSubSampleController.java @@ -0,0 +1,121 @@ +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 createBusinessSubSample(@Valid @RequestBody BusinessSubSampleSaveReqVO createReqVO) { + return success(businessSubSampleService.createBusinessSubSample(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新子样业务") + @PreAuthorize("@ss.hasPermission('qms:business-sub-sample:update')") + public CommonResult 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 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 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 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 listResult = businessSubSampleService.getBusinessSubSampleList(reqVO); + return success(listResult); + } + + @GetMapping("/page") + @Operation(summary = "获得子样业务分页") + @PreAuthorize("@ss.hasPermission('qms:business-sub-sample:query')") + public CommonResult> getBusinessSubSamplePage(@Valid BusinessSubSamplePageReqVO pageReqVO) { + PageResult 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 list = businessSubSampleService.getBusinessSubSamplePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "子样业务.xls", "数据", BusinessSubSampleRespVO.class, + BeanUtils.toBean(list, BusinessSubSampleRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/SampleEntrustController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/SampleEntrustController.java new file mode 100644 index 0000000..8dc7ad1 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/SampleEntrustController.java @@ -0,0 +1,173 @@ +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 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 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 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 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 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()); + } +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/SampleFlowController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/SampleFlowController.java new file mode 100644 index 0000000..be4fc5d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/admin/SampleFlowController.java @@ -0,0 +1,50 @@ +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)); + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayParameterDataPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayParameterDataPageReqVO.java new file mode 100644 index 0000000..0644860 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayParameterDataPageReqVO.java @@ -0,0 +1,47 @@ +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 BusinessAssayParameterDataPageReqVO extends PageParam { + + @Schema(description = "检测项目业务ID", example = "31068") + private Long businessAssayProjectDataId; + + @Schema(description = "检测方法分析项目参数配置表ID", example = "10849") + private Long configAssayMethodProjectParameterId; + + @Schema(description = "参数ID,字典表【T_DIC_PRM】", example = "25302") + private Long dictionaryParameterId; + + @Schema(description = "参数值") + private String value; + + @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 systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "乐观锁", example = "7696") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayParameterDataRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayParameterDataRespVO.java new file mode 100644 index 0000000..0b29270 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayParameterDataRespVO.java @@ -0,0 +1,59 @@ +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 BusinessAssayParameterDataRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15246") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "检测项目业务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31068") + @ExcelProperty("检测项目业务ID") + private Long businessAssayProjectDataId; + + @Schema(description = "检测方法分析项目参数配置表ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10849") + @ExcelProperty("检测方法分析项目参数配置表ID") + private Long configAssayMethodProjectParameterId; + + @Schema(description = "参数ID,字典表【T_DIC_PRM】", requiredMode = Schema.RequiredMode.REQUIRED, example = "25302") + @ExcelProperty("参数ID,字典表【T_DIC_PRM】") + private Long dictionaryParameterId; + + @Schema(description = "参数值") + @ExcelProperty("参数值") + private String value; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("数据类型,【字典】【jy_sample_data_type】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间") + private String dataType; + + @Schema(description = "小数位") + @ExcelProperty("小数位") + private Integer decimalPosition; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "7696") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayParameterDataSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayParameterDataSaveReqVO.java new file mode 100644 index 0000000..b2fad14 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayParameterDataSaveReqVO.java @@ -0,0 +1,48 @@ +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.*; + +@Schema(description = "管理后台 - 检测参数数据业务新增/修改 Request VO") +@Data +public class BusinessAssayParameterDataSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15246") + private Long id; + + @Schema(description = "检测项目业务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31068") + @NotNull(message = "检测项目业务ID不能为空") + private Long businessAssayProjectDataId; + + @Schema(description = "检测方法分析项目参数配置表ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10849") + @NotNull(message = "检测方法分析项目参数配置表ID不能为空") + private Long configAssayMethodProjectParameterId; + + @Schema(description = "参数ID,字典表【T_DIC_PRM】", requiredMode = Schema.RequiredMode.REQUIRED, example = "25302") + @NotNull(message = "参数ID,字典表【T_DIC_PRM】不能为空") + private Long dictionaryParameterId; + + @Schema(description = "参数值") + private String value; + + @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 = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "7696") + @NotNull(message = "乐观锁不能为空") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayProjectDataPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayProjectDataPageReqVO.java new file mode 100644 index 0000000..521cf77 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayProjectDataPageReqVO.java @@ -0,0 +1,53 @@ +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 BusinessAssayProjectDataPageReqVO extends PageParam { + + @Schema(description = "检测任务ID", example = "16505") + private Long businessAssayTaskDataId; + + @Schema(description = "检测方法分析项目配置ID", example = "15654") + private Long configAssayMethodProjectId; + + @Schema(description = "检测项目字典ID,字典表【T_DIC_PRJ】", example = "5352") + private Long dictionaryProjectId; + + @Schema(description = "值") + private String value; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", example = "1") + private String dataType; + + @Schema(description = "小数位") + private Integer decimalPosition; + + @Schema(description = "是否不参与超差判定") + private Integer isNotAssessment; + + @Schema(description = "是否启用") + private Integer isEnabled; + + @Schema(description = "乐观锁", example = "30037") + 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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayProjectDataRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayProjectDataRespVO.java new file mode 100644 index 0000000..2caf94e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayProjectDataRespVO.java @@ -0,0 +1,67 @@ +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 BusinessAssayProjectDataRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21103") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "检测任务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16505") + @ExcelProperty("检测任务ID") + private Long businessAssayTaskDataId; + + @Schema(description = "检测方法分析项目配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15654") + @ExcelProperty("检测方法分析项目配置ID") + private Long configAssayMethodProjectId; + + @Schema(description = "检测项目字典ID,字典表【T_DIC_PRJ】", requiredMode = Schema.RequiredMode.REQUIRED, example = "5352") + @ExcelProperty("检测项目字典ID,字典表【T_DIC_PRJ】") + private Long dictionaryProjectId; + + @Schema(description = "值") + @ExcelProperty("值") + private String value; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("数据类型,【字典】【jy_sample_data_type】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间") + private String dataType; + + @Schema(description = "小数位") + @ExcelProperty("小数位") + private Integer decimalPosition; + + @Schema(description = "是否不参与超差判定", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否不参与超差判定") + private Integer isNotAssessment; + + @Schema(description = "是否启用", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否启用") + private Integer isEnabled; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "30037") + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayProjectDataSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayProjectDataSaveReqVO.java new file mode 100644 index 0000000..419ebb7 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayProjectDataSaveReqVO.java @@ -0,0 +1,56 @@ +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.*; + +@Schema(description = "管理后台 - 检测项目数据业务新增/修改 Request VO") +@Data +public class BusinessAssayProjectDataSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21103") + private Long id; + + @Schema(description = "检测任务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16505") + @NotNull(message = "检测任务ID不能为空") + private Long businessAssayTaskDataId; + + @Schema(description = "检测方法分析项目配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15654") + @NotEmpty(message = "检测方法分析项目配置ID不能为空") + private Long configAssayMethodProjectId; + + @Schema(description = "检测项目字典ID,字典表【T_DIC_PRJ】", requiredMode = Schema.RequiredMode.REQUIRED, example = "5352") + @NotNull(message = "检测项目字典ID,字典表【T_DIC_PRJ】不能为空") + private Long dictionaryProjectId; + + @Schema(description = "值") + private String value; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "数据类型,【字典】【jy_sample_data_type】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间不能为空") + private String dataType; + + @Schema(description = "小数位") + private Integer decimalPosition; + + @Schema(description = "是否不参与超差判定", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否不参与超差判定不能为空") + private Integer isNotAssessment; + + @Schema(description = "是否启用", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否启用不能为空") + private Integer isEnabled; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "30037") + @NotNull(message = "乐观锁不能为空") + private Integer updateCount; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDataExtendRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDataExtendRespVO.java new file mode 100644 index 0000000..1207be0 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDataExtendRespVO.java @@ -0,0 +1,21 @@ +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; +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDataPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDataPageReqVO.java new file mode 100644 index 0000000..e1a3e1e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDataPageReqVO.java @@ -0,0 +1,76 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDataReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDataReqVO.java new file mode 100644 index 0000000..b28bd7c --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDataReqVO.java @@ -0,0 +1,76 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDataRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDataRespVO.java new file mode 100644 index 0000000..db4627f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDataRespVO.java @@ -0,0 +1,95 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDataSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDataSaveReqVO.java new file mode 100644 index 0000000..e18a2c0 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDataSaveReqVO.java @@ -0,0 +1,81 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDetailPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDetailPageReqVO.java new file mode 100644 index 0000000..ccf2db5 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDetailPageReqVO.java @@ -0,0 +1,56 @@ +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 BusinessAssayTaskDetailPageReqVO extends PageParam { + + @Schema(description = "指派单ID", example = "6438") + private Long businessAssayTaskId; + + @Schema(description = "样品id", example = "26703") + private Long sampleId; + + @Schema(description = "指派编号") + private String taskNo; + + @Schema(description = "物料名称", example = "张三") + private String materialName; + + @Schema(description = "样品名称", example = "芋艿") + private String sampleName; + + @Schema(description = "样品编号") + private String sampleCode; + + @Schema(description = "杯号") + private String cupNumber; + + @Schema(description = "数据来源类型,【字典】【jy_assay_task_data_source_type】正常,筛上,筛下", example = "1") + private String dataSourceType; + + @Schema(description = "序号") + private Integer sort; + + @Schema(description = "任务退回状态,【字典】【jy_assay_task_rollback_status】默认;审批中;已审批(已退回);取消退回", example = "1") + private String rollbackStatus; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDetailRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDetailRespVO.java new file mode 100644 index 0000000..50f18b7 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDetailRespVO.java @@ -0,0 +1,71 @@ +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 BusinessAssayTaskDetailRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19713") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "指派单ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6438") + @ExcelProperty("指派单ID") + private Long businessAssayTaskId; + + @Schema(description = "样品id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26703") + @ExcelProperty("样品id") + private Long sampleId; + + @Schema(description = "指派编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("指派编号") + private String taskNo; + + @Schema(description = "物料名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @ExcelProperty("物料名称") + private String materialName; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @ExcelProperty("样品名称") + private String sampleName; + + @Schema(description = "样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品编号") + private String sampleCode; + + @Schema(description = "杯号") + @ExcelProperty("杯号") + private String cupNumber; + + @Schema(description = "数据来源类型,【字典】【jy_assay_task_data_source_type】正常,筛上,筛下", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("数据来源类型,【字典】【jy_assay_task_data_source_type】正常,筛上,筛下") + private String dataSourceType; + + @Schema(description = "序号") + @ExcelProperty("序号") + private Integer sort; + + @Schema(description = "任务退回状态,【字典】【jy_assay_task_rollback_status】默认;审批中;已审批(已退回);取消退回", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("任务退回状态,【字典】【jy_assay_task_rollback_status】默认;审批中;已审批(已退回);取消退回") + private String rollbackStatus; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDetailSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDetailSaveReqVO.java new file mode 100644 index 0000000..06326c2 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskDetailSaveReqVO.java @@ -0,0 +1,60 @@ +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.*; + +@Schema(description = "管理后台 - 检测任务分配明细新增/修改 Request VO") +@Data +public class BusinessAssayTaskDetailSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19713") + private Long id; + + @Schema(description = "指派单ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6438") + @NotNull(message = "指派单ID不能为空") + private Long businessAssayTaskId; + + @Schema(description = "样品id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26703") + @NotNull(message = "样品id不能为空") + private Long sampleId; + + @Schema(description = "指派编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "指派编号不能为空") + private String taskNo; + + @Schema(description = "物料名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "物料名称不能为空") + private String materialName; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @NotEmpty(message = "样品名称不能为空") + private String sampleName; + + @Schema(description = "样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品编号不能为空") + private String sampleCode; + + @Schema(description = "杯号") + private String cupNumber; + + @Schema(description = "数据来源类型,【字典】【jy_assay_task_data_source_type】正常,筛上,筛下", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "数据来源类型,【字典】【jy_assay_task_data_source_type】正常,筛上,筛下不能为空") + private String dataSourceType; + + @Schema(description = "序号") + private Integer sort; + + @Schema(description = "任务退回状态,【字典】【jy_assay_task_rollback_status】默认;审批中;已审批(已退回);取消退回", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "任务退回状态,【字典】【jy_assay_task_rollback_status】默认;审批中;已审批(已退回);取消退回不能为空") + private String rollbackStatus; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskPageReqVO.java new file mode 100644 index 0000000..18a3ea2 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskPageReqVO.java @@ -0,0 +1,99 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskRespVO.java new file mode 100644 index 0000000..52ca944 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskRespVO.java @@ -0,0 +1,123 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskSaveReqVO.java new file mode 100644 index 0000000..54172ad --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessAssayTaskSaveReqVO.java @@ -0,0 +1,106 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSamplePageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSamplePageReqVO.java new file mode 100644 index 0000000..c8081f2 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSamplePageReqVO.java @@ -0,0 +1,68 @@ +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 BusinessBaseSamplePageReqVO extends PageParam { + + @Schema(description = "样品名称", example = "芋艿") + private String sampleName; + + @Schema(description = "样品编号") + private String sampleCode; + + @Schema(description = "主样配置ID", example = "26608") + private Long configBaseSampleId; + + @Schema(description = "主样类型ID,字典表:【T_DIC_BSN】结算样、抽查样、委检样", example = "27887") + private Long dictionaryBusinessId; + + @Schema(description = "样品生成时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] sampleTime; + + @Schema(description = "打印次数", example = "20143") + private Integer printCount; + + @Schema(description = "末次打印时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] printLastTime; + + @Schema(description = "样品流程ID", example = "25222") + private Long sampleFlowId; + + @Schema(description = "样品流程KEY") + private String sampleFlowKey; + + @Schema(description = "样品流程节点时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] sampleFlowTime; + + @Schema(description = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废", example = "1") + private String sampleStatus; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建人名称") + private String operator; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "乐观锁", example = "13116") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSampleRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSampleRespVO.java new file mode 100644 index 0000000..3ce07dc --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSampleRespVO.java @@ -0,0 +1,83 @@ +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 BusinessBaseSampleRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "14424") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @ExcelProperty("样品名称") + private String sampleName; + + @Schema(description = "样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品编号") + private String sampleCode; + + @Schema(description = "主样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26608") + @ExcelProperty("主样配置ID") + private Long configBaseSampleId; + + @Schema(description = "主样类型ID,字典表:【T_DIC_BSN】结算样、抽查样、委检样", requiredMode = Schema.RequiredMode.REQUIRED, example = "27887") + @ExcelProperty("主样类型ID,字典表:【T_DIC_BSN】结算样、抽查样、委检样") + private Long dictionaryBusinessId; + + @Schema(description = "样品生成时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品生成时间") + private LocalDateTime sampleTime; + + @Schema(description = "打印次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "20143") + @ExcelProperty("打印次数") + private Integer printCount; + + @Schema(description = "末次打印时间") + @ExcelProperty("末次打印时间") + private LocalDateTime printLastTime; + + @Schema(description = "样品流程ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25222") + @ExcelProperty("样品流程ID") + private Long sampleFlowId; + + @Schema(description = "样品流程KEY", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品流程KEY") + private String sampleFlowKey; + + @Schema(description = "样品流程节点时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品流程节点时间") + private LocalDateTime sampleFlowTime; + + @Schema(description = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废") + private String sampleStatus; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建人名称", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建人名称") + private String operator; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "13116") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSampleSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSampleSaveReqVO.java new file mode 100644 index 0000000..e5b9b11 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessBaseSampleSaveReqVO.java @@ -0,0 +1,75 @@ +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 BusinessBaseSampleSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "14424") + private Long id; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @NotEmpty(message = "样品名称不能为空") + private String sampleName; + + @Schema(description = "样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品编号不能为空") + private String sampleCode; + + @Schema(description = "主样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26608") + @NotNull(message = "主样配置ID不能为空") + private Long configBaseSampleId; + + @Schema(description = "主样类型ID,字典表:【T_DIC_BSN】结算样、抽查样、委检样", requiredMode = Schema.RequiredMode.REQUIRED, example = "27887") + @NotNull(message = "主样类型ID,字典表:【T_DIC_BSN】结算样、抽查样、委检样不能为空") + private Long dictionaryBusinessId; + + @Schema(description = "样品生成时间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "样品生成时间不能为空") + private LocalDateTime sampleTime; + + @Schema(description = "打印次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "20143") + @NotNull(message = "打印次数不能为空") + private Integer printCount; + + @Schema(description = "末次打印时间") + private LocalDateTime printLastTime; + + @Schema(description = "样品流程ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25222") + @NotNull(message = "样品流程ID不能为空") + private Long sampleFlowId; + + @Schema(description = "样品流程KEY", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品流程KEY不能为空") + private String sampleFlowKey; + + @Schema(description = "样品流程节点时间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "样品流程节点时间不能为空") + private LocalDateTime sampleFlowTime; + + @Schema(description = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废不能为空") + private String sampleStatus; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "创建人名称", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "创建人名称不能为空") + private String operator; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "13116") + @NotNull(message = "乐观锁不能为空") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubExtendRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubExtendRespVO.java new file mode 100644 index 0000000..7d40144 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubExtendRespVO.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +public class BusinessHandoverRecordSubExtendRespVO extends BusinessHandoverRecordSubRespVO { + + @Schema(description = "样品名称") + private String sampleName; + + @Schema(description = "分析编号") + private String sampleAssayCode; + + @Schema(description = "归库编号") + private String sampleReturnCode; + + /** 子样类型名称 **/ + @Schema(description = "子样类型名称") + private String dictionaryBusinessName; +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubPageReqVO.java new file mode 100644 index 0000000..3bc0461 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubPageReqVO.java @@ -0,0 +1,58 @@ +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 java.math.BigDecimal; +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 BusinessHandoverRecordSubPageReqVO extends PageParam { + + @Schema(description = "样品子样ID", example = "7268") + private Long businessSubSampleId; + + @Schema(description = "样品流程ID", example = "27410") + private Long sampleFlowId; + + @Schema(description = "样品流程KEY") + private String sampleFlowKey; + + @Schema(description = "样品编号") + private String sampleCode; + + @Schema(description = "样品重量") + private BigDecimal sampleWeight; + + @Schema(description = "操作时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] operationTime; + + @Schema(description = "操作人") + private String operator; + + @Schema(description = "操作人ID", example = "9370") + private Long operatorId; + + @Schema(description = "送样人") + private String sendSampleOperator; + + @Schema(description = "收样人") + private String receiveSampleOperator; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubRespVO.java new file mode 100644 index 0000000..71535ee --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubRespVO.java @@ -0,0 +1,72 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 子样交接记录业务 Response VO") +@Data +@ExcelIgnoreUnannotated +public class BusinessHandoverRecordSubRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3962") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "样品子样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7268") + @ExcelProperty("样品子样ID") + private Long businessSubSampleId; + + @Schema(description = "样品流程ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27410") + @ExcelProperty("样品流程ID") + private Long sampleFlowId; + + @Schema(description = "样品流程KEY", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品流程KEY") + private String sampleFlowKey; + + @Schema(description = "样品编号") + @ExcelProperty("样品编号") + private String sampleCode; + + @Schema(description = "样品重量") + @ExcelProperty("样品重量") + private BigDecimal sampleWeight; + + @Schema(description = "操作时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("操作时间") + private LocalDateTime operationTime; + + @Schema(description = "操作人", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("操作人") + private String operator; + + @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9370") + @ExcelProperty("操作人ID") + private Long operatorId; + + @Schema(description = "送样人", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("送样人") + private String sendSampleOperator; + + @Schema(description = "收样人", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("收样人") + private String receiveSampleOperator; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubSaveReqVO.java new file mode 100644 index 0000000..cd9d777 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessHandoverRecordSubSaveReqVO.java @@ -0,0 +1,63 @@ +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 java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 子样交接记录业务新增/修改 Request VO") +@Data +public class BusinessHandoverRecordSubSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3962") + private Long id; + + @Schema(description = "样品子样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7268") + @NotNull(message = "样品子样ID不能为空") + private Long businessSubSampleId; + + @Schema(description = "样品流程ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27410") + @NotNull(message = "样品流程ID不能为空") + private Long sampleFlowId; + + @Schema(description = "样品流程KEY", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品流程KEY不能为空") + private String sampleFlowKey; + + @Schema(description = "样品编号") + private String sampleCode; + + @Schema(description = "样品重量") + private BigDecimal sampleWeight; + + @Schema(description = "操作时间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "操作时间不能为空") + private LocalDateTime operationTime; + + @Schema(description = "操作人", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "操作人不能为空") + private String operator; + + @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9370") + @NotNull(message = "操作人ID不能为空") + private Long operatorId; + + @Schema(description = "送样人", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "送样人不能为空") + private String sendSampleOperator; + + @Schema(description = "收样人", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "收样人不能为空") + private String receiveSampleOperator; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultPageReqVO.java new file mode 100644 index 0000000..532ed51 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultPageReqVO.java @@ -0,0 +1,38 @@ +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 BusinessSampleAssayResultPageReqVO extends PageParam { + + @Schema(description = "委托登记样品明细ID", example = "5711") + private Long businessSampleEntrustDetailId; + + @Schema(description = "样品主样ID", example = "22353") + private Long businessBaseSampleId; + + @Schema(description = "来样品位") + private String data; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "乐观锁", example = "18328") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultRespVO.java new file mode 100644 index 0000000..8d10cc9 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultRespVO.java @@ -0,0 +1,47 @@ +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 BusinessSampleAssayResultRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31437") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "委托登记样品明细ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5711") + @ExcelProperty("委托登记样品明细ID") + private Long businessSampleEntrustDetailId; + + @Schema(description = "样品主样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22353") + @ExcelProperty("样品主样ID") + private Long businessBaseSampleId; + + @Schema(description = "来样品位", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("来样品位") + private String data; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "18328") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultSaveReqVO.java new file mode 100644 index 0000000..927970d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleAssayResultSaveReqVO.java @@ -0,0 +1,38 @@ +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.*; + +@Schema(description = "管理后台 - 委检登记来样品位新增/修改 Request VO") +@Data +public class BusinessSampleAssayResultSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31437") + private Long id; + + @Schema(description = "委托登记样品明细ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5711") + @NotNull(message = "委托登记样品明细ID不能为空") + private Long businessSampleEntrustDetailId; + + @Schema(description = "样品主样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22353") + @NotNull(message = "样品主样ID不能为空") + private Long businessBaseSampleId; + + @Schema(description = "来样品位", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "来样品位不能为空") + private String data; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "18328") + @NotNull(message = "乐观锁不能为空") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailExtendRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailExtendRespVO.java new file mode 100644 index 0000000..9b1df34 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailExtendRespVO.java @@ -0,0 +1,12 @@ +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 sampleEntrustDetailProjectList; + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailPageReqVO.java new file mode 100644 index 0000000..a875a4d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailPageReqVO.java @@ -0,0 +1,65 @@ +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 BusinessSampleEntrustDetailPageReqVO extends PageParam { + + @Schema(description = "检验委托登记ID", example = "3509") + private Long businessSampleEntrustRegistrationId; + + @Schema(description = "主样业务ID", example = "24710") + private Long businessBaseSampleId; + + @Schema(description = "样品大类ID", example = "10243") + private Long baseSampleId; + + @Schema(description = "样品类型ID,字典表:【T_DIC_BSN】结算样、委检样、生产样等", example = "27392") + private Long dictionaryBusinessId; + + @Schema(description = "样品名称", example = "芋艿") + private String sampleName; + + @Schema(description = "样品编号") + private String sampleCode; + + @Schema(description = "委托样品名称", example = "赵六") + private String entrustSampleName; + + @Schema(description = "委托样品编号") + private String entrustSampleCode; + + @Schema(description = "排序") + private Integer sort; + + @Schema(description = "检测项目") + private String assayProject; + + @Schema(description = "预报结果") + private String forecastResult; + + @Schema(description = "是否称重,1-启用,0-不启用") + private Integer isWeighing; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "乐观锁", example = "12540") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailRespVO.java new file mode 100644 index 0000000..545dd5b --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailRespVO.java @@ -0,0 +1,83 @@ +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 BusinessSampleEntrustDetailRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12340") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "检验委托登记ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3509") + @ExcelProperty("检验委托登记ID") + private Long businessSampleEntrustRegistrationId; + + @Schema(description = "主样业务ID", example = "24710") + @ExcelProperty("主样业务ID") + private Long businessBaseSampleId; + + @Schema(description = "样品大类ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10243") + @ExcelProperty("样品大类ID") + private Long baseSampleId; + + @Schema(description = "样品类型ID,字典表:【T_DIC_BSN】结算样、委检样、生产样等", requiredMode = Schema.RequiredMode.REQUIRED, example = "27392") + @ExcelProperty("样品类型ID,字典表:【T_DIC_BSN】结算样、委检样、生产样等") + private Long dictionaryBusinessId; + + @Schema(description = "样品名称", example = "芋艿") + @ExcelProperty("样品名称") + private String sampleName; + + @Schema(description = "样品编号") + @ExcelProperty("样品编号") + private String sampleCode; + + @Schema(description = "委托样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @ExcelProperty("委托样品名称") + private String entrustSampleName; + + @Schema(description = "委托样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("委托样品编号") + private String entrustSampleCode; + + @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("排序") + private Integer sort; + + @Schema(description = "检测项目") + @ExcelProperty("检测项目") + private String assayProject; + + @Schema(description = "预报结果") + @ExcelProperty("预报结果") + private String forecastResult; + + @Schema(description = "是否称重,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否称重,1-启用,0-不启用") + private Integer isWeighing; + + @Schema(description = "所属部门") + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", example = "12540") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailSaveReqVO.java new file mode 100644 index 0000000..603e30a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustDetailSaveReqVO.java @@ -0,0 +1,67 @@ +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.*; + +@Schema(description = "管理后台 - 委检登记样品明细新增/修改 Request VO") +@Data +public class BusinessSampleEntrustDetailSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12340") + private Long id; + + @Schema(description = "检验委托登记ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3509") + @NotNull(message = "检验委托登记ID不能为空") + private Long businessSampleEntrustRegistrationId; + + @Schema(description = "主样业务ID", example = "24710") + private Long businessBaseSampleId; + + @Schema(description = "样品大类ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10243") + @NotNull(message = "样品大类ID不能为空") + private Long baseSampleId; + + @Schema(description = "样品类型ID,字典表:【T_DIC_BSN】结算样、委检样、生产样等", requiredMode = Schema.RequiredMode.REQUIRED, example = "27392") + @NotNull(message = "样品类型ID,字典表:【T_DIC_BSN】结算样、委检样、生产样等不能为空") + private Long dictionaryBusinessId; + + @Schema(description = "样品名称", example = "芋艿") + private String sampleName; + + @Schema(description = "样品编号") + private String sampleCode; + + @Schema(description = "委托样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @NotEmpty(message = "委托样品名称不能为空") + private String entrustSampleName; + + @Schema(description = "委托样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "委托样品编号不能为空") + private String entrustSampleCode; + + @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "排序不能为空") + private Integer sort; + + @Schema(description = "检测项目") + private String assayProject; + + @Schema(description = "预报结果") + private String forecastResult; + + @Schema(description = "是否称重,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否称重,1-启用,0-不启用不能为空") + private Integer isWeighing; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "乐观锁", example = "12540") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectExtendRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectExtendRespVO.java new file mode 100644 index 0000000..cbceae0 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectExtendRespVO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import lombok.Data; + +@Data +public class BusinessSampleEntrustProjectExtendRespVO extends BusinessSampleEntrustProjectRespVO { + + /** 检测项目编码 **/ + private String projectCode; + + /** 检测项目名称 **/ + private String projectName; + + /** 检测项目缩写 **/ + private String projectSimpleName; + + /** 检测项目显示名称 **/ + private String projectShowName; +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectPageReqVO.java new file mode 100644 index 0000000..a91537f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectPageReqVO.java @@ -0,0 +1,41 @@ +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 BusinessSampleEntrustProjectPageReqVO extends PageParam { + + @Schema(description = "样品检验委托明细ID", example = "31234") + private Long businessSampleEntrustDetailId; + + @Schema(description = "物料检测标准检测项目ID", example = "1780") + private Long materialAssayStandardDetailId; + + @Schema(description = "检测项目ID,字典表:【T_DIC_PRJ】", example = "29566") + private Long dictionaryProjectId; + + @Schema(description = "是否启用,1-启用,0-不启用") + private Integer isEnabled; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "乐观锁", example = "22753") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectRespVO.java new file mode 100644 index 0000000..ff2e6b0 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectRespVO.java @@ -0,0 +1,51 @@ +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 BusinessSampleEntrustProjectRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6960") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "样品检验委托明细ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31234") + @ExcelProperty("样品检验委托明细ID") + private Long businessSampleEntrustDetailId; + + @Schema(description = "物料检测标准检测项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1780") + @ExcelProperty("物料检测标准检测项目ID") + private Long materialAssayStandardDetailId; + + @Schema(description = "检测项目ID,字典表:【T_DIC_PRJ】", requiredMode = Schema.RequiredMode.REQUIRED, example = "29566") + @ExcelProperty("检测项目ID,字典表:【T_DIC_PRJ】") + private Long dictionaryProjectId; + + @Schema(description = "是否启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否启用,1-启用,0-不启用") + private Integer isEnabled; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "22753") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectSaveReqVO.java new file mode 100644 index 0000000..9320b59 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustProjectSaveReqVO.java @@ -0,0 +1,42 @@ +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.*; + +@Schema(description = "管理后台 - 委检样品检测项目业务新增/修改 Request VO") +@Data +public class BusinessSampleEntrustProjectSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6960") + private Long id; + + @Schema(description = "样品检验委托明细ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31234") + @NotNull(message = "样品检验委托明细ID不能为空") + private Long businessSampleEntrustDetailId; + + @Schema(description = "物料检测标准检测项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1780") + @NotNull(message = "物料检测标准检测项目ID不能为空") + private Long materialAssayStandardDetailId; + + @Schema(description = "检测项目ID,字典表:【T_DIC_PRJ】", requiredMode = Schema.RequiredMode.REQUIRED, example = "29566") + @NotNull(message = "检测项目ID,字典表:【T_DIC_PRJ】不能为空") + private Long dictionaryProjectId; + + @Schema(description = "是否启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否启用,1-启用,0-不启用不能为空") + private Integer isEnabled; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "22753") + @NotNull(message = "乐观锁不能为空") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationExtendRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationExtendRespVO.java new file mode 100644 index 0000000..4dfdd12 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationExtendRespVO.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +public class BusinessSampleEntrustRegistrationExtendRespVO extends BusinessSampleEntrustRegistrationRespVO { + + @Schema(description = "委托来源,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托") + @ExcelProperty("委托来源,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托") + private String configEntrustSourceName; + + @Schema(description = "委托单报表模板") + private String entrustReportTemplate; + + @Schema(description = "样品称重数量") + @ExcelProperty("样品称重数量") + private Integer sampleWeighingCount; + + private List sampleEntrustDetailList; +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationPageReqVO.java new file mode 100644 index 0000000..1e2315a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationPageReqVO.java @@ -0,0 +1,151 @@ +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 BusinessSampleEntrustRegistrationPageReqVO extends PageParam { + + @Schema(description = "委托ID", example = "9871") + private Long entrustId; + + @Schema(description = "委托单号") + private String entrustNumber; + + @Schema(description = "委托单位/送样单位") + private String entrustUnit; + + @Schema(description = "委托来源,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托", example = "28265") + private Long configEntrustSourceId; + + @Schema(description = "样品数量") + private Integer sampleQuantity; + + @Schema(description = "任务数量") + private Integer taskQuantity; + + @Schema(description = "已完成任务数量") + private Integer taskFinishedQuantity; + + @Schema(description = "余样要求,【字典】【jy_sample_entrust_remaine_requirement】余样返回、放弃") + private String remaineSampleRequirement; + + @Schema(description = "样品状态,【字典】【jy_sample_entrust_status】块状、粉末、颗粒、液体", example = "1") + private String sampleStatus; + + @Schema(description = "电话") + private String tel; + + @Schema(description = "传真") + private String fax; + + @Schema(description = "通讯地址") + private String address; + + @Schema(description = "邮编") + private String postal; + + @Schema(description = "E-mail") + private String email; + + @Schema(description = "委托检测类别,【字典】【jy_sample_entrust_category】一般委托、仲裁委托") + private String entrustCategory; + + @Schema(description = "样品类别(装港/卸港),【字典】【jy_sample_entrust_category】装港样、卸港样") + private String sampleCategory; + + @Schema(description = "样品来源,【字典】【jy_sample_entrust_origin】送样、邮寄、现场取样") + private String sampleOrigin; + + @Schema(description = "保密要求,【字典】【jy_sample_entrust_secrecy_requirement】要求对样品和文件保密、无保密要求") + private String secrecyRequire; + + @Schema(description = "检测方法,【字典】【jy_sample_entrust_assay_method】国标、行标、客户要求、检测方依据样品选择") + private String assayMethod; + + @Schema(description = "送样人") + private String sampleSender; + + @Schema(description = "送样日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] sampleSendDate; + + @Schema(description = "收样人") + private String sampleReceiver; + + @Schema(description = "收样日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] sampleReceiveDate; + + @Schema(description = "登记状态,register-登记中、submitted-已提交", example = "2") + private String registrationStatus; + + @Schema(description = "数据校验状态,success-数据校验成功、fail-数据校验失败", example = "1") + private String dataCheckStatus; + + @Schema(description = "检验状态,unchecked-未检验;checked-已检验", example = "1") + private String assayStatus; + + @Schema(description = "数据回报状态,unreturned-未回报;returned-已回报", example = "2") + private String dataStatus; + + @Schema(description = "报告IDs", example = "1825") + private String documentMainId; + + @Schema(description = "报告发送方式,【字典】【jy_sample_entrust_send_way】自取、邮寄、电话、传真、E-mail") + private String documentSendWay; + + @Schema(description = "报告发送人") + private String documentPublisher; + + @Schema(description = "报告发送日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] documentPublisherDate; + + @Schema(description = "报告接收人") + private String documentReceiver; + + @Schema(description = "报告接收日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] documentReceiveDate; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "乐观锁", example = "9487") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "扩展信息") + private String externalInfomation; + + @Schema(description = "数据集key,T_DAT_COLT_FLD", example = "29021") + private Long dataCollectionId; + + @Schema(description = "创建方式,手动创建-manual、外部系统创建-interface") + private String createWay; + + @Schema(description = "创建人") + private String createOperator; + + @Schema(description = "委托类型:委托登记-entrust_registration、检验委托-entrust_inspection", example = "2") + private String entrustType; + + @Schema(description = "委托时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] entrustTime; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationRespVO.java new file mode 100644 index 0000000..b6c8acb --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationRespVO.java @@ -0,0 +1,190 @@ +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 BusinessSampleEntrustRegistrationRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13395") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "委托ID", example = "9871") + @ExcelProperty("委托ID") + private Long entrustId; + + @Schema(description = "委托单号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("委托单号") + private String entrustNumber; + + @Schema(description = "委托单位/送样单位", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("委托单位/送样单位") + private String entrustUnit; + + @Schema(description = "委托来源,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托", requiredMode = Schema.RequiredMode.REQUIRED, example = "28265") + @ExcelProperty("委托来源,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托") + private Long configEntrustSourceId; + + @Schema(description = "样品数量", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品数量") + private Integer sampleQuantity; + + @Schema(description = "任务数量") + @ExcelProperty("任务数量") + private Integer taskQuantity; + + @Schema(description = "已完成任务数量") + @ExcelProperty("已完成任务数量") + private Integer taskFinishedQuantity; + + @Schema(description = "余样要求,【字典】【jy_sample_entrust_remaine_requirement】余样返回、放弃", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("余样要求,【字典】【jy_sample_entrust_remaine_requirement】余样返回、放弃") + private String remaineSampleRequirement; + + @Schema(description = "样品状态,【字典】【jy_sample_entrust_status】块状、粉末、颗粒、液体", example = "1") + @ExcelProperty("样品状态,【字典】【jy_sample_entrust_status】块状、粉末、颗粒、液体") + private String sampleStatus; + + @Schema(description = "电话") + @ExcelProperty("电话") + private String tel; + + @Schema(description = "传真") + @ExcelProperty("传真") + private String fax; + + @Schema(description = "通讯地址") + @ExcelProperty("通讯地址") + private String address; + + @Schema(description = "邮编") + @ExcelProperty("邮编") + private String postal; + + @Schema(description = "E-mail") + @ExcelProperty("E-mail") + private String email; + + @Schema(description = "委托检测类别,【字典】【jy_sample_entrust_category】一般委托、仲裁委托") + @ExcelProperty("委托检测类别,【字典】【jy_sample_entrust_category】一般委托、仲裁委托") + private String entrustCategory; + + @Schema(description = "样品类别(装港/卸港),【字典】【jy_sample_entrust_category】装港样、卸港样") + @ExcelProperty("样品类别(装港/卸港),【字典】【jy_sample_entrust_category】装港样、卸港样") + private String sampleCategory; + + @Schema(description = "样品来源,【字典】【jy_sample_entrust_origin】送样、邮寄、现场取样") + @ExcelProperty("样品来源,【字典】【jy_sample_entrust_origin】送样、邮寄、现场取样") + private String sampleOrigin; + + @Schema(description = "保密要求,【字典】【jy_sample_entrust_secrecy_requirement】要求对样品和文件保密、无保密要求") + @ExcelProperty("保密要求,【字典】【jy_sample_entrust_secrecy_requirement】要求对样品和文件保密、无保密要求") + private String secrecyRequire; + + @Schema(description = "检测方法,【字典】【jy_sample_entrust_assay_method】国标、行标、客户要求、检测方依据样品选择") + @ExcelProperty("检测方法,【字典】【jy_sample_entrust_assay_method】国标、行标、客户要求、检测方依据样品选择") + private String assayMethod; + + @Schema(description = "送样人") + @ExcelProperty("送样人") + private String sampleSender; + + @Schema(description = "送样日期") + @ExcelProperty("送样日期") + private LocalDateTime sampleSendDate; + + @Schema(description = "收样人") + @ExcelProperty("收样人") + private String sampleReceiver; + + @Schema(description = "收样日期") + @ExcelProperty("收样日期") + private LocalDateTime sampleReceiveDate; + + @Schema(description = "登记状态,register-登记中、submitted-已提交", example = "2") + @ExcelProperty("登记状态,register-登记中、submitted-已提交") + private String registrationStatus; + + @Schema(description = "数据校验状态,success-数据校验成功、fail-数据校验失败", example = "1") + @ExcelProperty("数据校验状态,success-数据校验成功、fail-数据校验失败") + private String dataCheckStatus; + + @Schema(description = "检验状态,unchecked-未检验;checked-已检验", example = "1") + @ExcelProperty("检验状态,unchecked-未检验;checked-已检验") + private String assayStatus; + + @Schema(description = "数据回报状态,unreturned-未回报;returned-已回报", example = "2") + @ExcelProperty("数据回报状态,unreturned-未回报;returned-已回报") + private String dataStatus; + + @Schema(description = "报告IDs", example = "1825") + @ExcelProperty("报告IDs") + private String documentMainId; + + @Schema(description = "报告发送方式,【字典】【jy_sample_entrust_send_way】自取、邮寄、电话、传真、E-mail") + @ExcelProperty("报告发送方式,【字典】【jy_sample_entrust_send_way】自取、邮寄、电话、传真、E-mail") + private String documentSendWay; + + @Schema(description = "报告发送人") + @ExcelProperty("报告发送人") + private String documentPublisher; + + @Schema(description = "报告发送日期") + @ExcelProperty("报告发送日期") + private LocalDateTime documentPublisherDate; + + @Schema(description = "报告接收人") + @ExcelProperty("报告接收人") + private String documentReceiver; + + @Schema(description = "报告接收日期") + @ExcelProperty("报告接收日期") + private LocalDateTime documentReceiveDate; + + @Schema(description = "所属部门") + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "9487") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "扩展信息") + @ExcelProperty("扩展信息") + private String externalInfomation; + + @Schema(description = "数据集key,T_DAT_COLT_FLD", example = "29021") + @ExcelProperty("数据集key,T_DAT_COLT_FLD") + private Long dataCollectionId; + + @Schema(description = "创建方式,手动创建-manual、外部系统创建-interface") + @ExcelProperty("创建方式,手动创建-manual、外部系统创建-interface") + private String createWay; + + @Schema(description = "创建人") + @ExcelProperty("创建人") + private String createOperator; + + @Schema(description = "委托类型:委托登记-entrust_registration、检验委托-entrust_inspection", example = "2") + @ExcelProperty("委托类型:委托登记-entrust_registration、检验委托-entrust_inspection") + private String entrustType; + + @Schema(description = "委托时间") + private LocalDateTime entrustTime; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationSaveReqVO.java new file mode 100644 index 0000000..068fcf0 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationSaveReqVO.java @@ -0,0 +1,149 @@ +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 BusinessSampleEntrustRegistrationSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13395") + private Long id; + + @Schema(description = "委托ID", example = "9871") + private Long entrustId; + + @Schema(description = "委托单号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "委托单号不能为空") + private String entrustNumber; + + @Schema(description = "委托单位/送样单位", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "委托单位/送样单位不能为空") + private String entrustUnit; + + @Schema(description = "委托来源,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托", requiredMode = Schema.RequiredMode.REQUIRED, example = "28265") + @NotNull(message = "委托来源,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托不能为空") + private Long configEntrustSourceId; + + @Schema(description = "样品数量", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "样品数量不能为空") + private Integer sampleQuantity; + + @Schema(description = "任务数量") + private Integer taskQuantity; + + @Schema(description = "已完成任务数量") + private Integer taskFinishedQuantity; + + @Schema(description = "余样要求,【字典】【jy_sample_entrust_remaine_requirement】余样返回、放弃", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "余样要求,【字典】【jy_sample_entrust_remaine_requirement】余样返回、放弃不能为空") + private String remaineSampleRequirement; + + @Schema(description = "样品状态,【字典】【jy_sample_entrust_status】块状、粉末、颗粒、液体", example = "1") + private String sampleStatus; + + @Schema(description = "电话") + private String tel; + + @Schema(description = "传真") + private String fax; + + @Schema(description = "通讯地址") + private String address; + + @Schema(description = "邮编") + private String postal; + + @Schema(description = "E-mail") + private String email; + + @Schema(description = "委托检测类别,【字典】【jy_sample_entrust_category】一般委托、仲裁委托") + private String entrustCategory; + + @Schema(description = "样品类别(装港/卸港),【字典】【jy_sample_entrust_category】装港样、卸港样") + private String sampleCategory; + + @Schema(description = "样品来源,【字典】【jy_sample_entrust_origin】送样、邮寄、现场取样") + private String sampleOrigin; + + @Schema(description = "保密要求,【字典】【jy_sample_entrust_secrecy_requirement】要求对样品和文件保密、无保密要求") + private String secrecyRequire; + + @Schema(description = "检测方法,【字典】【jy_sample_entrust_assay_method】国标、行标、客户要求、检测方依据样品选择") + private String assayMethod; + + @Schema(description = "送样人") + private String sampleSender; + + @Schema(description = "送样日期") + private LocalDateTime sampleSendDate; + + @Schema(description = "收样人") + private String sampleReceiver; + + @Schema(description = "收样日期") + private LocalDateTime sampleReceiveDate; + + @Schema(description = "登记状态,register-登记中、submitted-已提交", example = "2") + private String registrationStatus; + + @Schema(description = "数据校验状态,success-数据校验成功、fail-数据校验失败", example = "1") + private String dataCheckStatus; + + @Schema(description = "检验状态,unchecked-未检验;checked-已检验", example = "1") + private String assayStatus; + + @Schema(description = "数据回报状态,unreturned-未回报;returned-已回报", example = "2") + private String dataStatus; + + @Schema(description = "报告IDs", example = "1825") + private String documentMainId; + + @Schema(description = "报告发送方式,【字典】【jy_sample_entrust_send_way】自取、邮寄、电话、传真、E-mail") + private String documentSendWay; + + @Schema(description = "报告发送人") + private String documentPublisher; + + @Schema(description = "报告发送日期") + private LocalDateTime documentPublisherDate; + + @Schema(description = "报告接收人") + private String documentReceiver; + + @Schema(description = "报告接收日期") + private LocalDateTime documentReceiveDate; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "9487") + @NotNull(message = "乐观锁不能为空") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "扩展信息") + private String externalInfomation; + + @Schema(description = "数据集key,T_DAT_COLT_FLD", example = "29021") + private Long dataCollectionId; + + @Schema(description = "创建方式,手动创建-manual、外部系统创建-interface") + private String createWay; + + @Schema(description = "创建人") + private String createOperator; + + @Schema(description = "委托类型:委托登记-entrust_registration、检验委托-entrust_inspection", example = "2") + private String entrustType; + + @Schema(description = "委托时间") + private LocalDateTime entrustTime; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationSubmitReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationSubmitReqVO.java new file mode 100644 index 0000000..aec4f67 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleEntrustRegistrationSubmitReqVO.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import java.time.LocalDateTime; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - 委检登记业务提交 Request VO") +@Data +public class BusinessSampleEntrustRegistrationSubmitReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9288") + private Long id; + + @Schema(description = "是否收样", example = "1") + private Integer isReceiveSample = 0; + + @Schema(description = "是否送样", example = "1") + private Integer isSendSample = 0; + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleHandoverDetailPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleHandoverDetailPageReqVO.java new file mode 100644 index 0000000..5b3a582 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleHandoverDetailPageReqVO.java @@ -0,0 +1,51 @@ +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 java.math.BigDecimal; +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 BusinessSampleHandoverDetailPageReqVO extends PageParam { + + @Schema(description = "交接单ID", example = "7637") + private Long businessSampleHandoverId; + + @Schema(description = "样品子样ID", example = "14005") + private Long businessSubSampleId; + + @Schema(description = "样品名称", example = "李四") + private String sampleName; + + @Schema(description = "样品编号") + private String sampleCode; + + @Schema(description = "样品重量") + private BigDecimal sampleWeight; + + @Schema(description = "天平编号") + private String balanceCode; + + @Schema(description = "样品类型ID,字典表:【T_DIC_BSN】", example = "29761") + private Long dictionaryBusinessId; + + @Schema(description = "样品类型", example = "王五") + private String dictionaryBusinessName; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleHandoverDetailRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleHandoverDetailRespVO.java new file mode 100644 index 0000000..053e555 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleHandoverDetailRespVO.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.qms.business.bus.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 样品交接明细 Response VO") +@Data +@ExcelIgnoreUnannotated +public class BusinessSampleHandoverDetailRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30266") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "交接单ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7637") + @ExcelProperty("交接单ID") + private Long businessSampleHandoverId; + + @Schema(description = "样品子样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "14005") + @ExcelProperty("样品子样ID") + private Long businessSubSampleId; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("样品名称") + private String sampleName; + + @Schema(description = "样品编号") + @ExcelProperty("样品编号") + private String sampleCode; + + @Schema(description = "样品重量") + @ExcelProperty("样品重量") + private BigDecimal sampleWeight; + + @Schema(description = "天平编号") + @ExcelProperty("天平编号") + private String balanceCode; + + @Schema(description = "样品类型ID,字典表:【T_DIC_BSN】", requiredMode = Schema.RequiredMode.REQUIRED, example = "29761") + @ExcelProperty("样品类型ID,字典表:【T_DIC_BSN】") + private Long dictionaryBusinessId; + + @Schema(description = "样品类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("样品类型") + private String dictionaryBusinessName; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleHandoverDetailSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleHandoverDetailSaveReqVO.java new file mode 100644 index 0000000..b5523ba --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleHandoverDetailSaveReqVO.java @@ -0,0 +1,52 @@ +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 java.math.BigDecimal; + +@Schema(description = "管理后台 - 样品交接明细新增/修改 Request VO") +@Data +public class BusinessSampleHandoverDetailSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30266") + private Long id; + + @Schema(description = "交接单ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7637") + @NotNull(message = "交接单ID不能为空") + private Long businessSampleHandoverId; + + @Schema(description = "样品子样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "14005") + @NotNull(message = "样品子样ID不能为空") + private Long businessSubSampleId; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "样品名称不能为空") + private String sampleName; + + @Schema(description = "样品编号") + private String sampleCode; + + @Schema(description = "样品重量") + private BigDecimal sampleWeight; + + @Schema(description = "天平编号") + private String balanceCode; + + @Schema(description = "样品类型ID,字典表:【T_DIC_BSN】", requiredMode = Schema.RequiredMode.REQUIRED, example = "29761") + @NotNull(message = "样品类型ID,字典表:【T_DIC_BSN】不能为空") + private Long dictionaryBusinessId; + + @Schema(description = "样品类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @NotEmpty(message = "样品类型不能为空") + private String dictionaryBusinessName; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleHandoverPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleHandoverPageReqVO.java new file mode 100644 index 0000000..acee5e4 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleHandoverPageReqVO.java @@ -0,0 +1,60 @@ +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 BusinessSampleHandoverPageReqVO extends PageParam { + + @Schema(description = "交接单编号") + private String code; + + @Schema(description = "交接单名称", example = "赵六") + private String name; + + @Schema(description = "交接单模版Key") + private String templateKey; + + @Schema(description = "样品流程ID", example = "27863") + private String sampleFlowId; + + @Schema(description = "样品流程code") + private String sampleFlowCode; + + @Schema(description = "操作类型,【字典】【jy_sample_handover_biz type】归库、调拨、下架、销毁", example = "2") + private String operationType; + + @Schema(description = "操作时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] operationTime; + + @Schema(description = "操作人") + private String operator; + + @Schema(description = "操作人ID", example = "8793") + private Long operatorId; + + @Schema(description = "流程模型Key") + private String modelKey; + + @Schema(description = "流程流水号") + private String flowSerialNumber; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleHandoverRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleHandoverRespVO.java new file mode 100644 index 0000000..ac5a807 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleHandoverRespVO.java @@ -0,0 +1,75 @@ +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 BusinessSampleHandoverRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16517") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "交接单编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("交接单编号") + private String code; + + @Schema(description = "交接单名称", example = "赵六") + @ExcelProperty("交接单名称") + private String name; + + @Schema(description = "交接单模版Key") + @ExcelProperty("交接单模版Key") + private String templateKey; + + @Schema(description = "样品流程ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27863") + @ExcelProperty("样品流程ID") + private String sampleFlowId; + + @Schema(description = "样品流程code", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品流程code") + private String sampleFlowCode; + + @Schema(description = "操作类型,【字典】【jy_sample_handover_biz type】归库、调拨、下架、销毁", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("操作类型,【字典】【jy_sample_handover_biz type】归库、调拨、下架、销毁") + private String operationType; + + @Schema(description = "操作时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("操作时间") + private LocalDateTime operationTime; + + @Schema(description = "操作人", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("操作人") + private String operator; + + @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8793") + @ExcelProperty("操作人ID") + private Long operatorId; + + @Schema(description = "流程模型Key") + @ExcelProperty("流程模型Key") + private String modelKey; + + @Schema(description = "流程流水号") + @ExcelProperty("流程流水号") + private String flowSerialNumber; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleHandoverSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleHandoverSaveReqVO.java new file mode 100644 index 0000000..9014548 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSampleHandoverSaveReqVO.java @@ -0,0 +1,64 @@ +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 BusinessSampleHandoverSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16517") + private Long id; + + @Schema(description = "交接单编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "交接单编号不能为空") + private String code; + + @Schema(description = "交接单名称", example = "赵六") + private String name; + + @Schema(description = "交接单模版Key") + private String templateKey; + + @Schema(description = "样品流程ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27863") + @NotEmpty(message = "样品流程ID不能为空") + private String sampleFlowId; + + @Schema(description = "样品流程code", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品流程code不能为空") + private String sampleFlowCode; + + @Schema(description = "操作类型,【字典】【jy_sample_handover_biz type】归库、调拨、下架、销毁", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotEmpty(message = "操作类型,【字典】【jy_sample_handover_biz type】归库、调拨、下架、销毁不能为空") + private String operationType; + + @Schema(description = "操作时间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "操作时间不能为空") + private LocalDateTime operationTime; + + @Schema(description = "操作人", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "操作人不能为空") + private String operator; + + @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8793") + @NotNull(message = "操作人ID不能为空") + private Long operatorId; + + @Schema(description = "流程模型Key") + private String modelKey; + + @Schema(description = "流程流水号") + private String flowSerialNumber; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSamplePageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSamplePageReqVO.java new file mode 100644 index 0000000..b11f91d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSamplePageReqVO.java @@ -0,0 +1,72 @@ +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 BusinessSubParentSamplePageReqVO extends PageParam { + + @Schema(description = "样品ID", example = "18364") + private Long sampleId; + + @Schema(description = "样品主样ID", example = "26057") + private Long businessBaseSampleId; + + @Schema(description = "分样配置ID", example = "2344") + private Long configSubSampleParentId; + + @Schema(description = "分样类型ID,字典表:【T_DIC_BSN】化学样、试金样、仪器样", example = "21472") + private Long dictionaryBusinessId; + + @Schema(description = "样品编号") + private String sampleCode; + + @Schema(description = "样品名称", example = "张三") + private String sampleName; + + @Schema(description = "子样样品编号") + private String subSampleCode; + + @Schema(description = "子样归库码") + private String subSampleReturnCode; + + @Schema(description = "上报人") + private String reporter; + + @Schema(description = "上报时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] reportTime; + + @Schema(description = "审核流程code") + private String auditFlowCode; + + @Schema(description = "超差标注", example = "2") + private Integer assessmentStatus; + + @Schema(description = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废", example = "2") + private String sampleStatus; + + @Schema(description = "是否启用,1-启用,0-不启用") + private Integer isEnabled; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "乐观锁", example = "4381") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSampleRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSampleRespVO.java new file mode 100644 index 0000000..7bc1478 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSampleRespVO.java @@ -0,0 +1,91 @@ +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 BusinessSubParentSampleRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25832") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "样品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18364") + @ExcelProperty("样品ID") + private Long sampleId; + + @Schema(description = "样品主样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26057") + @ExcelProperty("样品主样ID") + private Long businessBaseSampleId; + + @Schema(description = "分样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2344") + @ExcelProperty("分样配置ID") + private Long configSubSampleParentId; + + @Schema(description = "分样类型ID,字典表:【T_DIC_BSN】化学样、试金样、仪器样", requiredMode = Schema.RequiredMode.REQUIRED, example = "21472") + @ExcelProperty("分样类型ID,字典表:【T_DIC_BSN】化学样、试金样、仪器样") + private Long dictionaryBusinessId; + + @Schema(description = "样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品编号") + private String sampleCode; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @ExcelProperty("样品名称") + private String sampleName; + + @Schema(description = "子样样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("子样样品编号") + private String subSampleCode; + + @Schema(description = "子样归库码") + @ExcelProperty("子样归库码") + private String subSampleReturnCode; + + @Schema(description = "上报人") + @ExcelProperty("上报人") + private String reporter; + + @Schema(description = "上报时间") + @ExcelProperty("上报时间") + private LocalDateTime reportTime; + + @Schema(description = "审核流程code") + @ExcelProperty("审核流程code") + private String auditFlowCode; + + @Schema(description = "超差标注", example = "2") + @ExcelProperty("超差标注") + private Integer assessmentStatus; + + @Schema(description = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废") + private String sampleStatus; + + @Schema(description = "是否启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否启用,1-启用,0-不启用") + private Integer isEnabled; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "4381") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSampleSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSampleSaveReqVO.java new file mode 100644 index 0000000..be18873 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubParentSampleSaveReqVO.java @@ -0,0 +1,79 @@ +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 BusinessSubParentSampleSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25832") + private Long id; + + @Schema(description = "样品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18364") + @NotNull(message = "样品ID不能为空") + private Long sampleId; + + @Schema(description = "样品主样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26057") + @NotNull(message = "样品主样ID不能为空") + private Long businessBaseSampleId; + + @Schema(description = "分样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2344") + @NotNull(message = "分样配置ID不能为空") + private Long configSubSampleParentId; + + @Schema(description = "分样类型ID,字典表:【T_DIC_BSN】化学样、试金样、仪器样", requiredMode = Schema.RequiredMode.REQUIRED, example = "21472") + @NotNull(message = "分样类型ID,字典表:【T_DIC_BSN】化学样、试金样、仪器样不能为空") + private Long dictionaryBusinessId; + + @Schema(description = "样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品编号不能为空") + private String sampleCode; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "样品名称不能为空") + private String sampleName; + + @Schema(description = "子样样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "子样样品编号不能为空") + private String subSampleCode; + + @Schema(description = "子样归库码") + private String subSampleReturnCode; + + @Schema(description = "上报人") + private String reporter; + + @Schema(description = "上报时间") + private LocalDateTime reportTime; + + @Schema(description = "审核流程code") + private String auditFlowCode; + + @Schema(description = "超差标注", example = "2") + private Integer assessmentStatus; + + @Schema(description = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotEmpty(message = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废不能为空") + private String sampleStatus; + + @Schema(description = "是否启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否启用,1-启用,0-不启用不能为空") + private Integer isEnabled; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "4381") + @NotNull(message = "乐观锁不能为空") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleAssessmentPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleAssessmentPageReqVO.java new file mode 100644 index 0000000..6c06835 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleAssessmentPageReqVO.java @@ -0,0 +1,72 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleAssessmentRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleAssessmentRespVO.java new file mode 100644 index 0000000..fc89996 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleAssessmentRespVO.java @@ -0,0 +1,91 @@ +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 BusinessSubSampleAssessmentRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18232") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "子样样ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21287") + @ExcelProperty("子样样ID") + private Long businessSubSampleId; + + @Schema(description = "检测项目ID,字典表【T_DIC_PRJ】", requiredMode = Schema.RequiredMode.REQUIRED, example = "19965") + @ExcelProperty("检测项目ID,字典表【T_DIC_PRJ】") + private Long dictionaryProjectId; + + @Schema(description = "检测方法分析项目配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11904") + @ExcelProperty("检测方法分析项目配置ID") + private Long configAssayMethodProjectId; + + @Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11800") + @ExcelProperty("检测方法配置ID") + private Long configAssayMethodId; + + @Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("任务类型,【字典】【jy_sample_task_type】常规、抽查...") + private Long taskType; + + @Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...") + private Long assayType; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("数据类型,【字典】【jy_sample_data_type】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间") + private String dataType; + + @Schema(description = "小数位") + @ExcelProperty("小数位") + private Integer decimalPosition; + + @Schema(description = "判定值") + @ExcelProperty("判定值") + private String assessmentValue; + + @Schema(description = "超差标注", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("超差标注") + private String assessmentStatus; + + @Schema(description = "是否已上报", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否已上报") + private Integer isReported; + + @Schema(description = "上报人", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("上报人") + private String reporter; + + @Schema(description = "上报时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("上报时间") + private LocalDateTime reportTime; + + @Schema(description = "复检次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "3971") + @ExcelProperty("复检次数") + private Integer recheckCount; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "21743") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleAssessmentSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleAssessmentSaveReqVO.java new file mode 100644 index 0000000..1917143 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleAssessmentSaveReqVO.java @@ -0,0 +1,82 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleExtendRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleExtendRespVO.java new file mode 100644 index 0000000..4c7135e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleExtendRespVO.java @@ -0,0 +1,13 @@ +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; + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSamplePageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSamplePageReqVO.java new file mode 100644 index 0000000..6518a53 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSamplePageReqVO.java @@ -0,0 +1,131 @@ +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 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 BusinessSubSamplePageReqVO extends PageParam { + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleReqVO.java new file mode 100644 index 0000000..452c20b --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleReqVO.java @@ -0,0 +1,129 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleRespVO.java new file mode 100644 index 0000000..fd8d17a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleRespVO.java @@ -0,0 +1,161 @@ +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.math.BigDecimal; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 子样业务 Response VO") +@Data +@ExcelIgnoreUnannotated +public class BusinessSubSampleRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18282") + @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 = "20299") + @ExcelProperty("子样配置ID") + private Long configSubSampleId; + + @Schema(description = "子样类型ID,字典表:【T_DIC_BSN】化学分析样、试金分析样、仪器分析样", requiredMode = Schema.RequiredMode.REQUIRED, example = "30304") + @ExcelProperty("子样类型ID,字典表:【T_DIC_BSN】化学分析样、试金分析样、仪器分析样") + private Long dictionaryBusinessId; + + @Schema(description = "库位信息ID", example = "28807") + @ExcelProperty("库位信息ID") + private Long configWarehouseLocationInfomationId; + + @Schema(description = "样品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13062") + @ExcelProperty("样品ID") + private Long sampleId; + + @Schema(description = "组ID,如果是委托创建的,则组ID和样品分样ID一致", example = "29885") + @ExcelProperty("组ID,如果是委托创建的,则组ID和样品分样ID一致") + private String groupId; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @ExcelProperty("样品名称") + private String sampleName; + + @Schema(description = "样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品编号") + private String sampleCode; + + @Schema(description = "分析编号") + @ExcelProperty("分析编号") + private String sampleAssayCode; + + @Schema(description = "归库编号") + @ExcelProperty("归库编号") + private String sampleReturnCode; + + @Schema(description = "是否称重,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否称重,1-启用,0-不启用") + private Integer isWeighing; + + @Schema(description = "末次样品重量") + @ExcelProperty("末次样品重量") + private BigDecimal lastSampleWeight; + + @Schema(description = "样品流程ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18294") + @ExcelProperty("样品流程ID") + private Long sampleFlowId; + + @Schema(description = "样品流程KEY", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品流程KEY") + private String sampleFlowKey; + + @Schema(description = "下一步样品流程名称", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("下一步样品流程名称") + private String nextSampleFlow; + + @Schema(description = "是否已生成归库码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否已生成归库码") + private Integer isGenerateReturnCode; + + @Schema(description = "任务指派给分析人") + @ExcelProperty("任务指派给分析人") + private String assayOperator; + + @Schema(description = "是否已指派", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否已指派") + private Integer isTasked; + + @Schema(description = "指派时间") + @ExcelProperty("指派时间") + private LocalDateTime taskTime; + + @Schema(description = "是否已上报", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否已上报") + private Integer isReported; + + @Schema(description = "上报人") + @ExcelProperty("上报人") + private String reporter; + + @Schema(description = "上报时间") + @ExcelProperty("上报时间") + private LocalDateTime reportTime; + + @Schema(description = "归库时间") + @ExcelProperty("归库时间") + private LocalDateTime returnTime; + + @Schema(description = "归库状态,【字典】【jy_sample_return_status】待归库、已归库、已调拨、已下架、待销毁、已销毁", example = "1") + @ExcelProperty("归库状态,【字典】【jy_sample_return_status】待归库、已归库、已调拨、已下架、待销毁、已销毁") + private Integer returnStatus; + + @Schema(description = "打印次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "28859") + @ExcelProperty("打印次数") + private Integer returnCodePrintCount; + + @Schema(description = "末次打印时间") + @ExcelProperty("末次打印时间") + private LocalDateTime printLastTime; + + @Schema(description = "样品流程节点时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品流程节点时间") + private LocalDateTime sampleFlowTime; + + @Schema(description = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废") + private String sampleStatus; + + @Schema(description = "是否启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否启用,1-启用,0-不启用") + private Integer isEnabled; + + @Schema(description = "分析元素备注") + @ExcelProperty("分析元素备注") + private String analysisRemark; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "8971") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleSaveReqVO.java new file mode 100644 index 0000000..3e3eb4e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/controller/vo/BusinessSubSampleSaveReqVO.java @@ -0,0 +1,142 @@ +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 com.alibaba.excel.annotation.ExcelProperty; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 子样业务新增/修改 Request VO") +@Data +public class BusinessSubSampleSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18282") + 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 = "20299") + @NotNull(message = "子样配置ID不能为空") + private Long configSubSampleId; + + @Schema(description = "子样类型ID,字典表:【T_DIC_BSN】化学分析样、试金分析样、仪器分析样", requiredMode = Schema.RequiredMode.REQUIRED, example = "30304") + @NotNull(message = "子样类型ID,字典表:【T_DIC_BSN】化学分析样、试金分析样、仪器分析样不能为空") + private Long dictionaryBusinessId; + + @Schema(description = "库位信息ID", example = "28807") + private Long configWarehouseLocationInfomationId; + + @Schema(description = "样品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13062") + @NotNull(message = "样品ID不能为空") + private Long sampleId; + + @Schema(description = "组ID,如果是委托创建的,则组ID和样品分样ID一致", example = "29885") + private String groupId; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @NotEmpty(message = "样品名称不能为空") + private String sampleName; + + @Schema(description = "样品编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品编号不能为空") + 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", requiredMode = Schema.RequiredMode.REQUIRED, example = "18294") + @NotNull(message = "样品流程ID不能为空") + private Long sampleFlowId; + + @Schema(description = "样品流程KEY", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品流程KEY不能为空") + private String sampleFlowKey; + + @Schema(description = "下一步样品流程名称", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "下一步样品流程名称不能为空") + private String nextSampleFlow; + + @Schema(description = "是否已生成归库码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否已生成归库码不能为空") + private Integer isGenerateReturnCode; + + @Schema(description = "任务指派给分析人") + private String assayOperator; + + @Schema(description = "是否已指派", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否已指派不能为空") + private Integer isTasked; + + @Schema(description = "指派时间") + private LocalDateTime taskTime; + + @Schema(description = "是否已上报", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否已上报不能为空") + private Integer isReported; + + @Schema(description = "上报人") + private String reporter; + + @Schema(description = "上报时间") + private LocalDateTime reportTime; + + @Schema(description = "归库时间") + private LocalDateTime returnTime; + + @Schema(description = "归库状态,【字典】【jy_sample_return_status】待归库、已归库、已调拨、已下架、待销毁、已销毁", example = "1") + private Integer returnStatus; + + @Schema(description = "打印次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "28859") + @NotNull(message = "打印次数不能为空") + private Integer returnCodePrintCount; + + @Schema(description = "末次打印时间") + private LocalDateTime printLastTime; + + @Schema(description = "样品流程节点时间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "样品流程节点时间不能为空") + private LocalDateTime sampleFlowTime; + + @Schema(description = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotEmpty(message = "样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废不能为空") + private String sampleStatus; + + @Schema(description = "是否启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否启用,1-启用,0-不启用不能为空") + private Integer isEnabled; + + @Schema(description = "分析元素备注") + private String analysisRemark; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "8971") + @NotNull(message = "乐观锁不能为空") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessAssayParameterDataDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessAssayParameterDataDO.java new file mode 100644 index 0000000..47deb10 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessAssayParameterDataDO.java @@ -0,0 +1,80 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 检测参数数据业务 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_asy_prm_dat") +@KeySequence("t_bsn_asy_prm_dat_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessAssayParameterDataDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 检测项目业务ID + */ + @TableField("BSN_ASY_PRJ_DAT_ID") + private Long businessAssayProjectDataId; + /** + * 检测方法分析项目参数配置表ID + */ + @TableField("CFG_ASY_MTHD_PRJ_PRM_ID") + private Long configAssayMethodProjectParameterId; + /** + * 参数ID,字典表【T_DIC_PRM】 + */ + @TableField("DIC_PRM_ID") + private Long dictionaryParameterId; + /** + * 参数值 + */ + @TableField("VAL") + private String value; + /** + * 数据类型,【字典】【jy_sample_data_type】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间 + */ + @TableField("DAT_TP") + private String dataType; + /** + * 小数位 + */ + @TableField("DEC_POS") + private Integer decimalPosition; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 乐观锁 + */ + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessAssayProjectDataDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessAssayProjectDataDO.java new file mode 100644 index 0000000..9969783 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessAssayProjectDataDO.java @@ -0,0 +1,90 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 检测项目数据业务 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_asy_prj_dat") +@KeySequence("t_bsn_asy_prj_dat_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessAssayProjectDataDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 检测任务ID + */ + @TableField("BSN_ASY_TSK_DAT_ID") + private Long businessAssayTaskDataId; + /** + * 检测方法分析项目配置ID + */ + @TableField("CFG_ASY_MTHD_PRJ_ID") + private Long configAssayMethodProjectId; + /** + * 检测项目字典ID,字典表【T_DIC_PRJ】 + */ + @TableField("DIC_PRJ_ID") + private Long dictionaryProjectId; + /** + * 值 + */ + @TableField("VAL") + private String value; + /** + * 数据类型,【字典】【jy_sample_data_type】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间 + */ + @TableField("DAT_TP") + private String dataType; + /** + * 小数位 + */ + @TableField("DEC_POS") + private Integer decimalPosition; + /** + * 是否不参与超差判定 + */ + @TableField("IS_NT_ASMT") + private Integer isNotAssessment; + /** + * 是否启用 + */ + @TableField("IS_ENBD") + private Integer isEnabled; + /** + * 乐观锁 + */ + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessAssayTaskDataDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessAssayTaskDataDO.java new file mode 100644 index 0000000..f433290 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessAssayTaskDataDO.java @@ -0,0 +1,125 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 子样检测任务业务 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_asy_tsk_dat") +@KeySequence("t_bsn_asy_tsk_dat_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessAssayTaskDataDO extends BusinessBaseDO { + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 样品主样ID + */ + @TableField("BSN_BSE_SMP_ID") + private Long businessBaseSampleId; + /** + * 样品分样ID + */ + @TableField("BSN_SB_PRN_SMP_ID") + private Long businessSubParentSampleId; + /** + * 分样子样ID + */ + @TableField("BSN_SB_SMP_ID") + private Long businessSubSampleId; + /** + * 检测方法ID + */ + @TableField("CFG_ASY_MTHD_ID") + private Long configAssayMethodId; + /** + * 指派单ID + */ + @TableField("BSN_ASY_TSK_ID") + private Long businessAssayTaskId; + /** + * 任务类型,【字典】【jy_sample_task_type】常规、抽查... + */ + @TableField("TSK_TP") + private String taskType; + /** + * 分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行... + */ + @TableField("ASY_TP") + private String assayType; + /** + * 分析人 + */ + @TableField("ASY_OPTR") + private String assayOperator; + /** + * 任务指派时间 + */ + @TableField("TSK_TM") + private LocalDateTime taskTime; + /** + * 是否已指派 + */ + @TableField("IS_TSKD") + private Integer isTasked; + /** + * 是否已上报 + */ + @TableField("IS_RPOD") + private Integer isReported; + /** + * 上报人 + */ + @TableField("RPTR") + private String reporter; + /** + * 上报时间 + */ + @TableField("RPT_TM") + private LocalDateTime reportTime; + /** + * 流程节点 + */ + @TableField("FLW_NDE") + private String flowNode; + /** + * 复检次数,0代表正常分析 + */ + @TableField("RCHK_CNT") + private Integer recheckCount; + /** + * 乐观锁 + */ + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessBaseSampleDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessBaseSampleDO.java new file mode 100644 index 0000000..40b070c --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessBaseSampleDO.java @@ -0,0 +1,113 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 主样业务 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_bse_smp") +@KeySequence("t_bsn_bse_smp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessBaseSampleDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 样品名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 样品编号 + */ + @TableField("SMP_CD") + private String sampleCode; + /** + * 主样配置ID + */ + @TableField("CFG_BSE_SMP_ID") + private Long configBaseSampleId; + /** + * 主样类型ID,字典表:【T_DIC_BSN】结算样、抽查样、委检样 + */ + @TableField("DIC_BSN_ID") + private Long dictionaryBusinessId; + /** + * 样品生成时间 + */ + @TableField("SMP_TM") + private LocalDateTime sampleTime; + /** + * 打印次数 + */ + @TableField("PRNT_CNT") + private Integer printCount; + /** + * 末次打印时间 + */ + @TableField("PRNT_LST_TM") + private LocalDateTime printLastTime; + /** + * 样品流程ID + */ + @TableField("SMP_FLW_ID") + private Long sampleFlowId; + /** + * 样品流程KEY + */ + @TableField("SMP_FLW_KY") + private String sampleFlowKey; + /** + * 样品流程节点时间 + */ + @TableField("SMP_FLW_TM") + private LocalDateTime sampleFlowTime; + /** + * 样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废 + */ + @TableField("SMP_STS") + private String sampleStatus; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 创建人名称 + */ + @TableField("OPTR") + private String operator; + /** + * 乐观锁 + */ + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessHandoverRecordSubDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessHandoverRecordSubDO.java new file mode 100644 index 0000000..3c39819 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessHandoverRecordSubDO.java @@ -0,0 +1,97 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.math.BigDecimal; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 子样交接记录业务 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_hnd_rcd_sb") +@KeySequence("t_bsn_hnd_rcd_sb_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessHandoverRecordSubDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 样品子样ID + */ + @TableField("BSN_SB_SMP_ID") + private Long businessSubSampleId; + /** + * 样品流程ID + */ + @TableField("SMP_FLW_ID") + private Long sampleFlowId; + /** + * 样品流程KEY + */ + @TableField("SMP_FLW_KY") + private String sampleFlowKey; + /** + * 样品编号 + */ + @TableField("SMP_CD") + private String sampleCode; + /** + * 样品重量 + */ + @TableField("SMP_WGT") + private BigDecimal sampleWeight; + /** + * 操作时间 + */ + @TableField("OPTN_TM") + private LocalDateTime operationTime; + /** + * 操作人 + */ + @TableField("OPTR") + private String operator; + /** + * 操作人ID + */ + @TableField("OPTR_ID") + private Long operatorId; + /** + * 送样人 + */ + @TableField("SND_SMP_OPTR") + private String sendSampleOperator; + /** + * 收样人 + */ + @TableField("RCV_SMP_OPTR") + private String receiveSampleOperator; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleAssayResultDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleAssayResultDO.java new file mode 100644 index 0000000..01c4a8f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleAssayResultDO.java @@ -0,0 +1,65 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 委检登记来样品位 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_smp_asy_rslt") +@KeySequence("t_bsn_smp_asy_rslt_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessSampleAssayResultDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 委托登记样品明细ID + */ + @TableField("BSN_SMP_ENTT_DTL_ID") + private Long businessSampleEntrustDetailId; + /** + * 样品主样ID + */ + @TableField("BSN_BSE_SMP_ID") + private Long businessBaseSampleId; + /** + * 来样品位 + */ + @TableField("DAT") + private String data; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 乐观锁 + */ + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustDetailDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustDetailDO.java new file mode 100644 index 0000000..2952aca --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustDetailDO.java @@ -0,0 +1,110 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 委检登记样品明细 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_smp_entt_dtl") +@KeySequence("t_bsn_smp_entt_dtl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessSampleEntrustDetailDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 检验委托登记ID + */ + @TableField("BSN_SMP_ENTT_REG_ID") + private Long businessSampleEntrustRegistrationId; + /** + * 主样业务ID + */ + @TableField("BSN_BSE_SMP_ID") + private Long businessBaseSampleId; + /** + * 样品大类ID + */ + @TableField("BSE_SMP_ID") + private Long baseSampleId; + /** + * 样品类型ID,字典表:【T_DIC_BSN】结算样、委检样、生产样等 + */ + @TableField("DIC_BSN_ID") + private Long dictionaryBusinessId; + /** + * 样品名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 样品编号 + */ + @TableField("SMP_CD") + private String sampleCode; + /** + * 委托样品名称 + */ + @TableField("ENTT_SMP_NAME") + private String entrustSampleName; + /** + * 委托样品编号 + */ + @TableField("ENTT_SMP_CD") + private String entrustSampleCode; + /** + * 排序 + */ + @TableField("SRT") + private Integer sort; + /** + * 检测项目 + */ + @TableField("ASY_PRJ") + private String assayProject; + /** + * 预报结果 + */ + @TableField("FRCST_RSLT") + private String forecastResult; + /** + * 是否称重,1-启用,0-不启用 + */ + @TableField("IS_WG") + private Integer isWeighing; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 乐观锁 + */ + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustProjectDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustProjectDO.java new file mode 100644 index 0000000..e5a0bab --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustProjectDO.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 委检样品检测项目业务 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_smp_entt_prj") +@KeySequence("t_bsn_smp_entt_prj_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessSampleEntrustProjectDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 样品检验委托明细ID + */ + @TableField("BSN_SMP_ENTT_DTL_ID") + private Long businessSampleEntrustDetailId; + /** + * 物料检测标准检测项目ID + */ + @TableField("MTRL_ASY_STD_DTL_ID") + private Long materialAssayStandardDetailId; + /** + * 检测项目ID,字典表:【T_DIC_PRJ】 + */ + @TableField("DIC_PRJ_ID") + private Long dictionaryProjectId; + /** + * 是否启用,1-启用,0-不启用 + */ + @TableField("IS_ENBD") + private Integer isEnabled; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 乐观锁 + */ + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustRegistrationDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustRegistrationDO.java new file mode 100644 index 0000000..124938f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleEntrustRegistrationDO.java @@ -0,0 +1,249 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 委检登记业务 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_smp_entt_reg") +@KeySequence("t_bsn_smp_entt_reg_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessSampleEntrustRegistrationDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 委托ID + */ + @TableField("ENTT_ID") + private Long entrustId; + /** + * 委托单号 + */ + @TableField("ENTT_NUM") + private String entrustNumber; + /** + * 委托单位/送样单位 + */ + @TableField("ENTT_UNT") + private String entrustUnit; + /** + * 委托来源,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托 + */ + @TableField("CFG_ENTT_SRC_ID") + private Long configEntrustSourceId; + /** + * 样品数量 + */ + @TableField("SMP_QTY") + private Integer sampleQuantity; + /** + * 任务数量 + */ + @TableField("TSK_QTY") + private Integer taskQuantity; + /** + * 已完成任务数量 + */ + @TableField("TSK_FIND_QTY") + private Integer taskFinishedQuantity; + /** + * 余样要求,【字典】【jy_sample_entrust_remaine_requirement】余样返回、放弃 + */ + @TableField("RMNE_SMP_REQM") + private String remaineSampleRequirement; + /** + * 样品状态,【字典】【jy_sample_entrust_status】块状、粉末、颗粒、液体 + */ + @TableField("SMP_STS") + private String sampleStatus; + /** + * 电话 + */ + @TableField("TEL") + private String tel; + /** + * 传真 + */ + @TableField("FAX") + private String fax; + /** + * 通讯地址 + */ + @TableField("ADR") + private String address; + /** + * 邮编 + */ + @TableField("PSTL") + private String postal; + /** + * E-mail + */ + @TableField("EM") + private String email; + /** + * 委托检测类别,【字典】【jy_sample_entrust_category】一般委托、仲裁委托 + */ + @TableField("ENTT_CTGR") + private String entrustCategory; + /** + * 样品类别(装港/卸港),【字典】【jy_sample_entrust_category】装港样、卸港样 + */ + @TableField("SMP_CTGR") + private String sampleCategory; + /** + * 样品来源,【字典】【jy_sample_entrust_origin】送样、邮寄、现场取样 + */ + @TableField("SMP_ORGN") + private String sampleOrigin; + /** + * 保密要求,【字典】【jy_sample_entrust_secrecy_requirement】要求对样品和文件保密、无保密要求 + */ + @TableField("SCRY_REQR") + private String secrecyRequire; + /** + * 检测方法,【字典】【jy_sample_entrust_assay_method】国标、行标、客户要求、检测方依据样品选择 + */ + @TableField("ASY_MTHD") + private String assayMethod; + /** + * 送样人 + */ + @TableField("SMP_SNDR") + private String sampleSender; + /** + * 送样日期 + */ + @TableField("SMP_SND_DT") + private LocalDateTime sampleSendDate; + /** + * 收样人 + */ + @TableField("SMP_RCVR") + private String sampleReceiver; + /** + * 收样日期 + */ + @TableField("SMP_RCV_DT") + private LocalDateTime sampleReceiveDate; + /** + * 登记状态,register-登记中、submitted-已提交 + */ + @TableField("REG_STS") + private String registrationStatus; + /** + * 数据校验状态,success-数据校验成功、fail-数据校验失败 + */ + @TableField("DAT_CHK_STS") + private String dataCheckStatus; + /** + * 检验状态,unchecked-未检验;checked-已检验 + */ + @TableField("ASY_STS") + private String assayStatus; + /** + * 数据回报状态,unreturned-未回报;returned-已回报 + */ + @TableField("DAT_STS") + private String dataStatus; + /** + * 报告IDs + */ + @TableField("DOC_MAIN_ID") + private String documentMainId; + /** + * 报告发送方式,【字典】【jy_sample_entrust_send_way】自取、邮寄、电话、传真、E-mail + */ + @TableField("DOC_SND_WY") + private String documentSendWay; + /** + * 报告发送人 + */ + @TableField("DOC_PUBR") + private String documentPublisher; + /** + * 报告发送日期 + */ + @TableField("DOC_PUBR_DT") + private LocalDateTime documentPublisherDate; + /** + * 报告接收人 + */ + @TableField("DOC_RCVR") + private String documentReceiver; + /** + * 报告接收日期 + */ + @TableField("DOC_RCV_DT") + private LocalDateTime documentReceiveDate; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 乐观锁 + */ + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 扩展信息 + */ + @TableField("EXT_INF") + private String externalInfomation; + /** + * 数据集key,T_DAT_COLT_FLD + */ + @TableField("DAT_COLT_ID") + private Long dataCollectionId; + /** + * 创建方式,手动创建-manual、外部系统创建-interface + */ + @TableField("CRT_WY") + private String createWay; + /** + * 创建人 + */ + @TableField("CRT_OPTR") + private String createOperator; + /** + * 委托类型:委托登记-entrust_registration、检验委托-entrust_inspection + */ + @TableField("ENTT_TP") + private String entrustType; + /** + * 委托时间 + */ + @TableField("ENTT_TM") + private LocalDateTime entrustTime; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleHandoverDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleHandoverDO.java new file mode 100644 index 0000000..75b1bf4 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleHandoverDO.java @@ -0,0 +1,101 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 样品交接单业务 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_smp_hnd") +@KeySequence("t_bsn_smp_hnd_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessSampleHandoverDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 交接单编号 + */ + @TableField("CD") + private String code; + /** + * 交接单名称 + */ + @TableField("NAME") + private String name; + /** + * 交接单模版Key + */ + @TableField("TMPL_KY") + private String templateKey; + /** + * 样品流程ID + */ + @TableField("SMP_FLW_ID") + private String sampleFlowId; + /** + * 样品流程code + */ + @TableField("SMP_FLW_CD") + private String sampleFlowCode; + /** + * 操作类型,【字典】【jy_sample_handover_biz type】归库、调拨、下架、销毁 + */ + @TableField("OPTN_TP") + private String operationType; + /** + * 操作时间 + */ + @TableField("OPTN_TM") + private LocalDateTime operationTime; + /** + * 操作人 + */ + @TableField("OPTR") + private String operator; + /** + * 操作人ID + */ + @TableField("OPTR_ID") + private Long operatorId; + /** + * 流程模型Key + */ + @TableField("MDL_KY") + private String modelKey; + /** + * 流程流水号 + */ + @TableField("FLW_SRL_NUM") + private String flowSerialNumber; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleHandoverDetailDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleHandoverDetailDO.java new file mode 100644 index 0000000..9303c7b --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSampleHandoverDetailDO.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.math.BigDecimal; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 样品交接明细 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_smp_hnd_dtl") +@KeySequence("t_bsn_smp_hnd_dtl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessSampleHandoverDetailDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 交接单ID + */ + @TableField("BSN_SMP_HND_ID") + private Long businessSampleHandoverId; + /** + * 样品子样ID + */ + @TableField("BSN_SB_SMP_ID") + private Long businessSubSampleId; + /** + * 样品名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 样品编号 + */ + @TableField("SMP_CD") + private String sampleCode; + /** + * 样品重量 + */ + @TableField("SMP_WGT") + private BigDecimal sampleWeight; + /** + * 天平编号 + */ + @TableField("BAL_CD") + private String balanceCode; + /** + * 样品类型ID,字典表:【T_DIC_BSN】 + */ + @TableField("DIC_BSN_ID") + private Long dictionaryBusinessId; + /** + * 样品类型 + */ + @TableField("DIC_BSN_NAME") + private String dictionaryBusinessName; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSubParentSampleDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSubParentSampleDO.java new file mode 100644 index 0000000..8ffb5ab --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSubParentSampleDO.java @@ -0,0 +1,121 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 分样业务 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_sb_prn_smp") +@KeySequence("t_bsn_sb_prn_smp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessSubParentSampleDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 样品ID + */ + @TableField("SMP_ID") + private Long sampleId; + /** + * 样品主样ID + */ + @TableField("BSN_BSE_SMP_ID") + private Long businessBaseSampleId; + /** + * 分样配置ID + */ + @TableField("CFG_SB_SMP_PRN_ID") + private Long configSubSampleParentId; + /** + * 分样类型ID,字典表:【T_DIC_BSN】化学样、试金样、仪器样 + */ + @TableField("DIC_BSN_ID") + private Long dictionaryBusinessId; + /** + * 样品编号 + */ + @TableField("SMP_CD") + private String sampleCode; + /** + * 样品名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 子样样品编号 + */ + @TableField("SB_SMP_CD") + private String subSampleCode; + /** + * 子样归库码 + */ + @TableField("SB_SMP_RTN_CD") + private String subSampleReturnCode; + /** + * 上报人 + */ + @TableField("RPTR") + private String reporter; + /** + * 上报时间 + */ + @TableField("RPT_TM") + private LocalDateTime reportTime; + /** + * 审核流程code + */ + @TableField("AUD_FLW_CD") + private String auditFlowCode; + /** + * 超差标注 + */ + @TableField("ASMT_STS") + private Integer assessmentStatus; + /** + * 样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废 + */ + @TableField("SMP_STS") + private String sampleStatus; + /** + * 是否启用,1-启用,0-不启用 + */ + @TableField("IS_ENBD") + private Integer isEnabled; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 乐观锁 + */ + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSubSampleAssessmentDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSubSampleAssessmentDO.java new file mode 100644 index 0000000..2d4009a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSubSampleAssessmentDO.java @@ -0,0 +1,121 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 子样判定数据业务 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_sb_smp_asmt") +@KeySequence("t_bsn_sb_smp_asmt_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessSubSampleAssessmentDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 子样样ID + */ + @TableField("BSN_SB_SMP_ID") + private Long businessSubSampleId; + /** + * 检测项目ID,字典表【T_DIC_PRJ】 + */ + @TableField("DIC_PRJ_ID") + private Long dictionaryProjectId; + /** + * 检测方法分析项目配置ID + */ + @TableField("CFG_ASY_MTHD_PRJ_ID") + private Long configAssayMethodProjectId; + /** + * 检测方法配置ID + */ + @TableField("CFG_ASY_MTHD_ID") + private Long configAssayMethodId; + /** + * 任务类型,【字典】【jy_sample_task_type】常规、抽查... + */ + @TableField("TSK_TP") + private Long taskType; + /** + * 分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行... + */ + @TableField("ASY_TP") + private Long assayType; + /** + * 数据类型,【字典】【jy_sample_data_type】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间 + */ + @TableField("DAT_TP") + private String dataType; + /** + * 小数位 + */ + @TableField("DEC_POS") + private Integer decimalPosition; + /** + * 判定值 + */ + @TableField("ASMT_VAL") + private String assessmentValue; + /** + * 超差标注 + */ + @TableField("ASMT_STS") + private String assessmentStatus; + /** + * 是否已上报 + */ + @TableField("IS_RPOD") + private Integer isReported; + /** + * 上报人 + */ + @TableField("RPTR") + private String reporter; + /** + * 上报时间 + */ + @TableField("RPT_TM") + private LocalDateTime reportTime; + /** + * 复检次数 + */ + @TableField("RCHK_CNT") + private Integer recheckCount; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 乐观锁 + */ + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSubSampleDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSubSampleDO.java new file mode 100644 index 0000000..58a03e8 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/dataobject/BusinessSubSampleDO.java @@ -0,0 +1,211 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.dataobject; + +import lombok.*; +import java.util.*; +import java.math.BigDecimal; +import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 子样业务 DO +* +* @author 后台管理 +*/ +@TableName("t_bsn_sb_smp") +@KeySequence("t_bsn_sb_smp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BusinessSubSampleDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 样品主样ID + */ + @TableField("BSN_BSE_SMP_ID") + private Long businessBaseSampleId; + /** + * 样品分样ID + */ + @TableField("BSN_SB_PRN_SMP_ID") + private Long businessSubParentSampleId; + /** + * 子样配置ID + */ + @TableField("CFG_SB_SMP_ID") + private Long configSubSampleId; + /** + * 子样类型ID,字典表:【T_DIC_BSN】化学分析样、试金分析样、仪器分析样 + */ + @TableField("DIC_BSN_ID") + private Long dictionaryBusinessId; + /** + * 库位信息ID + */ + @TableField("CFG_WRH_LOC_INF_ID") + private Long configWarehouseLocationInfomationId; + /** + * 样品ID + */ + @TableField("SMP_ID") + private Long sampleId; + /** + * 组ID,如果是委托创建的,则组ID和样品分样ID一致 + */ + @TableField("GRP_ID") + private String groupId; + /** + * 样品名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 样品编号 + */ + @TableField("SMP_CD") + private String sampleCode; + /** + * 分析编号 + */ + @TableField("SMP_ASY_CD") + private String sampleAssayCode; + /** + * 归库编号 + */ + @TableField("SMP_RTN_CD") + private String sampleReturnCode; + /** + * 是否称重,1-启用,0-不启用 + */ + @TableField("IS_WG") + private Integer isWeighing; + /** + * 末次样品重量 + */ + @TableField("LST_SMP_WGT") + private BigDecimal lastSampleWeight; + /** + * 样品流程ID + */ + @TableField("SMP_FLW_ID") + private Long sampleFlowId; + /** + * 样品流程KEY + */ + @TableField("SMP_FLW_KY") + private String sampleFlowKey; + /** + * 下一步样品流程名称 + */ + @TableField("NXT_SMP_FLW") + private String nextSampleFlow; + /** + * 是否已生成归库码 + */ + @TableField("IS_GEN_RTN_CD") + private Integer isGenerateReturnCode; + /** + * 任务指派给分析人 + */ + @TableField("ASY_OPTR") + private String assayOperator; + /** + * 是否已指派 + */ + @TableField("IS_TSKD") + private Integer isTasked; + /** + * 指派时间 + */ + @TableField("TSK_TM") + private LocalDateTime taskTime; + /** + * 是否已上报 + */ + @TableField("IS_RPOD") + private Integer isReported; + /** + * 上报人 + */ + @TableField("RPTR") + private String reporter; + /** + * 上报时间 + */ + @TableField("RPT_TM") + private LocalDateTime reportTime; + /** + * 归库时间 + */ + @TableField("RTN_TM") + private LocalDateTime returnTime; + /** + * 归库状态,【字典】【jy_sample_return_status】待归库、已归库、已调拨、已下架、待销毁、已销毁 + */ + @TableField("RTN_STS") + private Integer returnStatus; + /** + * 打印次数 + */ + @TableField("RTN_CD_PRNT_CNT") + private Integer returnCodePrintCount; + /** + * 末次打印时间 + */ + @TableField("PRNT_LST_TM") + private LocalDateTime printLastTime; + /** + * 样品流程节点时间 + */ + @TableField("SMP_FLW_TM") + private LocalDateTime sampleFlowTime; + /** + * 样品状态,【字典】【jy_sample_status】normal-正常、isolation-隔离、void-作废 + */ + @TableField("SMP_STS") + private String sampleStatus; + /** + * 是否启用,1-启用,0-不启用 + */ + @TableField("IS_ENBD") + private Integer isEnabled; + /** + * 分析元素备注 + */ + @TableField("ANL_RMK") + private String analysisRemark; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 乐观锁 + */ + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayParameterDataMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayParameterDataMapper.java new file mode 100644 index 0000000..7f5ebf5 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayParameterDataMapper.java @@ -0,0 +1,35 @@ +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 { + + default PageResult selectPage(BusinessAssayParameterDataPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .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)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayProjectDataMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayProjectDataMapper.java new file mode 100644 index 0000000..50d7f53 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayProjectDataMapper.java @@ -0,0 +1,37 @@ +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 { + + default PageResult selectPage(BusinessAssayProjectDataPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .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)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayTaskDataMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayTaskDataMapper.java new file mode 100644 index 0000000..dd925c9 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayTaskDataMapper.java @@ -0,0 +1,89 @@ +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 { + + + List> selectUnAssayTaskGroupList(); + + default List selectList(BusinessAssayTaskDataReqVO reqVO) { + return selectJoinList(BusinessAssayTaskDataExtendRespVO.class, new MPJLambdaWrapperX() + .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 selectPage(BusinessAssayTaskDataPageReqVO reqVO) { + return selectJoinPage(reqVO, BusinessAssayTaskDataExtendRespVO.class, new MPJLambdaWrapperX() + .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)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessBaseSampleMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessBaseSampleMapper.java new file mode 100644 index 0000000..4d14019 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessBaseSampleMapper.java @@ -0,0 +1,41 @@ +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.BusinessBaseSamplePageReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessBaseSampleDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 主样业务 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface BusinessBaseSampleMapper extends BaseMapperX { + + default PageResult selectPage(BusinessBaseSamplePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(BusinessBaseSampleDO::getSampleName, reqVO.getSampleName()) + .eqIfPresent(BusinessBaseSampleDO::getSampleCode, reqVO.getSampleCode()) + .eqIfPresent(BusinessBaseSampleDO::getConfigBaseSampleId, reqVO.getConfigBaseSampleId()) + .eqIfPresent(BusinessBaseSampleDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId()) + .betweenIfPresent(BusinessBaseSampleDO::getSampleTime, reqVO.getSampleTime()) + .eqIfPresent(BusinessBaseSampleDO::getPrintCount, reqVO.getPrintCount()) + .betweenIfPresent(BusinessBaseSampleDO::getPrintLastTime, reqVO.getPrintLastTime()) + .eqIfPresent(BusinessBaseSampleDO::getSampleFlowId, reqVO.getSampleFlowId()) + .eqIfPresent(BusinessBaseSampleDO::getSampleFlowKey, reqVO.getSampleFlowKey()) + .betweenIfPresent(BusinessBaseSampleDO::getSampleFlowTime, reqVO.getSampleFlowTime()) + .eqIfPresent(BusinessBaseSampleDO::getSampleStatus, reqVO.getSampleStatus()) + .eqIfPresent(BusinessBaseSampleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .eqIfPresent(BusinessBaseSampleDO::getOperator, reqVO.getOperator()) + .betweenIfPresent(BusinessBaseSampleDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(BusinessBaseSampleDO::getUpdateCount, reqVO.getUpdateCount()) + .eqIfPresent(BusinessBaseSampleDO::getRemark, reqVO.getRemark()) + .orderByDesc(BusinessBaseSampleDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessHandoverRecordSubMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessHandoverRecordSubMapper.java new file mode 100644 index 0000000..a6f9239 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessHandoverRecordSubMapper.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.qms.business.bus.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.MPJLambdaWrapperX; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessHandoverRecordSubExtendRespVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessHandoverRecordSubPageReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessHandoverRecordSubDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO; +import cn.iocoder.yudao.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 子样交接记录业务 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface BusinessHandoverRecordSubMapper extends BaseMapperX { + + default PageResult selectPage(BusinessHandoverRecordSubPageReqVO reqVO) { + return selectJoinPage(reqVO, BusinessHandoverRecordSubExtendRespVO.class, new MPJLambdaWrapperX() + .leftJoin(BusinessSubSampleDO.class, BusinessSubSampleDO::getId, BusinessHandoverRecordSubDO::getBusinessSubSampleId) + .leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, BusinessSubSampleDO::getDictionaryBusinessId) + .selectAll(BusinessHandoverRecordSubDO.class) + .selectAs(BusinessSubSampleDO::getSampleName, BusinessHandoverRecordSubExtendRespVO::getSampleName) + .selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessHandoverRecordSubExtendRespVO::getSampleAssayCode) + .selectAs(BusinessSubSampleDO::getSampleReturnCode, BusinessHandoverRecordSubExtendRespVO::getSampleReturnCode) + .selectAs(DictionaryBusinessDO::getName, BusinessHandoverRecordSubExtendRespVO::getDictionaryBusinessName) + .eqIfPresent(BusinessHandoverRecordSubDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId()) + .eqIfPresent(BusinessHandoverRecordSubDO::getSampleFlowId, reqVO.getSampleFlowId()) + .eqIfPresent(BusinessHandoverRecordSubDO::getSampleFlowKey, reqVO.getSampleFlowKey()) + .eqIfPresent(BusinessHandoverRecordSubDO::getSampleCode, reqVO.getSampleCode()) + .eqIfPresent(BusinessHandoverRecordSubDO::getSampleWeight, reqVO.getSampleWeight()) + .betweenIfPresent(BusinessHandoverRecordSubDO::getOperationTime, reqVO.getOperationTime()) + .eqIfPresent(BusinessHandoverRecordSubDO::getOperator, reqVO.getOperator()) + .eqIfPresent(BusinessHandoverRecordSubDO::getOperatorId, reqVO.getOperatorId()) + .eqIfPresent(BusinessHandoverRecordSubDO::getSendSampleOperator, reqVO.getSendSampleOperator()) + .eqIfPresent(BusinessHandoverRecordSubDO::getReceiveSampleOperator, reqVO.getReceiveSampleOperator()) + .eqIfPresent(BusinessHandoverRecordSubDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(BusinessHandoverRecordSubDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(BusinessHandoverRecordSubDO::getRemark, reqVO.getRemark()) + .orderByDesc(BusinessHandoverRecordSubDO::getCreateTime)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleAssayResultMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleAssayResultMapper.java new file mode 100644 index 0000000..d54bd2b --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleAssayResultMapper.java @@ -0,0 +1,44 @@ +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.BusinessSampleAssayResultPageReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleAssayResultDO; +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 BusinessSampleAssayResultMapper extends BaseMapperX { + + default PageResult selectPage(BusinessSampleAssayResultPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(BusinessSampleAssayResultDO::getBusinessSampleEntrustDetailId, reqVO.getBusinessSampleEntrustDetailId()) + .eqIfPresent(BusinessSampleAssayResultDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId()) + .eqIfPresent(BusinessSampleAssayResultDO::getData, reqVO.getData()) + .eqIfPresent(BusinessSampleAssayResultDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(BusinessSampleAssayResultDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(BusinessSampleAssayResultDO::getUpdateCount, reqVO.getUpdateCount()) + .eqIfPresent(BusinessSampleAssayResultDO::getRemark, reqVO.getRemark()) + .orderByDesc(BusinessSampleAssayResultDO::getId)); + } + + /** + * 物理批量删除删除 + * @param idList + * @return + */ + int physicalDeleteByIds(@Param("idList") List idList); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustDetailMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustDetailMapper.java new file mode 100644 index 0000000..06df1a0 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustDetailMapper.java @@ -0,0 +1,53 @@ +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 { + + default PageResult selectPage(BusinessSampleEntrustDetailPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .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 idList); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustProjectMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustProjectMapper.java new file mode 100644 index 0000000..34e9aa0 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustProjectMapper.java @@ -0,0 +1,45 @@ +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 { + + default PageResult selectPage(BusinessSampleEntrustProjectPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .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 idList); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustRegistrationMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustRegistrationMapper.java new file mode 100644 index 0000000..fb8fb08 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustRegistrationMapper.java @@ -0,0 +1,77 @@ +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.BusinessSampleEntrustRegistrationExtendRespVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustRegistrationPageReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigEntrustSourceDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 委检登记业务 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface BusinessSampleEntrustRegistrationMapper extends BaseMapperX { + + default PageResult selectPage(BusinessSampleEntrustRegistrationPageReqVO reqVO) { + return selectJoinPage(reqVO, BusinessSampleEntrustRegistrationExtendRespVO.class, new MPJLambdaWrapperX() + .selectSub(BusinessSampleEntrustDetailDO.class, s -> s.selectCount(BusinessSampleEntrustDetailDO::getId).eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, BusinessSampleEntrustRegistrationDO::getId).eq(BusinessSampleEntrustDetailDO::getIsWeighing, 1), BusinessSampleEntrustRegistrationExtendRespVO::getSampleWeighingCount) + .leftJoin(ConfigEntrustSourceDO.class, ConfigEntrustSourceDO::getId, BusinessSampleEntrustRegistrationDO::getConfigEntrustSourceId) + .selectAll(BusinessSampleEntrustRegistrationDO.class) + .selectAs(ConfigEntrustSourceDO::getName, BusinessSampleEntrustRegistrationExtendRespVO::getConfigEntrustSourceName) + .selectAs(ConfigEntrustSourceDO::getTemplate, BusinessSampleEntrustRegistrationExtendRespVO::getEntrustReportTemplate) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getEntrustId, reqVO.getEntrustId()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getEntrustNumber, reqVO.getEntrustNumber()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getEntrustUnit, reqVO.getEntrustUnit()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getConfigEntrustSourceId, reqVO.getConfigEntrustSourceId()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getSampleQuantity, reqVO.getSampleQuantity()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getTaskQuantity, reqVO.getTaskQuantity()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getTaskFinishedQuantity, reqVO.getTaskFinishedQuantity()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getRemaineSampleRequirement, reqVO.getRemaineSampleRequirement()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getSampleStatus, reqVO.getSampleStatus()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getTel, reqVO.getTel()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getFax, reqVO.getFax()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getAddress, reqVO.getAddress()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getPostal, reqVO.getPostal()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getEmail, reqVO.getEmail()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getEntrustCategory, reqVO.getEntrustCategory()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getSampleCategory, reqVO.getSampleCategory()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getSampleOrigin, reqVO.getSampleOrigin()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getSecrecyRequire, reqVO.getSecrecyRequire()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getAssayMethod, reqVO.getAssayMethod()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getSampleSender, reqVO.getSampleSender()) + .betweenIfPresent(BusinessSampleEntrustRegistrationDO::getSampleSendDate, reqVO.getSampleSendDate()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getSampleReceiver, reqVO.getSampleReceiver()) + .betweenIfPresent(BusinessSampleEntrustRegistrationDO::getSampleReceiveDate, reqVO.getSampleReceiveDate()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getRegistrationStatus, reqVO.getRegistrationStatus()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getDataCheckStatus, reqVO.getDataCheckStatus()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getAssayStatus, reqVO.getAssayStatus()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getDataStatus, reqVO.getDataStatus()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getDocumentMainId, reqVO.getDocumentMainId()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getDocumentSendWay, reqVO.getDocumentSendWay()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getDocumentPublisher, reqVO.getDocumentPublisher()) + .betweenIfPresent(BusinessSampleEntrustRegistrationDO::getDocumentPublisherDate, reqVO.getDocumentPublisherDate()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getDocumentReceiver, reqVO.getDocumentReceiver()) + .betweenIfPresent(BusinessSampleEntrustRegistrationDO::getDocumentReceiveDate, reqVO.getDocumentReceiveDate()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(BusinessSampleEntrustRegistrationDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getUpdateCount, reqVO.getUpdateCount()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getRemark, reqVO.getRemark()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getExternalInfomation, reqVO.getExternalInfomation()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getDataCollectionId, reqVO.getDataCollectionId()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getCreateWay, reqVO.getCreateWay()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getCreateOperator, reqVO.getCreateOperator()) + .eqIfPresent(BusinessSampleEntrustRegistrationDO::getEntrustType, reqVO.getEntrustType()) + .betweenIfPresent(BusinessSampleEntrustRegistrationDO::getEntrustTime, reqVO.getEntrustTime()) + .orderByDesc(BusinessSampleEntrustRegistrationDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleHandoverDetailMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleHandoverDetailMapper.java new file mode 100644 index 0000000..bb65ad0 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleHandoverDetailMapper.java @@ -0,0 +1,36 @@ +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 { + + default PageResult selectPage(BusinessSampleHandoverDetailPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .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)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleHandoverMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleHandoverMapper.java new file mode 100644 index 0000000..7ac3bed --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleHandoverMapper.java @@ -0,0 +1,39 @@ +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.BusinessSampleHandoverDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 样品交接单业务 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface BusinessSampleHandoverMapper extends BaseMapperX { + + default PageResult selectPage(BusinessSampleHandoverPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(BusinessSampleHandoverDO::getCode, reqVO.getCode()) + .likeIfPresent(BusinessSampleHandoverDO::getName, reqVO.getName()) + .eqIfPresent(BusinessSampleHandoverDO::getTemplateKey, reqVO.getTemplateKey()) + .eqIfPresent(BusinessSampleHandoverDO::getSampleFlowId, reqVO.getSampleFlowId()) + .eqIfPresent(BusinessSampleHandoverDO::getSampleFlowCode, reqVO.getSampleFlowCode()) + .eqIfPresent(BusinessSampleHandoverDO::getOperationType, reqVO.getOperationType()) + .betweenIfPresent(BusinessSampleHandoverDO::getOperationTime, reqVO.getOperationTime()) + .eqIfPresent(BusinessSampleHandoverDO::getOperator, reqVO.getOperator()) + .eqIfPresent(BusinessSampleHandoverDO::getOperatorId, reqVO.getOperatorId()) + .eqIfPresent(BusinessSampleHandoverDO::getModelKey, reqVO.getModelKey()) + .eqIfPresent(BusinessSampleHandoverDO::getFlowSerialNumber, reqVO.getFlowSerialNumber()) + .eqIfPresent(BusinessSampleHandoverDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(BusinessSampleHandoverDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(BusinessSampleHandoverDO::getRemark, reqVO.getRemark()) + .orderByDesc(BusinessSampleHandoverDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubParentSampleMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubParentSampleMapper.java new file mode 100644 index 0000000..4335a8b --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubParentSampleMapper.java @@ -0,0 +1,43 @@ +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.BusinessSubParentSamplePageReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 分样业务 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface BusinessSubParentSampleMapper extends BaseMapperX { + + default PageResult selectPage(BusinessSubParentSamplePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(BusinessSubParentSampleDO::getSampleId, reqVO.getSampleId()) + .eqIfPresent(BusinessSubParentSampleDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId()) + .eqIfPresent(BusinessSubParentSampleDO::getConfigSubSampleParentId, reqVO.getConfigSubSampleParentId()) + .eqIfPresent(BusinessSubParentSampleDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId()) + .eqIfPresent(BusinessSubParentSampleDO::getSampleCode, reqVO.getSampleCode()) + .likeIfPresent(BusinessSubParentSampleDO::getSampleName, reqVO.getSampleName()) + .eqIfPresent(BusinessSubParentSampleDO::getSubSampleCode, reqVO.getSubSampleCode()) + .eqIfPresent(BusinessSubParentSampleDO::getSubSampleReturnCode, reqVO.getSubSampleReturnCode()) + .eqIfPresent(BusinessSubParentSampleDO::getReporter, reqVO.getReporter()) + .betweenIfPresent(BusinessSubParentSampleDO::getReportTime, reqVO.getReportTime()) + .eqIfPresent(BusinessSubParentSampleDO::getAuditFlowCode, reqVO.getAuditFlowCode()) + .eqIfPresent(BusinessSubParentSampleDO::getAssessmentStatus, reqVO.getAssessmentStatus()) + .eqIfPresent(BusinessSubParentSampleDO::getSampleStatus, reqVO.getSampleStatus()) + .eqIfPresent(BusinessSubParentSampleDO::getIsEnabled, reqVO.getIsEnabled()) + .eqIfPresent(BusinessSubParentSampleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(BusinessSubParentSampleDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(BusinessSubParentSampleDO::getUpdateCount, reqVO.getUpdateCount()) + .eqIfPresent(BusinessSubParentSampleDO::getRemark, reqVO.getRemark()) + .orderByDesc(BusinessSubParentSampleDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleAssessmentMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleAssessmentMapper.java new file mode 100644 index 0000000..aa9ec32 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleAssessmentMapper.java @@ -0,0 +1,43 @@ +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 { + + default PageResult selectPage(BusinessSubSampleAssessmentPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .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)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleMapper.java new file mode 100644 index 0000000..937c9e7 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleMapper.java @@ -0,0 +1,117 @@ +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 { + + default PageResult selectPage(BusinessSubSamplePageReqVO reqVO) { + return selectJoinPage(reqVO, BusinessSubSampleExtendRespVO.class, new MPJLambdaWrapperX() + .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 selectlist(@Valid BusinessSubSampleReqVO reqVO) { + return selectJoinList(BusinessSubSampleExtendRespVO.class, new MPJLambdaWrapperX() + .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() + .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)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/AssignAssayUser.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/AssignAssayUser.java new file mode 100644 index 0000000..108b5f9 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/AssignAssayUser.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.param; + +import lombok.Data; + +/** + * 分配分析人员 + */ +@Data +public class AssignAssayUser { + + /** 用户id **/ + private Long userId; + + /** 用户名 **/ + private String userName; + + /** 姓名 **/ + private String realName; + + /** 样品数量 **/ + private Integer sampleNum; +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustDetail.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustDetail.java new file mode 100644 index 0000000..b906f0d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustDetail.java @@ -0,0 +1,58 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.param; + +import java.util.List; + +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class SampleEntrustDetail { + + /** ID **/ + private Long id; + + /** 委托登记id **/ + private Long businessSampleEntrustRegistrationId; + + /** 样品大类id **/ + private Long baseSampleId; + + /** 主样业务ID **/ + private Long businessBaseSampleId; + + /** 样品类型ID 字典表:【T_DIC_BSN】结算样、委检样、生产样等 **/ + private Long dictionaryBusinessId; + + /** 样品名称 **/ + private String sampleName; + + /** 样品编号 **/ + private String sampleCode; + + /** 委托样品名称 **/ + private String entrustSampleName; + + /** 委托样品编号 **/ + private String entrustSampleCode; + + /** 排序号 **/ + private Integer sort; + + /** 检测项目 **/ + private String assayProject; + + /** 预报结果 **/ + private String forecastResult; + + /** 是否称重 **/ + private Integer isWeighing; + + /** 备注 **/ + private String remark; + + /** 检测项目 **/ + private List sampleEntrustDetailProjectList; + + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustDetailProject.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustDetailProject.java new file mode 100644 index 0000000..0d1eca6 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustDetailProject.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.param; + +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class SampleEntrustDetailProject { + + /** ID **/ + private Long id; + + /** 样品检验委托明细ID **/ + private Long businessSampleEntrustDetailId; + + /** 物料检测标准检测项目ID **/ + private Long materialAssayStandardDetailId; + + /** 检测项目ID **/ + private Long dictionaryProjectId; + + /** 是否启用 **/ + private Integer isEnabled; +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustParam.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustParam.java new file mode 100644 index 0000000..aee06a3 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleEntrustParam.java @@ -0,0 +1,74 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.param; + +import java.time.LocalDateTime; +import java.util.List; + +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class SampleEntrustParam { + + /** 委托登记id **/ + private Long id; + + /** 委托id **/ + private Long entrustId; + + /** 委托单号 **/ + private String entrustNumber; + + /** 委托单位 **/ + private String entrustUnit; + + /** 委托来源 **/ + private Long configEntrustSourceId; + + /** 样品数量 **/ + private Integer sampleQuantity; + + /** 余样要求 **/ + private String remaineSampleRequirement; + + /** 样品状态 **/ + private String sampleStatus; + + /** 送样人 **/ + private String sampleSender; + + /** 送样日期 **/ + private LocalDateTime sampleSendDate; + + /**收样人 **/ + private String sampleReceiver; + + /** 收样日期 **/ + private LocalDateTime sampleReceiveDate; + + /** 创建方式,手动创建-manual、外部系统创建-interface **/ + private String createWay; + + /** 委托类型:委托登记-entrust_registration、检验委托-entrust_inspection **/ + private String entrustType; + + /** 委托时间 **/ + private LocalDateTime entrustTime; + + /** 备注 **/ + private String remark; + + /** 数据集id **/ + private Long dataCollectionId; + + /** 扩展信息 **/ + private String externalInfomation; + + private List sampleEntrustDetailList; + + /** 中心是否收样 **/ + private Integer isReceiveSample = 0; + + /** 中心是否送样 **/ + private Integer isSendSample = 0; +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleFlowInfo.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleFlowInfo.java new file mode 100644 index 0000000..d268c1a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleFlowInfo.java @@ -0,0 +1,20 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.param; + +import java.math.BigDecimal; + +import lombok.Data; + +@Data +public class SampleFlowInfo { + + private Long id; + + private String sampleCode; + + private String sampleName; + + private Integer isWeighing; + + private BigDecimal sampleWeight; + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleFlowParam.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleFlowParam.java new file mode 100644 index 0000000..67bdced --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/param/SampleFlowParam.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.param; + +import java.time.LocalDateTime; +import java.util.List; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 样品流转参数 + */ +@Data +@Accessors(chain = true) +public class SampleFlowParam { + + /** 样品来源 1:主,2:子 **/ + private Integer sampleSourceType; + + /** 样品当前流程节点key **/ + private String currentSampleFlowKey; + + /** 样品id列表 **/ + //private List sampleIdList; + + /** 样品流转列表 **/ + private List sampleFlowInfoList; + + /** 指定时间 **/ + private LocalDateTime specifyDateTime; + + /** 送样人 **/ + private String sendSampleOper; + + /** 收样人 **/ + private String receiveSampleOper; +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustCheckCmp.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustCheckCmp.java new file mode 100644 index 0000000..9174b70 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustCheckCmp.java @@ -0,0 +1,39 @@ +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"); + + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustContextInitCmp.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustContextInitCmp.java new file mode 100644 index 0000000..0d5443c --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustContextInitCmp.java @@ -0,0 +1,122 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.entrust; + +import java.util.ArrayList; +import java.util.List; + +import com.baomidou.mybatisplus.core.toolkit.IdWorker; +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeComponent; + +import cn.hutool.core.bean.BeanUtil; +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; +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.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.config.dal.dataobject.ConfigEntrustSourceDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardMethodDO; +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigEntrustSourceMapper; +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.MaterialAssayStandardDetailMapper; +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.MaterialAssayStandardMapper; +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.MaterialAssayStandardMethodMapper; +import jakarta.annotation.Resource; + +/** + * 样品委托上下文初始化 + */ +@LiteflowComponent(id = "sampleEntrustContextInitCmp", name = "样品委托上下文初始化") +public class SampleEntrustContextInitCmp extends NodeComponent { + + @Resource + private ConfigEntrustSourceMapper configEntrustSourceMapper; + + @Resource + private MaterialAssayStandardMapper materialAssayStandardMapper; + + @Resource + private MaterialAssayStandardDetailMapper materialAssayStandardDetailMapper; + + @Resource + private MaterialAssayStandardMethodMapper materialAssayStandardMethodMapper; + + @Override + public void process() throws Exception { + //租户id + Long tenantId = TenantContextHolder.getRequiredTenantId(); + + //当前登录用户 + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); + + //当前登录用户昵称 + String nickName = SecurityFrameworkUtils.getLoginUserNickname(); + + //获取样品委托参数 + SampleEntrustParam sampleEntrustParam = this.getRequestData(); + + if (sampleEntrustParam == null) { + throw new ServiceException(500, "样品委托参数不允许为空"); + } + + //获取样品委托上下文 + SampleEntrustContext sampleEntrustContext = this.getContextBean(SampleEntrustContext.class); + sampleEntrustContext.setTenantId(tenantId); + sampleEntrustContext.setLoginUser(loginUser); + sampleEntrustContext.setLoginRealname(nickName); + + //样品提交时是否收样 + sampleEntrustContext.setIsReceiveSample(sampleEntrustParam.getIsReceiveSample()); + //样品提交时是否送样 + sampleEntrustContext.setIsSendSample(sampleEntrustParam.getIsSendSample()); + + //委托来源配置 + List configEntrustSourceList = configEntrustSourceMapper.selectList(); + sampleEntrustContext.setConfigEntrustSourceList(configEntrustSourceList); + + //物料检验标准 + List materialAssayStandardList = materialAssayStandardMapper.selectList(); + sampleEntrustContext.setMaterialAssayStandardList(materialAssayStandardList); + + //物料检验标准项 + List materialAssayStandardDetailList = materialAssayStandardDetailMapper.selectList(); + sampleEntrustContext.setMaterialAssayStandardDetailList(materialAssayStandardDetailList); + + //物料检验标准方法 + List materialAssayStandardMethodList = materialAssayStandardMethodMapper.selectList(); + sampleEntrustContext.setMaterialAssayStandardMethodList(materialAssayStandardMethodList); + + //委托登记 + BusinessSampleEntrustRegistrationDO sampleEntrustRegistration = BeanUtil.copyProperties(sampleEntrustParam, BusinessSampleEntrustRegistrationDO.class); + sampleEntrustContext.setSampleEntrustRegistration(sampleEntrustRegistration); + + List detailList = sampleEntrustParam.getSampleEntrustDetailList(); + + //委托登记样品明细的检测项目明细 + List sampleEntrustProjectList = new ArrayList<>(); + for (SampleEntrustDetail sampleEntrustDetail : detailList) { + if (sampleEntrustDetail.getId() == null) { + sampleEntrustDetail.setId(IdWorker.getId()); + } + List projectList = sampleEntrustDetail.getSampleEntrustDetailProjectList(); + for (SampleEntrustDetailProject sampleEntrustDetailProject : projectList) { + if (sampleEntrustDetailProject.getBusinessSampleEntrustDetailId() == null) { + sampleEntrustDetailProject.setBusinessSampleEntrustDetailId(sampleEntrustDetail.getId()); + } + } + sampleEntrustProjectList.addAll(BeanUtil.copyToList(projectList, BusinessSampleEntrustProjectDO.class)); + } + sampleEntrustContext.setSampleEntrustProjectList(sampleEntrustProjectList); + + //委托登记样品明细 + List sampleEntrustDetailList = BeanUtil.copyToList(detailList, BusinessSampleEntrustDetailDO.class); + sampleEntrustContext.setSampleEntrustDetailList(sampleEntrustDetailList); + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustCreateDataCmp.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustCreateDataCmp.java new file mode 100644 index 0000000..cf19553 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustCreateDataCmp.java @@ -0,0 +1,106 @@ +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 sampleAssayResultList = new ArrayList<>(); + + + List 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 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); + } + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustGenSampleDataCmp.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustGenSampleDataCmp.java new file mode 100644 index 0000000..1dff8ae --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustGenSampleDataCmp.java @@ -0,0 +1,347 @@ +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 sampleEntrustDetailList = sampleEntrustContext.getSampleEntrustDetailList(); + //样品检测项目 + List sampleEntrustProjectList = sampleEntrustContext.getSampleEntrustProjectList(); + //样品来样品位 + List sampleAssayResultList = sampleEntrustContext.getSampleAssayResultList(); + + + + //主样配置 + List configBaseSampleList = configBaseSampleMapper.selectList(); + //分样配置 + List configSubSampleParentList = configSubSampleParentMapper.selectList(); + //子样配置 + List configSubSampleList = configSubSampleMapper.selectList(); + //子样分析方法配置 + List configSubSampleMethodList = configSubSampleMethodMapper.selectList(); + //分析方法配置 + List configAssayMethodList = configAssayMethodMapper.selectList(); + //分析方法检测项目配置 + List configAssayMethodProjectList = configAssayMethodProjectMapper.selectList(); + //分析方法检测项目参数配置 + List configAssayMethodProjectParameterList = configAssayMethodProjectParameterMapper.selectList(); + //样品流程配置 + List configSampleFlowList = configSampleFlowMapper.selectList(); + + List businessBaseSampleDOList = new ArrayList<>(); + List businessSubParentSampleDOList = new ArrayList<>(); + List businessSubSampleDOList = new ArrayList<>(); + List businessAssayTaskDataDOList = new ArrayList<>(); + List businessAssayProjectDataDOList = new ArrayList<>(); + List businessAssayParameterDataDOList = new ArrayList<>(); + + List sampleEntrustDetailListSort = sampleEntrustDetailList.stream().sorted(Comparator.comparingInt(BusinessSampleEntrustDetailDO::getSort)).collect(Collectors.toList()); + BusinessBaseSampleDO businessBaseSampleDO = null; + for (BusinessSampleEntrustDetailDO businessSampleEntrustDetailDO : sampleEntrustDetailListSort) {//委托样品明细 + //获取当前样品的检测项目 + List 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 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 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 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); + } + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustIsCreateCmp.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustIsCreateCmp.java new file mode 100644 index 0000000..2f7e6e0 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustIsCreateCmp.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.entrust; + +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeBooleanComponent; + +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleEntrustContext; + +@LiteflowComponent(id = "sampleEntrustIsCreateCmp", name = "委托登记是否为创建") +public class SampleEntrustIsCreateCmp extends NodeBooleanComponent { + + @Override + public boolean processBoolean() throws Exception { + //获取样品委托上下文 + SampleEntrustContext sampleEntrustContext = this.getContextBean(SampleEntrustContext.class); + //样品委托 + BusinessSampleEntrustRegistrationDO sampleEntrustRegistration = sampleEntrustContext.getSampleEntrustRegistration(); + //如果委托登记id为空,则为创建 + return sampleEntrustRegistration.getId() == null; + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustReceiveDataCmp.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustReceiveDataCmp.java new file mode 100644 index 0000000..6e88821 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustReceiveDataCmp.java @@ -0,0 +1,25 @@ +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; + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustSendDataCmp.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustSendDataCmp.java new file mode 100644 index 0000000..36c3bf0 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustSendDataCmp.java @@ -0,0 +1,25 @@ +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; + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustSubmitDataCmp.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustSubmitDataCmp.java new file mode 100644 index 0000000..98219b8 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustSubmitDataCmp.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.entrust; + +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeComponent; + +@LiteflowComponent(id = "sampleEntrustSubmitDataCmp", name = "委托登记提交委托数据") +public class SampleEntrustSubmitDataCmp extends NodeComponent { + + @Override + public void process() throws Exception { + + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustUpdateDataCmp.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustUpdateDataCmp.java new file mode 100644 index 0000000..d0d0c6f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/entrust/SampleEntrustUpdateDataCmp.java @@ -0,0 +1,111 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.entrust; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +import org.apache.commons.lang3.StringUtils; + +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeComponent; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +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.MaterialAssayStandardDetailDO; +import jakarta.annotation.Resource; + +@LiteflowComponent(id = "sampleEntrustUpdateDataCmp", name = "样品委托更新委托数据" ) +public class SampleEntrustUpdateDataCmp extends NodeComponent { + + @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(); + + //先删除旧的 + List sampleEntrustDetailOldList = businessSampleEntrustDetailMapper.selectList(new LambdaQueryWrapperX().eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, sampleEntrustRegistration.getId())); + if (CollUtil.isNotEmpty(sampleEntrustDetailOldList)) { + List sampleEntrustDetailIdList = sampleEntrustDetailOldList.stream().map(m -> m.getId()).collect(Collectors.toList()); + List sampleEntrustProjectList = businessSampleEntrustProjectMapper.selectList(new LambdaQueryWrapperX().in(BusinessSampleEntrustProjectDO::getBusinessSampleEntrustDetailId, sampleEntrustDetailIdList)); + if (CollUtil.isNotEmpty(sampleEntrustProjectList)) { + List sampleEntrustProjectIdList = sampleEntrustProjectList.stream().map(m -> m.getId()).collect(Collectors.toList()); + //删除样品对应的检验项目 + businessSampleEntrustProjectMapper.physicalDeleteByIds(sampleEntrustProjectIdList); + } + List sampleAssayResultList = businessSampleAssayResultMapper.selectList(new LambdaQueryWrapperX().in(BusinessSampleAssayResultDO::getBusinessSampleEntrustDetailId, sampleEntrustDetailIdList)); + if (CollUtil.isNotEmpty(sampleAssayResultList)) { + List sampleAssayResultIdList = sampleAssayResultList.stream().map(m -> m.getId()).collect(Collectors.toList()); + //删除来样品位 + businessSampleAssayResultMapper.physicalDeleteByIds(sampleAssayResultIdList); + } + + //删除委托登记明细 + businessSampleEntrustDetailMapper.physicalDeleteByIds(sampleEntrustDetailIdList); + } + + //保存更新新的 + List sampleAssayResultList = new ArrayList<>(); + + + List 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 sampleEntrustProjectList = sampleEntrustContext.getSampleEntrustProjectList(); + for (BusinessSampleEntrustProjectDO businessSampleEntrustProject : sampleEntrustProjectList) { + MaterialAssayStandardDetailDO materialAssayStandardDetail = sampleEntrustContext.getMaterialAssayStandardDetailById(businessSampleEntrustProject.getMaterialAssayStandardDetailId()); + businessSampleEntrustProject.setDictionaryProjectId(materialAssayStandardDetail.getDictionaryProjectId()); + } + + //保存样品委托登记 + businessSampleEntrustRegistrationMapper.updateById(sampleEntrustRegistration); + + //保存样品明细 + if (CollUtil.isNotEmpty(sampleEntrustDetailList)) { + businessSampleEntrustDetailMapper.insertBatch(sampleEntrustDetailList); + } + + //保存检测项目 + if (CollUtil.isNotEmpty(sampleEntrustProjectList)) { + businessSampleEntrustProjectMapper.insertBatch(sampleEntrustProjectList); + } + + //保存来样元素 + if (CollUtil.isNotEmpty(sampleAssayResultList)) { + businessSampleAssayResultMapper.insertBatch(sampleAssayResultList); + } + + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleBaseHandoverCmp.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleBaseHandoverCmp.java new file mode 100644 index 0000000..55567a3 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleBaseHandoverCmp.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.flow; + +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeComponent; + +@LiteflowComponent(id = "sampleBaseHandoverCmp", name = "主样样品交接单") +public class SampleBaseHandoverCmp extends NodeComponent { + + @Override + public void process() throws Exception { + + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleDataSaveOrUpdateCmp.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleDataSaveOrUpdateCmp.java new file mode 100644 index 0000000..fdd1efd --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleDataSaveOrUpdateCmp.java @@ -0,0 +1,80 @@ +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 businessBaseSampleList = sampleFlowContext.getBusinessBaseSampleList(); + if (CollUtil.isNotEmpty(businessBaseSampleList)) { + businessBaseSampleMapper.updateBatch(businessBaseSampleList); + } + //分样 + List busSubPsampleList = sampleFlowContext.getBusinessSubParentSampleList(); + if (CollUtil.isNotEmpty(busSubPsampleList)) { + businessSubParentSampleMapper.updateBatch(busSubPsampleList); + } + //子样 + List busSubCsampleList = sampleFlowContext.getBusinessSubSampleList(); + if (CollUtil.isNotEmpty(busSubCsampleList)) { + businessSubSampleMapper.updateBatch(busSubCsampleList); + } + //交接记录 + List busHandoverRecordSubList = sampleFlowContext.getBusinessHandoverRecordSubList(); + if (CollUtil.isNotEmpty(busHandoverRecordSubList)) { + businessHandoverRecordSubMapper.insertBatch(busHandoverRecordSubList); + } + //交接记录单 + BusinessSampleHandoverDO businessSampleHandover = sampleFlowContext.getBusinessSampleHandover(); + if (businessSampleHandover != null) { + businessSampleHandoverMapper.insert(businessSampleHandover); + } + //交接记录单明细 + List businessSampleHandoverDetailList = sampleFlowContext.getBusinessSampleHandoverDetailList(); + if (CollUtil.isNotEmpty(businessSampleHandoverDetailList)) { + businessSampleHandoverDetailMapper.insertBatch(businessSampleHandoverDetailList); + } + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleFlowContextInitCmp.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleFlowContextInitCmp.java new file mode 100644 index 0000000..2185ac4 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleFlowContextInitCmp.java @@ -0,0 +1,78 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.flow; + +import java.util.List; +import java.util.stream.Collectors; + +import org.apache.commons.lang3.StringUtils; + +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.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +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.config.dal.dataobject.ConfigSampleHandoverDO; +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigSampleHandoverMapper; +import jakarta.annotation.Resource; + +@LiteflowComponent(id = "sampleFlowContextInitCmp", name = "样品流转上下文初始化") +public class SampleFlowContextInitCmp extends NodeComponent { + + @Resource + private ConfigSampleHandoverMapper configSampleHandoverMapper; + + @Override + public void process() throws Exception { + //租户id + Long tenantId = TenantContextHolder.getRequiredTenantId(); + + //当前登录用户 + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); + + //当前登录用户昵称 + String nickName = SecurityFrameworkUtils.getLoginUserNickname(); + + //样品流转请求参数 + SampleFlowParam sampleFlowParam = this.getRequestData(); + + if (StringUtils.isBlank(sampleFlowParam.getCurrentSampleFlowKey())) { + new ServiceException(500, "样品流程节点currentSampleFlowKey不允许为空"); + } + List sampleFlowInfoList = sampleFlowParam.getSampleFlowInfoList(); + if (CollUtil.isEmpty(sampleFlowInfoList)) { + new ServiceException(500, "样品流转列表不允许为空"); + } + List sampleIdList = sampleFlowInfoList.stream().map(m -> m.getId()).collect(Collectors.toList()); + SampleFlowContext sampleFlowContext = this.getContextBean(SampleFlowContext.class); + sampleFlowContext.setTenantId(tenantId); + sampleFlowContext.setLoginUser(loginUser); + sampleFlowContext.setLoginRealname(nickName); + if (sampleFlowParam.getSpecifyDateTime() != null) { + sampleFlowContext.setCurrentDateTime(sampleFlowParam.getSpecifyDateTime()); + } + sampleFlowContext.setSampleSourceType(sampleFlowParam.getSampleSourceType()); + sampleFlowContext.setCurrentSampleFlowKey(sampleFlowParam.getCurrentSampleFlowKey()); + sampleFlowContext.setSampleIdList(sampleIdList); + sampleFlowContext.setSampleFlowInfoList(sampleFlowInfoList); + sampleFlowContext.setSendSampleOper(sampleFlowParam.getSendSampleOper()); + sampleFlowContext.setReceiveSampleOper(sampleFlowParam.getReceiveSampleOper()); + + List configSampleHandoverList = configSampleHandoverMapper.selectList(); + sampleFlowContext.setConfigSampleHandoverList(configSampleHandoverList); + } + + @Override + public boolean isAccess() { + SampleFlowParam sampleFlowParam = this.getRequestData(); + if (sampleFlowParam == null) { + return false; + } + return super.isAccess(); + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleHandoverRecordSubCmp.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleHandoverRecordSubCmp.java new file mode 100644 index 0000000..88210b3 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleHandoverRecordSubCmp.java @@ -0,0 +1,61 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.flow; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; + +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeComponent; + +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessHandoverRecordSubDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleFlowContext; + +@LiteflowComponent(id = "sampleHandoverRecordSubCmp", name = "子样交接记录") +public class SampleHandoverRecordSubCmp extends NodeComponent { + + @Override + public void process() throws Exception { + SampleFlowContext sampleFlowContext = this.getContextBean(SampleFlowContext.class); + LoginUser loginUser = sampleFlowContext.getLoginUser(); + String loginRealname = sampleFlowContext.getLoginRealname(); + LocalDateTime currentDateTime = sampleFlowContext.getCurrentDateTime(); + String sendSampleOper = sampleFlowContext.getSendSampleOper(); + String receiveSampleOper = sampleFlowContext.getReceiveSampleOper(); + List busSubCsampleList = sampleFlowContext.getBusinessSubSampleList(); + + List busHandoverRecordSubList = new ArrayList<>(); + + BusinessHandoverRecordSubDO busHandoverRecordSub = null; + for (BusinessSubSampleDO businessSubSample : busSubCsampleList) { + busHandoverRecordSub = new BusinessHandoverRecordSubDO(); + busHandoverRecordSub.setBusinessSubSampleId(businessSubSample.getId()); + busHandoverRecordSub.setSampleCode(businessSubSample.getSampleCode()); + if (businessSubSample.getIsGenerateReturnCode().intValue() == 1) { + busHandoverRecordSub.setSampleCode(businessSubSample.getSampleReturnCode()); + } + busHandoverRecordSub.setSampleFlowKey(businessSubSample.getSampleFlowKey()); + + if (StringUtils.isNotBlank(sendSampleOper)) { + busHandoverRecordSub.setSendSampleOperator(sendSampleOper); + busHandoverRecordSub.setReceiveSampleOperator(loginRealname);//默认收样人为当前操作人 + } + + if (StringUtils.isNotBlank(receiveSampleOper)) {//如果传输过来的收样人不为空,则使用传过来的收样人 + busHandoverRecordSub.setReceiveSampleOperator(receiveSampleOper); + } + + busHandoverRecordSub.setOperatorId(loginUser.getId()); + busHandoverRecordSub.setOperator(loginRealname); + busHandoverRecordSub.setOperationTime(currentDateTime); + + busHandoverRecordSubList.add(busHandoverRecordSub); + } + + sampleFlowContext.setBusinessHandoverRecordSubList(busHandoverRecordSubList); + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSimpleEncryptCmp.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSimpleEncryptCmp.java new file mode 100644 index 0000000..de89a1b --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSimpleEncryptCmp.java @@ -0,0 +1,39 @@ +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.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.ConfigSubSampleDO; +import cn.iocoder.yudao.module.qms.core.code.SequenceUtil; +import jakarta.annotation.Resource; + +@LiteflowComponent(id = "sampleSimpleEncryptCmp", name = "简码编密") +public class SampleSimpleEncryptCmp extends NodeComponent { + + @Resource + private SequenceUtil sequenceUtil; + + @Override + public void process() throws Exception { + SampleFlowContext sampleFlowContext = this.getContextBean(SampleFlowContext.class); + List busSubCsampleList = sampleFlowContext.getBusinessSubSampleList(); + for (BusinessSubSampleDO businessSubSampleDO : busSubCsampleList) { + ConfigSubSampleDO configSubSample = sampleFlowContext.getConfigSubSampleById(businessSubSampleDO.getConfigSubSampleId()); + String simpleCodeRule = configSubSample.getSimpleCodeRule(); + String simpleCode = sequenceUtil.genCode(simpleCodeRule); + businessSubSampleDO.setSampleAssayCode(simpleCode); + } + + } + + @Override + public boolean isAccess() { + SampleFlowContext sampleFlowContext = this.getContextBean(SampleFlowContext.class); + return "flw_ypbm".equals(sampleFlowContext.getCurrentSampleFlowKey()); + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSubCheckCmp.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSubCheckCmp.java new file mode 100644 index 0000000..7e68663 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSubCheckCmp.java @@ -0,0 +1,58 @@ +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 sampleIdList = sampleFlowContext.getSampleIdList(); + if (CollUtil.isEmpty(sampleIdList)) { + throw new ServiceException(500, "样品ID列表不允许为空"); + } + List 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 configSubSampleIdList = businessSubSampleDOList.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList()); + List configSubSampleList = configSubSampleMapper.selectByIds(configSubSampleIdList); + + sampleFlowContext.setBusinessSubSampleList(businessSubSampleDOList); + sampleFlowContext.setConfigSubSampleList(configSubSampleList); + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSubHandoverCmp.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSubHandoverCmp.java new file mode 100644 index 0000000..8160ff8 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSubHandoverCmp.java @@ -0,0 +1,82 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.sample.flow; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +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.framework.security.core.LoginUser; +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.BusinessSubSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleFlowContext; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSampleHandoverDO; +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigSampleHandoverMapper; +import cn.iocoder.yudao.module.qms.core.code.SequenceUtil; +import jakarta.annotation.Resource; + +@LiteflowComponent(id = "sampleSubHandoverCmp", name = "分样子样样品交接单") +public class SampleSubHandoverCmp extends NodeComponent { + + @Resource + private SequenceUtil sequenceUtil; + + + @Override + public void process() throws Exception { + SampleFlowContext sampleFlowContext = this.getContextBean(SampleFlowContext.class); + String currentSampleFlowKey = sampleFlowContext.getCurrentSampleFlowKey(); + LocalDateTime currentDateTime = sampleFlowContext.getCurrentDateTime(); + LoginUser loginUser = sampleFlowContext.getLoginUser(); + String loginRealname = sampleFlowContext.getLoginRealname(); + List busSubCsampleList = sampleFlowContext.getBusinessSubSampleList(); + ConfigSampleHandoverDO configSampleHandover = sampleFlowContext.getConfigSampleHandoverByFlowNodeKey(currentSampleFlowKey); + + BusinessSampleHandoverDO businessSampleHandoverDO = new BusinessSampleHandoverDO(); + businessSampleHandoverDO.setId(IdWorker.getId()); + String handoverCode = sequenceUtil.genCode(configSampleHandover.getCodeRule()); + businessSampleHandoverDO.setCode(handoverCode); + businessSampleHandoverDO.setName(configSampleHandover.getName()); + businessSampleHandoverDO.setTemplateKey(configSampleHandover.getTemplateKey()); + businessSampleHandoverDO.setOperatorId(loginUser.getId()); + businessSampleHandoverDO.setOperator(loginRealname); + businessSampleHandoverDO.setOperationTime(currentDateTime); + businessSampleHandoverDO.setSampleFlowCode(currentSampleFlowKey); + + sampleFlowContext.setBusinessSampleHandover(businessSampleHandoverDO); + + List businessSampleHandoverDetailList = new ArrayList<>(); + BusinessSampleHandoverDetailDO businessSampleHandoverDetailDO = null; + for (BusinessSubSampleDO businessSubSample : busSubCsampleList) { + businessSampleHandoverDetailDO = new BusinessSampleHandoverDetailDO(); + businessSampleHandoverDetailDO.setId(IdWorker.getId()); + businessSampleHandoverDetailDO.setBusinessSampleHandoverId(businessSampleHandoverDO.getId()); + businessSampleHandoverDetailDO.setBusinessSubSampleId(businessSubSample.getId()); + businessSampleHandoverDetailDO.setSampleName(businessSubSample.getSampleName()); + businessSampleHandoverDetailDO.setBalanceCode(""); + businessSampleHandoverDetailDO.setSampleWeight(businessSubSample.getLastSampleWeight()); + businessSampleHandoverDetailDO.setDictionaryBusinessId(businessSubSample.getDictionaryBusinessId()); + + + businessSampleHandoverDetailList.add(businessSampleHandoverDetailDO); + } + + sampleFlowContext.setBusinessSampleHandoverDetailList(businessSampleHandoverDetailList); + + } + + @Override + public boolean isAccess() { + SampleFlowContext sampleFlowContext = this.getContextBean(SampleFlowContext.class); + String currentSampleFlowKey = sampleFlowContext.getCurrentSampleFlowKey(); + ConfigSampleHandoverDO configSampleHandover = sampleFlowContext.getConfigSampleHandoverByFlowNodeKey(currentSampleFlowKey); + //交接单配置不为空,则生成交接单 + return configSampleHandover != null; + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSubProcessUpdateCmp.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSubProcessUpdateCmp.java new file mode 100644 index 0000000..f00f9e5 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/sample/flow/SampleSubProcessUpdateCmp.java @@ -0,0 +1,55 @@ +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 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 flowNodeList = sampleFlowDefinition.getFlowNodeList(); + SampleFlowNode flowNode = flowNodeList.stream().filter(f -> f.getNodeKey().equals(currentSampleFlowKey)).findFirst().orElse(null); + List nextFlowNodeList = flowNode.getNextFlowNodeList(); + SampleFlowNode nextFlowNode = nextFlowNodeList.stream().filter(f -> f.getIsDefault()).findFirst().orElse(null); + businessSubSample.setSampleFlowKey(nextFlowNode.getNodeKey()); + businessSubSample.setSampleFlowTime(currentDateTime); + } + + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/slot/SampleEntrustContext.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/slot/SampleEntrustContext.java new file mode 100644 index 0000000..9ed0886 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/slot/SampleEntrustContext.java @@ -0,0 +1,95 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.slot; + +import java.time.LocalDateTime; +import java.util.List; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.security.core.LoginUser; +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.config.dal.dataobject.ConfigEntrustSourceDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardMethodDO; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class SampleEntrustContext { + + /** 租户id **/ + private Long tenantId; + + /** 当前时间 **/ + private LocalDateTime currentDateTime = LocalDateTime.now(); + + /** 当前登录用户 **/ + private LoginUser loginUser; + + /** 当前登录人 **/ + private String loginRealname; + + /** 中心是否收样 **/ + private Integer isReceiveSample = 0; + + /** 中心是否送样 **/ + private Integer isSendSample = 0; + + /** 委托来源配置列表 **/ + private List configEntrustSourceList; + + /** + * 根据id获取委托来源配置 + * @param id 委托来源配置id + * @return + */ + public ConfigEntrustSourceDO getConfigEntrustSourceById(Long id) { + ConfigEntrustSourceDO configEntrustSource = null; + if (CollUtil.isNotEmpty(this.configEntrustSourceList)) { + configEntrustSource = this.configEntrustSourceList.stream().filter(f -> id.equals(f.getId())).findFirst().orElse(null); + } + return configEntrustSource; + } + + /** 物料检测标准列表 **/ + private List materialAssayStandardList; + + /** 物料检测标准检测项目列表 **/ + private List materialAssayStandardDetailList; + + public MaterialAssayStandardDetailDO getMaterialAssayStandardDetailById(Long id) { + MaterialAssayStandardDetailDO materialAssayStandardDetail = null; + if (CollUtil.isNotEmpty(this.materialAssayStandardDetailList)) { + materialAssayStandardDetail = this.materialAssayStandardDetailList.stream().filter(f -> id.equals(f.getId())).findFirst().orElse(null); + } + return materialAssayStandardDetail; + } + + /** 物料检测标准与方法列表 **/ + private List materialAssayStandardMethodList; + + /** 通过检测标准项目id获取默认的检测方法 **/ + public MaterialAssayStandardMethodDO getMaterialAssayStandardMethodDefaultByMaterialAssayStandardDetailId(Long materialAssayStandardDetailId) { + MaterialAssayStandardMethodDO materialAssayStandardMethod = null; + if (CollUtil.isNotEmpty(this.materialAssayStandardMethodList)) { + materialAssayStandardMethod = this.materialAssayStandardMethodList.stream().filter(f -> materialAssayStandardDetailId.equals(f.getMaterialAssayStandardDetailId()) && f.getIsDefault().equals(1)).findFirst().orElse(null); + } + return materialAssayStandardMethod; + } + + + /** 委托登记单 **/ + private BusinessSampleEntrustRegistrationDO sampleEntrustRegistration; + + /** 委托登记样品明细 **/ + private List sampleEntrustDetailList; + + /** 委托登记样品检测项目明细 **/ + private List sampleEntrustProjectList; + + /** 样品委托来样品位 **/ + private List sampleAssayResultList; +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/slot/SampleFlowContext.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/slot/SampleFlowContext.java new file mode 100644 index 0000000..29dbb69 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/liteflow/slot/SampleFlowContext.java @@ -0,0 +1,112 @@ +package cn.iocoder.yudao.module.qms.business.bus.liteflow.slot; + +import java.time.LocalDateTime; +import java.util.List; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.security.core.LoginUser; +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.liteflow.param.SampleFlowInfo; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSampleHandoverDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSubSampleDO; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class SampleFlowContext { + + /** 租户id **/ + private Long tenantId; + + /** 样品来源 1:主,2:子 **/ + private Integer sampleSourceType; + + /** 样品当前流程节点key **/ + private String currentSampleFlowKey; + + /** 样品id列表 **/ + private List sampleIdList; + + /** 样品流转列表 **/ + private List sampleFlowInfoList; + + /** + * 根据样品id查找样品流转信息 + * @param id + * @return + */ + public SampleFlowInfo getSampleFlowInfoById(Long id) { + SampleFlowInfo sampleFlowInfo = null; + if (CollUtil.isNotEmpty(this.sampleFlowInfoList)) { + sampleFlowInfo = this.sampleFlowInfoList.stream().filter(f -> f.getId().equals(id)).findFirst().orElse(null); + } + return sampleFlowInfo; + } + + /** 样品交接单配置 **/ + private List configSampleHandoverList; + + /** + * 根据流程节点key获取交接单配置 + * @param flowNodeKey + * @return + */ + public ConfigSampleHandoverDO getConfigSampleHandoverByFlowNodeKey(String flowNodeKey) { + ConfigSampleHandoverDO configSampleHandover = null; + if (CollUtil.isNotEmpty(this.configSampleHandoverList)) { + configSampleHandover = this.configSampleHandoverList.stream().filter(f -> f.getDictionarySampleFlowNodeKey().equals(flowNodeKey)).findFirst().orElse(null); + } + return configSampleHandover; + } + + /** 子样配置 **/ + private List configSubSampleList; + + /** 根据子样配置id获取配置信息 **/ + public ConfigSubSampleDO getConfigSubSampleById(Long id) { + ConfigSubSampleDO configSubSample = null; + if (CollUtil.isNotEmpty(this.configSubSampleList)) { + configSubSample = this.configSubSampleList.stream().filter(f -> f.getId().equals(id)).findFirst().orElse(null); + } + return configSubSample; + } + + /** 主样信息 **/ + private List businessBaseSampleList; + + /** 分样主样信息 **/ + private List businessSubParentSampleList; + + /** 分样子样信息 **/ + private List businessSubSampleList; + + /** 交接记录信息 **/ + private List businessHandoverRecordSubList; + + /** 交接单主表 **/ + private BusinessSampleHandoverDO businessSampleHandover; + + /** 交接单明细 **/ + private List businessSampleHandoverDetailList; + + /** 当前时间 **/ + private LocalDateTime currentDateTime = LocalDateTime.now(); + + /** 当前登录用户 **/ + private LoginUser loginUser; + + /** 当前登录人 **/ + private String loginRealname; + + /** 送样人 **/ + private String sendSampleOper; + + /** 收样人 **/ + private String receiveSampleOper; +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessAssayParameterDataService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessAssayParameterDataService.java new file mode 100644 index 0000000..2f8c1ce --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessAssayParameterDataService.java @@ -0,0 +1,62 @@ +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.BusinessAssayParameterDataDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 检测参数数据业务 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessAssayParameterDataService { + + /** + * 创建检测参数数据业务 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessAssayParameterDataRespVO createBusinessAssayParameterData(@Valid BusinessAssayParameterDataSaveReqVO createReqVO); + + /** + * 更新检测参数数据业务 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessAssayParameterData(@Valid BusinessAssayParameterDataSaveReqVO updateReqVO); + + /** + * 删除检测参数数据业务 + * + * @param id 编号 + */ + void deleteBusinessAssayParameterData(Long id); + + /** + * 批量删除检测参数数据业务 + * + * @param ids 编号 + */ + void deleteBusinessAssayParameterDataListByIds(List ids); + + /** + * 获得检测参数数据业务 + * + * @param id 编号 + * @return 检测参数数据业务 + */ + BusinessAssayParameterDataDO getBusinessAssayParameterData(Long id); + + /** + * 获得检测参数数据业务分页 + * + * @param pageReqVO 分页查询 + * @return 检测参数数据业务分页 + */ + PageResult getBusinessAssayParameterDataPage(BusinessAssayParameterDataPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessAssayParameterDataServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessAssayParameterDataServiceImpl.java new file mode 100644 index 0000000..6e44bd3 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessAssayParameterDataServiceImpl.java @@ -0,0 +1,91 @@ +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 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.BusinessAssayParameterDataDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessAssayParameterDataMapper; +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 BusinessAssayParameterDataServiceImpl implements BusinessAssayParameterDataService { + + @Resource + private BusinessAssayParameterDataMapper businessAssayParameterDataMapper; + + @Override + public BusinessAssayParameterDataRespVO createBusinessAssayParameterData(BusinessAssayParameterDataSaveReqVO createReqVO) { + // 插入 + BusinessAssayParameterDataDO businessAssayParameterData = BeanUtils.toBean(createReqVO, BusinessAssayParameterDataDO.class); + businessAssayParameterDataMapper.insert(businessAssayParameterData); + // 返回 + return BeanUtils.toBean(businessAssayParameterData, BusinessAssayParameterDataRespVO.class); + } + + @Override + public void updateBusinessAssayParameterData(BusinessAssayParameterDataSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessAssayParameterDataExists(updateReqVO.getId()); + // 更新 + BusinessAssayParameterDataDO updateObj = BeanUtils.toBean(updateReqVO, BusinessAssayParameterDataDO.class); + businessAssayParameterDataMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessAssayParameterData(Long id) { + // 校验存在 + validateBusinessAssayParameterDataExists(id); + // 删除 + businessAssayParameterDataMapper.deleteById(id); + } + + @Override + public void deleteBusinessAssayParameterDataListByIds(List ids) { + // 校验存在 + validateBusinessAssayParameterDataExists(ids); + // 删除 + businessAssayParameterDataMapper.deleteByIds(ids); + } + + private void validateBusinessAssayParameterDataExists(List ids) { + List list = businessAssayParameterDataMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_ASSAY_PARAMETER_DATA_NOT_EXISTS); + } + } + + private void validateBusinessAssayParameterDataExists(Long id) { + if (businessAssayParameterDataMapper.selectById(id) == null) { + throw exception(BUSINESS_ASSAY_PARAMETER_DATA_NOT_EXISTS); + } + } + + @Override + public BusinessAssayParameterDataDO getBusinessAssayParameterData(Long id) { + return businessAssayParameterDataMapper.selectById(id); + } + + @Override + public PageResult getBusinessAssayParameterDataPage(BusinessAssayParameterDataPageReqVO pageReqVO) { + return businessAssayParameterDataMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessAssayProjectDataService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessAssayProjectDataService.java new file mode 100644 index 0000000..782816b --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessAssayProjectDataService.java @@ -0,0 +1,62 @@ +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.BusinessAssayProjectDataDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 检测项目数据业务 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessAssayProjectDataService { + + /** + * 创建检测项目数据业务 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessAssayProjectDataRespVO createBusinessAssayProjectData(@Valid BusinessAssayProjectDataSaveReqVO createReqVO); + + /** + * 更新检测项目数据业务 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessAssayProjectData(@Valid BusinessAssayProjectDataSaveReqVO updateReqVO); + + /** + * 删除检测项目数据业务 + * + * @param id 编号 + */ + void deleteBusinessAssayProjectData(Long id); + + /** + * 批量删除检测项目数据业务 + * + * @param ids 编号 + */ + void deleteBusinessAssayProjectDataListByIds(List ids); + + /** + * 获得检测项目数据业务 + * + * @param id 编号 + * @return 检测项目数据业务 + */ + BusinessAssayProjectDataDO getBusinessAssayProjectData(Long id); + + /** + * 获得检测项目数据业务分页 + * + * @param pageReqVO 分页查询 + * @return 检测项目数据业务分页 + */ + PageResult getBusinessAssayProjectDataPage(BusinessAssayProjectDataPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessAssayProjectDataServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessAssayProjectDataServiceImpl.java new file mode 100644 index 0000000..013c842 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessAssayProjectDataServiceImpl.java @@ -0,0 +1,91 @@ +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 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.BusinessAssayProjectDataDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessAssayProjectDataMapper; +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 BusinessAssayProjectDataServiceImpl implements BusinessAssayProjectDataService { + + @Resource + private BusinessAssayProjectDataMapper businessAssayProjectDataMapper; + + @Override + public BusinessAssayProjectDataRespVO createBusinessAssayProjectData(BusinessAssayProjectDataSaveReqVO createReqVO) { + // 插入 + BusinessAssayProjectDataDO businessAssayProjectData = BeanUtils.toBean(createReqVO, BusinessAssayProjectDataDO.class); + businessAssayProjectDataMapper.insert(businessAssayProjectData); + // 返回 + return BeanUtils.toBean(businessAssayProjectData, BusinessAssayProjectDataRespVO.class); + } + + @Override + public void updateBusinessAssayProjectData(BusinessAssayProjectDataSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessAssayProjectDataExists(updateReqVO.getId()); + // 更新 + BusinessAssayProjectDataDO updateObj = BeanUtils.toBean(updateReqVO, BusinessAssayProjectDataDO.class); + businessAssayProjectDataMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessAssayProjectData(Long id) { + // 校验存在 + validateBusinessAssayProjectDataExists(id); + // 删除 + businessAssayProjectDataMapper.deleteById(id); + } + + @Override + public void deleteBusinessAssayProjectDataListByIds(List ids) { + // 校验存在 + validateBusinessAssayProjectDataExists(ids); + // 删除 + businessAssayProjectDataMapper.deleteByIds(ids); + } + + private void validateBusinessAssayProjectDataExists(List ids) { + List list = businessAssayProjectDataMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_ASSAY_PROJECT_DATA_NOT_EXISTS); + } + } + + private void validateBusinessAssayProjectDataExists(Long id) { + if (businessAssayProjectDataMapper.selectById(id) == null) { + throw exception(BUSINESS_ASSAY_PROJECT_DATA_NOT_EXISTS); + } + } + + @Override + public BusinessAssayProjectDataDO getBusinessAssayProjectData(Long id) { + return businessAssayProjectDataMapper.selectById(id); + } + + @Override + public PageResult getBusinessAssayProjectDataPage(BusinessAssayProjectDataPageReqVO pageReqVO) { + return businessAssayProjectDataMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessAssayTaskDataService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessAssayTaskDataService.java new file mode 100644 index 0000000..8c0f7ca --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessAssayTaskDataService.java @@ -0,0 +1,75 @@ +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.BusinessAssayTaskDataDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 子样检测任务业务 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessAssayTaskDataService { + + /** + * 创建子样检测任务业务 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessAssayTaskDataRespVO createBusinessAssayTaskData(@Valid BusinessAssayTaskDataSaveReqVO createReqVO); + + /** + * 更新子样检测任务业务 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessAssayTaskData(@Valid BusinessAssayTaskDataSaveReqVO updateReqVO); + + /** + * 删除子样检测任务业务 + * + * @param id 编号 + */ + void deleteBusinessAssayTaskData(Long id); + + /** + * 批量删除子样检测任务业务 + * + * @param ids 编号 + */ + void deleteBusinessAssayTaskDataListByIds(List ids); + + /** + * 获得子样检测任务业务 + * + * @param id 编号 + * @return 子样检测任务业务 + */ + BusinessAssayTaskDataDO getBusinessAssayTaskData(Long id); + + /** + * 获得未指派的子样检测任务业务分组列表 + * @return + */ + List> getUnAssayTaskGroupList(); + + /** + * 获得子样检测任务业务列表 + * @param reqVO 查询条件 + * @return + */ + List getBusinessAssayTaskDataList(BusinessAssayTaskDataReqVO reqVO); + + /** + * 获得子样检测任务业务分页 + * + * @param pageReqVO 分页查询 + * @return 子样检测任务业务分页 + */ + PageResult getBusinessAssayTaskDataPage(BusinessAssayTaskDataPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessAssayTaskDataServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessAssayTaskDataServiceImpl.java new file mode 100644 index 0000000..718174a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessAssayTaskDataServiceImpl.java @@ -0,0 +1,103 @@ +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 ids) { + // 校验存在 + validateBusinessAssayTaskDataExists(ids); + // 删除 + businessAssayTaskDataMapper.deleteByIds(ids); + } + + private void validateBusinessAssayTaskDataExists(List ids) { + List 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> getUnAssayTaskGroupList() { + return businessAssayTaskDataMapper.selectUnAssayTaskGroupList(); + } + + @Override + public List getBusinessAssayTaskDataList(BusinessAssayTaskDataReqVO reqVO) { + return businessAssayTaskDataMapper.selectList(reqVO); + } + + @Override + public PageResult getBusinessAssayTaskDataPage(BusinessAssayTaskDataPageReqVO pageReqVO) { + return businessAssayTaskDataMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessBaseSampleService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessBaseSampleService.java new file mode 100644 index 0000000..e19bef2 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessBaseSampleService.java @@ -0,0 +1,62 @@ +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.BusinessBaseSampleDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 主样业务 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessBaseSampleService { + + /** + * 创建主样业务 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessBaseSampleRespVO createBusinessBaseSample(@Valid BusinessBaseSampleSaveReqVO createReqVO); + + /** + * 更新主样业务 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessBaseSample(@Valid BusinessBaseSampleSaveReqVO updateReqVO); + + /** + * 删除主样业务 + * + * @param id 编号 + */ + void deleteBusinessBaseSample(Long id); + + /** + * 批量删除主样业务 + * + * @param ids 编号 + */ + void deleteBusinessBaseSampleListByIds(List ids); + + /** + * 获得主样业务 + * + * @param id 编号 + * @return 主样业务 + */ + BusinessBaseSampleDO getBusinessBaseSample(Long id); + + /** + * 获得主样业务分页 + * + * @param pageReqVO 分页查询 + * @return 主样业务分页 + */ + PageResult getBusinessBaseSamplePage(BusinessBaseSamplePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessBaseSampleServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessBaseSampleServiceImpl.java new file mode 100644 index 0000000..2d9cbda --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessBaseSampleServiceImpl.java @@ -0,0 +1,91 @@ +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 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.BusinessBaseSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessBaseSampleMapper; + +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 BusinessBaseSampleServiceImpl implements BusinessBaseSampleService { + + @Resource + private BusinessBaseSampleMapper businessBaseSampleMapper; + + @Override + public BusinessBaseSampleRespVO createBusinessBaseSample(BusinessBaseSampleSaveReqVO createReqVO) { + // 插入 + BusinessBaseSampleDO businessBaseSample = BeanUtils.toBean(createReqVO, BusinessBaseSampleDO.class); + businessBaseSampleMapper.insert(businessBaseSample); + // 返回 + return BeanUtils.toBean(businessBaseSample, BusinessBaseSampleRespVO.class); + } + + @Override + public void updateBusinessBaseSample(BusinessBaseSampleSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessBaseSampleExists(updateReqVO.getId()); + // 更新 + BusinessBaseSampleDO updateObj = BeanUtils.toBean(updateReqVO, BusinessBaseSampleDO.class); + businessBaseSampleMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessBaseSample(Long id) { + // 校验存在 + validateBusinessBaseSampleExists(id); + // 删除 + businessBaseSampleMapper.deleteById(id); + } + + @Override + public void deleteBusinessBaseSampleListByIds(List ids) { + // 校验存在 + validateBusinessBaseSampleExists(ids); + // 删除 + businessBaseSampleMapper.deleteByIds(ids); + } + + private void validateBusinessBaseSampleExists(List ids) { + List list = businessBaseSampleMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_BASE_SAMPLE_NOT_EXISTS); + } + } + + private void validateBusinessBaseSampleExists(Long id) { + if (businessBaseSampleMapper.selectById(id) == null) { + throw exception(BUSINESS_BASE_SAMPLE_NOT_EXISTS); + } + } + + @Override + public BusinessBaseSampleDO getBusinessBaseSample(Long id) { + return businessBaseSampleMapper.selectById(id); + } + + @Override + public PageResult getBusinessBaseSamplePage(BusinessBaseSamplePageReqVO pageReqVO) { + return businessBaseSampleMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessHandoverRecordSubService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessHandoverRecordSubService.java new file mode 100644 index 0000000..87d322d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessHandoverRecordSubService.java @@ -0,0 +1,62 @@ +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.BusinessHandoverRecordSubDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 子样交接记录业务 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessHandoverRecordSubService { + + /** + * 创建子样交接记录业务 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessHandoverRecordSubRespVO createBusinessHandoverRecordSub(@Valid BusinessHandoverRecordSubSaveReqVO createReqVO); + + /** + * 更新子样交接记录业务 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessHandoverRecordSub(@Valid BusinessHandoverRecordSubSaveReqVO updateReqVO); + + /** + * 删除子样交接记录业务 + * + * @param id 编号 + */ + void deleteBusinessHandoverRecordSub(Long id); + + /** + * 批量删除子样交接记录业务 + * + * @param ids 编号 + */ + void deleteBusinessHandoverRecordSubListByIds(List ids); + + /** + * 获得子样交接记录业务 + * + * @param id 编号 + * @return 子样交接记录业务 + */ + BusinessHandoverRecordSubDO getBusinessHandoverRecordSub(Long id); + + /** + * 获得子样交接记录业务分页 + * + * @param pageReqVO 分页查询 + * @return 子样交接记录业务分页 + */ + PageResult getBusinessHandoverRecordSubPage(BusinessHandoverRecordSubPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessHandoverRecordSubServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessHandoverRecordSubServiceImpl.java new file mode 100644 index 0000000..defc45f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessHandoverRecordSubServiceImpl.java @@ -0,0 +1,91 @@ +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 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.BusinessHandoverRecordSubDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessHandoverRecordSubMapper; + +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 BusinessHandoverRecordSubServiceImpl implements BusinessHandoverRecordSubService { + + @Resource + private BusinessHandoverRecordSubMapper businessHandoverRecordSubMapper; + + @Override + public BusinessHandoverRecordSubRespVO createBusinessHandoverRecordSub(BusinessHandoverRecordSubSaveReqVO createReqVO) { + // 插入 + BusinessHandoverRecordSubDO businessHandoverRecordSub = BeanUtils.toBean(createReqVO, BusinessHandoverRecordSubDO.class); + businessHandoverRecordSubMapper.insert(businessHandoverRecordSub); + // 返回 + return BeanUtils.toBean(businessHandoverRecordSub, BusinessHandoverRecordSubRespVO.class); + } + + @Override + public void updateBusinessHandoverRecordSub(BusinessHandoverRecordSubSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessHandoverRecordSubExists(updateReqVO.getId()); + // 更新 + BusinessHandoverRecordSubDO updateObj = BeanUtils.toBean(updateReqVO, BusinessHandoverRecordSubDO.class); + businessHandoverRecordSubMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessHandoverRecordSub(Long id) { + // 校验存在 + validateBusinessHandoverRecordSubExists(id); + // 删除 + businessHandoverRecordSubMapper.deleteById(id); + } + + @Override + public void deleteBusinessHandoverRecordSubListByIds(List ids) { + // 校验存在 + validateBusinessHandoverRecordSubExists(ids); + // 删除 + businessHandoverRecordSubMapper.deleteByIds(ids); + } + + private void validateBusinessHandoverRecordSubExists(List ids) { + List list = businessHandoverRecordSubMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_HANDOVER_RECORD_SUB_NOT_EXISTS); + } + } + + private void validateBusinessHandoverRecordSubExists(Long id) { + if (businessHandoverRecordSubMapper.selectById(id) == null) { + throw exception(BUSINESS_HANDOVER_RECORD_SUB_NOT_EXISTS); + } + } + + @Override + public BusinessHandoverRecordSubDO getBusinessHandoverRecordSub(Long id) { + return businessHandoverRecordSubMapper.selectById(id); + } + + @Override + public PageResult getBusinessHandoverRecordSubPage(BusinessHandoverRecordSubPageReqVO pageReqVO) { + return businessHandoverRecordSubMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleAssayResultService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleAssayResultService.java new file mode 100644 index 0000000..a1729ac --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleAssayResultService.java @@ -0,0 +1,62 @@ +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.BusinessSampleAssayResultDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 委检登记来样品位 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessSampleAssayResultService { + + /** + * 创建委检登记来样品位 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessSampleAssayResultRespVO createBusinessSampleAssayResult(@Valid BusinessSampleAssayResultSaveReqVO createReqVO); + + /** + * 更新委检登记来样品位 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessSampleAssayResult(@Valid BusinessSampleAssayResultSaveReqVO updateReqVO); + + /** + * 删除委检登记来样品位 + * + * @param id 编号 + */ + void deleteBusinessSampleAssayResult(Long id); + + /** + * 批量删除委检登记来样品位 + * + * @param ids 编号 + */ + void deleteBusinessSampleAssayResultListByIds(List ids); + + /** + * 获得委检登记来样品位 + * + * @param id 编号 + * @return 委检登记来样品位 + */ + BusinessSampleAssayResultDO getBusinessSampleAssayResult(Long id); + + /** + * 获得委检登记来样品位分页 + * + * @param pageReqVO 分页查询 + * @return 委检登记来样品位分页 + */ + PageResult getBusinessSampleAssayResultPage(BusinessSampleAssayResultPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleAssayResultServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleAssayResultServiceImpl.java new file mode 100644 index 0000000..4f4cd23 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleAssayResultServiceImpl.java @@ -0,0 +1,91 @@ +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 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.BusinessSampleAssayResultDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleAssayResultMapper; + +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 BusinessSampleAssayResultServiceImpl implements BusinessSampleAssayResultService { + + @Resource + private BusinessSampleAssayResultMapper businessSampleAssayResultMapper; + + @Override + public BusinessSampleAssayResultRespVO createBusinessSampleAssayResult(BusinessSampleAssayResultSaveReqVO createReqVO) { + // 插入 + BusinessSampleAssayResultDO businessSampleAssayResult = BeanUtils.toBean(createReqVO, BusinessSampleAssayResultDO.class); + businessSampleAssayResultMapper.insert(businessSampleAssayResult); + // 返回 + return BeanUtils.toBean(businessSampleAssayResult, BusinessSampleAssayResultRespVO.class); + } + + @Override + public void updateBusinessSampleAssayResult(BusinessSampleAssayResultSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessSampleAssayResultExists(updateReqVO.getId()); + // 更新 + BusinessSampleAssayResultDO updateObj = BeanUtils.toBean(updateReqVO, BusinessSampleAssayResultDO.class); + businessSampleAssayResultMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessSampleAssayResult(Long id) { + // 校验存在 + validateBusinessSampleAssayResultExists(id); + // 删除 + businessSampleAssayResultMapper.deleteById(id); + } + + @Override + public void deleteBusinessSampleAssayResultListByIds(List ids) { + // 校验存在 + validateBusinessSampleAssayResultExists(ids); + // 删除 + businessSampleAssayResultMapper.deleteByIds(ids); + } + + private void validateBusinessSampleAssayResultExists(List ids) { + List list = businessSampleAssayResultMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_SAMPLE_ASSAY_RESULT_NOT_EXISTS); + } + } + + private void validateBusinessSampleAssayResultExists(Long id) { + if (businessSampleAssayResultMapper.selectById(id) == null) { + throw exception(BUSINESS_SAMPLE_ASSAY_RESULT_NOT_EXISTS); + } + } + + @Override + public BusinessSampleAssayResultDO getBusinessSampleAssayResult(Long id) { + return businessSampleAssayResultMapper.selectById(id); + } + + @Override + public PageResult getBusinessSampleAssayResultPage(BusinessSampleAssayResultPageReqVO pageReqVO) { + return businessSampleAssayResultMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustDetailService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustDetailService.java new file mode 100644 index 0000000..30eb403 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustDetailService.java @@ -0,0 +1,64 @@ +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.BusinessSampleEntrustDetailPageReqVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustDetailRespVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustDetailSaveReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 委检登记样品明细 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessSampleEntrustDetailService { + + /** + * 创建委检登记样品明细 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessSampleEntrustDetailRespVO createBusinessSampleEntrustDetail(@Valid BusinessSampleEntrustDetailSaveReqVO createReqVO); + + /** + * 更新委检登记样品明细 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessSampleEntrustDetail(@Valid BusinessSampleEntrustDetailSaveReqVO updateReqVO); + + /** + * 删除委检登记样品明细 + * + * @param id 编号 + */ + void deleteBusinessSampleEntrustDetail(Long id); + + /** + * 批量删除委检登记样品明细 + * + * @param ids 编号 + */ + void deleteBusinessSampleEntrustDetailListByIds(List ids); + + /** + * 获得委检登记样品明细 + * + * @param id 编号 + * @return 委检登记样品明细 + */ + BusinessSampleEntrustDetailDO getBusinessSampleEntrustDetail(Long id); + + /** + * 获得委检登记样品明细分页 + * + * @param pageReqVO 分页查询 + * @return 委检登记样品明细分页 + */ + PageResult getBusinessSampleEntrustDetailPage(BusinessSampleEntrustDetailPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustDetailServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustDetailServiceImpl.java new file mode 100644 index 0000000..657f73f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustDetailServiceImpl.java @@ -0,0 +1,91 @@ +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 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.BusinessSampleEntrustDetailDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustDetailMapper; + +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 BusinessSampleEntrustDetailServiceImpl implements BusinessSampleEntrustDetailService { + + @Resource + private BusinessSampleEntrustDetailMapper businessSampleEntrustDetailMapper; + + @Override + public BusinessSampleEntrustDetailRespVO createBusinessSampleEntrustDetail(BusinessSampleEntrustDetailSaveReqVO createReqVO) { + // 插入 + BusinessSampleEntrustDetailDO businessSampleEntrustDetail = BeanUtils.toBean(createReqVO, BusinessSampleEntrustDetailDO.class); + businessSampleEntrustDetailMapper.insert(businessSampleEntrustDetail); + // 返回 + return BeanUtils.toBean(businessSampleEntrustDetail, BusinessSampleEntrustDetailRespVO.class); + } + + @Override + public void updateBusinessSampleEntrustDetail(BusinessSampleEntrustDetailSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessSampleEntrustDetailExists(updateReqVO.getId()); + // 更新 + BusinessSampleEntrustDetailDO updateObj = BeanUtils.toBean(updateReqVO, BusinessSampleEntrustDetailDO.class); + businessSampleEntrustDetailMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessSampleEntrustDetail(Long id) { + // 校验存在 + validateBusinessSampleEntrustDetailExists(id); + // 删除 + businessSampleEntrustDetailMapper.deleteById(id); + } + + @Override + public void deleteBusinessSampleEntrustDetailListByIds(List ids) { + // 校验存在 + validateBusinessSampleEntrustDetailExists(ids); + // 删除 + businessSampleEntrustDetailMapper.deleteByIds(ids); + } + + private void validateBusinessSampleEntrustDetailExists(List ids) { + List list = businessSampleEntrustDetailMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_SAMPLE_ENTRUST_DETAIL_NOT_EXISTS); + } + } + + private void validateBusinessSampleEntrustDetailExists(Long id) { + if (businessSampleEntrustDetailMapper.selectById(id) == null) { + throw exception(BUSINESS_SAMPLE_ENTRUST_DETAIL_NOT_EXISTS); + } + } + + @Override + public BusinessSampleEntrustDetailDO getBusinessSampleEntrustDetail(Long id) { + return businessSampleEntrustDetailMapper.selectById(id); + } + + @Override + public PageResult getBusinessSampleEntrustDetailPage(BusinessSampleEntrustDetailPageReqVO pageReqVO) { + return businessSampleEntrustDetailMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustProjectService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustProjectService.java new file mode 100644 index 0000000..03a61e2 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustProjectService.java @@ -0,0 +1,62 @@ +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.BusinessSampleEntrustProjectDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 委检样品检测项目业务 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessSampleEntrustProjectService { + + /** + * 创建委检样品检测项目业务 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessSampleEntrustProjectRespVO createBusinessSampleEntrustProject(@Valid BusinessSampleEntrustProjectSaveReqVO createReqVO); + + /** + * 更新委检样品检测项目业务 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessSampleEntrustProject(@Valid BusinessSampleEntrustProjectSaveReqVO updateReqVO); + + /** + * 删除委检样品检测项目业务 + * + * @param id 编号 + */ + void deleteBusinessSampleEntrustProject(Long id); + + /** + * 批量删除委检样品检测项目业务 + * + * @param ids 编号 + */ + void deleteBusinessSampleEntrustProjectListByIds(List ids); + + /** + * 获得委检样品检测项目业务 + * + * @param id 编号 + * @return 委检样品检测项目业务 + */ + BusinessSampleEntrustProjectDO getBusinessSampleEntrustProject(Long id); + + /** + * 获得委检样品检测项目业务分页 + * + * @param pageReqVO 分页查询 + * @return 委检样品检测项目业务分页 + */ + PageResult getBusinessSampleEntrustProjectPage(BusinessSampleEntrustProjectPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustProjectServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustProjectServiceImpl.java new file mode 100644 index 0000000..54b0737 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustProjectServiceImpl.java @@ -0,0 +1,91 @@ +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 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.BusinessSampleEntrustProjectDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustProjectMapper; + +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 BusinessSampleEntrustProjectServiceImpl implements BusinessSampleEntrustProjectService { + + @Resource + private BusinessSampleEntrustProjectMapper businessSampleEntrustProjectMapper; + + @Override + public BusinessSampleEntrustProjectRespVO createBusinessSampleEntrustProject(BusinessSampleEntrustProjectSaveReqVO createReqVO) { + // 插入 + BusinessSampleEntrustProjectDO businessSampleEntrustProject = BeanUtils.toBean(createReqVO, BusinessSampleEntrustProjectDO.class); + businessSampleEntrustProjectMapper.insert(businessSampleEntrustProject); + // 返回 + return BeanUtils.toBean(businessSampleEntrustProject, BusinessSampleEntrustProjectRespVO.class); + } + + @Override + public void updateBusinessSampleEntrustProject(BusinessSampleEntrustProjectSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessSampleEntrustProjectExists(updateReqVO.getId()); + // 更新 + BusinessSampleEntrustProjectDO updateObj = BeanUtils.toBean(updateReqVO, BusinessSampleEntrustProjectDO.class); + businessSampleEntrustProjectMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessSampleEntrustProject(Long id) { + // 校验存在 + validateBusinessSampleEntrustProjectExists(id); + // 删除 + businessSampleEntrustProjectMapper.deleteById(id); + } + + @Override + public void deleteBusinessSampleEntrustProjectListByIds(List ids) { + // 校验存在 + validateBusinessSampleEntrustProjectExists(ids); + // 删除 + businessSampleEntrustProjectMapper.deleteByIds(ids); + } + + private void validateBusinessSampleEntrustProjectExists(List ids) { + List list = businessSampleEntrustProjectMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_SAMPLE_ENTRUST_PROJECT_NOT_EXISTS); + } + } + + private void validateBusinessSampleEntrustProjectExists(Long id) { + if (businessSampleEntrustProjectMapper.selectById(id) == null) { + throw exception(BUSINESS_SAMPLE_ENTRUST_PROJECT_NOT_EXISTS); + } + } + + @Override + public BusinessSampleEntrustProjectDO getBusinessSampleEntrustProject(Long id) { + return businessSampleEntrustProjectMapper.selectById(id); + } + + @Override + public PageResult getBusinessSampleEntrustProjectPage(BusinessSampleEntrustProjectPageReqVO pageReqVO) { + return businessSampleEntrustProjectMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustRegistrationService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustRegistrationService.java new file mode 100644 index 0000000..4daa6b1 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustRegistrationService.java @@ -0,0 +1,62 @@ +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.BusinessSampleEntrustRegistrationDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 委检登记业务 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessSampleEntrustRegistrationService { + + /** + * 创建委检登记业务 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessSampleEntrustRegistrationRespVO createBusinessSampleEntrustRegistration(@Valid BusinessSampleEntrustRegistrationSaveReqVO createReqVO); + + /** + * 更新委检登记业务 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessSampleEntrustRegistration(@Valid BusinessSampleEntrustRegistrationSaveReqVO updateReqVO); + + /** + * 删除委检登记业务 + * + * @param id 编号 + */ + void deleteBusinessSampleEntrustRegistration(Long id); + + /** + * 批量删除委检登记业务 + * + * @param ids 编号 + */ + void deleteBusinessSampleEntrustRegistrationListByIds(List ids); + + /** + * 获得委检登记业务 + * + * @param id 编号 + * @return 委检登记业务 + */ + BusinessSampleEntrustRegistrationDO getBusinessSampleEntrustRegistration(Long id); + + /** + * 获得委检登记业务分页 + * + * @param pageReqVO 分页查询 + * @return 委检登记业务分页 + */ + PageResult getBusinessSampleEntrustRegistrationPage(BusinessSampleEntrustRegistrationPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustRegistrationServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustRegistrationServiceImpl.java new file mode 100644 index 0000000..1ef7586 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleEntrustRegistrationServiceImpl.java @@ -0,0 +1,91 @@ +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 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.BusinessSampleEntrustRegistrationDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleEntrustRegistrationMapper; + +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 BusinessSampleEntrustRegistrationServiceImpl implements BusinessSampleEntrustRegistrationService { + + @Resource + private BusinessSampleEntrustRegistrationMapper businessSampleEntrustRegistrationMapper; + + @Override + public BusinessSampleEntrustRegistrationRespVO createBusinessSampleEntrustRegistration(BusinessSampleEntrustRegistrationSaveReqVO createReqVO) { + // 插入 + BusinessSampleEntrustRegistrationDO businessSampleEntrustRegistration = BeanUtils.toBean(createReqVO, BusinessSampleEntrustRegistrationDO.class); + businessSampleEntrustRegistrationMapper.insert(businessSampleEntrustRegistration); + // 返回 + return BeanUtils.toBean(businessSampleEntrustRegistration, BusinessSampleEntrustRegistrationRespVO.class); + } + + @Override + public void updateBusinessSampleEntrustRegistration(BusinessSampleEntrustRegistrationSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessSampleEntrustRegistrationExists(updateReqVO.getId()); + // 更新 + BusinessSampleEntrustRegistrationDO updateObj = BeanUtils.toBean(updateReqVO, BusinessSampleEntrustRegistrationDO.class); + businessSampleEntrustRegistrationMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessSampleEntrustRegistration(Long id) { + // 校验存在 + validateBusinessSampleEntrustRegistrationExists(id); + // 删除 + businessSampleEntrustRegistrationMapper.deleteById(id); + } + + @Override + public void deleteBusinessSampleEntrustRegistrationListByIds(List ids) { + // 校验存在 + validateBusinessSampleEntrustRegistrationExists(ids); + // 删除 + businessSampleEntrustRegistrationMapper.deleteByIds(ids); + } + + private void validateBusinessSampleEntrustRegistrationExists(List ids) { + List list = businessSampleEntrustRegistrationMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_SAMPLE_ENTRUST_REGISTRATION_NOT_EXISTS); + } + } + + private void validateBusinessSampleEntrustRegistrationExists(Long id) { + if (businessSampleEntrustRegistrationMapper.selectById(id) == null) { + throw exception(BUSINESS_SAMPLE_ENTRUST_REGISTRATION_NOT_EXISTS); + } + } + + @Override + public BusinessSampleEntrustRegistrationDO getBusinessSampleEntrustRegistration(Long id) { + return businessSampleEntrustRegistrationMapper.selectById(id); + } + + @Override + public PageResult getBusinessSampleEntrustRegistrationPage(BusinessSampleEntrustRegistrationPageReqVO pageReqVO) { + return businessSampleEntrustRegistrationMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleHandoverDetailService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleHandoverDetailService.java new file mode 100644 index 0000000..872bc77 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleHandoverDetailService.java @@ -0,0 +1,64 @@ +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.BusinessSampleHandoverDetailPageReqVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleHandoverDetailRespVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleHandoverDetailSaveReqVO; +import cn.iocoder.yudao.module.qms.business.bus.dal.dataobject.BusinessSampleHandoverDetailDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 样品交接明细 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessSampleHandoverDetailService { + + /** + * 创建样品交接明细 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessSampleHandoverDetailRespVO createBusinessSampleHandoverDetail(@Valid BusinessSampleHandoverDetailSaveReqVO createReqVO); + + /** + * 更新样品交接明细 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessSampleHandoverDetail(@Valid BusinessSampleHandoverDetailSaveReqVO updateReqVO); + + /** + * 删除样品交接明细 + * + * @param id 编号 + */ + void deleteBusinessSampleHandoverDetail(Long id); + + /** + * 批量删除样品交接明细 + * + * @param ids 编号 + */ + void deleteBusinessSampleHandoverDetailListByIds(List ids); + + /** + * 获得样品交接明细 + * + * @param id 编号 + * @return 样品交接明细 + */ + BusinessSampleHandoverDetailDO getBusinessSampleHandoverDetail(Long id); + + /** + * 获得样品交接明细分页 + * + * @param pageReqVO 分页查询 + * @return 样品交接明细分页 + */ + PageResult getBusinessSampleHandoverDetailPage(BusinessSampleHandoverDetailPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleHandoverDetailServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleHandoverDetailServiceImpl.java new file mode 100644 index 0000000..3e58a35 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleHandoverDetailServiceImpl.java @@ -0,0 +1,91 @@ +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 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.BusinessSampleHandoverDetailDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleHandoverDetailMapper; + +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 BusinessSampleHandoverDetailServiceImpl implements BusinessSampleHandoverDetailService { + + @Resource + private BusinessSampleHandoverDetailMapper businessSampleHandoverDetailMapper; + + @Override + public BusinessSampleHandoverDetailRespVO createBusinessSampleHandoverDetail(BusinessSampleHandoverDetailSaveReqVO createReqVO) { + // 插入 + BusinessSampleHandoverDetailDO businessSampleHandoverDetail = BeanUtils.toBean(createReqVO, BusinessSampleHandoverDetailDO.class); + businessSampleHandoverDetailMapper.insert(businessSampleHandoverDetail); + // 返回 + return BeanUtils.toBean(businessSampleHandoverDetail, BusinessSampleHandoverDetailRespVO.class); + } + + @Override + public void updateBusinessSampleHandoverDetail(BusinessSampleHandoverDetailSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessSampleHandoverDetailExists(updateReqVO.getId()); + // 更新 + BusinessSampleHandoverDetailDO updateObj = BeanUtils.toBean(updateReqVO, BusinessSampleHandoverDetailDO.class); + businessSampleHandoverDetailMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessSampleHandoverDetail(Long id) { + // 校验存在 + validateBusinessSampleHandoverDetailExists(id); + // 删除 + businessSampleHandoverDetailMapper.deleteById(id); + } + + @Override + public void deleteBusinessSampleHandoverDetailListByIds(List ids) { + // 校验存在 + validateBusinessSampleHandoverDetailExists(ids); + // 删除 + businessSampleHandoverDetailMapper.deleteByIds(ids); + } + + private void validateBusinessSampleHandoverDetailExists(List ids) { + List list = businessSampleHandoverDetailMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_SAMPLE_HANDOVER_DETAIL_NOT_EXISTS); + } + } + + private void validateBusinessSampleHandoverDetailExists(Long id) { + if (businessSampleHandoverDetailMapper.selectById(id) == null) { + throw exception(BUSINESS_SAMPLE_HANDOVER_DETAIL_NOT_EXISTS); + } + } + + @Override + public BusinessSampleHandoverDetailDO getBusinessSampleHandoverDetail(Long id) { + return businessSampleHandoverDetailMapper.selectById(id); + } + + @Override + public PageResult getBusinessSampleHandoverDetailPage(BusinessSampleHandoverDetailPageReqVO pageReqVO) { + return businessSampleHandoverDetailMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleHandoverService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleHandoverService.java new file mode 100644 index 0000000..a44bc27 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleHandoverService.java @@ -0,0 +1,62 @@ +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.BusinessSampleHandoverDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 样品交接单业务 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessSampleHandoverService { + + /** + * 创建样品交接单业务 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessSampleHandoverRespVO createBusinessSampleHandover(@Valid BusinessSampleHandoverSaveReqVO createReqVO); + + /** + * 更新样品交接单业务 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessSampleHandover(@Valid BusinessSampleHandoverSaveReqVO updateReqVO); + + /** + * 删除样品交接单业务 + * + * @param id 编号 + */ + void deleteBusinessSampleHandover(Long id); + + /** + * 批量删除样品交接单业务 + * + * @param ids 编号 + */ + void deleteBusinessSampleHandoverListByIds(List ids); + + /** + * 获得样品交接单业务 + * + * @param id 编号 + * @return 样品交接单业务 + */ + BusinessSampleHandoverDO getBusinessSampleHandover(Long id); + + /** + * 获得样品交接单业务分页 + * + * @param pageReqVO 分页查询 + * @return 样品交接单业务分页 + */ + PageResult getBusinessSampleHandoverPage(BusinessSampleHandoverPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleHandoverServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleHandoverServiceImpl.java new file mode 100644 index 0000000..bdbee9c --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSampleHandoverServiceImpl.java @@ -0,0 +1,91 @@ +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 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.BusinessSampleHandoverDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSampleHandoverMapper; + +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 BusinessSampleHandoverServiceImpl implements BusinessSampleHandoverService { + + @Resource + private BusinessSampleHandoverMapper businessSampleHandoverMapper; + + @Override + public BusinessSampleHandoverRespVO createBusinessSampleHandover(BusinessSampleHandoverSaveReqVO createReqVO) { + // 插入 + BusinessSampleHandoverDO businessSampleHandover = BeanUtils.toBean(createReqVO, BusinessSampleHandoverDO.class); + businessSampleHandoverMapper.insert(businessSampleHandover); + // 返回 + return BeanUtils.toBean(businessSampleHandover, BusinessSampleHandoverRespVO.class); + } + + @Override + public void updateBusinessSampleHandover(BusinessSampleHandoverSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessSampleHandoverExists(updateReqVO.getId()); + // 更新 + BusinessSampleHandoverDO updateObj = BeanUtils.toBean(updateReqVO, BusinessSampleHandoverDO.class); + businessSampleHandoverMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessSampleHandover(Long id) { + // 校验存在 + validateBusinessSampleHandoverExists(id); + // 删除 + businessSampleHandoverMapper.deleteById(id); + } + + @Override + public void deleteBusinessSampleHandoverListByIds(List ids) { + // 校验存在 + validateBusinessSampleHandoverExists(ids); + // 删除 + businessSampleHandoverMapper.deleteByIds(ids); + } + + private void validateBusinessSampleHandoverExists(List ids) { + List list = businessSampleHandoverMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_SAMPLE_HANDOVER_NOT_EXISTS); + } + } + + private void validateBusinessSampleHandoverExists(Long id) { + if (businessSampleHandoverMapper.selectById(id) == null) { + throw exception(BUSINESS_SAMPLE_HANDOVER_NOT_EXISTS); + } + } + + @Override + public BusinessSampleHandoverDO getBusinessSampleHandover(Long id) { + return businessSampleHandoverMapper.selectById(id); + } + + @Override + public PageResult getBusinessSampleHandoverPage(BusinessSampleHandoverPageReqVO pageReqVO) { + return businessSampleHandoverMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubParentSampleService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubParentSampleService.java new file mode 100644 index 0000000..2d04cfe --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubParentSampleService.java @@ -0,0 +1,62 @@ +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.BusinessSubParentSampleDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 分样业务 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessSubParentSampleService { + + /** + * 创建分样业务 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessSubParentSampleRespVO createBusinessSubParentSample(@Valid BusinessSubParentSampleSaveReqVO createReqVO); + + /** + * 更新分样业务 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessSubParentSample(@Valid BusinessSubParentSampleSaveReqVO updateReqVO); + + /** + * 删除分样业务 + * + * @param id 编号 + */ + void deleteBusinessSubParentSample(Long id); + + /** + * 批量删除分样业务 + * + * @param ids 编号 + */ + void deleteBusinessSubParentSampleListByIds(List ids); + + /** + * 获得分样业务 + * + * @param id 编号 + * @return 分样业务 + */ + BusinessSubParentSampleDO getBusinessSubParentSample(Long id); + + /** + * 获得分样业务分页 + * + * @param pageReqVO 分页查询 + * @return 分样业务分页 + */ + PageResult getBusinessSubParentSamplePage(BusinessSubParentSamplePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubParentSampleServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubParentSampleServiceImpl.java new file mode 100644 index 0000000..194b770 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubParentSampleServiceImpl.java @@ -0,0 +1,91 @@ +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 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.BusinessSubParentSampleDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSubParentSampleMapper; + +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 BusinessSubParentSampleServiceImpl implements BusinessSubParentSampleService { + + @Resource + private BusinessSubParentSampleMapper businessSubParentSampleMapper; + + @Override + public BusinessSubParentSampleRespVO createBusinessSubParentSample(BusinessSubParentSampleSaveReqVO createReqVO) { + // 插入 + BusinessSubParentSampleDO businessSubParentSample = BeanUtils.toBean(createReqVO, BusinessSubParentSampleDO.class); + businessSubParentSampleMapper.insert(businessSubParentSample); + // 返回 + return BeanUtils.toBean(businessSubParentSample, BusinessSubParentSampleRespVO.class); + } + + @Override + public void updateBusinessSubParentSample(BusinessSubParentSampleSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessSubParentSampleExists(updateReqVO.getId()); + // 更新 + BusinessSubParentSampleDO updateObj = BeanUtils.toBean(updateReqVO, BusinessSubParentSampleDO.class); + businessSubParentSampleMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessSubParentSample(Long id) { + // 校验存在 + validateBusinessSubParentSampleExists(id); + // 删除 + businessSubParentSampleMapper.deleteById(id); + } + + @Override + public void deleteBusinessSubParentSampleListByIds(List ids) { + // 校验存在 + validateBusinessSubParentSampleExists(ids); + // 删除 + businessSubParentSampleMapper.deleteByIds(ids); + } + + private void validateBusinessSubParentSampleExists(List ids) { + List list = businessSubParentSampleMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_SUB_PARENT_SAMPLE_NOT_EXISTS); + } + } + + private void validateBusinessSubParentSampleExists(Long id) { + if (businessSubParentSampleMapper.selectById(id) == null) { + throw exception(BUSINESS_SUB_PARENT_SAMPLE_NOT_EXISTS); + } + } + + @Override + public BusinessSubParentSampleDO getBusinessSubParentSample(Long id) { + return businessSubParentSampleMapper.selectById(id); + } + + @Override + public PageResult getBusinessSubParentSamplePage(BusinessSubParentSamplePageReqVO pageReqVO) { + return businessSubParentSampleMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleAssessmentService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleAssessmentService.java new file mode 100644 index 0000000..7b38717 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleAssessmentService.java @@ -0,0 +1,62 @@ +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.BusinessSubSampleAssessmentDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 子样判定数据业务 Service 接口 + * + * @author 后台管理 + */ +public interface BusinessSubSampleAssessmentService { + + /** + * 创建子样判定数据业务 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BusinessSubSampleAssessmentRespVO createBusinessSubSampleAssessment(@Valid BusinessSubSampleAssessmentSaveReqVO createReqVO); + + /** + * 更新子样判定数据业务 + * + * @param updateReqVO 更新信息 + */ + void updateBusinessSubSampleAssessment(@Valid BusinessSubSampleAssessmentSaveReqVO updateReqVO); + + /** + * 删除子样判定数据业务 + * + * @param id 编号 + */ + void deleteBusinessSubSampleAssessment(Long id); + + /** + * 批量删除子样判定数据业务 + * + * @param ids 编号 + */ + void deleteBusinessSubSampleAssessmentListByIds(List ids); + + /** + * 获得子样判定数据业务 + * + * @param id 编号 + * @return 子样判定数据业务 + */ + BusinessSubSampleAssessmentDO getBusinessSubSampleAssessment(Long id); + + /** + * 获得子样判定数据业务分页 + * + * @param pageReqVO 分页查询 + * @return 子样判定数据业务分页 + */ + PageResult getBusinessSubSampleAssessmentPage(BusinessSubSampleAssessmentPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleAssessmentServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleAssessmentServiceImpl.java new file mode 100644 index 0000000..650e776 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleAssessmentServiceImpl.java @@ -0,0 +1,91 @@ +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 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.BusinessSubSampleAssessmentDO; +import cn.iocoder.yudao.module.qms.business.bus.dal.mapper.BusinessSubSampleAssessmentMapper; +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 BusinessSubSampleAssessmentServiceImpl implements BusinessSubSampleAssessmentService { + + @Resource + private BusinessSubSampleAssessmentMapper businessSubSampleAssessmentMapper; + + @Override + public BusinessSubSampleAssessmentRespVO createBusinessSubSampleAssessment(BusinessSubSampleAssessmentSaveReqVO createReqVO) { + // 插入 + BusinessSubSampleAssessmentDO businessSubSampleAssessment = BeanUtils.toBean(createReqVO, BusinessSubSampleAssessmentDO.class); + businessSubSampleAssessmentMapper.insert(businessSubSampleAssessment); + // 返回 + return BeanUtils.toBean(businessSubSampleAssessment, BusinessSubSampleAssessmentRespVO.class); + } + + @Override + public void updateBusinessSubSampleAssessment(BusinessSubSampleAssessmentSaveReqVO updateReqVO) { + // 校验存在 + validateBusinessSubSampleAssessmentExists(updateReqVO.getId()); + // 更新 + BusinessSubSampleAssessmentDO updateObj = BeanUtils.toBean(updateReqVO, BusinessSubSampleAssessmentDO.class); + businessSubSampleAssessmentMapper.updateById(updateObj); + } + + @Override + public void deleteBusinessSubSampleAssessment(Long id) { + // 校验存在 + validateBusinessSubSampleAssessmentExists(id); + // 删除 + businessSubSampleAssessmentMapper.deleteById(id); + } + + @Override + public void deleteBusinessSubSampleAssessmentListByIds(List ids) { + // 校验存在 + validateBusinessSubSampleAssessmentExists(ids); + // 删除 + businessSubSampleAssessmentMapper.deleteByIds(ids); + } + + private void validateBusinessSubSampleAssessmentExists(List ids) { + List list = businessSubSampleAssessmentMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BUSINESS_SUB_SAMPLE_ASSESSMENT_NOT_EXISTS); + } + } + + private void validateBusinessSubSampleAssessmentExists(Long id) { + if (businessSubSampleAssessmentMapper.selectById(id) == null) { + throw exception(BUSINESS_SUB_SAMPLE_ASSESSMENT_NOT_EXISTS); + } + } + + @Override + public BusinessSubSampleAssessmentDO getBusinessSubSampleAssessment(Long id) { + return businessSubSampleAssessmentMapper.selectById(id); + } + + @Override + public PageResult getBusinessSubSampleAssessmentPage(BusinessSubSampleAssessmentPageReqVO pageReqVO) { + return businessSubSampleAssessmentMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleService.java new file mode 100644 index 0000000..c1b9eef --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleService.java @@ -0,0 +1,76 @@ +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 ids); + + /** + * 获得子样业务 + * + * @param id 编号 + * @return 子样业务 + */ + BusinessSubSampleDO getBusinessSubSample(Long id); + + /** + * 获得子样业务分页 + * + * @param pageReqVO 分页查询 + * @return 子样业务分页 + */ + PageResult getBusinessSubSamplePage(BusinessSubSamplePageReqVO pageReqVO); + + /** + * 获得子样业务列表 + * @param reqVO 查询 + * @return 子样业务列表 + */ + List getBusinessSubSampleList(@Valid BusinessSubSampleReqVO reqVO); + + /** + * 根据样品编号及样品流程节点获取样品信息 + * @param reqVO + * @return + */ + BusinessSubSampleExtendRespVO getBySampleCodeAndFlowKey(@Valid BusinessSubSampleReqVO reqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleServiceImpl.java new file mode 100644 index 0000000..6fac8cc --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/BusinessSubSampleServiceImpl.java @@ -0,0 +1,103 @@ +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 ids) { + // 校验存在 + validateBusinessSubSampleExists(ids); + // 删除 + businessSubSampleMapper.deleteByIds(ids); + } + + private void validateBusinessSubSampleExists(List ids) { + List 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 getBusinessSubSamplePage(BusinessSubSamplePageReqVO pageReqVO) { + return businessSubSampleMapper.selectPage(pageReqVO); + } + + @Override + public List getBusinessSubSampleList(@Valid BusinessSubSampleReqVO reqVO) { + return businessSubSampleMapper.selectlist(reqVO); + } + + @Override + public BusinessSubSampleExtendRespVO getBySampleCodeAndFlowKey(@Valid BusinessSubSampleReqVO reqVO) { + return businessSubSampleMapper.getBySampleCodeAndFlowKey(reqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleEntrustService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleEntrustService.java new file mode 100644 index 0000000..0aaa959 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleEntrustService.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import java.util.List; + +import com.yomahub.liteflow.flow.LiteflowResponse; + +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustRegistrationExtendRespVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustRegistrationSubmitReqVO; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleEntrustParam; +import jakarta.validation.Valid; + +public interface SampleEntrustService { + + LiteflowResponse create(@Valid SampleEntrustParam sampleEntrustParam); + + LiteflowResponse update(@Valid SampleEntrustParam sampleEntrustParam); + + BusinessSampleEntrustRegistrationExtendRespVO detail(Long id); + + void delete(Long id); + + void deleteList(List ids); + + void submit(@Valid BusinessSampleEntrustRegistrationSubmitReqVO req); +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleEntrustServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleEntrustServiceImpl.java new file mode 100644 index 0000000..150d5b4 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleEntrustServiceImpl.java @@ -0,0 +1,224 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.yomahub.liteflow.core.FlowExecutor; +import com.yomahub.liteflow.flow.LiteflowResponse; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.MPJLambdaWrapperX; +import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustDetailExtendRespVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustProjectExtendRespVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustRegistrationExtendRespVO; +import cn.iocoder.yudao.module.qms.business.bus.controller.vo.BusinessSampleEntrustRegistrationSubmitReqVO; +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.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.dic.dal.dataobject.DictionaryProjectDO; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import lombok.extern.slf4j.Slf4j; + + +@Slf4j +@Service +public class SampleEntrustServiceImpl implements SampleEntrustService { + + @Resource + private FlowExecutor flowExecutor; + + @Resource + private BusinessSampleEntrustRegistrationMapper businessSampleEntrustRegistrationMapper; + + @Resource + private BusinessSampleEntrustDetailMapper businessSampleEntrustDetailMapper; + + @Resource + private BusinessSampleEntrustProjectMapper businessSampleEntrustProjectMapper; + + @Resource + private BusinessSampleAssayResultMapper businessSampleAssayResultMapper; + + @Override + @Transactional(rollbackFor = Exception.class) + public LiteflowResponse create(@Valid SampleEntrustParam sampleEntrustParam) { + Long tenantId = TenantContextHolder.getRequiredTenantId(); + LiteflowResponse response = flowExecutor.execute2Resp("sampleEntrustChain" + tenantId, sampleEntrustParam, SampleEntrustContext.class); + if (!response.isSuccess()){ + log.error("创建委托登记失败", response.getCause()); + throw new ServiceException(500, response.getCause().getMessage()); + } + return response; + } + + @Override + public BusinessSampleEntrustRegistrationExtendRespVO detail(Long id) { + BusinessSampleEntrustRegistrationDO businessSampleEntrustRegistrationDO = businessSampleEntrustRegistrationMapper.selectById(id); + //BusinessSampleEntrustRegistrationExtendRespVO businessSampleEntrustRegistrationExtendRespVO = BeanUtils.toBean(businessSampleEntrustRegistrationDO, BusinessSampleEntrustRegistrationExtendRespVO.class); + + BusinessSampleEntrustRegistrationExtendRespVO businessSampleEntrustRegistrationExtendRespVO = BeanUtil.copyProperties(businessSampleEntrustRegistrationDO, BusinessSampleEntrustRegistrationExtendRespVO.class); + + List sampleEntrustDetailExtendRespVOList = new ArrayList<>(); + List sampleEntrustDetailList = businessSampleEntrustDetailMapper.selectList(new LambdaQueryWrapperX().eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, id)); + BusinessSampleEntrustDetailExtendRespVO businessSampleEntrustDetailExtendRespVO = null; + for (BusinessSampleEntrustDetailDO businessSampleEntrustDetailDO : sampleEntrustDetailList) { + businessSampleEntrustDetailExtendRespVO = BeanUtils.toBean(businessSampleEntrustDetailDO, BusinessSampleEntrustDetailExtendRespVO.class); + + List businessSampleEntrustProjectExtendRespVOList = businessSampleEntrustProjectMapper.selectJoinList(BusinessSampleEntrustProjectExtendRespVO.class, new MPJLambdaWrapperX() + .selectAll(BusinessSampleEntrustProjectDO.class) + .selectAs(DictionaryProjectDO::getCode, BusinessSampleEntrustProjectExtendRespVO::getProjectCode) + .selectAs(DictionaryProjectDO::getName, BusinessSampleEntrustProjectExtendRespVO::getProjectName) + .selectAs(DictionaryProjectDO::getSimpleName, BusinessSampleEntrustProjectExtendRespVO::getProjectSimpleName) + .selectAs(DictionaryProjectDO::getShowName, BusinessSampleEntrustProjectExtendRespVO::getProjectShowName) + .leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessSampleEntrustProjectDO::getDictionaryProjectId) + .eq(BusinessSampleEntrustProjectDO::getBusinessSampleEntrustDetailId, businessSampleEntrustDetailDO.getId())); + +// List sampleEntrustProjectList = businessSampleEntrustProjectMapper.selectList(new LambdaQueryWrapperX().eq(BusinessSampleEntrustProjectDO::getBusinessSampleEntrustDetailId, businessSampleEntrustDetailDO.getId())); +// List businessSampleEntrustProjectExtendRespVOList = BeanUtils.toBean(sampleEntrustProjectList, BusinessSampleEntrustProjectExtendRespVO.class); + + businessSampleEntrustDetailExtendRespVO.setSampleEntrustDetailProjectList(businessSampleEntrustProjectExtendRespVOList); + + sampleEntrustDetailExtendRespVOList.add(businessSampleEntrustDetailExtendRespVO); + } + businessSampleEntrustRegistrationExtendRespVO.setSampleEntrustDetailList(sampleEntrustDetailExtendRespVOList); + + return businessSampleEntrustRegistrationExtendRespVO; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public LiteflowResponse update(@Valid SampleEntrustParam sampleEntrustParam) { + Long tenantId = TenantContextHolder.getRequiredTenantId(); + LiteflowResponse response = flowExecutor.execute2Resp("sampleEntrustChain" + tenantId, sampleEntrustParam, SampleEntrustContext.class); + if (!response.isSuccess()){ + log.error("更新委托登记失败", response.getCause()); + throw new ServiceException(500, response.getCause().getMessage()); + } + return response; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Long id) { + if (id == null) { + throw new ServiceException(500, "委托登记id不允许为空"); + } + if (businessSampleEntrustRegistrationMapper.selectById(id) == null) { + throw new ServiceException(500, "委托登记业务不存在"); + } + + List sampleEntrustDetailList = businessSampleEntrustDetailMapper.selectList(new LambdaQueryWrapperX().eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, id)); + if (CollUtil.isNotEmpty(sampleEntrustDetailList)) { + List sampleEntrustDetailIdList = sampleEntrustDetailList.stream().map(m -> m.getId()).collect(Collectors.toList()); + List sampleEntrustProjectList = businessSampleEntrustProjectMapper.selectList(new LambdaQueryWrapperX().in(BusinessSampleEntrustProjectDO::getBusinessSampleEntrustDetailId, sampleEntrustDetailIdList)); + if (CollUtil.isNotEmpty(sampleEntrustProjectList)) { + List sampleEntrustProjectIdList = sampleEntrustProjectList.stream().map(m -> m.getId()).collect(Collectors.toList()); + //删除样品对应的检验项目 + businessSampleEntrustProjectMapper.deleteByIds(sampleEntrustProjectIdList); + } + List sampleAssayResultList = businessSampleAssayResultMapper.selectList(new LambdaQueryWrapperX().in(BusinessSampleAssayResultDO::getBusinessSampleEntrustDetailId, sampleEntrustDetailIdList)); + if (CollUtil.isNotEmpty(sampleAssayResultList)) { + List sampleAssayResultIdList = sampleAssayResultList.stream().map(m -> m.getId()).collect(Collectors.toList()); + //删除来样品位 + businessSampleAssayResultMapper.deleteByIds(sampleAssayResultIdList); + } + + //删除委托登记明细 + businessSampleEntrustDetailMapper.deleteByIds(sampleEntrustDetailIdList); + } + //删除委托登记 + businessSampleEntrustRegistrationMapper.deleteById(id); + + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteList(List ids) { + if (ids == null || ids.size() <= 0) { + throw new ServiceException(500, "委托登记id列表不允许为空"); + } + List sampleEntrustRegistrationList = businessSampleEntrustRegistrationMapper.selectByIds(ids); + if (CollUtil.isEmpty(sampleEntrustRegistrationList) || sampleEntrustRegistrationList.size() != ids.size()) { + throw new ServiceException(500, "委托登记业务不存在"); + } + + List sampleEntrustDetailList = businessSampleEntrustDetailMapper.selectList(new LambdaQueryWrapperX().in(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, ids)); + if (CollUtil.isNotEmpty(sampleEntrustDetailList)) { + List sampleEntrustDetailIdList = sampleEntrustDetailList.stream().map(m -> m.getId()).collect(Collectors.toList()); + List sampleEntrustProjectList = businessSampleEntrustProjectMapper.selectList(new LambdaQueryWrapperX().in(BusinessSampleEntrustProjectDO::getBusinessSampleEntrustDetailId, sampleEntrustDetailIdList)); + if (CollUtil.isNotEmpty(sampleEntrustProjectList)) { + List sampleEntrustProjectIdList = sampleEntrustProjectList.stream().map(m -> m.getId()).collect(Collectors.toList()); + //删除样品对应的检验项目 + businessSampleEntrustProjectMapper.deleteByIds(sampleEntrustProjectIdList); + } + List sampleAssayResultList = businessSampleAssayResultMapper.selectList(new LambdaQueryWrapperX().in(BusinessSampleAssayResultDO::getBusinessSampleEntrustDetailId, sampleEntrustDetailIdList)); + if (CollUtil.isNotEmpty(sampleAssayResultList)) { + List sampleAssayResultIdList = sampleAssayResultList.stream().map(m -> m.getId()).collect(Collectors.toList()); + //删除来样品位 + businessSampleAssayResultMapper.deleteByIds(sampleAssayResultIdList); + } + + //删除委托登记明细 + businessSampleEntrustDetailMapper.deleteByIds(sampleEntrustDetailIdList); + } + //删除委托登记 + businessSampleEntrustRegistrationMapper.deleteByIds(ids); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void submit(@Valid BusinessSampleEntrustRegistrationSubmitReqVO req) { + Long tenantId = TenantContextHolder.getRequiredTenantId(); + BusinessSampleEntrustRegistrationDO sampleEntrustRegistration = businessSampleEntrustRegistrationMapper.selectById(req.getId()); + if (sampleEntrustRegistration == null) { + throw new ServiceException(500, "委托登记业务不存在"); + } + SampleEntrustParam sampleEntrustParam = BeanUtils.toBean(sampleEntrustRegistration, SampleEntrustParam.class); + sampleEntrustParam.setIsReceiveSample(req.getIsReceiveSample()); + sampleEntrustParam.setIsSendSample(req.getIsSendSample()); + + List sampleEntrustDetailDOList = businessSampleEntrustDetailMapper.selectList(new LambdaQueryWrapperX().eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, req.getId())); + if (CollUtil.isNotEmpty(sampleEntrustDetailDOList)) { + + List sampleEntrustDetailIdList = sampleEntrustDetailDOList.stream().map(m -> m.getId()).collect(Collectors.toList()); + List sampleEntrustProjectDOList = businessSampleEntrustProjectMapper.selectList(new LambdaQueryWrapperX().in(BusinessSampleEntrustProjectDO::getBusinessSampleEntrustDetailId, sampleEntrustDetailIdList)); + + List sampleEntrustDetailList = BeanUtils.toBean(sampleEntrustDetailDOList, SampleEntrustDetail.class); + for (SampleEntrustDetail sampleEntrustDetail : sampleEntrustDetailList) { + List entrustProjectDOList = sampleEntrustProjectDOList.stream().filter(f -> f.getBusinessSampleEntrustDetailId().equals(sampleEntrustDetail.getId())).collect(Collectors.toList()); + List sampleEntrustDetailProjectList = BeanUtils.toBean(entrustProjectDOList, SampleEntrustDetailProject.class); + sampleEntrustDetail.setSampleEntrustDetailProjectList(sampleEntrustDetailProjectList); + } + + sampleEntrustParam.setSampleEntrustDetailList(sampleEntrustDetailList); + + //List sampleAssayResultDOList = businessSampleAssayResultMapper.selectList(new LambdaQueryWrapperX().in(BusinessSampleAssayResultDO::getBusinessSampleEntrustDetailId, sampleEntrustDetailIdList)); + } + + LiteflowResponse response = flowExecutor.execute2Resp("sampleEntrustSubmitChain" + tenantId, sampleEntrustParam, SampleEntrustContext.class); + if (!response.isSuccess()){ + log.error("提交委托登记失败", response.getCause()); + throw new ServiceException(500, response.getCause().getMessage()); + } + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleFlowService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleFlowService.java new file mode 100644 index 0000000..3a11dad --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleFlowService.java @@ -0,0 +1,16 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import com.yomahub.liteflow.flow.LiteflowResponse; + +import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleFlowParam; + +public interface SampleFlowService { + + /** + * 样品流转 + * @param sampleFlowParam + * @return + */ + LiteflowResponse sampleFlow(SampleFlowParam sampleFlowParam); + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleFlowServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleFlowServiceImpl.java new file mode 100644 index 0000000..1e96ada --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/bus/service/SampleFlowServiceImpl.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.qms.business.bus.service; + +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.yomahub.liteflow.core.FlowExecutor; +import com.yomahub.liteflow.flow.LiteflowResponse; + +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.param.SampleFlowParam; +import cn.iocoder.yudao.module.qms.business.bus.liteflow.slot.SampleFlowContext; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class SampleFlowServiceImpl implements SampleFlowService { + + @Resource + private FlowExecutor flowExecutor; + + @Override + @Transactional(rollbackFor = Exception.class) + public LiteflowResponse sampleFlow(SampleFlowParam sampleFlowParam) { + Long tenantId = TenantContextHolder.getRequiredTenantId(); + LiteflowResponse response = flowExecutor.execute2Resp("sampleFlowChain" + tenantId, sampleFlowParam, SampleFlowContext.class); + if (!response.isSuccess()){ + log.error("样品流转失败", response.getCause()); + throw new ServiceException(500, response.getCause().getMessage()); + } + return response; + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/BaseSampleController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/BaseSampleController.java new file mode 100644 index 0000000..89eef54 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/BaseSampleController.java @@ -0,0 +1,116 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSamplePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSampleRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSampleSaveReqVO; +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.*; +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.dal.dataobject.BaseSampleDO; +import cn.iocoder.yudao.module.qms.business.config.service.BaseSampleService; + +@Tag(name = "管理后台 - 样品大类管理") +@RestController +@RequestMapping("/qms/base-sample") +@Validated +public class BaseSampleController implements BusinessControllerMarker { + + + @Resource + private BaseSampleService baseSampleService; + + @PostMapping("/create") + @Operation(summary = "创建样品大类管理") + @PreAuthorize("@ss.hasPermission('qms:base-sample:create')") + public CommonResult createBaseSample(@Valid @RequestBody BaseSampleSaveReqVO createReqVO) { + return success(baseSampleService.createBaseSample(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新样品大类管理") + @PreAuthorize("@ss.hasPermission('qms:base-sample:update')") + public CommonResult updateBaseSample(@Valid @RequestBody BaseSampleSaveReqVO updateReqVO) { + baseSampleService.updateBaseSample(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除样品大类管理") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:base-sample:delete')") + public CommonResult deleteBaseSample(@RequestParam("id") Long id) { + baseSampleService.deleteBaseSample(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除样品大类管理") + @PreAuthorize("@ss.hasPermission('qms:base-sample:delete')") + public CommonResult deleteBaseSampleList(@RequestBody BatchDeleteReqVO req) { + baseSampleService.deleteBaseSampleListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得样品大类管理") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:base-sample:query')") + public CommonResult getBaseSample(@RequestParam("id") Long id) { + BaseSampleDO baseSample = baseSampleService.getBaseSample(id); + return success(BeanUtils.toBean(baseSample, BaseSampleRespVO.class)); + } + + @GetMapping("/getBaseSampleListWithAssayStandardCount") + @Operation(summary = "获得样品大类选项-含检测标准数") + public CommonResult> getBaseSampleListWithAssayStandardCount() { + List pageResult = baseSampleService.getBaseSampleListWithAssayStandardCount(); + return success(BeanUtils.toBean(pageResult, BaseSampleRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得样品大类管理分页") + @PreAuthorize("@ss.hasPermission('qms:base-sample:query')") + public CommonResult> getBaseSamplePage(@Valid BaseSamplePageReqVO pageReqVO) { + PageResult pageResult = baseSampleService.getBaseSamplePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BaseSampleRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出样品大类管理 Excel") + @PreAuthorize("@ss.hasPermission('qms:base-sample:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBaseSampleExcel(@Valid BaseSamplePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = baseSampleService.getBaseSamplePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "样品大类管理.xls", "数据", BaseSampleRespVO.class, + BeanUtils.toBean(list, BaseSampleRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodController.java new file mode 100644 index 0000000..a0e04ed --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodController.java @@ -0,0 +1,116 @@ +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.ConfigAssayMethodDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigAssayMethodService; + +@Tag(name = "管理后台 - 检测方法配置") +@RestController +@RequestMapping("/qms/config-assay-method") +@Validated +public class ConfigAssayMethodController implements BusinessControllerMarker { + + + @Resource + private ConfigAssayMethodService configAssayMethodService; + + @PostMapping("/create") + @Operation(summary = "创建检测方法配置") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method:create')") + public CommonResult createConfigAssayMethod(@Valid @RequestBody ConfigAssayMethodSaveReqVO createReqVO) { + return success(configAssayMethodService.createConfigAssayMethod(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新检测方法配置") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method:update')") + public CommonResult updateConfigAssayMethod(@Valid @RequestBody ConfigAssayMethodSaveReqVO updateReqVO) { + configAssayMethodService.updateConfigAssayMethod(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检测方法配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-assay-method:delete')") + public CommonResult deleteConfigAssayMethod(@RequestParam("id") Long id) { + configAssayMethodService.deleteConfigAssayMethod(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除检测方法配置") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method:delete')") + public CommonResult deleteConfigAssayMethodList(@RequestBody BatchDeleteReqVO req) { + configAssayMethodService.deleteConfigAssayMethodListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检测方法配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method:query')") + public CommonResult getConfigAssayMethod(@RequestParam("id") Long id) { + ConfigAssayMethodDO configAssayMethod = configAssayMethodService.getConfigAssayMethod(id); + return success(BeanUtils.toBean(configAssayMethod, ConfigAssayMethodRespVO.class)); + } + + @GetMapping("/list") + @Operation(summary = "获得检测方法配置列表") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method:query')") + public CommonResult> getConfigAssayMethodList(@Valid ConfigAssayMethodReqVO reqVO) { + List listResult = configAssayMethodService.getConfigAssayMethodList(reqVO); + return success(listResult); + } + + @GetMapping("/page") + @Operation(summary = "获得检测方法配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method:query')") + public CommonResult> getConfigAssayMethodPage(@Valid ConfigAssayMethodPageReqVO pageReqVO) { + PageResult pageResult = configAssayMethodService.getConfigAssayMethodPage(pageReqVO); + return success(pageResult); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出检测方法配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigAssayMethodExcel(@Valid ConfigAssayMethodPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configAssayMethodService.getConfigAssayMethodPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检测方法配置.xls", "数据", ConfigAssayMethodRespVO.class, + BeanUtils.toBean(list, ConfigAssayMethodRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodProjectController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodProjectController.java new file mode 100644 index 0000000..b99ad4f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodProjectController.java @@ -0,0 +1,108 @@ +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.ConfigAssayMethodProjectDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigAssayMethodProjectService; + +@Tag(name = "管理后台 - 检测方法分析项目配置") +@RestController +@RequestMapping("/qms/config-assay-method-project") +@Validated +public class ConfigAssayMethodProjectController implements BusinessControllerMarker { + + + @Resource + private ConfigAssayMethodProjectService configAssayMethodProjectService; + + @PostMapping("/create") + @Operation(summary = "创建检测方法分析项目配置") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project:create')") + public CommonResult createConfigAssayMethodProject(@Valid @RequestBody ConfigAssayMethodProjectSaveReqVO createReqVO) { + return success(configAssayMethodProjectService.createConfigAssayMethodProject(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新检测方法分析项目配置") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project:update')") + public CommonResult updateConfigAssayMethodProject(@Valid @RequestBody ConfigAssayMethodProjectSaveReqVO updateReqVO) { + configAssayMethodProjectService.updateConfigAssayMethodProject(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检测方法分析项目配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project:delete')") + public CommonResult deleteConfigAssayMethodProject(@RequestParam("id") Long id) { + configAssayMethodProjectService.deleteConfigAssayMethodProject(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除检测方法分析项目配置") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project:delete')") + public CommonResult deleteConfigAssayMethodProjectList(@RequestBody BatchDeleteReqVO req) { + configAssayMethodProjectService.deleteConfigAssayMethodProjectListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检测方法分析项目配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project:query')") + public CommonResult getConfigAssayMethodProject(@RequestParam("id") Long id) { + ConfigAssayMethodProjectDO configAssayMethodProject = configAssayMethodProjectService.getConfigAssayMethodProject(id); + return success(BeanUtils.toBean(configAssayMethodProject, ConfigAssayMethodProjectRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得检测方法分析项目配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project:query')") + public CommonResult> getConfigAssayMethodProjectPage(@Valid ConfigAssayMethodProjectPageReqVO pageReqVO) { + PageResult pageResult = configAssayMethodProjectService.getConfigAssayMethodProjectPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigAssayMethodProjectRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出检测方法分析项目配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigAssayMethodProjectExcel(@Valid ConfigAssayMethodProjectPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configAssayMethodProjectService.getConfigAssayMethodProjectPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检测方法分析项目配置.xls", "数据", ConfigAssayMethodProjectRespVO.class, + BeanUtils.toBean(list, ConfigAssayMethodProjectRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodProjectParameterController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodProjectParameterController.java new file mode 100644 index 0000000..e2410d2 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigAssayMethodProjectParameterController.java @@ -0,0 +1,108 @@ +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.ConfigAssayMethodProjectParameterDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigAssayMethodProjectParameterService; + +@Tag(name = "管理后台 - 检测方法分析项目参数配置") +@RestController +@RequestMapping("/qms/config-assay-method-project-parameter") +@Validated +public class ConfigAssayMethodProjectParameterController implements BusinessControllerMarker { + + + @Resource + private ConfigAssayMethodProjectParameterService configAssayMethodProjectParameterService; + + @PostMapping("/create") + @Operation(summary = "创建检测方法分析项目参数配置") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project-parameter:create')") + public CommonResult createConfigAssayMethodProjectParameter(@Valid @RequestBody ConfigAssayMethodProjectParameterSaveReqVO createReqVO) { + return success(configAssayMethodProjectParameterService.createConfigAssayMethodProjectParameter(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新检测方法分析项目参数配置") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project-parameter:update')") + public CommonResult updateConfigAssayMethodProjectParameter(@Valid @RequestBody ConfigAssayMethodProjectParameterSaveReqVO updateReqVO) { + configAssayMethodProjectParameterService.updateConfigAssayMethodProjectParameter(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检测方法分析项目参数配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project-parameter:delete')") + public CommonResult deleteConfigAssayMethodProjectParameter(@RequestParam("id") Long id) { + configAssayMethodProjectParameterService.deleteConfigAssayMethodProjectParameter(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除检测方法分析项目参数配置") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project-parameter:delete')") + public CommonResult deleteConfigAssayMethodProjectParameterList(@RequestBody BatchDeleteReqVO req) { + configAssayMethodProjectParameterService.deleteConfigAssayMethodProjectParameterListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检测方法分析项目参数配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project-parameter:query')") + public CommonResult getConfigAssayMethodProjectParameter(@RequestParam("id") Long id) { + ConfigAssayMethodProjectParameterDO configAssayMethodProjectParameter = configAssayMethodProjectParameterService.getConfigAssayMethodProjectParameter(id); + return success(BeanUtils.toBean(configAssayMethodProjectParameter, ConfigAssayMethodProjectParameterRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得检测方法分析项目参数配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project-parameter:query')") + public CommonResult> getConfigAssayMethodProjectParameterPage(@Valid ConfigAssayMethodProjectParameterPageReqVO pageReqVO) { + PageResult pageResult = configAssayMethodProjectParameterService.getConfigAssayMethodProjectParameterPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigAssayMethodProjectParameterRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出检测方法分析项目参数配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-assay-method-project-parameter:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigAssayMethodProjectParameterExcel(@Valid ConfigAssayMethodProjectParameterPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configAssayMethodProjectParameterService.getConfigAssayMethodProjectParameterPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检测方法分析项目参数配置.xls", "数据", ConfigAssayMethodProjectParameterRespVO.class, + BeanUtils.toBean(list, ConfigAssayMethodProjectParameterRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigBaseSampleController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigBaseSampleController.java new file mode 100644 index 0000000..2a9d21d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigBaseSampleController.java @@ -0,0 +1,108 @@ +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.ConfigBaseSampleDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigBaseSampleService; + +@Tag(name = "管理后台 - 主样配置") +@RestController +@RequestMapping("/qms/config-base-sample") +@Validated +public class ConfigBaseSampleController implements BusinessControllerMarker { + + + @Resource + private ConfigBaseSampleService configBaseSampleService; + + @PostMapping("/create") + @Operation(summary = "创建主样配置") + @PreAuthorize("@ss.hasPermission('qms:config-base-sample:create')") + public CommonResult createConfigBaseSample(@Valid @RequestBody ConfigBaseSampleSaveReqVO createReqVO) { + return success(configBaseSampleService.createConfigBaseSample(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新主样配置") + @PreAuthorize("@ss.hasPermission('qms:config-base-sample:update')") + public CommonResult updateConfigBaseSample(@Valid @RequestBody ConfigBaseSampleSaveReqVO updateReqVO) { + configBaseSampleService.updateConfigBaseSample(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除主样配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-base-sample:delete')") + public CommonResult deleteConfigBaseSample(@RequestParam("id") Long id) { + configBaseSampleService.deleteConfigBaseSample(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除主样配置") + @PreAuthorize("@ss.hasPermission('qms:config-base-sample:delete')") + public CommonResult deleteConfigBaseSampleList(@RequestBody BatchDeleteReqVO req) { + configBaseSampleService.deleteConfigBaseSampleListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得主样配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-base-sample:query')") + public CommonResult getConfigBaseSample(@RequestParam("id") Long id) { + ConfigBaseSampleDO configBaseSample = configBaseSampleService.getConfigBaseSample(id); + return success(BeanUtils.toBean(configBaseSample, ConfigBaseSampleRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得主样配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-base-sample:query')") + public CommonResult> getConfigBaseSamplePage(@Valid ConfigBaseSamplePageReqVO pageReqVO) { + PageResult pageResult = configBaseSampleService.getConfigBaseSamplePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigBaseSampleRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出主样配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-base-sample:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigBaseSampleExcel(@Valid ConfigBaseSamplePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configBaseSampleService.getConfigBaseSamplePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "主样配置.xls", "数据", ConfigBaseSampleRespVO.class, + BeanUtils.toBean(list, ConfigBaseSampleRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigEntrustSourceController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigEntrustSourceController.java new file mode 100644 index 0000000..e79efbc --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigEntrustSourceController.java @@ -0,0 +1,117 @@ +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.ConfigEntrustSourceDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigEntrustSourceService; + +@Tag(name = "管理后台 - 检验委托来源配置") +@RestController +@RequestMapping("/qms/config-entrust-source") +@Validated +public class ConfigEntrustSourceController implements BusinessControllerMarker { + + + @Resource + private ConfigEntrustSourceService configEntrustSourceService; + + @PostMapping("/create") + @Operation(summary = "创建检验委托来源配置") + @PreAuthorize("@ss.hasPermission('qms:config-entrust-source:create')") + public CommonResult createConfigEntrustSource(@Valid @RequestBody ConfigEntrustSourceSaveReqVO createReqVO) { + return success(configEntrustSourceService.createConfigEntrustSource(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新检验委托来源配置") + @PreAuthorize("@ss.hasPermission('qms:config-entrust-source:update')") + public CommonResult updateConfigEntrustSource(@Valid @RequestBody ConfigEntrustSourceSaveReqVO updateReqVO) { + configEntrustSourceService.updateConfigEntrustSource(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检验委托来源配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-entrust-source:delete')") + public CommonResult deleteConfigEntrustSource(@RequestParam("id") Long id) { + configEntrustSourceService.deleteConfigEntrustSource(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除检验委托来源配置") + @PreAuthorize("@ss.hasPermission('qms:config-entrust-source:delete')") + public CommonResult deleteConfigEntrustSourceList(@RequestBody BatchDeleteReqVO req) { + configEntrustSourceService.deleteConfigEntrustSourceListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检验委托来源配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-entrust-source:query')") + public CommonResult getConfigEntrustSource(@RequestParam("id") Long id) { + ConfigEntrustSourceDO configEntrustSource = configEntrustSourceService.getConfigEntrustSource(id); + return success(BeanUtils.toBean(configEntrustSource, ConfigEntrustSourceRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得检验委托来源配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-entrust-source:query')") + public CommonResult> getConfigEntrustSourcePage(@Valid ConfigEntrustSourcePageReqVO pageReqVO) { + PageResult pageResult = configEntrustSourceService.getConfigEntrustSourcePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigEntrustSourceRespVO.class)); + } + + @GetMapping("/list") + @Operation(summary = "获得检验委托来源配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-entrust-source:query')") + public CommonResult> getConfigEntrustSourceList(@Valid ConfigEntrustSourceReqVO reqVO) { + List listResult = configEntrustSourceService.getConfigEntrustSourceList(reqVO); + return success(BeanUtils.toBean(listResult, ConfigEntrustSourceRespVO.class)); + } + + + @GetMapping("/export-excel") + @Operation(summary = "导出检验委托来源配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-entrust-source:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigEntrustSourceExcel(@Valid ConfigEntrustSourcePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configEntrustSourceService.getConfigEntrustSourcePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检验委托来源配置.xls", "数据", ConfigEntrustSourceRespVO.class, + BeanUtils.toBean(list, ConfigEntrustSourceRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigProjectController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigProjectController.java new file mode 100644 index 0000000..c6bfc40 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigProjectController.java @@ -0,0 +1,108 @@ +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.ConfigProjectDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigProjectService; + +@Tag(name = "管理后台 - 检测项目配置") +@RestController +@RequestMapping("/qms/config-project") +@Validated +public class ConfigProjectController implements BusinessControllerMarker { + + + @Resource + private ConfigProjectService configProjectService; + + @PostMapping("/create") + @Operation(summary = "创建检测项目配置") + @PreAuthorize("@ss.hasPermission('qms:config-project:create')") + public CommonResult createConfigProject(@Valid @RequestBody ConfigProjectSaveReqVO createReqVO) { + return success(configProjectService.createConfigProject(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新检测项目配置") + @PreAuthorize("@ss.hasPermission('qms:config-project:update')") + public CommonResult updateConfigProject(@Valid @RequestBody ConfigProjectSaveReqVO updateReqVO) { + configProjectService.updateConfigProject(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检测项目配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-project:delete')") + public CommonResult deleteConfigProject(@RequestParam("id") Long id) { + configProjectService.deleteConfigProject(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除检测项目配置") + @PreAuthorize("@ss.hasPermission('qms:config-project:delete')") + public CommonResult deleteConfigProjectList(@RequestBody BatchDeleteReqVO req) { + configProjectService.deleteConfigProjectListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检测项目配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-project:query')") + public CommonResult getConfigProject(@RequestParam("id") Long id) { + ConfigProjectDO configProject = configProjectService.getConfigProject(id); + return success(BeanUtils.toBean(configProject, ConfigProjectRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得检测项目配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-project:query')") + public CommonResult> getConfigProjectPage(@Valid ConfigProjectPageReqVO pageReqVO) { + PageResult pageResult = configProjectService.getConfigProjectPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigProjectRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出检测项目配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-project:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigProjectExcel(@Valid ConfigProjectPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configProjectService.getConfigProjectPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检测项目配置.xls", "数据", ConfigProjectRespVO.class, + BeanUtils.toBean(list, ConfigProjectRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportFieldController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportFieldController.java new file mode 100644 index 0000000..04cdc47 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportFieldController.java @@ -0,0 +1,108 @@ +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.ConfigReportFieldDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigReportFieldService; + +@Tag(name = "管理后台 - 报表字段配置") +@RestController +@RequestMapping("/qms/config-report-field") +@Validated +public class ConfigReportFieldController implements BusinessControllerMarker { + + + @Resource + private ConfigReportFieldService configReportFieldService; + + @PostMapping("/create") + @Operation(summary = "创建报表字段配置") + @PreAuthorize("@ss.hasPermission('qms:config-report-field:create')") + public CommonResult createConfigReportField(@Valid @RequestBody ConfigReportFieldSaveReqVO createReqVO) { + return success(configReportFieldService.createConfigReportField(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新报表字段配置") + @PreAuthorize("@ss.hasPermission('qms:config-report-field:update')") + public CommonResult updateConfigReportField(@Valid @RequestBody ConfigReportFieldSaveReqVO updateReqVO) { + configReportFieldService.updateConfigReportField(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除报表字段配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-report-field:delete')") + public CommonResult deleteConfigReportField(@RequestParam("id") Long id) { + configReportFieldService.deleteConfigReportField(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除报表字段配置") + @PreAuthorize("@ss.hasPermission('qms:config-report-field:delete')") + public CommonResult deleteConfigReportFieldList(@RequestBody BatchDeleteReqVO req) { + configReportFieldService.deleteConfigReportFieldListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得报表字段配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-report-field:query')") + public CommonResult getConfigReportField(@RequestParam("id") Long id) { + ConfigReportFieldDO configReportField = configReportFieldService.getConfigReportField(id); + return success(BeanUtils.toBean(configReportField, ConfigReportFieldRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得报表字段配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-report-field:query')") + public CommonResult> getConfigReportFieldPage(@Valid ConfigReportFieldPageReqVO pageReqVO) { + PageResult pageResult = configReportFieldService.getConfigReportFieldPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigReportFieldRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出报表字段配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-report-field:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigReportFieldExcel(@Valid ConfigReportFieldPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configReportFieldService.getConfigReportFieldPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "报表字段配置.xls", "数据", ConfigReportFieldRespVO.class, + BeanUtils.toBean(list, ConfigReportFieldRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportTemplateController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportTemplateController.java new file mode 100644 index 0000000..8dbf132 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportTemplateController.java @@ -0,0 +1,251 @@ +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 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 createConfigReportTemplate(@Valid @RequestBody ConfigReportTemplateSaveReqVO createReqVO) { + return success(configReportTemplateService.createConfigReportTemplate(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新报表模版配置") + @PreAuthorize("@ss.hasPermission('qms:config-report-template:update')") + public CommonResult 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 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 deleteConfigReportTemplateList(@RequestParam("ids") List 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 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> getConfigReportTemplatePage(@Valid ConfigReportTemplatePageReqVO pageReqVO) { + PageResult 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 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 download(File file) throws IOException { + String fileName = file.getName(); + return download(file, fileName); + } + + /** + * 下载 + * + * @param file 文件 + * @param fileName 生成的文件名 + * @return {ResponseEntity} + * @throws IOException io异常 + */ + protected ResponseEntity 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 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 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); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportTypeController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportTypeController.java new file mode 100644 index 0000000..7831ac3 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigReportTypeController.java @@ -0,0 +1,108 @@ +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.ConfigReportTypeDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigReportTypeService; + +@Tag(name = "管理后台 - 报表类型配置") +@RestController +@RequestMapping("/qms/config-report-type") +@Validated +public class ConfigReportTypeController implements BusinessControllerMarker { + + + @Resource + private ConfigReportTypeService configReportTypeService; + + @PostMapping("/create") + @Operation(summary = "创建报表类型配置") + @PreAuthorize("@ss.hasPermission('qms:config-report-type:create')") + public CommonResult createConfigReportType(@Valid @RequestBody ConfigReportTypeSaveReqVO createReqVO) { + return success(configReportTypeService.createConfigReportType(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新报表类型配置") + @PreAuthorize("@ss.hasPermission('qms:config-report-type:update')") + public CommonResult updateConfigReportType(@Valid @RequestBody ConfigReportTypeSaveReqVO updateReqVO) { + configReportTypeService.updateConfigReportType(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除报表类型配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-report-type:delete')") + public CommonResult deleteConfigReportType(@RequestParam("id") Long id) { + configReportTypeService.deleteConfigReportType(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除报表类型配置") + @PreAuthorize("@ss.hasPermission('qms:config-report-type:delete')") + public CommonResult deleteConfigReportTypeList(@RequestBody BatchDeleteReqVO req) { + configReportTypeService.deleteConfigReportTypeListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得报表类型配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-report-type:query')") + public CommonResult getConfigReportType(@RequestParam("id") Long id) { + ConfigReportTypeDO configReportType = configReportTypeService.getConfigReportType(id); + return success(BeanUtils.toBean(configReportType, ConfigReportTypeRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得报表类型配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-report-type:query')") + public CommonResult> getConfigReportTypePage(@Valid ConfigReportTypePageReqVO pageReqVO) { + PageResult pageResult = configReportTypeService.getConfigReportTypePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigReportTypeRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出报表类型配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-report-type:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigReportTypeExcel(@Valid ConfigReportTypePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configReportTypeService.getConfigReportTypePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "报表类型配置.xls", "数据", ConfigReportTypeRespVO.class, + BeanUtils.toBean(list, ConfigReportTypeRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSampleFlowController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSampleFlowController.java new file mode 100644 index 0000000..9d9dd3e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSampleFlowController.java @@ -0,0 +1,108 @@ +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.ConfigSampleFlowDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSampleFlowService; + +@Tag(name = "管理后台 - 样品流程配置") +@RestController +@RequestMapping("/qms/config-sample-flow") +@Validated +public class ConfigSampleFlowController implements BusinessControllerMarker { + + + @Resource + private ConfigSampleFlowService configSampleFlowService; + + @PostMapping("/create") + @Operation(summary = "创建样品流程配置") + @PreAuthorize("@ss.hasPermission('qms:config-sample-flow:create')") + public CommonResult createConfigSampleFlow(@Valid @RequestBody ConfigSampleFlowSaveReqVO createReqVO) { + return success(configSampleFlowService.createConfigSampleFlow(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新样品流程配置") + @PreAuthorize("@ss.hasPermission('qms:config-sample-flow:update')") + public CommonResult updateConfigSampleFlow(@Valid @RequestBody ConfigSampleFlowSaveReqVO updateReqVO) { + configSampleFlowService.updateConfigSampleFlow(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除样品流程配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-sample-flow:delete')") + public CommonResult deleteConfigSampleFlow(@RequestParam("id") Long id) { + configSampleFlowService.deleteConfigSampleFlow(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除样品流程配置") + @PreAuthorize("@ss.hasPermission('qms:config-sample-flow:delete')") + public CommonResult deleteConfigSampleFlowList(@RequestBody BatchDeleteReqVO req) { + configSampleFlowService.deleteConfigSampleFlowListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得样品流程配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-sample-flow:query')") + public CommonResult getConfigSampleFlow(@RequestParam("id") Long id) { + ConfigSampleFlowDO configSampleFlow = configSampleFlowService.getConfigSampleFlow(id); + return success(BeanUtils.toBean(configSampleFlow, ConfigSampleFlowRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得样品流程配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-sample-flow:query')") + public CommonResult> getConfigSampleFlowPage(@Valid ConfigSampleFlowPageReqVO pageReqVO) { + PageResult pageResult = configSampleFlowService.getConfigSampleFlowPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigSampleFlowRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出样品流程配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-sample-flow:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigSampleFlowExcel(@Valid ConfigSampleFlowPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configSampleFlowService.getConfigSampleFlowPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "样品流程配置.xls", "数据", ConfigSampleFlowRespVO.class, + BeanUtils.toBean(list, ConfigSampleFlowRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSampleHandoverController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSampleHandoverController.java new file mode 100644 index 0000000..ae8ef9d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSampleHandoverController.java @@ -0,0 +1,106 @@ +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.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSampleHandoverDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSampleHandoverService; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +@Tag(name = "管理后台 - 样品交接配置") +@RestController +@RequestMapping("/qms/config-sample-handover") +@Validated +public class ConfigSampleHandoverController implements BusinessControllerMarker { + + + @Resource + private ConfigSampleHandoverService configSampleHandoverService; + + @PostMapping("/create") + @Operation(summary = "创建样品交接配置") + @PreAuthorize("@ss.hasPermission('qms:config-sample-handover:create')") + public CommonResult createConfigSampleHandover(@Valid @RequestBody ConfigSampleHandoverSaveReqVO createReqVO) { + return success(configSampleHandoverService.createConfigSampleHandover(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新样品交接配置") + @PreAuthorize("@ss.hasPermission('qms:config-sample-handover:update')") + public CommonResult updateConfigSampleHandover(@Valid @RequestBody ConfigSampleHandoverSaveReqVO updateReqVO) { + configSampleHandoverService.updateConfigSampleHandover(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除样品交接配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-sample-handover:delete')") + public CommonResult deleteConfigSampleHandover(@RequestParam("id") Long id) { + configSampleHandoverService.deleteConfigSampleHandover(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除样品交接配置") + @PreAuthorize("@ss.hasPermission('qms:config-sample-handover:delete')") + public CommonResult deleteConfigSampleHandoverList(@RequestBody BatchDeleteReqVO req) { + configSampleHandoverService.deleteConfigSampleHandoverListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得样品交接配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-sample-handover:query')") + public CommonResult getConfigSampleHandover(@RequestParam("id") Long id) { + ConfigSampleHandoverDO configSampleHandover = configSampleHandoverService.getConfigSampleHandover(id); + return success(BeanUtils.toBean(configSampleHandover, ConfigSampleHandoverRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得样品交接配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-sample-handover:query')") + public CommonResult> getConfigSampleHandoverPage(@Valid ConfigSampleHandoverPageReqVO pageReqVO) { + PageResult pageResult = configSampleHandoverService.getConfigSampleHandoverPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigSampleHandoverRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出样品交接配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-sample-handover:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigSampleHandoverExcel(@Valid ConfigSampleHandoverPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configSampleHandoverService.getConfigSampleHandoverPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "样品交接配置.xls", "数据", ConfigSampleHandoverRespVO.class, + BeanUtils.toBean(list, ConfigSampleHandoverRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSampleReportController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSampleReportController.java new file mode 100644 index 0000000..0bc5b14 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSampleReportController.java @@ -0,0 +1,108 @@ +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.ConfigSampleReportDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSampleReportService; + +@Tag(name = "管理后台 - 样品报表关系") +@RestController +@RequestMapping("/qms/config-sample-report") +@Validated +public class ConfigSampleReportController implements BusinessControllerMarker { + + + @Resource + private ConfigSampleReportService configSampleReportService; + + @PostMapping("/create") + @Operation(summary = "创建样品报表关系") + @PreAuthorize("@ss.hasPermission('qms:config-sample-report:create')") + public CommonResult createConfigSampleReport(@Valid @RequestBody ConfigSampleReportSaveReqVO createReqVO) { + return success(configSampleReportService.createConfigSampleReport(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新样品报表关系") + @PreAuthorize("@ss.hasPermission('qms:config-sample-report:update')") + public CommonResult updateConfigSampleReport(@Valid @RequestBody ConfigSampleReportSaveReqVO updateReqVO) { + configSampleReportService.updateConfigSampleReport(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除样品报表关系") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-sample-report:delete')") + public CommonResult deleteConfigSampleReport(@RequestParam("id") Long id) { + configSampleReportService.deleteConfigSampleReport(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除样品报表关系") + @PreAuthorize("@ss.hasPermission('qms:config-sample-report:delete')") + public CommonResult deleteConfigSampleReportList(@RequestBody BatchDeleteReqVO req) { + configSampleReportService.deleteConfigSampleReportListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得样品报表关系") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-sample-report:query')") + public CommonResult getConfigSampleReport(@RequestParam("id") Long id) { + ConfigSampleReportDO configSampleReport = configSampleReportService.getConfigSampleReport(id); + return success(BeanUtils.toBean(configSampleReport, ConfigSampleReportRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得样品报表关系分页") + @PreAuthorize("@ss.hasPermission('qms:config-sample-report:query')") + public CommonResult> getConfigSampleReportPage(@Valid ConfigSampleReportPageReqVO pageReqVO) { + PageResult pageResult = configSampleReportService.getConfigSampleReportPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigSampleReportRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出样品报表关系 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-sample-report:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigSampleReportExcel(@Valid ConfigSampleReportPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configSampleReportService.getConfigSampleReportPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "样品报表关系.xls", "数据", ConfigSampleReportRespVO.class, + BeanUtils.toBean(list, ConfigSampleReportRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSimpleFlowCodeController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSimpleFlowCodeController.java new file mode 100644 index 0000000..5258f02 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSimpleFlowCodeController.java @@ -0,0 +1,108 @@ +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.module.qms.business.config.controller.vo.ConfigSimpleFlowCodePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodeRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodeSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowCodeDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSimpleFlowCodeService; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +@Tag(name = "管理后台 - LiteFlow脚本配置") +@RestController +@RequestMapping("/qms/config-simple-flow-code") +@Validated +public class ConfigSimpleFlowCodeController implements BusinessControllerMarker { + + + @Resource + private ConfigSimpleFlowCodeService configSimpleFlowCodeService; + + @PostMapping("/create") + @Operation(summary = "创建LiteFlow脚本配置") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-code:create')") + public CommonResult createConfigSimpleFlowCode(@Valid @RequestBody ConfigSimpleFlowCodeSaveReqVO createReqVO) { + return success(configSimpleFlowCodeService.createConfigSimpleFlowCode(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新LiteFlow脚本配置") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-code:update')") + public CommonResult updateConfigSimpleFlowCode(@Valid @RequestBody ConfigSimpleFlowCodeSaveReqVO updateReqVO) { + configSimpleFlowCodeService.updateConfigSimpleFlowCode(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除LiteFlow脚本配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-code:delete')") + public CommonResult deleteConfigSimpleFlowCode(@RequestParam("id") Long id) { + configSimpleFlowCodeService.deleteConfigSimpleFlowCode(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除LiteFlow脚本配置") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-code:delete')") + public CommonResult deleteConfigSimpleFlowCodeList(@RequestBody BatchDeleteReqVO req) { + configSimpleFlowCodeService.deleteConfigSimpleFlowCodeListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得LiteFlow脚本配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-code:query')") + public CommonResult getConfigSimpleFlowCode(@RequestParam("id") Long id) { + ConfigSimpleFlowCodeDO configSimpleFlowCode = configSimpleFlowCodeService.getConfigSimpleFlowCode(id); + return success(BeanUtils.toBean(configSimpleFlowCode, ConfigSimpleFlowCodeRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得LiteFlow脚本配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-code:query')") + public CommonResult> getConfigSimpleFlowCodePage(@Valid ConfigSimpleFlowCodePageReqVO pageReqVO) { + PageResult pageResult = configSimpleFlowCodeService.getConfigSimpleFlowCodePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigSimpleFlowCodeRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出LiteFlow脚本配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-code:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigSimpleFlowCodeExcel(@Valid ConfigSimpleFlowCodePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configSimpleFlowCodeService.getConfigSimpleFlowCodePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "LiteFlow脚本配置.xls", "数据", ConfigSimpleFlowCodeRespVO.class, + BeanUtils.toBean(list, ConfigSimpleFlowCodeRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSimpleFlowRuleController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSimpleFlowRuleController.java new file mode 100644 index 0000000..d23d68e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSimpleFlowRuleController.java @@ -0,0 +1,122 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import org.springframework.web.bind.annotation.*; + +import com.yomahub.liteflow.flow.FlowBus; + +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.*; +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.config.controller.vo.ConfigSimpleFlowRulePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRuleRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRuleSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowRuleDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSimpleFlowRuleService; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + + +@Tag(name = "管理后台 - LiteFlow规则配置") +@RestController +@RequestMapping("/qms/config-simple-flow-rule") +@Validated +public class ConfigSimpleFlowRuleController implements BusinessControllerMarker { + + @Resource + private ConfigSimpleFlowRuleService configSimpleFlowRuleService; + + @PostMapping("/create") + @Operation(summary = "创建LiteFlow规则配置") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-rule:create')") + public CommonResult createConfigSimpleFlowRule(@Valid @RequestBody ConfigSimpleFlowRuleSaveReqVO createReqVO) { + return success(configSimpleFlowRuleService.createConfigSimpleFlowRule(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新LiteFlow规则配置") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-rule:update')") + public CommonResult updateConfigSimpleFlowRule(@Valid @RequestBody ConfigSimpleFlowRuleSaveReqVO updateReqVO) { + configSimpleFlowRuleService.updateConfigSimpleFlowRule(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除LiteFlow规则配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-rule:delete')") + public CommonResult deleteConfigSimpleFlowRule(@RequestParam("id") Long id) { + configSimpleFlowRuleService.deleteConfigSimpleFlowRule(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除LiteFlow规则配置") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-rule:delete')") + public CommonResult deleteConfigSimpleFlowRuleList(@RequestBody BatchDeleteReqVO req) { + configSimpleFlowRuleService.deleteConfigSimpleFlowRuleListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得LiteFlow规则配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-rule:query')") + public CommonResult getConfigSimpleFlowRule(@RequestParam("id") Long id) { + ConfigSimpleFlowRuleDO configSimpleFlowRule = configSimpleFlowRuleService.getConfigSimpleFlowRule(id); + return success(BeanUtils.toBean(configSimpleFlowRule, ConfigSimpleFlowRuleRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得LiteFlow规则配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-rule:query')") + public CommonResult> getConfigSimpleFlowRulePage(@Valid ConfigSimpleFlowRulePageReqVO pageReqVO) { + PageResult pageResult = configSimpleFlowRuleService.getConfigSimpleFlowRulePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigSimpleFlowRuleRespVO.class)); + } + + @GetMapping("/getLiteFlowChainMap") + @Operation(summary = "获得LiteFlow的规则map") + public CommonResult getLiteFlowChainMap() { + return success(FlowBus.getChainMap()); + } + + @GetMapping("/getLiteFlowNodeMap") + @Operation(summary = "获得LiteFlow的节点map") + public CommonResult getLiteFlowNodeMap() { + return success(FlowBus.getNodeMap()); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出LiteFlow规则配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-simple-flow-rule:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigSimpleFlowRuleExcel(@Valid ConfigSimpleFlowRulePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configSimpleFlowRuleService.getConfigSimpleFlowRulePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "LiteFlow规则配置.xls", "数据", ConfigSimpleFlowRuleRespVO.class, + BeanUtils.toBean(list, ConfigSimpleFlowRuleRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigStandardSampleProjectController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigStandardSampleProjectController.java new file mode 100644 index 0000000..c4f03c4 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigStandardSampleProjectController.java @@ -0,0 +1,108 @@ +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.ConfigStandardSampleProjectDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigStandardSampleProjectService; + +@Tag(name = "管理后台 - 标准样检测项目配置") +@RestController +@RequestMapping("/qms/config-standard-sample-project") +@Validated +public class ConfigStandardSampleProjectController implements BusinessControllerMarker { + + + @Resource + private ConfigStandardSampleProjectService configStandardSampleProjectService; + + @PostMapping("/create") + @Operation(summary = "创建标准样检测项目配置") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-project:create')") + public CommonResult createConfigStandardSampleProject(@Valid @RequestBody ConfigStandardSampleProjectSaveReqVO createReqVO) { + return success(configStandardSampleProjectService.createConfigStandardSampleProject(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新标准样检测项目配置") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-project:update')") + public CommonResult updateConfigStandardSampleProject(@Valid @RequestBody ConfigStandardSampleProjectSaveReqVO updateReqVO) { + configStandardSampleProjectService.updateConfigStandardSampleProject(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除标准样检测项目配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-project:delete')") + public CommonResult deleteConfigStandardSampleProject(@RequestParam("id") Long id) { + configStandardSampleProjectService.deleteConfigStandardSampleProject(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除标准样检测项目配置") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-project:delete')") + public CommonResult deleteConfigStandardSampleProjectList(@RequestBody BatchDeleteReqVO req) { + configStandardSampleProjectService.deleteConfigStandardSampleProjectListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得标准样检测项目配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-project:query')") + public CommonResult getConfigStandardSampleProject(@RequestParam("id") Long id) { + ConfigStandardSampleProjectDO configStandardSampleProject = configStandardSampleProjectService.getConfigStandardSampleProject(id); + return success(BeanUtils.toBean(configStandardSampleProject, ConfigStandardSampleProjectRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得标准样检测项目配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-project:query')") + public CommonResult> getConfigStandardSampleProjectPage(@Valid ConfigStandardSampleProjectPageReqVO pageReqVO) { + PageResult pageResult = configStandardSampleProjectService.getConfigStandardSampleProjectPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigStandardSampleProjectRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出标准样检测项目配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-project:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigStandardSampleProjectExcel(@Valid ConfigStandardSampleProjectPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configStandardSampleProjectService.getConfigStandardSampleProjectPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "标准样检测项目配置.xls", "数据", ConfigStandardSampleProjectRespVO.class, + BeanUtils.toBean(list, ConfigStandardSampleProjectRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigStandardSampleTypeController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigStandardSampleTypeController.java new file mode 100644 index 0000000..564f3e6 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigStandardSampleTypeController.java @@ -0,0 +1,108 @@ +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.ConfigStandardSampleTypeDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigStandardSampleTypeService; + +@Tag(name = "管理后台 - 标准样类型配置") +@RestController +@RequestMapping("/qms/config-standard-sample-type") +@Validated +public class ConfigStandardSampleTypeController implements BusinessControllerMarker { + + + @Resource + private ConfigStandardSampleTypeService configStandardSampleTypeService; + + @PostMapping("/create") + @Operation(summary = "创建标准样类型配置") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-type:create')") + public CommonResult createConfigStandardSampleType(@Valid @RequestBody ConfigStandardSampleTypeSaveReqVO createReqVO) { + return success(configStandardSampleTypeService.createConfigStandardSampleType(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新标准样类型配置") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-type:update')") + public CommonResult updateConfigStandardSampleType(@Valid @RequestBody ConfigStandardSampleTypeSaveReqVO updateReqVO) { + configStandardSampleTypeService.updateConfigStandardSampleType(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除标准样类型配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-type:delete')") + public CommonResult deleteConfigStandardSampleType(@RequestParam("id") Long id) { + configStandardSampleTypeService.deleteConfigStandardSampleType(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除标准样类型配置") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-type:delete')") + public CommonResult deleteConfigStandardSampleTypeList(@RequestBody BatchDeleteReqVO req) { + configStandardSampleTypeService.deleteConfigStandardSampleTypeListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得标准样类型配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-type:query')") + public CommonResult getConfigStandardSampleType(@RequestParam("id") Long id) { + ConfigStandardSampleTypeDO configStandardSampleType = configStandardSampleTypeService.getConfigStandardSampleType(id); + return success(BeanUtils.toBean(configStandardSampleType, ConfigStandardSampleTypeRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得标准样类型配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-type:query')") + public CommonResult> getConfigStandardSampleTypePage(@Valid ConfigStandardSampleTypePageReqVO pageReqVO) { + PageResult pageResult = configStandardSampleTypeService.getConfigStandardSampleTypePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigStandardSampleTypeRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出标准样类型配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-standard-sample-type:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigStandardSampleTypeExcel(@Valid ConfigStandardSampleTypePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configStandardSampleTypeService.getConfigStandardSampleTypePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "标准样类型配置.xls", "数据", ConfigStandardSampleTypeRespVO.class, + BeanUtils.toBean(list, ConfigStandardSampleTypeRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleController.java new file mode 100644 index 0000000..5d08905 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleController.java @@ -0,0 +1,108 @@ +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.ConfigSubSampleDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSubSampleService; + +@Tag(name = "管理后台 - 子样配置") +@RestController +@RequestMapping("/qms/config-sub-sample") +@Validated +public class ConfigSubSampleController implements BusinessControllerMarker { + + + @Resource + private ConfigSubSampleService configSubSampleService; + + @PostMapping("/create") + @Operation(summary = "创建子样配置") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample:create')") + public CommonResult createConfigSubSample(@Valid @RequestBody ConfigSubSampleSaveReqVO createReqVO) { + return success(configSubSampleService.createConfigSubSample(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新子样配置") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample:update')") + public CommonResult updateConfigSubSample(@Valid @RequestBody ConfigSubSampleSaveReqVO updateReqVO) { + configSubSampleService.updateConfigSubSample(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除子样配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample:delete')") + public CommonResult deleteConfigSubSample(@RequestParam("id") Long id) { + configSubSampleService.deleteConfigSubSample(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除子样配置") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample:delete')") + public CommonResult deleteConfigSubSampleList(@RequestBody BatchDeleteReqVO req) { + configSubSampleService.deleteConfigSubSampleListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得子样配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample:query')") + public CommonResult getConfigSubSample(@RequestParam("id") Long id) { + ConfigSubSampleDO configSubSample = configSubSampleService.getConfigSubSample(id); + return success(BeanUtils.toBean(configSubSample, ConfigSubSampleRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得子样配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample:query')") + public CommonResult> getConfigSubSamplePage(@Valid ConfigSubSamplePageReqVO pageReqVO) { + PageResult pageResult = configSubSampleService.getConfigSubSamplePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigSubSampleRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出子样配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigSubSampleExcel(@Valid ConfigSubSamplePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configSubSampleService.getConfigSubSamplePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "子样配置.xls", "数据", ConfigSubSampleRespVO.class, + BeanUtils.toBean(list, ConfigSubSampleRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleMethodController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleMethodController.java new file mode 100644 index 0000000..778f5a4 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleMethodController.java @@ -0,0 +1,108 @@ +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.ConfigSubSampleMethodDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSubSampleMethodService; + +@Tag(name = "管理后台 - 子样与检测方法配置") +@RestController +@RequestMapping("/qms/config-sub-sample-method") +@Validated +public class ConfigSubSampleMethodController implements BusinessControllerMarker { + + + @Resource + private ConfigSubSampleMethodService configSubSampleMethodService; + + @PostMapping("/create") + @Operation(summary = "创建子样与检测方法配置") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:create')") + public CommonResult createConfigSubSampleMethod(@Valid @RequestBody ConfigSubSampleMethodSaveReqVO createReqVO) { + return success(configSubSampleMethodService.createConfigSubSampleMethod(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新子样与检测方法配置") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:update')") + public CommonResult updateConfigSubSampleMethod(@Valid @RequestBody ConfigSubSampleMethodSaveReqVO updateReqVO) { + configSubSampleMethodService.updateConfigSubSampleMethod(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除子样与检测方法配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:delete')") + public CommonResult deleteConfigSubSampleMethod(@RequestParam("id") Long id) { + configSubSampleMethodService.deleteConfigSubSampleMethod(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除子样与检测方法配置") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:delete')") + public CommonResult deleteConfigSubSampleMethodList(@RequestBody BatchDeleteReqVO req) { + configSubSampleMethodService.deleteConfigSubSampleMethodListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得子样与检测方法配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:query')") + public CommonResult getConfigSubSampleMethod(@RequestParam("id") Long id) { + ConfigSubSampleMethodDO configSubSampleMethod = configSubSampleMethodService.getConfigSubSampleMethod(id); + return success(BeanUtils.toBean(configSubSampleMethod, ConfigSubSampleMethodRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得子样与检测方法配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:query')") + public CommonResult> getConfigSubSampleMethodPage(@Valid ConfigSubSampleMethodPageReqVO pageReqVO) { + PageResult pageResult = configSubSampleMethodService.getConfigSubSampleMethodPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigSubSampleMethodRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出子样与检测方法配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigSubSampleMethodExcel(@Valid ConfigSubSampleMethodPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configSubSampleMethodService.getConfigSubSampleMethodPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "子样与检测方法配置.xls", "数据", ConfigSubSampleMethodRespVO.class, + BeanUtils.toBean(list, ConfigSubSampleMethodRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleParentController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleParentController.java new file mode 100644 index 0000000..2227fe9 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigSubSampleParentController.java @@ -0,0 +1,108 @@ +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.ConfigSubSampleParentDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSubSampleParentService; + +@Tag(name = "管理后台 - 分样配置") +@RestController +@RequestMapping("/qms/config-sub-sample-parent") +@Validated +public class ConfigSubSampleParentController implements BusinessControllerMarker { + + + @Resource + private ConfigSubSampleParentService configSubSampleParentService; + + @PostMapping("/create") + @Operation(summary = "创建分样配置") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-parent:create')") + public CommonResult createConfigSubSampleParent(@Valid @RequestBody ConfigSubSampleParentSaveReqVO createReqVO) { + return success(configSubSampleParentService.createConfigSubSampleParent(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新分样配置") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-parent:update')") + public CommonResult updateConfigSubSampleParent(@Valid @RequestBody ConfigSubSampleParentSaveReqVO updateReqVO) { + configSubSampleParentService.updateConfigSubSampleParent(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除分样配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-parent:delete')") + public CommonResult deleteConfigSubSampleParent(@RequestParam("id") Long id) { + configSubSampleParentService.deleteConfigSubSampleParent(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除分样配置") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-parent:delete')") + public CommonResult deleteConfigSubSampleParentList(@RequestBody BatchDeleteReqVO req) { + configSubSampleParentService.deleteConfigSubSampleParentListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得分样配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-parent:query')") + public CommonResult getConfigSubSampleParent(@RequestParam("id") Long id) { + ConfigSubSampleParentDO configSubSampleParent = configSubSampleParentService.getConfigSubSampleParent(id); + return success(BeanUtils.toBean(configSubSampleParent, ConfigSubSampleParentRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得分样配置分页") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-parent:query')") + public CommonResult> getConfigSubSampleParentPage(@Valid ConfigSubSampleParentPageReqVO pageReqVO) { + PageResult pageResult = configSubSampleParentService.getConfigSubSampleParentPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ConfigSubSampleParentRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出分样配置 Excel") + @PreAuthorize("@ss.hasPermission('qms:config-sub-sample-parent:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportConfigSubSampleParentExcel(@Valid ConfigSubSampleParentPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = configSubSampleParentService.getConfigSubSampleParentPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "分样配置.xls", "数据", ConfigSubSampleParentRespVO.class, + BeanUtils.toBean(list, ConfigSubSampleParentRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigWarehouseLocationInfomationController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigWarehouseLocationInfomationController.java new file mode 100644 index 0000000..611a80c --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/ConfigWarehouseLocationInfomationController.java @@ -0,0 +1,108 @@ +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 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 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 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 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 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> getConfigWarehouseLocationInfomationPage(@Valid ConfigWarehouseLocationInfomationPageReqVO pageReqVO) { + PageResult 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 list = configWarehouseLocationInfomationService.getConfigWarehouseLocationInfomationPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "样品库位信息.xls", "数据", ConfigWarehouseLocationInfomationRespVO.class, + BeanUtils.toBean(list, ConfigWarehouseLocationInfomationRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardController.java new file mode 100644 index 0000000..866ce24 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardController.java @@ -0,0 +1,146 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardExtendDO; +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.MaterialAssayStandardMapper; +import cn.iocoder.yudao.module.qms.business.config.service.MaterialAssayStandardDetailService; +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.*; +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.dal.dataobject.MaterialAssayStandardDO; +import cn.iocoder.yudao.module.qms.business.config.service.MaterialAssayStandardService; + +@Tag(name = "管理后台 - 检测标准") +@RestController +@RequestMapping("/qms/material-assay-standard") +@Validated +public class MaterialAssayStandardController implements BusinessControllerMarker { + + + @Resource private MaterialAssayStandardService materialAssayStandardService; + @Resource private MaterialAssayStandardDetailService materialAssayStandardDetailService; + + @PostMapping("/createTempData") + @Operation(summary = "创建检测标准临时数据") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard:create')") + public CommonResult createTempData() { + MaterialAssayStandardSaveReqVO vo = new MaterialAssayStandardSaveReqVO(); + vo.setRemark(MaterialAssayStandardMapper.tempDataKey); + MaterialAssayStandardRespVO retVo = materialAssayStandardService.createMaterialAssayStandard(vo); + retVo.setRemark(""); + return success(retVo); + } + + + @PostMapping("/create") + @Operation(summary = "创建检测标准") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard:create')") + public CommonResult createMaterialAssayStandard(@Valid @RequestBody MaterialAssayStandardSaveReqVO createReqVO) { + return success(materialAssayStandardService.createMaterialAssayStandard(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新检测标准") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard:update')") + public CommonResult updateMaterialAssayStandard(@Valid @RequestBody MaterialAssayStandardSaveReqVO updateReqVO) { + materialAssayStandardService.updateMaterialAssayStandard(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检测标准") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard:delete')") + public CommonResult deleteMaterialAssayStandard(@RequestParam("id") Long id) { + materialAssayStandardService.deleteMaterialAssayStandard(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除检测标准") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard:delete')") + public CommonResult deleteMaterialAssayStandardList(@RequestBody BatchDeleteReqVO req) { + materialAssayStandardService.deleteMaterialAssayStandardListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检测标准") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard:query')") + public CommonResult getMaterialAssayStandard(@RequestParam("id") Long id) { + MaterialAssayStandardDO materialAssayStandard = materialAssayStandardService.getMaterialAssayStandard(id); + return success(BeanUtils.toBean(materialAssayStandard, MaterialAssayStandardRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得检测标准分页") + public CommonResult> getMaterialAssayStandardPage(@Valid MaterialAssayStandardPageReqVO pageReqVO) { + PageResult pageResult = materialAssayStandardService.getMaterialAssayStandardPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, MaterialAssayStandardRespVO.class)); + } + + @GetMapping("/pageWithDetail") + @Operation(summary = "获得检测标准分页(含明细列表)") + public CommonResult> pageWithDetail(@Valid MaterialAssayStandardPageReqVO pageReqVO) { + PageResult pageResult = materialAssayStandardService.getMaterialAssayStandardPageWithExtend(pageReqVO); + List standardDOList = pageResult.getList(); + if(pageResult.getTotal() == 0 || standardDOList == null || standardDOList.isEmpty()) + return success(BeanUtils.toBean(pageResult, MaterialAssayStandardRespVO.class)); + + List standardIdList = standardDOList.stream().map(MaterialAssayStandardDO::getId).toList(); + List detailListAll = materialAssayStandardDetailService.getByStandardIdList(standardIdList); + + CommonResult> result = success(BeanUtils.toBean(pageResult, MaterialAssayStandardRespVO.class)); + List list = result.getData().getList(); + for(MaterialAssayStandardRespVO standard : list) { + Long standardId = standard.getId(); + List detailList = detailListAll.stream().filter(detail -> + detail.getMaterialAssayStandardId() != null && detail.getMaterialAssayStandardId().equals(standardId)).toList(); + standard.setDetailList(detailList); + } + return result; + } + + @GetMapping("/export-excel") + @Operation(summary = "导出检测标准 Excel") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportMaterialAssayStandardExcel(@Valid MaterialAssayStandardPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = materialAssayStandardService.getMaterialAssayStandardPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检测标准.xls", "数据", MaterialAssayStandardRespVO.class, + BeanUtils.toBean(list, MaterialAssayStandardRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardDetailController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardDetailController.java new file mode 100644 index 0000000..26e231f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardDetailController.java @@ -0,0 +1,140 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDO; +import cn.iocoder.yudao.module.qms.business.config.service.MaterialAssayStandardService; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +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.*; +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.dal.dataobject.MaterialAssayStandardDetailDO; +import cn.iocoder.yudao.module.qms.business.config.service.MaterialAssayStandardDetailService; + +@Tag(name = "管理后台 - 物料检测标准检测项目") +@RestController +@RequestMapping("/qms/material-assay-standard-detail") +@Validated +public class MaterialAssayStandardDetailController implements BusinessControllerMarker { + + + @Resource private MaterialAssayStandardDetailService materialAssayStandardDetailService; + @Resource private MaterialAssayStandardService materialAssayStandardService; + + + @GetMapping("/queryGroupByaAssayCategory") + @Operation(summary = "按检测分类分组查询") + @Parameter(name = "id", description = "按检测分类分组查询", required = true, example = "1024") + public CommonResult queryGroupByaAssayCategory(@RequestParam("baseSampleID") Long baseSampleID) { + + List standardList = materialAssayStandardService.queryByBaseSampleID(baseSampleID); + List standardIds = standardList.stream().map(MaterialAssayStandardDO::getId).toList(); + if(standardIds.isEmpty()) + return success(new JSONArray()); + MaterialAssayStandardDetailPageReqVO params = new MaterialAssayStandardDetailPageReqVO(); + params.setStandardIdList(standardIds); + List list = materialAssayStandardDetailService.selectListWithExtend(params); + JSONArray jsonArray = new JSONArray(); + List assayCategoryList = new ArrayList<>(); + assayCategoryList = list.stream().map(MaterialAssayStandardDetailRespVO::getAssayCategory).distinct().toList(); + for (String assayCategory : assayCategoryList) { + JSONObject jsonObject = new JSONObject(); + jsonObject.put("assayCategory", assayCategory); + jsonObject.put("assayCategoryName", list.stream().filter(item -> + item.getAssayCategory().equals(assayCategory)).map(MaterialAssayStandardDetailRespVO::getAssayCategoryName).findFirst().get()); + jsonObject.put("list", list.stream().filter(item -> item.getAssayCategory().equals(assayCategory)).toList()); + jsonArray.add(jsonObject); + } + return success(jsonArray); + } + + @PostMapping("/create") + @Operation(summary = "创建物料检测标准检测项目") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:create')") + public CommonResult createMaterialAssayStandardDetail(@Valid @RequestBody MaterialAssayStandardDetailSaveReqVO createReqVO) { + return success(materialAssayStandardDetailService.createMaterialAssayStandardDetail(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新物料检测标准检测项目") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:update')") + public CommonResult updateMaterialAssayStandardDetail(@Valid @RequestBody MaterialAssayStandardDetailSaveReqVO updateReqVO) { + materialAssayStandardDetailService.updateMaterialAssayStandardDetail(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除物料检测标准检测项目") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:delete')") + public CommonResult deleteMaterialAssayStandardDetail(@RequestParam("id") Long id) { + materialAssayStandardDetailService.deleteMaterialAssayStandardDetail(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除物料检测标准检测项目") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:delete')") + public CommonResult deleteMaterialAssayStandardDetailList(@RequestBody BatchDeleteReqVO req) { + materialAssayStandardDetailService.deleteMaterialAssayStandardDetailListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得物料检测标准检测项目") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:query')") + public CommonResult getMaterialAssayStandardDetail(@RequestParam("id") Long id) { + MaterialAssayStandardDetailDO materialAssayStandardDetail = materialAssayStandardDetailService.getMaterialAssayStandardDetail(id); + return success(BeanUtils.toBean(materialAssayStandardDetail, MaterialAssayStandardDetailRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得物料检测标准检测项目分页") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:query')") + public CommonResult> getMaterialAssayStandardDetailPage(@Valid MaterialAssayStandardDetailPageReqVO pageReqVO) { + PageResult pageResult = materialAssayStandardDetailService.getMaterialAssayStandardDetailPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, MaterialAssayStandardDetailRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出物料检测标准检测项目 Excel") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-detail:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportMaterialAssayStandardDetailExcel(@Valid MaterialAssayStandardDetailPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = materialAssayStandardDetailService.getMaterialAssayStandardDetailPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "物料检测标准检测项目.xls", "数据", MaterialAssayStandardDetailRespVO.class, + BeanUtils.toBean(list, MaterialAssayStandardDetailRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardMethodController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardMethodController.java new file mode 100644 index 0000000..95a5bc9 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/admin/MaterialAssayStandardMethodController.java @@ -0,0 +1,109 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.admin; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodSaveReqVO; +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.*; +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.dal.dataobject.MaterialAssayStandardMethodDO; +import cn.iocoder.yudao.module.qms.business.config.service.MaterialAssayStandardMethodService; + +@Tag(name = "管理后台 - 物料检测标准与方法") +@RestController +@RequestMapping("/qms/material-assay-standard-method") +@Validated +public class MaterialAssayStandardMethodController implements BusinessControllerMarker { + + + @Resource + private MaterialAssayStandardMethodService materialAssayStandardMethodService; + + @PostMapping("/create") + @Operation(summary = "创建物料检测标准与方法") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-method:create')") + public CommonResult createMaterialAssayStandardMethod(@Valid @RequestBody MaterialAssayStandardMethodSaveReqVO createReqVO) { + return success(materialAssayStandardMethodService.createMaterialAssayStandardMethod(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新物料检测标准与方法") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-method:update')") + public CommonResult updateMaterialAssayStandardMethod(@Valid @RequestBody MaterialAssayStandardMethodSaveReqVO updateReqVO) { + materialAssayStandardMethodService.updateMaterialAssayStandardMethod(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除物料检测标准与方法") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-method:delete')") + public CommonResult deleteMaterialAssayStandardMethod(@RequestParam("id") Long id) { + materialAssayStandardMethodService.deleteMaterialAssayStandardMethod(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除物料检测标准与方法") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-method:delete')") + public CommonResult deleteMaterialAssayStandardMethodList(@RequestBody BatchDeleteReqVO req) { + materialAssayStandardMethodService.deleteMaterialAssayStandardMethodListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得物料检测标准与方法") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-method:query')") + public CommonResult getMaterialAssayStandardMethod(@RequestParam("id") Long id) { + MaterialAssayStandardMethodDO materialAssayStandardMethod = materialAssayStandardMethodService.getMaterialAssayStandardMethod(id); + return success(BeanUtils.toBean(materialAssayStandardMethod, MaterialAssayStandardMethodRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得物料检测标准与方法分页") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-method:query')") + public CommonResult> getMaterialAssayStandardMethodPage(@Valid MaterialAssayStandardMethodPageReqVO pageReqVO) { + PageResult pageResult = materialAssayStandardMethodService.getMaterialAssayStandardMethodPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, MaterialAssayStandardMethodRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出物料检测标准与方法 Excel") + @PreAuthorize("@ss.hasPermission('qms:material-assay-standard-method:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportMaterialAssayStandardMethodExcel(@Valid MaterialAssayStandardMethodPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = materialAssayStandardMethodService.getMaterialAssayStandardMethodPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "物料检测标准与方法.xls", "数据", MaterialAssayStandardMethodRespVO.class, + BeanUtils.toBean(list, MaterialAssayStandardMethodRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSamplePageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSamplePageReqVO.java new file mode 100644 index 0000000..803b8a3 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSamplePageReqVO.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +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 BaseSamplePageReqVO extends PageParam { + + @Schema(description = "大类名称", example = "王五") + private String sampleName; + + @Schema(description = "物料ID", example = "12840") + private Long materialId; + + @Schema(description = "物料代码") + private String materialCode; + + @Schema(description = "物料名称", example = "芋艿") + private String materialName; + + @Schema(description = "样品类型_ID,字典表【T_DIC_BSN】结算样、委检样、抽查样", example = "19234") + private Long dictionaryBusinessId; + + @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 String assayStandardCount; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSampleRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSampleRespVO.java new file mode 100644 index 0000000..89e1320 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSampleRespVO.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import cn.iocoder.yudao.module.qms.core.aspect.annotation.Dict; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +import static cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant.DICT_ANNOTATION_KEY_TYPE_ID; + +@Schema(description = "管理后台 - 样品大类管理 Response VO") +@Data +@ExcelIgnoreUnannotated +public class BaseSampleRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6009") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "大类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("大类名称") + private String sampleName; + + @Schema(description = "物料ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12840") + @ExcelProperty("物料ID") + private Long materialId; + + @Schema(description = "物料代码") + @ExcelProperty("物料代码") + private String materialCode; + + @Schema(description = "物料名称", example = "芋艿") + @ExcelProperty("物料名称") + private String materialName; + + @Schema(description = "样品类型_ID,字典表【T_DIC_BSN】结算样、委检样、抽查样", requiredMode = Schema.RequiredMode.REQUIRED, example = "19234") + @ExcelProperty("样品类型_ID,字典表【T_DIC_BSN】结算样、委检样、抽查样") + @Dict(dicCode = "sampleType", keyOrID = DICT_ANNOTATION_KEY_TYPE_ID) + private Long dictionaryBusinessId; + + @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 = "检测标准数量") + private String assayStandardCount; +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSampleSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSampleSaveReqVO.java new file mode 100644 index 0000000..2b48a07 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/BaseSampleSaveReqVO.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 样品大类管理新增/修改 Request VO") +@Data +public class BaseSampleSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6009") + private Long id; + + @Schema(description = "大类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @NotEmpty(message = "大类名称不能为空") + private String sampleName; + + @Schema(description = "物料ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12840") + @NotNull(message = "物料ID不能为空") + private Long materialId; + + @Schema(description = "物料代码") + private String materialCode; + + @Schema(description = "物料名称", example = "芋艿") + private String materialName; + + @Schema(description = "样品类型_ID,字典表【T_DIC_BSN】结算样、委检样、抽查样", requiredMode = Schema.RequiredMode.REQUIRED, example = "19234") + @NotNull(message = "样品类型_ID,字典表【T_DIC_BSN】结算样、委检样、抽查样不能为空") + private Long dictionaryBusinessId; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + //===================扩展字段=================== + @Schema(description = "检测标准数量") + private String assayStandardCount; +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodExtendRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodExtendRespVO.java new file mode 100644 index 0000000..53f05d2 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodExtendRespVO.java @@ -0,0 +1,14 @@ +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 configAssayMethodProjectList; + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodPageReqVO.java new file mode 100644 index 0000000..d16bdbf --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodPageReqVO.java @@ -0,0 +1,62 @@ +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 ConfigAssayMethodPageReqVO extends PageParam { + + @Schema(description = "方法库ID", example = "31274") + private Long methodConfigId; + + @Schema(description = "方法名称", example = "王五") + private String name; + + @Schema(description = "方法编号") + private String methodCode; + + @Schema(description = "描述") + private String description; + + @Schema(description = "是否启用,1-启用,0-不启用") + private Integer isEnabled; + + @Schema(description = "任务模版key") + private String templateKey; + + @Schema(description = "任务单编号规则") + private String codeRule; + + @Schema(description = "分配方式,【字典】【jy_assay_method_assign_way】随机分配,按顺序分配,自动分配") + private Integer assignWay; + + @Schema(description = "展示平台,【字典】【jy_assay_method_assign_platform】pad、pc、pad&pc") + private String assignPlatform; + + @Schema(description = "任务分配表单配置信息,是否添加质控样;是否过筛;是否预览打印;是否查询S值范围;是否需要流程审批;流程审批编码;退回样品审批流程编码:任务完成时的提交方式;指派单抬头key") + private String assayTaskInfomation; + + @Schema(description = "检测部门编号") + private String assayDepartmentCode; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectPageReqVO.java new file mode 100644 index 0000000..26f1ae9 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectPageReqVO.java @@ -0,0 +1,62 @@ +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 ConfigAssayMethodProjectPageReqVO extends PageParam { + + @Schema(description = "检测方法ID", example = "30102") + private Long configAssayMethodId; + + @Schema(description = "检测项目ID,字典表【T_DIC_PRJ】", example = "906") + private Long dictionaryProjectId; + + @Schema(description = "检测单位ID,UNT表", example = "15001") + private Long unitId; + + @Schema(description = "单位") + private String dictionaryProjectUnit; + + @Schema(description = "是否允许为空") + private Integer isNull; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", example = "2") + private String dataType; + + @Schema(description = "小数位") + private Integer decimalPosition; + + @Schema(description = "计算公式") + private String formula; + + @Schema(description = "判定精度") + private Integer assessmentAccuracy; + + @Schema(description = "是否默认启用,1-启用,0-不启用") + private Integer isDefaultEnabled; + + @Schema(description = "排序") + private Integer sort; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterPageReqVO.java new file mode 100644 index 0000000..3cdd811 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterPageReqVO.java @@ -0,0 +1,56 @@ +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 ConfigAssayMethodProjectParameterPageReqVO extends PageParam { + + @Schema(description = "检测方法分析项目ID", example = "4278") + private Long configAssayMethodProjectId; + + @Schema(description = "参数ID,字典表【T_DIC_PRM】", example = "8889") + private Long dictionaryParameterId; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", example = "2") + private String dataType; + + @Schema(description = "小数位") + private Integer decimalPosition; + + @Schema(description = "默认值") + private String defaultValue; + + @Schema(description = "是否允许为空") + private Integer isNull; + + @Schema(description = "计算公式") + private String formula; + + @Schema(description = "pc界面是否显示") + private Integer isShow; + + @Schema(description = "排序") + private Integer sort; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterRespVO.java new file mode 100644 index 0000000..e36b72e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterRespVO.java @@ -0,0 +1,71 @@ +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 ConfigAssayMethodProjectParameterRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18320") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "检测方法分析项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4278") + @ExcelProperty("检测方法分析项目ID") + private Long configAssayMethodProjectId; + + @Schema(description = "参数ID,字典表【T_DIC_PRM】", requiredMode = Schema.RequiredMode.REQUIRED, example = "8889") + @ExcelProperty("参数ID,字典表【T_DIC_PRM】") + private Long dictionaryParameterId; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间") + private String dataType; + + @Schema(description = "小数位") + @ExcelProperty("小数位") + private Integer decimalPosition; + + @Schema(description = "默认值") + @ExcelProperty("默认值") + private String defaultValue; + + @Schema(description = "是否允许为空", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否允许为空") + private Integer isNull; + + @Schema(description = "计算公式") + @ExcelProperty("计算公式") + private String formula; + + @Schema(description = "pc界面是否显示", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("pc界面是否显示") + private Integer isShow; + + @Schema(description = "排序") + @ExcelProperty("排序") + private Integer sort; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterSaveReqVO.java new file mode 100644 index 0000000..bfa4038 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectParameterSaveReqVO.java @@ -0,0 +1,58 @@ +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 ConfigAssayMethodProjectParameterSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18320") + private Long id; + + @Schema(description = "检测方法分析项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4278") + @NotNull(message = "检测方法分析项目ID不能为空") + private Long configAssayMethodProjectId; + + @Schema(description = "参数ID,字典表【T_DIC_PRM】", requiredMode = Schema.RequiredMode.REQUIRED, example = "8889") + @NotNull(message = "参数ID,字典表【T_DIC_PRM】不能为空") + private Long dictionaryParameterId; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotEmpty(message = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间不能为空") + private String dataType; + + @Schema(description = "小数位") + private Integer decimalPosition; + + @Schema(description = "默认值") + private String defaultValue; + + @Schema(description = "是否允许为空", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否允许为空不能为空") + private Integer isNull; + + @Schema(description = "计算公式") + private String formula; + + @Schema(description = "pc界面是否显示", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "pc界面是否显示不能为空") + private Integer isShow; + + @Schema(description = "排序") + private Integer sort; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectRespVO.java new file mode 100644 index 0000000..3a306eb --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectRespVO.java @@ -0,0 +1,79 @@ +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 ConfigAssayMethodProjectRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "24391") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "检测方法ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30102") + @ExcelProperty("检测方法ID") + private Long configAssayMethodId; + + @Schema(description = "检测项目ID,字典表【T_DIC_PRJ】", requiredMode = Schema.RequiredMode.REQUIRED, example = "906") + @ExcelProperty("检测项目ID,字典表【T_DIC_PRJ】") + private Long dictionaryProjectId; + + @Schema(description = "检测单位ID,UNT表", example = "15001") + @ExcelProperty("检测单位ID,UNT表") + private Long unitId; + + @Schema(description = "单位") + @ExcelProperty("单位") + private String dictionaryProjectUnit; + + @Schema(description = "是否允许为空", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否允许为空") + private Integer isNull; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间") + private String dataType; + + @Schema(description = "小数位") + @ExcelProperty("小数位") + private Integer decimalPosition; + + @Schema(description = "计算公式") + @ExcelProperty("计算公式") + private String formula; + + @Schema(description = "判定精度") + @ExcelProperty("判定精度") + private Integer assessmentAccuracy; + + @Schema(description = "是否默认启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否默认启用,1-启用,0-不启用") + private Integer isDefaultEnabled; + + @Schema(description = "排序") + @ExcelProperty("排序") + private Integer sort; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectSaveReqVO.java new file mode 100644 index 0000000..c5476c9 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodProjectSaveReqVO.java @@ -0,0 +1,64 @@ +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 ConfigAssayMethodProjectSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "24391") + private Long id; + + @Schema(description = "检测方法ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30102") + @NotNull(message = "检测方法ID不能为空") + private Long configAssayMethodId; + + @Schema(description = "检测项目ID,字典表【T_DIC_PRJ】", requiredMode = Schema.RequiredMode.REQUIRED, example = "906") + @NotNull(message = "检测项目ID,字典表【T_DIC_PRJ】不能为空") + private Long dictionaryProjectId; + + @Schema(description = "检测单位ID,UNT表", example = "15001") + private Long unitId; + + @Schema(description = "单位") + private String dictionaryProjectUnit; + + @Schema(description = "是否允许为空", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否允许为空不能为空") + private Integer isNull; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotEmpty(message = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间不能为空") + private String dataType; + + @Schema(description = "小数位") + private Integer decimalPosition; + + @Schema(description = "计算公式") + private String formula; + + @Schema(description = "判定精度") + private Integer assessmentAccuracy; + + @Schema(description = "是否默认启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否默认启用,1-启用,0-不启用不能为空") + private Integer isDefaultEnabled; + + @Schema(description = "排序") + private Integer sort; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodReqVO.java new file mode 100644 index 0000000..080a0f9 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodReqVO.java @@ -0,0 +1,62 @@ +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 ConfigAssayMethodReqVO extends PageParam { + + @Schema(description = "方法库ID", example = "31274") + private Long methodConfigId; + + @Schema(description = "方法名称", example = "王五") + private String name; + + @Schema(description = "方法编号") + private String methodCode; + + @Schema(description = "描述") + private String description; + + @Schema(description = "是否启用,1-启用,0-不启用") + private Integer isEnabled; + + @Schema(description = "任务模版key") + private String templateKey; + + @Schema(description = "任务单编号规则") + private String codeRule; + + @Schema(description = "分配方式,【字典】【jy_assay_method_assign_way】随机分配,按顺序分配,自动分配") + private String assignWay; + + @Schema(description = "展示平台,【字典】【jy_assay_method_assign_platform】pad、pc、pad&pc") + private String assignPlatform; + + @Schema(description = "任务分配表单配置信息,是否添加质控样;是否过筛;是否预览打印;是否查询S值范围;是否需要流程审批;流程审批编码;退回样品审批流程编码:任务完成时的提交方式;指派单抬头key") + private String assayTaskInfomation; + + @Schema(description = "检测部门编号") + private String assayDepartmentCode; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodRespVO.java new file mode 100644 index 0000000..ed5e567 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodRespVO.java @@ -0,0 +1,79 @@ +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 ConfigAssayMethodRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31987") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "方法库ID", example = "31274") + @ExcelProperty("方法库ID") + private Long methodConfigId; + + @Schema(description = "方法名称", example = "王五") + @ExcelProperty("方法名称") + private String name; + + @Schema(description = "方法编号") + @ExcelProperty("方法编号") + private String methodCode; + + @Schema(description = "描述") + @ExcelProperty("描述") + private String description; + + @Schema(description = "是否启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否启用,1-启用,0-不启用") + private Integer isEnabled; + + @Schema(description = "任务模版key") + @ExcelProperty("任务模版key") + private String templateKey; + + @Schema(description = "任务单编号规则", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("任务单编号规则") + private String codeRule; + + @Schema(description = "分配方式,【字典】【jy_assay_method_assign_way】随机分配,按顺序分配,自动分配", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("分配方式,【字典】【jy_assay_method_assign_way】随机分配,按顺序分配,自动分配") + private String assignWay; + + @Schema(description = "展示平台,【字典】【jy_assay_method_assign_platform】pad、pc、pad&pc", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("展示平台,【字典】【jy_assay_method_assign_platform】pad、pc、pad&pc") + private String assignPlatform; + + @Schema(description = "任务分配表单配置信息,是否添加质控样;是否过筛;是否预览打印;是否查询S值范围;是否需要流程审批;流程审批编码;退回样品审批流程编码:任务完成时的提交方式;指派单抬头key") + @ExcelProperty("任务分配表单配置信息,是否添加质控样;是否过筛;是否预览打印;是否查询S值范围;是否需要流程审批;流程审批编码;退回样品审批流程编码:任务完成时的提交方式;指派单抬头key") + private String assayTaskInfomation; + + @Schema(description = "检测部门编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("检测部门编号") + private String assayDepartmentCode; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodSaveReqVO.java new file mode 100644 index 0000000..0db2cfe --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigAssayMethodSaveReqVO.java @@ -0,0 +1,64 @@ +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 ConfigAssayMethodSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31987") + private Long id; + + @Schema(description = "方法库ID", example = "31274") + private Long methodConfigId; + + @Schema(description = "方法名称", example = "王五") + private String name; + + @Schema(description = "方法编号") + private String methodCode; + + @Schema(description = "描述") + private String description; + + @Schema(description = "是否启用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否启用,1-启用,0-不启用不能为空") + private Integer isEnabled; + + @Schema(description = "任务模版key") + private String templateKey; + + @Schema(description = "任务单编号规则", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "任务单编号规则不能为空") + private String codeRule; + + @Schema(description = "分配方式,【字典】【jy_assay_method_assign_way】随机分配,按顺序分配,自动分配", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "分配方式,【字典】【jy_assay_method_assign_way】随机分配,按顺序分配,自动分配不能为空") + private String assignWay; + + @Schema(description = "展示平台,【字典】【jy_assay_method_assign_platform】pad、pc、pad&pc", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "展示平台,【字典】【jy_assay_method_assign_platform】pad、pc、pad&pc不能为空") + private String assignPlatform; + + @Schema(description = "任务分配表单配置信息,是否添加质控样;是否过筛;是否预览打印;是否查询S值范围;是否需要流程审批;流程审批编码;退回样品审批流程编码:任务完成时的提交方式;指派单抬头key") + private String assayTaskInfomation; + + @Schema(description = "检测部门编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "检测部门编号不能为空") + private String assayDepartmentCode; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSamplePageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSamplePageReqVO.java new file mode 100644 index 0000000..16b96ca --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSamplePageReqVO.java @@ -0,0 +1,50 @@ +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 ConfigBaseSamplePageReqVO extends PageParam { + + @Schema(description = "样品ID", example = "18277") + private Long baseSampleId; + + @Schema(description = "父级ID", example = "17109") + private Long parentId; + + @Schema(description = "编码规则") + private String codeRule; + + @Schema(description = "样品流程Key") + private String flowKey; + + @Schema(description = "样品标签打印模版") + private String printTemplate; + + @Schema(description = "样品标签打印份数") + private Integer codePrintQuantity; + + @Schema(description = "样品名称", example = "张三") + private String sampleName; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSampleRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSampleRespVO.java new file mode 100644 index 0000000..e1ebb53 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSampleRespVO.java @@ -0,0 +1,63 @@ +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 ConfigBaseSampleRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12819") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "样品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18277") + @ExcelProperty("样品ID") + private Long baseSampleId; + + @Schema(description = "父级ID", example = "17109") + @ExcelProperty("父级ID") + private Long parentId; + + @Schema(description = "编码规则", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("编码规则") + private String codeRule; + + @Schema(description = "样品流程Key", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品流程Key") + private String flowKey; + + @Schema(description = "样品标签打印模版", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品标签打印模版") + private String printTemplate; + + @Schema(description = "样品标签打印份数", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品标签打印份数") + private Integer codePrintQuantity; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @ExcelProperty("样品名称") + private String sampleName; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSampleSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSampleSaveReqVO.java new file mode 100644 index 0000000..59aee0e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigBaseSampleSaveReqVO.java @@ -0,0 +1,53 @@ +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 ConfigBaseSampleSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12819") + private Long id; + + @Schema(description = "样品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18277") + @NotNull(message = "样品ID不能为空") + private Long baseSampleId; + + @Schema(description = "父级ID", example = "17109") + private Long parentId; + + @Schema(description = "编码规则", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "编码规则不能为空") + private String codeRule; + + @Schema(description = "样品流程Key", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品流程Key不能为空") + private String flowKey; + + @Schema(description = "样品标签打印模版", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "样品标签打印模版不能为空") + private String printTemplate; + + @Schema(description = "样品标签打印份数", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "样品标签打印份数不能为空") + private Integer codePrintQuantity; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "样品名称不能为空") + private String sampleName; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypePageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypePageReqVO.java new file mode 100644 index 0000000..071ea9f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypePageReqVO.java @@ -0,0 +1,50 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypeRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypeRespVO.java new file mode 100644 index 0000000..4c36dc4 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypeRespVO.java @@ -0,0 +1,63 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypeSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypeSaveReqVO.java new file mode 100644 index 0000000..439cbf5 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigDocumentTypeSaveReqVO.java @@ -0,0 +1,54 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourcePageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourcePageReqVO.java new file mode 100644 index 0000000..0ea2801 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourcePageReqVO.java @@ -0,0 +1,41 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceReqVO.java new file mode 100644 index 0000000..db1b56e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceReqVO.java @@ -0,0 +1,40 @@ +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; +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceRespVO.java new file mode 100644 index 0000000..288c627 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceRespVO.java @@ -0,0 +1,51 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceSaveReqVO.java new file mode 100644 index 0000000..6279bec --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigEntrustSourceSaveReqVO.java @@ -0,0 +1,40 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectPageReqVO.java new file mode 100644 index 0000000..091a23e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectPageReqVO.java @@ -0,0 +1,35 @@ +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 ConfigProjectPageReqVO extends PageParam { + + @Schema(description = "检测项目ID", example = "6630") + private Long dictionaryProjectId; + + @Schema(description = "检测方法配置ID", example = "5185") + private Long configAssayMethodId; + + @Schema(description = "上报列字段") + private String saveColumn; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectRespVO.java new file mode 100644 index 0000000..547e97a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectRespVO.java @@ -0,0 +1,43 @@ +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 ConfigProjectRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27310") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "检测项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6630") + @ExcelProperty("检测项目ID") + private Long dictionaryProjectId; + + @Schema(description = "检测方法配置ID", example = "5185") + @ExcelProperty("检测方法配置ID") + private Long configAssayMethodId; + + @Schema(description = "上报列字段", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("上报列字段") + private String saveColumn; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectSaveReqVO.java new file mode 100644 index 0000000..889f530 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigProjectSaveReqVO.java @@ -0,0 +1,33 @@ +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 ConfigProjectSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27310") + private Long id; + + @Schema(description = "检测项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6630") + @NotNull(message = "检测项目ID不能为空") + private Long dictionaryProjectId; + + @Schema(description = "检测方法配置ID", example = "5185") + private Long configAssayMethodId; + + @Schema(description = "上报列字段", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "上报列字段不能为空") + private String saveColumn; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldPageReqVO.java new file mode 100644 index 0000000..065f5d7 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldPageReqVO.java @@ -0,0 +1,63 @@ +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 ConfigReportFieldPageReqVO extends PageParam { + + @Schema(description = "报表类型ID", example = "28419") + private Long configReportTypeId; + + @Schema(description = "绑定字段") + private String field; + + @Schema(description = "标题名称", example = "张三") + private String fieldName; + + @Schema(description = "排序号") + private Integer no; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", example = "2") + private Integer dataType; + + @Schema(description = "小数位") + private Integer decimal; + + @Schema(description = "列宽") + private Integer fieldWidth; + + @Schema(description = "是否分组") + private Integer isGroup; + + @Schema(description = "是否可修改") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private Integer[] isUpdate; + + @Schema(description = "计算公式") + private String formula; + + @Schema(description = "表头分组") + private String titleGroup; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注,1-是,0-否") + private String remark; + + @Schema(description = "版本") + private Integer version; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldRespVO.java new file mode 100644 index 0000000..c28439f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldRespVO.java @@ -0,0 +1,79 @@ +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 ConfigReportFieldRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6012") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "报表类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28419") + @ExcelProperty("报表类型ID") + private Long configReportTypeId; + + @Schema(description = "绑定字段", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("绑定字段") + private String field; + + @Schema(description = "标题名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @ExcelProperty("标题名称") + private String fieldName; + + @Schema(description = "排序号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("排序号") + private Integer no; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间") + private Integer dataType; + + @Schema(description = "小数位") + @ExcelProperty("小数位") + private Integer decimal; + + @Schema(description = "列宽", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("列宽") + private Integer fieldWidth; + + @Schema(description = "是否分组", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否分组") + private Integer isGroup; + + @Schema(description = "是否可修改", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否可修改") + private Integer isUpdate; + + @Schema(description = "计算公式", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("计算公式") + private String formula; + + @Schema(description = "表头分组", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("表头分组") + private String titleGroup; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注,1-是,0-否") + @ExcelProperty("备注,1-是,0-否") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("版本") + private Integer version; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldSaveReqVO.java new file mode 100644 index 0000000..2edb2f1 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportFieldSaveReqVO.java @@ -0,0 +1,69 @@ +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 ConfigReportFieldSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6012") + private Long id; + + @Schema(description = "报表类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28419") + @NotNull(message = "报表类型ID不能为空") + private Long configReportTypeId; + + @Schema(description = "绑定字段", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "绑定字段不能为空") + private String field; + + @Schema(description = "标题名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "标题名称不能为空") + private String fieldName; + + @Schema(description = "排序号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "排序号不能为空") + private Integer no; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotNull(message = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间不能为空") + private Integer dataType; + + @Schema(description = "小数位") + private Integer decimal; + + @Schema(description = "列宽", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "列宽不能为空") + private Integer fieldWidth; + + @Schema(description = "是否分组", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否分组不能为空") + private Integer isGroup; + + @Schema(description = "是否可修改", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否可修改不能为空") + private Integer isUpdate; + + @Schema(description = "计算公式", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "计算公式不能为空") + private String formula; + + @Schema(description = "表头分组", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "表头分组不能为空") + private String titleGroup; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注,1-是,0-否") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "版本不能为空") + private Integer version; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplatePageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplatePageReqVO.java new file mode 100644 index 0000000..3e392d5 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplatePageReqVO.java @@ -0,0 +1,49 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; + +import com.alibaba.excel.annotation.ExcelProperty; + +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 ConfigReportTemplatePageReqVO extends PageParam { + + @Schema(description = "模版名称", example = "赵六") + private String name; + + @Schema(description = "模版Key") + private String key; + + @Schema(description = "内容") + private String content; + + @Schema(description = "数据接口地址", example = "https://www.iocoder.cn") + private String dataUrl; + + @Schema(description = "数据") + private String data; + + @Schema(description = "模板是否已授权") + private Integer isAuthority; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "乐观锁", example = "15082") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplateRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplateRespVO.java new file mode 100644 index 0000000..526d449 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplateRespVO.java @@ -0,0 +1,58 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 报表模版配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigReportTemplateRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2363") + @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 = "内容", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("内容") + private String content; + + @Schema(description = "数据接口地址", example = "https://www.iocoder.cn") + @ExcelProperty("数据接口地址") + private String dataUrl; + + @Schema(description = "数据") + @ExcelProperty("数据") + private String data; + + @Schema(description = "模板是否已授权") + @ExcelProperty("模板是否已授权") + private Integer isAuthority; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "15082") + @ExcelProperty("乐观锁") + private Integer updateCount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplateSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplateSaveReqVO.java new file mode 100644 index 0000000..86f87c6 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTemplateSaveReqVO.java @@ -0,0 +1,48 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import com.alibaba.excel.annotation.ExcelProperty; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 报表模版配置新增/修改 Request VO") +@Data +public class ConfigReportTemplateSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2363") + 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 = "内容", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "内容不能为空") + private String content; + + @Schema(description = "数据接口地址", example = "https://www.iocoder.cn") + private String dataUrl; + + @Schema(description = "数据") + private String data; + + @Schema(description = "模板是否已授权") + private Integer isAuthority; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + //@NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "乐观锁", requiredMode = Schema.RequiredMode.REQUIRED, example = "15082") + private Integer updateCount; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypePageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypePageReqVO.java new file mode 100644 index 0000000..7bc8b74 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypePageReqVO.java @@ -0,0 +1,38 @@ +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 ConfigReportTypePageReqVO extends PageParam { + + @Schema(description = "报表名称", example = "李四") + private String name; + + @Schema(description = "键值") + private String key; + + @Schema(description = "报表模版") + private String template; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypeRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypeRespVO.java new file mode 100644 index 0000000..de13721 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypeRespVO.java @@ -0,0 +1,47 @@ +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 ConfigReportTypeRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9946") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "报表名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("报表名称") + private String name; + + @Schema(description = "键值") + @ExcelProperty("键值") + private String key; + + @Schema(description = "报表模版", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("报表模版") + private String template; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypeSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypeSaveReqVO.java new file mode 100644 index 0000000..6dc256e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigReportTypeSaveReqVO.java @@ -0,0 +1,37 @@ +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 ConfigReportTypeSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9946") + private Long id; + + @Schema(description = "报表名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "报表名称不能为空") + private String name; + + @Schema(description = "键值") + private String key; + + @Schema(description = "报表模版", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "报表模版不能为空") + private String template; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowPageReqVO.java new file mode 100644 index 0000000..d162ccc --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowPageReqVO.java @@ -0,0 +1,41 @@ +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 ConfigSampleFlowPageReqVO extends PageParam { + + @Schema(description = "流程名称", example = "芋艿") + private String name; + + @Schema(description = "流程Key") + private String key; + + @Schema(description = "流程配置内容JSON") + private String content; + + @Schema(description = "流程描述") + private String description; + + @Schema(description = "类型,主样、子样", 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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowRespVO.java new file mode 100644 index 0000000..9c912c8 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowRespVO.java @@ -0,0 +1,51 @@ +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 ConfigSampleFlowRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10654") + @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 = "流程配置内容JSON") + @ExcelProperty("流程配置内容JSON") + private String content; + + @Schema(description = "流程描述") + @ExcelProperty("流程描述") + private String description; + + @Schema(description = "类型,主样、子样", example = "1") + @ExcelProperty("类型,主样、子样") + 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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowSaveReqVO.java new file mode 100644 index 0000000..23ad302 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleFlowSaveReqVO.java @@ -0,0 +1,38 @@ +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 ConfigSampleFlowSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10654") + 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 = "流程配置内容JSON") + private String content; + + @Schema(description = "流程描述") + private String description; + + @Schema(description = "类型,主样、子样", example = "1") + private String type; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleHandoverPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleHandoverPageReqVO.java new file mode 100644 index 0000000..f3b4986 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleHandoverPageReqVO.java @@ -0,0 +1,41 @@ +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 ConfigSampleHandoverPageReqVO extends PageParam { + + @Schema(description = "交接单名称", example = "张三") + private String name; + + @Schema(description = "流程节点KY") + private String dictionarySampleFlowNodeKey; + + @Schema(description = "交接模版key") + private String templateKey; + + @Schema(description = "交接单编号规则") + private String codeRule; + + @Schema(description = "是否预览打印") + private Integer isPrint; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleHandoverRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleHandoverRespVO.java new file mode 100644 index 0000000..ae524f2 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleHandoverRespVO.java @@ -0,0 +1,51 @@ +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 ConfigSampleHandoverRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12423") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "交接单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @ExcelProperty("交接单名称") + private String name; + + @Schema(description = "流程节点KY", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("流程节点KY") + private String dictionarySampleFlowNodeKey; + + @Schema(description = "交接模版key", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("交接模版key") + private String templateKey; + + @Schema(description = "交接单编号规则", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("交接单编号规则") + private String codeRule; + + @Schema(description = "是否预览打印") + @ExcelProperty("是否预览打印") + private Integer isPrint; + + @Schema(description = "所属部门") + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleHandoverSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleHandoverSaveReqVO.java new file mode 100644 index 0000000..bb4f1d7 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleHandoverSaveReqVO.java @@ -0,0 +1,40 @@ +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 ConfigSampleHandoverSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12423") + private Long id; + + @Schema(description = "交接单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "交接单名称不能为空") + private String name; + + @Schema(description = "流程节点KY", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "流程节点KY不能为空") + private String dictionarySampleFlowNodeKey; + + @Schema(description = "交接模版key", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "交接模版key不能为空") + private String templateKey; + + @Schema(description = "交接单编号规则", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "交接单编号规则不能为空") + private String codeRule; + + @Schema(description = "是否预览打印") + private Integer isPrint; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportPageReqVO.java new file mode 100644 index 0000000..18e877d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportPageReqVO.java @@ -0,0 +1,41 @@ +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 ConfigSampleReportPageReqVO extends PageParam { + + @Schema(description = "报表类型", example = "23048") + private Long configReportTypeId; + + @Schema(description = "主样配置ID", example = "10803") + private Long configBaseSampleId; + + @Schema(description = "样品名称", example = "李四") + private String sampleName; + + @Schema(description = "数据来源") + private String dataSource; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportRespVO.java new file mode 100644 index 0000000..da50f96 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportRespVO.java @@ -0,0 +1,51 @@ +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 ConfigSampleReportRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17737") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "报表类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "23048") + @ExcelProperty("报表类型") + private Long configReportTypeId; + + @Schema(description = "主样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10803") + @ExcelProperty("主样配置ID") + private Long configBaseSampleId; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("样品名称") + private String sampleName; + + @Schema(description = "数据来源") + @ExcelProperty("数据来源") + private String dataSource; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportSaveReqVO.java new file mode 100644 index 0000000..c7ee541 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSampleReportSaveReqVO.java @@ -0,0 +1,41 @@ +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 ConfigSampleReportSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17737") + private Long id; + + @Schema(description = "报表类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "23048") + @NotNull(message = "报表类型不能为空") + private Long configReportTypeId; + + @Schema(description = "主样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10803") + @NotNull(message = "主样配置ID不能为空") + private Long configBaseSampleId; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "样品名称不能为空") + private String sampleName; + + @Schema(description = "数据来源") + private String dataSource; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodePageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodePageReqVO.java new file mode 100644 index 0000000..d8b2d77 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodePageReqVO.java @@ -0,0 +1,41 @@ +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 = "管理后台 - LiteFlow脚本配置分页 Request VO") +@Data +public class ConfigSimpleFlowCodePageReqVO extends PageParam { + + @Schema(description = "脚本序号") + private String codeNo; + + @Schema(description = "脚本名称", example = "李四") + private String codeName; + + @Schema(description = "脚本数据") + private String codeData; + + @Schema(description = "脚本类型,【字典】【jy_simple_flow_code_type】普通脚本、选择脚本、条件脚本、数量循环、条件循环、退出循环节", example = "1") + private String codeType; + + @Schema(description = "脚本语言,【字典】【jy_simple_flow_code_language】Java,Groovy,QLExpress") + private String codeLanguage; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeReqVO.java new file mode 100644 index 0000000..ac8a73e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeReqVO.java @@ -0,0 +1,43 @@ +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.io.Serializable; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - LiteFlow脚本配置 Request VO") +@Data +public class ConfigSimpleFlowCodeReqVO { + + @Schema(description = "脚本序号") + private String codeNo; + + @Schema(description = "脚本名称", example = "李四") + private String codeName; + + @Schema(description = "脚本数据") + private String codeData; + + @Schema(description = "脚本类型,【字典】【jy_simple_flow_code_type】普通脚本、选择脚本、条件脚本、数量循环、条件循环、退出循环节", example = "1") + private String codeType; + + @Schema(description = "脚本语言,【字典】【jy_simple_flow_code_language】Java,Groovy,QLExpress") + private String codeLanguage; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeRespVO.java new file mode 100644 index 0000000..1999f53 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeRespVO.java @@ -0,0 +1,51 @@ +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 = "管理后台 - LiteFlow脚本配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigSimpleFlowCodeRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17472") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "脚本序号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("脚本序号") + private String codeNo; + + @Schema(description = "脚本名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("脚本名称") + private String codeName; + + @Schema(description = "脚本数据", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("脚本数据") + private String codeData; + + @Schema(description = "脚本类型,【字典】【jy_simple_flow_code_type】普通脚本、选择脚本、条件脚本、数量循环、条件循环、退出循环节", example = "1") + @ExcelProperty("脚本类型,【字典】【jy_simple_flow_code_type】普通脚本、选择脚本、条件脚本、数量循环、条件循环、退出循环节") + private String codeType; + + @Schema(description = "脚本语言,【字典】【jy_simple_flow_code_language】Java,Groovy,QLExpress") + @ExcelProperty("脚本语言,【字典】【jy_simple_flow_code_language】Java,Groovy,QLExpress") + private String codeLanguage; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeSaveReqVO.java new file mode 100644 index 0000000..db6de1a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowCodeSaveReqVO.java @@ -0,0 +1,41 @@ +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 = "管理后台 - LiteFlow脚本配置新增/修改 Request VO") +@Data +public class ConfigSimpleFlowCodeSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17472") + private Long id; + + @Schema(description = "脚本名称", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "脚本名称不能为空") + private String codeNo; + + @Schema(description = "脚本描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "脚本描述不能为空") + private String codeName; + + @Schema(description = "脚本类型,【字典】【jy_simple_flow_code_type】普通脚本、选择脚本、条件脚本、数量循环、条件循环、退出循环节", example = "1") + @NotEmpty(message = "脚本类型不能为空") + private String codeType; + + @Schema(description = "脚本语言,【字典】【jy_simple_flow_code_language】Java,Groovy,QLExpress") + @NotEmpty(message = "脚本语言不能为空") + private String codeLanguage; + + @Schema(description = "脚本数据", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "脚本数据不能为空") + private String codeData; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRulePageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRulePageReqVO.java new file mode 100644 index 0000000..b8b164d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRulePageReqVO.java @@ -0,0 +1,44 @@ +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 = "管理后台 - LiteFlow规则配置分页 Request VO") +@Data +public class ConfigSimpleFlowRulePageReqVO extends PageParam { + + @Schema(description = "名称", example = "王五") + private String name; + + @Schema(description = "描述") + private String description; + + @Schema(description = "EL表达式") + private String data; + + @Schema(description = "路由") + private String route; + + @Schema(description = "组") + private String group; + + @Schema(description = "流程图") + private String flow; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleReqVO.java new file mode 100644 index 0000000..25a4003 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleReqVO.java @@ -0,0 +1,44 @@ +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 = "管理后台 - LiteFlow规则配置 Request VO") +@Data +public class ConfigSimpleFlowRuleReqVO { + + @Schema(description = "名称", example = "王五") + private String name; + + @Schema(description = "描述") + private String description; + + @Schema(description = "EL表达式") + private String data; + + @Schema(description = "路由") + private String route; + + @Schema(description = "组") + private String group; + + @Schema(description = "流程图") + private String flow; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleRespVO.java new file mode 100644 index 0000000..12ea584 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleRespVO.java @@ -0,0 +1,55 @@ +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 = "管理后台 - LiteFlow规则配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ConfigSimpleFlowRuleRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26561") + @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 description; + + @Schema(description = "EL表达式", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("EL表达式") + private String data; + + @Schema(description = "路由") + @ExcelProperty("路由") + private String route; + + @Schema(description = "组") + @ExcelProperty("组") + private String group; + + @Schema(description = "流程图") + @ExcelProperty("流程图") + private String flow; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleSaveReqVO.java new file mode 100644 index 0000000..0d2d6be --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSimpleFlowRuleSaveReqVO.java @@ -0,0 +1,41 @@ +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 = "管理后台 - LiteFlow规则配置新增/修改 Request VO") +@Data +public class ConfigSimpleFlowRuleSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26561") + private Long id; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @NotEmpty(message = "名称不能为空") + private String name; + + @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED) + private String description; + + @Schema(description = "EL表达式", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "EL表达式不能为空") + private String data; + + @Schema(description = "路由") + private String route; + + @Schema(description = "组") + private String group; + + @Schema(description = "流程图") + private String flow; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectPageReqVO.java new file mode 100644 index 0000000..1acbad3 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectPageReqVO.java @@ -0,0 +1,50 @@ +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 ConfigStandardSampleProjectPageReqVO extends PageParam { + + @Schema(description = "标准样类型ID", example = "31807") + private Long configStandardSampleTypeId; + + @Schema(description = "检测项目ID", example = "7405") + private Long dictionaryProjectId; + + @Schema(description = "检测项目名称", example = "张三") + private String dictionaryProjectName; + + @Schema(description = "检测单位ID,UNT表", example = "25945") + private Long unitId; + + @Schema(description = "检测项目单位") + private String dictionaryProjectUnit; + + @Schema(description = "小数精度") + private Integer accuracy; + + @Schema(description = "排序号") + private String sort; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectRespVO.java new file mode 100644 index 0000000..8fec143 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectRespVO.java @@ -0,0 +1,63 @@ +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 ConfigStandardSampleProjectRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13401") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "标准样类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31807") + @ExcelProperty("标准样类型ID") + private Long configStandardSampleTypeId; + + @Schema(description = "检测项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7405") + @ExcelProperty("检测项目ID") + private Long dictionaryProjectId; + + @Schema(description = "检测项目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @ExcelProperty("检测项目名称") + private String dictionaryProjectName; + + @Schema(description = "检测单位ID,UNT表", example = "25945") + @ExcelProperty("检测单位ID,UNT表") + private Long unitId; + + @Schema(description = "检测项目单位") + @ExcelProperty("检测项目单位") + private String dictionaryProjectUnit; + + @Schema(description = "小数精度", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("小数精度") + private Integer accuracy; + + @Schema(description = "排序号") + @ExcelProperty("排序号") + private String sort; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectSaveReqVO.java new file mode 100644 index 0000000..a2a0682 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleProjectSaveReqVO.java @@ -0,0 +1,51 @@ +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 ConfigStandardSampleProjectSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13401") + private Long id; + + @Schema(description = "标准样类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31807") + @NotNull(message = "标准样类型ID不能为空") + private Long configStandardSampleTypeId; + + @Schema(description = "检测项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7405") + @NotNull(message = "检测项目ID不能为空") + private Long dictionaryProjectId; + + @Schema(description = "检测项目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "检测项目名称不能为空") + private String dictionaryProjectName; + + @Schema(description = "检测单位ID,UNT表", example = "25945") + private Long unitId; + + @Schema(description = "检测项目单位") + private String dictionaryProjectUnit; + + @Schema(description = "小数精度", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "小数精度不能为空") + private Integer accuracy; + + @Schema(description = "排序号") + private String sort; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypePageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypePageReqVO.java new file mode 100644 index 0000000..5ed3e46 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypePageReqVO.java @@ -0,0 +1,41 @@ +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 ConfigStandardSampleTypePageReqVO extends PageParam { + + @Schema(description = "主样配置ID", example = "7034") + private Long configBaseSampleId; + + @Schema(description = "标准样类型名称", example = "赵六") + private String name; + + @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 assayDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本") + private Integer version; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypeRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypeRespVO.java new file mode 100644 index 0000000..da4542a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypeRespVO.java @@ -0,0 +1,51 @@ +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 ConfigStandardSampleTypeRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22010") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "主样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7034") + @ExcelProperty("主样配置ID") + private Long configBaseSampleId; + + @Schema(description = "标准样类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @ExcelProperty("标准样类型名称") + private String name; + + @Schema(description = "编码规则", requiredMode = Schema.RequiredMode.REQUIRED) + @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 = "化验部门编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("化验部门编号") + private String assayDepartmentCode; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("版本") + private Integer version; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypeSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypeSaveReqVO.java new file mode 100644 index 0000000..b955502 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigStandardSampleTypeSaveReqVO.java @@ -0,0 +1,42 @@ +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 ConfigStandardSampleTypeSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22010") + private Long id; + + @Schema(description = "主样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7034") + @NotNull(message = "主样配置ID不能为空") + private Long configBaseSampleId; + + @Schema(description = "标准样类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @NotEmpty(message = "标准样类型名称不能为空") + private String name; + + @Schema(description = "编码规则", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "编码规则不能为空") + private String codeRule; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "化验部门编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "化验部门编号不能为空") + private String assayDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "版本不能为空") + private Integer version; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodPageReqVO.java new file mode 100644 index 0000000..d67867f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodPageReqVO.java @@ -0,0 +1,38 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodRespVO.java new file mode 100644 index 0000000..8c6501e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodRespVO.java @@ -0,0 +1,47 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodSaveReqVO.java new file mode 100644 index 0000000..b785087 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleMethodSaveReqVO.java @@ -0,0 +1,37 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSamplePageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSamplePageReqVO.java new file mode 100644 index 0000000..77a1dbf --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSamplePageReqVO.java @@ -0,0 +1,56 @@ +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 ConfigSubSamplePageReqVO extends PageParam { + + @Schema(description = "分样配置ID", example = "19927") + private Long configSubSampleParentId; + + @Schema(description = "样品类型ID", example = "3267") + private Long dictionaryBusinessId; + + @Schema(description = "子样流程Key,样品流转流程key") + private String flowKey; + + @Schema(description = "简码规则") + private String simpleCodeRule; + + @Schema(description = "编码规则") + private String codeRule; + + @Schema(description = "是否打印") + private Integer isPrint; + + @Schema(description = "复检节点") + private String recheckFlowCode; + + @Schema(description = "样品名称", example = "张三") + private String sampleName; + + @Schema(description = "样品保存天数") + private Integer sampleSaveDay; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentPageReqVO.java new file mode 100644 index 0000000..2f44ddc --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentPageReqVO.java @@ -0,0 +1,44 @@ +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 ConfigSubSampleParentPageReqVO extends PageParam { + + @Schema(description = "主样配置ID", example = "24881") + private Long configBaseSampleId; + + @Schema(description = "样品类型ID", example = "5105") + private Long dictionaryBusinessId; + + @Schema(description = "样品名称", example = "张三") + private String sampleName; + + @Schema(description = "是否默认启用") + private Integer isDefaultEnabled; + + @Schema(description = "审核方式,多个流程用|分隔") + private Integer auditWay; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentRespVO.java new file mode 100644 index 0000000..1387722 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentRespVO.java @@ -0,0 +1,55 @@ +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 ConfigSubSampleParentRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7218") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "主样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "24881") + @ExcelProperty("主样配置ID") + private Long configBaseSampleId; + + @Schema(description = "样品类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5105") + @ExcelProperty("样品类型ID") + private Long dictionaryBusinessId; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @ExcelProperty("样品名称") + private String sampleName; + + @Schema(description = "是否默认启用", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否默认启用") + private Integer isDefaultEnabled; + + @Schema(description = "审核方式,多个流程用|分隔") + @ExcelProperty("审核方式,多个流程用|分隔") + private Integer auditWay; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentSaveReqVO.java new file mode 100644 index 0000000..6ea5ff1 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleParentSaveReqVO.java @@ -0,0 +1,45 @@ +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 ConfigSubSampleParentSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7218") + private Long id; + + @Schema(description = "主样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "24881") + @NotNull(message = "主样配置ID不能为空") + private Long configBaseSampleId; + + @Schema(description = "样品类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5105") + @NotNull(message = "样品类型ID不能为空") + private Long dictionaryBusinessId; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "样品名称不能为空") + private String sampleName; + + @Schema(description = "是否默认启用", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否默认启用不能为空") + private Integer isDefaultEnabled; + + @Schema(description = "审核方式,多个流程用|分隔") + private Integer auditWay; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleRespVO.java new file mode 100644 index 0000000..44b6133 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleRespVO.java @@ -0,0 +1,71 @@ +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 ConfigSubSampleRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18604") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "分样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19927") + @ExcelProperty("分样配置ID") + private Long configSubSampleParentId; + + @Schema(description = "样品类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3267") + @ExcelProperty("样品类型ID") + private Long dictionaryBusinessId; + + @Schema(description = "子样流程Key,样品流转流程key", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("子样流程Key,样品流转流程key") + private String flowKey; + + @Schema(description = "简码规则", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("简码规则") + private String simpleCodeRule; + + @Schema(description = "编码规则", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("编码规则") + private String codeRule; + + @Schema(description = "是否打印") + @ExcelProperty("是否打印") + private Integer isPrint; + + @Schema(description = "复检节点") + @ExcelProperty("复检节点") + private String recheckFlowCode; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @ExcelProperty("样品名称") + private String sampleName; + + @Schema(description = "样品保存天数", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("样品保存天数") + private Integer sampleSaveDay; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleSaveReqVO.java new file mode 100644 index 0000000..146d8bb --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigSubSampleSaveReqVO.java @@ -0,0 +1,60 @@ +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 ConfigSubSampleSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18604") + private Long id; + + @Schema(description = "分样配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19927") + @NotNull(message = "分样配置ID不能为空") + private Long configSubSampleParentId; + + @Schema(description = "样品类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3267") + @NotNull(message = "样品类型ID不能为空") + private Long dictionaryBusinessId; + + @Schema(description = "子样流程Key,样品流转流程key", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "子样流程Key,样品流转流程key不能为空") + private String flowKey; + + @Schema(description = "简码规则", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "简码规则不能为空") + private String simpleCodeRule; + + @Schema(description = "编码规则", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "编码规则不能为空") + private String codeRule; + + @Schema(description = "是否打印") + private Integer isPrint; + + @Schema(description = "复检节点") + private String recheckFlowCode; + + @Schema(description = "样品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "样品名称不能为空") + private String sampleName; + + @Schema(description = "样品保存天数", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "样品保存天数不能为空") + private Integer sampleSaveDay; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationPageReqVO.java new file mode 100644 index 0000000..0367dd9 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationPageReqVO.java @@ -0,0 +1,38 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationRespVO.java new file mode 100644 index 0000000..62063b6 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationRespVO.java @@ -0,0 +1,47 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationSaveReqVO.java new file mode 100644 index 0000000..a76655d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/ConfigWarehouseLocationInfomationSaveReqVO.java @@ -0,0 +1,37 @@ +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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/GenReportBody.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/GenReportBody.java new file mode 100644 index 0000000..d4754d2 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/GenReportBody.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Map; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +public class GenReportBody implements Serializable { + + private static final long serialVersionUID = 3042726851214984721L; + + @Schema(description = "报表id") + private Long reportId; + + @Schema(description = "报表key") + private String reportKey; + + @Schema(description = "报表数据url") + private String dataUrl; + + @Schema(description = "接口是否加密") + private Boolean isCrypto; + + @Schema(description = "报表类型:XLS|TXT|HTM|RTF|PDF|CSV|IMG") + private String type; + + @Schema(description = "只有当报表类型为IMG时可用,图片类型:PNG|BMP|JPEG|TIFF") + private String imgType; + + @Schema(description = "生成图片的DPI。对应打印机的DPI(Dots Per Inch,每英寸点数)是指打印机在每英寸内能够打印的墨点数量‌。DPI值越高,打印出的图像细节越丰富、色彩过渡越自然,打印精度也越高。常用‌203/300/400/600 DPI‌‌,具体根据打印机设置,默认为203。") + private Integer imgDpi = 203; + + @Schema(description = "报表参数") + private Map reportParams; + + @Schema(description = "报表数据JSON格式") + private String reportDataJson; + + public Map getReportParams() { + if (reportParams == null) { + reportParams = new HashMap<>(); + } + return reportParams; + } + + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailPageReqVO.java new file mode 100644 index 0000000..840f8b0 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailPageReqVO.java @@ -0,0 +1,66 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import com.baomidou.mybatisplus.annotation.TableField; +import lombok.*; +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 java.util.List; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 物料检测标准检测项目分页 Request VO") +@Data +public class MaterialAssayStandardDetailPageReqVO extends PageParam { + + @Schema(description = "物料检测标准ID", example = "30312") + private Long materialAssayStandardId; + + @Schema(description = "检测项目ID", example = "22587") + private Long dictionaryProjectId; + + @Schema(description = "检测项目编码") + private String dictionaryProjectCode; + + @Schema(description = "检测结果单位ID", example = "29303") + private Long unitId; + + @Schema(description = "检测结果单位") + private String unit; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", example = "1") + private String dataType; + + @Schema(description = "小数位") + private Integer decimalPosition; + + @Schema(description = "检测分类,【字典】【jy_assay_standard_category】化学;仪器;外检") + private String assayCategory; + + @Schema(description = "是否默认选择,委托时是否默认选择;1-是,0-否") + private Integer isDefaultPick; + + @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 = "检测标准id列表") + private List standardIdList; + + @Schema(description = "检测项名称") + private String dictionaryProjectName; + + @Schema(description = "数据类型") + private String dataTypeName; + + @Schema(description = "检测分类名称") + private String assayCategoryName; +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailRespVO.java new file mode 100644 index 0000000..06d4182 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailRespVO.java @@ -0,0 +1,78 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 物料检测标准检测项目 Response VO") +@Data +@ExcelIgnoreUnannotated +public class MaterialAssayStandardDetailRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2831") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "物料检测标准ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30312") + @ExcelProperty("物料检测标准ID") + private Long materialAssayStandardId; + + @Schema(description = "检测项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22587") + @ExcelProperty("检测项目ID") + private Long dictionaryProjectId; + + @Schema(description = "检测项目编码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("检测项目编码") + private String dictionaryProjectCode; + + @Schema(description = "检测结果单位ID", example = "29303") + @ExcelProperty("检测结果单位ID") + private Long unitId; + + @Schema(description = "检测结果单位") + @ExcelProperty("检测结果单位") + private String unit; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间") + private String dataType; + + @Schema(description = "小数位") + @ExcelProperty("小数位") + private Integer decimalPosition; + + @Schema(description = "检测分类,【字典】【jy_assay_standard_category】化学;仪器;外检", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("检测分类,【字典】【jy_assay_standard_category】化学;仪器;外检") + private String assayCategory; + + @Schema(description = "是否默认选择,委托时是否默认选择;1-是,0-否", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否默认选择,委托时是否默认选择;1-是,0-否") + private Integer isDefaultPick; + + @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 = "检测项名称") + private String dictionaryProjectName; + + @Schema(description = "检测项简称") + private String dictionaryProjectSimpleName; + + @Schema(description = "数据类型") + private String dataTypeName; + + @Schema(description = "检测分类名称") + private String assayCategoryName; +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailSaveReqVO.java new file mode 100644 index 0000000..561ed20 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardDetailSaveReqVO.java @@ -0,0 +1,65 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import jakarta.validation.constraints.*; + +import java.util.List; + +@Schema(description = "管理后台 - 物料检测标准检测项目新增/修改 Request VO") +@Data +public class MaterialAssayStandardDetailSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2831") + private Long id; + + @Schema(description = "物料检测标准ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30312") + @NotNull(message = "物料检测标准ID不能为空") + private Long materialAssayStandardId; + + @Schema(description = "检测项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22587") + @NotNull(message = "检测项目ID不能为空") + private Long dictionaryProjectId; + + @Schema(description = "检测项目编码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "检测项目编码不能为空") + private String dictionaryProjectCode; + + @Schema(description = "检测结果单位ID", example = "29303") + private Long unitId; + + @Schema(description = "检测结果单位") + private String unit; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间不能为空") + private String dataType; + + @Schema(description = "小数位") + private Integer decimalPosition; + + @Schema(description = "检测分类,【字典】【jy_assay_standard_category】化学;仪器;外检", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "检测分类,【字典】【jy_assay_standard_category】化学;仪器;外检不能为空") + private String assayCategory; + + @Schema(description = "是否默认选择,委托时是否默认选择;1-是,0-否", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否默认选择,委托时是否默认选择;1-是,0-否不能为空") + private Integer isDefaultPick; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + //==================================扩展字段==================================== + + @Schema(description = "检测项名称") + private Long dictionaryProjectName; + + @Schema(description = "数据类型") + private String dataTypeName; + + @Schema(description = "检测分类名称") + private String assayCategoryName; +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodPageReqVO.java new file mode 100644 index 0000000..93ad818 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodPageReqVO.java @@ -0,0 +1,37 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import lombok.*; +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 MaterialAssayStandardMethodPageReqVO extends PageParam { + + @Schema(description = "物料检测标准明细项ID", example = "27123") + private Long materialAssayStandardDetailId; + + @Schema(description = "检测方法配置ID", example = "32735") + private Long configAssayMethodId; + + @Schema(description = "是否默认,1-是,0-否") + private Integer isDefault; + + @Schema(description = "是否双杯分析,1-是,0-否") + private Integer isDualCup; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodRespVO.java new file mode 100644 index 0000000..5702f4c --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodRespVO.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 物料检测标准与方法 Response VO") +@Data +@ExcelIgnoreUnannotated +public class MaterialAssayStandardMethodRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21965") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "物料检测标准明细项ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27123") + @ExcelProperty("物料检测标准明细项ID") + private Long materialAssayStandardDetailId; + + @Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32735") + @ExcelProperty("检测方法配置ID") + private Long configAssayMethodId; + + @Schema(description = "是否默认,1-是,0-否", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否默认,1-是,0-否") + private Integer isDefault; + + @Schema(description = "是否双杯分析,1-是,0-否") + @ExcelProperty("是否双杯分析,1-是,0-否") + private Integer isDualCup; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodSaveReqVO.java new file mode 100644 index 0000000..f0a75f4 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardMethodSaveReqVO.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 物料检测标准与方法新增/修改 Request VO") +@Data +public class MaterialAssayStandardMethodSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21965") + private Long id; + + @Schema(description = "物料检测标准明细项ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27123") + @NotNull(message = "物料检测标准明细项ID不能为空") + private Long materialAssayStandardDetailId; + + @Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32735") + @NotNull(message = "检测方法配置ID不能为空") + private Long configAssayMethodId; + + @Schema(description = "是否默认,1-是,0-否", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否默认,1-是,0-否不能为空") + private Integer isDefault; + + @Schema(description = "是否双杯分析,1-是,0-否") + private Integer isDualCup; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardPageReqVO.java new file mode 100644 index 0000000..2315759 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardPageReqVO.java @@ -0,0 +1,52 @@ +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 MaterialAssayStandardPageReqVO extends PageParam { + + @Schema(description = "样品大类ID", example = "1394") + private Long baseSampleId; + + @Schema(description = "物料ID", example = "32069") + private Long materialId; + + @Schema(description = "样品类型ID,字典表:【T_DIC_BSN】", example = "19879") + private Long dictionaryBusinessId; + + @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 String sampleName; + + @Schema(description = "物料代码") + private String materialCode; + + @Schema(description = "物料名称") + private String materialName; + + @Schema(description = "样品类型_NAME") + private String dictionaryBusinessName; + + @Schema(description = "检测项目数量") + private Long detailCount; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardRespVO.java new file mode 100644 index 0000000..7c16031 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardRespVO.java @@ -0,0 +1,68 @@ +package cn.iocoder.yudao.module.qms.business.config.controller.vo; + +import cn.iocoder.yudao.module.qms.core.aspect.annotation.Dict; +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.*; + +import static cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant.DICT_ANNOTATION_KEY_TYPE_ID; + +@Schema(description = "管理后台 - 物料检测标准 Response VO") +@Data +@ExcelIgnoreUnannotated +public class MaterialAssayStandardRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23188") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "样品大类ID", example = "1394") + @ExcelProperty("样品大类ID") + private Long baseSampleId; + + @Schema(description = "物料ID", example = "32069") + @ExcelProperty("物料ID") + private Long materialId; + + @Schema(description = "样品类型ID,字典表:【T_DIC_BSN】", example = "19879") + @ExcelProperty("样品类型ID,字典表:【T_DIC_BSN】") + @Dict(dicCode = "sampleType", keyOrID = DICT_ANNOTATION_KEY_TYPE_ID) + private Long dictionaryBusinessId; + + @Schema(description = "所属部门") + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "检测项目明细") + private List detailList; + + //=================样品大类属性==================== + @Schema(description = "大类名称") + @ExcelProperty("大类名称") + private String sampleName; + + @Schema(description = "物料代码") + @ExcelProperty("物料代码") + private String materialCode; + + @Schema(description = "物料名称") + @ExcelProperty("物料名称") + private String materialName; + + + @Schema(description = "检测项目数量") + @ExcelProperty("检测项目数量") + private Long detailCount; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardSaveReqVO.java new file mode 100644 index 0000000..2f10167 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/controller/vo/MaterialAssayStandardSaveReqVO.java @@ -0,0 +1,43 @@ +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 MaterialAssayStandardSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23188") + private Long id; + + @Schema(description = "样品大类ID", example = "1394") + private Long baseSampleId; + + @Schema(description = "物料ID", example = "32069") + private Long materialId; + + @Schema(description = "样品类型ID,字典表:【T_DIC_BSN】", example = "19879") + private Long dictionaryBusinessId; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + //=================样品大类属性==================== + @Schema(description = "大类名称") + private String sampleName; + + @Schema(description = "物料代码") + private String materialCode; + + @Schema(description = "物料名称") + private String materialName; + + @Schema(description = "检测项目数量") + private Long detailCount; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/BaseSampleDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/BaseSampleDO.java new file mode 100644 index 0000000..06c759c --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/BaseSampleDO.java @@ -0,0 +1,74 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 样品大类管理 DO +* +* @author 后台管理 +*/ +@TableName("t_bse_smp") +@KeySequence("t_bse_smp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BaseSampleDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 大类名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 物料ID + */ + @TableField("MTRL_ID") + private Long materialId; + /** + * 物料代码 + */ + @TableField("MTRL_CD") + private String materialCode; + /** + * 物料名称 + */ + @TableField("MTRL_NAME") + private String materialName; + /** + * 样品类型_ID,字典表【T_DIC_BSN】结算样、委检样、抽查样 + */ + @TableField("DIC_BSN_ID") + private Long dictionaryBusinessId; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + + + //===================扩展字段=================== + //检测标准数量 + @TableField(exist = false) + private String assayStandardCount; + + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodDO.java new file mode 100644 index 0000000..2f3b4d3 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodDO.java @@ -0,0 +1,105 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 检测方法配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_asy_mthd") +@KeySequence("t_cfg_asy_mthd_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigAssayMethodDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 方法库ID + */ + @TableField("MTHD_CFG_ID") + private Long methodConfigId; + /** + * 方法名称 + */ + @TableField("NAME") + private String name; + /** + * 方法编号 + */ + @TableField("MTHD_CD") + private String methodCode; + /** + * 描述 + */ + @TableField("DSP") + private String description; + /** + * 是否启用,1-启用,0-不启用 + */ + @TableField("IS_ENBD") + private Integer isEnabled; + /** + * 任务模版key + */ + @TableField("TMPL_KY") + private String templateKey; + /** + * 任务单编号规则 + */ + @TableField("CD_RUL") + private String codeRule; + /** + * 分配方式,【字典】【jy_assay_method_assign_way】随机分配,按顺序分配,自动分配 + */ + @TableField("ASN_WY") + private String assignWay; + /** + * 展示平台,【字典】【jy_assay_method_assign_platform】pad、pc、pad&pc + */ + @TableField("ASN_PLTF") + private String assignPlatform; + /** + * 任务分配表单配置信息,是否添加质控样;是否过筛;是否预览打印;是否查询S值范围;是否需要流程审批;流程审批编码;退回样品审批流程编码:任务完成时的提交方式;指派单抬头key + */ + @TableField("ASY_TSK_INF") + private String assayTaskInfomation; + /** + * 检测部门编号 + */ + @TableField("ASY_DEPT_CD") + private String assayDepartmentCode; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodProjectDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodProjectDO.java new file mode 100644 index 0000000..001a308 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodProjectDO.java @@ -0,0 +1,105 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 检测方法分析项目配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_asy_mthd_prj") +@KeySequence("t_cfg_asy_mthd_prj_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigAssayMethodProjectDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 检测方法ID + */ + @TableField("CFG_ASY_MTHD_ID") + private Long configAssayMethodId; + /** + * 检测项目ID,字典表【T_DIC_PRJ】 + */ + @TableField("DIC_PRJ_ID") + private Long dictionaryProjectId; + /** + * 检测单位ID,UNT表 + */ + @TableField("UNT_ID") + private Long unitId; + /** + * 单位 + */ + @TableField("DIC_PRJ_UNT") + private String dictionaryProjectUnit; + /** + * 是否允许为空 + */ + @TableField("IS_NLL") + private Integer isNull; + /** + * 数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间 + */ + @TableField("DAT_TP") + private String dataType; + /** + * 小数位 + */ + @TableField("DEC_POS") + private Integer decimalPosition; + /** + * 计算公式 + */ + @TableField("FMU") + private String formula; + /** + * 判定精度 + */ + @TableField("ASMT_ACU") + private Integer assessmentAccuracy; + /** + * 是否默认启用,1-启用,0-不启用 + */ + @TableField("IS_DFT_ENBD") + private Integer isDefaultEnabled; + /** + * 排序 + */ + @TableField("SRT") + private Integer sort; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodProjectParameterDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodProjectParameterDO.java new file mode 100644 index 0000000..7af0604 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigAssayMethodProjectParameterDO.java @@ -0,0 +1,95 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 检测方法分析项目参数配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_asy_mthd_prj_prm") +@KeySequence("t_cfg_asy_mthd_prj_prm_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigAssayMethodProjectParameterDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 检测方法分析项目ID + */ + @TableField("CFG_ASY_MTHD_PRJ_ID") + private Long configAssayMethodProjectId; + /** + * 参数ID,字典表【T_DIC_PRM】 + */ + @TableField("DIC_PRM_ID") + private Long dictionaryParameterId; + /** + * 数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间 + */ + @TableField("DAT_TP") + private String dataType; + /** + * 小数位 + */ + @TableField("DEC_POS") + private Integer decimalPosition; + /** + * 默认值 + */ + @TableField("DFT_VAL") + private String defaultValue; + /** + * 是否允许为空 + */ + @TableField("IS_NLL") + private Integer isNull; + /** + * 计算公式 + */ + @TableField("FMU") + private String formula; + /** + * pc界面是否显示 + */ + @TableField("IS_SHW") + private Integer isShow; + /** + * 排序 + */ + @TableField("SRT") + private Integer sort; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigBaseSampleDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigBaseSampleDO.java new file mode 100644 index 0000000..3418174 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigBaseSampleDO.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 主样配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_bse_smp") +@KeySequence("t_cfg_bse_smp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigBaseSampleDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 样品ID + */ + @TableField("BSE_SMP_ID") + private Long baseSampleId; + /** + * 父级ID + */ + @TableField("PRN_ID") + private Long parentId; + /** + * 编码规则 + */ + @TableField("CD_RUL") + private String codeRule; + /** + * 样品流程Key + */ + @TableField("FLW_KY") + private String flowKey; + /** + * 样品标签打印模版 + */ + @TableField("PRNT_TMPL") + private String printTemplate; + /** + * 样品标签打印份数 + */ + @TableField("CD_PRNT_QTY") + private Integer codePrintQuantity; + /** + * 样品名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigEntrustSourceDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigEntrustSourceDO.java new file mode 100644 index 0000000..2093ca4 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigEntrustSourceDO.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 检验委托来源配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_entt_src") +@KeySequence("t_cfg_entt_src_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigEntrustSourceDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 名称,西南铜委托、商检委托、内部委托、抽查委托、内审委托、生产委托 + */ + @TableField("NAME") + private String name; + /** + * 模版Key + */ + @TableField("KY") + private String key; + /** + * 数据集key,T_DAT_COLT_FLD + */ + @TableField("DAT_COLT_KY") + private String dataCollectionKey; + /** + * 委托单模版 + */ + @TableField("TMPL") + private String template; + /** + * 委托单号规则 + */ + @TableField("CD_RUL") + private String codeRule; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigProjectDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigProjectDO.java new file mode 100644 index 0000000..b5d555a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigProjectDO.java @@ -0,0 +1,60 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 检测项目配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_prj") +@KeySequence("t_cfg_prj_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigProjectDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 检测项目ID + */ + @TableField("DIC_PRJ_ID") + private Long dictionaryProjectId; + /** + * 检测方法配置ID + */ + @TableField("CFG_ASY_MTHD_ID") + private Long configAssayMethodId; + /** + * 上报列字段 + */ + @TableField("SVE_COLN") + private String saveColumn; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportFieldDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportFieldDO.java new file mode 100644 index 0000000..2603171 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportFieldDO.java @@ -0,0 +1,105 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 报表字段配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_rpt_fld") +@KeySequence("t_cfg_rpt_fld_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigReportFieldDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 报表类型ID + */ + @TableField("CFG_RPT_TP_ID") + private Long configReportTypeId; + /** + * 绑定字段 + */ + @TableField("FLD") + private String field; + /** + * 标题名称 + */ + @TableField("FLD_NAME") + private String fieldName; + /** + * 排序号 + */ + @TableField("NO") + private Integer no; + /** + * 数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间 + */ + @TableField("DAT_TP") + private Integer dataType; + /** + * 小数位 + */ + @TableField("DEC") + private Integer decimal; + /** + * 列宽 + */ + @TableField("FLD_WDTH") + private Integer fieldWidth; + /** + * 是否分组 + */ + @TableField("IS_GRP") + private Integer isGroup; + /** + * 是否可修改 + */ + @TableField("IS_UPD") + private Integer isUpdate; + /** + * 计算公式 + */ + @TableField("FMU") + private String formula; + /** + * 表头分组 + */ + @TableField("TTL_GRP") + private String titleGroup; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注,1-是,0-否 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportTemplateDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportTemplateDO.java new file mode 100644 index 0000000..8598e5b --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportTemplateDO.java @@ -0,0 +1,78 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 报表模版配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_rpt_tmpl") +@KeySequence("t_cfg_rpt_tmpl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigReportTemplateDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 模版名称 + */ + @TableField("NAME") + private String name; + /** + * 模版Key + */ + @TableField("KY") + private String key; + /** + * 内容 + */ + @TableField("CNTT") + private String content; + /** + * 数据接口地址 + */ + @TableField("DAT_URL") + private String dataUrl; + /** + * 数据 + */ + @TableField("DAT") + private String data; + /** + * 模板是否认证 + */ + @TableField("IS_AUTH") + private Integer isAuthority; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 乐观锁 + */ + @Version + @TableField("UPD_CNT") + private Integer updateCount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportTypeDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportTypeDO.java new file mode 100644 index 0000000..1d7639a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigReportTypeDO.java @@ -0,0 +1,65 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 报表类型配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_rpt_tp") +@KeySequence("t_cfg_rpt_tp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigReportTypeDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 报表名称 + */ + @TableField("NAME") + private String name; + /** + * 键值 + */ + @TableField("KY") + private String key; + /** + * 报表模版 + */ + @TableField("TMPL") + private String template; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSampleFlowDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSampleFlowDO.java new file mode 100644 index 0000000..f147bd7 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSampleFlowDO.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 样品流程配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_smp_flw") +@KeySequence("t_cfg_smp_flw_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigSampleFlowDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 流程名称 + */ + @TableField("NAME") + private String name; + /** + * 流程Key + */ + @TableField("KY") + private String key; + /** + * 流程配置内容JSON + */ + @TableField("CNTT") + private String content; + /** + * 流程描述 + */ + @TableField("DSP") + private String description; + /** + * 类型,主样、子样 + */ + @TableField("TP") + private String type; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSampleHandoverDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSampleHandoverDO.java new file mode 100644 index 0000000..7116758 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSampleHandoverDO.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 样品交接配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_smp_hnd") +@KeySequence("t_cfg_smp_hnd_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigSampleHandoverDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 交接单名称 + */ + @TableField("NAME") + private String name; + /** + * 流程节点KY + */ + @TableField("DIC_SMP_FLW_NDE_KY") + private String dictionarySampleFlowNodeKey; + /** + * 交接模版key + */ + @TableField("TMPL_KY") + private String templateKey; + /** + * 交接单编号规则 + */ + @TableField("CD_RUL") + private String codeRule; + /** + * 是否预览打印 + */ + @TableField("IS_PRNT") + private Integer isPrint; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSampleReportDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSampleReportDO.java new file mode 100644 index 0000000..ba00404 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSampleReportDO.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 样品报表关系 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_smp_rpt") +@KeySequence("t_cfg_smp_rpt_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigSampleReportDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 报表类型 + */ + @TableField("CFG_RPT_TP_ID") + private Long configReportTypeId; + /** + * 主样配置ID + */ + @TableField("CFG_BSE_SMP_ID") + private Long configBaseSampleId; + /** + * 样品名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 数据来源 + */ + @TableField("DAT_SRC") + private String dataSource; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSimpleFlowCodeDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSimpleFlowCodeDO.java new file mode 100644 index 0000000..fc8866e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSimpleFlowCodeDO.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* LiteFlow脚本配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_smpl_flw_cd") +@KeySequence("t_cfg_smpl_flw_cd_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigSimpleFlowCodeDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 脚本序号 + */ + @TableField("CD_NO") + private String codeNo; + /** + * 脚本名称 + */ + @TableField("CD_NAME") + private String codeName; + /** + * 脚本数据 + */ + @TableField("CD_DAT") + private String codeData; + /** + * 脚本类型,【字典】【jy_simple_flow_code_type】普通脚本、选择脚本、条件脚本、数量循环、条件循环、退出循环节 + */ + @TableField("CD_TP") + private String codeType; + /** + * 脚本语言,【字典】【jy_simple_flow_code_language】Java,Groovy,QLExpress + */ + @TableField("CD_LANG") + private String codeLanguage; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSimpleFlowRuleDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSimpleFlowRuleDO.java new file mode 100644 index 0000000..37fce0d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSimpleFlowRuleDO.java @@ -0,0 +1,75 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* LiteFlow规则配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_smpl_flw_rul") +@KeySequence("t_cfg_smpl_flw_rul_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigSimpleFlowRuleDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 名称 + */ + @TableField("NAME") + private String name; + /** + * 描述 + */ + @TableField("DSP") + private String description; + /** + * EL表达式 + */ + @TableField("DAT") + private String data; + /** + * 路由 + */ + @TableField("RUT") + private String route; + /** + * 组 + */ + @TableField("GRP_NAME") + private String groupName; + /** + * 流程图 + */ + @TableField("FLW") + private String flow; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigStandardSampleProjectDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigStandardSampleProjectDO.java new file mode 100644 index 0000000..2f04945 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigStandardSampleProjectDO.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 标准样检测项目配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_std_smp_prj") +@KeySequence("t_cfg_std_smp_prj_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigStandardSampleProjectDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 标准样类型ID + */ + @TableField("CFG_STD_SMP_TP_ID") + private Long configStandardSampleTypeId; + /** + * 检测项目ID + */ + @TableField("DIC_PRJ_ID") + private Long dictionaryProjectId; + /** + * 检测项目名称 + */ + @TableField("DIC_PRJ_NAME") + private String dictionaryProjectName; + /** + * 检测单位ID,UNT表 + */ + @TableField("UNT_ID") + private Long unitId; + /** + * 检测项目单位 + */ + @TableField("DIC_PRJ_UNT") + private String dictionaryProjectUnit; + /** + * 小数精度 + */ + @TableField("ACU") + private Integer accuracy; + /** + * 排序号 + */ + @TableField("SRT") + private String sort; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigStandardSampleTypeDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigStandardSampleTypeDO.java new file mode 100644 index 0000000..f575db5 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigStandardSampleTypeDO.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 标准样类型配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_std_smp_tp") +@KeySequence("t_cfg_std_smp_tp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigStandardSampleTypeDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 主样配置ID + */ + @TableField("CFG_BSE_SMP_ID") + private Long configBaseSampleId; + /** + * 标准样类型名称 + */ + @TableField("NAME") + private String name; + /** + * 编码规则 + */ + @TableField("CD_RUL") + private String codeRule; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 化验部门编号 + */ + @TableField("ASY_DEPT_CD") + private String assayDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleDO.java new file mode 100644 index 0000000..d5e0696 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleDO.java @@ -0,0 +1,95 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 子样配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_sb_smp") +@KeySequence("t_cfg_sb_smp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigSubSampleDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 分样配置ID + */ + @TableField("CFG_SB_SMP_PRN_ID") + private Long configSubSampleParentId; + /** + * 样品类型ID + */ + @TableField("DIC_BSN_ID") + private Long dictionaryBusinessId; + /** + * 子样流程Key,样品流转流程key + */ + @TableField("FLW_KY") + private String flowKey; + /** + * 简码规则 + */ + @TableField("SMPL_CD_RUL") + private String simpleCodeRule; + /** + * 编码规则 + */ + @TableField("CD_RUL") + private String codeRule; + /** + * 是否打印 + */ + @TableField("IS_PRNT") + private Integer isPrint; + /** + * 复检节点 + */ + @TableField("RCHK_FLW_CD") + private String recheckFlowCode; + /** + * 样品名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 样品保存天数 + */ + @TableField("SMP_SVE_DY") + private Integer sampleSaveDay; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleMethodDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleMethodDO.java new file mode 100644 index 0000000..b3cdaed --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleMethodDO.java @@ -0,0 +1,65 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 子样与检测方法配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_sb_smp_mthd") +@KeySequence("t_cfg_sb_smp_mthd_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigSubSampleMethodDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 子样配置ID + */ + @TableField("CFG_SB_SMP_ID") + private Long configSubSampleId; + /** + * 分析方法ID + */ + @TableField("CFG_ASY_MTHD_ID") + private Long configAssayMethodId; + /** + * 是否默认使用,1-启用,0-不启用 + */ + @TableField("IS_DFT_USE") + private Integer isDefaultUse; + /** + * 任务数 + */ + @TableField("TSK_CNT") + private Integer taskCount; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleParentDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleParentDO.java new file mode 100644 index 0000000..8ed9d21 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigSubSampleParentDO.java @@ -0,0 +1,75 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 分样配置 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_sb_smp_prn") +@KeySequence("t_cfg_sb_smp_prn_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigSubSampleParentDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 主样配置ID + */ + @TableField("CFG_BSE_SMP_ID") + private Long configBaseSampleId; + /** + * 样品类型ID + */ + @TableField("DIC_BSN_ID") + private Long dictionaryBusinessId; + /** + * 样品名称 + */ + @TableField("SMP_NAME") + private String sampleName; + /** + * 是否默认启用 + */ + @TableField("IS_DFT_ENBD") + private Integer isDefaultEnabled; + /** + * 审核方式,多个流程用|分隔 + */ + @TableField("AUD_WY") + private Integer auditWay; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigWarehouseLocationInfomationDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigWarehouseLocationInfomationDO.java new file mode 100644 index 0000000..51978f9 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/ConfigWarehouseLocationInfomationDO.java @@ -0,0 +1,65 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 样品库位信息 DO +* +* @author 后台管理 +*/ +@TableName("t_cfg_wrh_loc_inf") +@KeySequence("t_cfg_wrh_loc_inf_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class ConfigWarehouseLocationInfomationDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 样品库名称 + */ + @TableField("NAME") + private String name; + /** + * 库位编号 + */ + @TableField("CD") + private String code; + /** + * 仓库编码 + */ + @TableField("WRH_CDG") + private String warehouseCoding; + /** + * 样品容量 + */ + @TableField("CPY") + private Integer capacity; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDO.java new file mode 100644 index 0000000..2338d7c --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDO.java @@ -0,0 +1,60 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 物料检测标准 DO +* +* @author 后台管理 +*/ +@TableName("t_mtrl_asy_std") +@KeySequence("t_mtrl_asy_std_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class MaterialAssayStandardDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 样品大类ID + */ + @TableField("BSE_SMP_ID") + private Long baseSampleId; + /** + * 物料ID + */ + @TableField("MTRL_ID") + private Long materialId; + /** + * 样品类型ID,字典表:【T_DIC_BSN】 + */ + @TableField("DIC_BSN_ID") + private Long dictionaryBusinessId; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDetailDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDetailDO.java new file mode 100644 index 0000000..bc9214e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDetailDO.java @@ -0,0 +1,90 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 物料检测标准检测项目 DO +* +* @author 后台管理 +*/ +@TableName("t_mtrl_asy_std_dtl") +@KeySequence("t_mtrl_asy_std_dtl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class MaterialAssayStandardDetailDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 物料检测标准ID + */ + @TableField("MTRL_ASY_STD_ID") + private Long materialAssayStandardId; + /** + * 检测项目ID + */ + @TableField("DIC_PRJ_ID") + private Long dictionaryProjectId; + /** + * 检测项目编码 + */ + @TableField("DIC_PRJ_CD") + private String dictionaryProjectCode; + /** + * 检测结果单位ID + */ + @TableField("UNT_ID") + private Long unitId; + /** + * 检测结果单位 + */ + @TableField("UNT") + private String unit; + /** + * 数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间 + */ + @TableField("DAT_TP") + private String dataType; + /** + * 小数位 + */ + @TableField("DEC_POS") + private Integer decimalPosition; + /** + * 检测分类,【字典】【jy_assay_standard_category】化学;仪器;外检 + */ + @TableField("ASY_CTGR") + private String assayCategory; + /** + * 是否默认选择,委托时是否默认选择;1-是,0-否 + */ + @TableField("IS_DFT_PCK") + private Integer isDefaultPick; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + + + + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDetailExtendDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDetailExtendDO.java new file mode 100644 index 0000000..e2c18f9 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardDetailExtendDO.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import com.baomidou.mybatisplus.annotation.TableField; +import lombok.*; + +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@NoArgsConstructor +@AllArgsConstructor +public class MaterialAssayStandardDetailExtendDO extends MaterialAssayStandardDetailDO { + + //==================================扩展字段==================================== + //检测项名称 +// @TableField(value = "DIC_PRJ_NAME", select = false) + private String dictionaryProjectName; + private String dictionaryProjectSimpleName; + + //数据类型 +// @TableField(value = "DATA_TYPE_NAME", select = false) + private String dataTypeName; + + //检测分类名称 +// @TableField(value = "ASY_CTGR_NAME", select = false) + private String assayCategoryName; + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardExtendDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardExtendDO.java new file mode 100644 index 0000000..b6a3c06 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardExtendDO.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import com.baomidou.mybatisplus.annotation.TableField; +import lombok.*; + +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@NoArgsConstructor +@AllArgsConstructor +public class MaterialAssayStandardExtendDO extends MaterialAssayStandardDO{ + //=================样品大类属性==================== + /** + * 大类名称 + */ + private String sampleName; + /** + * 物料代码 + */ + private String materialCode; + /** + * 物料名称 + */ + private String materialName; + /** + * 样品类型_ID,字典表【T_DIC_BSN】结算样、委检样、抽查样 + */ + private Long dictionaryBusinessId; + /** + * 检测项目数量 + */ + private Long detailCount; +} + diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardMethodDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardMethodDO.java new file mode 100644 index 0000000..f94449b --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/dataobject/MaterialAssayStandardMethodDO.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.dataobject; + +import lombok.*; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 物料检测标准与方法 DO +* +* @author 后台管理 +*/ +@TableName("t_mtrl_asy_std_mthd") +@KeySequence("t_mtrl_asy_std_mthd_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class MaterialAssayStandardMethodDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 物料检测标准明细项ID + */ + @TableField("MTRL_ASY_STD_DTL_ID") + private Long materialAssayStandardDetailId; + /** + * 检测方法配置ID + */ + @TableField("CFG_ASY_MTHD_ID") + private Long configAssayMethodId; + /** + * 是否默认,1-是,0-否 + */ + @TableField("IS_DFT") + private Integer isDefault; + /** + * 是否双杯分析,1-是,0-否 + */ + @TableField("IS_DUAL_CP") + private Integer isDualCup; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/BaseSampleMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/BaseSampleMapper.java new file mode 100644 index 0000000..30d4857 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/BaseSampleMapper.java @@ -0,0 +1,35 @@ +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 { + + default PageResult selectPage(BaseSamplePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .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 getBaseSampleListWithAssayStandardCount(); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodMapper.java new file mode 100644 index 0000000..f19bb76 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodMapper.java @@ -0,0 +1,63 @@ +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.query.MPJLambdaWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO; + +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 检测方法配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigAssayMethodMapper extends BaseMapperX { + + default List selectList(ConfigAssayMethodReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(ConfigAssayMethodDO::getMethodConfigId, reqVO.getMethodConfigId()) + .likeIfPresent(ConfigAssayMethodDO::getName, reqVO.getName()) + .eqIfPresent(ConfigAssayMethodDO::getMethodCode, reqVO.getMethodCode()) + .eqIfPresent(ConfigAssayMethodDO::getDescription, reqVO.getDescription()) + .eqIfPresent(ConfigAssayMethodDO::getIsEnabled, reqVO.getIsEnabled()) + .eqIfPresent(ConfigAssayMethodDO::getTemplateKey, reqVO.getTemplateKey()) + .eqIfPresent(ConfigAssayMethodDO::getCodeRule, reqVO.getCodeRule()) + .eqIfPresent(ConfigAssayMethodDO::getAssignWay, reqVO.getAssignWay()) + .eqIfPresent(ConfigAssayMethodDO::getAssignPlatform, reqVO.getAssignPlatform()) + .eqIfPresent(ConfigAssayMethodDO::getAssayTaskInfomation, reqVO.getAssayTaskInfomation()) + .eqIfPresent(ConfigAssayMethodDO::getAssayDepartmentCode, reqVO.getAssayDepartmentCode()) + .eqIfPresent(ConfigAssayMethodDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigAssayMethodDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigAssayMethodDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigAssayMethodDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigAssayMethodDO::getId)); + } + + default PageResult selectPage(ConfigAssayMethodPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigAssayMethodDO::getMethodConfigId, reqVO.getMethodConfigId()) + .likeIfPresent(ConfigAssayMethodDO::getName, reqVO.getName()) + .eqIfPresent(ConfigAssayMethodDO::getMethodCode, reqVO.getMethodCode()) + .eqIfPresent(ConfigAssayMethodDO::getDescription, reqVO.getDescription()) + .eqIfPresent(ConfigAssayMethodDO::getIsEnabled, reqVO.getIsEnabled()) + .eqIfPresent(ConfigAssayMethodDO::getTemplateKey, reqVO.getTemplateKey()) + .eqIfPresent(ConfigAssayMethodDO::getCodeRule, reqVO.getCodeRule()) + .eqIfPresent(ConfigAssayMethodDO::getAssignWay, reqVO.getAssignWay()) + .eqIfPresent(ConfigAssayMethodDO::getAssignPlatform, reqVO.getAssignPlatform()) + .eqIfPresent(ConfigAssayMethodDO::getAssayTaskInfomation, reqVO.getAssayTaskInfomation()) + .eqIfPresent(ConfigAssayMethodDO::getAssayDepartmentCode, reqVO.getAssayDepartmentCode()) + .eqIfPresent(ConfigAssayMethodDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigAssayMethodDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigAssayMethodDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigAssayMethodDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigAssayMethodDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectMapper.java new file mode 100644 index 0000000..8f1fd9a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectMapper.java @@ -0,0 +1,40 @@ +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 { + + default PageResult selectPage(ConfigAssayMethodProjectPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .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)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectParameterMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectParameterMapper.java new file mode 100644 index 0000000..c9a7804 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectParameterMapper.java @@ -0,0 +1,38 @@ +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 { + + default PageResult selectPage(ConfigAssayMethodProjectParameterPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .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)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigBaseSampleMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigBaseSampleMapper.java new file mode 100644 index 0000000..0ac29f1 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigBaseSampleMapper.java @@ -0,0 +1,36 @@ +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.ConfigBaseSampleDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 主样配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigBaseSampleMapper extends BaseMapperX { + + default PageResult selectPage(ConfigBaseSamplePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigBaseSampleDO::getBaseSampleId, reqVO.getBaseSampleId()) + .eqIfPresent(ConfigBaseSampleDO::getParentId, reqVO.getParentId()) + .eqIfPresent(ConfigBaseSampleDO::getCodeRule, reqVO.getCodeRule()) + .eqIfPresent(ConfigBaseSampleDO::getFlowKey, reqVO.getFlowKey()) + .eqIfPresent(ConfigBaseSampleDO::getPrintTemplate, reqVO.getPrintTemplate()) + .eqIfPresent(ConfigBaseSampleDO::getCodePrintQuantity, reqVO.getCodePrintQuantity()) + .likeIfPresent(ConfigBaseSampleDO::getSampleName, reqVO.getSampleName()) + .eqIfPresent(ConfigBaseSampleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigBaseSampleDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigBaseSampleDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigBaseSampleDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigBaseSampleDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigEntrustSourceMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigEntrustSourceMapper.java new file mode 100644 index 0000000..6aadfa1 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigEntrustSourceMapper.java @@ -0,0 +1,46 @@ +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.ConfigEntrustSourceDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 检验委托来源配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigEntrustSourceMapper extends BaseMapperX { + + default PageResult selectPage(ConfigEntrustSourcePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(ConfigEntrustSourceDO::getName, reqVO.getName()) + .eqIfPresent(ConfigEntrustSourceDO::getKey, reqVO.getKey()) + .eqIfPresent(ConfigEntrustSourceDO::getDataCollectionKey, reqVO.getDataCollectionKey()) + .eqIfPresent(ConfigEntrustSourceDO::getTemplate, reqVO.getTemplate()) + .eqIfPresent(ConfigEntrustSourceDO::getCodeRule, reqVO.getCodeRule()) + .eqIfPresent(ConfigEntrustSourceDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigEntrustSourceDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigEntrustSourceDO::getRemark, reqVO.getRemark()) + .orderByDesc(ConfigEntrustSourceDO::getId)); + } + + default List selectList(ConfigEntrustSourceReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .likeIfPresent(ConfigEntrustSourceDO::getName, reqVO.getName()) + .eqIfPresent(ConfigEntrustSourceDO::getKey, reqVO.getKey()) + .eqIfPresent(ConfigEntrustSourceDO::getDataCollectionKey, reqVO.getDataCollectionKey()) + .eqIfPresent(ConfigEntrustSourceDO::getTemplate, reqVO.getTemplate()) + .eqIfPresent(ConfigEntrustSourceDO::getCodeRule, reqVO.getCodeRule()) + .eqIfPresent(ConfigEntrustSourceDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigEntrustSourceDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigEntrustSourceDO::getRemark, reqVO.getRemark()) + .orderByDesc(ConfigEntrustSourceDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigProjectMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigProjectMapper.java new file mode 100644 index 0000000..45f2c14 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigProjectMapper.java @@ -0,0 +1,31 @@ +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 { + + default PageResult selectPage(ConfigProjectPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .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)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportFieldMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportFieldMapper.java new file mode 100644 index 0000000..e8acbc1 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportFieldMapper.java @@ -0,0 +1,40 @@ +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 { + + default PageResult selectPage(ConfigReportFieldPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .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)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTemplateMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTemplateMapper.java new file mode 100644 index 0000000..568c392 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTemplateMapper.java @@ -0,0 +1,33 @@ +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 { + + default PageResult selectPage(ConfigReportTemplatePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .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)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTypeMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTypeMapper.java new file mode 100644 index 0000000..a8fa269 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTypeMapper.java @@ -0,0 +1,32 @@ +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.ConfigReportTypeDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 报表类型配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigReportTypeMapper extends BaseMapperX { + + default PageResult selectPage(ConfigReportTypePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(ConfigReportTypeDO::getName, reqVO.getName()) + .eqIfPresent(ConfigReportTypeDO::getKey, reqVO.getKey()) + .eqIfPresent(ConfigReportTypeDO::getTemplate, reqVO.getTemplate()) + .eqIfPresent(ConfigReportTypeDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigReportTypeDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigReportTypeDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigReportTypeDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigReportTypeDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleFlowMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleFlowMapper.java new file mode 100644 index 0000000..c60bfae --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleFlowMapper.java @@ -0,0 +1,38 @@ +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 { + + default PageResult selectPage(ConfigSampleFlowPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .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() + .eq(ConfigSampleFlowDO::getKey, key)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleHandoverMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleHandoverMapper.java new file mode 100644 index 0000000..861d8d7 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleHandoverMapper.java @@ -0,0 +1,33 @@ +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.ConfigSampleHandoverDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 样品交接配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigSampleHandoverMapper extends BaseMapperX { + + default PageResult selectPage(ConfigSampleHandoverPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(ConfigSampleHandoverDO::getName, reqVO.getName()) + .eqIfPresent(ConfigSampleHandoverDO::getDictionarySampleFlowNodeKey, reqVO.getDictionarySampleFlowNodeKey()) + .eqIfPresent(ConfigSampleHandoverDO::getTemplateKey, reqVO.getTemplateKey()) + .eqIfPresent(ConfigSampleHandoverDO::getCodeRule, reqVO.getCodeRule()) + .eqIfPresent(ConfigSampleHandoverDO::getIsPrint, reqVO.getIsPrint()) + .eqIfPresent(ConfigSampleHandoverDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigSampleHandoverDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigSampleHandoverDO::getRemark, reqVO.getRemark()) + .orderByDesc(ConfigSampleHandoverDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleReportMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleReportMapper.java new file mode 100644 index 0000000..e741346 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleReportMapper.java @@ -0,0 +1,33 @@ +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 { + + default PageResult selectPage(ConfigSampleReportPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .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)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowCodeMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowCodeMapper.java new file mode 100644 index 0000000..d3b326c --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowCodeMapper.java @@ -0,0 +1,48 @@ +package cn.iocoder.yudao.module.qms.business.config.dal.mapper; + +import java.util.*; + +import org.apache.ibatis.annotations.Mapper; + +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.ConfigSimpleFlowCodePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodeReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowCodeDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; + +/** + * LiteFlow脚本配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigSimpleFlowCodeMapper extends BaseMapperX { + + default PageResult selectPage(ConfigSimpleFlowCodePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigSimpleFlowCodeDO::getCodeNo, reqVO.getCodeNo()) + .likeIfPresent(ConfigSimpleFlowCodeDO::getCodeName, reqVO.getCodeName()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getCodeData, reqVO.getCodeData()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getCodeType, reqVO.getCodeType()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getCodeLanguage, reqVO.getCodeLanguage()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigSimpleFlowCodeDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getRemark, reqVO.getRemark()) + .orderByDesc(ConfigSimpleFlowCodeDO::getId)); + } + + default List selectList(ConfigSimpleFlowCodeReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(ConfigSimpleFlowCodeDO::getCodeNo, reqVO.getCodeNo()) + .likeIfPresent(ConfigSimpleFlowCodeDO::getCodeName, reqVO.getCodeName()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getCodeData, reqVO.getCodeData()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getCodeType, reqVO.getCodeType()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getCodeLanguage, reqVO.getCodeLanguage()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigSimpleFlowCodeDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigSimpleFlowCodeDO::getRemark, reqVO.getRemark()) + .orderByDesc(ConfigSimpleFlowCodeDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowRuleMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowRuleMapper.java new file mode 100644 index 0000000..3b0e168 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowRuleMapper.java @@ -0,0 +1,44 @@ +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.ConfigSimpleFlowRulePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRuleReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowRuleDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * LiteFlow规则配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigSimpleFlowRuleMapper extends BaseMapperX { + + default PageResult selectPage(ConfigSimpleFlowRulePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(ConfigSimpleFlowRuleDO::getName, reqVO.getName()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getDescription, reqVO.getDescription()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getData, reqVO.getData()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getFlow, reqVO.getFlow()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigSimpleFlowRuleDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getRemark, reqVO.getRemark()) + .orderByDesc(ConfigSimpleFlowRuleDO::getId)); + } + + default List selectList(ConfigSimpleFlowRuleReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .likeIfPresent(ConfigSimpleFlowRuleDO::getName, reqVO.getName()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getDescription, reqVO.getDescription()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getData, reqVO.getData()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getFlow, reqVO.getFlow()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigSimpleFlowRuleDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigSimpleFlowRuleDO::getRemark, reqVO.getRemark()) + .orderByDesc(ConfigSimpleFlowRuleDO::getId)); + } +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleProjectMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleProjectMapper.java new file mode 100644 index 0000000..7f1596c --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleProjectMapper.java @@ -0,0 +1,36 @@ +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.ConfigStandardSampleProjectDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 标准样检测项目配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigStandardSampleProjectMapper extends BaseMapperX { + + default PageResult selectPage(ConfigStandardSampleProjectPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigStandardSampleProjectDO::getConfigStandardSampleTypeId, reqVO.getConfigStandardSampleTypeId()) + .eqIfPresent(ConfigStandardSampleProjectDO::getDictionaryProjectId, reqVO.getDictionaryProjectId()) + .likeIfPresent(ConfigStandardSampleProjectDO::getDictionaryProjectName, reqVO.getDictionaryProjectName()) + .eqIfPresent(ConfigStandardSampleProjectDO::getUnitId, reqVO.getUnitId()) + .eqIfPresent(ConfigStandardSampleProjectDO::getDictionaryProjectUnit, reqVO.getDictionaryProjectUnit()) + .eqIfPresent(ConfigStandardSampleProjectDO::getAccuracy, reqVO.getAccuracy()) + .eqIfPresent(ConfigStandardSampleProjectDO::getSort, reqVO.getSort()) + .eqIfPresent(ConfigStandardSampleProjectDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigStandardSampleProjectDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigStandardSampleProjectDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigStandardSampleProjectDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigStandardSampleProjectDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleTypeMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleTypeMapper.java new file mode 100644 index 0000000..4f2ec12 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleTypeMapper.java @@ -0,0 +1,33 @@ +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.ConfigStandardSampleTypeDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; + +/** + * 标准样类型配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigStandardSampleTypeMapper extends BaseMapperX { + + default PageResult selectPage(ConfigStandardSampleTypePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigStandardSampleTypeDO::getConfigBaseSampleId, reqVO.getConfigBaseSampleId()) + .likeIfPresent(ConfigStandardSampleTypeDO::getName, reqVO.getName()) + .eqIfPresent(ConfigStandardSampleTypeDO::getCodeRule, reqVO.getCodeRule()) + .eqIfPresent(ConfigStandardSampleTypeDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigStandardSampleTypeDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigStandardSampleTypeDO::getAssayDepartmentCode, reqVO.getAssayDepartmentCode()) + .eqIfPresent(ConfigStandardSampleTypeDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigStandardSampleTypeDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigStandardSampleTypeDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMapper.java new file mode 100644 index 0000000..dde5f76 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMapper.java @@ -0,0 +1,38 @@ +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.ConfigSubSampleDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 子样配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigSubSampleMapper extends BaseMapperX { + + default PageResult selectPage(ConfigSubSamplePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigSubSampleDO::getConfigSubSampleParentId, reqVO.getConfigSubSampleParentId()) + .eqIfPresent(ConfigSubSampleDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId()) + .eqIfPresent(ConfigSubSampleDO::getFlowKey, reqVO.getFlowKey()) + .eqIfPresent(ConfigSubSampleDO::getSimpleCodeRule, reqVO.getSimpleCodeRule()) + .eqIfPresent(ConfigSubSampleDO::getCodeRule, reqVO.getCodeRule()) + .eqIfPresent(ConfigSubSampleDO::getIsPrint, reqVO.getIsPrint()) + .eqIfPresent(ConfigSubSampleDO::getRecheckFlowCode, reqVO.getRecheckFlowCode()) + .likeIfPresent(ConfigSubSampleDO::getSampleName, reqVO.getSampleName()) + .eqIfPresent(ConfigSubSampleDO::getSampleSaveDay, reqVO.getSampleSaveDay()) + .eqIfPresent(ConfigSubSampleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigSubSampleDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigSubSampleDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigSubSampleDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigSubSampleDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMethodMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMethodMapper.java new file mode 100644 index 0000000..e12d3ed --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMethodMapper.java @@ -0,0 +1,32 @@ +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 { + + default PageResult selectPage(ConfigSubSampleMethodPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .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)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleParentMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleParentMapper.java new file mode 100644 index 0000000..6b291fa --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleParentMapper.java @@ -0,0 +1,34 @@ +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.ConfigSubSampleParentDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 分样配置 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ConfigSubSampleParentMapper extends BaseMapperX { + + default PageResult selectPage(ConfigSubSampleParentPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ConfigSubSampleParentDO::getConfigBaseSampleId, reqVO.getConfigBaseSampleId()) + .eqIfPresent(ConfigSubSampleParentDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId()) + .likeIfPresent(ConfigSubSampleParentDO::getSampleName, reqVO.getSampleName()) + .eqIfPresent(ConfigSubSampleParentDO::getIsDefaultEnabled, reqVO.getIsDefaultEnabled()) + .eqIfPresent(ConfigSubSampleParentDO::getAuditWay, reqVO.getAuditWay()) + .eqIfPresent(ConfigSubSampleParentDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(ConfigSubSampleParentDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ConfigSubSampleParentDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ConfigSubSampleParentDO::getVersion, reqVO.getVersion()) + .orderByDesc(ConfigSubSampleParentDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigWarehouseLocationInfomationMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigWarehouseLocationInfomationMapper.java new file mode 100644 index 0000000..8b740cb --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigWarehouseLocationInfomationMapper.java @@ -0,0 +1,32 @@ +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 { + + default PageResult selectPage(ConfigWarehouseLocationInfomationPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .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)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardDetailMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardDetailMapper.java new file mode 100644 index 0000000..700ecff --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardDetailMapper.java @@ -0,0 +1,42 @@ +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.MaterialAssayStandardDetailPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailExtendDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 物料检测标准检测项目 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface MaterialAssayStandardDetailMapper extends BaseMapperX { + + default PageResult selectPage(MaterialAssayStandardDetailPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(MaterialAssayStandardDetailDO::getMaterialAssayStandardId, reqVO.getMaterialAssayStandardId()) + .eqIfPresent(MaterialAssayStandardDetailDO::getDictionaryProjectId, reqVO.getDictionaryProjectId()) + .eqIfPresent(MaterialAssayStandardDetailDO::getDictionaryProjectCode, reqVO.getDictionaryProjectCode()) + .eqIfPresent(MaterialAssayStandardDetailDO::getUnitId, reqVO.getUnitId()) + .eqIfPresent(MaterialAssayStandardDetailDO::getUnit, reqVO.getUnit()) + .eqIfPresent(MaterialAssayStandardDetailDO::getDataType, reqVO.getDataType()) + .eqIfPresent(MaterialAssayStandardDetailDO::getDecimalPosition, reqVO.getDecimalPosition()) + .eqIfPresent(MaterialAssayStandardDetailDO::getAssayCategory, reqVO.getAssayCategory()) + .eqIfPresent(MaterialAssayStandardDetailDO::getIsDefaultPick, reqVO.getIsDefaultPick()) + .eqIfPresent(MaterialAssayStandardDetailDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(MaterialAssayStandardDetailDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(MaterialAssayStandardDetailDO::getRemark, reqVO.getRemark()) + .orderByDesc(MaterialAssayStandardDetailDO::getId)); + } + + List selectListWithExtend(@Param("param") MaterialAssayStandardDetailPageReqVO reqVO); + + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMapper.java new file mode 100644 index 0000000..10cb672 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMapper.java @@ -0,0 +1,41 @@ +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.MaterialAssayStandardDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardExtendDO; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 物料检测标准 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface MaterialAssayStandardMapper extends BaseMapperX { + + String tempDataKey = "tempDataKey"; + + default PageResult selectPage(MaterialAssayStandardPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(MaterialAssayStandardDO::getBaseSampleId, reqVO.getBaseSampleId()) + .eqIfPresent(MaterialAssayStandardDO::getMaterialId, reqVO.getMaterialId()) + .eqIfPresent(MaterialAssayStandardDO::getDictionaryBusinessId, reqVO.getDictionaryBusinessId()) + .eqIfPresent(MaterialAssayStandardDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(MaterialAssayStandardDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(MaterialAssayStandardDO::getRemark, reqVO.getRemark()) + .ne(MaterialAssayStandardDO::getRemark, tempDataKey) + .orderByDesc(MaterialAssayStandardDO::getId)); + } + + Page selectPageWithExtend(IPage page, @Param("param") MaterialAssayStandardPageReqVO param); + + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMethodMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMethodMapper.java new file mode 100644 index 0000000..795df87 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMethodMapper.java @@ -0,0 +1,30 @@ +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 { + + default PageResult selectPage(MaterialAssayStandardMethodPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .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)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/BaseSampleService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/BaseSampleService.java new file mode 100644 index 0000000..c51135d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/BaseSampleService.java @@ -0,0 +1,66 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSamplePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSampleRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSampleSaveReqVO; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.BaseSampleDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 样品大类管理 Service 接口 + * + * @author 后台管理 + */ +public interface BaseSampleService { + + List getBaseSampleListWithAssayStandardCount(); + + /** + * 创建样品大类管理 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BaseSampleRespVO createBaseSample(@Valid BaseSampleSaveReqVO createReqVO); + + /** + * 更新样品大类管理 + * + * @param updateReqVO 更新信息 + */ + void updateBaseSample(@Valid BaseSampleSaveReqVO updateReqVO); + + /** + * 删除样品大类管理 + * + * @param id 编号 + */ + void deleteBaseSample(Long id); + + /** + * 批量删除样品大类管理 + * + * @param ids 编号 + */ + void deleteBaseSampleListByIds(List ids); + + /** + * 获得样品大类管理 + * + * @param id 编号 + * @return 样品大类管理 + */ + BaseSampleDO getBaseSample(Long id); + + /** + * 获得样品大类管理分页 + * + * @param pageReqVO 分页查询 + * @return 样品大类管理分页 + */ + PageResult getBaseSamplePage(BaseSamplePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/BaseSampleServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/BaseSampleServiceImpl.java new file mode 100644 index 0000000..c18218b --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/BaseSampleServiceImpl.java @@ -0,0 +1,95 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSamplePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSampleRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.BaseSampleSaveReqVO; +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.dal.dataobject.BaseSampleDO; +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.BaseSampleMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.BASE_SAMPLE_NOT_EXISTS; + +/** + * 样品大类管理 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class BaseSampleServiceImpl implements BaseSampleService { + + @Resource private BaseSampleMapper baseSampleMapper; + + @Override + public List getBaseSampleListWithAssayStandardCount() { + return baseSampleMapper.getBaseSampleListWithAssayStandardCount(); + } + + @Override + public BaseSampleRespVO createBaseSample(BaseSampleSaveReqVO createReqVO) { + // 插入 + BaseSampleDO baseSample = BeanUtils.toBean(createReqVO, BaseSampleDO.class); + baseSampleMapper.insert(baseSample); + // 返回 + return BeanUtils.toBean(baseSample, BaseSampleRespVO.class); + } + + @Override + public void updateBaseSample(BaseSampleSaveReqVO updateReqVO) { + // 校验存在 + validateBaseSampleExists(updateReqVO.getId()); + // 更新 + BaseSampleDO updateObj = BeanUtils.toBean(updateReqVO, BaseSampleDO.class); + baseSampleMapper.updateById(updateObj); + } + + @Override + public void deleteBaseSample(Long id) { + // 校验存在 + validateBaseSampleExists(id); + // 删除 + baseSampleMapper.deleteById(id); + } + + @Override + public void deleteBaseSampleListByIds(List ids) { + // 校验存在 + validateBaseSampleExists(ids); + // 删除 + baseSampleMapper.deleteByIds(ids); + } + + private void validateBaseSampleExists(List ids) { + List list = baseSampleMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BASE_SAMPLE_NOT_EXISTS); + } + } + + private void validateBaseSampleExists(Long id) { + if (baseSampleMapper.selectById(id) == null) { + throw exception(BASE_SAMPLE_NOT_EXISTS); + } + } + + @Override + public BaseSampleDO getBaseSample(Long id) { + return baseSampleMapper.selectById(id); + } + + @Override + public PageResult getBaseSamplePage(BaseSamplePageReqVO pageReqVO) { + return baseSampleMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectParameterService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectParameterService.java new file mode 100644 index 0000000..0b8096d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectParameterService.java @@ -0,0 +1,62 @@ +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.ConfigAssayMethodProjectParameterDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 检测方法分析项目参数配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigAssayMethodProjectParameterService { + + /** + * 创建检测方法分析项目参数配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigAssayMethodProjectParameterRespVO createConfigAssayMethodProjectParameter(@Valid ConfigAssayMethodProjectParameterSaveReqVO createReqVO); + + /** + * 更新检测方法分析项目参数配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigAssayMethodProjectParameter(@Valid ConfigAssayMethodProjectParameterSaveReqVO updateReqVO); + + /** + * 删除检测方法分析项目参数配置 + * + * @param id 编号 + */ + void deleteConfigAssayMethodProjectParameter(Long id); + + /** + * 批量删除检测方法分析项目参数配置 + * + * @param ids 编号 + */ + void deleteConfigAssayMethodProjectParameterListByIds(List ids); + + /** + * 获得检测方法分析项目参数配置 + * + * @param id 编号 + * @return 检测方法分析项目参数配置 + */ + ConfigAssayMethodProjectParameterDO getConfigAssayMethodProjectParameter(Long id); + + /** + * 获得检测方法分析项目参数配置分页 + * + * @param pageReqVO 分页查询 + * @return 检测方法分析项目参数配置分页 + */ + PageResult getConfigAssayMethodProjectParameterPage(ConfigAssayMethodProjectParameterPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectParameterServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectParameterServiceImpl.java new file mode 100644 index 0000000..e177749 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectParameterServiceImpl.java @@ -0,0 +1,89 @@ +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.ConfigAssayMethodProjectParameterDO; +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.ConfigAssayMethodProjectParameterMapper; + +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_ASSAY_METHOD_PROJECT_PARAMETER_NOT_EXISTS; + +/** + * 检测方法分析项目参数配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigAssayMethodProjectParameterServiceImpl implements ConfigAssayMethodProjectParameterService { + + @Resource + private ConfigAssayMethodProjectParameterMapper configAssayMethodProjectParameterMapper; + + @Override + public ConfigAssayMethodProjectParameterRespVO createConfigAssayMethodProjectParameter(ConfigAssayMethodProjectParameterSaveReqVO createReqVO) { + // 插入 + ConfigAssayMethodProjectParameterDO configAssayMethodProjectParameter = BeanUtils.toBean(createReqVO, ConfigAssayMethodProjectParameterDO.class); + configAssayMethodProjectParameterMapper.insert(configAssayMethodProjectParameter); + // 返回 + return BeanUtils.toBean(configAssayMethodProjectParameter, ConfigAssayMethodProjectParameterRespVO.class); + } + + @Override + public void updateConfigAssayMethodProjectParameter(ConfigAssayMethodProjectParameterSaveReqVO updateReqVO) { + // 校验存在 + validateConfigAssayMethodProjectParameterExists(updateReqVO.getId()); + // 更新 + ConfigAssayMethodProjectParameterDO updateObj = BeanUtils.toBean(updateReqVO, ConfigAssayMethodProjectParameterDO.class); + configAssayMethodProjectParameterMapper.updateById(updateObj); + } + + @Override + public void deleteConfigAssayMethodProjectParameter(Long id) { + // 校验存在 + validateConfigAssayMethodProjectParameterExists(id); + // 删除 + configAssayMethodProjectParameterMapper.deleteById(id); + } + + @Override + public void deleteConfigAssayMethodProjectParameterListByIds(List ids) { + // 校验存在 + validateConfigAssayMethodProjectParameterExists(ids); + // 删除 + configAssayMethodProjectParameterMapper.deleteByIds(ids); + } + + private void validateConfigAssayMethodProjectParameterExists(List ids) { + List list = configAssayMethodProjectParameterMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_ASSAY_METHOD_PROJECT_PARAMETER_NOT_EXISTS); + } + } + + private void validateConfigAssayMethodProjectParameterExists(Long id) { + if (configAssayMethodProjectParameterMapper.selectById(id) == null) { + throw exception(CONFIG_ASSAY_METHOD_PROJECT_PARAMETER_NOT_EXISTS); + } + } + + @Override + public ConfigAssayMethodProjectParameterDO getConfigAssayMethodProjectParameter(Long id) { + return configAssayMethodProjectParameterMapper.selectById(id); + } + + @Override + public PageResult getConfigAssayMethodProjectParameterPage(ConfigAssayMethodProjectParameterPageReqVO pageReqVO) { + return configAssayMethodProjectParameterMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectService.java new file mode 100644 index 0000000..faca67f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectService.java @@ -0,0 +1,62 @@ +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.ConfigAssayMethodProjectDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 检测方法分析项目配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigAssayMethodProjectService { + + /** + * 创建检测方法分析项目配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigAssayMethodProjectRespVO createConfigAssayMethodProject(@Valid ConfigAssayMethodProjectSaveReqVO createReqVO); + + /** + * 更新检测方法分析项目配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigAssayMethodProject(@Valid ConfigAssayMethodProjectSaveReqVO updateReqVO); + + /** + * 删除检测方法分析项目配置 + * + * @param id 编号 + */ + void deleteConfigAssayMethodProject(Long id); + + /** + * 批量删除检测方法分析项目配置 + * + * @param ids 编号 + */ + void deleteConfigAssayMethodProjectListByIds(List ids); + + /** + * 获得检测方法分析项目配置 + * + * @param id 编号 + * @return 检测方法分析项目配置 + */ + ConfigAssayMethodProjectDO getConfigAssayMethodProject(Long id); + + /** + * 获得检测方法分析项目配置分页 + * + * @param pageReqVO 分页查询 + * @return 检测方法分析项目配置分页 + */ + PageResult getConfigAssayMethodProjectPage(ConfigAssayMethodProjectPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectServiceImpl.java new file mode 100644 index 0000000..b006222 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodProjectServiceImpl.java @@ -0,0 +1,89 @@ +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.ConfigAssayMethodProjectDO; +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.ConfigAssayMethodProjectMapper; + +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_ASSAY_METHOD_PROJECT_NOT_EXISTS; + +/** + * 检测方法分析项目配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigAssayMethodProjectServiceImpl implements ConfigAssayMethodProjectService { + + @Resource + private ConfigAssayMethodProjectMapper configAssayMethodProjectMapper; + + @Override + public ConfigAssayMethodProjectRespVO createConfigAssayMethodProject(ConfigAssayMethodProjectSaveReqVO createReqVO) { + // 插入 + ConfigAssayMethodProjectDO configAssayMethodProject = BeanUtils.toBean(createReqVO, ConfigAssayMethodProjectDO.class); + configAssayMethodProjectMapper.insert(configAssayMethodProject); + // 返回 + return BeanUtils.toBean(configAssayMethodProject, ConfigAssayMethodProjectRespVO.class); + } + + @Override + public void updateConfigAssayMethodProject(ConfigAssayMethodProjectSaveReqVO updateReqVO) { + // 校验存在 + validateConfigAssayMethodProjectExists(updateReqVO.getId()); + // 更新 + ConfigAssayMethodProjectDO updateObj = BeanUtils.toBean(updateReqVO, ConfigAssayMethodProjectDO.class); + configAssayMethodProjectMapper.updateById(updateObj); + } + + @Override + public void deleteConfigAssayMethodProject(Long id) { + // 校验存在 + validateConfigAssayMethodProjectExists(id); + // 删除 + configAssayMethodProjectMapper.deleteById(id); + } + + @Override + public void deleteConfigAssayMethodProjectListByIds(List ids) { + // 校验存在 + validateConfigAssayMethodProjectExists(ids); + // 删除 + configAssayMethodProjectMapper.deleteByIds(ids); + } + + private void validateConfigAssayMethodProjectExists(List ids) { + List list = configAssayMethodProjectMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_ASSAY_METHOD_PROJECT_NOT_EXISTS); + } + } + + private void validateConfigAssayMethodProjectExists(Long id) { + if (configAssayMethodProjectMapper.selectById(id) == null) { + throw exception(CONFIG_ASSAY_METHOD_PROJECT_NOT_EXISTS); + } + } + + @Override + public ConfigAssayMethodProjectDO getConfigAssayMethodProject(Long id) { + return configAssayMethodProjectMapper.selectById(id); + } + + @Override + public PageResult getConfigAssayMethodProjectPage(ConfigAssayMethodProjectPageReqVO pageReqVO) { + return configAssayMethodProjectMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodService.java new file mode 100644 index 0000000..b3ecfba --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodService.java @@ -0,0 +1,70 @@ +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.ConfigAssayMethodDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 检测方法配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigAssayMethodService { + + /** + * 创建检测方法配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigAssayMethodRespVO createConfigAssayMethod(@Valid ConfigAssayMethodSaveReqVO createReqVO); + + /** + * 更新检测方法配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigAssayMethod(@Valid ConfigAssayMethodSaveReqVO updateReqVO); + + /** + * 删除检测方法配置 + * + * @param id 编号 + */ + void deleteConfigAssayMethod(Long id); + + /** + * 批量删除检测方法配置 + * + * @param ids 编号 + */ + void deleteConfigAssayMethodListByIds(List ids); + + /** + * 获得检测方法配置 + * + * @param id 编号 + * @return 检测方法配置 + */ + ConfigAssayMethodDO getConfigAssayMethod(Long id); + + /** + * 获得检测方法配置列表 + * + * @param reqVO 查询 + * @return 检测方法配置分页 + */ + List getConfigAssayMethodList(ConfigAssayMethodReqVO reqVO); + + /** + * 获得检测方法配置分页 + * + * @param pageReqVO 分页查询 + * @return 检测方法配置分页 + */ + PageResult getConfigAssayMethodPage(ConfigAssayMethodPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodServiceImpl.java new file mode 100644 index 0000000..4b2516d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigAssayMethodServiceImpl.java @@ -0,0 +1,94 @@ +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.ConfigAssayMethodDO; +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.ConfigAssayMethodMapper; + +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_ASSAY_METHOD_NOT_EXISTS; + +/** + * 检测方法配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigAssayMethodServiceImpl implements ConfigAssayMethodService { + + @Resource + private ConfigAssayMethodMapper configAssayMethodMapper; + + @Override + public ConfigAssayMethodRespVO createConfigAssayMethod(ConfigAssayMethodSaveReqVO createReqVO) { + // 插入 + ConfigAssayMethodDO configAssayMethod = BeanUtils.toBean(createReqVO, ConfigAssayMethodDO.class); + configAssayMethodMapper.insert(configAssayMethod); + // 返回 + return BeanUtils.toBean(configAssayMethod, ConfigAssayMethodRespVO.class); + } + + @Override + public void updateConfigAssayMethod(ConfigAssayMethodSaveReqVO updateReqVO) { + // 校验存在 + validateConfigAssayMethodExists(updateReqVO.getId()); + // 更新 + ConfigAssayMethodDO updateObj = BeanUtils.toBean(updateReqVO, ConfigAssayMethodDO.class); + configAssayMethodMapper.updateById(updateObj); + } + + @Override + public void deleteConfigAssayMethod(Long id) { + // 校验存在 + validateConfigAssayMethodExists(id); + // 删除 + configAssayMethodMapper.deleteById(id); + } + + @Override + public void deleteConfigAssayMethodListByIds(List ids) { + // 校验存在 + validateConfigAssayMethodExists(ids); + // 删除 + configAssayMethodMapper.deleteByIds(ids); + } + + private void validateConfigAssayMethodExists(List ids) { + List list = configAssayMethodMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_ASSAY_METHOD_NOT_EXISTS); + } + } + + private void validateConfigAssayMethodExists(Long id) { + if (configAssayMethodMapper.selectById(id) == null) { + throw exception(CONFIG_ASSAY_METHOD_NOT_EXISTS); + } + } + + @Override + public ConfigAssayMethodDO getConfigAssayMethod(Long id) { + return configAssayMethodMapper.selectById(id); + } + + @Override + public List getConfigAssayMethodList(ConfigAssayMethodReqVO reqVO) { + return BeanUtils.toBean(configAssayMethodMapper.selectList(reqVO), ConfigAssayMethodExtendRespVO.class); + } + + @Override + public PageResult getConfigAssayMethodPage(ConfigAssayMethodPageReqVO pageReqVO) { + return BeanUtils.toBean(configAssayMethodMapper.selectPage(pageReqVO), ConfigAssayMethodExtendRespVO.class); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigBaseSampleService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigBaseSampleService.java new file mode 100644 index 0000000..c4e1ab7 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigBaseSampleService.java @@ -0,0 +1,62 @@ +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.ConfigBaseSampleDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 主样配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigBaseSampleService { + + /** + * 创建主样配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigBaseSampleRespVO createConfigBaseSample(@Valid ConfigBaseSampleSaveReqVO createReqVO); + + /** + * 更新主样配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigBaseSample(@Valid ConfigBaseSampleSaveReqVO updateReqVO); + + /** + * 删除主样配置 + * + * @param id 编号 + */ + void deleteConfigBaseSample(Long id); + + /** + * 批量删除主样配置 + * + * @param ids 编号 + */ + void deleteConfigBaseSampleListByIds(List ids); + + /** + * 获得主样配置 + * + * @param id 编号 + * @return 主样配置 + */ + ConfigBaseSampleDO getConfigBaseSample(Long id); + + /** + * 获得主样配置分页 + * + * @param pageReqVO 分页查询 + * @return 主样配置分页 + */ + PageResult getConfigBaseSamplePage(ConfigBaseSamplePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigBaseSampleServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigBaseSampleServiceImpl.java new file mode 100644 index 0000000..a54de74 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigBaseSampleServiceImpl.java @@ -0,0 +1,89 @@ +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.ConfigBaseSampleDO; +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.ConfigBaseSampleMapper; + +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_BASE_SAMPLE_NOT_EXISTS; + +/** + * 主样配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigBaseSampleServiceImpl implements ConfigBaseSampleService { + + @Resource + private ConfigBaseSampleMapper configBaseSampleMapper; + + @Override + public ConfigBaseSampleRespVO createConfigBaseSample(ConfigBaseSampleSaveReqVO createReqVO) { + // 插入 + ConfigBaseSampleDO configBaseSample = BeanUtils.toBean(createReqVO, ConfigBaseSampleDO.class); + configBaseSampleMapper.insert(configBaseSample); + // 返回 + return BeanUtils.toBean(configBaseSample, ConfigBaseSampleRespVO.class); + } + + @Override + public void updateConfigBaseSample(ConfigBaseSampleSaveReqVO updateReqVO) { + // 校验存在 + validateConfigBaseSampleExists(updateReqVO.getId()); + // 更新 + ConfigBaseSampleDO updateObj = BeanUtils.toBean(updateReqVO, ConfigBaseSampleDO.class); + configBaseSampleMapper.updateById(updateObj); + } + + @Override + public void deleteConfigBaseSample(Long id) { + // 校验存在 + validateConfigBaseSampleExists(id); + // 删除 + configBaseSampleMapper.deleteById(id); + } + + @Override + public void deleteConfigBaseSampleListByIds(List ids) { + // 校验存在 + validateConfigBaseSampleExists(ids); + // 删除 + configBaseSampleMapper.deleteByIds(ids); + } + + private void validateConfigBaseSampleExists(List ids) { + List list = configBaseSampleMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_BASE_SAMPLE_NOT_EXISTS); + } + } + + private void validateConfigBaseSampleExists(Long id) { + if (configBaseSampleMapper.selectById(id) == null) { + throw exception(CONFIG_BASE_SAMPLE_NOT_EXISTS); + } + } + + @Override + public ConfigBaseSampleDO getConfigBaseSample(Long id) { + return configBaseSampleMapper.selectById(id); + } + + @Override + public PageResult getConfigBaseSamplePage(ConfigBaseSamplePageReqVO pageReqVO) { + return configBaseSampleMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigEntrustSourceService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigEntrustSourceService.java new file mode 100644 index 0000000..e4542d8 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigEntrustSourceService.java @@ -0,0 +1,70 @@ +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.ConfigEntrustSourceDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 检验委托来源配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigEntrustSourceService { + + /** + * 创建检验委托来源配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigEntrustSourceRespVO createConfigEntrustSource(@Valid ConfigEntrustSourceSaveReqVO createReqVO); + + /** + * 更新检验委托来源配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigEntrustSource(@Valid ConfigEntrustSourceSaveReqVO updateReqVO); + + /** + * 删除检验委托来源配置 + * + * @param id 编号 + */ + void deleteConfigEntrustSource(Long id); + + /** + * 批量删除检验委托来源配置 + * + * @param ids 编号 + */ + void deleteConfigEntrustSourceListByIds(List ids); + + /** + * 获得检验委托来源配置 + * + * @param id 编号 + * @return 检验委托来源配置 + */ + ConfigEntrustSourceDO getConfigEntrustSource(Long id); + + /** + * 获得检验委托来源配置分页 + * + * @param pageReqVO 分页查询 + * @return 检验委托来源配置分页 + */ + PageResult getConfigEntrustSourcePage(ConfigEntrustSourcePageReqVO pageReqVO); + + /** + * 获得检验委托来源配置列表 + * + * @param pageReqVO 分页查询 + * @return 检验委托来源配置 + */ + List getConfigEntrustSourceList(@Valid ConfigEntrustSourceReqVO reqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigEntrustSourceServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigEntrustSourceServiceImpl.java new file mode 100644 index 0000000..0de4e8a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigEntrustSourceServiceImpl.java @@ -0,0 +1,96 @@ +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 jakarta.validation.Valid; + +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.ConfigEntrustSourceDO; +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.ConfigEntrustSourceMapper; + +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_ENTRUST_SOURCE_NOT_EXISTS; + +/** + * 检验委托来源配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigEntrustSourceServiceImpl implements ConfigEntrustSourceService { + + @Resource + private ConfigEntrustSourceMapper configEntrustSourceMapper; + + @Override + public ConfigEntrustSourceRespVO createConfigEntrustSource(ConfigEntrustSourceSaveReqVO createReqVO) { + // 插入 + ConfigEntrustSourceDO configEntrustSource = BeanUtils.toBean(createReqVO, ConfigEntrustSourceDO.class); + configEntrustSourceMapper.insert(configEntrustSource); + // 返回 + return BeanUtils.toBean(configEntrustSource, ConfigEntrustSourceRespVO.class); + } + + @Override + public void updateConfigEntrustSource(ConfigEntrustSourceSaveReqVO updateReqVO) { + // 校验存在 + validateConfigEntrustSourceExists(updateReqVO.getId()); + // 更新 + ConfigEntrustSourceDO updateObj = BeanUtils.toBean(updateReqVO, ConfigEntrustSourceDO.class); + configEntrustSourceMapper.updateById(updateObj); + } + + @Override + public void deleteConfigEntrustSource(Long id) { + // 校验存在 + validateConfigEntrustSourceExists(id); + // 删除 + configEntrustSourceMapper.deleteById(id); + } + + @Override + public void deleteConfigEntrustSourceListByIds(List ids) { + // 校验存在 + validateConfigEntrustSourceExists(ids); + // 删除 + configEntrustSourceMapper.deleteByIds(ids); + } + + private void validateConfigEntrustSourceExists(List ids) { + List list = configEntrustSourceMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_ENTRUST_SOURCE_NOT_EXISTS); + } + } + + private void validateConfigEntrustSourceExists(Long id) { + if (configEntrustSourceMapper.selectById(id) == null) { + throw exception(CONFIG_ENTRUST_SOURCE_NOT_EXISTS); + } + } + + @Override + public ConfigEntrustSourceDO getConfigEntrustSource(Long id) { + return configEntrustSourceMapper.selectById(id); + } + + @Override + public PageResult getConfigEntrustSourcePage(ConfigEntrustSourcePageReqVO pageReqVO) { + return configEntrustSourceMapper.selectPage(pageReqVO); + } + + @Override + public List getConfigEntrustSourceList(@Valid ConfigEntrustSourceReqVO reqVO) { + return configEntrustSourceMapper.selectList(reqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigProjectService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigProjectService.java new file mode 100644 index 0000000..52481cd --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigProjectService.java @@ -0,0 +1,62 @@ +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.ConfigProjectDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 检测项目配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigProjectService { + + /** + * 创建检测项目配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigProjectRespVO createConfigProject(@Valid ConfigProjectSaveReqVO createReqVO); + + /** + * 更新检测项目配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigProject(@Valid ConfigProjectSaveReqVO updateReqVO); + + /** + * 删除检测项目配置 + * + * @param id 编号 + */ + void deleteConfigProject(Long id); + + /** + * 批量删除检测项目配置 + * + * @param ids 编号 + */ + void deleteConfigProjectListByIds(List ids); + + /** + * 获得检测项目配置 + * + * @param id 编号 + * @return 检测项目配置 + */ + ConfigProjectDO getConfigProject(Long id); + + /** + * 获得检测项目配置分页 + * + * @param pageReqVO 分页查询 + * @return 检测项目配置分页 + */ + PageResult getConfigProjectPage(ConfigProjectPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigProjectServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigProjectServiceImpl.java new file mode 100644 index 0000000..77bd29f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigProjectServiceImpl.java @@ -0,0 +1,89 @@ +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.ConfigProjectDO; +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.ConfigProjectMapper; + +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_PROJECT_NOT_EXISTS; + +/** + * 检测项目配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigProjectServiceImpl implements ConfigProjectService { + + @Resource + private ConfigProjectMapper configProjectMapper; + + @Override + public ConfigProjectRespVO createConfigProject(ConfigProjectSaveReqVO createReqVO) { + // 插入 + ConfigProjectDO configProject = BeanUtils.toBean(createReqVO, ConfigProjectDO.class); + configProjectMapper.insert(configProject); + // 返回 + return BeanUtils.toBean(configProject, ConfigProjectRespVO.class); + } + + @Override + public void updateConfigProject(ConfigProjectSaveReqVO updateReqVO) { + // 校验存在 + validateConfigProjectExists(updateReqVO.getId()); + // 更新 + ConfigProjectDO updateObj = BeanUtils.toBean(updateReqVO, ConfigProjectDO.class); + configProjectMapper.updateById(updateObj); + } + + @Override + public void deleteConfigProject(Long id) { + // 校验存在 + validateConfigProjectExists(id); + // 删除 + configProjectMapper.deleteById(id); + } + + @Override + public void deleteConfigProjectListByIds(List ids) { + // 校验存在 + validateConfigProjectExists(ids); + // 删除 + configProjectMapper.deleteByIds(ids); + } + + private void validateConfigProjectExists(List ids) { + List list = configProjectMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_PROJECT_NOT_EXISTS); + } + } + + private void validateConfigProjectExists(Long id) { + if (configProjectMapper.selectById(id) == null) { + throw exception(CONFIG_PROJECT_NOT_EXISTS); + } + } + + @Override + public ConfigProjectDO getConfigProject(Long id) { + return configProjectMapper.selectById(id); + } + + @Override + public PageResult getConfigProjectPage(ConfigProjectPageReqVO pageReqVO) { + return configProjectMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportFieldService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportFieldService.java new file mode 100644 index 0000000..0b743b1 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportFieldService.java @@ -0,0 +1,62 @@ +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.ConfigReportFieldDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 报表字段配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigReportFieldService { + + /** + * 创建报表字段配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigReportFieldRespVO createConfigReportField(@Valid ConfigReportFieldSaveReqVO createReqVO); + + /** + * 更新报表字段配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigReportField(@Valid ConfigReportFieldSaveReqVO updateReqVO); + + /** + * 删除报表字段配置 + * + * @param id 编号 + */ + void deleteConfigReportField(Long id); + + /** + * 批量删除报表字段配置 + * + * @param ids 编号 + */ + void deleteConfigReportFieldListByIds(List ids); + + /** + * 获得报表字段配置 + * + * @param id 编号 + * @return 报表字段配置 + */ + ConfigReportFieldDO getConfigReportField(Long id); + + /** + * 获得报表字段配置分页 + * + * @param pageReqVO 分页查询 + * @return 报表字段配置分页 + */ + PageResult getConfigReportFieldPage(ConfigReportFieldPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportFieldServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportFieldServiceImpl.java new file mode 100644 index 0000000..dff9c6d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportFieldServiceImpl.java @@ -0,0 +1,89 @@ +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.ConfigReportFieldDO; +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.ConfigReportFieldMapper; + +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_REPORT_FIELD_NOT_EXISTS; + +/** + * 报表字段配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigReportFieldServiceImpl implements ConfigReportFieldService { + + @Resource + private ConfigReportFieldMapper configReportFieldMapper; + + @Override + public ConfigReportFieldRespVO createConfigReportField(ConfigReportFieldSaveReqVO createReqVO) { + // 插入 + ConfigReportFieldDO configReportField = BeanUtils.toBean(createReqVO, ConfigReportFieldDO.class); + configReportFieldMapper.insert(configReportField); + // 返回 + return BeanUtils.toBean(configReportField, ConfigReportFieldRespVO.class); + } + + @Override + public void updateConfigReportField(ConfigReportFieldSaveReqVO updateReqVO) { + // 校验存在 + validateConfigReportFieldExists(updateReqVO.getId()); + // 更新 + ConfigReportFieldDO updateObj = BeanUtils.toBean(updateReqVO, ConfigReportFieldDO.class); + configReportFieldMapper.updateById(updateObj); + } + + @Override + public void deleteConfigReportField(Long id) { + // 校验存在 + validateConfigReportFieldExists(id); + // 删除 + configReportFieldMapper.deleteById(id); + } + + @Override + public void deleteConfigReportFieldListByIds(List ids) { + // 校验存在 + validateConfigReportFieldExists(ids); + // 删除 + configReportFieldMapper.deleteByIds(ids); + } + + private void validateConfigReportFieldExists(List ids) { + List list = configReportFieldMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_REPORT_FIELD_NOT_EXISTS); + } + } + + private void validateConfigReportFieldExists(Long id) { + if (configReportFieldMapper.selectById(id) == null) { + throw exception(CONFIG_REPORT_FIELD_NOT_EXISTS); + } + } + + @Override + public ConfigReportFieldDO getConfigReportField(Long id) { + return configReportFieldMapper.selectById(id); + } + + @Override + public PageResult getConfigReportFieldPage(ConfigReportFieldPageReqVO pageReqVO) { + return configReportFieldMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTemplateService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTemplateService.java new file mode 100644 index 0000000..c8abb43 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTemplateService.java @@ -0,0 +1,66 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; + +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 jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigReportTemplateDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 报表模版配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigReportTemplateService { + + /** + * 创建报表模版配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigReportTemplateRespVO createConfigReportTemplate(@Valid ConfigReportTemplateSaveReqVO createReqVO); + + /** + * 更新报表模版配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigReportTemplate(@Valid ConfigReportTemplateSaveReqVO updateReqVO); + + /** + * 删除报表模版配置 + * + * @param id 编号 + */ + void deleteConfigReportTemplate(Long id); + + /** + * 批量删除报表模版配置 + * + * @param ids 编号 + */ + void deleteConfigReportTemplateListByIds(List ids); + + /** + * 获得报表模版配置 + * + * @param id 编号 + * @return 报表模版配置 + */ + ConfigReportTemplateDO getConfigReportTemplate(Long id); + + /** + * 获得报表模版配置分页 + * + * @param pageReqVO 分页查询 + * @return 报表模版配置分页 + */ + PageResult getConfigReportTemplatePage(ConfigReportTemplatePageReqVO pageReqVO); + + ConfigReportTemplateDO getConfigReportTemplateByKey(String reportKey); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTemplateServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTemplateServiceImpl.java new file mode 100644 index 0000000..73cbdf8 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTemplateServiceImpl.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +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 org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import com.baomidou.mybatisplus.core.toolkit.Wrappers; + +import java.util.*; + +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigReportTemplateDO; +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.ConfigReportTemplateMapper; + +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.*; + +/** + * 报表模版配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigReportTemplateServiceImpl implements ConfigReportTemplateService { + + @Resource + private ConfigReportTemplateMapper configReportTemplateMapper; + + @Override + public ConfigReportTemplateRespVO createConfigReportTemplate(ConfigReportTemplateSaveReqVO createReqVO) { + // 插入 + ConfigReportTemplateDO configReportTemplate = BeanUtils.toBean(createReqVO, ConfigReportTemplateDO.class); + String content = configReportTemplate.getContent(); + if (content.startsWith("_WR_")) { + configReportTemplate.setIsAuthority(1); + } + + configReportTemplateMapper.insert(configReportTemplate); + // 返回 + return BeanUtils.toBean(configReportTemplate, ConfigReportTemplateRespVO.class); + } + + @Override + public void updateConfigReportTemplate(ConfigReportTemplateSaveReqVO updateReqVO) { + // 校验存在 + validateConfigReportTemplateExists(updateReqVO.getId()); + // 更新 + ConfigReportTemplateDO updateObj = BeanUtils.toBean(updateReqVO, ConfigReportTemplateDO.class); + String content = updateObj.getContent(); + if (content.startsWith("_WR_")) { + updateObj.setIsAuthority(1); + } + configReportTemplateMapper.updateById(updateObj); + } + + @Override + public void deleteConfigReportTemplate(Long id) { + // 校验存在 + validateConfigReportTemplateExists(id); + // 删除 + configReportTemplateMapper.deleteById(id); + } + + @Override + public void deleteConfigReportTemplateListByIds(List ids) { + // 校验存在 + validateConfigReportTemplateExists(ids); + // 删除 + configReportTemplateMapper.deleteByIds(ids); + } + + private void validateConfigReportTemplateExists(List ids) { + List list = configReportTemplateMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_REPORT_TEMPLATE_NOT_EXISTS); + } + } + + private void validateConfigReportTemplateExists(Long id) { + if (configReportTemplateMapper.selectById(id) == null) { + throw exception(CONFIG_REPORT_TEMPLATE_NOT_EXISTS); + } + } + + @Override + public ConfigReportTemplateDO getConfigReportTemplate(Long id) { + return configReportTemplateMapper.selectById(id); + } + + @Override + public PageResult getConfigReportTemplatePage(ConfigReportTemplatePageReqVO pageReqVO) { + return configReportTemplateMapper.selectPage(pageReqVO); + } + + @Override + public ConfigReportTemplateDO getConfigReportTemplateByKey(String reportKey) { + return configReportTemplateMapper.selectOne(Wrappers.query().lambda().eq(ConfigReportTemplateDO::getKey, reportKey)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTypeService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTypeService.java new file mode 100644 index 0000000..c3e8be1 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTypeService.java @@ -0,0 +1,62 @@ +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.ConfigReportTypeDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 报表类型配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigReportTypeService { + + /** + * 创建报表类型配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigReportTypeRespVO createConfigReportType(@Valid ConfigReportTypeSaveReqVO createReqVO); + + /** + * 更新报表类型配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigReportType(@Valid ConfigReportTypeSaveReqVO updateReqVO); + + /** + * 删除报表类型配置 + * + * @param id 编号 + */ + void deleteConfigReportType(Long id); + + /** + * 批量删除报表类型配置 + * + * @param ids 编号 + */ + void deleteConfigReportTypeListByIds(List ids); + + /** + * 获得报表类型配置 + * + * @param id 编号 + * @return 报表类型配置 + */ + ConfigReportTypeDO getConfigReportType(Long id); + + /** + * 获得报表类型配置分页 + * + * @param pageReqVO 分页查询 + * @return 报表类型配置分页 + */ + PageResult getConfigReportTypePage(ConfigReportTypePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTypeServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTypeServiceImpl.java new file mode 100644 index 0000000..22370f8 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigReportTypeServiceImpl.java @@ -0,0 +1,89 @@ +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.ConfigReportTypeDO; +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.ConfigReportTypeMapper; + +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_REPORT_TYPE_NOT_EXISTS; + +/** + * 报表类型配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigReportTypeServiceImpl implements ConfigReportTypeService { + + @Resource + private ConfigReportTypeMapper configReportTypeMapper; + + @Override + public ConfigReportTypeRespVO createConfigReportType(ConfigReportTypeSaveReqVO createReqVO) { + // 插入 + ConfigReportTypeDO configReportType = BeanUtils.toBean(createReqVO, ConfigReportTypeDO.class); + configReportTypeMapper.insert(configReportType); + // 返回 + return BeanUtils.toBean(configReportType, ConfigReportTypeRespVO.class); + } + + @Override + public void updateConfigReportType(ConfigReportTypeSaveReqVO updateReqVO) { + // 校验存在 + validateConfigReportTypeExists(updateReqVO.getId()); + // 更新 + ConfigReportTypeDO updateObj = BeanUtils.toBean(updateReqVO, ConfigReportTypeDO.class); + configReportTypeMapper.updateById(updateObj); + } + + @Override + public void deleteConfigReportType(Long id) { + // 校验存在 + validateConfigReportTypeExists(id); + // 删除 + configReportTypeMapper.deleteById(id); + } + + @Override + public void deleteConfigReportTypeListByIds(List ids) { + // 校验存在 + validateConfigReportTypeExists(ids); + // 删除 + configReportTypeMapper.deleteByIds(ids); + } + + private void validateConfigReportTypeExists(List ids) { + List list = configReportTypeMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_REPORT_TYPE_NOT_EXISTS); + } + } + + private void validateConfigReportTypeExists(Long id) { + if (configReportTypeMapper.selectById(id) == null) { + throw exception(CONFIG_REPORT_TYPE_NOT_EXISTS); + } + } + + @Override + public ConfigReportTypeDO getConfigReportType(Long id) { + return configReportTypeMapper.selectById(id); + } + + @Override + public PageResult getConfigReportTypePage(ConfigReportTypePageReqVO pageReqVO) { + return configReportTypeMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleFlowService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleFlowService.java new file mode 100644 index 0000000..c55e756 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleFlowService.java @@ -0,0 +1,64 @@ +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.ConfigSampleFlowDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 样品流程配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigSampleFlowService { + + /** + * 创建样品流程配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigSampleFlowRespVO createConfigSampleFlow(@Valid ConfigSampleFlowSaveReqVO createReqVO); + + /** + * 更新样品流程配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigSampleFlow(@Valid ConfigSampleFlowSaveReqVO updateReqVO); + + /** + * 删除样品流程配置 + * + * @param id 编号 + */ + void deleteConfigSampleFlow(Long id); + + /** + * 批量删除样品流程配置 + * + * @param ids 编号 + */ + void deleteConfigSampleFlowListByIds(List ids); + + /** + * 获得样品流程配置 + * + * @param id 编号 + * @return 样品流程配置 + */ + ConfigSampleFlowDO getConfigSampleFlow(Long id); + + /** + * 获得样品流程配置分页 + * + * @param pageReqVO 分页查询 + * @return 样品流程配置分页 + */ + PageResult getConfigSampleFlowPage(ConfigSampleFlowPageReqVO pageReqVO); + + ConfigSampleFlowDO getConfigSampleFlowByKey(String key); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleFlowServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleFlowServiceImpl.java new file mode 100644 index 0000000..de1e479 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleFlowServiceImpl.java @@ -0,0 +1,97 @@ +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 com.baomidou.mybatisplus.core.toolkit.Wrappers; + +import java.util.*; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +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.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigSampleFlowMapper; + +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_SAMPLE_FLOW_NOT_EXISTS; + +/** + * 样品流程配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigSampleFlowServiceImpl implements ConfigSampleFlowService { + + @Resource + private ConfigSampleFlowMapper configSampleFlowMapper; + + @Override + public ConfigSampleFlowRespVO createConfigSampleFlow(ConfigSampleFlowSaveReqVO createReqVO) { + // 插入 + ConfigSampleFlowDO configSampleFlow = BeanUtils.toBean(createReqVO, ConfigSampleFlowDO.class); + configSampleFlowMapper.insert(configSampleFlow); + // 返回 + return BeanUtils.toBean(configSampleFlow, ConfigSampleFlowRespVO.class); + } + + @Override + public void updateConfigSampleFlow(ConfigSampleFlowSaveReqVO updateReqVO) { + // 校验存在 + validateConfigSampleFlowExists(updateReqVO.getId()); + // 更新 + ConfigSampleFlowDO updateObj = BeanUtils.toBean(updateReqVO, ConfigSampleFlowDO.class); + configSampleFlowMapper.updateById(updateObj); + } + + @Override + public void deleteConfigSampleFlow(Long id) { + // 校验存在 + validateConfigSampleFlowExists(id); + // 删除 + configSampleFlowMapper.deleteById(id); + } + + @Override + public void deleteConfigSampleFlowListByIds(List ids) { + // 校验存在 + validateConfigSampleFlowExists(ids); + // 删除 + configSampleFlowMapper.deleteByIds(ids); + } + + private void validateConfigSampleFlowExists(List ids) { + List list = configSampleFlowMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_SAMPLE_FLOW_NOT_EXISTS); + } + } + + private void validateConfigSampleFlowExists(Long id) { + if (configSampleFlowMapper.selectById(id) == null) { + throw exception(CONFIG_SAMPLE_FLOW_NOT_EXISTS); + } + } + + @Override + public ConfigSampleFlowDO getConfigSampleFlow(Long id) { + return configSampleFlowMapper.selectById(id); + } + + @Override + public PageResult getConfigSampleFlowPage(ConfigSampleFlowPageReqVO pageReqVO) { + return configSampleFlowMapper.selectPage(pageReqVO); + } + + @Override + public ConfigSampleFlowDO getConfigSampleFlowByKey(String key) { + return configSampleFlowMapper.selectByKey(key); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleHandoverService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleHandoverService.java new file mode 100644 index 0000000..efb1b82 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleHandoverService.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSampleHandoverDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 样品交接配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigSampleHandoverService { + + /** + * 创建样品交接配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigSampleHandoverRespVO createConfigSampleHandover(@Valid ConfigSampleHandoverSaveReqVO createReqVO); + + /** + * 更新样品交接配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigSampleHandover(@Valid ConfigSampleHandoverSaveReqVO updateReqVO); + + /** + * 删除样品交接配置 + * + * @param id 编号 + */ + void deleteConfigSampleHandover(Long id); + + /** + * 批量删除样品交接配置 + * + * @param ids 编号 + */ + void deleteConfigSampleHandoverListByIds(List ids); + + /** + * 获得样品交接配置 + * + * @param id 编号 + * @return 样品交接配置 + */ + ConfigSampleHandoverDO getConfigSampleHandover(Long id); + + /** + * 获得样品交接配置分页 + * + * @param pageReqVO 分页查询 + * @return 样品交接配置分页 + */ + PageResult getConfigSampleHandoverPage(ConfigSampleHandoverPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleHandoverServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleHandoverServiceImpl.java new file mode 100644 index 0000000..57c264b --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleHandoverServiceImpl.java @@ -0,0 +1,91 @@ +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 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.config.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSampleHandoverDO; +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigSampleHandoverMapper; + +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 ConfigSampleHandoverServiceImpl implements ConfigSampleHandoverService { + + @Resource + private ConfigSampleHandoverMapper configSampleHandoverMapper; + + @Override + public ConfigSampleHandoverRespVO createConfigSampleHandover(ConfigSampleHandoverSaveReqVO createReqVO) { + // 插入 + ConfigSampleHandoverDO configSampleHandover = BeanUtils.toBean(createReqVO, ConfigSampleHandoverDO.class); + configSampleHandoverMapper.insert(configSampleHandover); + // 返回 + return BeanUtils.toBean(configSampleHandover, ConfigSampleHandoverRespVO.class); + } + + @Override + public void updateConfigSampleHandover(ConfigSampleHandoverSaveReqVO updateReqVO) { + // 校验存在 + validateConfigSampleHandoverExists(updateReqVO.getId()); + // 更新 + ConfigSampleHandoverDO updateObj = BeanUtils.toBean(updateReqVO, ConfigSampleHandoverDO.class); + configSampleHandoverMapper.updateById(updateObj); + } + + @Override + public void deleteConfigSampleHandover(Long id) { + // 校验存在 + validateConfigSampleHandoverExists(id); + // 删除 + configSampleHandoverMapper.deleteById(id); + } + + @Override + public void deleteConfigSampleHandoverListByIds(List ids) { + // 校验存在 + validateConfigSampleHandoverExists(ids); + // 删除 + configSampleHandoverMapper.deleteByIds(ids); + } + + private void validateConfigSampleHandoverExists(List ids) { + List list = configSampleHandoverMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_SAMPLE_HANDOVER_NOT_EXISTS); + } + } + + private void validateConfigSampleHandoverExists(Long id) { + if (configSampleHandoverMapper.selectById(id) == null) { + throw exception(CONFIG_SAMPLE_HANDOVER_NOT_EXISTS); + } + } + + @Override + public ConfigSampleHandoverDO getConfigSampleHandover(Long id) { + return configSampleHandoverMapper.selectById(id); + } + + @Override + public PageResult getConfigSampleHandoverPage(ConfigSampleHandoverPageReqVO pageReqVO) { + return configSampleHandoverMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleReportService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleReportService.java new file mode 100644 index 0000000..2c010b9 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleReportService.java @@ -0,0 +1,62 @@ +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.ConfigSampleReportDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 样品报表关系 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigSampleReportService { + + /** + * 创建样品报表关系 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigSampleReportRespVO createConfigSampleReport(@Valid ConfigSampleReportSaveReqVO createReqVO); + + /** + * 更新样品报表关系 + * + * @param updateReqVO 更新信息 + */ + void updateConfigSampleReport(@Valid ConfigSampleReportSaveReqVO updateReqVO); + + /** + * 删除样品报表关系 + * + * @param id 编号 + */ + void deleteConfigSampleReport(Long id); + + /** + * 批量删除样品报表关系 + * + * @param ids 编号 + */ + void deleteConfigSampleReportListByIds(List ids); + + /** + * 获得样品报表关系 + * + * @param id 编号 + * @return 样品报表关系 + */ + ConfigSampleReportDO getConfigSampleReport(Long id); + + /** + * 获得样品报表关系分页 + * + * @param pageReqVO 分页查询 + * @return 样品报表关系分页 + */ + PageResult getConfigSampleReportPage(ConfigSampleReportPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleReportServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleReportServiceImpl.java new file mode 100644 index 0000000..6ad3e18 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSampleReportServiceImpl.java @@ -0,0 +1,89 @@ +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.ConfigSampleReportDO; +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.ConfigSampleReportMapper; + +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_SAMPLE_REPORT_NOT_EXISTS; + +/** + * 样品报表关系 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigSampleReportServiceImpl implements ConfigSampleReportService { + + @Resource + private ConfigSampleReportMapper configSampleReportMapper; + + @Override + public ConfigSampleReportRespVO createConfigSampleReport(ConfigSampleReportSaveReqVO createReqVO) { + // 插入 + ConfigSampleReportDO configSampleReport = BeanUtils.toBean(createReqVO, ConfigSampleReportDO.class); + configSampleReportMapper.insert(configSampleReport); + // 返回 + return BeanUtils.toBean(configSampleReport, ConfigSampleReportRespVO.class); + } + + @Override + public void updateConfigSampleReport(ConfigSampleReportSaveReqVO updateReqVO) { + // 校验存在 + validateConfigSampleReportExists(updateReqVO.getId()); + // 更新 + ConfigSampleReportDO updateObj = BeanUtils.toBean(updateReqVO, ConfigSampleReportDO.class); + configSampleReportMapper.updateById(updateObj); + } + + @Override + public void deleteConfigSampleReport(Long id) { + // 校验存在 + validateConfigSampleReportExists(id); + // 删除 + configSampleReportMapper.deleteById(id); + } + + @Override + public void deleteConfigSampleReportListByIds(List ids) { + // 校验存在 + validateConfigSampleReportExists(ids); + // 删除 + configSampleReportMapper.deleteByIds(ids); + } + + private void validateConfigSampleReportExists(List ids) { + List list = configSampleReportMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_SAMPLE_REPORT_NOT_EXISTS); + } + } + + private void validateConfigSampleReportExists(Long id) { + if (configSampleReportMapper.selectById(id) == null) { + throw exception(CONFIG_SAMPLE_REPORT_NOT_EXISTS); + } + } + + @Override + public ConfigSampleReportDO getConfigSampleReport(Long id) { + return configSampleReportMapper.selectById(id); + } + + @Override + public PageResult getConfigSampleReportPage(ConfigSampleReportPageReqVO pageReqVO) { + return configSampleReportMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowCodeService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowCodeService.java new file mode 100644 index 0000000..21f701a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowCodeService.java @@ -0,0 +1,78 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodeReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodeRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodeSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowCodeDO; + +/** + * LiteFlow脚本配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigSimpleFlowCodeService { + + /** + * 创建LiteFlow脚本配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigSimpleFlowCodeRespVO createConfigSimpleFlowCode(@Valid ConfigSimpleFlowCodeSaveReqVO createReqVO); + + /** + * 更新LiteFlow脚本配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigSimpleFlowCode(@Valid ConfigSimpleFlowCodeSaveReqVO updateReqVO); + + /** + * 删除LiteFlow脚本配置 + * + * @param id 编号 + */ + void deleteConfigSimpleFlowCode(Long id); + + /** + * 批量删除LiteFlow脚本配置 + * + * @param ids 编号 + */ + void deleteConfigSimpleFlowCodeListByIds(List ids); + + /** + * 获得LiteFlow脚本配置 + * + * @param id 编号 + * @return LiteFlow脚本配置 + */ + ConfigSimpleFlowCodeDO getConfigSimpleFlowCode(Long id); + + /** + * 获得LiteFlow脚本配置分页 + * + * @param pageReqVO 分页查询 + * @return LiteFlow脚本配置分页 + */ + PageResult getConfigSimpleFlowCodePage(ConfigSimpleFlowCodePageReqVO pageReqVO); + + /** + * 获取LiteFlow脚本配置列表 + * @return + */ + List getConfigSimpleFlowCodeList(); + + /** + * 获得LiteFlow脚本配置列表 + * + * @param reqVO 查询 + * @return LiteFlow脚本配置列表 + */ + List getConfigSimpleFlowCodeList(ConfigSimpleFlowCodeReqVO reqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowCodeServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowCodeServiceImpl.java new file mode 100644 index 0000000..4cf2e0e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowCodeServiceImpl.java @@ -0,0 +1,116 @@ +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 com.baomidou.mybatisplus.core.toolkit.IdWorker; + +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.framework.mq.redis.core.RedisMQTemplate; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodeReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodeRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowCodeSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowCodeDO; +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigSimpleFlowCodeMapper; +import cn.iocoder.yudao.module.qms.core.liteflow.handler.RedisLiteFlowMessage; + +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.*; + +/** + * LiteFlow脚本配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigSimpleFlowCodeServiceImpl implements ConfigSimpleFlowCodeService { + + @Resource + private RedisMQTemplate redisMQTemplate; + + @Resource + private ConfigSimpleFlowCodeMapper configSimpleFlowCodeMapper; + + @Override + public ConfigSimpleFlowCodeRespVO createConfigSimpleFlowCode(ConfigSimpleFlowCodeSaveReqVO createReqVO) { + // 插入 + ConfigSimpleFlowCodeDO configSimpleFlowCode = BeanUtils.toBean(createReqVO, ConfigSimpleFlowCodeDO.class); + configSimpleFlowCodeMapper.insert(configSimpleFlowCode); + redisMQTemplate.send(new RedisLiteFlowMessage().setId(IdWorker.getId())); + // 返回 + return BeanUtils.toBean(configSimpleFlowCode, ConfigSimpleFlowCodeRespVO.class); + } + + @Override + public void updateConfigSimpleFlowCode(ConfigSimpleFlowCodeSaveReqVO updateReqVO) { + // 校验存在 + validateConfigSimpleFlowCodeExists(updateReqVO.getId()); + // 更新 + ConfigSimpleFlowCodeDO updateObj = BeanUtils.toBean(updateReqVO, ConfigSimpleFlowCodeDO.class); + configSimpleFlowCodeMapper.updateById(updateObj); + redisMQTemplate.send(new RedisLiteFlowMessage().setId(IdWorker.getId())); + } + + @Override + public void deleteConfigSimpleFlowCode(Long id) { + // 校验存在 + validateConfigSimpleFlowCodeExists(id); + // 删除 + configSimpleFlowCodeMapper.deleteById(id); + redisMQTemplate.send(new RedisLiteFlowMessage().setId(IdWorker.getId())); + } + + @Override + public void deleteConfigSimpleFlowCodeListByIds(List ids) { + // 校验存在 + validateConfigSimpleFlowCodeExists(ids); + // 删除 + configSimpleFlowCodeMapper.deleteByIds(ids); + redisMQTemplate.send(new RedisLiteFlowMessage().setId(IdWorker.getId())); + } + + private void validateConfigSimpleFlowCodeExists(List ids) { + List list = configSimpleFlowCodeMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_SIMPLE_FLOW_CODE_NOT_EXISTS); + } + } + + private void validateConfigSimpleFlowCodeExists(Long id) { + if (configSimpleFlowCodeMapper.selectById(id) == null) { + throw exception(CONFIG_SIMPLE_FLOW_CODE_NOT_EXISTS); + } + } + + @Override + public ConfigSimpleFlowCodeDO getConfigSimpleFlowCode(Long id) { + return configSimpleFlowCodeMapper.selectById(id); + } + + @Override + public PageResult getConfigSimpleFlowCodePage(ConfigSimpleFlowCodePageReqVO pageReqVO) { + return configSimpleFlowCodeMapper.selectPage(pageReqVO); + } + + @Override + public List getConfigSimpleFlowCodeList() { + return configSimpleFlowCodeMapper.selectList(); + } + + @Override + public List getConfigSimpleFlowCodeList(ConfigSimpleFlowCodeReqVO reqVO) { + return configSimpleFlowCodeMapper.selectList(reqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowRuleService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowRuleService.java new file mode 100644 index 0000000..137bef2 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowRuleService.java @@ -0,0 +1,78 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; +import jakarta.validation.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRulePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRuleReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRuleRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRuleSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowRuleDO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * LiteFlow规则配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigSimpleFlowRuleService { + + /** + * 创建LiteFlow规则配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigSimpleFlowRuleRespVO createConfigSimpleFlowRule(@Valid ConfigSimpleFlowRuleSaveReqVO createReqVO); + + /** + * 更新LiteFlow规则配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigSimpleFlowRule(@Valid ConfigSimpleFlowRuleSaveReqVO updateReqVO); + + /** + * 删除LiteFlow规则配置 + * + * @param id 编号 + */ + void deleteConfigSimpleFlowRule(Long id); + + /** + * 批量删除LiteFlow规则配置 + * + * @param ids 编号 + */ + void deleteConfigSimpleFlowRuleListByIds(List ids); + + /** + * 获得LiteFlow规则配置 + * + * @param id 编号 + * @return LiteFlow规则配置 + */ + ConfigSimpleFlowRuleDO getConfigSimpleFlowRule(Long id); + + /** + * 获得LiteFlow规则配置分页 + * + * @param pageReqVO 分页查询 + * @return LiteFlow规则配置分页 + */ + PageResult getConfigSimpleFlowRulePage(ConfigSimpleFlowRulePageReqVO pageReqVO); + + /** + * 获得LiteFlow规则配置 列表 + * @return 获得LiteFlow规则配置 列表 + */ + List getConfigSimpleFlowRuleList(); + + /** + * 获得LiteFlow规则配置 列表 + * @param reqVO 列表查询 + * @return LiteFlow规则配置列表 + */ + List getConfigSimpleFlowRuleList(ConfigSimpleFlowRuleReqVO reqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowRuleServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowRuleServiceImpl.java new file mode 100644 index 0000000..afc23e5 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSimpleFlowRuleServiceImpl.java @@ -0,0 +1,117 @@ +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 com.baomidou.mybatisplus.core.toolkit.IdWorker; + +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.framework.mq.redis.core.RedisMQTemplate; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRulePageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRuleReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRuleRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.ConfigSimpleFlowRuleSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowRuleDO; +import cn.iocoder.yudao.module.qms.business.config.dal.mapper.ConfigSimpleFlowRuleMapper; +import cn.iocoder.yudao.module.qms.core.liteflow.handler.RedisLiteFlowMessage; + +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.*; + +/** + * LiteFlow规则配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigSimpleFlowRuleServiceImpl implements ConfigSimpleFlowRuleService { + + @Resource + private RedisMQTemplate redisMQTemplate; + + @Resource + private ConfigSimpleFlowRuleMapper configSimpleFlowRuleMapper; + + @Override + public ConfigSimpleFlowRuleRespVO createConfigSimpleFlowRule(ConfigSimpleFlowRuleSaveReqVO createReqVO) { + // 插入 + ConfigSimpleFlowRuleDO configSimpleFlowRule = BeanUtils.toBean(createReqVO, ConfigSimpleFlowRuleDO.class); + configSimpleFlowRuleMapper.insert(configSimpleFlowRule); + redisMQTemplate.send(new RedisLiteFlowMessage().setId(IdWorker.getId())); + // 返回 + return BeanUtils.toBean(configSimpleFlowRule, ConfigSimpleFlowRuleRespVO.class); + } + + @Override + public void updateConfigSimpleFlowRule(ConfigSimpleFlowRuleSaveReqVO updateReqVO) { + // 校验存在 + validateConfigSimpleFlowRuleExists(updateReqVO.getId()); + // 更新 + ConfigSimpleFlowRuleDO updateObj = BeanUtils.toBean(updateReqVO, ConfigSimpleFlowRuleDO.class); + configSimpleFlowRuleMapper.updateById(updateObj); + redisMQTemplate.send(new RedisLiteFlowMessage().setId(IdWorker.getId())); + } + + @Override + public void deleteConfigSimpleFlowRule(Long id) { + // 校验存在 + validateConfigSimpleFlowRuleExists(id); + // 删除 + configSimpleFlowRuleMapper.deleteById(id); + redisMQTemplate.send(new RedisLiteFlowMessage().setId(IdWorker.getId())); + } + + @Override + public void deleteConfigSimpleFlowRuleListByIds(List ids) { + // 校验存在 + validateConfigSimpleFlowRuleExists(ids); + // 删除 + configSimpleFlowRuleMapper.deleteByIds(ids); + + redisMQTemplate.send(new RedisLiteFlowMessage().setId(IdWorker.getId())); + } + + private void validateConfigSimpleFlowRuleExists(List ids) { + List list = configSimpleFlowRuleMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_SIMPLE_FLOW_RULE_NOT_EXISTS); + } + } + + private void validateConfigSimpleFlowRuleExists(Long id) { + if (configSimpleFlowRuleMapper.selectById(id) == null) { + throw exception(CONFIG_SIMPLE_FLOW_RULE_NOT_EXISTS); + } + } + + @Override + public ConfigSimpleFlowRuleDO getConfigSimpleFlowRule(Long id) { + return configSimpleFlowRuleMapper.selectById(id); + } + + @Override + public PageResult getConfigSimpleFlowRulePage(ConfigSimpleFlowRulePageReqVO pageReqVO) { + return configSimpleFlowRuleMapper.selectPage(pageReqVO); + } + + @Override + public List getConfigSimpleFlowRuleList() { + return configSimpleFlowRuleMapper.selectList(); + } + + @Override + public List getConfigSimpleFlowRuleList(ConfigSimpleFlowRuleReqVO reqVO) { + return configSimpleFlowRuleMapper.selectList(reqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleProjectService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleProjectService.java new file mode 100644 index 0000000..4272d26 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleProjectService.java @@ -0,0 +1,62 @@ +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.ConfigStandardSampleProjectDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 标准样检测项目配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigStandardSampleProjectService { + + /** + * 创建标准样检测项目配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigStandardSampleProjectRespVO createConfigStandardSampleProject(@Valid ConfigStandardSampleProjectSaveReqVO createReqVO); + + /** + * 更新标准样检测项目配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigStandardSampleProject(@Valid ConfigStandardSampleProjectSaveReqVO updateReqVO); + + /** + * 删除标准样检测项目配置 + * + * @param id 编号 + */ + void deleteConfigStandardSampleProject(Long id); + + /** + * 批量删除标准样检测项目配置 + * + * @param ids 编号 + */ + void deleteConfigStandardSampleProjectListByIds(List ids); + + /** + * 获得标准样检测项目配置 + * + * @param id 编号 + * @return 标准样检测项目配置 + */ + ConfigStandardSampleProjectDO getConfigStandardSampleProject(Long id); + + /** + * 获得标准样检测项目配置分页 + * + * @param pageReqVO 分页查询 + * @return 标准样检测项目配置分页 + */ + PageResult getConfigStandardSampleProjectPage(ConfigStandardSampleProjectPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleProjectServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleProjectServiceImpl.java new file mode 100644 index 0000000..1105aad --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleProjectServiceImpl.java @@ -0,0 +1,89 @@ +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.ConfigStandardSampleProjectDO; +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.ConfigStandardSampleProjectMapper; + +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_STANDARD_SAMPLE_PROJECT_NOT_EXISTS; + +/** + * 标准样检测项目配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigStandardSampleProjectServiceImpl implements ConfigStandardSampleProjectService { + + @Resource + private ConfigStandardSampleProjectMapper configStandardSampleProjectMapper; + + @Override + public ConfigStandardSampleProjectRespVO createConfigStandardSampleProject(ConfigStandardSampleProjectSaveReqVO createReqVO) { + // 插入 + ConfigStandardSampleProjectDO configStandardSampleProject = BeanUtils.toBean(createReqVO, ConfigStandardSampleProjectDO.class); + configStandardSampleProjectMapper.insert(configStandardSampleProject); + // 返回 + return BeanUtils.toBean(configStandardSampleProject, ConfigStandardSampleProjectRespVO.class); + } + + @Override + public void updateConfigStandardSampleProject(ConfigStandardSampleProjectSaveReqVO updateReqVO) { + // 校验存在 + validateConfigStandardSampleProjectExists(updateReqVO.getId()); + // 更新 + ConfigStandardSampleProjectDO updateObj = BeanUtils.toBean(updateReqVO, ConfigStandardSampleProjectDO.class); + configStandardSampleProjectMapper.updateById(updateObj); + } + + @Override + public void deleteConfigStandardSampleProject(Long id) { + // 校验存在 + validateConfigStandardSampleProjectExists(id); + // 删除 + configStandardSampleProjectMapper.deleteById(id); + } + + @Override + public void deleteConfigStandardSampleProjectListByIds(List ids) { + // 校验存在 + validateConfigStandardSampleProjectExists(ids); + // 删除 + configStandardSampleProjectMapper.deleteByIds(ids); + } + + private void validateConfigStandardSampleProjectExists(List ids) { + List list = configStandardSampleProjectMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_STANDARD_SAMPLE_PROJECT_NOT_EXISTS); + } + } + + private void validateConfigStandardSampleProjectExists(Long id) { + if (configStandardSampleProjectMapper.selectById(id) == null) { + throw exception(CONFIG_STANDARD_SAMPLE_PROJECT_NOT_EXISTS); + } + } + + @Override + public ConfigStandardSampleProjectDO getConfigStandardSampleProject(Long id) { + return configStandardSampleProjectMapper.selectById(id); + } + + @Override + public PageResult getConfigStandardSampleProjectPage(ConfigStandardSampleProjectPageReqVO pageReqVO) { + return configStandardSampleProjectMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleTypeService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleTypeService.java new file mode 100644 index 0000000..826551d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleTypeService.java @@ -0,0 +1,62 @@ +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.ConfigStandardSampleTypeDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 标准样类型配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigStandardSampleTypeService { + + /** + * 创建标准样类型配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigStandardSampleTypeRespVO createConfigStandardSampleType(@Valid ConfigStandardSampleTypeSaveReqVO createReqVO); + + /** + * 更新标准样类型配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigStandardSampleType(@Valid ConfigStandardSampleTypeSaveReqVO updateReqVO); + + /** + * 删除标准样类型配置 + * + * @param id 编号 + */ + void deleteConfigStandardSampleType(Long id); + + /** + * 批量删除标准样类型配置 + * + * @param ids 编号 + */ + void deleteConfigStandardSampleTypeListByIds(List ids); + + /** + * 获得标准样类型配置 + * + * @param id 编号 + * @return 标准样类型配置 + */ + ConfigStandardSampleTypeDO getConfigStandardSampleType(Long id); + + /** + * 获得标准样类型配置分页 + * + * @param pageReqVO 分页查询 + * @return 标准样类型配置分页 + */ + PageResult getConfigStandardSampleTypePage(ConfigStandardSampleTypePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleTypeServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleTypeServiceImpl.java new file mode 100644 index 0000000..d82300d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigStandardSampleTypeServiceImpl.java @@ -0,0 +1,89 @@ +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.ConfigStandardSampleTypeDO; +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.ConfigStandardSampleTypeMapper; + +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_STANDARD_SAMPLE_TYPE_NOT_EXISTS; + +/** + * 标准样类型配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigStandardSampleTypeServiceImpl implements ConfigStandardSampleTypeService { + + @Resource + private ConfigStandardSampleTypeMapper configStandardSampleTypeMapper; + + @Override + public ConfigStandardSampleTypeRespVO createConfigStandardSampleType(ConfigStandardSampleTypeSaveReqVO createReqVO) { + // 插入 + ConfigStandardSampleTypeDO configStandardSampleType = BeanUtils.toBean(createReqVO, ConfigStandardSampleTypeDO.class); + configStandardSampleTypeMapper.insert(configStandardSampleType); + // 返回 + return BeanUtils.toBean(configStandardSampleType, ConfigStandardSampleTypeRespVO.class); + } + + @Override + public void updateConfigStandardSampleType(ConfigStandardSampleTypeSaveReqVO updateReqVO) { + // 校验存在 + validateConfigStandardSampleTypeExists(updateReqVO.getId()); + // 更新 + ConfigStandardSampleTypeDO updateObj = BeanUtils.toBean(updateReqVO, ConfigStandardSampleTypeDO.class); + configStandardSampleTypeMapper.updateById(updateObj); + } + + @Override + public void deleteConfigStandardSampleType(Long id) { + // 校验存在 + validateConfigStandardSampleTypeExists(id); + // 删除 + configStandardSampleTypeMapper.deleteById(id); + } + + @Override + public void deleteConfigStandardSampleTypeListByIds(List ids) { + // 校验存在 + validateConfigStandardSampleTypeExists(ids); + // 删除 + configStandardSampleTypeMapper.deleteByIds(ids); + } + + private void validateConfigStandardSampleTypeExists(List ids) { + List list = configStandardSampleTypeMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_STANDARD_SAMPLE_TYPE_NOT_EXISTS); + } + } + + private void validateConfigStandardSampleTypeExists(Long id) { + if (configStandardSampleTypeMapper.selectById(id) == null) { + throw exception(CONFIG_STANDARD_SAMPLE_TYPE_NOT_EXISTS); + } + } + + @Override + public ConfigStandardSampleTypeDO getConfigStandardSampleType(Long id) { + return configStandardSampleTypeMapper.selectById(id); + } + + @Override + public PageResult getConfigStandardSampleTypePage(ConfigStandardSampleTypePageReqVO pageReqVO) { + return configStandardSampleTypeMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleMethodService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleMethodService.java new file mode 100644 index 0000000..4162801 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleMethodService.java @@ -0,0 +1,62 @@ +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 ids); + + /** + * 获得子样与检测方法配置 + * + * @param id 编号 + * @return 子样与检测方法配置 + */ + ConfigSubSampleMethodDO getConfigSubSampleMethod(Long id); + + /** + * 获得子样与检测方法配置分页 + * + * @param pageReqVO 分页查询 + * @return 子样与检测方法配置分页 + */ + PageResult getConfigSubSampleMethodPage(ConfigSubSampleMethodPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleMethodServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleMethodServiceImpl.java new file mode 100644 index 0000000..ed4274a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleMethodServiceImpl.java @@ -0,0 +1,89 @@ +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.ConfigSubSampleMethodDO; +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.ConfigSubSampleMethodMapper; + +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_SUB_SAMPLE_METHOD_NOT_EXISTS; + +/** + * 子样与检测方法配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigSubSampleMethodServiceImpl implements ConfigSubSampleMethodService { + + @Resource + private ConfigSubSampleMethodMapper configSubSampleMethodMapper; + + @Override + public ConfigSubSampleMethodRespVO createConfigSubSampleMethod(ConfigSubSampleMethodSaveReqVO createReqVO) { + // 插入 + ConfigSubSampleMethodDO configSubSampleMethod = BeanUtils.toBean(createReqVO, ConfigSubSampleMethodDO.class); + configSubSampleMethodMapper.insert(configSubSampleMethod); + // 返回 + return BeanUtils.toBean(configSubSampleMethod, ConfigSubSampleMethodRespVO.class); + } + + @Override + public void updateConfigSubSampleMethod(ConfigSubSampleMethodSaveReqVO updateReqVO) { + // 校验存在 + validateConfigSubSampleMethodExists(updateReqVO.getId()); + // 更新 + ConfigSubSampleMethodDO updateObj = BeanUtils.toBean(updateReqVO, ConfigSubSampleMethodDO.class); + configSubSampleMethodMapper.updateById(updateObj); + } + + @Override + public void deleteConfigSubSampleMethod(Long id) { + // 校验存在 + validateConfigSubSampleMethodExists(id); + // 删除 + configSubSampleMethodMapper.deleteById(id); + } + + @Override + public void deleteConfigSubSampleMethodListByIds(List ids) { + // 校验存在 + validateConfigSubSampleMethodExists(ids); + // 删除 + configSubSampleMethodMapper.deleteByIds(ids); + } + + private void validateConfigSubSampleMethodExists(List ids) { + List list = configSubSampleMethodMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_SUB_SAMPLE_METHOD_NOT_EXISTS); + } + } + + private void validateConfigSubSampleMethodExists(Long id) { + if (configSubSampleMethodMapper.selectById(id) == null) { + throw exception(CONFIG_SUB_SAMPLE_METHOD_NOT_EXISTS); + } + } + + @Override + public ConfigSubSampleMethodDO getConfigSubSampleMethod(Long id) { + return configSubSampleMethodMapper.selectById(id); + } + + @Override + public PageResult getConfigSubSampleMethodPage(ConfigSubSampleMethodPageReqVO pageReqVO) { + return configSubSampleMethodMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleParentService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleParentService.java new file mode 100644 index 0000000..43a5fc5 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleParentService.java @@ -0,0 +1,62 @@ +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.ConfigSubSampleParentDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 分样配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigSubSampleParentService { + + /** + * 创建分样配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigSubSampleParentRespVO createConfigSubSampleParent(@Valid ConfigSubSampleParentSaveReqVO createReqVO); + + /** + * 更新分样配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigSubSampleParent(@Valid ConfigSubSampleParentSaveReqVO updateReqVO); + + /** + * 删除分样配置 + * + * @param id 编号 + */ + void deleteConfigSubSampleParent(Long id); + + /** + * 批量删除分样配置 + * + * @param ids 编号 + */ + void deleteConfigSubSampleParentListByIds(List ids); + + /** + * 获得分样配置 + * + * @param id 编号 + * @return 分样配置 + */ + ConfigSubSampleParentDO getConfigSubSampleParent(Long id); + + /** + * 获得分样配置分页 + * + * @param pageReqVO 分页查询 + * @return 分样配置分页 + */ + PageResult getConfigSubSampleParentPage(ConfigSubSampleParentPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleParentServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleParentServiceImpl.java new file mode 100644 index 0000000..688e18d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleParentServiceImpl.java @@ -0,0 +1,89 @@ +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.ConfigSubSampleParentDO; +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.ConfigSubSampleParentMapper; + +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_SUB_SAMPLE_PARENT_NOT_EXISTS; + +/** + * 分样配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigSubSampleParentServiceImpl implements ConfigSubSampleParentService { + + @Resource + private ConfigSubSampleParentMapper configSubSampleParentMapper; + + @Override + public ConfigSubSampleParentRespVO createConfigSubSampleParent(ConfigSubSampleParentSaveReqVO createReqVO) { + // 插入 + ConfigSubSampleParentDO configSubSampleParent = BeanUtils.toBean(createReqVO, ConfigSubSampleParentDO.class); + configSubSampleParentMapper.insert(configSubSampleParent); + // 返回 + return BeanUtils.toBean(configSubSampleParent, ConfigSubSampleParentRespVO.class); + } + + @Override + public void updateConfigSubSampleParent(ConfigSubSampleParentSaveReqVO updateReqVO) { + // 校验存在 + validateConfigSubSampleParentExists(updateReqVO.getId()); + // 更新 + ConfigSubSampleParentDO updateObj = BeanUtils.toBean(updateReqVO, ConfigSubSampleParentDO.class); + configSubSampleParentMapper.updateById(updateObj); + } + + @Override + public void deleteConfigSubSampleParent(Long id) { + // 校验存在 + validateConfigSubSampleParentExists(id); + // 删除 + configSubSampleParentMapper.deleteById(id); + } + + @Override + public void deleteConfigSubSampleParentListByIds(List ids) { + // 校验存在 + validateConfigSubSampleParentExists(ids); + // 删除 + configSubSampleParentMapper.deleteByIds(ids); + } + + private void validateConfigSubSampleParentExists(List ids) { + List list = configSubSampleParentMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_SUB_SAMPLE_PARENT_NOT_EXISTS); + } + } + + private void validateConfigSubSampleParentExists(Long id) { + if (configSubSampleParentMapper.selectById(id) == null) { + throw exception(CONFIG_SUB_SAMPLE_PARENT_NOT_EXISTS); + } + } + + @Override + public ConfigSubSampleParentDO getConfigSubSampleParent(Long id) { + return configSubSampleParentMapper.selectById(id); + } + + @Override + public PageResult getConfigSubSampleParentPage(ConfigSubSampleParentPageReqVO pageReqVO) { + return configSubSampleParentMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleService.java new file mode 100644 index 0000000..9c751f6 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleService.java @@ -0,0 +1,62 @@ +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.ConfigSubSampleDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +/** + * 子样配置 Service 接口 + * + * @author 后台管理 + */ +public interface ConfigSubSampleService { + + /** + * 创建子样配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ConfigSubSampleRespVO createConfigSubSample(@Valid ConfigSubSampleSaveReqVO createReqVO); + + /** + * 更新子样配置 + * + * @param updateReqVO 更新信息 + */ + void updateConfigSubSample(@Valid ConfigSubSampleSaveReqVO updateReqVO); + + /** + * 删除子样配置 + * + * @param id 编号 + */ + void deleteConfigSubSample(Long id); + + /** + * 批量删除子样配置 + * + * @param ids 编号 + */ + void deleteConfigSubSampleListByIds(List ids); + + /** + * 获得子样配置 + * + * @param id 编号 + * @return 子样配置 + */ + ConfigSubSampleDO getConfigSubSample(Long id); + + /** + * 获得子样配置分页 + * + * @param pageReqVO 分页查询 + * @return 子样配置分页 + */ + PageResult getConfigSubSamplePage(ConfigSubSamplePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleServiceImpl.java new file mode 100644 index 0000000..8d89c92 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigSubSampleServiceImpl.java @@ -0,0 +1,89 @@ +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.ConfigSubSampleDO; +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.ConfigSubSampleMapper; + +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_SUB_SAMPLE_NOT_EXISTS; + +/** + * 子样配置 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ConfigSubSampleServiceImpl implements ConfigSubSampleService { + + @Resource + private ConfigSubSampleMapper configSubSampleMapper; + + @Override + public ConfigSubSampleRespVO createConfigSubSample(ConfigSubSampleSaveReqVO createReqVO) { + // 插入 + ConfigSubSampleDO configSubSample = BeanUtils.toBean(createReqVO, ConfigSubSampleDO.class); + configSubSampleMapper.insert(configSubSample); + // 返回 + return BeanUtils.toBean(configSubSample, ConfigSubSampleRespVO.class); + } + + @Override + public void updateConfigSubSample(ConfigSubSampleSaveReqVO updateReqVO) { + // 校验存在 + validateConfigSubSampleExists(updateReqVO.getId()); + // 更新 + ConfigSubSampleDO updateObj = BeanUtils.toBean(updateReqVO, ConfigSubSampleDO.class); + configSubSampleMapper.updateById(updateObj); + } + + @Override + public void deleteConfigSubSample(Long id) { + // 校验存在 + validateConfigSubSampleExists(id); + // 删除 + configSubSampleMapper.deleteById(id); + } + + @Override + public void deleteConfigSubSampleListByIds(List ids) { + // 校验存在 + validateConfigSubSampleExists(ids); + // 删除 + configSubSampleMapper.deleteByIds(ids); + } + + private void validateConfigSubSampleExists(List ids) { + List list = configSubSampleMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(CONFIG_SUB_SAMPLE_NOT_EXISTS); + } + } + + private void validateConfigSubSampleExists(Long id) { + if (configSubSampleMapper.selectById(id) == null) { + throw exception(CONFIG_SUB_SAMPLE_NOT_EXISTS); + } + } + + @Override + public ConfigSubSampleDO getConfigSubSample(Long id) { + return configSubSampleMapper.selectById(id); + } + + @Override + public PageResult getConfigSubSamplePage(ConfigSubSamplePageReqVO pageReqVO) { + return configSubSampleMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigWarehouseLocationInfomationService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigWarehouseLocationInfomationService.java new file mode 100644 index 0000000..4daf23c --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigWarehouseLocationInfomationService.java @@ -0,0 +1,62 @@ +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 ids); + + /** + * 获得样品库位信息 + * + * @param id 编号 + * @return 样品库位信息 + */ + ConfigWarehouseLocationInfomationDO getConfigWarehouseLocationInfomation(Long id); + + /** + * 获得样品库位信息分页 + * + * @param pageReqVO 分页查询 + * @return 样品库位信息分页 + */ + PageResult getConfigWarehouseLocationInfomationPage(ConfigWarehouseLocationInfomationPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigWarehouseLocationInfomationServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigWarehouseLocationInfomationServiceImpl.java new file mode 100644 index 0000000..47291a5 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/ConfigWarehouseLocationInfomationServiceImpl.java @@ -0,0 +1,89 @@ +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 ids) { + // 校验存在 + validateConfigWarehouseLocationInfomationExists(ids); + // 删除 + configWarehouseLocationInfomationMapper.deleteByIds(ids); + } + + private void validateConfigWarehouseLocationInfomationExists(List ids) { + List 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 getConfigWarehouseLocationInfomationPage(ConfigWarehouseLocationInfomationPageReqVO pageReqVO) { + return configWarehouseLocationInfomationMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardDetailService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardDetailService.java new file mode 100644 index 0000000..c027e73 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardDetailService.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailExtendDO; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 物料检测标准检测项目 Service 接口 + * + * @author 后台管理 + */ +public interface MaterialAssayStandardDetailService { + + List selectListWithExtend(MaterialAssayStandardDetailPageReqVO params); + + List getByStandardId(Long standardId); + List getByStandardIdList(List standardId); + + /** + * 创建物料检测标准检测项目 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + MaterialAssayStandardDetailRespVO createMaterialAssayStandardDetail(@Valid MaterialAssayStandardDetailSaveReqVO createReqVO); + + /** + * 更新物料检测标准检测项目 + * + * @param updateReqVO 更新信息 + */ + void updateMaterialAssayStandardDetail(@Valid MaterialAssayStandardDetailSaveReqVO updateReqVO); + + /** + * 删除物料检测标准检测项目 + * + * @param id 编号 + */ + void deleteMaterialAssayStandardDetail(Long id); + + /** + * 批量删除物料检测标准检测项目 + * + * @param ids 编号 + */ + void deleteMaterialAssayStandardDetailListByIds(List ids); + + /** + * 获得物料检测标准检测项目 + * + * @param id 编号 + * @return 物料检测标准检测项目 + */ + MaterialAssayStandardDetailDO getMaterialAssayStandardDetail(Long id); + + /** + * 获得物料检测标准检测项目分页 + * + * @param pageReqVO 分页查询 + * @return 物料检测标准检测项目分页 + */ + PageResult getMaterialAssayStandardDetailPage(MaterialAssayStandardDetailPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardDetailServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardDetailServiceImpl.java new file mode 100644 index 0000000..6d90870 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardDetailServiceImpl.java @@ -0,0 +1,114 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardDetailSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDetailExtendDO; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +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.dal.dataobject.MaterialAssayStandardDetailDO; +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.MaterialAssayStandardDetailMapper; + +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.MATERIAL_ASSAY_STANDARD_DETAIL_NOT_EXISTS; + +/** + * 物料检测标准检测项目 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class MaterialAssayStandardDetailServiceImpl implements MaterialAssayStandardDetailService { + + @Resource + private MaterialAssayStandardDetailMapper materialAssayStandardDetailMapper; + + @Override + public List selectListWithExtend(MaterialAssayStandardDetailPageReqVO params) { + List list = materialAssayStandardDetailMapper.selectListWithExtend(params); + return BeanUtils.toBean(list, MaterialAssayStandardDetailRespVO.class); + } + + @Override + public List getByStandardId(Long standardId) { + MaterialAssayStandardDetailPageReqVO params = new MaterialAssayStandardDetailPageReqVO(); + params.setMaterialAssayStandardId(standardId); + return selectListWithExtend( params); + } + + @Override + public List getByStandardIdList(List standardIdList) { + MaterialAssayStandardDetailPageReqVO params = new MaterialAssayStandardDetailPageReqVO(); + params.setStandardIdList(standardIdList); + return selectListWithExtend( params); + } + + @Override + public MaterialAssayStandardDetailRespVO createMaterialAssayStandardDetail(MaterialAssayStandardDetailSaveReqVO createReqVO) { + // 插入 + MaterialAssayStandardDetailDO materialAssayStandardDetail = BeanUtils.toBean(createReqVO, MaterialAssayStandardDetailDO.class); + materialAssayStandardDetailMapper.insert(materialAssayStandardDetail); + // 返回 + return BeanUtils.toBean(materialAssayStandardDetail, MaterialAssayStandardDetailRespVO.class); + } + + @Override + public void updateMaterialAssayStandardDetail(MaterialAssayStandardDetailSaveReqVO updateReqVO) { + // 校验存在 + validateMaterialAssayStandardDetailExists(updateReqVO.getId()); + // 更新 + MaterialAssayStandardDetailDO updateObj = BeanUtils.toBean(updateReqVO, MaterialAssayStandardDetailDO.class); + materialAssayStandardDetailMapper.updateById(updateObj); + } + + @Override + public void deleteMaterialAssayStandardDetail(Long id) { + // 校验存在 + validateMaterialAssayStandardDetailExists(id); + // 删除 + materialAssayStandardDetailMapper.deleteById(id); + } + + @Override + public void deleteMaterialAssayStandardDetailListByIds(List ids) { + // 校验存在 + validateMaterialAssayStandardDetailExists(ids); + // 删除 + materialAssayStandardDetailMapper.deleteByIds(ids); + } + + private void validateMaterialAssayStandardDetailExists(List ids) { + List list = materialAssayStandardDetailMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(MATERIAL_ASSAY_STANDARD_DETAIL_NOT_EXISTS); + } + } + + private void validateMaterialAssayStandardDetailExists(Long id) { + if (materialAssayStandardDetailMapper.selectById(id) == null) { + throw exception(MATERIAL_ASSAY_STANDARD_DETAIL_NOT_EXISTS); + } + } + + @Override + public MaterialAssayStandardDetailDO getMaterialAssayStandardDetail(Long id) { + return materialAssayStandardDetailMapper.selectById(id); + } + + @Override + public PageResult getMaterialAssayStandardDetailPage(MaterialAssayStandardDetailPageReqVO pageReqVO) { + return materialAssayStandardDetailMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardMethodService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardMethodService.java new file mode 100644 index 0000000..930c67c --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardMethodService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodSaveReqVO; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardMethodDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 物料检测标准与方法 Service 接口 + * + * @author 后台管理 + */ +public interface MaterialAssayStandardMethodService { + + /** + * 创建物料检测标准与方法 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + MaterialAssayStandardMethodRespVO createMaterialAssayStandardMethod(@Valid MaterialAssayStandardMethodSaveReqVO createReqVO); + + /** + * 更新物料检测标准与方法 + * + * @param updateReqVO 更新信息 + */ + void updateMaterialAssayStandardMethod(@Valid MaterialAssayStandardMethodSaveReqVO updateReqVO); + + /** + * 删除物料检测标准与方法 + * + * @param id 编号 + */ + void deleteMaterialAssayStandardMethod(Long id); + + /** + * 批量删除物料检测标准与方法 + * + * @param ids 编号 + */ + void deleteMaterialAssayStandardMethodListByIds(List ids); + + /** + * 获得物料检测标准与方法 + * + * @param id 编号 + * @return 物料检测标准与方法 + */ + MaterialAssayStandardMethodDO getMaterialAssayStandardMethod(Long id); + + /** + * 获得物料检测标准与方法分页 + * + * @param pageReqVO 分页查询 + * @return 物料检测标准与方法分页 + */ + PageResult getMaterialAssayStandardMethodPage(MaterialAssayStandardMethodPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardMethodServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardMethodServiceImpl.java new file mode 100644 index 0000000..6816f60 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardMethodServiceImpl.java @@ -0,0 +1,92 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardMethodSaveReqVO; +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.dal.dataobject.MaterialAssayStandardMethodDO; +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.MaterialAssayStandardMethodMapper; + +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.MATERIAL_ASSAY_STANDARD_METHOD_NOT_EXISTS; + +/** + * 物料检测标准与方法 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class MaterialAssayStandardMethodServiceImpl implements MaterialAssayStandardMethodService { + + @Resource + private MaterialAssayStandardMethodMapper materialAssayStandardMethodMapper; + + @Override + public MaterialAssayStandardMethodRespVO createMaterialAssayStandardMethod(MaterialAssayStandardMethodSaveReqVO createReqVO) { + // 插入 + MaterialAssayStandardMethodDO materialAssayStandardMethod = BeanUtils.toBean(createReqVO, MaterialAssayStandardMethodDO.class); + materialAssayStandardMethodMapper.insert(materialAssayStandardMethod); + // 返回 + return BeanUtils.toBean(materialAssayStandardMethod, MaterialAssayStandardMethodRespVO.class); + } + + @Override + public void updateMaterialAssayStandardMethod(MaterialAssayStandardMethodSaveReqVO updateReqVO) { + // 校验存在 + validateMaterialAssayStandardMethodExists(updateReqVO.getId()); + // 更新 + MaterialAssayStandardMethodDO updateObj = BeanUtils.toBean(updateReqVO, MaterialAssayStandardMethodDO.class); + materialAssayStandardMethodMapper.updateById(updateObj); + } + + @Override + public void deleteMaterialAssayStandardMethod(Long id) { + // 校验存在 + validateMaterialAssayStandardMethodExists(id); + // 删除 + materialAssayStandardMethodMapper.deleteById(id); + } + + @Override + public void deleteMaterialAssayStandardMethodListByIds(List ids) { + // 校验存在 + validateMaterialAssayStandardMethodExists(ids); + // 删除 + materialAssayStandardMethodMapper.deleteByIds(ids); + } + + private void validateMaterialAssayStandardMethodExists(List ids) { + List list = materialAssayStandardMethodMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(MATERIAL_ASSAY_STANDARD_METHOD_NOT_EXISTS); + } + } + + private void validateMaterialAssayStandardMethodExists(Long id) { + if (materialAssayStandardMethodMapper.selectById(id) == null) { + throw exception(MATERIAL_ASSAY_STANDARD_METHOD_NOT_EXISTS); + } + } + + @Override + public MaterialAssayStandardMethodDO getMaterialAssayStandardMethod(Long id) { + return materialAssayStandardMethodMapper.selectById(id); + } + + @Override + public PageResult getMaterialAssayStandardMethodPage(MaterialAssayStandardMethodPageReqVO pageReqVO) { + return materialAssayStandardMethodMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardService.java new file mode 100644 index 0000000..3d79ae9 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardService.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import java.util.*; + +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardExtendDO; +import jakarta.validation.*; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 物料检测标准 Service 接口 + * + * @author 后台管理 + */ +public interface MaterialAssayStandardService { + + List queryByBaseSampleID(Long baseSampleID); + + + /** + * 创建物料检测标准 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + MaterialAssayStandardRespVO createMaterialAssayStandard(@Valid MaterialAssayStandardSaveReqVO createReqVO); + + /** + * 更新物料检测标准 + * + * @param updateReqVO 更新信息 + */ + void updateMaterialAssayStandard(@Valid MaterialAssayStandardSaveReqVO updateReqVO); + + /** + * 删除物料检测标准 + * + * @param id 编号 + */ + void deleteMaterialAssayStandard(Long id); + + /** + * 批量删除物料检测标准 + * + * @param ids 编号 + */ + void deleteMaterialAssayStandardListByIds(List ids); + + /** + * 获得物料检测标准 + * + * @param id 编号 + * @return 物料检测标准 + */ + MaterialAssayStandardDO getMaterialAssayStandard(Long id); + + /** + * 获得物料检测标准分页 + * + * @param pageReqVO 分页查询 + * @return 物料检测标准分页 + */ + PageResult getMaterialAssayStandardPage(MaterialAssayStandardPageReqVO pageReqVO); + + PageResult getMaterialAssayStandardPageWithExtend(MaterialAssayStandardPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardServiceImpl.java new file mode 100644 index 0000000..51742f2 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/config/service/MaterialAssayStandardServiceImpl.java @@ -0,0 +1,111 @@ +package cn.iocoder.yudao.module.qms.business.config.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardPageReqVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardRespVO; +import cn.iocoder.yudao.module.qms.business.config.controller.vo.MaterialAssayStandardSaveReqVO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.MaterialAssayStandardExtendDO; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +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.dal.dataobject.MaterialAssayStandardDO; +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.MaterialAssayStandardMapper; + +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.MATERIAL_ASSAY_STANDARD_NOT_EXISTS; + +/** + * 物料检测标准 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class MaterialAssayStandardServiceImpl implements MaterialAssayStandardService { + + + + @Resource private MaterialAssayStandardMapper materialAssayStandardMapper; + + @Override + public List queryByBaseSampleID(Long baseSampleID) { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(MaterialAssayStandardDO::getBaseSampleId, baseSampleID); + return materialAssayStandardMapper.selectList(query); + } + + @Override + public MaterialAssayStandardRespVO createMaterialAssayStandard(MaterialAssayStandardSaveReqVO createReqVO) { + // 插入 + MaterialAssayStandardDO materialAssayStandard = BeanUtils.toBean(createReqVO, MaterialAssayStandardDO.class); + materialAssayStandardMapper.insert(materialAssayStandard); + // 返回 + return BeanUtils.toBean(materialAssayStandard, MaterialAssayStandardRespVO.class); + } + + @Override + public void updateMaterialAssayStandard(MaterialAssayStandardSaveReqVO updateReqVO) { + // 校验存在 + validateMaterialAssayStandardExists(updateReqVO.getId()); + // 更新 + MaterialAssayStandardDO updateObj = BeanUtils.toBean(updateReqVO, MaterialAssayStandardDO.class); + materialAssayStandardMapper.updateById(updateObj); + } + + @Override + public void deleteMaterialAssayStandard(Long id) { + // 校验存在 + validateMaterialAssayStandardExists(id); + // 删除 + materialAssayStandardMapper.deleteById(id); + } + + @Override + public void deleteMaterialAssayStandardListByIds(List ids) { + // 校验存在 + validateMaterialAssayStandardExists(ids); + // 删除 + materialAssayStandardMapper.deleteByIds(ids); + } + + private void validateMaterialAssayStandardExists(List ids) { + List list = materialAssayStandardMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(MATERIAL_ASSAY_STANDARD_NOT_EXISTS); + } + } + + private void validateMaterialAssayStandardExists(Long id) { + if (materialAssayStandardMapper.selectById(id) == null) { + throw exception(MATERIAL_ASSAY_STANDARD_NOT_EXISTS); + } + } + + @Override + public MaterialAssayStandardDO getMaterialAssayStandard(Long id) { + return materialAssayStandardMapper.selectById(id); + } + + @Override + public PageResult getMaterialAssayStandardPage(MaterialAssayStandardPageReqVO pageReqVO) { + return materialAssayStandardMapper.selectPage(pageReqVO); + } + + @Override + public PageResult getMaterialAssayStandardPageWithExtend(MaterialAssayStandardPageReqVO pageReqVO) { + IPage page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize()); + Page pageList = materialAssayStandardMapper.selectPageWithExtend(page, pageReqVO); + PageResult ret = new PageResult<>(pageList.getRecords(), pageList.getTotal()); + return ret; + } +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionaryParameterController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionaryParameterController.java new file mode 100644 index 0000000..5910b79 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionaryParameterController.java @@ -0,0 +1,105 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.admin; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterPageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionaryParameterDO; +import cn.iocoder.yudao.module.qms.business.dic.service.DictionaryParameterService; +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.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 检测参数字典") +@RestController +@RequestMapping("/qms/dictionary-parameter") +@Validated +public class DictionaryParameterController implements BusinessControllerMarker { + + + @Resource + private DictionaryParameterService dictionaryParameterService; + + @PostMapping("/create") + @Operation(summary = "创建检测参数字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-parameter:create')") + public CommonResult createDictionaryParameter(@Valid @RequestBody DictionaryParameterSaveReqVO createReqVO) { + return success(dictionaryParameterService.createDictionaryParameter(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新检测参数字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-parameter:update')") + public CommonResult updateDictionaryParameter(@Valid @RequestBody DictionaryParameterSaveReqVO updateReqVO) { + dictionaryParameterService.updateDictionaryParameter(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检测参数字典") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:dictionary-parameter:delete')") + public CommonResult deleteDictionaryParameter(@RequestParam("id") Long id) { + dictionaryParameterService.deleteDictionaryParameter(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除检测参数字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-parameter:delete')") + public CommonResult deleteDictionaryParameterList(@RequestBody BatchDeleteReqVO req) { + dictionaryParameterService.deleteDictionaryParameterListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检测参数字典") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:dictionary-parameter:query')") + public CommonResult getDictionaryParameter(@RequestParam("id") Long id) { + DictionaryParameterDO dictionaryParameter = dictionaryParameterService.getDictionaryParameter(id); + return success(BeanUtils.toBean(dictionaryParameter, DictionaryParameterRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得检测参数字典分页") + @PreAuthorize("@ss.hasPermission('qms:dictionary-parameter:query')") + public CommonResult> getDictionaryParameterPage(@Valid DictionaryParameterPageReqVO pageReqVO) { + PageResult pageResult = dictionaryParameterService.getDictionaryParameterPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, DictionaryParameterRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出检测参数字典 Excel") + @PreAuthorize("@ss.hasPermission('qms:dictionary-parameter:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportDictionaryParameterExcel(@Valid DictionaryParameterPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = dictionaryParameterService.getDictionaryParameterPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检测参数字典.xls", "数据", DictionaryParameterRespVO.class, + BeanUtils.toBean(list, DictionaryParameterRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionaryProjectController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionaryProjectController.java new file mode 100644 index 0000000..f745ec7 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionaryProjectController.java @@ -0,0 +1,105 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.admin; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectPageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionaryProjectDO; +import cn.iocoder.yudao.module.qms.business.dic.service.DictionaryProjectService; +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.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 检测项目字典") +@RestController +@RequestMapping("/qms/dictionary-project") +@Validated +public class DictionaryProjectController implements BusinessControllerMarker { + + + @Resource + private DictionaryProjectService dictionaryProjectService; + + @PostMapping("/create") + @Operation(summary = "创建检测项目字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-project:create')") + public CommonResult createDictionaryProject(@Valid @RequestBody DictionaryProjectSaveReqVO createReqVO) { + return success(dictionaryProjectService.createDictionaryProject(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新检测项目字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-project:update')") + public CommonResult updateDictionaryProject(@Valid @RequestBody DictionaryProjectSaveReqVO updateReqVO) { + dictionaryProjectService.updateDictionaryProject(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检测项目字典") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:dictionary-project:delete')") + public CommonResult deleteDictionaryProject(@RequestParam("id") Long id) { + dictionaryProjectService.deleteDictionaryProject(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除检测项目字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-project:delete')") + public CommonResult deleteDictionaryProjectList(@RequestBody BatchDeleteReqVO req) { + dictionaryProjectService.deleteDictionaryProjectListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检测项目字典") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:dictionary-project:query')") + public CommonResult getDictionaryProject(@RequestParam("id") Long id) { + DictionaryProjectDO dictionaryProject = dictionaryProjectService.getDictionaryProject(id); + return success(BeanUtils.toBean(dictionaryProject, DictionaryProjectRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得检测项目字典分页") + @PreAuthorize("@ss.hasPermission('qms:dictionary-project:query')") + public CommonResult> getDictionaryProjectPage(@Valid DictionaryProjectPageReqVO pageReqVO) { + PageResult pageResult = dictionaryProjectService.getDictionaryProjectPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, DictionaryProjectRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出检测项目字典 Excel") + @PreAuthorize("@ss.hasPermission('qms:dictionary-project:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportDictionaryProjectExcel(@Valid DictionaryProjectPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = dictionaryProjectService.getDictionaryProjectPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检测项目字典.xls", "数据", DictionaryProjectRespVO.class, + BeanUtils.toBean(list, DictionaryProjectRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionarySampleFlowNodeController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionarySampleFlowNodeController.java new file mode 100644 index 0000000..ec340f6 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionarySampleFlowNodeController.java @@ -0,0 +1,105 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.admin; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodePageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodeRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodeSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionarySampleFlowNodeDO; +import cn.iocoder.yudao.module.qms.business.dic.service.DictionarySampleFlowNodeService; +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.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 样品流程节点字典") +@RestController +@RequestMapping("/qms/dictionary-sample-flow-node") +@Validated +public class DictionarySampleFlowNodeController implements BusinessControllerMarker { + + + @Resource + private DictionarySampleFlowNodeService dictionarySampleFlowNodeService; + + @PostMapping("/create") + @Operation(summary = "创建样品流程节点字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-flow-node:create')") + public CommonResult createDictionarySampleFlowNode(@Valid @RequestBody DictionarySampleFlowNodeSaveReqVO createReqVO) { + return success(dictionarySampleFlowNodeService.createDictionarySampleFlowNode(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新样品流程节点字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-flow-node:update')") + public CommonResult updateDictionarySampleFlowNode(@Valid @RequestBody DictionarySampleFlowNodeSaveReqVO updateReqVO) { + dictionarySampleFlowNodeService.updateDictionarySampleFlowNode(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除样品流程节点字典") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-flow-node:delete')") + public CommonResult deleteDictionarySampleFlowNode(@RequestParam("id") Long id) { + dictionarySampleFlowNodeService.deleteDictionarySampleFlowNode(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除样品流程节点字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-flow-node:delete')") + public CommonResult deleteDictionarySampleFlowNodeList(@RequestBody BatchDeleteReqVO req) { + dictionarySampleFlowNodeService.deleteDictionarySampleFlowNodeListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得样品流程节点字典") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-flow-node:query')") + public CommonResult getDictionarySampleFlowNode(@RequestParam("id") Long id) { + DictionarySampleFlowNodeDO dictionarySampleFlowNode = dictionarySampleFlowNodeService.getDictionarySampleFlowNode(id); + return success(BeanUtils.toBean(dictionarySampleFlowNode, DictionarySampleFlowNodeRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得样品流程节点字典分页") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-flow-node:query')") + public CommonResult> getDictionarySampleFlowNodePage(@Valid DictionarySampleFlowNodePageReqVO pageReqVO) { + PageResult pageResult = dictionarySampleFlowNodeService.getDictionarySampleFlowNodePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, DictionarySampleFlowNodeRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出样品流程节点字典 Excel") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-flow-node:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportDictionarySampleFlowNodeExcel(@Valid DictionarySampleFlowNodePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = dictionarySampleFlowNodeService.getDictionarySampleFlowNodePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "样品流程节点字典.xls", "数据", DictionarySampleFlowNodeRespVO.class, + BeanUtils.toBean(list, DictionarySampleFlowNodeRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionarySampleTypeController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionarySampleTypeController.java new file mode 100644 index 0000000..0f8e7c3 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/admin/DictionarySampleTypeController.java @@ -0,0 +1,105 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.admin; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypePageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypeRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypeSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionarySampleTypeDO; +import cn.iocoder.yudao.module.qms.business.dic.service.DictionarySampleTypeService; +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.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 样品类型字典") +@RestController +@RequestMapping("/qms/dictionary-sample-type") +@Validated +public class DictionarySampleTypeController implements BusinessControllerMarker { + + + @Resource + private DictionarySampleTypeService dictionarySampleTypeService; + + @PostMapping("/create") + @Operation(summary = "创建样品类型字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-type:create')") + public CommonResult createDictionarySampleType(@Valid @RequestBody DictionarySampleTypeSaveReqVO createReqVO) { + return success(dictionarySampleTypeService.createDictionarySampleType(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新样品类型字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-type:update')") + public CommonResult updateDictionarySampleType(@Valid @RequestBody DictionarySampleTypeSaveReqVO updateReqVO) { + dictionarySampleTypeService.updateDictionarySampleType(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除样品类型字典") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-type:delete')") + public CommonResult deleteDictionarySampleType(@RequestParam("id") Long id) { + dictionarySampleTypeService.deleteDictionarySampleType(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除样品类型字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-type:delete')") + public CommonResult deleteDictionarySampleTypeList(@RequestBody BatchDeleteReqVO req) { + dictionarySampleTypeService.deleteDictionarySampleTypeListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得样品类型字典") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-type:query')") + public CommonResult getDictionarySampleType(@RequestParam("id") Long id) { + DictionarySampleTypeDO dictionarySampleType = dictionarySampleTypeService.getDictionarySampleType(id); + return success(BeanUtils.toBean(dictionarySampleType, DictionarySampleTypeRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得样品类型字典分页") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-type:query')") + public CommonResult> getDictionarySampleTypePage(@Valid DictionarySampleTypePageReqVO pageReqVO) { + PageResult pageResult = dictionarySampleTypeService.getDictionarySampleTypePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, DictionarySampleTypeRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出样品类型字典 Excel") + @PreAuthorize("@ss.hasPermission('qms:dictionary-sample-type:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportDictionarySampleTypeExcel(@Valid DictionarySampleTypePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = dictionarySampleTypeService.getDictionarySampleTypePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "样品类型字典.xls", "数据", DictionarySampleTypeRespVO.class, + BeanUtils.toBean(list, DictionarySampleTypeRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterPageReqVO.java new file mode 100644 index 0000000..39b3900 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterPageReqVO.java @@ -0,0 +1,59 @@ +package cn.iocoder.yudao.module.qms.business.dic.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 DictionaryParameterPageReqVO extends PageParam { + + @Schema(description = "参数序号") + private Integer no; + + @Schema(description = "名称", example = "李四") + private String name; + + @Schema(description = "键值") + private String key; + + @Schema(description = "检测单位ID,UNT表", example = "23653") + private Long unitId; + + @Schema(description = "单位") + private String unit; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】STR-字符串,INTG-整数,DEC-小数,DT-日期,DTM-时间", example = "2") + private String dataType; + + @Schema(description = "小数位") + private Integer decimalPosition; + + @Schema(description = "排序") + private Integer sort; + + @Schema(description = "计算公式") + private String formula; + + @Schema(description = "填写方式,【字典】【jy_dictionary_parameter_Filling_way】人工录入,天平采集,计算") + private String fillingWay; + + @Schema(description = "参数简称", example = "李四") + private String shortName; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterRespVO.java new file mode 100644 index 0000000..d504d0b --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterRespVO.java @@ -0,0 +1,75 @@ +package cn.iocoder.yudao.module.qms.business.dic.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 DictionaryParameterRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16564") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "参数序号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("参数序号") + private Integer no; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("名称") + private String name; + + @Schema(description = "键值") + @ExcelProperty("键值") + private String key; + + @Schema(description = "检测单位ID,UNT表", example = "23653") + @ExcelProperty("检测单位ID,UNT表") + private Long unitId; + + @Schema(description = "单位") + @ExcelProperty("单位") + private String unit; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】STR-字符串,INTG-整数,DEC-小数,DT-日期,DTM-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("数据类型,【字典】【jy_sample_data_type】STR-字符串,INTG-整数,DEC-小数,DT-日期,DTM-时间") + private String dataType; + + @Schema(description = "小数位") + @ExcelProperty("小数位") + private Integer decimalPosition; + + @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("排序") + private Integer sort; + + @Schema(description = "计算公式") + @ExcelProperty("计算公式") + private String formula; + + @Schema(description = "填写方式,【字典】【jy_dictionary_parameter_Filling_way】人工录入,天平采集,计算", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("填写方式,【字典】【jy_dictionary_parameter_Filling_way】人工录入,天平采集,计算") + private String fillingWay; + + @Schema(description = "参数简称", example = "李四") + @ExcelProperty("参数简称") + private String shortName; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterSaveReqVO.java new file mode 100644 index 0000000..d175288 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryParameterSaveReqVO.java @@ -0,0 +1,60 @@ +package cn.iocoder.yudao.module.qms.business.dic.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 DictionaryParameterSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16564") + private Long id; + + @Schema(description = "参数序号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "参数序号不能为空") + private Integer no; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "名称不能为空") + private String name; + + @Schema(description = "键值") + private String key; + + @Schema(description = "检测单位ID,UNT表", example = "23653") + private Long unitId; + + @Schema(description = "单位") + private String unit; + + @Schema(description = "数据类型,【字典】【jy_sample_data_type】STR-字符串,INTG-整数,DEC-小数,DT-日期,DTM-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotEmpty(message = "数据类型,【字典】【jy_sample_data_type】STR-字符串,INTG-整数,DEC-小数,DT-日期,DTM-时间不能为空") + private String dataType; + + @Schema(description = "小数位") + private Integer decimalPosition; + + @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "排序不能为空") + private Integer sort; + + @Schema(description = "计算公式") + private String formula; + + @Schema(description = "填写方式,【字典】【jy_dictionary_parameter_Filling_way】人工录入,天平采集,计算", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "填写方式,【字典】【jy_dictionary_parameter_Filling_way】人工录入,天平采集,计算不能为空") + private String fillingWay; + + @Schema(description = "参数简称", example = "李四") + private String shortName; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectPageReqVO.java new file mode 100644 index 0000000..9535665 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectPageReqVO.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +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 DictionaryProjectPageReqVO extends PageParam { + + @Schema(description = "检测项目代码") + private String code; + + @Schema(description = "检测项目名称", example = "三氧化二铝") + private String name; + + @Schema(description = "检测项目缩写", example = "Al2O3") + private String simpleName; + + @Schema(description = "检测项目显示名称", example = "Al2O3") + private String showName; + + @Schema(description = "键值") + private String key; + + @Schema(description = "物料属性ID", example = "15500") + private Long materialPropertiesId; + + @Schema(description = "物料属性编码") + private String materialPropertiesCode; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectRespVO.java new file mode 100644 index 0000000..38b270a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectRespVO.java @@ -0,0 +1,59 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 检测项目字典 Response VO") +@Data +@ExcelIgnoreUnannotated +public class DictionaryProjectRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16336") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "检测项目代码") + @ExcelProperty("检测项目代码") + private String code; + + @Schema(description = "检测项目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "三氧化二铝") + @ExcelProperty("检测项目名称") + private String name; + + @Schema(description = "检测项目缩写", requiredMode = Schema.RequiredMode.REQUIRED, example = "Al2O3") + @ExcelProperty("检测项目缩写") + private String simpleName; + + @Schema(description = "检测项目显示名称", example = "Al2O3") + @ExcelProperty("检测项目显示名称") + private String showName; + + @Schema(description = "键值") + @ExcelProperty("键值") + private String key; + + @Schema(description = "物料属性ID", example = "15500") + @ExcelProperty("物料属性ID") + private Long materialPropertiesId; + + @Schema(description = "物料属性编码") + @ExcelProperty("物料属性编码") + private String materialPropertiesCode; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectSaveReqVO.java new file mode 100644 index 0000000..bbbcf43 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionaryProjectSaveReqVO.java @@ -0,0 +1,45 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import lombok.Data; + +@Schema(description = "管理后台 - 检测项目字典新增/修改 Request VO") +@Data +public class DictionaryProjectSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16336") + private Long id; + + @Schema(description = "检测项目代码") + private String code; + + @Schema(description = "检测项目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "三氧化二铝") + @NotEmpty(message = "检测项目名称不能为空") + private String name; + + @Schema(description = "检测项目缩写", requiredMode = Schema.RequiredMode.REQUIRED, example = "Al2O3") + @NotEmpty(message = "检测项目缩写不能为空") + private String simpleName; + + @Schema(description = "检测项目显示名称", example = "Al2O3") + @NotEmpty(message = "检测项目显示名称不能为空") + private String showName; + + @Schema(description = "键值") + private String key; + + @Schema(description = "物料属性ID", example = "15500") + private Long materialPropertiesId; + + @Schema(description = "物料属性编码") + private String materialPropertiesCode; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodePageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodePageReqVO.java new file mode 100644 index 0000000..e8038e0 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodePageReqVO.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +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 DictionarySampleFlowNodePageReqVO extends PageParam { + + @Schema(description = "键") + private String key; + + @Schema(description = "名称", example = "李四") + private String name; + + @Schema(description = "类型,主样、子样", example = "1") + private String type; + + @Schema(description = "代码") + private String code; + + @Schema(description = "默认事件") + private String defaultEvent; + + @Schema(description = "排序") + private Integer sort; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodeRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodeRespVO.java new file mode 100644 index 0000000..e2b70b5 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodeRespVO.java @@ -0,0 +1,54 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 样品流程节点字典 Response VO") +@Data +@ExcelIgnoreUnannotated +public class DictionarySampleFlowNodeRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17734") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "键") + @ExcelProperty("键") + private String key; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("名称") + private String name; + + @Schema(description = "类型,主样、子样", example = "1") + @ExcelProperty("类型,主样、子样") + private String type; + + @Schema(description = "代码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("代码") + private String code; + + @Schema(description = "默认事件") + @ExcelProperty("默认事件") + private String defaultEvent; + + @Schema(description = "排序") + private Integer sort; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodeSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodeSaveReqVO.java new file mode 100644 index 0000000..41fb69e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleFlowNodeSaveReqVO.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import lombok.Data; + +@Schema(description = "管理后台 - 样品流程节点字典新增/修改 Request VO") +@Data +public class DictionarySampleFlowNodeSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17734") + private Long id; + + @Schema(description = "键") + @NotEmpty(message = "键名不能为空") + private String key; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "名称不能为空") + private String name; + + @Schema(description = "类型,主样、子样", example = "1") + private String type; + + @Schema(description = "代码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "代码不能为空") + private String code; + + @Schema(description = "默认事件") + private String defaultEvent; + + @Schema(description = "排序") + private Integer sort; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypePageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypePageReqVO.java new file mode 100644 index 0000000..7fec477 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypePageReqVO.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +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 DictionarySampleTypePageReqVO extends PageParam { + + @Schema(description = "父级ID", example = "8469") + private Long parentId; + + @Schema(description = "名称,结算样、生产样、西南铜委托样、商检委托样、内部委托样、抽查委托样、内审委托样等", example = "王五") + private String name; + + @Schema(description = "键") + private String key; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypeRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypeRespVO.java new file mode 100644 index 0000000..d05352b --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypeRespVO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 样品类型字典 Response VO") +@Data +@ExcelIgnoreUnannotated +public class DictionarySampleTypeRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28674") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "父级ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8469") + @ExcelProperty("父级ID") + private Long parentId; + + @Schema(description = "名称,结算样、生产样、西南铜委托样、商检委托样、内部委托样、抽查委托样、内审委托样等", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("名称,结算样、生产样、西南铜委托样、商检委托样、内部委托样、抽查委托样、内审委托样等") + private String name; + + @Schema(description = "键值", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("键值") + private String key; + + @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; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypeSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypeSaveReqVO.java new file mode 100644 index 0000000..38c5533 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/controller/vo/DictionarySampleTypeSaveReqVO.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.qms.business.dic.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "管理后台 - 样品类型字典新增/修改 Request VO") +@Data +public class DictionarySampleTypeSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28674") + private Long id; + + @Schema(description = "父级ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8469") + @NotNull(message = "父级ID不能为空") + private Long parentId; + + @Schema(description = "名称,结算样、生产样、西南铜委托样、商检委托样、内部委托样、抽查委托样、内审委托样等", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @NotEmpty(message = "名称,结算样、生产样、西南铜委托样、商检委托样、内部委托样、抽查委托样、内审委托样等不能为空") + private String name; + + @Schema(description = "键值", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "键值不能为空") + private String key; + + @Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "所属部门不能为空") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionaryParameterDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionaryParameterDO.java new file mode 100644 index 0000000..39c266d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionaryParameterDO.java @@ -0,0 +1,100 @@ +package cn.iocoder.yudao.module.qms.business.dic.dal.dataobject; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 检测参数字典 DO +* +* @author 后台管理 +*/ +@TableName("t_dic_prm") +@KeySequence("t_dic_prm_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class DictionaryParameterDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 参数序号 + */ + @TableField("NO") + private Integer no; + /** + * 名称 + */ + @TableField("NAME") + private String name; + /** + * 键值 + */ + @TableField("KY") + private String key; + /** + * 检测单位ID,UNT表 + */ + @TableField("UNT_ID") + private Long unitId; + /** + * 单位 + */ + @TableField("UNT") + private String unit; + /** + * 数据类型,【字典】【jy_sample_data_type】STR-字符串,INTG-整数,DEC-小数,DT-日期,DTM-时间 + */ + @TableField("DAT_TP") + private String dataType; + /** + * 小数位 + */ + @TableField("DEC_POS") + private Integer decimalPosition; + /** + * 排序 + */ + @TableField("SRT") + private Integer sort; + /** + * 计算公式 + */ + @TableField("FMU") + private String formula; + /** + * 填写方式,【字典】【jy_dictionary_parameter_Filling_way】人工录入,天平采集,计算 + */ + @TableField("FIL_WY") + private String fillingWay; + /** + * 参数简称 + */ + @TableField("SHRT_NAME") + private String shortName; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionaryProjectDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionaryProjectDO.java new file mode 100644 index 0000000..1aa7642 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionaryProjectDO.java @@ -0,0 +1,77 @@ +package cn.iocoder.yudao.module.qms.business.dic.dal.dataobject; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; +/** +* 检测项目字典 DO +* +* @author 后台管理 +*/ +@TableName("t_dic_prj") +@KeySequence("t_dic_prj_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class DictionaryProjectDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 检测项目代码 + */ + @TableField("CD") + private String code; + /** + * 检测项目名称 + */ + @TableField("NAME") + private String name; + /** + * 检测项目缩写 + */ + @TableField("SMPL_NAME") + private String simpleName; + /** + * 检测项目显示名称 + */ + @TableField("SHW_NAME") + private String showName; + /** + * 键值 + */ + @TableField("KY") + private String key; + /** + * 物料属性ID + */ + @TableField("MTRL_PRPS_ID") + private Long materialPropertiesId; + /** + * 物料属性编码 + */ + @TableField("MTRL_PRPS_CD") + private String materialPropertiesCode; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionarySampleFlowNodeDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionarySampleFlowNodeDO.java new file mode 100644 index 0000000..d089463 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionarySampleFlowNodeDO.java @@ -0,0 +1,72 @@ +package cn.iocoder.yudao.module.qms.business.dic.dal.dataobject; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; +/** +* 样品流程节点字典 DO +* +* @author 后台管理 +*/ +@TableName("t_dic_smp_flw_nde") +@KeySequence("t_dic_smp_flw_nde_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class DictionarySampleFlowNodeDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * key + */ + @TableField("KY") + private String key; + /** + * 名称 + */ + @TableField("NAME") + private String name; + /** + * 类型,主样、子样 + */ + @TableField("TP") + private String type; + /** + * 代码 + */ + @TableField("CD") + private String code; + /** + * 默认事件 + */ + @TableField("DFT_EVN") + private String defaultEvent; + /** + * 排序 + */ + @TableField("SRT") + private Integer sort; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionarySampleTypeDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionarySampleTypeDO.java new file mode 100644 index 0000000..a024b2a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/dataobject/DictionarySampleTypeDO.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.qms.business.dic.dal.dataobject; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; +/** +* 样品类型字典 DO +* +* @author 后台管理 +*/ +@TableName("t_dic_smp_tp") +@KeySequence("t_dic_smp_tp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class DictionarySampleTypeDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 父级ID + */ + @TableField("PRN_ID") + private Long parentId; + /** + * 名称,结算样、生产样、西南铜委托样、商检委托样、内部委托样、抽查委托样、内审委托样等 + */ + @TableField("NAME") + private String name; + /** + * 键值 + */ + @TableField("KY") + private String key; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryParameterMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryParameterMapper.java new file mode 100644 index 0000000..6f674ec --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryParameterMapper.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.qms.business.dic.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.dic.controller.vo.*; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionaryParameterDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import org.apache.ibatis.annotations.Mapper; + +/** + * 检测参数字典 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface DictionaryParameterMapper extends BaseMapperX { + + default PageResult selectPage(DictionaryParameterPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(DictionaryParameterDO::getNo, reqVO.getNo()) + .likeIfPresent(DictionaryParameterDO::getName, reqVO.getName()) + .eqIfPresent(DictionaryParameterDO::getKey, reqVO.getKey()) + .eqIfPresent(DictionaryParameterDO::getUnitId, reqVO.getUnitId()) + .eqIfPresent(DictionaryParameterDO::getUnit, reqVO.getUnit()) + .eqIfPresent(DictionaryParameterDO::getDataType, reqVO.getDataType()) + .eqIfPresent(DictionaryParameterDO::getDecimalPosition, reqVO.getDecimalPosition()) + .eqIfPresent(DictionaryParameterDO::getSort, reqVO.getSort()) + .eqIfPresent(DictionaryParameterDO::getFormula, reqVO.getFormula()) + .eqIfPresent(DictionaryParameterDO::getFillingWay, reqVO.getFillingWay()) + .likeIfPresent(DictionaryParameterDO::getShortName, reqVO.getShortName()) + .eqIfPresent(DictionaryParameterDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(DictionaryParameterDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(DictionaryParameterDO::getRemark, reqVO.getRemark()) + .orderByDesc(DictionaryParameterDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryProjectMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryProjectMapper.java new file mode 100644 index 0000000..e99726c --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryProjectMapper.java @@ -0,0 +1,32 @@ +package cn.iocoder.yudao.module.qms.business.dic.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectPageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionaryProjectDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 检测项目字典 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface DictionaryProjectMapper extends BaseMapperX { + + default PageResult selectPage(DictionaryProjectPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(DictionaryProjectDO::getCode, reqVO.getCode()) + .likeIfPresent(DictionaryProjectDO::getName, reqVO.getName()) + .likeIfPresent(DictionaryProjectDO::getSimpleName, reqVO.getSimpleName()) + .eqIfPresent(DictionaryProjectDO::getKey, reqVO.getKey()) + .eqIfPresent(DictionaryProjectDO::getMaterialPropertiesId, reqVO.getMaterialPropertiesId()) + .eqIfPresent(DictionaryProjectDO::getMaterialPropertiesCode, reqVO.getMaterialPropertiesCode()) + .eqIfPresent(DictionaryProjectDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(DictionaryProjectDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(DictionaryProjectDO::getRemark, reqVO.getRemark()) + .orderByDesc(DictionaryProjectDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleFlowNodeMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleFlowNodeMapper.java new file mode 100644 index 0000000..aed30a7 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleFlowNodeMapper.java @@ -0,0 +1,30 @@ +package cn.iocoder.yudao.module.qms.business.dic.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodePageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionarySampleFlowNodeDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 样品流程节点字典 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface DictionarySampleFlowNodeMapper extends BaseMapperX { + + default PageResult selectPage(DictionarySampleFlowNodePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(DictionarySampleFlowNodeDO::getName, reqVO.getName()) + .eqIfPresent(DictionarySampleFlowNodeDO::getType, reqVO.getType()) + .eqIfPresent(DictionarySampleFlowNodeDO::getCode, reqVO.getCode()) + .eqIfPresent(DictionarySampleFlowNodeDO::getDefaultEvent, reqVO.getDefaultEvent()) + .eqIfPresent(DictionarySampleFlowNodeDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(DictionarySampleFlowNodeDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(DictionarySampleFlowNodeDO::getRemark, reqVO.getRemark()) + .orderByDesc(DictionarySampleFlowNodeDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleTypeMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleTypeMapper.java new file mode 100644 index 0000000..ff04dac --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleTypeMapper.java @@ -0,0 +1,29 @@ +package cn.iocoder.yudao.module.qms.business.dic.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypePageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionarySampleTypeDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 样品类型字典 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface DictionarySampleTypeMapper extends BaseMapperX { + + default PageResult selectPage(DictionarySampleTypePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(DictionarySampleTypeDO::getParentId, reqVO.getParentId()) + .likeIfPresent(DictionarySampleTypeDO::getName, reqVO.getName()) + .eqIfPresent(DictionarySampleTypeDO::getKey, reqVO.getKey()) + .eqIfPresent(DictionarySampleTypeDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(DictionarySampleTypeDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(DictionarySampleTypeDO::getRemark, reqVO.getRemark()) + .orderByDesc(DictionarySampleTypeDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryParameterService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryParameterService.java new file mode 100644 index 0000000..6b9d8b3 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryParameterService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.qms.business.dic.service; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterPageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionaryParameterDO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 检测参数字典 Service 接口 + * + * @author 后台管理 + */ +public interface DictionaryParameterService { + + /** + * 创建检测参数字典 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + DictionaryParameterRespVO createDictionaryParameter(@Valid DictionaryParameterSaveReqVO createReqVO); + + /** + * 更新检测参数字典 + * + * @param updateReqVO 更新信息 + */ + void updateDictionaryParameter(@Valid DictionaryParameterSaveReqVO updateReqVO); + + /** + * 删除检测参数字典 + * + * @param id 编号 + */ + void deleteDictionaryParameter(Long id); + + /** + * 批量删除检测参数字典 + * + * @param ids 编号 + */ + void deleteDictionaryParameterListByIds(List ids); + + /** + * 获得检测参数字典 + * + * @param id 编号 + * @return 检测参数字典 + */ + DictionaryParameterDO getDictionaryParameter(Long id); + + /** + * 获得检测参数字典分页 + * + * @param pageReqVO 分页查询 + * @return 检测参数字典分页 + */ + PageResult getDictionaryParameterPage(DictionaryParameterPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryParameterServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryParameterServiceImpl.java new file mode 100644 index 0000000..25b21f7 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryParameterServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.dic.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterPageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryParameterSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionaryParameterDO; +import cn.iocoder.yudao.module.qms.business.dic.dal.mapper.DictionaryParameterMapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.DICTIONARY_PARAMETER_NOT_EXISTS; + +/** + * 检测参数字典 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class DictionaryParameterServiceImpl implements DictionaryParameterService { + + @Resource + private DictionaryParameterMapper dictionaryParameterMapper; + + @Override + public DictionaryParameterRespVO createDictionaryParameter(DictionaryParameterSaveReqVO createReqVO) { + // 插入 + DictionaryParameterDO dictionaryParameter = BeanUtils.toBean(createReqVO, DictionaryParameterDO.class); + dictionaryParameterMapper.insert(dictionaryParameter); + // 返回 + return BeanUtils.toBean(dictionaryParameter, DictionaryParameterRespVO.class); + } + + @Override + public void updateDictionaryParameter(DictionaryParameterSaveReqVO updateReqVO) { + // 校验存在 + validateDictionaryParameterExists(updateReqVO.getId()); + // 更新 + DictionaryParameterDO updateObj = BeanUtils.toBean(updateReqVO, DictionaryParameterDO.class); + dictionaryParameterMapper.updateById(updateObj); + } + + @Override + public void deleteDictionaryParameter(Long id) { + // 校验存在 + validateDictionaryParameterExists(id); + // 删除 + dictionaryParameterMapper.deleteById(id); + } + + @Override + public void deleteDictionaryParameterListByIds(List ids) { + // 校验存在 + validateDictionaryParameterExists(ids); + // 删除 + dictionaryParameterMapper.deleteByIds(ids); + } + + private void validateDictionaryParameterExists(List ids) { + List list = dictionaryParameterMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(DICTIONARY_PARAMETER_NOT_EXISTS); + } + } + + private void validateDictionaryParameterExists(Long id) { + if (dictionaryParameterMapper.selectById(id) == null) { + throw exception(DICTIONARY_PARAMETER_NOT_EXISTS); + } + } + + @Override + public DictionaryParameterDO getDictionaryParameter(Long id) { + return dictionaryParameterMapper.selectById(id); + } + + @Override + public PageResult getDictionaryParameterPage(DictionaryParameterPageReqVO pageReqVO) { + return dictionaryParameterMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryProjectService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryProjectService.java new file mode 100644 index 0000000..342eb68 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryProjectService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.qms.business.dic.service; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectPageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionaryProjectDO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 检测项目字典 Service 接口 + * + * @author 后台管理 + */ +public interface DictionaryProjectService { + + /** + * 创建检测项目字典 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + DictionaryProjectRespVO createDictionaryProject(@Valid DictionaryProjectSaveReqVO createReqVO); + + /** + * 更新检测项目字典 + * + * @param updateReqVO 更新信息 + */ + void updateDictionaryProject(@Valid DictionaryProjectSaveReqVO updateReqVO); + + /** + * 删除检测项目字典 + * + * @param id 编号 + */ + void deleteDictionaryProject(Long id); + + /** + * 批量删除检测项目字典 + * + * @param ids 编号 + */ + void deleteDictionaryProjectListByIds(List ids); + + /** + * 获得检测项目字典 + * + * @param id 编号 + * @return 检测项目字典 + */ + DictionaryProjectDO getDictionaryProject(Long id); + + /** + * 获得检测项目字典分页 + * + * @param pageReqVO 分页查询 + * @return 检测项目字典分页 + */ + PageResult getDictionaryProjectPage(DictionaryProjectPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryProjectServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryProjectServiceImpl.java new file mode 100644 index 0000000..87746f1 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionaryProjectServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.dic.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectPageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionaryProjectSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionaryProjectDO; +import cn.iocoder.yudao.module.qms.business.dic.dal.mapper.DictionaryProjectMapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.DICTIONARY_PROJECT_NOT_EXISTS; + +/** + * 检测项目字典 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class DictionaryProjectServiceImpl implements DictionaryProjectService { + + @Resource + private DictionaryProjectMapper dictionaryProjectMapper; + + @Override + public DictionaryProjectRespVO createDictionaryProject(DictionaryProjectSaveReqVO createReqVO) { + // 插入 + DictionaryProjectDO dictionaryProject = BeanUtils.toBean(createReqVO, DictionaryProjectDO.class); + dictionaryProjectMapper.insert(dictionaryProject); + // 返回 + return BeanUtils.toBean(dictionaryProject, DictionaryProjectRespVO.class); + } + + @Override + public void updateDictionaryProject(DictionaryProjectSaveReqVO updateReqVO) { + // 校验存在 + validateDictionaryProjectExists(updateReqVO.getId()); + // 更新 + DictionaryProjectDO updateObj = BeanUtils.toBean(updateReqVO, DictionaryProjectDO.class); + dictionaryProjectMapper.updateById(updateObj); + } + + @Override + public void deleteDictionaryProject(Long id) { + // 校验存在 + validateDictionaryProjectExists(id); + // 删除 + dictionaryProjectMapper.deleteById(id); + } + + @Override + public void deleteDictionaryProjectListByIds(List ids) { + // 校验存在 + validateDictionaryProjectExists(ids); + // 删除 + dictionaryProjectMapper.deleteByIds(ids); + } + + private void validateDictionaryProjectExists(List ids) { + List list = dictionaryProjectMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(DICTIONARY_PROJECT_NOT_EXISTS); + } + } + + private void validateDictionaryProjectExists(Long id) { + if (dictionaryProjectMapper.selectById(id) == null) { + throw exception(DICTIONARY_PROJECT_NOT_EXISTS); + } + } + + @Override + public DictionaryProjectDO getDictionaryProject(Long id) { + return dictionaryProjectMapper.selectById(id); + } + + @Override + public PageResult getDictionaryProjectPage(DictionaryProjectPageReqVO pageReqVO) { + return dictionaryProjectMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleFlowNodeService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleFlowNodeService.java new file mode 100644 index 0000000..00730f8 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleFlowNodeService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.qms.business.dic.service; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodePageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodeRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodeSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionarySampleFlowNodeDO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 样品流程节点字典 Service 接口 + * + * @author 后台管理 + */ +public interface DictionarySampleFlowNodeService { + + /** + * 创建样品流程节点字典 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + DictionarySampleFlowNodeRespVO createDictionarySampleFlowNode(@Valid DictionarySampleFlowNodeSaveReqVO createReqVO); + + /** + * 更新样品流程节点字典 + * + * @param updateReqVO 更新信息 + */ + void updateDictionarySampleFlowNode(@Valid DictionarySampleFlowNodeSaveReqVO updateReqVO); + + /** + * 删除样品流程节点字典 + * + * @param id 编号 + */ + void deleteDictionarySampleFlowNode(Long id); + + /** + * 批量删除样品流程节点字典 + * + * @param ids 编号 + */ + void deleteDictionarySampleFlowNodeListByIds(List ids); + + /** + * 获得样品流程节点字典 + * + * @param id 编号 + * @return 样品流程节点字典 + */ + DictionarySampleFlowNodeDO getDictionarySampleFlowNode(Long id); + + /** + * 获得样品流程节点字典分页 + * + * @param pageReqVO 分页查询 + * @return 样品流程节点字典分页 + */ + PageResult getDictionarySampleFlowNodePage(DictionarySampleFlowNodePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleFlowNodeServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleFlowNodeServiceImpl.java new file mode 100644 index 0000000..d0ad5b9 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleFlowNodeServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.dic.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodePageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodeRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleFlowNodeSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionarySampleFlowNodeDO; +import cn.iocoder.yudao.module.qms.business.dic.dal.mapper.DictionarySampleFlowNodeMapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.DICTIONARY_SAMPLE_FLOW_NODE_NOT_EXISTS; + +/** + * 样品流程节点字典 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class DictionarySampleFlowNodeServiceImpl implements DictionarySampleFlowNodeService { + + @Resource + private DictionarySampleFlowNodeMapper dictionarySampleFlowNodeMapper; + + @Override + public DictionarySampleFlowNodeRespVO createDictionarySampleFlowNode(DictionarySampleFlowNodeSaveReqVO createReqVO) { + // 插入 + DictionarySampleFlowNodeDO dictionarySampleFlowNode = BeanUtils.toBean(createReqVO, DictionarySampleFlowNodeDO.class); + dictionarySampleFlowNodeMapper.insert(dictionarySampleFlowNode); + // 返回 + return BeanUtils.toBean(dictionarySampleFlowNode, DictionarySampleFlowNodeRespVO.class); + } + + @Override + public void updateDictionarySampleFlowNode(DictionarySampleFlowNodeSaveReqVO updateReqVO) { + // 校验存在 + validateDictionarySampleFlowNodeExists(updateReqVO.getId()); + // 更新 + DictionarySampleFlowNodeDO updateObj = BeanUtils.toBean(updateReqVO, DictionarySampleFlowNodeDO.class); + dictionarySampleFlowNodeMapper.updateById(updateObj); + } + + @Override + public void deleteDictionarySampleFlowNode(Long id) { + // 校验存在 + validateDictionarySampleFlowNodeExists(id); + // 删除 + dictionarySampleFlowNodeMapper.deleteById(id); + } + + @Override + public void deleteDictionarySampleFlowNodeListByIds(List ids) { + // 校验存在 + validateDictionarySampleFlowNodeExists(ids); + // 删除 + dictionarySampleFlowNodeMapper.deleteByIds(ids); + } + + private void validateDictionarySampleFlowNodeExists(List ids) { + List list = dictionarySampleFlowNodeMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(DICTIONARY_SAMPLE_FLOW_NODE_NOT_EXISTS); + } + } + + private void validateDictionarySampleFlowNodeExists(Long id) { + if (dictionarySampleFlowNodeMapper.selectById(id) == null) { + throw exception(DICTIONARY_SAMPLE_FLOW_NODE_NOT_EXISTS); + } + } + + @Override + public DictionarySampleFlowNodeDO getDictionarySampleFlowNode(Long id) { + return dictionarySampleFlowNodeMapper.selectById(id); + } + + @Override + public PageResult getDictionarySampleFlowNodePage(DictionarySampleFlowNodePageReqVO pageReqVO) { + return dictionarySampleFlowNodeMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleTypeService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleTypeService.java new file mode 100644 index 0000000..2c6c02a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleTypeService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.qms.business.dic.service; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypePageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypeRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypeSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionarySampleTypeDO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 样品类型字典 Service 接口 + * + * @author 后台管理 + */ +public interface DictionarySampleTypeService { + + /** + * 创建样品类型字典 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + DictionarySampleTypeRespVO createDictionarySampleType(@Valid DictionarySampleTypeSaveReqVO createReqVO); + + /** + * 更新样品类型字典 + * + * @param updateReqVO 更新信息 + */ + void updateDictionarySampleType(@Valid DictionarySampleTypeSaveReqVO updateReqVO); + + /** + * 删除样品类型字典 + * + * @param id 编号 + */ + void deleteDictionarySampleType(Long id); + + /** + * 批量删除样品类型字典 + * + * @param ids 编号 + */ + void deleteDictionarySampleTypeListByIds(List ids); + + /** + * 获得样品类型字典 + * + * @param id 编号 + * @return 样品类型字典 + */ + DictionarySampleTypeDO getDictionarySampleType(Long id); + + /** + * 获得样品类型字典分页 + * + * @param pageReqVO 分页查询 + * @return 样品类型字典分页 + */ + PageResult getDictionarySampleTypePage(DictionarySampleTypePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleTypeServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleTypeServiceImpl.java new file mode 100644 index 0000000..71abbb2 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/business/dic/service/DictionarySampleTypeServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.qms.business.dic.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypePageReqVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypeRespVO; +import cn.iocoder.yudao.module.qms.business.dic.controller.vo.DictionarySampleTypeSaveReqVO; +import cn.iocoder.yudao.module.qms.business.dic.dal.dataobject.DictionarySampleTypeDO; +import cn.iocoder.yudao.module.qms.business.dic.dal.mapper.DictionarySampleTypeMapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.DICTIONARY_SAMPLE_TYPE_NOT_EXISTS; + +/** + * 样品类型字典 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class DictionarySampleTypeServiceImpl implements DictionarySampleTypeService { + + @Resource + private DictionarySampleTypeMapper dictionarySampleTypeMapper; + + @Override + public DictionarySampleTypeRespVO createDictionarySampleType(DictionarySampleTypeSaveReqVO createReqVO) { + // 插入 + DictionarySampleTypeDO dictionarySampleType = BeanUtils.toBean(createReqVO, DictionarySampleTypeDO.class); + dictionarySampleTypeMapper.insert(dictionarySampleType); + // 返回 + return BeanUtils.toBean(dictionarySampleType, DictionarySampleTypeRespVO.class); + } + + @Override + public void updateDictionarySampleType(DictionarySampleTypeSaveReqVO updateReqVO) { + // 校验存在 + validateDictionarySampleTypeExists(updateReqVO.getId()); + // 更新 + DictionarySampleTypeDO updateObj = BeanUtils.toBean(updateReqVO, DictionarySampleTypeDO.class); + dictionarySampleTypeMapper.updateById(updateObj); + } + + @Override + public void deleteDictionarySampleType(Long id) { + // 校验存在 + validateDictionarySampleTypeExists(id); + // 删除 + dictionarySampleTypeMapper.deleteById(id); + } + + @Override + public void deleteDictionarySampleTypeListByIds(List ids) { + // 校验存在 + validateDictionarySampleTypeExists(ids); + // 删除 + dictionarySampleTypeMapper.deleteByIds(ids); + } + + private void validateDictionarySampleTypeExists(List ids) { + List list = dictionarySampleTypeMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(DICTIONARY_SAMPLE_TYPE_NOT_EXISTS); + } + } + + private void validateDictionarySampleTypeExists(Long id) { + if (dictionarySampleTypeMapper.selectById(id) == null) { + throw exception(DICTIONARY_SAMPLE_TYPE_NOT_EXISTS); + } + } + + @Override + public DictionarySampleTypeDO getDictionarySampleType(Long id) { + return dictionarySampleTypeMapper.selectById(id); + } + + @Override + public PageResult getDictionarySampleTypePage(DictionarySampleTypePageReqVO pageReqVO) { + return dictionarySampleTypeMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/admin/DataCollectionController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/admin/DataCollectionController.java new file mode 100644 index 0000000..2b0c164 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/admin/DataCollectionController.java @@ -0,0 +1,129 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.admin; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.annotation.FileUploadController; +import cn.iocoder.yudao.framework.business.controller.AbstractFileUploadController; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataCollectionDO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionPageReqVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionRespVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionSaveReqVO; +import cn.iocoder.yudao.module.qms.common.data.service.DataCollectionService; +import cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant; +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.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 数据集") +@RestController +@RequestMapping("/qms/common/data/data-collection") +@Validated +@FileUploadController(source = "common.data.datacollection") +public class DataCollectionController extends AbstractFileUploadController implements BusinessControllerMarker{ + +// static { +// FileUploadController annotation = DemoContractController.class.getAnnotation(FileUploadController.class); +// if (annotation != null) { +// setFileUploadInfo(annotation); +// } +// } + + @Resource + private DataCollectionService dataCollectionService; + + @PostMapping("/create-temp-data") + @Operation(summary = "创建临时数据集") + public CommonResult createTempData(@Valid @RequestBody DataCollectionSaveReqVO vo) { + vo.setCancelFlag("-1"); + vo.setNodeType(DataTypeConstant.DATA_TYPE_DATA); + vo.setVersion(1); + return success(dataCollectionService.createDataCollection(vo)); + } + + @PostMapping("/saveDataCollection") + @Operation(summary = "保存数据集") + @PreAuthorize("@ss.hasPermission('qms:data-collection:create')") + public CommonResult saveDataCollection(@Valid @RequestBody DataCollectionSaveReqVO createReqVO) { + return dataCollectionService.saveDataCollection(createReqVO); + } + + @PostMapping("/saveClassify") + @Operation(summary = "保存数据集分类") + @PreAuthorize("@ss.hasPermission('qms:data-collection:create')") + public CommonResult saveClassify(@Valid @RequestBody DataCollectionSaveReqVO createReqVO) { + return dataCollectionService.saveClassify(createReqVO); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除数据集") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:data-collection:delete')") + public CommonResult deleteDataCollection(@RequestParam("id") Long id) { + dataCollectionService.deleteDataCollection(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除数据集") + @PreAuthorize("@ss.hasPermission('qms:data-collection:delete')") + public CommonResult deleteDataCollectionList(@RequestBody BatchDeleteReqVO req) { + dataCollectionService.deleteDataCollectionListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得数据集") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:data-collection:query')") + public CommonResult getDataCollection(@RequestParam("id") Long id) { + DataCollectionDO dataCollection = dataCollectionService.getDataCollection(id); + return success(BeanUtils.toBean(dataCollection, DataCollectionRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得数据集分页") + public CommonResult> getDataCollectionPage(@Valid DataCollectionPageReqVO pageReqVO) { + PageResult pageResult = dataCollectionService.getDataCollectionPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, DataCollectionRespVO.class)); + } + + @GetMapping("/get-tree-data") + @Operation(summary = "查询分类树") + public CommonResult> getTreeData() { + List list = dataCollectionService.getTreeData(); + return success(BeanUtils.toBean(list, DataCollectionRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出数据集 Excel") + @PreAuthorize("@ss.hasPermission('qms:data-collection:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportDataCollectionExcel(@Valid DataCollectionPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = dataCollectionService.getDataCollectionPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "数据集.xls", "数据", DataCollectionRespVO.class, + BeanUtils.toBean(list, DataCollectionRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/admin/DataCollectionFieldController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/admin/DataCollectionFieldController.java new file mode 100644 index 0000000..33379e0 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/admin/DataCollectionFieldController.java @@ -0,0 +1,126 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.admin; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataCollectionDO; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataCollectionFieldDO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldPageReqVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldRespVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldSaveReqVO; +import cn.iocoder.yudao.module.qms.common.data.service.DataCollectionFieldService; +import cn.iocoder.yudao.module.qms.common.data.service.DataCollectionService; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +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.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.ObjectUtils; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 数据集字段") +@RestController +@RequestMapping("/qms/common/data/data-collection-field") +@Validated +public class DataCollectionFieldController implements BusinessControllerMarker { + + + @Resource private DataCollectionFieldService dataCollectionFieldService; + @Resource private DataCollectionService dataCollectionService; + + + @GetMapping("/queryEffectiveFields") + @Operation(summary = "通过数据集Key查询字段列表") + public CommonResult> queryEffectiveFields(@Valid DataCollectionFieldPageReqVO pageReqVO) { + String dataCollectionKey = pageReqVO.getDataCollectionKey(); + Long dataCollectionId = pageReqVO.getDataCollectionId(); + if(!ObjectUtils.isEmpty(dataCollectionKey)){ + DataCollectionDO dataCollectionDO = dataCollectionService.getLatestDataCollectionByKey(dataCollectionKey); + if(dataCollectionDO == null) + return CommonResult.error(0,"数据集字段获取失败,请联系管理员处理:" + dataCollectionKey); + dataCollectionId = dataCollectionDO.getId(); + } + if(dataCollectionId == null) + return CommonResult.error(0,"数据集字段获取失败,缺少参数,请联系管理员处理"); + List dataCollectionFieldDOList = dataCollectionFieldService.queryEffectiveListByDataCollectionId(dataCollectionId); + return success(BeanUtils.toBean(dataCollectionFieldDOList, DataCollectionFieldRespVO.class)); + } + + @PostMapping("/create") + @Operation(summary = "创建数据集字段") + @PreAuthorize("@ss.hasPermission('qms:data-collection-field:create')") + public CommonResult createDataCollectionField(@Valid @RequestBody DataCollectionFieldSaveReqVO createReqVO) { + return success(dataCollectionFieldService.createDataCollectionField(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新数据集字段") + @PreAuthorize("@ss.hasPermission('qms:data-collection-field:update')") + public CommonResult updateDataCollectionField(@Valid @RequestBody DataCollectionFieldSaveReqVO updateReqVO) { + dataCollectionFieldService.updateDataCollectionField(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除数据集字段") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:data-collection-field:delete')") + public CommonResult deleteDataCollectionField(@RequestParam("id") Long id) { + dataCollectionFieldService.deleteDataCollectionField(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除数据集字段") + @PreAuthorize("@ss.hasPermission('qms:data-collection-field:delete')") + public CommonResult deleteDataCollectionFieldList(@RequestBody BatchDeleteReqVO req) { + dataCollectionFieldService.deleteDataCollectionFieldListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得数据集字段") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:data-collection-field:query')") + public CommonResult getDataCollectionField(@RequestParam("id") Long id) { + DataCollectionFieldDO dataCollectionField = dataCollectionFieldService.getDataCollectionField(id); + return success(BeanUtils.toBean(dataCollectionField, DataCollectionFieldRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得数据集字段分页") + public CommonResult> getDataCollectionFieldPage(@Valid DataCollectionFieldPageReqVO pageReqVO) { + PageResult pageResult = dataCollectionFieldService.getDataCollectionFieldPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, DataCollectionFieldRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出数据集字段 Excel") + @PreAuthorize("@ss.hasPermission('qms:data-collection-field:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportDataCollectionFieldExcel(@Valid DataCollectionFieldPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = dataCollectionFieldService.getDataCollectionFieldPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "数据集字段.xls", "数据", DataCollectionFieldRespVO.class, + BeanUtils.toBean(list, DataCollectionFieldRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/admin/DataFormController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/admin/DataFormController.java new file mode 100644 index 0000000..bc9884f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/admin/DataFormController.java @@ -0,0 +1,116 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.admin; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.annotation.FileUploadController; +import cn.iocoder.yudao.framework.business.controller.AbstractFileUploadController; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.*; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataFormDO; +import cn.iocoder.yudao.module.qms.common.data.service.DataFormService; +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.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 通用数据") +@RestController +@RequestMapping("/qms/common/data/data-form") +@Validated +@FileUploadController(source = "qms.dataform") +public class DataFormController extends AbstractFileUploadController implements BusinessControllerMarker{ + + static { + FileUploadController annotation = DataFormController.class.getAnnotation(FileUploadController.class); + if (annotation != null) { + setFileUploadInfo(annotation); + } + } + + @Resource + private DataFormService dataFormService; + + + @PostMapping("/createProcessInstance") + @Operation(summary = "示例代码:发起流程") + public CommonResult createProcessInstance(@Valid @RequestBody DataFormSaveReqVO entity) { + return success(dataFormService.createProcessInstance(entity)); + } + + @PostMapping("/create") + @Operation(summary = "创建通用数据") + public CommonResult createDataForm(@Valid @RequestBody DataFormSaveReqVO createReqVO) { + return success(dataFormService.createDataForm(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新通用数据") + @PreAuthorize("@ss.hasPermission('qms:data-form:update')") + public CommonResult updateDataForm(@Valid @RequestBody DataFormSaveReqVO updateReqVO) { + dataFormService.updateDataForm(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除通用数据") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:data-form:delete')") + public CommonResult deleteDataForm(@RequestParam("id") Long id) { + dataFormService.deleteDataForm(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除通用数据") + @PreAuthorize("@ss.hasPermission('qms:data-form:delete')") + public CommonResult deleteDataFormList(@RequestBody BatchDeleteReqVO req) { + dataFormService.deleteDataFormListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得通用数据") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + public CommonResult getDataForm(@RequestParam("id") Long id) { + DataFormDO dataForm = dataFormService.getDataForm(id); + return success(BeanUtils.toBean(dataForm, DataFormRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得通用数据分页") + public CommonResult> getDataFormPage(@Valid DataFormPageReqVO pageReqVO) { + PageResult pageResult = dataFormService.getDataFormPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, DataFormRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出通用数据 Excel") + @PreAuthorize("@ss.hasPermission('qms:data-form:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportDataFormExcel(@Valid DataFormPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = dataFormService.getDataFormPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "通用数据.xls", "数据", DataFormRespVO.class, + BeanUtils.toBean(list, DataFormRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldPageReqVO.java new file mode 100644 index 0000000..7ca077f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldPageReqVO.java @@ -0,0 +1,51 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +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 DataCollectionFieldPageReqVO extends PageParam { + + @Schema(description = "数据集ID", example = "1538") + private Long dataCollectionId; + + @Schema(description = "名称", example = "李四") + private String fieldName; + + @Schema(description = "字段key") + private String fieldKey; + + @Schema(description = "字段类型,【字典】【jy_data_collect_field_type】文件、记录、模板", example = "1") + private String fieldType; + + @Schema(description = "禁用状态,0-启用;1-禁用") + private String cancelFlag; + + @Schema(description = "排序号") + private Integer sortNo; + + @Schema(description = "其他配置") + private String customConfig; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + //===================扩展字段============ + @Schema(description = "数据集Key") + private String dataCollectionKey; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldRespVO.java new file mode 100644 index 0000000..be1b962 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldRespVO.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.vo; + +import cn.iocoder.yudao.module.qms.core.aspect.annotation.Dict; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant.DICT_ANNOTATION_KEY_TYPE_ID; + +@Schema(description = "管理后台 - 数据集字段 Response VO") +@Data +@ExcelIgnoreUnannotated +public class DataCollectionFieldRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "21752") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "数据集ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1538") + @ExcelProperty("数据集ID") + private Long dataCollectionId; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("名称") + private String fieldName; + + @Schema(description = "字段key", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("字段key") + private String fieldKey; + + @Schema(description = "字段类型", example = "1") + @ExcelProperty("字段类型") + @Dict(dicCode = "dataCollectFieldType") + private String fieldType; + + @Schema(description = "禁用状态,0-启用;1-禁用") + @ExcelProperty("禁用状态,0-启用;1-禁用") + private String cancelFlag; + + @Schema(description = "排序号") + @ExcelProperty("排序号") + private Integer sortNo; + + @Schema(description = "其他配置") + @ExcelProperty("其他配置") + private String customConfig; + + @Schema(description = "所属部门") + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldSaveReqVO.java new file mode 100644 index 0000000..28fec28 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionFieldSaveReqVO.java @@ -0,0 +1,45 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "管理后台 - 数据集字段新增/修改 Request VO") +@Data +public class DataCollectionFieldSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "21752") + private Long id; + + @Schema(description = "数据集ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1538") + @NotNull(message = "数据集ID不能为空") + private Long dataCollectionId; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "名称不能为空") + private String fieldName; + + @Schema(description = "字段key", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "字段key不能为空") + private String fieldKey; + + @Schema(description = "字段类型,【字典】【jy_data_collect_field_type】文件、记录、模板", example = "1") + private String fieldType; + + @Schema(description = "禁用状态") + private String cancelFlag; + + @Schema(description = "排序号") + private Integer sortNo; + + @Schema(description = "其他配置") + private String customConfig; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionPageReqVO.java new file mode 100644 index 0000000..b36d788 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionPageReqVO.java @@ -0,0 +1,74 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +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 DataCollectionPageReqVO extends PageParam { + + @Schema(description = "上级id", example = "28344") + private Long parentId; + + @Schema(description = "主id") + private Long mainId; + + @Schema(description = "id路径") + private String idPath; + + @Schema(description = "名称", example = "赵六") + private String name; + + @Schema(description = "节点类型,category-分类;form-表单", example = "2") + private String nodeType; + + @Schema(description = "数据键,【字典】【jy_data_collect_key】文件、记录、模板") + private String dataKey; + + @Schema(description = "版本") + private Integer version; + + @Schema(description = "是否最新版本,默认显示最新版本") + private String currentFlag; + + @Schema(description = "禁用状态,0-启用;1-禁用") + private String cancelFlag; + + @Schema(description = "是否流程审批") + private String flowFlag; + + @Schema(description = "表单key") + private String formKey; + + @Schema(description = "表单版本id", example = "24468") + private String formVersionId; + + @Schema(description = "流程key") + private String flowKey; + + @Schema(description = "流程版本id", example = "23527") + private String flowVersionId; + + @Schema(description = "排序号") + private Integer sortNo; + + @Schema(description = "其他配置") + private String customConfig; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionRespVO.java new file mode 100644 index 0000000..104aca6 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionRespVO.java @@ -0,0 +1,95 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 数据集 Response VO") +@Data +@ExcelIgnoreUnannotated +public class DataCollectionRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "21859") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "主id") + @ExcelProperty("主id,用于标识版本") + private Long mainId; + + @Schema(description = "上级id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28344") + @ExcelProperty("上级id") + private Long parentId; + + @Schema(description = "id路径", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("id路径") + private String idPath; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @ExcelProperty("名称") + private String name; + + @Schema(description = "节点类型,category-分类;form-表单", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("节点类型,category-分类;form-表单") + private String nodeType; + + @Schema(description = "数据键,【字典】【jy_data_collect_key】文件、记录、模板") + @ExcelProperty("数据键,【字典】【jy_data_collect_key】文件、记录、模板") + private String dataKey; + + @Schema(description = "版本") + @ExcelProperty("版本") + private Integer version; + + @Schema(description = "是否最新版本,默认显示最新版本") + @ExcelProperty("是否最新版本,默认显示最新版本") + private String currentFlag; + + @Schema(description = "禁用状态,0-启用;1-禁用") + @ExcelProperty("禁用状态,0-启用;1-禁用") + private String cancelFlag; + + @Schema(description = "是否流程审批") + @ExcelProperty("是否流程审批") + private String flowFlag; + + @Schema(description = "表单key") + @ExcelProperty("表单key") + private String formKey; + + @Schema(description = "表单版本id", example = "24468") + @ExcelProperty("表单版本id") + private String formVersionId; + + @Schema(description = "流程key") + @ExcelProperty("流程key") + private String flowKey; + + @Schema(description = "流程版本id", example = "23527") + @ExcelProperty("流程版本id") + private String flowVersionId; + + @Schema(description = "排序号") + @ExcelProperty("排序号") + private Integer sortNo; + + @Schema(description = "其他配置") + @ExcelProperty("其他配置") + private String customConfig; + + @Schema(description = "所属部门") + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionSaveReqVO.java new file mode 100644 index 0000000..25a15a8 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataCollectionSaveReqVO.java @@ -0,0 +1,84 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.util.List; + +@Schema(description = "管理后台 - 数据集新增/修改 Request VO") +@Data +public class DataCollectionSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "21859") + private Long id; + + @Schema(description = "主id") + private Long mainId; + + @Schema(description = "上级id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28344") + @NotNull(message = "上级id不能为空") + private Long parentId; + + @Schema(description = "id路径") +// @NotEmpty(message = "id路径不能为空") + private String idPath; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + private String name; + + @Schema(description = "节点类型", example = "2") +// @NotEmpty(message = "节点类型不能为空") + private String nodeType; + + @Schema(description = "数据键") +// @NotEmpty(message = "数据键") + private String dataKey; + + @Schema(description = "版本") + private Integer version; + + @Schema(description = "是否最新版本") + private String currentFlag; + + @Schema(description = "禁用状态") + private String cancelFlag; + + @Schema(description = "是否流程审批") + private String flowFlag; + + @Schema(description = "表单key") + private String formKey; + + @Schema(description = "表单版本id", example = "24468") + private String formVersionId; + + @Schema(description = "流程key") + private String flowKey; + + @Schema(description = "流程版本id", example = "23527") + private String flowVersionId; + + @Schema(description = "排序号") + private Integer sortNo; + + @Schema(description = "其他配置") + private String customConfig; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "是否创建新版本") + private String newVersionFlag; + + @Schema(description = "字段列表") + private List fieldList; + + @Schema(description = "删除字段") + private String deleteFieldIds; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataFormPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataFormPageReqVO.java new file mode 100644 index 0000000..26f4002 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataFormPageReqVO.java @@ -0,0 +1,81 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +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 DataFormPageReqVO extends PageParam { + + @Schema(description = "数据集ID", example = "19782") + private Long dataCollectionId; + + @Schema(description = "主表数据id,支持", example = "28589") + private Long parentId; + + @Schema(description = "业务数据ID", example = "18836") + private Long businessId; + + @Schema(description = "业务类型,【字典】【jy_data_collect_bsn_type】人员履历、人员学历记录、人员资质、安全记录等", example = "1") + private String businessType; + + @Schema(description = "业务类型编码") + private String businessTypeCode; + + @Schema(description = "申请人") + private String applyUser; + + @Schema(description = "申请人id", example = "9284") + private Long applyUserId; + + @Schema(description = "申请部门") + private String applyDepartment; + + @Schema(description = "申请部门id", example = "12524") + private Long applyDepartmentId; + + @Schema(description = "申请时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] applyTime; + + @Schema(description = "提交状态,0-未提交;1-已提交", example = "1") + private String submitStatus; + + @Schema(description = "审批状态,0-未审批;1-已审批", example = "2") + private String approvalStatus; + + @Schema(description = "使用状态", example = "1") + private String useStatus; + + @Schema(description = "表单数据,表单数据") + private String formData; + + @Schema(description = "表单模板,表单编辑器模板") + private String formTemplate; + + @Schema(description = "流程实例id", example = "23679") + private String flowInstanceId; + + @Schema(description = "流程审批状态", example = "1") + private String flowStatus; + + @Schema(description = "审批意见") + private String opinion; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataFormRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataFormRespVO.java new file mode 100644 index 0000000..0f36472 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataFormRespVO.java @@ -0,0 +1,103 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 通用数据 Response VO") +@Data +@ExcelIgnoreUnannotated +public class DataFormRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "20760") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "数据集ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19782") + @ExcelProperty("数据集ID") + private Long dataCollectionId; + + @Schema(description = "主表数据id,支持", requiredMode = Schema.RequiredMode.REQUIRED, example = "28589") + @ExcelProperty("主表数据id,支持") + private Long parentId; + + @Schema(description = "业务数据ID", example = "18836") + @ExcelProperty("业务数据ID") + private Long businessId; + + @Schema(description = "业务类型,【字典】【jy_data_collect_bsn_type】人员履历、人员学历记录、人员资质、安全记录等", example = "1") + @ExcelProperty("业务类型,【字典】【jy_data_collect_bsn_type】人员履历、人员学历记录、人员资质、安全记录等") + private String businessType; + + @Schema(description = "业务类型编码") + @ExcelProperty("业务类型编码") + private String businessTypeCode; + + @Schema(description = "申请人") + @ExcelProperty("申请人") + private String applyUser; + + @Schema(description = "申请人id", example = "9284") + @ExcelProperty("申请人id") + private Long applyUserId; + + @Schema(description = "申请部门") + @ExcelProperty("申请部门") + private String applyDepartment; + + @Schema(description = "申请部门id", example = "12524") + @ExcelProperty("申请部门id") + private Long applyDepartmentId; + + @Schema(description = "申请时间") + @ExcelProperty("申请时间") + private LocalDateTime applyTime; + + @Schema(description = "提交状态,0-未提交;1-已提交", example = "1") + @ExcelProperty("提交状态,0-未提交;1-已提交") + private String submitStatus; + + @Schema(description = "审批状态,0-未审批;1-已审批", example = "2") + @ExcelProperty("审批状态,0-未审批;1-已审批") + private String approvalStatus; + + @Schema(description = "使用状态", example = "1") + @ExcelProperty("使用状态") + private String useStatus; + + @Schema(description = "表单数据,表单数据") + @ExcelProperty("表单数据,表单数据") + private String formData; + + @Schema(description = "表单模板,表单编辑器模板") + @ExcelProperty("表单模板,表单编辑器模板") + private String formTemplate; + + @Schema(description = "流程实例id", example = "23679") + @ExcelProperty("流程实例id") + private String flowInstanceId; + + @Schema(description = "流程审批状态", example = "1") + @ExcelProperty("流程审批状态") + private String flowStatus; + + @Schema(description = "审批意见") + @ExcelProperty("审批意见") + private String opinion; + + @Schema(description = "所属部门") + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataFormSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataFormSaveReqVO.java new file mode 100644 index 0000000..c2440d2 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/controller/vo/DataFormSaveReqVO.java @@ -0,0 +1,76 @@ +package cn.iocoder.yudao.module.qms.common.data.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 通用数据新增/修改 Request VO") +@Data +public class DataFormSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "20760") + private Long id; + + @Schema(description = "数据集ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19782") + private Long dataCollectionId; + + @Schema(description = "主表数据id,支持", requiredMode = Schema.RequiredMode.REQUIRED, example = "28589") + private Long parentId; + + @Schema(description = "业务数据ID", example = "18836") + private Long businessId; + + @Schema(description = "业务类型,【字典】【jy_data_collect_bsn_type】人员履历、人员学历记录、人员资质、安全记录等", example = "1") + private String businessType; + + @Schema(description = "业务类型编码") + private String businessTypeCode; + + @Schema(description = "申请人") + private String applyUser; + + @Schema(description = "申请人id", example = "9284") + private Long applyUserId; + + @Schema(description = "申请部门") + private String applyDepartment; + + @Schema(description = "申请部门id", example = "12524") + private Long applyDepartmentId; + + @Schema(description = "申请时间") + private LocalDateTime applyTime; + + @Schema(description = "提交状态,0-未提交;1-已提交", example = "1") + private String submitStatus; + + @Schema(description = "审批状态,0-未审批;1-已审批", example = "2") + private String approvalStatus; + + @Schema(description = "使用状态", example = "1") + private String useStatus; + + @Schema(description = "表单数据,表单数据") + private String formData; + + @Schema(description = "表单模板,表单编辑器模板") + private String formTemplate; + + @Schema(description = "流程实例id", example = "23679") + private String flowInstanceId; + + @Schema(description = "流程审批状态", example = "1") + private String flowStatus; + + @Schema(description = "审批意见") + private String opinion; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/dataobject/DataCollectionDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/dataobject/DataCollectionDO.java new file mode 100644 index 0000000..c8a65a7 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/dataobject/DataCollectionDO.java @@ -0,0 +1,122 @@ +package cn.iocoder.yudao.module.qms.common.data.dal.dataobject; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; +/** +* 数据集 DO +* +* @author 后台管理 +*/ +@TableName("t_dat_colt") +@KeySequence("t_dat_colt_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class DataCollectionDO extends BusinessBaseDO { + + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + + //主id + @TableField("MAIN_ID") + private Long mainId; + + /** + * 上级id + */ + @TableField("PRN_ID") + private Long parentId; + /** + * id路径 + */ + @TableField("ID_PATH") + private String idPath; + /** + * 名称 + */ + @TableField("NAME") + private String name; + /** + * 节点类型,category-分类;form-表单 + */ + @TableField("NDE_TP") + private String nodeType; + /** + * 数据键,【字典】【jy_data_collect_key】文件、记录、模板 + */ + @TableField("DAT_KY") + private String dataKey; + /** + * 版本 + */ + @TableField("VER") + private Integer version; + /** + * 是否最新版本,默认显示最新版本 + */ + @TableField("CRNT_FLG") + private Integer currentFlag; + /** + * 禁用状态,0-启用;1-禁用 + */ + @TableField("CNL_FLG") + private String cancelFlag; + /** + * 是否流程审批 + */ + @TableField("FLW_FLG") + private String flowFlag; + /** + * 表单key + */ + @TableField("FORM_KY") + private String formKey; + /** + * 表单版本id + */ + @TableField("FORM_VER_ID") + private String formVersionId; + /** + * 流程key + */ + @TableField("FLW_KY") + private String flowKey; + /** + * 流程版本id + */ + @TableField("FLW_VER_ID") + private String flowVersionId; + /** + * 排序号 + */ + @TableField("SRT_NO") + private Integer sortNo; + /** + * 其他配置 + */ + @TableField("CST_CFG") + private String customConfig; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/dataobject/DataCollectionFieldDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/dataobject/DataCollectionFieldDO.java new file mode 100644 index 0000000..0cb9e3e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/dataobject/DataCollectionFieldDO.java @@ -0,0 +1,78 @@ +package cn.iocoder.yudao.module.qms.common.data.dal.dataobject; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; + +/** +* 数据集字段 DO +* +* @author 后台管理 +*/ +@TableName("t_dat_colt_fld") +@KeySequence("t_dat_colt_fld_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class DataCollectionFieldDO extends BusinessBaseDO { + + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 数据集ID + */ + @TableField("DAT_COLT_ID") + private Long dataCollectionId; + /** + * 名称 + */ + @TableField("FLD_NAME") + private String fieldName; + /** + * 字段key + */ + @TableField("FLD_KY") + private String fieldKey; + /** + * 字段类型,【字典】【jy_data_collect_field_type】文件、记录、模板 + */ + @TableField("FLD_TP") + private String fieldType; + /** + * 禁用状态,0-启用;1-禁用 + */ + @TableField("CNL_FLG") + private String cancelFlag; + /** + * 排序号 + */ + @TableField("SRT_NO") + private Integer sortNo; + /** + * 其他配置 + */ + @TableField("CST_CFG") + private String customConfig; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/dataobject/DataFormDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/dataobject/DataFormDO.java new file mode 100644 index 0000000..79fc071 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/dataobject/DataFormDO.java @@ -0,0 +1,134 @@ +package cn.iocoder.yudao.module.qms.common.data.dal.dataobject; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; + +import java.time.LocalDateTime; +/** +* 通用数据 DO +* +* @author 后台管理 +*/ +@TableName("t_dat_form") +@KeySequence("t_dat_form_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class DataFormDO extends BusinessBaseDO { + + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 数据集ID + */ + @TableField("DAT_COLT_ID") + private Long dataCollectionId; + /** + * 主表数据id,支持 + */ + @TableField("PRN_ID") + private Long parentId; + /** + * 业务数据ID + */ + @TableField("BSN_ID") + private Long businessId; + /** + * 业务类型,【字典】【jy_data_collect_bsn_type】人员履历、人员学历记录、人员资质、安全记录等 + */ + @TableField("BSN_TP") + private String businessType; + /** + * 业务类型编码 + */ + @TableField("BSN_TP_CD") + private String businessTypeCode; + /** + * 申请人 + */ + @TableField("APL_USER") + private String applyUser; + /** + * 申请人id + */ + @TableField("APL_USER_ID") + private Long applyUserId; + /** + * 申请部门 + */ + @TableField("APL_DEPT") + private String applyDepartment; + /** + * 申请部门id + */ + @TableField("APL_DEPT_ID") + private Long applyDepartmentId; + /** + * 申请时间 + */ + @TableField("APL_TM") + private LocalDateTime applyTime; + /** + * 提交状态,0-未提交;1-已提交 + */ + @TableField("SBM_STS") + private String submitStatus; + /** + * 审批状态,0-未审批;1-已审批 + */ + @TableField("APRV_STS") + private String approvalStatus; + /** + * 使用状态 + */ + @TableField("USE_STS") + private String useStatus; + /** + * 表单数据,表单数据 + */ + @TableField("FORM_DAT") + private String formData; + /** + * 表单模板,表单编辑器模板 + */ + @TableField("FORM_TMPL") + private String formTemplate; + /** + * 流程实例id + */ + @TableField("FLW_INSC_ID") + private String flowInstanceId; + /** + * 流程审批状态 + */ + @TableField("FLW_STS") + private String flowStatus; + /** + * 审批意见 + */ + @TableField("ONN") + private String opinion; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionFieldMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionFieldMapper.java new file mode 100644 index 0000000..6a5eb55 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionFieldMapper.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.qms.common.data.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldPageReqVO; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataCollectionFieldDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 数据集字段 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface DataCollectionFieldMapper extends BaseMapperX { + + default PageResult selectPage(DataCollectionFieldPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(DataCollectionFieldDO::getDataCollectionId, reqVO.getDataCollectionId()) + .likeIfPresent(DataCollectionFieldDO::getFieldName, reqVO.getFieldName()) + .eqIfPresent(DataCollectionFieldDO::getFieldKey, reqVO.getFieldKey()) + .eqIfPresent(DataCollectionFieldDO::getFieldType, reqVO.getFieldType()) + .eqIfPresent(DataCollectionFieldDO::getCancelFlag, reqVO.getCancelFlag()) + .eqIfPresent(DataCollectionFieldDO::getSortNo, reqVO.getSortNo()) + .eqIfPresent(DataCollectionFieldDO::getCustomConfig, reqVO.getCustomConfig()) + .eqIfPresent(DataCollectionFieldDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .eqIfPresent(DataCollectionFieldDO::getRemark, reqVO.getRemark()) + .betweenIfPresent(DataCollectionFieldDO::getCreateTime, reqVO.getCreateTime()) + .orderByAsc(DataCollectionFieldDO::getSortNo)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionMapper.java new file mode 100644 index 0000000..1149202 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionMapper.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.qms.common.data.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionPageReqVO; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataCollectionDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 数据集 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface DataCollectionMapper extends BaseMapperX { + + default PageResult selectPage(DataCollectionPageReqVO reqVO) { + + LambdaQueryWrapperX wrapper = new LambdaQueryWrapperX<>(); + wrapper.ne(DataCollectionDO::getCancelFlag, -1); //-1为临时数据 + wrapper.eqIfPresent(DataCollectionDO::getParentId, reqVO.getParentId()); + wrapper.eqIfPresent(DataCollectionDO::getMainId, reqVO.getMainId()); + wrapper.eqIfPresent(DataCollectionDO::getIdPath, reqVO.getIdPath()); + wrapper.likeIfPresent(DataCollectionDO::getName, reqVO.getName()); + wrapper.eqIfPresent(DataCollectionDO::getNodeType, reqVO.getNodeType()); + wrapper.eqIfPresent(DataCollectionDO::getDataKey, reqVO.getDataKey()); + wrapper.eqIfPresent(DataCollectionDO::getVersion, reqVO.getVersion()); + wrapper.eqIfPresent(DataCollectionDO::getCurrentFlag, reqVO.getCurrentFlag()); + wrapper.eqIfPresent(DataCollectionDO::getCancelFlag, reqVO.getCancelFlag()); + wrapper.eqIfPresent(DataCollectionDO::getFlowFlag, reqVO.getFlowFlag()); + wrapper.eqIfPresent(DataCollectionDO::getFormKey, reqVO.getFormKey()); + wrapper.eqIfPresent(DataCollectionDO::getFormVersionId, reqVO.getFormVersionId()); + wrapper.eqIfPresent(DataCollectionDO::getFlowKey, reqVO.getFlowKey()); + wrapper.eqIfPresent(DataCollectionDO::getFlowVersionId, reqVO.getFlowVersionId()); + wrapper.eqIfPresent(DataCollectionDO::getSortNo, reqVO.getSortNo()); + wrapper.eqIfPresent(DataCollectionDO::getCustomConfig, reqVO.getCustomConfig()); + wrapper.eqIfPresent(DataCollectionDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()); + wrapper.eqIfPresent(DataCollectionDO::getRemark, reqVO.getRemark()); + wrapper.betweenIfPresent(DataCollectionDO::getCreateTime, reqVO.getCreateTime()); + + if(reqVO.getMainId() != null){ + wrapper.orderByDesc(DataCollectionDO::getVersion); + } + wrapper.orderByAsc(DataCollectionDO::getSortNo); + + return selectPage(reqVO, wrapper); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataFormMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataFormMapper.java new file mode 100644 index 0000000..593a7df --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataFormMapper.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.qms.common.data.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.*; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataFormDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 通用数据 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface DataFormMapper extends BaseMapperX { + + default PageResult selectPage(DataFormPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(DataFormDO::getDataCollectionId, reqVO.getDataCollectionId()) + .eqIfPresent(DataFormDO::getParentId, reqVO.getParentId()) + .eqIfPresent(DataFormDO::getBusinessId, reqVO.getBusinessId()) + .eqIfPresent(DataFormDO::getBusinessType, reqVO.getBusinessType()) + .eqIfPresent(DataFormDO::getBusinessTypeCode, reqVO.getBusinessTypeCode()) + .eqIfPresent(DataFormDO::getApplyUser, reqVO.getApplyUser()) + .eqIfPresent(DataFormDO::getApplyUserId, reqVO.getApplyUserId()) + .eqIfPresent(DataFormDO::getApplyDepartment, reqVO.getApplyDepartment()) + .eqIfPresent(DataFormDO::getApplyDepartmentId, reqVO.getApplyDepartmentId()) + .betweenIfPresent(DataFormDO::getApplyTime, reqVO.getApplyTime()) + .eqIfPresent(DataFormDO::getSubmitStatus, reqVO.getSubmitStatus()) + .eqIfPresent(DataFormDO::getApprovalStatus, reqVO.getApprovalStatus()) + .eqIfPresent(DataFormDO::getUseStatus, reqVO.getUseStatus()) + .eqIfPresent(DataFormDO::getFormData, reqVO.getFormData()) + .eqIfPresent(DataFormDO::getFormTemplate, reqVO.getFormTemplate()) + .eqIfPresent(DataFormDO::getFlowInstanceId, reqVO.getFlowInstanceId()) + .eqIfPresent(DataFormDO::getFlowStatus, reqVO.getFlowStatus()) + .eqIfPresent(DataFormDO::getOpinion, reqVO.getOpinion()) + .eqIfPresent(DataFormDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .eqIfPresent(DataFormDO::getRemark, reqVO.getRemark()) + .betweenIfPresent(DataFormDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(DataFormDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionFieldService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionFieldService.java new file mode 100644 index 0000000..8365226 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionFieldService.java @@ -0,0 +1,75 @@ +package cn.iocoder.yudao.module.qms.common.data.service; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldPageReqVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldRespVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldSaveReqVO; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataCollectionFieldDO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 数据集字段 Service 接口 + * + * @author 后台管理 + */ +public interface DataCollectionFieldService { + + /** + * 创建数据集字段 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + DataCollectionFieldRespVO createDataCollectionField(@Valid DataCollectionFieldSaveReqVO createReqVO); + + + //保存字段 + CommonResult saveFields(List fieldList, Long dcId, String newVersionFlag); + + //删除字段 + CommonResult deleteFields(String deleteFieldIds, Long dcId); + + /** + * 更新数据集字段 + * + * @param updateReqVO 更新信息 + */ + void updateDataCollectionField(@Valid DataCollectionFieldSaveReqVO updateReqVO); + + /** + * 删除数据集字段 + * + * @param id 编号 + */ + void deleteDataCollectionField(Long id); + + /** + * 批量删除数据集字段 + * + * @param ids 编号 + */ + void deleteDataCollectionFieldListByIds(List ids); + + /** + * 获得数据集字段 + * + * @param id 编号 + * @return 数据集字段 + */ + DataCollectionFieldDO getDataCollectionField(Long id); + + /** + * 获得数据集字段分页 + * + * @param pageReqVO 分页查询 + * @return 数据集字段分页 + */ + PageResult getDataCollectionFieldPage(DataCollectionFieldPageReqVO pageReqVO); + + + List queryEffectiveListByDataCollectionId(Long dataCollectionId); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionFieldServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionFieldServiceImpl.java new file mode 100644 index 0000000..ff71e5a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionFieldServiceImpl.java @@ -0,0 +1,145 @@ +package cn.iocoder.yudao.module.qms.common.data.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataCollectionFieldDO; +import cn.iocoder.yudao.module.qms.common.data.dal.mapper.DataCollectionFieldMapper; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldPageReqVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldRespVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldSaveReqVO; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.util.ObjectUtils; +import org.springframework.validation.annotation.Validated; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.DATA_COLLECTION_FIELD_NOT_EXISTS; + +/** + * 数据集字段 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class DataCollectionFieldServiceImpl implements DataCollectionFieldService { + + @Resource + private DataCollectionFieldMapper dataCollectionFieldMapper; + + @Override + public CommonResult saveFields(List fieldList, Long dcId, String newVersionFlag) { + List updateList = new ArrayList<>(); + List insertList = new ArrayList<>(); + if(fieldList == null) + fieldList = new ArrayList<>(); + if("1".equals(newVersionFlag)){ + //新版本,所有字段都做插入处理 + for (DataCollectionFieldSaveReqVO field : fieldList) { + DataCollectionFieldDO entity = BeanUtils.toBean(field, DataCollectionFieldDO.class); + entity.setId(null); + entity.setDataCollectionId(dcId); + insertList.add(entity); + } + if(!insertList.isEmpty()) + dataCollectionFieldMapper.insertBatch(insertList); + return CommonResult.success("保存成功"); + } + for(DataCollectionFieldSaveReqVO field : fieldList){ + DataCollectionFieldDO entity = BeanUtils.toBean(field, DataCollectionFieldDO.class); + entity.setDataCollectionId(dcId); + if(field.getId() != null) + updateList.add(entity); + else + insertList.add(entity); + } + if(!insertList.isEmpty()) + dataCollectionFieldMapper.insertBatch(insertList); + if(!updateList.isEmpty()) + dataCollectionFieldMapper.updateBatch(updateList); + return CommonResult.success("保存成功"); + } + + + @Override + public CommonResult deleteFields(String deleteFieldIds, Long dcId) { + if(ObjectUtils.isEmpty(deleteFieldIds)) + return CommonResult.success(""); + List ids = Arrays.asList(deleteFieldIds.split(",")).stream().map(Long::parseLong).toList(); + dataCollectionFieldMapper.deleteByIds(ids); + return CommonResult.success("删除成功"); + } + + @Override + public DataCollectionFieldRespVO createDataCollectionField(DataCollectionFieldSaveReqVO createReqVO) { + // 插入 + DataCollectionFieldDO dataCollectionField = BeanUtils.toBean(createReqVO, DataCollectionFieldDO.class); + dataCollectionFieldMapper.insert(dataCollectionField); + // 返回 + return BeanUtils.toBean(dataCollectionField, DataCollectionFieldRespVO.class); + } + + @Override + public void updateDataCollectionField(DataCollectionFieldSaveReqVO updateReqVO) { + // 校验存在 + validateDataCollectionFieldExists(updateReqVO.getId()); + // 更新 + DataCollectionFieldDO updateObj = BeanUtils.toBean(updateReqVO, DataCollectionFieldDO.class); + dataCollectionFieldMapper.updateById(updateObj); + } + + @Override + public void deleteDataCollectionField(Long id) { + // 校验存在 + validateDataCollectionFieldExists(id); + // 删除 + dataCollectionFieldMapper.deleteById(id); + } + + @Override + public void deleteDataCollectionFieldListByIds(List ids) { + // 校验存在 + validateDataCollectionFieldExists(ids); + // 删除 + dataCollectionFieldMapper.deleteByIds(ids); + } + + private void validateDataCollectionFieldExists(List ids) { + List list = dataCollectionFieldMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(DATA_COLLECTION_FIELD_NOT_EXISTS); + } + } + + private void validateDataCollectionFieldExists(Long id) { + if (dataCollectionFieldMapper.selectById(id) == null) { + throw exception(DATA_COLLECTION_FIELD_NOT_EXISTS); + } + } + + @Override + public DataCollectionFieldDO getDataCollectionField(Long id) { + return dataCollectionFieldMapper.selectById(id); + } + + @Override + public PageResult getDataCollectionFieldPage(DataCollectionFieldPageReqVO pageReqVO) { + return dataCollectionFieldMapper.selectPage(pageReqVO); + } + + @Override + public List queryEffectiveListByDataCollectionId(Long dataCollectionId) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper() + .eq(DataCollectionFieldDO::getDataCollectionId, dataCollectionId) + .eq(DataCollectionFieldDO::getCancelFlag, 0) + .orderByAsc(DataCollectionFieldDO::getSortNo); + return dataCollectionFieldMapper.selectList(queryWrapper); + } +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionService.java new file mode 100644 index 0000000..6595e82 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionService.java @@ -0,0 +1,81 @@ +package cn.iocoder.yudao.module.qms.common.data.service; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataCollectionDO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionPageReqVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionRespVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionSaveReqVO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 数据集 Service 接口 + * + * @author 后台管理 + */ +public interface DataCollectionService { + + DataCollectionDO getLatestDataCollectionByKey(String key); + + /*获取分类树数据*/ + List getTreeData(); + + //保存数据集 + CommonResult saveDataCollection(@Valid DataCollectionSaveReqVO createReqVO); + CommonResult saveDataCollectionWithNewVersion(@Valid DataCollectionSaveReqVO createReqVO); + + //保存分类 + CommonResult saveClassify(@Valid DataCollectionSaveReqVO createReqVO); + + //更新后代节点路径-递归调用 + CommonResult updateAllIdPath(Long parentId, Integer level); + + /** + * 创建数据集 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + DataCollectionRespVO createDataCollection(@Valid DataCollectionSaveReqVO createReqVO); + + /** + * 更新数据集 + * + * @param updateReqVO 更新信息 + */ + void updateDataCollection(@Valid DataCollectionSaveReqVO updateReqVO); + + /** + * 删除数据集 + * + * @param id 编号 + */ + void deleteDataCollection(Long id); + + /** + * 批量删除数据集 + * + * @param ids 编号 + */ + void deleteDataCollectionListByIds(List ids); + + /** + * 获得数据集 + * + * @param id 编号 + * @return 数据集 + */ + DataCollectionDO getDataCollection(Long id); + + /** + * 获得数据集分页 + * + * @param pageReqVO 分页查询 + * @return 数据集分页 + */ + PageResult getDataCollectionPage(DataCollectionPageReqVO pageReqVO); + + List listByParId(Long parId); +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionServiceImpl.java new file mode 100644 index 0000000..2d3d995 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataCollectionServiceImpl.java @@ -0,0 +1,244 @@ +package cn.iocoder.yudao.module.qms.common.data.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionFieldSaveReqVO; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataCollectionDO; +import cn.iocoder.yudao.module.qms.common.data.dal.mapper.DataCollectionMapper; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionPageReqVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionRespVO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.DataCollectionSaveReqVO; +import cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant; +import cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.ObjectUtils; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.DATA_COLLECTION_NOT_EXISTS; + +/** + * 数据集 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class DataCollectionServiceImpl implements DataCollectionService { + + private int id_path_update_level_limit = 7; + + @Resource private DataCollectionMapper dataCollectionMapper; + @Resource private DataCollectionFieldService dataCollectionFieldService; + + + @Override + public DataCollectionDO getLatestDataCollectionByKey(String key) { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(DataCollectionDO::getDataKey, key); + query.eq(DataCollectionDO::getCurrentFlag, "1"); + query.orderByDesc(DataCollectionDO::getUpdateTime); + query.last("limit 1"); + return dataCollectionMapper.selectOne(query); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public CommonResult saveDataCollection(DataCollectionSaveReqVO reqV) { + String newVersionFlag = reqV.getNewVersionFlag(); + if("1".equals(newVersionFlag)) + return saveDataCollectionWithNewVersion(reqV); + Long id = reqV.getId(); + DataCollectionDO backData = this.getDataCollection(id); + if(backData.getCancelFlag() == null || backData.getCancelFlag().equals("-1")){ + reqV.setCancelFlag("0"); + reqV.setCurrentFlag("1"); + reqV.setMainId( id); + } + + List fieldList = reqV.getFieldList(); + String deleteFieldIds = reqV.getDeleteFieldIds(); + dataCollectionFieldService.saveFields(fieldList, id, "0"); + dataCollectionFieldService.deleteFields(deleteFieldIds, id); + this.updateDataCollection(reqV); + return CommonResult.success("保存成功"); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public CommonResult saveDataCollectionWithNewVersion(DataCollectionSaveReqVO createReqVO) { + + DataCollectionDO dataCollection = BeanUtils.toBean(createReqVO, DataCollectionDO.class); + dataCollection.setCurrentFlag(0); + dataCollectionMapper.updateById(dataCollection); + + //创建新版本 + Integer version = dataCollection.getVersion(); + if(version != null) + version ++; + else + version = 1; + dataCollection.setId(null); + dataCollection.setVersion(version); + dataCollection.setCurrentFlag(1); + dataCollection.setMainId(createReqVO.getMainId()); + dataCollectionMapper.insert(dataCollection); + //保存字段列表 + Long newId = dataCollection.getId(); + List fieldList = createReqVO.getFieldList(); + dataCollectionFieldService.saveFields(fieldList, newId, "1"); + return CommonResult.success("保存成功"); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public CommonResult saveClassify(DataCollectionSaveReqVO entity) { + if(ObjectUtils.isEmpty(entity.getParentId())) + entity.setParentId(0L); + Long parentId = entity.getParentId(); + //检查同一层级下是否重名 + List checkList = listByParId(parentId); + boolean duplicate = false; + DataCollectionDO duplicateEntity = checkList.stream().filter(e->e.getName().equals(entity.getName())).findFirst().orElse(null); + if(duplicateEntity != null && !duplicateEntity.getId().equals(entity.getId())) + duplicate = true; + if(duplicate) + throw new ServiceException(ErrorCodeConstants.DATA_COLLECTION_CLASSIFY_DUPLICATE); + entity.setNodeType(DataTypeConstant.DATA_TYPE_CATEGORY); + Long id = entity.getId(); + DataCollectionDO dataCollection = BeanUtils.toBean(entity, DataCollectionDO.class); + if(ObjectUtils.isEmpty(id)){ + dataCollectionMapper.insert(dataCollection); + id = dataCollection.getId(); + } + DataCollectionDO backData = this.getDataCollection(id); + Long parentId_ = backData.getParentId(); + //检查parId,避免父节点设置为本节点的后代节点 + if(parentId_.equals(id)) + throw new ServiceException(ErrorCodeConstants.DATA_COLLECTION_CLASSIFY_PARENT_ERROR); + String idPath = getIdPath(dataCollection); + int curIdIndex = idPath.indexOf("/" + id.toString() + "/"); + int parIdIndex = idPath.indexOf("/" + parentId.toString() + "/"); + if(curIdIndex <= parIdIndex) + throw new ServiceException(ErrorCodeConstants.DATA_COLLECTION_CLASSIFY_PARENT_ERROR); + dataCollection.setIdPath(idPath); + + //更新后代节点路径 + updateAllIdPath(id, 1); + dataCollectionMapper.updateById(dataCollection); + return CommonResult.success(BeanUtils.toBean(dataCollection, DataCollectionRespVO.class)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public CommonResult updateAllIdPath(Long parentId, Integer level) { + if(level > id_path_update_level_limit) + return CommonResult.success("更新完成(超出层数限制:"+id_path_update_level_limit+")"); + List list = listByParId(parentId); + DataCollectionDO parEntity = this.getDataCollection(parentId); + if(list.isEmpty()) + return CommonResult.success(""); + String parIdPath = "/0/"; + if(parEntity != null) + parIdPath = parEntity.getIdPath(); + for(DataCollectionDO entity : list){ + entity.setIdPath(parIdPath + "/" + entity.getId() + "/"); + dataCollectionMapper.updateById( entity); + updateAllIdPath(entity.getId(),level+1); + } + return CommonResult.success(""); + } + + @Override + public List getTreeData() { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(DataCollectionDO::getNodeType, DataTypeConstant.DATA_TYPE_CATEGORY); + query.orderByAsc(DataCollectionDO::getSortNo); + return dataCollectionMapper.selectList(query); + } + + @Override + public DataCollectionRespVO createDataCollection(DataCollectionSaveReqVO createReqVO) { + // 插入 + DataCollectionDO dataCollection = BeanUtils.toBean(createReqVO, DataCollectionDO.class); + dataCollectionMapper.insert(dataCollection); + // 返回 + return BeanUtils.toBean(dataCollection, DataCollectionRespVO.class); + } + + @Override + public void updateDataCollection(DataCollectionSaveReqVO updateReqVO) { + // 校验存在 + validateDataCollectionExists(updateReqVO.getId()); + // 更新 + DataCollectionDO updateObj = BeanUtils.toBean(updateReqVO, DataCollectionDO.class); + dataCollectionMapper.updateById(updateObj); + } + + @Override + public void deleteDataCollection(Long id) { + // 校验存在 + validateDataCollectionExists(id); + // 删除 + dataCollectionMapper.deleteById(id); + } + + @Override + public void deleteDataCollectionListByIds(List ids) { + // 校验存在 + validateDataCollectionExists(ids); + // 删除 + dataCollectionMapper.deleteByIds(ids); + } + + private void validateDataCollectionExists(List ids) { + List list = dataCollectionMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(DATA_COLLECTION_NOT_EXISTS); + } + } + + private void validateDataCollectionExists(Long id) { + if (dataCollectionMapper.selectById(id) == null) { + throw exception(DATA_COLLECTION_NOT_EXISTS); + } + } + + @Override + public DataCollectionDO getDataCollection(Long id) { + return dataCollectionMapper.selectById(id); + } + + @Override + public PageResult getDataCollectionPage(DataCollectionPageReqVO pageReqVO) { + return dataCollectionMapper.selectPage(pageReqVO); + } + + @Override + public List listByParId(Long parId) { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(DataCollectionDO::getParentId, parId); + query.ne(DataCollectionDO::getCancelFlag, -1); + return dataCollectionMapper.selectList(query); + } + + + private String getIdPath(DataCollectionDO entity){ + String parIdPath = ""; + if(ObjectUtils.isEmpty(entity.getParentId()) || 0L == entity.getParentId()) + parIdPath = "/0/"; + DataCollectionDO parEntity = this.getDataCollection(entity.getParentId()); + if(parEntity != null){ + parIdPath = parEntity.getIdPath(); + } + return parIdPath + entity.getId() + "/"; + } +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataFormService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataFormService.java new file mode 100644 index 0000000..157e398 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataFormService.java @@ -0,0 +1,67 @@ +package cn.iocoder.yudao.module.qms.common.data.service; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.*; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataFormDO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 通用数据 Service 接口 + * + * @author 后台管理 + */ +public interface DataFormService { + + + /* + * 发起流程*/ + DataFormRespVO createProcessInstance(@Valid DataFormSaveReqVO entity); + + /** + * 创建通用数据 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + DataFormRespVO createDataForm(@Valid DataFormSaveReqVO createReqVO); + + /** + * 更新通用数据 + * + * @param updateReqVO 更新信息 + */ + void updateDataForm(@Valid DataFormSaveReqVO updateReqVO); + + /** + * 删除通用数据 + * + * @param id 编号 + */ + void deleteDataForm(Long id); + + /** + * 批量删除通用数据 + * + * @param ids 编号 + */ + void deleteDataFormListByIds(List ids); + + /** + * 获得通用数据 + * + * @param id 编号 + * @return 通用数据 + */ + DataFormDO getDataForm(Long id); + + /** + * 获得通用数据分页 + * + * @param pageReqVO 分页查询 + * @return 通用数据分页 + */ + PageResult getDataFormPage(DataFormPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataFormServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataFormServiceImpl.java new file mode 100644 index 0000000..420ebb0 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/data/service/DataFormServiceImpl.java @@ -0,0 +1,154 @@ +package cn.iocoder.yudao.module.qms.common.data.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.module.bpm.api.task.BpmProcessInstanceApi; +import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; +import cn.iocoder.yudao.module.qms.api.task.BMPCallbackInterface; +import cn.iocoder.yudao.module.qms.api.task.dto.QmsBpmDTO; +import cn.iocoder.yudao.module.qms.common.data.controller.vo.*; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataCollectionDO; +import cn.iocoder.yudao.module.qms.common.data.dal.dataobject.DataFormDO; +import cn.iocoder.yudao.module.qms.common.data.dal.mapper.DataFormMapper; +import cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants; +import cn.iocoder.yudao.module.qms.enums.QmsBpmConstant; +import com.alibaba.fastjson.JSONObject; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.ObjectUtils; +import org.springframework.validation.annotation.Validated; + +import java.util.List; +import java.util.Map; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception0; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.DATA_FORM_NOT_EXISTS; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.ERROR_CODE_MODULE_COMMON; +import static cn.iocoder.yudao.module.qms.enums.QmsBpmConstant.BPM_CALLBACK_BEAN_NAME; + +/** + * 通用数据 Service 实现类 + * + * @author 后台管理 + */ +@Service("dataFormService") +@Validated +public class DataFormServiceImpl implements DataFormService, BMPCallbackInterface { + + @Resource private DataFormMapper dataFormMapper; + @Resource private DataCollectionService dataCollectionService; + @Resource private BpmProcessInstanceApi bpmProcessInstanceApi; + + @Override + @Transactional(rollbackFor = Exception.class) + public DataFormRespVO createProcessInstance(DataFormSaveReqVO entity) { + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); + Long id = entity.getId(); + DataFormDO dataForm = getDataForm(id); + Long dataCollectionId = dataForm.getDataCollectionId(); + DataCollectionDO dataCollection = dataCollectionService.getDataCollection(dataCollectionId); + if(dataCollection == null) + throw exception(ErrorCodeConstants.DATA_FORM_EMPTY_COLLECTION_ID); + if(ObjectUtils.isEmpty(dataCollection.getFlowKey())) + throw exception(ErrorCodeConstants.DATA_COLLECTION_EMPTY_WF_KEY); + JSONObject formData = new JSONObject(); + if(dataForm.getFormData() != null) + formData = JSONObject.parseObject(dataForm.getFormData()); + formData.put("mainId", id); + formData.put("applyUser", dataForm.getApplyUser()); + formData.put("applyUserId", dataForm.getApplyUserId()); + formData.put("applyDepartment", dataForm.getApplyDepartment()); + formData.put("applyDepartmentId", dataForm.getApplyDepartmentId()); + formData.put("applyTime", dataForm.getApplyTime()); + Map variables = formData.toJavaObject(Map.class); + variables.put(BPM_CALLBACK_BEAN_NAME, "dataFormService"); + BpmProcessInstanceCreateReqDTO reqDTO = new BpmProcessInstanceCreateReqDTO(); + reqDTO.setBusinessKey(String.valueOf(id)); + reqDTO.setProcessDefinitionKey(dataCollection.getFlowKey()); + reqDTO.setVariables(variables); + CommonResult result = bpmProcessInstanceApi.createProcessInstance(loginUser.getId(), reqDTO); + if(!result.isSuccess()){ + throw exception0(ERROR_CODE_MODULE_COMMON, result.getMsg()); + } + String wfInsId = result.getData(); + dataForm.setFlowInstanceId(wfInsId); + dataFormMapper.updateById(dataForm); + return BeanUtils.toBean(dataForm, DataFormRespVO.class); + } + + @Override + public DataFormRespVO createDataForm(DataFormSaveReqVO createReqVO) { + // 插入 + DataFormDO dataForm = BeanUtils.toBean(createReqVO, DataFormDO.class); + dataFormMapper.insert(dataForm); + // 返回 + return BeanUtils.toBean(dataForm, DataFormRespVO.class); + } + + @Override + public void updateDataForm(DataFormSaveReqVO updateReqVO) { + // 校验存在 + validateDataFormExists(updateReqVO.getId()); + // 更新 + DataFormDO updateObj = BeanUtils.toBean(updateReqVO, DataFormDO.class); + dataFormMapper.updateById(updateObj); + } + + @Override + public void deleteDataForm(Long id) { + // 校验存在 + validateDataFormExists(id); + // 删除 + dataFormMapper.deleteById(id); + } + + @Override + public void deleteDataFormListByIds(List ids) { + // 校验存在 + validateDataFormExists(ids); + // 删除 + dataFormMapper.deleteByIds(ids); + } + + private void validateDataFormExists(List ids) { + List list = dataFormMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(DATA_FORM_NOT_EXISTS); + } + } + + private void validateDataFormExists(Long id) { + if (dataFormMapper.selectById(id) == null) { + throw exception(DATA_FORM_NOT_EXISTS); + } + } + + @Override + public DataFormDO getDataForm(Long id) { + return dataFormMapper.selectById(id); + } + + @Override + public PageResult getDataFormPage(DataFormPageReqVO pageReqVO) { + return dataFormMapper.selectPage(pageReqVO); + } + + @Override + public CommonResult callback(QmsBpmDTO reqDTO) { + JSONObject variables = reqDTO.getVariables(); + String PROCESS_STATUS = variables.getString(QmsBpmConstant.PROCESS_INSTANCE_VARIABLE_STATUS); //todo 流程状态 3-拒绝 + + JSONObject ret = new JSONObject(); + + + + + return CommonResult.success(ret); + } +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/admin/DictionaryBusinessController.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/admin/DictionaryBusinessController.java new file mode 100644 index 0000000..882f982 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/admin/DictionaryBusinessController.java @@ -0,0 +1,142 @@ +package cn.iocoder.yudao.module.qms.common.dic.controller.admin; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.qms.common.dic.controller.vo.DictionaryBusinessPageReqVO; +import cn.iocoder.yudao.module.qms.common.dic.controller.vo.DictionaryBusinessRespVO; +import cn.iocoder.yudao.module.qms.common.dic.controller.vo.DictionaryBusinessSaveReqVO; +import cn.iocoder.yudao.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO; +import cn.iocoder.yudao.module.qms.common.dic.service.DictionaryBusinessService; +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.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 业务参数字典") +@RestController +@RequestMapping("/qms/dictionary-business") +@Validated +public class DictionaryBusinessController implements BusinessControllerMarker { + + + @Resource + private DictionaryBusinessService dictionaryBusinessService; + + + @GetMapping("/getDataListByCategoryKey") + @Operation(summary = "根据分类Key查询数据列表") + public CommonResult> getDataListByCategoryKey(@RequestParam(required = true) String key) { +// String key = pageReqVO.getKey(); +// if(ObjectUtils.isEmpty(key)) +// return CommonResult.error(MISS_PARAMETER); + List list = dictionaryBusinessService.queryDictItemsByKey(key); + return success(BeanUtils.toBean(list, DictionaryBusinessRespVO.class)); + } + + @GetMapping("/getDataByDataKey") + @Operation(summary = "根据数据Key查询数据") + public CommonResult getDataByDataKey(@RequestParam(required = true) String key) { +// String key = pageReqVO.getKey(); + return dictionaryBusinessService.getDataByDataKey(key); + } + + @PostMapping("/saveData") + @Operation(summary = "保存数据") + public CommonResult saveData(@Valid @RequestBody DictionaryBusinessSaveReqVO createReqVO) { + return dictionaryBusinessService.saveData(createReqVO); + } + + @PostMapping("/saveClassify") + @Operation(summary = "保存分类") + public CommonResult saveClassify(@Valid @RequestBody DictionaryBusinessSaveReqVO createReqVO) { + return dictionaryBusinessService.saveCategory(createReqVO); + } + + @GetMapping("/getTreeData") + @Operation(summary = "查询分类树") + public CommonResult> getTreeData() { + List list = dictionaryBusinessService.getTreeData(); + return success(BeanUtils.toBean(list, DictionaryBusinessRespVO.class)); + } + +// @PostMapping("/create") +// @Operation(summary = "创建业务参数字典") +// @PreAuthorize("@ss.hasPermission('qms:dictionary-business:create')") +// public CommonResult createDictionaryBusiness(@Valid @RequestBody DictionaryBusinessSaveReqVO createReqVO) { +// return success(dictionaryBusinessService.createDictionaryBusiness(createReqVO)); +// } +// +// @PutMapping("/update") +// @Operation(summary = "更新业务参数字典") +// @PreAuthorize("@ss.hasPermission('qms:dictionary-business:update')") +// public CommonResult updateDictionaryBusiness(@Valid @RequestBody DictionaryBusinessSaveReqVO updateReqVO) { +// dictionaryBusinessService.updateDictionaryBusiness(updateReqVO); +// return success(true); +// } + + @DeleteMapping("/delete") + @Operation(summary = "删除业务参数字典") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('qms:dictionary-business:delete')") + public CommonResult deleteDictionaryBusiness(@RequestParam("id") Long id) { + dictionaryBusinessService.deleteDictionaryBusiness(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除业务参数字典") + @PreAuthorize("@ss.hasPermission('qms:dictionary-business:delete')") + public CommonResult deleteDictionaryBusinessList(@RequestBody BatchDeleteReqVO req) { + dictionaryBusinessService.deleteDictionaryBusinessListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得业务参数字典") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('qms:dictionary-business:query')") + public CommonResult getDictionaryBusiness(@RequestParam("id") Long id) { + DictionaryBusinessDO dictionaryBusiness = dictionaryBusinessService.getDictionaryBusiness(id); + return success(BeanUtils.toBean(dictionaryBusiness, DictionaryBusinessRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得业务参数字典分页") + @PreAuthorize("@ss.hasPermission('qms:dictionary-business:query')") + public CommonResult> getDictionaryBusinessPage(@Valid DictionaryBusinessPageReqVO pageReqVO) { + PageResult pageResult = dictionaryBusinessService.getDictionaryBusinessPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, DictionaryBusinessRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出业务参数字典 Excel") + @PreAuthorize("@ss.hasPermission('qms:dictionary-business:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportDictionaryBusinessExcel(@Valid DictionaryBusinessPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = dictionaryBusinessService.getDictionaryBusinessPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "业务参数字典.xls", "数据", DictionaryBusinessRespVO.class, + BeanUtils.toBean(list, DictionaryBusinessRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessPageReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessPageReqVO.java new file mode 100644 index 0000000..c91d113 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessPageReqVO.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.qms.common.dic.controller.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +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 DictionaryBusinessPageReqVO extends PageParam { + + @Schema(description = "id路径") + private String idPath; + + @Schema(description = "上级id", example = "3392") + private Long parentId; + + @Schema(description = "节点类型", example = "2") + private String nodeType; + + @Schema(description = "名称", example = "芋艿") + private String name; + + @Schema(description = "键") + private String key; + + @Schema(description = "值") + private String value; + + @Schema(description = "其他配置") + private String customConfig; + + @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 sortNo; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessRespVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessRespVO.java new file mode 100644 index 0000000..44d3578 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessRespVO.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.qms.common.dic.controller.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 业务参数字典 Response VO") +@Data +@ExcelIgnoreUnannotated +public class DictionaryBusinessRespVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5551") + @ExcelProperty("ID") + private Long id; + + @Schema(description = "id路径", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("id路径") + private String idPath; + + @Schema(description = "上级id", example = "3392") + @ExcelProperty("上级id") + private Long parentId; + + @Schema(description = "节点类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("节点类型") + private String nodeType; + + @Schema(description = "名称", example = "芋艿") + @ExcelProperty("名称") + private String name; + + @Schema(description = "键") + @ExcelProperty("键") + private String key; + + @Schema(description = "值") + @ExcelProperty("值") + private String value; + + @Schema(description = "其他配置") + @ExcelProperty("其他配置") + private String customConfig; + + @Schema(description = "所属部门") + @ExcelProperty("所属部门") + private String systemDepartmentCode; + + @Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建日期") + private LocalDateTime createTime; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "排序号") + @ExcelProperty("排序号") + private Integer sortNo; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessSaveReqVO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessSaveReqVO.java new file mode 100644 index 0000000..9b0aa18 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/controller/vo/DictionaryBusinessSaveReqVO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.qms.common.dic.controller.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import lombok.Data; + +@Schema(description = "管理后台 - 业务参数字典新增/修改 Request VO") +@Data +public class DictionaryBusinessSaveReqVO { + + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5551") + private Long id; + + @Schema(description = "id路径", requiredMode = Schema.RequiredMode.REQUIRED) + private String idPath; + + @Schema(description = "上级id", example = "3392") + private Long parentId; + + @Schema(description = "节点类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + private String nodeType; + + @Schema(description = "名称", example = "芋艿") + private String name; + + @Schema(description = "键") + private String key; + + @Schema(description = "值") + private String value; + + @Schema(description = "其他配置") + private String customConfig; + + @Schema(description = "所属部门") + private String systemDepartmentCode; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "排序号") + private Integer sortNo; +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/dal/dataobject/DictionaryBusinessDO.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/dal/dataobject/DictionaryBusinessDO.java new file mode 100644 index 0000000..42f0cc9 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/dal/dataobject/DictionaryBusinessDO.java @@ -0,0 +1,82 @@ +package cn.iocoder.yudao.module.qms.common.dic.dal.dataobject; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; +/** +* 业务参数字典 DO +* +* @author 后台管理 +*/ +@TableName("t_dic_bsn") +@KeySequence("t_dic_bsn_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class DictionaryBusinessDO extends BusinessBaseDO { + + + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * id路径 + */ + @TableField("ID_PATH") + private String idPath; + /** + * 上级id + */ + @TableField("PRN_ID") + private Long parentId; + /** + * 节点类型 + */ + @TableField("NDE_TP") + private String nodeType; + /** + * 名称 + */ + @TableField("NAME") + private String name; + /** + * 键 + */ + @TableField("KY") + private String key; + /** + * 值 + */ + @TableField("VAL") + private String value; + /** + * 其他配置 + */ + @TableField("CST_CFG") + private String customConfig; + /** + * 所属部门 + */ + @TableField("SYS_DEPT_CD") + private String systemDepartmentCode; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 排序号 + */ + @TableField("SRT_NO") + private Integer sortNo; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/dal/mapper/DictionaryBusinessMapper.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/dal/mapper/DictionaryBusinessMapper.java new file mode 100644 index 0000000..4b97c14 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/dal/mapper/DictionaryBusinessMapper.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.qms.common.dic.dal.mapper; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.qms.common.dic.controller.vo.*; +import cn.iocoder.yudao.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO; +import cn.iocoder.yudao.module.qms.core.legend.vo.DictModel; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 业务参数字典 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface DictionaryBusinessMapper extends BaseMapperX { + + default PageResult selectPage(DictionaryBusinessPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(DictionaryBusinessDO::getIdPath, reqVO.getIdPath()) + .eqIfPresent(DictionaryBusinessDO::getParentId, reqVO.getParentId()) + .eqIfPresent(DictionaryBusinessDO::getNodeType, reqVO.getNodeType()) + .likeIfPresent(DictionaryBusinessDO::getName, reqVO.getName()) + .eqIfPresent(DictionaryBusinessDO::getKey, reqVO.getKey()) + .eqIfPresent(DictionaryBusinessDO::getValue, reqVO.getValue()) + .eqIfPresent(DictionaryBusinessDO::getCustomConfig, reqVO.getCustomConfig()) + .eqIfPresent(DictionaryBusinessDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode()) + .betweenIfPresent(DictionaryBusinessDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(DictionaryBusinessDO::getRemark, reqVO.getRemark()) + .orderByAsc(DictionaryBusinessDO::getSortNo)); + } + + + /** + * 查询自定义字典表 + * @param table 表名 + * @param text 显示字段名 + * @param code 存储字段名 + * @param filterSql 条件sql + * @param keys 存储字段值 作为查询条件in + */ + List queryTableDictCustom(@Param("table") String table, @Param("text") String text, @Param("code") String code, @Param("filterSql") String filterSql, + @Param("keys") List keys); + + /** + * 通过字典code获取字典数据 + * @param code + * @param key + */ + String queryDictTextByKey(@Param("code") String code, @Param("key") String key); + String queryDictTextByID(@Param("code") String code, @Param("id") String id); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/service/DictionaryBusinessService.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/service/DictionaryBusinessService.java new file mode 100644 index 0000000..e6e3112 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/service/DictionaryBusinessService.java @@ -0,0 +1,100 @@ +package cn.iocoder.yudao.module.qms.common.dic.service; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.qms.common.dic.controller.vo.DictionaryBusinessPageReqVO; +import cn.iocoder.yudao.module.qms.common.dic.controller.vo.DictionaryBusinessRespVO; +import cn.iocoder.yudao.module.qms.common.dic.controller.vo.DictionaryBusinessSaveReqVO; +import cn.iocoder.yudao.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO; +import cn.iocoder.yudao.module.qms.core.legend.vo.DictModel; +import jakarta.validation.Valid; + +import java.util.List; +import java.util.Map; + +/** + * 业务参数字典 Service 接口 + * + * @author 后台管理 + */ +public interface DictionaryBusinessService { + + //通过查询指定table的 text code key 获取字典值 + String queryTableDictTextByKey(String table, String text, String code, String key); + + //通过字典code及字典项的value获取字典文本 + String queryDictTextByKey(String code, String key); + String queryDictTextByID(String code, String id); + + //通过查询指定table的 text code key 获取字典值,可批量查询 + List queryTableDictText(String table, String text, String code, List keys); + + //通过多个字典code查询翻译文本 + Map> queryManyDict(List dictCodeList, List keys); +// Map> queryManyDictByIDs(List dictCodeList, List ids); + + List queryDictItemsByKey(String key); + + CommonResult getDataByDataKey(String key); + + + //保存分类 + CommonResult saveCategory(@Valid DictionaryBusinessSaveReqVO createReqVO); + + //保存数据 + CommonResult saveData(@Valid DictionaryBusinessSaveReqVO createReqVO); + + + /*获取分类树数据*/ + List getTreeData(); + + List listByParId(Long parId, String nodeType); + + CommonResult updateAllIdPath(Long parentId, Integer level); + + /** + * 创建业务参数字典 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + DictionaryBusinessRespVO createDictionaryBusiness(@Valid DictionaryBusinessSaveReqVO createReqVO); + + /** + * 更新业务参数字典 + * + * @param updateReqVO 更新信息 + */ + void updateDictionaryBusiness(@Valid DictionaryBusinessSaveReqVO updateReqVO); + + /** + * 删除业务参数字典 + * + * @param id 编号 + */ + void deleteDictionaryBusiness(Long id); + + /** + * 批量删除业务参数字典 + * + * @param ids 编号 + */ + void deleteDictionaryBusinessListByIds(List ids); + + /** + * 获得业务参数字典 + * + * @param id 编号 + * @return 业务参数字典 + */ + DictionaryBusinessDO getDictionaryBusiness(Long id); + + /** + * 获得业务参数字典分页 + * + * @param pageReqVO 分页查询 + * @return 业务参数字典分页 + */ + PageResult getDictionaryBusinessPage(DictionaryBusinessPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/service/DictionaryBusinessServiceImpl.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/service/DictionaryBusinessServiceImpl.java new file mode 100644 index 0000000..cc6c705 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/common/dic/service/DictionaryBusinessServiceImpl.java @@ -0,0 +1,397 @@ +package cn.iocoder.yudao.module.qms.common.dic.service; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.qms.common.dic.controller.vo.*; +import cn.iocoder.yudao.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO; +import cn.iocoder.yudao.module.qms.common.dic.dal.mapper.DictionaryBusinessMapper; +import cn.iocoder.yudao.module.qms.core.constant.CacheConstant; +import cn.iocoder.yudao.module.qms.core.constant.CommonConstant; +import cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant; +import cn.iocoder.yudao.module.qms.core.legend.SqlInjectionUtil; +import cn.iocoder.yudao.module.qms.core.legend.security.DictQueryBlackListHandler; +import cn.iocoder.yudao.module.qms.core.legend.vo.DictModel; +import cn.iocoder.yudao.module.qms.core.legend.vo.DictModelMany; +import cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; +import org.springframework.util.ObjectUtils; +import org.springframework.validation.annotation.Validated; + +import java.util.*; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant.*; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.*; + +/** + * 业务参数字典 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +@Slf4j +public class DictionaryBusinessServiceImpl implements DictionaryBusinessService { + private int id_path_update_level_limit = 7; + @Resource private DictionaryBusinessMapper dictionaryBusinessMapper; + @Resource private DictQueryBlackListHandler dictQueryBlackListHandler; + + + @Override + @Cacheable(value = CacheConstant.QMS_DICT_TABLE_CACHE, unless = "#result == null ") + public String queryTableDictTextByKey(String table, String text, String code, String key) { + log.debug("无缓存dictTable的时候调用这里!"); + + // 1.表字典黑名单check + String str = table+","+text+","+code; + if(!dictQueryBlackListHandler.isPass(str)){ + log.error(dictQueryBlackListHandler.getError()); + return null; + } + // 2.sql注入check + SqlInjectionUtil.filterContent(table, text, code, key); + + // 3.针对采用 ${}写法的表名和字段进行转义和check + table = SqlInjectionUtil.getSqlInjectTableName(table); + text = SqlInjectionUtil.getSqlInjectField(text); + code = SqlInjectionUtil.getSqlInjectField(code); + + List dictModeList = dictionaryBusinessMapper.queryTableDictCustom(table, text, code, null, Arrays.asList(key)); + if(CollectionUtils.isEmpty(dictModeList)){ + return null; + } + return dictModeList.get(0).getText(); + } + + @Override + @Cacheable(value = CacheConstant.QMS_DICT_BIZ_CACHE,key = "#code+':'+#key", unless = "#result == null ") + public String queryDictTextByKey(String code, String key) { + return dictionaryBusinessMapper.queryDictTextByKey(code, key); + } + + @Override + @Cacheable(value = CacheConstant.QMS_DICT_BIZ_CACHE,key = "#code+':'+#id", unless = "#result == null ") + public String queryDictTextByID(String code, String id) { + return dictionaryBusinessMapper.queryDictTextByID(code, id); + } + + @Override + public List queryTableDictText(String table, String text, String code, List keys) { + // 1.表字典黑名单check + String str = table+","+text+","+code; + if(!dictQueryBlackListHandler.isPass(str)){ + log.error(dictQueryBlackListHandler.getError()); + return null; + } + + // 2.分割SQL获取表名和条件 + String filterSql = null; + if(table.toLowerCase().indexOf(CommonConstant.SQL_WHERE)>0){ + String[] arr = table.split(" (?i)where "); + table = arr[0]; + filterSql = arr[1]; + } + + // 3.SQL注入check + SqlInjectionUtil.filterContent(table, text, code); + SqlInjectionUtil.specialFilterContentForDictSql(filterSql); + + // 4.针对采用 ${}写法的表名和字段进行转义和check + table = SqlInjectionUtil.getSqlInjectTableName(table); + text = SqlInjectionUtil.getSqlInjectField(text); + code = SqlInjectionUtil.getSqlInjectField(code); + + return dictionaryBusinessMapper.queryTableDictCustom(table, text, code, filterSql, keys); + } + + @Override + public Map> queryManyDict(List dictCodeList, List itemKeys) { + //将dictCodeList分组 + List listByKey = new ArrayList<>(); + List listByID = new ArrayList<>(); + for(String dictCode: dictCodeList){ + if(dictCode.contains(DICT_ANNOTATION_SPLIT)){ + String[] dictCodeArr = dictCode.split(DICT_ANNOTATION_SPLIT); + if(dictCodeArr[1].equals(DICT_ANNOTATION_KEY_TYPE_KEY)) { + listByKey.add(dictCodeArr[0]); + }else + listByID.add(dictCodeArr[0]); + }else{ + listByKey.add(dictCode); + } + } + Map> dictMap = new HashMap<>(5); + if(!listByKey.isEmpty()) + dictMap = queryManyDictBy(DICT_ANNOTATION_KEY_TYPE_KEY, dictMap, listByKey, itemKeys); + if(!listByID.isEmpty()) + dictMap = queryManyDictBy(DICT_ANNOTATION_KEY_TYPE_ID, dictMap, listByID, itemKeys); + return dictMap; + } + + + private Map> queryManyDictBy(String dictValType, Map> dictMap, List dictCodeList, List itemKeys){ + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.in(DictionaryBusinessDO::getKey, dictCodeList); + query.eq(DictionaryBusinessDO::getNodeType, DataTypeConstant.DATA_TYPE_CATEGORY); +// query.eq(DictionaryBusinessDO::getDeleted, 0); + List parList = dictionaryBusinessMapper.selectList(query); + if(parList.isEmpty()) + return dictMap; + List parIds = parList.stream().map(DictionaryBusinessDO::getId).toList(); + query.clear(); + + //通过key查询 + query.in(DictionaryBusinessDO::getParentId, parIds); + + query.eq(DictionaryBusinessDO::getNodeType, DataTypeConstant.DATA_TYPE_DATA); + if(dictValType.equals(DICT_ANNOTATION_KEY_TYPE_KEY)) + query.in(DictionaryBusinessDO::getKey, itemKeys); + else + query.in(DictionaryBusinessDO::getId, itemKeys); + List itemList = dictionaryBusinessMapper.selectList(query); + List modelItemList = new ArrayList<>(); + for(DictionaryBusinessDO item: itemList){ + Long parId = item.getParentId(); + DictionaryBusinessDO parNode = parList.stream().filter(e->e.getId().equals(parId)).findFirst().orElse(null); + if(parNode == null) + continue; + if(dictValType.equals(DICT_ANNOTATION_KEY_TYPE_KEY)) + modelItemList.add(new DictModelMany(parNode.getKey(), item.getKey(), item.getName())); + else + modelItemList.add(new DictModelMany(parNode.getKey(), item.getId().toString(), item.getName())); + } + for(DictModelMany dict: modelItemList){ + List list = dictMap.computeIfAbsent(dict.getDictCode(), i -> new ArrayList<>()); + list.add(new DictModel(dict.getValue(), dict.getText())); + } + return dictMap; + } + +// @Override +// public Map> queryManyDictByIDs(List dictCodeList, List ids) { +// Map> dictMap = new HashMap<>(5); +// LambdaQueryWrapper query = new LambdaQueryWrapper<>(); +// query.in(DictionaryBusinessDO::getKey, dictCodeList); +// query.eq(DictionaryBusinessDO::getNodeType, DataTypeConstant.DATA_TYPE_CATEGORY); +//// query.eq(DictionaryBusinessDO::getDeleted, 0); +// List parList = dictionaryBusinessMapper.selectList(query); +// if(parList.isEmpty()) +// return dictMap; +// List parIds = parList.stream().map(DictionaryBusinessDO::getId).toList(); +// query.clear(); +// query.in(DictionaryBusinessDO::getParentId, parIds); +// query.eq(DictionaryBusinessDO::getNodeType, DataTypeConstant.DATA_TYPE_DATA); +// query.in(DictionaryBusinessDO::getId, ids); +// List itemList = dictionaryBusinessMapper.selectList(query); +// List modelItemList = new ArrayList<>(); +// for(DictionaryBusinessDO item: itemList){ +// Long parId = item.getParentId(); +// DictionaryBusinessDO parNode = parList.stream().filter(e->e.getId().equals(parId)).findFirst().orElse(null); +// if(parNode == null) +// continue; +// modelItemList.add(new DictModelMany(parNode.getKey(), item.getId().toString(), item.getName())); +// } +// for(DictModelMany dict: modelItemList){ +// List list = dictMap.computeIfAbsent(dict.getDictCode(), i -> new ArrayList<>()); +// list.add(new DictModel(dict.getValue(), dict.getText())); +// } +// return dictMap; +// } + + /* + * 通过分类key获取数据列表*/ + @Override + public List queryDictItemsByKey(String key) { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(DictionaryBusinessDO::getKey, key); + query.eq(DictionaryBusinessDO::getNodeType, DataTypeConstant.DATA_TYPE_CATEGORY); + List list = dictionaryBusinessMapper.selectList(query); + if(list.isEmpty()) + throw exception(DICTIONARY_BUSINESS_NOT_EXISTS); + if(list.size() > 1) + throw exception(DICTIONARY_BUSINESS_CATEGORY_MORE_THAN_ONE); + DictionaryBusinessDO entity = list.get(0); + List dataList = this.listByParId(entity.getId(), DataTypeConstant.DATA_TYPE_DATA); + + return dataList; + } + + /* + * 通过数据key获取数据*/ + @Override + public CommonResult getDataByDataKey(String key) { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(DictionaryBusinessDO::getKey, key); + query.eq(DictionaryBusinessDO::getNodeType, DataTypeConstant.DATA_TYPE_DATA); + List list = dictionaryBusinessMapper.selectList(query); + if(list.isEmpty()) + return CommonResult.error(DICTIONARY_BUSINESS_NOT_EXISTS); + if(list.size() > 1) + throw exception(DICTIONARY_BUSINESS_DATA_MORE_THAN_ONE); + DictionaryBusinessRespVO vo = BeanUtils.toBean(list.get(0), DictionaryBusinessRespVO.class); + return CommonResult.success(vo); + } + + @Override + public CommonResult saveCategory(DictionaryBusinessSaveReqVO entity) { + if(entity.getParentId() == null) + entity.setParentId(0L); + Long parentId = entity.getParentId(); + List checkList = listByParId(parentId, DataTypeConstant.DATA_TYPE_CATEGORY); + boolean duplicate = false; + DictionaryBusinessDO duplicateEntity = checkList.stream().filter(e->e.getName().equals(entity.getName())).findFirst().orElse(null); + if(duplicateEntity != null && !duplicateEntity.getId().equals(entity.getId())) + duplicate = true; + if(duplicate) + throw exception(ErrorCodeConstants.DICTIONARY_BUSINESS_CLASSIFY_DUPLICATE); + entity.setNodeType(DataTypeConstant.DATA_TYPE_CATEGORY); + Long id = entity.getId(); + DictionaryBusinessDO dic = BeanUtils.toBean(entity, DictionaryBusinessDO.class); + if(ObjectUtils.isEmpty(id)){ + dictionaryBusinessMapper.insert(dic); + id = dic.getId(); + } + DictionaryBusinessDO backData = this.getDictionaryBusiness(id); + Long parentId_ = backData.getParentId(); + //检查parId,避免父节点设置为本节点的后代节点 + if(parentId_.equals(id)) + throw new ServiceException(ErrorCodeConstants.DATA_COLLECTION_CLASSIFY_PARENT_ERROR); + String idPath = getIdPath(dic); + int curIdIndex = idPath.indexOf("/" + id.toString() + "/"); + int parIdIndex = idPath.indexOf("/" + parentId.toString() + "/"); + if(curIdIndex <= parIdIndex) + throw new ServiceException(ErrorCodeConstants.DATA_COLLECTION_CLASSIFY_PARENT_ERROR); + dic.setIdPath(idPath); + + //更新后代节点路径 + updateAllIdPath(id, 1); + dictionaryBusinessMapper.updateById(dic); + return CommonResult.success(BeanUtils.toBean(dic, DictionaryBusinessRespVO.class)); + } + + @Override + public CommonResult saveData(DictionaryBusinessSaveReqVO createReqVO) { + Long id = createReqVO.getId(); + DictionaryBusinessDO entity = BeanUtils.toBean(createReqVO, DictionaryBusinessDO.class); + if(id == null){ + dictionaryBusinessMapper.insert(entity); + }else{ + dictionaryBusinessMapper.updateById(entity); + } + DictionaryBusinessRespVO vo = BeanUtils.toBean(entity, DictionaryBusinessRespVO.class); + return CommonResult.success( vo); + } + + @Override + public CommonResult updateAllIdPath(Long parentId, Integer level) { + if(level > id_path_update_level_limit) + return CommonResult.success("更新完成(超出层数限制:"+id_path_update_level_limit+")"); + List list = listByParId(parentId, DataTypeConstant.DATA_TYPE_CATEGORY); + DictionaryBusinessDO parEntity = this.getDictionaryBusiness(parentId); + if(list.isEmpty()) + return CommonResult.success(""); + String parIdPath = "/0/"; + if(parEntity != null) + parIdPath = parEntity.getIdPath(); + for(DictionaryBusinessDO entity : list){ + entity.setIdPath(parIdPath + "/" + entity.getId() + "/"); + dictionaryBusinessMapper.updateById( entity); + updateAllIdPath(entity.getId(),level+1); + } + return CommonResult.success(""); + } + + @Override + public List getTreeData() { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(DictionaryBusinessDO::getNodeType, DataTypeConstant.DATA_TYPE_CATEGORY); + query.orderByAsc(DictionaryBusinessDO::getSortNo); + return dictionaryBusinessMapper.selectList(query); + } + + @Override + public List listByParId(Long parId, String nodeType) { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(DictionaryBusinessDO::getParentId, parId); + if(!ObjectUtils.isEmpty(nodeType)) + query.eq(DictionaryBusinessDO::getNodeType, nodeType); + query.orderByAsc(DictionaryBusinessDO::getSortNo); + return dictionaryBusinessMapper.selectList(query); + } + + @Override + public DictionaryBusinessRespVO createDictionaryBusiness(DictionaryBusinessSaveReqVO createReqVO) { + // 插入 + DictionaryBusinessDO dictionaryBusiness = BeanUtils.toBean(createReqVO, DictionaryBusinessDO.class); + dictionaryBusinessMapper.insert(dictionaryBusiness); + // 返回 + return BeanUtils.toBean(dictionaryBusiness, DictionaryBusinessRespVO.class); + } + + @Override + public void updateDictionaryBusiness(DictionaryBusinessSaveReqVO updateReqVO) { + // 校验存在 + validateDictionaryBusinessExists(updateReqVO.getId()); + // 更新 + DictionaryBusinessDO updateObj = BeanUtils.toBean(updateReqVO, DictionaryBusinessDO.class); + dictionaryBusinessMapper.updateById(updateObj); + } + + @Override + public void deleteDictionaryBusiness(Long id) { + // 校验存在 + validateDictionaryBusinessExists(id); + // 删除 + dictionaryBusinessMapper.deleteById(id); + } + + @Override + public void deleteDictionaryBusinessListByIds(List ids) { + // 校验存在 + validateDictionaryBusinessExists(ids); + // 删除 + dictionaryBusinessMapper.deleteByIds(ids); + } + + private void validateDictionaryBusinessExists(List ids) { + List list = dictionaryBusinessMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(DICTIONARY_BUSINESS_NOT_EXISTS); + } + } + + private void validateDictionaryBusinessExists(Long id) { + if (dictionaryBusinessMapper.selectById(id) == null) { + throw exception(DICTIONARY_BUSINESS_NOT_EXISTS); + } + } + + @Override + public DictionaryBusinessDO getDictionaryBusiness(Long id) { + return dictionaryBusinessMapper.selectById(id); + } + + @Override + public PageResult getDictionaryBusinessPage(DictionaryBusinessPageReqVO pageReqVO) { + return dictionaryBusinessMapper.selectPage(pageReqVO); + } + + private String getIdPath(DictionaryBusinessDO entity){ + String parIdPath = ""; + if(ObjectUtils.isEmpty(entity.getParentId()) || 0L == entity.getParentId()) + parIdPath = "/0/"; + DictionaryBusinessDO parEntity = this.getDictionaryBusiness(entity.getParentId()); + if(parEntity != null){ + parIdPath = parEntity.getIdPath(); + } + return parIdPath + entity.getId() + "/"; + } +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/aspect/DictAspect.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/aspect/DictAspect.java new file mode 100644 index 0000000..001cd68 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/aspect/DictAspect.java @@ -0,0 +1,412 @@ +package cn.iocoder.yudao.module.qms.core.aspect; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.module.qms.core.aspect.annotation.Dict; +import cn.iocoder.yudao.module.qms.core.legend.LegendApi; +import cn.iocoder.yudao.module.qms.core.constant.CommonConstant; +import cn.iocoder.yudao.module.qms.core.legend.LegendConvertUtils; +import cn.iocoder.yudao.module.qms.core.legend.vo.DictModel; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.parser.Feature; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import lombok.extern.slf4j.Slf4j; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Component; +import org.springframework.util.StringUtils; + +import java.lang.reflect.Field; +import java.util.*; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUser; +import static cn.iocoder.yudao.module.qms.core.constant.CacheConstant.QMS_DICT_BIZ_CACHE; +import static cn.iocoder.yudao.module.qms.core.constant.CacheConstant.QMS_DICT_TABLE_CACHE; +import static cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant.DICT_ANNOTATION_SPLIT; + +@Aspect +@Component +@Slf4j +public class DictAspect { + @Lazy + @Autowired private LegendApi legendApi; + @Autowired public RedisTemplate redisTemplate; + + @Autowired private ObjectMapper objectMapper; + + private static final String JAVA_UTIL_DATE = "java.util.Date"; + + /** + * 定义切点Pointcut + */ + @Pointcut("execution(public * cn.iocoder.yudao.module.qms..*.*Controller.*(..))") + public void executeService() { + } + + @Around("executeService()") + public Object doAround(ProceedingJoinPoint pjp) throws Throwable { + long time1=System.currentTimeMillis(); + Object result = pjp.proceed(); + long time2=System.currentTimeMillis(); + log.info("获取JSON数据 耗时:"+(time2-time1)+"ms"); + long start=System.currentTimeMillis(); + result=this.parseDictText(result); + long end=System.currentTimeMillis(); + log.info("注入字典到JSON数据 耗时"+(end-start)+"ms"); + return result; + } + + /** + * 本方法针对返回对象为CommonResult 的 PageResult 的分页列表数据进行动态字典注入 + * 字典注入实现 通过对实体类添加注解@dict 来标识需要的字典内容,字典分为单字典code即可。 + * 同时支持table字典 code table text + * 示例为SysUser 字段为sex 添加了注解@Dict(dicCode = "sex") 会在字典服务立马查出来对应的text 然后在请求list的时候将这个字典text,已字段名称加_dictText形式返回到前端 + * 例输入当前返回值的就会多出一个sex_dictText字段 + * { + * sex:1, + * sex_dictText:"男" + * } + */ + private Object parseDictText(Object result) { + if (!(result instanceof CommonResult)) + return result; + Object data = ((CommonResult) result).getData(); + if (!(data instanceof PageResult) && !(data instanceof ArrayList)) + return result; + List items = new ArrayList<>(); + + //step.1 筛选出加了 Dict 注解的字段列表 + List dictFieldList = new ArrayList<>(); + // 字典数据列表, key = 字典code,value=数据列表 + Map> dataListMap = new HashMap<>(5); + //取出结果集 + List records = new ArrayList(); + String instanceType = ""; + if(data instanceof PageResult){ + records = ((PageResult) data).getList(); + instanceType = "PageResult"; + } + else if(data instanceof ArrayList){ + records = (List) data; + instanceType = "ArrayList"; + } + + Boolean hasDict= checkHasDict(records); + if(!hasDict){ + return result; + } + + log.debug(" __ 进入字典翻译切面 DictAspect —— " ); + for (Object record : records) { + String json="{}"; + try { + json = objectMapper.writeValueAsString(record); + } catch (JsonProcessingException e) { + log.error("json解析失败"+e.getMessage(),e); + } + JSONObject item = JSONObject.parseObject(json, Feature.OrderedField); + + // 遍历所有字段,把字典Code取出来,放到 map 里 + for (Field field : LegendConvertUtils.getAllFields(record)) { + String value = item.getString(field.getName()); + if (LegendConvertUtils.isEmpty(value)) { + continue; + } + if (field.getAnnotation(Dict.class) == null) { + continue; + } + if (!dictFieldList.contains(field)) { + dictFieldList.add(field); + } + String code = field.getAnnotation(Dict.class).dicCode(); + String text = field.getAnnotation(Dict.class).dicText(); + String table = field.getAnnotation(Dict.class).dictTable(); + String keyOrId = field.getAnnotation(Dict.class).keyOrID(); + + List dataList; + String dictCode = code; + if (!StringUtils.isEmpty(table)) { + //指定table + dictCode = String.format("%s,%s,%s,%s", table, text, code, keyOrId); + }else{ + dictCode = String.format("%s"+DICT_ANNOTATION_SPLIT+"%s", code, keyOrId); + } + dataList = dataListMap.computeIfAbsent(dictCode, k -> new ArrayList<>()); + this.listAddAllDeduplicate(dataList, Arrays.asList(value.split(","))); + } + items.add(item); + } + + //step.2 调用翻译方法,一次性翻译 + Map> translText = this.translateAllDict(dataListMap); + + //step.3 将翻译结果填充到返回结果里 + for (JSONObject record : items) { + for (Field field : dictFieldList) { + String code = field.getAnnotation(Dict.class).dicCode(); + String text = field.getAnnotation(Dict.class).dicText(); + String table = field.getAnnotation(Dict.class).dictTable(); + //update-begin--Author:wxr -- Date:20230509 ----for:增加是否为业务字典 + + String fieldDictCode = code; + if (!StringUtils.isEmpty(table)) { + fieldDictCode = String.format("%s,%s,%s", table, text, code); + } + //update-end--Author:wxr -- Date:20230509 ----for:增加是否为业务字典 + + String value = record.getString(field.getName()); + if (LegendConvertUtils.isNotEmpty(value)) { + List dictModels = translText.get(fieldDictCode); + if(dictModels==null || dictModels.size()==0){ + continue; + } + + String textValue = this.translDictText(dictModels, value); + log.debug(" 字典Val : " + textValue); + log.debug(" __翻译字典字段__ " + field.getName() + CommonConstant.DICT_TEXT_SUFFIX + ": " + textValue); + + // TODO-sun 测试输出,待删 + log.debug(" ---- dictCode: " + fieldDictCode); + log.debug(" ---- value: " + value); + log.debug(" ----- text: " + textValue); + log.debug(" ---- dictModels: " + JSON.toJSONString(dictModels)); + + record.put(field.getName() + CommonConstant.DICT_TEXT_SUFFIX, textValue); + } + } + } + + if(instanceType.equals("PageResult")){ + ((PageResult) data).setList(items); + } + else if(instanceType.equals("ArrayList")){ + ((ArrayList) data).clear(); + ((ArrayList) data).addAll(items); + } + return result; + } + + /** + * list 去重添加 + */ + private void listAddAllDeduplicate(List dataList, List addList) { + // 筛选出dataList中没有的数据 + List filterList = addList.stream().filter(i -> !dataList.contains(i)).collect(Collectors.toList()); + dataList.addAll(filterList); + } + + /** + * 一次性把所有的字典都翻译了 + * 1. 所有的普通数据字典的所有数据只执行一次SQL + * 2. 表字典相同的所有数据只执行一次SQL + * @param dataListMap + * @return + */ + private Map> translateAllDict(Map> dataListMap) { + //获取当前租户 + LoginUser loginUser = getLoginUser(); + Long tenantId = loginUser.getTenantId(); + // 翻译后的字典文本,key=dictCode + Map> translText = new HashMap<>(5); + // 需要翻译的数据(有些可以从redis缓存中获取,就不走数据库查询) + List needTranslData = new ArrayList<>(); + // 需要翻译的数据 - 业务字典 + List needTanslBizData = new ArrayList<>(); + //step.1 先通过redis中获取缓存字典数据 + for (String dictCode : dataListMap.keySet()) { + List dataList = dataListMap.get(dictCode); + if (dataList.size() == 0) { + continue; + } + // 表字典需要翻译的数据 + List needTranslDataTable = new ArrayList<>(); + for (String s : dataList) { + String data = s.trim(); + if (data.length() == 0) { + continue; //跳过循环 + } + if (dictCode.contains(",")) { + String keyString = String.format(QMS_DICT_TABLE_CACHE + "::SimpleKey [%s,%s]", dictCode, data); + if (redisTemplate.hasKey(keyString)) { + try { + String text = LegendConvertUtils.getString(redisTemplate.opsForValue().get(keyString)); + List list = translText.computeIfAbsent(dictCode, k -> new ArrayList<>()); + list.add(new DictModel(data, text)); + } catch (Exception e) { + log.warn(e.getMessage()); + } + } else if (!needTranslDataTable.contains(data)) { + // 去重添加 + needTranslDataTable.add(data); + } + } else if (dictCode.startsWith("biz+")) { + String keyString = String.format(QMS_DICT_BIZ_CACHE + "::%s:%s:%s", tenantId, dictCode.substring(4), data); + if (redisTemplate.hasKey(keyString)) { + try { + String text = LegendConvertUtils.getString(redisTemplate.opsForValue().get(keyString)); + List list = translText.computeIfAbsent(dictCode, k -> new ArrayList<>()); + list.add(new DictModel(data, text)); + } catch (Exception e) { + log.warn(e.getMessage()); + } + } else if (!needTanslBizData.contains(data)) { + // 去重添加 + needTanslBizData.add(data); + } + } else { + String keyString = String.format(QMS_DICT_BIZ_CACHE + "::%s:%s", dictCode, data); + if (redisTemplate.hasKey(keyString)) { + try { + String text = LegendConvertUtils.getString(redisTemplate.opsForValue().get(keyString)); + List list = translText.computeIfAbsent(dictCode, k -> new ArrayList<>()); + list.add(new DictModel(data, text)); + } catch (Exception e) { + log.warn(e.getMessage()); + } + } else if (!needTranslData.contains(data)) { + // 去重添加 + needTranslData.add(data); + } + } + + } + //step.2 调用数据库翻译表字典 + if (needTranslDataTable.size() > 0) { + String[] arr = dictCode.split(","); + String table = arr[0], text = arr[1], code = arr[2]; + String values = String.join(",", needTranslDataTable); + log.debug("translateDictFromTableByKeys.dictCode:" + dictCode); + log.debug("translateDictFromTableByKeys.values:" + values); + List texts = legendApi.translateDictFromTableByKeys(table, text, code, values); + log.debug("translateDictFromTableByKeys.result:" + texts); + List list = translText.computeIfAbsent(dictCode, k -> new ArrayList<>()); + list.addAll(texts); + + // 做 redis 缓存 + String strTemplate = QMS_DICT_TABLE_CACHE + "::SimpleKey [%s,%s]"; + for (DictModel dict : texts) { + String redisKey = String.format(strTemplate, dictCode, dict.getValue()); + try { + // 保留1分钟 + redisTemplate.opsForValue().set(redisKey, dict.getText(), 60, TimeUnit.SECONDS); + } catch (Exception e) { + log.warn(e.getMessage(), e); + } + } + } + } + + //step.3 调用数据库进行翻译业务字典 + if (needTanslBizData.size() > 0) { + List dictCodeList = Arrays.asList(dataListMap.keySet().toArray(new String[]{})); + // 将业务字典的key筛选出来 + List filterDictCodes = dictCodeList.stream().filter(key -> key.startsWith("biz+")).map(key -> key.substring(4)).collect(Collectors.toList()); + String dictCodes = String.join(",", filterDictCodes); + String values = String.join(",", needTanslBizData); + log.debug("translateManyDictBiz.dictCodes:" + dictCodes); + log.debug("translateManyDictBiz.values:" + values); + + Map> manyDict = legendApi.translateManyDictBiz(dictCodes, values); + + log.debug("translateManyDictBiz.result:" + manyDict); + String strTemplate = QMS_DICT_BIZ_CACHE + "::%s:%s:%s"; + for (String dictCode : manyDict.keySet()) { + List list = translText.computeIfAbsent("biz+" + dictCode, k -> new ArrayList<>()); + List newList = manyDict.get(dictCode); + list.addAll(newList); + // 做 redis 缓存 + for (DictModel dict : newList) { + String redisKey = String.format(strTemplate, tenantId, dictCode, dict.getValue()); + try { + redisTemplate.opsForValue().set(redisKey, dict.getText()); + } catch (Exception e) { + log.warn(e.getMessage(), e); + } + } + } + } + + //step.4 调用数据库进行翻译普通字典 + if (needTranslData.size() > 0) { + List dictCodeList = Arrays.asList(dataListMap.keySet().toArray(new String[]{})); + // 将不包含逗号的字典code筛选出来,因为带逗号的是表字典,而不是普通的数据字典 + List filterDictCodes = dictCodeList.stream().filter(key -> !key.contains(",")).collect(Collectors.toList()); + String dictCodes = String.join(",", filterDictCodes); + String values = String.join(",", needTranslData); + log.debug("translateManyDict.dictCodes:" + dictCodes); + log.debug("translateManyDict.values:" + values); + + Map> manyDict = legendApi.translateManyDict(dictCodes, values); + String strTemplate = QMS_DICT_BIZ_CACHE + "::%s:%s"; + log.debug("translateManyDict.result:" + manyDict); + for (String dictCode : manyDict.keySet()) { + List list = translText.computeIfAbsent(dictCode, k -> new ArrayList<>()); + List newList = manyDict.get(dictCode); + list.addAll(newList); + + // 做 redis 缓存 + for (DictModel dict : newList) { + String redisKey = String.format(strTemplate, dictCode, dict.getValue()); + try { + redisTemplate.opsForValue().set(redisKey, dict.getText()); + } catch (Exception e) { + log.warn(e.getMessage(), e); + } + } + } + } + return translText; + } + + /** + * 字典值替换文本 + * + * @param dictModels + * @param values + * @return + */ + private String translDictText(List dictModels, String values) { + List result = new ArrayList<>(); + + // 允许多个逗号分隔,允许传数组对象 + String[] splitVal = values.split(","); + for (String val : splitVal) { + String dictText = val; + for (DictModel dict : dictModels) { + if (val.equals(dict.getValue())) { + dictText = dict.getText(); + break; + } + } + result.add(dictText); + } + return String.join(",", result); + } + + /** + * 检测返回结果集中是否包含Dict注解 + * @param records + * @return + */ + private Boolean checkHasDict(List records){ + if(LegendConvertUtils.isNotEmpty(records) && records.size()>0){ + for (Field field : LegendConvertUtils.getAllFields(records.get(0))) { + if (LegendConvertUtils.isNotEmpty(field.getAnnotation(Dict.class))) { + return true; + } + } + } + return false; + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/aspect/annotation/Dict.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/aspect/annotation/Dict.java new file mode 100644 index 0000000..781faf9 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/aspect/annotation/Dict.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.qms.core.aspect.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import static cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant.DICT_ANNOTATION_KEY_TYPE_KEY; + + +@Target(ElementType.FIELD) +@Retention(RetentionPolicy.RUNTIME) +public @interface Dict { + + String dicCode(); + + String dicText() default ""; + + String keyOrID() default DICT_ANNOTATION_KEY_TYPE_KEY; + + String dictTable() default ""; +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/CodeGenUtil.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/CodeGenUtil.java new file mode 100644 index 0000000..9d96480 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/CodeGenUtil.java @@ -0,0 +1,252 @@ +package cn.iocoder.yudao.module.qms.core.code; + +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import java.util.Set; +import java.util.concurrent.TimeUnit; + +import org.apache.commons.lang.StringUtils; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Component; + +import com.alibaba.fastjson.JSON; + +import cn.hutool.core.collection.ListUtil; +import cn.hutool.core.date.DateUtil; +import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; +import lombok.RequiredArgsConstructor; + + +@Component +@RequiredArgsConstructor +public class CodeGenUtil { + + private final RedisTemplate redisTemplate; + + //private final RabbitMqClient rabbitMqClient; + + private final static String REDIS_SERIAL_NUM_KEY = "mas:serial_num"; + + private final static String REDIS_RANDOM_NUM_KEY = "mas:random_num"; + + /** + * 生成编码 + * 编码生成规则,以“|”分割:/、原样输出;?、编密号;@、当前日期格式化;#、财务月日期格式化;*、流水号配置以“-”分割,第一位流水号编码(为?时需要传入动态流水号编号),第二位流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算);^、随机获取一个批量生成的编码,配置以“-”分割,第一位随机流水号编码,第二位随机流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算) + * @param codeRule 编码规则 + * @return + */ + public String genCode(String codeRule) { + return genCode(null, "", "", codeRule); + } + + + /** + * 生成编码 + * 编码生成规则,以“|”分割:/、原样输出;?、编密号;@、当前日期格式化;#、财务月日期格式化;*、流水号配置以“-”分割,第一位流水号编码(为?时需要传入动态流水号编号),第二位流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算);^、随机获取一个批量生成的编码,配置以“-”分割,第一位随机流水号编码,第二位随机流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算) + * @param prefix 前缀 + * @param codeRule 编码规则 + * @return + */ + public String genCode(String prefix, String codeRule) { + return genCode(null, prefix, "", codeRule); + } + + + /** + * 生成编码 + * 编码生成规则,以“|”分割:/、原样输出;?、编密号;@、当前日期格式化;#、财务月日期格式化;*、流水号配置以“-”分割,第一位流水号编码(为?时需要传入动态流水号编号),第二位流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算);^、随机获取一个批量生成的编码,配置以“-”分割,第一位随机流水号编码,第二位随机流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算) + * @param tenantId 租户id + * @param prefix 前缀 + * @param codeRule 编码规则 + * @return + */ + public String genCode(String tenantId, String prefix, String codeRule) { + return genCode(tenantId, prefix, null, codeRule); + } + + /** + * 动态生成编码 + * 编码生成规则,以“|”分割:/、原样输出;?、编密号;@、当前日期格式化;#、财务月日期格式化;*、流水号配置以“-”分割,第一位流水号编码(为?时需要传入动态流水号编号),第二位流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算);^、随机获取一个批量生成的编码,配置以“-”分割,第一位随机流水号编码,第二位随机流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算) + * @param prefix 前缀 + * @param dynamicSerialNumCode 动态流水号编码 + * @param codeRule 编码规则 + * @return + */ + public String genDynamicCode(String prefix, String dynamicSerialNumCode, String codeRule) { + return genCode(null, prefix, dynamicSerialNumCode, codeRule); + } + + /** + * 生成编码 + * 编码生成规则,以“|”分割:/、原样输出;?、编密号;@、当前日期格式化;#、财务月日期格式化;*、流水号配置以“-”分割,第一位流水号编码(为?时需要传入动态流水号编号),第二位流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算);^、随机获取一个批量生成的编码,配置以“-”分割,第一位随机流水号编码,第二位随机流水号长度,第三位为D(以日重新计算),Y(以年计算),M(以月计算),F(以财务月计算) + * @param tenantId 租户id + * @param prefix 前缀 + * @param dynamicSerialNumCode 动态流水号编码 + * @param codeRule 编码规则 + * @return + */ + public String genCode(String tenantId, String prefix, String dynamicSerialNumCode, String codeRule) { + if (StringUtils.isBlank(codeRule)) { + return ""; + } + if(StringUtils.isBlank(tenantId)) { + tenantId = TenantContextHolder.getRequiredTenantId().toString(); + } + String[] rules = codeRule.split("\\|");//竖线分割 + if (rules.length < 1) { + return ""; + } + StringBuffer codeBuffer = new StringBuffer(prefix); + for (String rule : rules) { + String ruleStart = rule.substring(0, 1); + switch (ruleStart) { + case "/": + codeBuffer.append(rule.substring(1)); + break; + case "@": + codeBuffer.append(DateUtil.format(new Date(), rule.substring(1))); + break; + case "#": + codeBuffer.append(getFinancialYearAndMonth(rule.substring(1))); + break; + case "?": + codeBuffer.append(SampleEncryptUtil.sampleEncrypt()); + if (StringUtils.isNotBlank(prefix)) { + codeBuffer.delete(0, prefix.length()); + } + break; + case "*"://流水号 + String serialNumRule = rule.substring(1); + String[] serialNumRules = serialNumRule.split("-"); + if (serialNumRules.length != 3) { + throw new IllegalArgumentException("流水号规则不正确!"); + + } + String serialNumCode = serialNumRules[0];//流水号编码 + if("?".equals(serialNumCode)) { + if (StringUtils.isBlank(dynamicSerialNumCode)) { + throw new IllegalArgumentException("动态流水号编码需要必传!"); + } + serialNumCode = dynamicSerialNumCode; + } + + Integer serialNumSeveral = Integer.parseInt(serialNumRules[1]);//流水号位数 + String serialNumCodeRule = serialNumRules[2];//流水号生成规则 + String serialNumRedisKey = null; + switch (serialNumCodeRule) { + case "D"://按日 + String day = DateUtil.format(new Date(), "yyyyMMdd"); + serialNumRedisKey = tenantId + ":" + REDIS_SERIAL_NUM_KEY + ":" + serialNumCode + ":D:" + day; + break; + case "M"://按月 + String month = DateUtil.format(new Date(), "yyyyMM"); + serialNumRedisKey = tenantId + ":" + REDIS_SERIAL_NUM_KEY + ":" + serialNumCode + ":M:" + month; + break; + case "Y"://按年 + String year = DateUtil.format(new Date(), "yyyy"); + serialNumRedisKey = tenantId + ":" + REDIS_SERIAL_NUM_KEY + ":" + serialNumCode + ":Y:" + year; + break; + case "F"://按财务月 + String financialMonth = getFinancialYearAndMonth("yyyyMM"); + serialNumRedisKey = tenantId + ":" + REDIS_SERIAL_NUM_KEY + ":" + serialNumCode + ":F:" + financialMonth; + break; + } + long serialNum = redisTemplate.opsForValue().increment(serialNumRedisKey, 1); +// BaseMap baseMap = new BaseMap(); +// baseMap.put("redisKey", serialNumRedisKey); +// baseMap.put("redisValue", serialNum); +// rabbitMqClient.sendQmsSerialnumMessage(baseMap); + codeBuffer.append(String.format("%0"+serialNumSeveral+"d", serialNum)); + break; + case "^"://批量生成,随机获取 + String batchSerialNumRule = rule.substring(1); + String[] batchSerialNumRules = batchSerialNumRule.split("-"); + if (batchSerialNumRules.length != 3) { + throw new IllegalArgumentException("流水号规则不正确!"); + + } + String batchSerialNumCode = batchSerialNumRules[0];//流水号编码 + Integer batchSerialNumSeveral = Integer.parseInt(batchSerialNumRules[1]);//随机流水号位数 + String batchSerialNumCodeRule = batchSerialNumRules[2];//流水号生成规则 + String batchSerialNumRedisKey = null; + long batchSerialNumRedisKeyTimeout = 0; + switch (batchSerialNumCodeRule) { + case "D"://按日 + String day = DateUtil.format(new Date(), "yyyyMMdd"); + batchSerialNumRedisKey = tenantId + ":" + REDIS_RANDOM_NUM_KEY + ":" + batchSerialNumCode + ":D:" + day; + batchSerialNumRedisKeyTimeout = 2; + break; + case "M"://按月 + String month = DateUtil.format(new Date(), "yyyyMM"); + batchSerialNumRedisKey = tenantId + ":" + REDIS_RANDOM_NUM_KEY + ":" + batchSerialNumCode + ":M:" + month; + batchSerialNumRedisKeyTimeout = 40; + break; + case "Y"://按年 + String year = DateUtil.format(new Date(), "yyyy"); + batchSerialNumRedisKey = tenantId + ":" + REDIS_RANDOM_NUM_KEY + ":" + batchSerialNumCode + ":Y:" + year; + batchSerialNumRedisKeyTimeout = 370; + break; + case "F"://按财务月 + String financialMonth = getFinancialYearAndMonth("yyyyMM"); + batchSerialNumRedisKey = tenantId + ":" + REDIS_RANDOM_NUM_KEY + ":" + batchSerialNumCode + ":F:" + financialMonth; + batchSerialNumRedisKeyTimeout = 50; + break; + } + + String value = null; + if (redisTemplate.hasKey(batchSerialNumRedisKey)) {//key存在 + value = redisTemplate.opsForSet().pop(batchSerialNumRedisKey); + } else { + StringBuffer maxBuffer = new StringBuffer(); + for (int i = 0; i < batchSerialNumSeveral; i++) { + maxBuffer.append(9); + } + long max = Long.valueOf(maxBuffer.toString()); + + List valueList = new ArrayList<>(); + for (int i = 1; i <= max; i++) { + valueList.add(String.format("%0" + batchSerialNumSeveral + "d", i)); + } + + String key = batchSerialNumRedisKey; + ListUtil.page(valueList, 1000, ls -> { + String[] array = ls.toArray(new String[ls.size()]); + redisTemplate.opsForSet().add(key, array); + }); + redisTemplate.expire(batchSerialNumRedisKey, batchSerialNumRedisKeyTimeout, TimeUnit.DAYS); + + value = redisTemplate.opsForSet().pop(batchSerialNumRedisKey); + } + Set members = redisTemplate.opsForSet().members(batchSerialNumRedisKey); +// BaseMap randomBaseMap = new BaseMap(); +// randomBaseMap.put("redisKey", batchSerialNumRedisKey); +// randomBaseMap.put("redisRandomValue", JSON.toJSONString(members)); +// rabbitMqClient.sendQmsSerialnumMessage(randomBaseMap); + codeBuffer.append(value); + break; + } + } + return codeBuffer.toString(); + } + + /** + * 获取财务年月 + * @param codeRule 财务年月格式(如:yyMM、yyyyMM、yy-MM-、yyMM-) + * @return + */ + public String getFinancialYearAndMonth(String codeRule) { + String yearMonth = ""; + Calendar now = Calendar.getInstance(); + int year = now.get(Calendar.YEAR); + int month = now.get(Calendar.MONTH) + 1; + int day = now.get(Calendar.DAY_OF_MONTH); + if (day <= 25 || (day <= 31 && month == 12)) { + yearMonth = DateUtil.format(DateUtil.parse(year + "-" + month + "-01", "yyyy-MM-dd"), codeRule); + } else { + yearMonth = DateUtil.format(DateUtil.parse(year + "-" + (month + 1) + "-01", "yyyy-MM-dd"), codeRule); + } + return yearMonth; + } +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/SampleEncryptUtil.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/SampleEncryptUtil.java new file mode 100644 index 0000000..3ee8624 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/SampleEncryptUtil.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.qms.core.code; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import org.apache.commons.lang.StringUtils; +import com.baomidou.mybatisplus.core.toolkit.IdWorker; + +public class SampleEncryptUtil { + + private static final String[] ID_CHAR_SET = { + "0","1","2","3","4","5","6","7","8","9", + "A","B","C","D","E","F","G","H","I","J", + "K","L","M","N","P","Q","R","S","T","U", + "V","W","X","Y","Z"}; + + public static String sampleEncrypt() { + long id = IdWorker.getId(); + return sampleEncrypt(id); + } + + public static String sampleEncrypt(long id) { + String pivotStr = pivotStr(id + ""); + String to35Num = to35Num(pivotStr); + return StringUtils.leftPad(to35Num, 13, '0'); + } + + private static String to35Num(String l) { + List al = new ArrayList<>(); + BigInteger y = new BigInteger(l); + BigInteger t; + while (y.compareTo(BigInteger.ZERO) > 0) { + t = y.mod(new BigInteger(ID_CHAR_SET.length + "")); + y = y.divide(new BigInteger(ID_CHAR_SET.length + "")); + al.add(0, ID_CHAR_SET[t.intValue()]); + } + StringBuffer sb = new StringBuffer(); + for (String c : al) { + sb.append(c); + } + return sb.toString(); + } + + /** + * 字符串反转 + * @param str + * @return + */ + private static String pivotStr(String str) { + StringBuilder sb = new StringBuilder(); + char[] charArray = str.toCharArray(); + for (int i = charArray.length; i-- > 0; ) { + sb.append(charArray[i]); + } + return sb.toString(); + } +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/SequenceUtil.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/SequenceUtil.java new file mode 100644 index 0000000..bd33c09 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/code/SequenceUtil.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.qms.core.code; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.stereotype.Component; + +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.system.api.sequence.SequenceApi; +import lombok.RequiredArgsConstructor; + +@Component +@RequiredArgsConstructor +public class SequenceUtil { + + private final SequenceApi sequenceApi; + + private final CodeGenUtil codeGenUtil; + + /** + * 样品编号生成 + * @param sequenceCode 序列号编码 + * @return + */ + public String genCode(String sequenceCode) { + if (sequenceApi == null) { + throw new ServiceException(500, "序列号服务为空"); + } + String circulationValue = null; + List inputStrs = null; + + if (sequenceCode.lastIndexOf("_CFY") > 0) { + circulationValue = codeGenUtil.getFinancialYearAndMonth("yyyyMM"); + inputStrs = new ArrayList<>(); + inputStrs.add(circulationValue); + } + + CommonResult result = sequenceApi.getNextSequence(sequenceCode, circulationValue, inputStrs); + if (result != null && result.isSuccess() && result.getData() != null) { + return result.getData(); + } + throw new ServiceException(500, "调用远程服务获取序列号异常"); + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/CacheConstant.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/CacheConstant.java new file mode 100644 index 0000000..b55f953 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/CacheConstant.java @@ -0,0 +1,8 @@ +package cn.iocoder.yudao.module.qms.core.constant; + +public class CacheConstant { + + public static final String QMS_DICT_BIZ_CACHE = "qms:cache:dict"; + public static final String QMS_DICT_TABLE_CACHE = "qms:cache:dictTable"; + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/CommonConstant.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/CommonConstant.java new file mode 100644 index 0000000..8127cdc --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/CommonConstant.java @@ -0,0 +1,78 @@ +package cn.iocoder.yudao.module.qms.core.constant; + +public class CommonConstant { + + + /** + * 删除标志 + */ + public static final Integer DEL_FLAG_1 = 1; + + /** + * 未删除 + */ + public static final Integer DEL_FLAG_0 = 0; + + /** + * 是否禁用-1-是 + */ + public static final Integer CANCEL_FLAG_1 = 1; + + /** + * 是否禁用-1-否 + */ + public static final Integer CANCEL_FLAG_0 = 0; + + /** + * 是否用户已被冻结 1正常(解冻) 2冻结 3离职 + */ + public static final Integer USER_UNFREEZE = 1; + public static final Integer USER_FREEZE = 2; + public static final Integer USER_QUIT = 3; + + /** + * 用户来源(1、平台管理创建,2、租户自建,3、 iwork同步) + */ + public static final Integer USER_SOURCE_PLATFORM = 1; + public static final Integer USER_SOURCE_TENANT = 2; + public static final Integer USER_SOURCE_IWORK = 3; + + /** + * 字典翻译文本后缀 + */ + public static final String DICT_TEXT_SUFFIX = "_dictText"; + + /** + * 未知的 + */ + public static final String UNKNOWN = "unknown"; + + /** + * String 类型的空值 + */ + public static final String STRING_NULL = "null"; + + /** + * 部门表唯一key,id + */ + public static final String DEPART_KEY_ID = "id"; + /** + * 部门表唯一key,orgCode + */ + public static final String DEPART_KEY_ORG_CODE = "orgCode"; + + /** + * 不是叶子节点 + */ + public static final Integer NOT_LEAF = 0; + + /** + * 是叶子节点 + */ + public static final Integer IS_LEAF = 1; + + + //================数据库常量====================== + public static final String SQL_WHERE = "where"; + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/DataTypeConstant.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/DataTypeConstant.java new file mode 100644 index 0000000..62bb4d1 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/DataTypeConstant.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.qms.core.constant; + +/* +* 简单常量定义 +* 数据类型 +* */ +public class DataTypeConstant { + + //分类与数据 + public static final String DATA_TYPE_CATEGORY = "category"; + public static final String DATA_TYPE_DATA = "data"; + + + /* + * 字典注解-字典值类型。默认key,可选id + * */ + public static final String DICT_ANNOTATION_KEY_TYPE_KEY = "key"; + public static final String DICT_ANNOTATION_KEY_TYPE_ID = "id"; + public static final String DICT_ANNOTATION_SPLIT = "#-#"; + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/SymbolConstant.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/SymbolConstant.java new file mode 100644 index 0000000..aa01d1e --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/constant/SymbolConstant.java @@ -0,0 +1,114 @@ +package cn.iocoder.yudao.module.qms.core.constant; + +public class SymbolConstant { + + /** + * 符号:点 + */ + public static final String SPOT = "."; + + /** + * 符号:双斜杠 + */ + public static final String DOUBLE_BACKSLASH = "\\"; + + /** + * 符号:冒号 + */ + public static final String COLON = ":"; + + /** + * 符号:逗号 + */ + public static final String COMMA = ","; + + /** + * 符号:左花括号 } + */ + public static final String LEFT_CURLY_BRACKET = "{"; + + /** + * 符号:右花括号 } + */ + public static final String RIGHT_CURLY_BRACKET = "}"; + + /** + * 符号:井号 # + */ + public static final String WELL_NUMBER = "#"; + + /** + * 符号:单斜杠 + */ + public static final String SINGLE_SLASH = "/"; + + /** + * 符号:双斜杠 + */ + public static final String DOUBLE_SLASH = "//"; + + /** + * 符号:感叹号 + */ + public static final String EXCLAMATORY_MARK = "!"; + + /** + * 符号:下划线 + */ + public static final String UNDERLINE = "_"; + + /** + * 符号:单引号 + */ + public static final String SINGLE_QUOTATION_MARK = "'"; + + /** + * 符号:星号 + */ + public static final String ASTERISK = "*"; + + /** + * 符号:百分号 + */ + public static final String PERCENT_SIGN = "%"; + + /** + * 符号:美元 $ + */ + public static final String DOLLAR = "$"; + + /** + * 符号:和 & + */ + public static final String AND = "&"; + + /** + * 符号:../ + */ + public static final String SPOT_SINGLE_SLASH = "../"; + + /** + * 符号:..\\ + */ + public static final String SPOT_DOUBLE_BACKSLASH = "..\\"; + + /** + * 系统变量前缀 #{ + */ + public static final String SYS_VAR_PREFIX = "#{"; + + /** + * 符号 {{ + */ + public static final String DOUBLE_LEFT_CURLY_BRACKET = "{{"; + + /** + * 符号:[ + */ + public static final String SQUARE_BRACKETS_LEFT = "["; + /** + * 符号:] + */ + public static final String SQUARE_BRACKETS_RIGHT = "]"; + +} \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/LegendApi.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/LegendApi.java new file mode 100644 index 0000000..3349a60 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/LegendApi.java @@ -0,0 +1,83 @@ +package cn.iocoder.yudao.module.qms.core.legend; + +import cn.iocoder.yudao.module.qms.common.dic.service.DictionaryBusinessService; +import cn.iocoder.yudao.module.qms.core.legend.vo.DictModel; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +import static cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant.DICT_ANNOTATION_KEY_TYPE_KEY; +import static cn.iocoder.yudao.module.qms.core.constant.DataTypeConstant.DICT_ANNOTATION_SPLIT; + +@Slf4j +@Service +public class LegendApi { + + @Resource + DictionaryBusinessService dictionaryBusinessService; + /** + * 普通字典的翻译,根据多个dictCode和多条数据,多个以逗号分割 + * @param dictCodes 例如:user_status,sex + * @param keys 例如:1,2,0 + * @return + */ + public Map> translateManyDict(String dictCodes, String keys){ + List dictCodeList = Arrays.asList(dictCodes.split(",")); + List values = Arrays.asList(keys.split(",")); + return dictionaryBusinessService.queryManyDict(dictCodeList, values); + } + + + /** + * 业务字典的翻译,根据多个dictCode和多条数据,多个以逗号分割 + * @param dictCodes 例如:user_status,sex + * @param keys 例如:1,2,0 + * @return + */ + public Map> translateManyDictBiz(String dictCodes, String keys) { + List dictCodeList = Arrays.asList(dictCodes.split(",")); + List values = Arrays.asList(keys.split(",")); +// if(DICT_ANNOTATION_KEY_TYPE_KEY.equals(keyOrId)) + return dictionaryBusinessService.queryManyDict(dictCodeList, values); +// return dictionaryBusinessService.queryManyDictByIDs(dictCodeList, values); + } + + /** + * 字典表的 翻译,可批量 + * @param table + * @param text + * @param code + * @param keys 多个用逗号分割 + * @return + */ + public List translateDictFromTableByKeys(String table, String text, String code, String keys) { + return dictionaryBusinessService.queryTableDictText(table, text, code, List.of(keys.split(","))); + } + + /** + * 字典表翻译 + * */ + public String translateDictFromTable(String table, String text, String code, String key) { + return dictionaryBusinessService.queryTableDictTextByKey(table, text, code, key); + } + + /** + * 普通字典翻译 + * */ + public String translateDict(String code, String key){ + String keyOrId = DICT_ANNOTATION_KEY_TYPE_KEY; + if(code.contains(DICT_ANNOTATION_SPLIT)){ + keyOrId = code.split(DICT_ANNOTATION_SPLIT)[1]; + code = code.split(DICT_ANNOTATION_SPLIT)[0]; + } + if(DICT_ANNOTATION_KEY_TYPE_KEY.equals(keyOrId)) + return dictionaryBusinessService.queryDictTextByKey(code, key); + return dictionaryBusinessService.queryDictTextByID(code, key); + } + + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/LegendConvertUtils.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/LegendConvertUtils.java new file mode 100644 index 0000000..dfec99d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/LegendConvertUtils.java @@ -0,0 +1,804 @@ +package cn.iocoder.yudao.module.qms.core.legend; + +import cn.iocoder.yudao.module.qms.core.constant.CommonConstant; +import cn.iocoder.yudao.module.qms.core.constant.SymbolConstant; +import com.alibaba.fastjson.JSONArray; +import jakarta.servlet.http.HttpServletRequest; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; +import org.springframework.beans.BeanUtils; + +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.InetAddress; +import java.net.NetworkInterface; +import java.net.SocketException; +import java.net.UnknownHostException; +import java.sql.Date; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +@Slf4j +public class LegendConvertUtils { + public static boolean isEmpty(Object object) { + if (object == null) { + return (true); + } + if ("".equals(object)) { + return (true); + } + if (CommonConstant.STRING_NULL.equals(object)) { + return (true); + } + return (false); + } + + public static boolean isNotEmpty(Object object) { + if (object != null && !"".equals(object) && !object.equals(CommonConstant.STRING_NULL)) { + return (true); + } + return (false); + } + + public static String decode(String strIn, String sourceCode, String targetCode) { + String temp = code2code(strIn, sourceCode, targetCode); + return temp; + } + + @SuppressWarnings("AlibabaLowerCamelCaseVariableNaming") + public static String StrToUTF(String strIn, String sourceCode, String targetCode) { + strIn = ""; + try { + strIn = new String(strIn.getBytes("ISO-8859-1"), "GBK"); + } catch (UnsupportedEncodingException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return strIn; + + } + + private static String code2code(String strIn, String sourceCode, String targetCode) { + String strOut = null; + if (strIn == null || "".equals(strIn.trim())) { + return strIn; + } + try { + byte[] b = strIn.getBytes(sourceCode); + for (int i = 0; i < b.length; i++) { + System.out.print(b[i] + " "); + } + strOut = new String(b, targetCode); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + return strOut; + } + + public static int getInt(String s, int defval) { + if (s == null || "".equals(s)) { + return (defval); + } + try { + return (Integer.parseInt(s)); + } catch (NumberFormatException e) { + return (defval); + } + } + + public static int getInt(String s) { + if (s == null || "".equals(s)) { + return 0; + } + try { + return (Integer.parseInt(s)); + } catch (NumberFormatException e) { + return 0; + } + } + + public static int getInt(String s, Integer df) { + if (s == null || "".equals(s)) { + return df; + } + try { + return (Integer.parseInt(s)); + } catch (NumberFormatException e) { + return 0; + } + } + + public static Integer[] getInts(String[] s) { + if (s == null) { + return null; + } + Integer[] integer = new Integer[s.length]; + for (int i = 0; i < s.length; i++) { + integer[i] = Integer.parseInt(s[i]); + } + return integer; + + } + + public static double getDouble(String s, double defval) { + if (s == null || "".equals(s)) { + return (defval); + } + try { + return (Double.parseDouble(s)); + } catch (NumberFormatException e) { + return (defval); + } + } + + public static double getDou(Double s, double defval) { + if (s == null) { + return (defval); + } + return s; + } + + /*public static Short getShort(String s) { + if (StringUtil.isNotEmpty(s)) { + return (Short.parseShort(s)); + } else { + return null; + } + }*/ + + public static int getInt(Object object, int defval) { + if (isEmpty(object)) { + return (defval); + } + try { + return (Integer.parseInt(object.toString())); + } catch (NumberFormatException e) { + return (defval); + } + } + + public static Integer getInt(Object object) { + if (isEmpty(object)) { + return null; + } + try { + return (Integer.parseInt(object.toString())); + } catch (NumberFormatException e) { + return null; + } + } + + public static int getInt(BigDecimal s, int defval) { + if (s == null) { + return (defval); + } + return s.intValue(); + } + + public static Integer[] getIntegerArry(String[] object) { + int len = object.length; + Integer[] result = new Integer[len]; + try { + for (int i = 0; i < len; i++) { + result[i] = Integer.valueOf(object[i].trim()); + } + return result; + } catch (NumberFormatException e) { + return null; + } + } + + public static String getString(String s) { + return (getString(s, "")); + } + + /** + * 转义成Unicode编码 + * @param s + * @return + */ + /*public static String escapeJava(Object s) { + return StringEscapeUtils.escapeJava(getString(s)); + }*/ + + public static String getString(Object object) { + if (isEmpty(object)) { + return ""; + } + return (object.toString().trim()); + } + + public static String getString(int i) { + return (String.valueOf(i)); + } + + public static String getString(float i) { + return (String.valueOf(i)); + } + + public static String getString(String s, String defval) { + if (isEmpty(s)) { + return (defval); + } + return (s.trim()); + } + + public static String getString(Object s, String defval) { + if (isEmpty(s)) { + return (defval); + } + return (s.toString().trim()); + } + + public static long stringToLong(String str) { + Long test = new Long(0); + try { + test = Long.valueOf(str); + } catch (Exception e) { + } + return test.longValue(); + } + + /** + * 获取本机IP + */ + public static String getIp() { + String ip = null; + try { + InetAddress address = InetAddress.getLocalHost(); + ip = address.getHostAddress(); + + } catch (UnknownHostException e) { + e.printStackTrace(); + } + return ip; + } + + /** + * 判断一个类是否为基本数据类型。 + * + * @param clazz + * 要判断的类。 + * @return true 表示为基本数据类型。 + */ + private static boolean isBaseDataType(Class clazz) throws Exception { + return (clazz.equals(String.class) || clazz.equals(Integer.class) || clazz.equals(Byte.class) || clazz.equals(Long.class) || clazz.equals(Double.class) || clazz.equals(Float.class) || clazz.equals(Character.class) || clazz.equals(Short.class) || clazz.equals(BigDecimal.class) || clazz.equals(BigInteger.class) || clazz.equals(Boolean.class) || clazz.equals(Date.class) || clazz.isPrimitive()); + } + + /** + * @param request + * IP + * @return IP Address + */ + public static String getIpAddrByRequest(HttpServletRequest request) { + String ip = request.getHeader("x-forwarded-for"); + if (ip == null || ip.length() == 0 || CommonConstant.UNKNOWN.equalsIgnoreCase(ip)) { + ip = request.getHeader("Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || CommonConstant.UNKNOWN.equalsIgnoreCase(ip)) { + ip = request.getHeader("WL-Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || CommonConstant.UNKNOWN.equalsIgnoreCase(ip)) { + ip = request.getRemoteAddr(); + } + return ip; + } + + /** + * @return 本机IP + * @throws SocketException + */ + public static String getRealIp() throws SocketException { + // 本地IP,如果没有配置外网IP则返回它 + String localip = null; + // 外网IP + String netip = null; + + Enumeration netInterfaces = NetworkInterface.getNetworkInterfaces(); + InetAddress ip = null; + // 是否找到外网IP + boolean finded = false; + while (netInterfaces.hasMoreElements() && !finded) { + NetworkInterface ni = netInterfaces.nextElement(); + Enumeration address = ni.getInetAddresses(); + while (address.hasMoreElements()) { + ip = address.nextElement(); + // 外网IP + if (!ip.isSiteLocalAddress() && !ip.isLoopbackAddress() && ip.getHostAddress().indexOf(":") == -1) { + netip = ip.getHostAddress(); + finded = true; + break; + } else if (ip.isSiteLocalAddress() && !ip.isLoopbackAddress() && ip.getHostAddress().indexOf(":") == -1) { + // 内网IP + localip = ip.getHostAddress(); + } + } + } + + if (netip != null && !"".equals(netip)) { + return netip; + } else { + return localip; + } + } + + /** + * java去除字符串中的空格、回车、换行符、制表符 + * + * @param str + * @return + */ + public static String replaceBlank(String str) { + String dest = ""; + if (str != null) { + String reg = "\\s*|\t|\r|\n"; + Pattern p = Pattern.compile(reg); + Matcher m = p.matcher(str); + dest = m.replaceAll(""); + } + return dest; + + } + + /** + * 判断元素是否在数组内 + * + * @param child + * @param all + * @return + */ + public static boolean isIn(String child, String[] all) { + if (all == null || all.length == 0) { + return false; + } + for (int i = 0; i < all.length; i++) { + String aSource = all[i]; + if (aSource.equals(child)) { + return true; + } + } + return false; + } + + /** + * 判断元素是否在数组内 + * + * @param childArray + * @param all + * @return + */ + public static boolean isArrayIn(String[] childArray, String[] all) { + if (all == null || all.length == 0) { + return false; + } + for (String v : childArray) { + if (!isIn(v, all)) { + return false; + } + } + return true; + } + + /** + * 判断元素是否在数组内 + * + * @param childArray + * @param all + * @return + */ + public static boolean isJsonArrayIn(JSONArray childArray, String[] all) { + if (all == null || all.length == 0) { + return false; + } + + String[] childs = childArray.toArray(new String[]{}); + for (String v : childs) { + if (!isIn(v, all)) { + return false; + } + } + return true; + } + + /** + * 获取Map对象 + */ + public static Map getHashMap() { + return new HashMap<>(5); + } + + /** + * SET转换MAP + * + * @param str + * @return + */ + public static Map setToMap(Set setobj) { + Map map = getHashMap(); + for (Iterator iterator = setobj.iterator(); iterator.hasNext();) { + Map.Entry entry = (Map.Entry) iterator.next(); + map.put(entry.getKey().toString(), entry.getValue() == null ? "" : entry.getValue().toString().trim()); + } + return map; + + } + + public static boolean isInnerIp(String ipAddress) { + boolean isInnerIp = false; + long ipNum = getIpNum(ipAddress); + /** + * 私有IP:A类 10.0.0.0-10.255.255.255 B类 172.16.0.0-172.31.255.255 C类 192.168.0.0-192.168.255.255 当然,还有127这个网段是环回地址 + **/ + long aBegin = getIpNum("10.0.0.0"); + long aEnd = getIpNum("10.255.255.255"); + long bBegin = getIpNum("172.16.0.0"); + long bEnd = getIpNum("172.31.255.255"); + long cBegin = getIpNum("192.168.0.0"); + long cEnd = getIpNum("192.168.255.255"); + String localIp = "127.0.0.1"; + isInnerIp = isInner(ipNum, aBegin, aEnd) || isInner(ipNum, bBegin, bEnd) || isInner(ipNum, cBegin, cEnd) || localIp.equals(ipAddress); + return isInnerIp; + } + + private static long getIpNum(String ipAddress) { + String[] ip = ipAddress.split("\\."); + long a = Integer.parseInt(ip[0]); + long b = Integer.parseInt(ip[1]); + long c = Integer.parseInt(ip[2]); + long d = Integer.parseInt(ip[3]); + + long ipNum = a * 256 * 256 * 256 + b * 256 * 256 + c * 256 + d; + return ipNum; + } + + private static boolean isInner(long userIp, long begin, long end) { + return (userIp >= begin) && (userIp <= end); + } + + /** + * 将下划线大写方式命名的字符串转换为驼峰式。 + * 如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。
+ * 例如:hello_world->helloWorld + * + * @param name + * 转换前的下划线大写方式命名的字符串 + * @return 转换后的驼峰式命名的字符串 + */ + public static String camelName(String name) { + StringBuilder result = new StringBuilder(); + // 快速检查 + if (name == null || name.isEmpty()) { + // 没必要转换 + return ""; + } else if (!name.contains(SymbolConstant.UNDERLINE)) { + // 不含下划线,仅将首字母小写 + //update-begin--Author:zhoujf Date:20180503 for:TASK #2500 【代码生成器】代码生成器开发一通用模板生成功能 + //update-begin--Author:zhoujf Date:20180503 for:TASK #2500 【代码生成器】代码生成器开发一通用模板生成功能 + return name.substring(0, 1).toLowerCase() + name.substring(1).toLowerCase(); + //update-end--Author:zhoujf Date:20180503 for:TASK #2500 【代码生成器】代码生成器开发一通用模板生成功能 + } + // 用下划线将原始字符串分割 + String[] camels = name.split("_"); + for (String camel : camels) { + // 跳过原始字符串中开头、结尾的下换线或双重下划线 + if (camel.isEmpty()) { + continue; + } + // 处理真正的驼峰片段 + if (result.length() == 0) { + // 第一个驼峰片段,全部字母都小写 + result.append(camel.toLowerCase()); + } else { + // 其他的驼峰片段,首字母大写 + result.append(camel.substring(0, 1).toUpperCase()); + result.append(camel.substring(1).toLowerCase()); + } + } + return result.toString(); + } + + /** + * 将下划线大写方式命名的字符串转换为驼峰式。 + * 如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。
+ * 例如:hello_world,test_id->helloWorld,testId + * + * @param name + * 转换前的下划线大写方式命名的字符串 + * @return 转换后的驼峰式命名的字符串 + */ + public static String camelNames(String names) { + if(names==null||"".equals(names)){ + return null; + } + StringBuffer sf = new StringBuffer(); + String[] fs = names.split(","); + for (String field : fs) { + field = camelName(field); + sf.append(field + ","); + } + String result = sf.toString(); + return result.substring(0, result.length() - 1); + } + + //update-begin--Author:zhoujf Date:20180503 for:TASK #2500 【代码生成器】代码生成器开发一通用模板生成功能 + /** + * 将下划线大写方式命名的字符串转换为驼峰式。(首字母写) + * 如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。
+ * 例如:hello_world->HelloWorld + * + * @param name + * 转换前的下划线大写方式命名的字符串 + * @return 转换后的驼峰式命名的字符串 + */ + public static String camelNameCapFirst(String name) { + StringBuilder result = new StringBuilder(); + // 快速检查 + if (name == null || name.isEmpty()) { + // 没必要转换 + return ""; + } else if (!name.contains(SymbolConstant.UNDERLINE)) { + // 不含下划线,仅将首字母小写 + return name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase(); + } + // 用下划线将原始字符串分割 + String[] camels = name.split("_"); + for (String camel : camels) { + // 跳过原始字符串中开头、结尾的下换线或双重下划线 + if (camel.isEmpty()) { + continue; + } + // 其他的驼峰片段,首字母大写 + result.append(camel.substring(0, 1).toUpperCase()); + result.append(camel.substring(1).toLowerCase()); + } + return result.toString(); + } + //update-end--Author:zhoujf Date:20180503 for:TASK #2500 【代码生成器】代码生成器开发一通用模板生成功能 + + /** + * 将驼峰命名转化成下划线 + * @param para + * @return + */ + public static String camelToUnderline(String para){ + int length = 3; + if(para.length() clazz = object.getClass(); + List fieldList = new ArrayList<>(); + while (clazz != null) { + fieldList.addAll(new ArrayList<>(Arrays.asList(clazz.getDeclaredFields()))); + clazz = clazz.getSuperclass(); + } + Field[] fields = new Field[fieldList.size()]; + fieldList.toArray(fields); + return fields; + } + + /** + * 将map的key全部转成小写 + * @param list + * @return + */ + public static List> toLowerCasePageList(List> list){ + List> select = new ArrayList<>(); + for (Map row : list) { + Map resultMap = new HashMap<>(5); + Set keySet = row.keySet(); + for (String key : keySet) { + String newKey = key.toLowerCase(); + resultMap.put(newKey, row.get(key)); + } + select.add(resultMap); + } + return select; + } + + /** + * 将entityList转换成modelList + * @param fromList + * @param tClass + * @param + * @param + * @return + */ + public static List entityListToModelList(List fromList, Class tClass){ + if(fromList == null || fromList.isEmpty()){ + return null; + } + List tList = new ArrayList<>(); + for(F f : fromList){ + T t = entityToModel(f, tClass); + tList.add(t); + } + return tList; + } + + public static T entityToModel(F entity, Class modelClass) { + log.debug("entityToModel : Entity属性的值赋值到Model"); + Object model = null; + if (entity == null || modelClass ==null) { + return null; + } + + try { + model = modelClass.newInstance(); + } catch (InstantiationException e) { + log.error("entityToModel : 实例化异常", e); + } catch (IllegalAccessException e) { + log.error("entityToModel : 安全权限异常", e); + } + BeanUtils.copyProperties(entity, model); + return (T)model; + } + + /** + * 判断 list 是否为空 + * + * @param list + * @return true or false + * list == null : true + * list.size() == 0 : true + */ + public static boolean listIsEmpty(Collection list) { + return (list == null || list.size() == 0); + } + + /** + * 判断旧值与新值 是否相等 + * + * @param oldVal + * @param newVal + * @return + */ + public static boolean isEqual(Object oldVal, Object newVal) { + if (oldVal != null && newVal != null) { + if (isArray(oldVal)) { + return equalityOfArrays((Object[]) oldVal, (Object[]) newVal); + }else if(oldVal instanceof JSONArray){ + return equalityOfJSONArray((JSONArray) oldVal, (JSONArray) newVal); + } + return oldVal.equals(newVal); + } else { + if (oldVal == null && newVal == null) { + return true; + } else { + return false; + } + } + } + + /** + * 方法描述 判断一个对象是否是一个数组 + * + * @param obj + * @return + * @author yaomy + * @date 2018年2月5日 下午5:03:00 + */ + public static boolean isArray(Object obj) { + if (obj == null) { + return false; + } + return obj.getClass().isArray(); + } + + /** + * 判断两个数组是否相等(数组元素不分顺序) + * + * @param oldVal + * @param newVal + * @return + */ + public static boolean equalityOfJSONArray(JSONArray oldVal, JSONArray newVal) { + if (oldVal != null && newVal != null) { + Object[] oldValArray = oldVal.toArray(); + Object[] newValArray = newVal.toArray(); + return equalityOfArrays(oldValArray,newValArray); + } else { + if (oldVal == null && newVal == null) { + return true; + } else { + return false; + } + } + } + + /** + * 判断两个数组是否相等(数组元素不分顺序) + * + * @param oldVal + * @param newVal + * @return + */ + public static boolean equalityOfArrays(Object[] oldVal, Object newVal[]) { + if (oldVal != null && newVal != null) { + Arrays.sort(oldVal); + Arrays.sort(newVal); + return Arrays.equals(oldVal, newVal); + } else { + if (oldVal == null && newVal == null) { + return true; + } else { + return false; + } + } + } + +// public static void main(String[] args) { +//// String[] a = new String[]{"1", "2"}; +//// String[] b = new String[]{"2", "1"}; +// Integer a = null; +// Integer b = 1; +// System.out.println(LegendConvertUtils.isEqual(a, b)); +// } + + /** + * 判断 list 是否不为空 + * + * @param list + * @return true or false + * list == null : false + * list.size() == 0 : false + */ + public static boolean listIsNotEmpty(Collection list) { + return !listIsEmpty(list); + } + + /** + * 读取静态文本内容 + * @param url + * @return + */ + public static String readStatic(String url) { + String json = ""; + try { + //换个写法,解决springboot读取jar包中文件的问题 + InputStream stream = LegendConvertUtils.class.getClassLoader().getResourceAsStream(url.replace("classpath:", "")); + json = IOUtils.toString(stream,"UTF-8"); + } catch (IOException e) { + log.error(e.getMessage(),e); + } + return json; + } +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/SqlInjectionUtil.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/SqlInjectionUtil.java new file mode 100644 index 0000000..3fedc6f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/SqlInjectionUtil.java @@ -0,0 +1,344 @@ +package cn.iocoder.yudao.module.qms.core.legend; + +import cn.iocoder.yudao.module.qms.core.constant.SymbolConstant; +import lombok.extern.slf4j.Slf4j; + +import java.lang.reflect.Field; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.qms.enums.ErrorCodeConstants.SQL_INJECTION_EXCEPTION; + +/** + * sql注入处理工具类 + * + * @author zhoujf + */ +@Slf4j +public class SqlInjectionUtil { + /** + * sign 用于表字典加签的盐值【SQL漏洞】 + * (上线修改值 20200501,同步修改前端的盐值) + */ + private final static String TABLE_DICT_SIGN_SALT = "20200501"; + private final static String XSS_STR = "and |extractvalue|updatexml|geohash|gtid_subset|gtid_subtract|exec |insert |select |delete |update |drop |count |chr |mid |master |truncate |char |declare |;|or |+|user()"; + + /** + * 正则 user() 匹配更严谨 + */ + private final static String REGULAR_EXPRE_USER = "user[\\s]*\\([\\s]*\\)"; + /**正则 show tables*/ + private final static String SHOW_TABLES = "show\\s+tables"; + + /** + * sleep函数 + */ + private final static Pattern FUN_SLEEP = Pattern.compile("sleep\\(.*\\)", Pattern.CASE_INSENSITIVE); + + /** + * sql注释的正则 + */ + private final static Pattern SQL_ANNOTATION = Pattern.compile("/\\*[\\s\\S]*\\*/"); + + + + /** + * 返回查询表名 + *

+ * sql注入过滤处理,遇到注入关键字抛异常 + * + * @param table + */ + private static Pattern tableNamePattern = Pattern.compile("^[a-zA-Z][a-zA-Z0-9_]{0,63}$"); + public static String getSqlInjectTableName(String table) { + table = table.trim(); + /** + * 检验表名是否合法 + * + * 表名只能由字母、数字和下划线组成。 + * 表名必须以字母开头。 + * 表名长度通常有限制,例如最多为 64 个字符。 + */ + boolean isValidTableName = tableNamePattern.matcher(table).matches(); + if (!isValidTableName) { + throw exception(SQL_INJECTION_EXCEPTION); + } + + //进一步验证是否存在SQL注入风险 + filterContent(table); + return table; + } + + + /** + * 返回查询字段 + *

+ * sql注入过滤处理,遇到注入关键字抛异常 + * + * @param field + */ + static final Pattern fieldPattern = Pattern.compile("^[a-zA-Z0-9_]+$"); + public static String getSqlInjectField(String field) { + if(LegendConvertUtils.isEmpty(field)){ + return null; + } + field = field.trim(); + + if (field.contains(SymbolConstant.COMMA)) { + return getSqlInjectField(field.split(SymbolConstant.COMMA)); + } + + /** + * 校验表字段是否有效 + * + * 字段定义只能是是字母 数字 下划线的组合(不允许有空格、转义字符串等) + */ + boolean isValidField = fieldPattern.matcher(field).matches(); + if (!isValidField) { + throw exception(SQL_INJECTION_EXCEPTION); + } + + //进一步验证是否存在SQL注入风险 + filterContent(field); + return field; + } + + public static String getSqlInjectField(String... fields) { + for (String s : fields) { + getSqlInjectField(s); + } + return String.join(SymbolConstant.COMMA, fields); + } + + /** + * sql注入过滤处理,遇到注入关键字抛异常 + * + * @param value + * @return + */ + public static void filterContent(String value, String customXssString) { + if (value == null || "".equals(value)) { + return; + } + // 校验sql注释 不允许有sql注释 + checkSqlAnnotation(value); + // 统一转为小写 + value = value.toLowerCase(); + //SQL注入检测存在绕过风险 https://gitee.com/jeecg/jeecg-boot/issues/I4NZGE + //value = value.replaceAll("/\\*.*\\*/",""); + + String[] xssArr = XSS_STR.split("\\|"); + for (int i = 0; i < xssArr.length; i++) { + if (value.indexOf(xssArr[i]) > -1) { + log.error("请注意,存在SQL注入关键词---> {}", xssArr[i]); + log.error("请注意,值可能存在SQL注入风险!---> {}", value); + throw exception(SQL_INJECTION_EXCEPTION); + } + } + //update-begin-author:taoyan date:2022-7-13 for: 除了XSS_STR这些提前设置好的,还需要额外的校验比如 单引号 + if (customXssString != null) { + String[] xssArr2 = customXssString.split("\\|"); + for (int i = 0; i < xssArr2.length; i++) { + if (value.indexOf(xssArr2[i]) > -1) { + log.error("请注意,存在SQL注入关键词---> {}", xssArr2[i]); + log.error("请注意,值可能存在SQL注入风险!---> {}", value); + throw exception(SQL_INJECTION_EXCEPTION); + } + } + } + //update-end-author:taoyan date:2022-7-13 for: 除了XSS_STR这些提前设置好的,还需要额外的校验比如 单引号 + if(Pattern.matches(SHOW_TABLES, value) || Pattern.matches(REGULAR_EXPRE_USER, value)){ + throw exception(SQL_INJECTION_EXCEPTION); + } + return; + } + + /** + * sql注入过滤处理,遇到注入关键字抛异常 + * @param values + */ + public static void filterContent(String... values) { + filterContent(values, null); + } + + /** + * sql注入过滤处理,遇到注入关键字抛异常 + * + * @param values + * @return + */ + public static void filterContent(String[] values, String customXssString) { + String[] xssArr = XSS_STR.split("\\|"); + for (String value : values) { + if (value == null || "".equals(value)) { + return; + } + // 校验sql注释 不允许有sql注释 + checkSqlAnnotation(value); + // 统一转为小写 + value = value.toLowerCase(); + //SQL注入检测存在绕过风险 https://gitee.com/jeecg/jeecg-boot/issues/I4NZGE + //value = value.replaceAll("/\\*.*\\*/",""); + + for (int i = 0; i < xssArr.length; i++) { + if (value.indexOf(xssArr[i]) > -1) { + log.error("请注意,存在SQL注入关键词---> {}", xssArr[i]); + log.error("请注意,值可能存在SQL注入风险!---> {}", value); + throw exception(SQL_INJECTION_EXCEPTION); + } + } + //update-begin-author:taoyan date:2022-7-13 for: 除了XSS_STR这些提前设置好的,还需要额外的校验比如 单引号 + if (customXssString != null) { + String[] xssArr2 = customXssString.split("\\|"); + for (int i = 0; i < xssArr2.length; i++) { + if (value.indexOf(xssArr2[i]) > -1) { + log.error("请注意,存在SQL注入关键词---> {}", xssArr2[i]); + log.error("请注意,值可能存在SQL注入风险!---> {}", value); + throw exception(SQL_INJECTION_EXCEPTION); + } + } + } + //update-end-author:taoyan date:2022-7-13 for: 除了XSS_STR这些提前设置好的,还需要额外的校验比如 单引号 + if(Pattern.matches(SHOW_TABLES, value) || Pattern.matches(REGULAR_EXPRE_USER, value)){ + throw exception(SQL_INJECTION_EXCEPTION); + } + } + return; + } + + /** + * 【提醒:不通用】 + * 仅用于字典条件SQL参数,注入过滤 + * + * @param value + * @return + */ + //@Deprecated + public static void specialFilterContentForDictSql(String value) { + String specialXssStr = " exec |extractvalue|updatexml|geohash|gtid_subset|gtid_subtract| insert | select | delete | update | drop | count | chr | mid | master | truncate | char | declare |;|+|user()"; + String[] xssArr = specialXssStr.split("\\|"); + if (value == null || "".equals(value)) { + return; + } + // 校验sql注释 不允许有sql注释 + checkSqlAnnotation(value); + // 统一转为小写 + value = value.toLowerCase(); + //SQL注入检测存在绕过风险 https://gitee.com/jeecg/jeecg-boot/issues/I4NZGE + //value = value.replaceAll("/\\*.*\\*/",""); + + for (int i = 0; i < xssArr.length; i++) { + if (value.indexOf(xssArr[i]) > -1 || value.startsWith(xssArr[i].trim())) { + log.error("请注意,存在SQL注入关键词---> {}", xssArr[i]); + log.error("请注意,值可能存在SQL注入风险!---> {}", value); + throw exception(SQL_INJECTION_EXCEPTION); + } + } + if(Pattern.matches(SHOW_TABLES, value) || Pattern.matches(REGULAR_EXPRE_USER, value)){ + throw exception(SQL_INJECTION_EXCEPTION); + } + return; + } + + + /** + * 【提醒:不通用】 + * 仅用于Online报表SQL解析,注入过滤 + * @param value + * @return + */ + //@Deprecated + public static void specialFilterContentForOnlineReport(String value) { + String specialXssStr = " exec |extractvalue|updatexml|geohash|gtid_subset|gtid_subtract| insert | delete | update | drop | chr | mid | master | truncate | char | declare |user()"; + String[] xssArr = specialXssStr.split("\\|"); + if (value == null || "".equals(value)) { + return; + } + // 校验sql注释 不允许有sql注释 + checkSqlAnnotation(value); + // 统一转为小写 + value = value.toLowerCase(); + //SQL注入检测存在绕过风险 https://gitee.com/jeecg/jeecg-boot/issues/I4NZGE + //value = value.replaceAll("/\\*.*\\*/"," "); + + for (int i = 0; i < xssArr.length; i++) { + if (value.indexOf(xssArr[i]) > -1 || value.startsWith(xssArr[i].trim())) { + log.error("请注意,存在SQL注入关键词---> {}", xssArr[i]); + log.error("请注意,值可能存在SQL注入风险!---> {}", value); + throw exception(SQL_INJECTION_EXCEPTION); + } + } + + if(Pattern.matches(SHOW_TABLES, value) || Pattern.matches(REGULAR_EXPRE_USER, value)){ + throw exception(SQL_INJECTION_EXCEPTION); + } + return; + } + + + /** + * 判断给定的字段是不是类中的属性 + * @param field 字段名 + * @param clazz 类对象 + * @return + */ + public static boolean isClassField(String field, Class clazz){ + Field[] fields = clazz.getDeclaredFields(); + for(int i=0;i fieldSet, Class clazz){ + Field[] fields = clazz.getDeclaredFields(); + for(String field: fieldSet){ + boolean exist = false; + for(int i=0;i ruleMap = new HashMap<>(); + + /** + * 以下字符不能出现在表名中或是字段名中 + */ + public static final Pattern ILLEGAL_NAME_REG = Pattern.compile("[-]{2,}"); + + static { + ruleMap.put("sys_user", "password,salt"); + } + + + /** + * 根据 sql语句 获取表和字段信息,需要到具体的实现类重写此方法- + * 不同的场景 处理可能不太一样 需要自定义,但是返回值确定 + * @param sql + * @return + */ + protected abstract List getQueryTableInfo(String sql); + + + /** + * 校验sql语句 成功返回true + * @param sql + * @return + */ + public boolean isPass(String sql) { + List list = null; + //【jeecg-boot/issues/4040】在线报表不支持子查询,解析报错 #4040 + try { + list = this.getQueryTableInfo(sql.toLowerCase()); + } catch (Exception e) { + log.warn("校验sql语句,解析报错:{}",e.getMessage()); + } + + if(list==null){ + return true; + } + log.info(" 获取sql信息 :{} ", list.toString()); + boolean flag = checkTableAndFieldsName(list); + if(flag == false){ + return false; + } + for (QueryTable table : list) { + String name = table.getName(); + String fieldRule = ruleMap.get(name); + // 有没有配置这张表 + if (fieldRule != null) { + if ("*".equals(fieldRule) || table.isAll()) { + flag = false; + log.warn("sql黑名单校验,表【"+name+"】禁止查询"); + break; + } else if (table.existSameField(fieldRule)) { + flag = false; + break; + } + + } + } + + // 返回黑名单校验结果(不合法直接抛出异常) + if(!flag){ + log.error(this.getError()); + throw exception(SQL_INJECTION_EXCEPTION); + } + return flag; + } + + /** + * 校验表名和字段名是否有效,或是是否会带些特殊的字符串进行sql注入 + * issues/4983 SQL Injection in 3.5.1 #4983 + * @return + */ + private boolean checkTableAndFieldsName(List list){ + boolean flag = true; + for(QueryTable queryTable: list){ + String tableName = queryTable.getName(); + if(hasSpecialString(tableName)){ + flag = false; + log.warn("sql黑名单校验,表名【"+tableName+"】包含特殊字符"); + break; + } + Set fields = queryTable.getFields(); + for(String name: fields){ + if(hasSpecialString(name)){ + flag = false; + log.warn("sql黑名单校验,字段名【"+name+"】包含特殊字符"); + break; + } + } + } + return flag; + } + + /** + * 是否包含特殊的字符串 + * @param name + * @return + */ + private boolean hasSpecialString(String name){ + Matcher m = ILLEGAL_NAME_REG.matcher(name); + if (m.find()) { + return true; + } + return false; + } + + + /** + * 查询的表的信息 + */ + protected class QueryTable { + //表名 + private String name; + //表的别名 + private String alias; + // 字段名集合 + private Set fields; + // 是否查询所有字段 + private boolean all; + + public QueryTable() { + } + + public QueryTable(String name, String alias) { + this.name = name; + this.alias = alias; + this.all = false; + this.fields = new HashSet<>(); + } + + public void addField(String field) { + this.fields.add(field); + } + + public String getName() { + return name; + } + + public Set getFields() { + return new HashSet<>(fields); + } + + public void setName(String name) { + this.name = name; + } + + public void setFields(Set fields) { + this.fields = fields; + } + + public String getAlias() { + return alias; + } + + public void setAlias(String alias) { + this.alias = alias; + } + + public boolean isAll() { + return all; + } + + public void setAll(boolean all) { + this.all = all; + } + + /** + * 判断是否有相同字段 + * + * @param fieldString + * @return + */ + public boolean existSameField(String fieldString) { + String[] controlFields = fieldString.split(","); + for (String sqlField : fields) { + for (String controlField : controlFields) { + if (sqlField.equals(controlField)) { + // 非常明确的列直接比较 + log.warn("sql黑名单校验,表【"+name+"】中字段【"+controlField+"】禁止查询"); + return true; + } else { + // 使用表达式的列 只能判读字符串包含了 + String aliasColumn = controlField; + if (StringUtils.isNotBlank(alias)) { + aliasColumn = alias + "." + controlField; + } + if (sqlField.indexOf(aliasColumn) != -1) { + log.warn("sql黑名单校验,表【"+name+"】中字段【"+controlField+"】禁止查询"); + return true; + } + } + } + } + return false; + } + + @Override + public String toString() { + return "QueryTable{" + + "name='" + name + '\'' + + ", alias='" + alias + '\'' + + ", fields=" + fields + + ", all=" + all + + '}'; + } + } + + public String getError(){ + // TODO + return "系统设置了安全规则,敏感表和敏感字段禁止查询,联系管理员授权!"; + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/security/DictQueryBlackListHandler.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/security/DictQueryBlackListHandler.java new file mode 100644 index 0000000..3421b99 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/security/DictQueryBlackListHandler.java @@ -0,0 +1,80 @@ +package cn.iocoder.yudao.module.qms.core.legend.security; + +import cn.iocoder.yudao.module.qms.core.constant.SymbolConstant; +import cn.iocoder.yudao.module.qms.core.legend.LegendConvertUtils; +import org.springframework.stereotype.Component; + +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import java.util.ArrayList; +import java.util.List; + +/** + * 字典组件 执行sql前校验 只校验表字典 + * dictCodeString格式如: + * table,text,code + * table where xxx,text,code + * table,text,code, where xxx + * + * @Author taoYan + * @Date 2022/3/23 21:10 + **/ +@Component("dictQueryBlackListHandler") +public class DictQueryBlackListHandler extends AbstractQueryBlackListHandler { + + @Override + protected List getQueryTableInfo(String dictCodeString) { + //针对转义字符进行解码 + try { + if (dictCodeString.contains("%")) { + dictCodeString = URLDecoder.decode(dictCodeString, "UTF-8"); + } + } catch (UnsupportedEncodingException e) { + //e.printStackTrace(); + } + dictCodeString = dictCodeString.trim(); + + // 无论什么场景 第二、三个元素一定是表的字段,直接add + if (dictCodeString != null && dictCodeString.indexOf(SymbolConstant.COMMA) > 0) { + String[] arr = dictCodeString.split(SymbolConstant.COMMA); + if (arr.length != 3 && arr.length != 4) { + return null; + } + String tableName = getTableName(arr[0]); + QueryTable table = new QueryTable(tableName, ""); + // 无论什么场景 第二、三个元素一定是表的字段,直接add + table.addField(arr[1].trim()); + String filed = arr[2].trim(); + if (LegendConvertUtils.isNotEmpty(filed)) { + table.addField(filed); + } + List list = new ArrayList<>(); + list.add(table); + return list; + } + return null; + } + + /** + * 取where前面的为:table name + * + * @param str + * @return + */ + private String getTableName(String str) { + String[] arr = str.split("\\s+(?i)where\\s+"); + String tableName = arr[0].trim(); + //【20230814】解决使用参数tableName=sys_user t&复测,漏洞仍然存在 + if (tableName.contains(".")) { + tableName = tableName.substring(tableName.indexOf(".")+1, tableName.length()).trim(); + } + if (tableName.contains(" ")) { + tableName = tableName.substring(0, tableName.indexOf(" ")).trim(); + } + + //【issues/4393】 sys_user , (sys_user), sys_user%20, %60sys_user%60 + String reg = "\\s+|\\(|\\)|`"; + return tableName.replaceAll(reg, ""); + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/vo/DictModel.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/vo/DictModel.java new file mode 100644 index 0000000..de00ca5 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/vo/DictModel.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.qms.core.legend.vo; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@JsonIgnoreProperties(ignoreUnknown = true) +public class DictModel implements Serializable { + private static final long serialVersionUID = 1L; + + public DictModel() { + } + + public DictModel(String value, String text) { + this.value = value; + this.text = text; + } + + /** + * 字典值 + */ + private String value; + /** + * 字典文本 + */ + private String text; + + public String getTitle() { + return this.text; + } + + public String getLabel() { + return this.text; + } +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/vo/DictModelMany.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/vo/DictModelMany.java new file mode 100644 index 0000000..a89576a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/legend/vo/DictModelMany.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.qms.core.legend.vo; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +public class DictModelMany extends DictModel{ + + /** + * 字典code,根据多个字段code查询时才用到,用于区分不同的字典选项 + */ + private String dictCode; + + public DictModelMany(String dictCode, String value, String text) { + super(value, text); + this.dictCode = dictCode; + } +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/cmp/DefaultNoHandleCmp.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/cmp/DefaultNoHandleCmp.java new file mode 100644 index 0000000..bcc969b --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/cmp/DefaultNoHandleCmp.java @@ -0,0 +1,13 @@ +package cn.iocoder.yudao.module.qms.core.liteflow.cmp; + +import com.yomahub.liteflow.annotation.LiteflowComponent; +import com.yomahub.liteflow.core.NodeComponent; + +@LiteflowComponent(id = "defaultNoHandleCmp", name = "默认不处理组件") +public class DefaultNoHandleCmp extends NodeComponent { + + @Override + public void process() throws Exception { + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/constant/QmsXmlFlowElParserConstant.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/constant/QmsXmlFlowElParserConstant.java new file mode 100644 index 0000000..797c045 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/constant/QmsXmlFlowElParserConstant.java @@ -0,0 +1,16 @@ +package cn.iocoder.yudao.module.qms.core.liteflow.constant; + +public interface QmsXmlFlowElParserConstant { + + public static final String CHAIN_XML_PATTERN = "{}"; + + public static final String CHAIN_WITH_ROUTE_XML_PATTERN = ""; + + public static final String NODE_XML_PATTERN = "{}"; + + public static final String NODE_ITEM_XML_PATTERN = ""; + + public static final String NODE_ITEM_WITH_LANGUAGE_XML_PATTERN = ""; + + public static final String XML_PATTERN = "{}{}"; +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/handler/LoderLiteFlowHandler.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/handler/LoderLiteFlowHandler.java new file mode 100644 index 0000000..5f88500 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/handler/LoderLiteFlowHandler.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.qms.core.liteflow.handler; + +import org.springframework.stereotype.Component; + +import com.yomahub.liteflow.core.FlowExecutor; + +import cn.iocoder.yudao.framework.mq.redis.core.pubsub.AbstractRedisChannelMessageListener; +import jakarta.annotation.Resource; + +@Component +public class LoderLiteFlowHandler extends AbstractRedisChannelMessageListener { + + @Resource + private FlowExecutor flowExecutor; + + @Override + public void onMessage(RedisLiteFlowMessage message) { + flowExecutor.reloadRule(); + } + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/handler/RedisLiteFlowMessage.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/handler/RedisLiteFlowMessage.java new file mode 100644 index 0000000..4db8fe7 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/handler/RedisLiteFlowMessage.java @@ -0,0 +1,11 @@ +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; + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/parser/QmsXmlFlowELParser.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/parser/QmsXmlFlowELParser.java new file mode 100644 index 0000000..7d3fa01 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/liteflow/parser/QmsXmlFlowELParser.java @@ -0,0 +1,80 @@ +package cn.iocoder.yudao.module.qms.core.liteflow.parser; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; + +import com.yomahub.liteflow.parser.el.ClassXmlFlowELParser; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.core.util.XmlUtil; +import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowCodeDO; +import cn.iocoder.yudao.module.qms.business.config.dal.dataobject.ConfigSimpleFlowRuleDO; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSimpleFlowCodeService; +import cn.iocoder.yudao.module.qms.business.config.service.ConfigSimpleFlowRuleService; +import cn.iocoder.yudao.module.qms.core.liteflow.constant.QmsXmlFlowElParserConstant; + + +public class QmsXmlFlowELParser extends ClassXmlFlowELParser { + + private ConfigSimpleFlowRuleService configSimpleFlowRuleService; + + private ConfigSimpleFlowCodeService configSimpleFlowCodeService; + + public QmsXmlFlowELParser(ConfigSimpleFlowRuleService configSimpleFlowRuleService, ConfigSimpleFlowCodeService configSimpleFlowCodeService) { + this.configSimpleFlowRuleService = configSimpleFlowRuleService; + this.configSimpleFlowCodeService = configSimpleFlowCodeService; + } + + @Override + public String parseCustom() { + String content = TenantUtils.executeIgnore(() -> { + List liteflowScriptList = configSimpleFlowCodeService.getConfigSimpleFlowCodeList(); + List scriptResult = new ArrayList<>(); + String nodesContent = StrUtil.EMPTY; + if (scriptResult != null && scriptResult.size() >= 0) { + for (ConfigSimpleFlowCodeDO liteflowScript : liteflowScriptList) { + String id = liteflowScript.getCodeNo(); + String data = liteflowScript.getCodeData(); + String name = liteflowScript.getCodeName(); + String type = liteflowScript.getCodeType(); + String language = liteflowScript.getCodeLanguage(); + if (StringUtils.isNotBlank(language)) { + scriptResult.add(StrUtil.format(QmsXmlFlowElParserConstant.NODE_ITEM_WITH_LANGUAGE_XML_PATTERN, XmlUtil.escape(id), XmlUtil.escape(name), type, language, data)); + } else { + scriptResult.add(StrUtil.format(QmsXmlFlowElParserConstant.NODE_ITEM_XML_PATTERN, XmlUtil.escape(id), XmlUtil.escape(name), type, data)); + } + } + nodesContent = StrUtil.format(QmsXmlFlowElParserConstant.NODE_XML_PATTERN, CollUtil.join(scriptResult, StrUtil.EMPTY)); + } + + List liteflowChainList = configSimpleFlowRuleService.getConfigSimpleFlowRuleList(); + List chainResult = new ArrayList<>(); + for (ConfigSimpleFlowRuleDO liteflowChain : liteflowChainList) { + String chainName = liteflowChain.getName() + liteflowChain.getTenantId(); + String elData = liteflowChain.getData(); + String route = liteflowChain.getRoute(); + String namespace = liteflowChain.getGroupName(); + if (StringUtils.isNotBlank(route)) {//决策路由 + chainResult.add(StrUtil.format(QmsXmlFlowElParserConstant.CHAIN_WITH_ROUTE_XML_PATTERN, XmlUtil.escape(chainName), StrUtil.emptyIfNull(namespace), StrUtil.emptyIfNull(route), elData)); + } else { + chainResult.add(StrUtil.format(QmsXmlFlowElParserConstant.CHAIN_XML_PATTERN, XmlUtil.escape(chainName), elData)); + } + + } + //当还未配置时,添加一个默认的规则,否则启动会报错 + if (chainResult.size() <= 0) { + chainResult.add(StrUtil.format(QmsXmlFlowElParserConstant.CHAIN_XML_PATTERN, "default-demo", "SER()")); + } + String chainsContent = CollUtil.join(chainResult, StrUtil.EMPTY); + + return StrUtil.format(QmsXmlFlowElParserConstant.XML_PATTERN, nodesContent, chainsContent); + }); + return content; + } + + + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/sampleflow/SampleFlowDefinition.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/sampleflow/SampleFlowDefinition.java new file mode 100644 index 0000000..0830959 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/sampleflow/SampleFlowDefinition.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.qms.core.sampleflow; + +import java.io.Serializable; +import java.util.List; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 样品流程定义 + */ +@Data +@Accessors(chain = true) +public class SampleFlowDefinition implements Serializable { + + private static final long serialVersionUID = 3152663586263529674L; + + private String flowKey; + + private String flowName; + + private List flowNodeList; + +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/sampleflow/SampleFlowNode.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/sampleflow/SampleFlowNode.java new file mode 100644 index 0000000..a4d8f7a --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/core/sampleflow/SampleFlowNode.java @@ -0,0 +1,32 @@ +package cn.iocoder.yudao.module.qms.core.sampleflow; + +import java.io.Serializable; +import java.util.List; + +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class SampleFlowNode implements Serializable { + + private static final long serialVersionUID = 7600634660596892065L; + + /** 当前流程节点key **/ + private String nodeKey; + + /** 当前流程节点名称 **/ + private String nodeName; + + /** 是否默认流程 **/ + private Boolean isDefault; + + /** 条件 **/ + private String condition; + + /** 流程节点排序 **/ + private Integer sort; + + /** 下级流程节点 **/ + private List nextFlowNodeList; +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/rpc/config/RpcConfiguration.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/rpc/config/RpcConfiguration.java new file mode 100644 index 0000000..d7051d2 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/rpc/config/RpcConfiguration.java @@ -0,0 +1,13 @@ +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 { +} diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/rpc/package-info.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/rpc/package-info.java new file mode 100644 index 0000000..8e76bab --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/rpc/package-info.java @@ -0,0 +1,4 @@ +/** + * 占位 + */ +package cn.iocoder.yudao.module.qms.framework.rpc; diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/jybusiness/framework/security/config/SecurityConfiguration.java b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/security/config/SecurityConfiguration.java similarity index 90% rename from yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/jybusiness/framework/security/config/SecurityConfiguration.java rename to yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/security/config/SecurityConfiguration.java index cf7ee96..6a8e0ee 100644 --- a/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/jybusiness/framework/security/config/SecurityConfiguration.java +++ b/yudao-module-qms/yudao-module-qms-server/src/main/java/cn/iocoder/yudao/module/qms/framework/security/config/SecurityConfiguration.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.jybusiness.framework.security.config; +package cn.iocoder.yudao.module.qms.framework.security.config; import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer; import cn.iocoder.yudao.module.infra.enums.ApiConstants; @@ -9,9 +9,9 @@ import org.springframework.security.config.annotation.web.configurers.AuthorizeH /** - * Template 模块的 Security 配置 + * qms 模块的 Security 配置 */ -@Configuration("jyBusinessSecurityConfiguration") +@Configuration(proxyBeanMethods = false) public class SecurityConfiguration { @Bean diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayParameterDataMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayParameterDataMapper.xml new file mode 100644 index 0000000..77803c5 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayParameterDataMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayProjectDataMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayProjectDataMapper.xml new file mode 100644 index 0000000..2323bda --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayProjectDataMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayTaskDataMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayTaskDataMapper.xml new file mode 100644 index 0000000..71a9522 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayTaskDataMapper.xml @@ -0,0 +1,30 @@ + + + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayTaskDetailMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayTaskDetailMapper.xml new file mode 100644 index 0000000..133ea7d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayTaskDetailMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayTaskMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayTaskMapper.xml new file mode 100644 index 0000000..3ea5712 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessAssayTaskMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessBaseSampleMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessBaseSampleMapper.xml new file mode 100644 index 0000000..83d1051 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessBaseSampleMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessHandoverRecordSubMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessHandoverRecordSubMapper.xml new file mode 100644 index 0000000..4faaac3 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessHandoverRecordSubMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleAssayResultMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleAssayResultMapper.xml new file mode 100644 index 0000000..2396373 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleAssayResultMapper.xml @@ -0,0 +1,19 @@ + + + + + + + + DELETE FROM T_BSN_SMP_ASY_RSLT t WHERE t.ID IN + + #{item} + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustDetailMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustDetailMapper.xml new file mode 100644 index 0000000..f0850df --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustDetailMapper.xml @@ -0,0 +1,19 @@ + + + + + + + + DELETE FROM T_BSN_SMP_ENTT_DTL t WHERE t.ID IN + + #{item} + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustProjectMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustProjectMapper.xml new file mode 100644 index 0000000..1d0a044 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustProjectMapper.xml @@ -0,0 +1,19 @@ + + + + + + + + DELETE FROM T_BSN_SMP_ENTT_PRJ t WHERE t.ID IN + + #{item} + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustRegistrationMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustRegistrationMapper.xml new file mode 100644 index 0000000..877d9e8 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleEntrustRegistrationMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleHandoverDetailMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleHandoverDetailMapper.xml new file mode 100644 index 0000000..f0d1eb8 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleHandoverDetailMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleHandoverMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleHandoverMapper.xml new file mode 100644 index 0000000..4532b84 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSampleHandoverMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubParentSampleMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubParentSampleMapper.xml new file mode 100644 index 0000000..ca56c29 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubParentSampleMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleAssessmentMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleAssessmentMapper.xml new file mode 100644 index 0000000..48f7fd2 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleAssessmentMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleMapper.xml new file mode 100644 index 0000000..866c321 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/bus/dal/mapper/BusinessSubSampleMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/BaseSampleMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/BaseSampleMapper.xml new file mode 100644 index 0000000..1809e62 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/BaseSampleMapper.xml @@ -0,0 +1,29 @@ + + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodMapper.xml new file mode 100644 index 0000000..c6d2fd2 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectMapper.xml new file mode 100644 index 0000000..c3bafe6 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectParameterMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectParameterMapper.xml new file mode 100644 index 0000000..b6c1728 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigAssayMethodProjectParameterMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigBaseSampleMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigBaseSampleMapper.xml new file mode 100644 index 0000000..7706010 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigBaseSampleMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigDocumentTypeMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigDocumentTypeMapper.xml new file mode 100644 index 0000000..b23c3e0 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigDocumentTypeMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigEntrustSourceMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigEntrustSourceMapper.xml new file mode 100644 index 0000000..03d51b2 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigEntrustSourceMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigProjectMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigProjectMapper.xml new file mode 100644 index 0000000..00ea3cc --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigProjectMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportFieldMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportFieldMapper.xml new file mode 100644 index 0000000..a2c41eb --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportFieldMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTemplateMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTemplateMapper.xml new file mode 100644 index 0000000..eb1efea --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTemplateMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTypeMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTypeMapper.xml new file mode 100644 index 0000000..637fa56 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigReportTypeMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleFlowMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleFlowMapper.xml new file mode 100644 index 0000000..a8bf02d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleFlowMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleHandoverMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleHandoverMapper.xml new file mode 100644 index 0000000..9c04d6f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleHandoverMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleReportMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleReportMapper.xml new file mode 100644 index 0000000..6546ffa --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSampleReportMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowCodeMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowCodeMapper.xml new file mode 100644 index 0000000..5474b11 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowCodeMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowRuleMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowRuleMapper.xml new file mode 100644 index 0000000..5f56bd6 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSimpleFlowRuleMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleProjectMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleProjectMapper.xml new file mode 100644 index 0000000..da8a147 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleProjectMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleTypeMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleTypeMapper.xml new file mode 100644 index 0000000..55f4275 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigStandardSampleTypeMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMapper.xml new file mode 100644 index 0000000..6937812 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMethodMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMethodMapper.xml new file mode 100644 index 0000000..6448270 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleMethodMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleParentMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleParentMapper.xml new file mode 100644 index 0000000..9122f3d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigSubSampleParentMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigWarehouseLocationInfomationMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigWarehouseLocationInfomationMapper.xml new file mode 100644 index 0000000..5197c7b --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/ConfigWarehouseLocationInfomationMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardDetailMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardDetailMapper.xml new file mode 100644 index 0000000..0cadd2d --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardDetailMapper.xml @@ -0,0 +1,52 @@ + + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMapper.xml new file mode 100644 index 0000000..8957934 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMapper.xml @@ -0,0 +1,39 @@ + + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMethodMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMethodMapper.xml new file mode 100644 index 0000000..5251fbe --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/config/dal/mapper/MaterialAssayStandardMethodMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryParameterMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryParameterMapper.xml new file mode 100644 index 0000000..de23dc8 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryParameterMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryProjectMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryProjectMapper.xml new file mode 100644 index 0000000..69e4fd8 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionaryProjectMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleFlowNodeMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleFlowNodeMapper.xml new file mode 100644 index 0000000..49a7928 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleFlowNodeMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleTypeMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleTypeMapper.xml new file mode 100644 index 0000000..2d057af --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/business/dic/dal/mapper/DictionarySampleTypeMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionFieldMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionFieldMapper.xml new file mode 100644 index 0000000..8dd7328 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionFieldMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionMapper.xml new file mode 100644 index 0000000..b0126f5 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataCollectionMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataFormMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataFormMapper.xml new file mode 100644 index 0000000..1fea2cd --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/data/dal/mapper/DataFormMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/dic/dal/mapper/DictionaryBusinessMapper.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/dic/dal/mapper/DictionaryBusinessMapper.xml new file mode 100644 index 0000000..9acf8b1 --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/cn/iocoder/yudao/module/qms/common/dic/dal/mapper/DictionaryBusinessMapper.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/yudao-module-qms/yudao-module-qms-server/src/main/resources/logback-spring.xml b/yudao-module-qms/yudao-module-qms-server/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..b1b9f3f --- /dev/null +++ b/yudao-module-qms/yudao-module-qms-server/src/main/resources/logback-spring.xml @@ -0,0 +1,76 @@ + + + + + + + + + +       + + + ${PATTERN_DEFAULT} + + + + + + + + + + ${PATTERN_DEFAULT} + + + + ${LOG_FILE} + + + ${LOGBACK_ROLLINGPOLICY_FILE_NAME_PATTERN:-${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz} + + ${LOGBACK_ROLLINGPOLICY_CLEAN_HISTORY_ON_START:-false} + + ${LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-10MB} + + ${LOGBACK_ROLLINGPOLICY_TOTAL_SIZE_CAP:-0} + + ${LOGBACK_ROLLINGPOLICY_MAX_HISTORY:-30} + + + + + + 0 + + 256 + + + + + + + + ${PATTERN_DEFAULT} + + + + + + + + + + + + + + + + + + + + + +