Compare commits

...

82 Commits

Author SHA1 Message Date
wxr
dd6df68061 升级liteflow及处理荧光数据上传 2025-12-12 08:48:36 +08:00
FCL
468e939ab1 Merge remote-tracking branch 'origin/test' into test 2025-12-11 17:53:16 +08:00
FCL
90b0aa5202 feat:报告转pdf、发起iwork流程。 开发中 2025-12-11 17:52:59 +08:00
yd
33543e5330 fix:物料管理业务逻辑修改。新增库存数据统计查询 2025-12-11 16:32:57 +08:00
yd
6a3d585802 feat:新增盘点表数据 2025-12-10 14:47:46 +08:00
禁止呵呵
9eec0bb05e feat:领用出库、同意出库 2025-12-09 21:19:31 +08:00
禁止呵呵
8fd750a82f Merge remote-tracking branch 'origin/test' into test 2025-12-09 16:10:46 +08:00
禁止呵呵
2790ed7ea1 feat:库存查询,库存记录查询、入库记录查询 2025-12-09 16:10:37 +08:00
FCL
9f4369bcb2 fix:报告纵表细节调整 2025-12-09 15:46:00 +08:00
FCL
920292cfac feat:报告数据算法逻辑调整;增加分页逻辑 2025-12-09 14:39:13 +08:00
禁止呵呵
1187038ba8 feat:库存管理 2025-12-09 09:39:07 +08:00
禁止呵呵
e2678fe7b4 Merge remote-tracking branch 'origin/test' into test 2025-12-09 09:29:22 +08:00
禁止呵呵
c1b975cca0 feat:入库、批量入库 2025-12-09 09:29:14 +08:00
FCL
b7f30012c8 feat:报告数据算法逻辑调整 2025-12-08 17:50:15 +08:00
FCL
000cfca842 feat:报告数据算法逻辑调整 2025-12-08 10:27:36 +08:00
wxr
6b006513af 分析班组添加是否送样标识 2025-12-05 18:32:54 +08:00
禁止呵呵
f2571944c1 fix:版本管理模块字段修改 2025-12-05 17:32:14 +08:00
禁止呵呵
8e3994b6a8 Merge remote-tracking branch 'origin/test' into test 2025-12-05 17:23:52 +08:00
禁止呵呵
c7f3bc0a46 fix:版本管理模块文件名修改,字段修改,版本查询条件修改 2025-12-05 17:23:41 +08:00
wxr
54bc4b8b37 检测方法及委检登记-已提交列表,数据状态问题修复 2025-12-05 17:13:59 +08:00
FCL
d0ee704939 doc:iWork集成说明 2025-12-05 14:50:57 +08:00
yd
9cf4af15c2 feat:物料管理出库相关 2025-12-05 13:47:41 +08:00
yd
ac308f30a2 feat:物料管理盘点相关 2025-12-05 11:48:40 +08:00
yd
60b2761b2c Merge remote-tracking branch 'origin/test' into test 2025-12-04 20:14:33 +08:00
yd
a17621b0dd feat:客户端版本管理 2025-12-04 20:14:24 +08:00
wxr
9ec70c1721 结果判定等处理 2025-12-04 18:17:57 +08:00
FCL
3a5f6994a7 Merge remote-tracking branch 'origin/test' into test 2025-12-04 15:11:27 +08:00
FCL
b355668284 fix:报告编制,增加委托过滤,按报表类型过滤可选委托 2025-12-04 15:11:12 +08:00
wxr
8d75bc0765 任务流程状态及委托登记统计 2025-12-04 14:29:32 +08:00
wxr
0b44562b58 交叉审核退回,分析查询不到数据 2025-12-04 11:39:16 +08:00
wxr
90a1dfbd37 Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test 2025-12-04 11:02:56 +08:00
wxr
61d91d29b0 结果报送条件查询等 2025-12-04 11:02:50 +08:00
FCL
d84f1adf65 Merge remote-tracking branch 'origin/test' into test 2025-12-04 10:38:02 +08:00
FCL
4b9d27e8fc feat:更新tio,支持redis指定用户名 2025-12-04 10:37:59 +08:00
wxr
d41f69cc51 Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test 2025-12-04 10:03:43 +08:00
wxr
15621a9a56 中心交接-扫码收样添加 收样并送样 2025-12-04 10:03:32 +08:00
FCL
06be110e5d Merge remote-tracking branch 'origin/test' into test 2025-12-04 08:58:25 +08:00
FCL
ae0f0d79c5 feat:供应商管理代码生成 2025-12-04 08:58:02 +08:00
wxr
93cf620376 简码编密跳过等 2025-12-03 20:39:40 +08:00
wxr
be89a965d8 排序等bug修复 2025-12-03 16:17:50 +08:00
yd
8fa69a0906 Merge remote-tracking branch 'origin/test' into test 2025-12-03 14:24:57 +08:00
yd
3bb70a94f2 feat:物料管理部分菜单 2025-12-03 14:24:40 +08:00
wxr
433ac9124b Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test 2025-12-03 11:02:42 +08:00
wxr
3285e6050a 检验委托任务添加修改 2025-12-03 11:02:20 +08:00
yd
c68c7cfbf2 Merge branch 'lims_dev' of https://git.will-way.cn/zgty/zt-qms into test 2025-12-03 08:58:06 +08:00
wxr
04596350b6 添加委托来源与类型关系表 2025-12-03 08:41:01 +08:00
yd
927731c217 feat:物料通用流程 2025-12-02 16:42:26 +08:00
wxr
2b60bd7c7b 委托登记修改 2025-12-02 10:53:11 +08:00
FCL
9a2b45e29c fix:存放位置编码重复校验 2025-12-01 16:07:59 +08:00
wxr
7c7e7b4761 分析取S值,参数修改 2025-12-01 15:31:40 +08:00
FCL
39d720c1df fix:业务参数字典权限调整 2025-11-28 17:43:12 +08:00
FCL
d6fc03b199 fix:自动火试金接口签名测试 2025-11-28 17:07:40 +08:00
FCL
04ac449897 feat:自动火试金接口签名测试 2025-11-28 16:47:23 +08:00
FCL
eff36758c2 fix:设备接口,取消部分权限 2025-11-28 16:47:05 +08:00
FCL
cb50244685 Merge branch 'refs/heads/zt-test' into test 2025-11-28 15:13:41 +08:00
FCL
246e6391b8 fix:检测标准细节优化 2025-11-28 15:09:53 +08:00
wxr
4c129dee4e 结果判定分析方法为0还显示,处理。 2025-11-28 11:22:41 +08:00
wxr
63fc44a7d1 Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test 2025-11-28 10:49:08 +08:00
wxr
9a4e50b081 商检委托,S值检查bug修复 2025-11-28 10:49:00 +08:00
FCL
7f1c4dd8c4 fix:Dict注解优化 2025-11-28 09:04:01 +08:00
wxr
7a03bc6293 Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test 2025-11-27 18:23:45 +08:00
wxr
171de4c8d4 分析样顺序调整 2025-11-27 18:23:34 +08:00
FCL
60bc01201b fix:样品调拨细节修复 2025-11-27 18:10:35 +08:00
FCL
8fdeb65895 Merge remote-tracking branch 'origin/test' into test 2025-11-27 17:33:35 +08:00
FCL
41b4e53db1 fix:测试问题修复:样品库、报告 2025-11-27 17:33:31 +08:00
wxr
600e8bcd92 分析项目根据字典id过滤 2025-11-27 17:30:18 +08:00
wxr
353a6dcb3e 样品分析获取修改 2025-11-27 16:27:09 +08:00
wxr
ab505189f3 商检样S值分样判定bug修复 2025-11-27 15:45:45 +08:00
wxr
3b306b4137 Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test 2025-11-27 14:16:56 +08:00
wxr
9b99e41676 下发配料添加检查是否都存在配料必填数据 2025-11-27 14:16:44 +08:00
FCL
1dbbeba233 Merge remote-tracking branch 'origin/test' into test 2025-11-27 11:42:19 +08:00
FCL
b92d61648f fix:样品库接口调整 2025-11-27 11:42:14 +08:00
wxr
b85eb7ea91 原始记录单,无数据时bug修复 2025-11-27 10:19:53 +08:00
wxr
76069855ec 新增内部简码标签打印数据查询 2025-11-27 09:44:08 +08:00
wxr
ea948a70bc 镜像名称修改 2025-11-26 19:31:05 +08:00
wxr
e133ec82c8 样品接收查询修改 2025-11-26 17:59:27 +08:00
wxr
be75cb4cf9 结果报送,bug修复 2025-11-26 16:09:25 +08:00
wxr
b320d36181 Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test 2025-11-26 15:01:29 +08:00
wxr
821ce6a7cf Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test 2025-11-26 10:43:01 +08:00
wxr
984ae17431 Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test 2025-11-26 10:25:24 +08:00
wxr
4fd689c530 分析任务加上分析人员id。自动配料根据分析人员id查询用户数据,设置分析人账号。 2025-11-26 10:25:13 +08:00
chenbowen
8aa329d989 1. 同步 nacos 配置到业务系统 2025-11-25 18:54:38 +08:00
375 changed files with 17810 additions and 1736 deletions

File diff suppressed because it is too large Load Diff

12
pom.xml
View File

@@ -177,8 +177,8 @@
<config.server-addr>172.16.46.63:30848</config.server-addr>
<config.namespace>dev</config.namespace>
<config.group>DEFAULT_GROUP</config.group>
<config.username/>
<config.password/>
<config.username>nacos</config.username>
<config.password>P@ssword25</config.password>
<config.version>1.0.0</config.version>
</properties>
</profile>
@@ -190,8 +190,8 @@
<config.server-addr>172.16.46.63:30848</config.server-addr>
<config.namespace>prod</config.namespace>
<config.group>DEFAULT_GROUP</config.group>
<config.username/>
<config.password/>
<config.username>nacos</config.username>
<config.password>P@ssword25</config.password>
<config.version>1.0.0</config.version>
</properties>
</profile>
@@ -203,8 +203,8 @@
<config.server-addr>172.16.46.63:30848</config.server-addr>
<config.namespace>local</config.namespace>
<config.group>DEFAULT_GROUP</config.group>
<config.username/>
<config.password/>
<config.username>nacos</config.username>
<config.password>P@ssword25</config.password>
<config.version>1.0.0</config.version>
</properties>
</profile>

View File

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

View File

@@ -119,5 +119,9 @@ zt:
version: ${zt.info.version}
tenant: # 多租户相关配置项
enable: true
ignore-urls:
- /admin-api/qms/system-version-management/get-by-platform/**
security:
permit-all-urls:
- /admin-api/qms/system-version-management/get-by-platform/**
debug: false

View File

@@ -54,6 +54,7 @@ public interface ErrorCodeConstants {
ErrorCode CONFIG_REPORT_TYPE_NOT_EXISTS = new ErrorCode(1_032_050_000, "报表类型配置不存在");
ErrorCode CONFIG_PROJECT_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测项目配置不存在");
ErrorCode CONFIG_ENTRUST_SOURCE_NOT_EXISTS = new ErrorCode(1_032_050_000, "检验委托来源配置不存在");
ErrorCode CONFIG_ENTRUST_SOURCE_SAMPLE_TYPE_NOT_EXISTS = new ErrorCode(1_032_050_000, "检验委托来源与样品类型配置不存在");
ErrorCode CONFIG_BASE_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_050_000, "主样配置不存在");
ErrorCode CONFIG_ASSAY_METHOD_PROJECT_PARAMETER_NOT_EXISTS = new ErrorCode(1_032_050_000, "检测方法分析项目参数配置不存在");
@@ -87,7 +88,7 @@ public interface ErrorCodeConstants {
ErrorCode CONFIG_PERMISSION_NOT_EXISTS = new ErrorCode(1_032_050_000, "权限配置不存在");
ErrorCode CONFIG_PERMISSION_DUPLICATE = new ErrorCode(1_032_050_000, "权限配置数据有误");
ErrorCode CONFIG_WAREHOUSE_LOCATION_NOT_EXISTS = new ErrorCode(1_032_050_000, "存放位置不存在");
ErrorCode CONFIG_WAREHOUSE_LOCATION_CODE_DUPLICATE = new ErrorCode(1_032_050_000, "库位编码重复,请检查库位数据,或联系管理员处理");
ErrorCode CONFIG_WAREHOUSE_LOCATION_CODE_DUPLICATE = new ErrorCode(1_032_050_000, "库位编码重复,请检查!");
/*=================================bus 检验业务 1_032_100_000 ~ 1_032_149_999==================================*/
ErrorCode BUSINESS_SAMPLE_ENTRUST_REGISTRATION_NOT_EXISTS = new ErrorCode(1_032_100_000, "委检登记业务不存在");
@@ -139,6 +140,7 @@ public interface ErrorCodeConstants {
ErrorCode REPORT_DOCUMENT_DATA_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测报告明细不存在");
ErrorCode REPORT_DOCUMENT_TYPE_NOT_EXISTS = new ErrorCode(1_032_100_000, "报告类型配置不存在");
ErrorCode REPORT_DOCUMENT_MAIN_CORRELATION_NOT_EXISTS = new ErrorCode(1_032_100_000, "报告主数据关系不存在");
ErrorCode REPORT_DOCUMENT_FILE_NOT_EXISTS = new ErrorCode(1_032_100_000, "检测报告附件不存在");
ErrorCode BUSINESS_SAMPLE_DISPATCH_NOT_EXISTS = new ErrorCode(1_032_100_000, "样品调拨不存在");
ErrorCode BUSINESS_SAMPLE_DISPATCH_DETAIL_NOT_EXISTS = new ErrorCode(1_032_100_000, "样品调拨明细不存在");
@@ -150,12 +152,38 @@ public interface ErrorCodeConstants {
ErrorCode MATERIAL_PRODUCT_NOT_EXISTS = new ErrorCode(1_032_150_000, "试剂耗材大类不存在");
ErrorCode MATERIAL_LIFECYCLE_DETAIL_NOT_EXISTS = new ErrorCode(1_032_150_000, "物料通用流程明细不存在");
ErrorCode MATERIAL_LIFECYCLE_NOT_EXISTS = new ErrorCode(1_032_150_000, "物料通用流程不存在");
ErrorCode MATERIAL_BATCH_NOT_EXISTS = new ErrorCode(1_032_150_000, "物料批次不存在");
ErrorCode MATERIAL_BATCH_ASSIGN_NOT_EXISTS = new ErrorCode(1_032_150_000, "物料批次分发不存在");
ErrorCode MATERIAL_INVENTORY_INBOUND_NOT_EXISTS = new ErrorCode(1_032_150_000, "入库,出库不存在");
ErrorCode MATERIAL_INVENTORY_INBOUND_DETAIL_NOT_EXISTS = new ErrorCode(1_032_150_000, "入库明细,出库明细等不存在");
ErrorCode SYSTEM_VERSION_MANAGEMENT_NOT_EXISTS = new ErrorCode(1_032_150_000, "客户端版本管理不存在");
ErrorCode MATERIAL_LOCATION_NOT_EXISTS = new ErrorCode(1_032_150_000, "存放位置不存在");
ErrorCode MATERIAL_INVENTORY_CHECK_NOT_EXISTS = new ErrorCode(1_032_150_000, "库存盘点不存在");
ErrorCode MATERIAL_INVENTORY_CHECK_BATCH_NOT_EXISTS = new ErrorCode(1_032_150_000, "库存盘点项不存在");
ErrorCode MATERIAL_INVENTORY_CHECK_DETAIL_NOT_EXISTS = new ErrorCode(1_032_150_000, "库存盘点明细不存在");
ErrorCode MATERIAL_INVENTORY_OUTBOUND_NOT_EXISTS = new ErrorCode(1_032_150_000, "出库不存在");
ErrorCode MATERIAL_INVENTORY_OUTBOUND_DETAIL_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 ==================================*/
ErrorCode SUPPLIER_NOT_EXISTS = new ErrorCode(1_032_250_000, "供应商不存在");
ErrorCode SUPPLIER_PROPERTIES_NOT_EXISTS = new ErrorCode(1_032_250_000, "供应商属性不存在");
ErrorCode SUPPLIER_EVALUATION_NOT_EXISTS = new ErrorCode(1_032_250_000, "供应商评价不存在");
ErrorCode SUPPLIER_EVALUATION_AT_NOT_EXISTS = new ErrorCode(1_032_250_000, "供应商评价关系不存在");
/*================================= dzj 大质检 1_032_300_000 ~ 1_032_349_999 ==================================*/

View File

@@ -107,6 +107,15 @@ public interface QmsCommonConstant {
/** 检验委托 **/
String ENTRUST_INSPECTION = "entrust_inspection";
/** 委托样品类型: 委检样 **/
String ENTRUST_COMMISSION_INSPECTION_SAMPLE = "commissionInspectionSample";
/** 委托样品类型: 商检分析样 **/
String ENTRUST_INSPECTION_ANALYSIS_SAMPLE = "inspectionAnalysisSample";
/** 委托样品类型: 商检综合 **/
String ENTRUST_COMPREHENSIVE_INSPECTION_SAMPLE = "comprehensiveInspectionSample";
/** 中心收样 **/
String FLOW_NODE_CENTER_RECEIVE = "flw_center_receive";
@@ -179,6 +188,10 @@ public interface QmsCommonConstant {
/** 检验完成状态-未完成 **/
String UNCHECKED = "unchecked";
/** 数据回报状态 未回报 **/
String UNRETURNED = "unreturned";
/** 自动 **/
String AUTOMATIC = "automatic";
@@ -194,4 +207,7 @@ public interface QmsCommonConstant {
/** 允许提交 **/
String ALLOW_SUBMIT = "allow_submit";
}

View File

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

View File

@@ -17,7 +17,8 @@
QMS模块。
</description>
<properties>
<zzjc.tio.version>3.9.1.v20251013-RELEASE</zzjc.tio.version>
<zzjc.tio.version>3.9.1.v20251204-RELEASE</zzjc.tio.version>
<liteflow.version>2.15.2</liteflow.version>
</properties>
<dependencies>
<!-- Spring Cloud 基础 -->
@@ -141,27 +142,27 @@
<dependency>
<groupId>com.yomahub</groupId>
<artifactId>liteflow-spring-boot-starter</artifactId>
<version>2.15.1</version>
<version>${liteflow.version}</version>
</dependency>
<dependency>
<groupId>com.yomahub</groupId>
<artifactId>liteflow-script-javax-pro</artifactId>
<version>2.15.1</version>
<version>${liteflow.version}</version>
</dependency>
<dependency>
<groupId>com.yomahub</groupId>
<artifactId>liteflow-script-groovy</artifactId>
<version>2.15.1</version>
<version>${liteflow.version}</version>
</dependency>
<dependency>
<groupId>com.yomahub</groupId>
<artifactId>liteflow-script-qlexpress</artifactId>
<version>2.15.1</version>
<version>${liteflow.version}</version>
</dependency>
<dependency>
<groupId>com.yomahub</groupId>
<artifactId>liteflow-script-graaljs</artifactId>
<version>2.15.1</version>
<version>${liteflow.version}</version>
</dependency>
<!-- pdfbox -->

View File

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

View File

@@ -110,6 +110,9 @@ public class BusinessSampleEntrustRegistrationController implements BusinessCont
@GetMapping("/queryWaitingDataForReport")
@Operation(summary = "查询待编制数据")
public CommonResult<PageResult<BusinessSampleEntrustRegistrationExtendRespVO>> queryWaitingDataForReport(@Valid BusinessSampleEntrustRegistrationPageReqVO pageReqVO) {
Long configReportTypeId = pageReqVO.getConfigReportTypeId();
if(configReportTypeId == null)
return CommonResult.error(0, "缺少configReportTypeId参数请刷新后重试");
PageResult<BusinessSampleEntrustRegistrationExtendRespVO> result = businessSampleEntrustRegistrationService.queryWaitingDataForReport(pageReqVO);
return success(result);
}

View File

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

View File

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

View File

@@ -90,6 +90,14 @@ public class BusinessSubSampleController implements BusinessControllerMarker {
return success(result);
}
@GetMapping("/getPrintSubSample")
@Operation(summary = "获得打印子样业务")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
public CommonResult<BusinessSubSampleExtendRespVO> getPrintSubSample(@RequestParam("id") Long id) {
BusinessSubSampleExtendRespVO result = businessSubSampleService.getPrintSubSample(id);
return success(result);
}
@GetMapping("/list")
@Operation(summary = "获得子样业务列表")
//@PreAuthorize("@ss.hasPermission('qms:business-sub-sample:query')")

View File

@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson2.JSONObject;
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.qms.business.bus.controller.vo.*;
import com.zt.plat.module.qms.business.bus.service.SampleAnalysisAuditService;
@@ -25,17 +26,11 @@ import static com.zt.plat.framework.common.pojo.CommonResult.success;
@RestController
@RequestMapping("/qms/bus/sample/analysis-audit")
@Validated
public class SampleAnalysisAuditController {
public class SampleAnalysisAuditController implements BusinessControllerMarker {
@Resource
private SampleAnalysisAuditService sampleAnalysisAuditService;
@GetMapping("/crossAuditByTaskId")
public CommonResult<?> crossAuditByTaskId(Long businessAssayTaskId) {
JSONObject result = sampleAnalysisAuditService.crossAuditByTaskId(businessAssayTaskId);
return success(result);
}
/**
* 交叉审核
* @return
@@ -47,8 +42,8 @@ public class SampleAnalysisAuditController {
}
@GetMapping("/getSampleResultAssessmentList")
public CommonResult<JSONObject> getSampleResultAssessmentList(Long configAssayMethodId, String asmtReportedStatus) {
JSONObject result = sampleAnalysisAuditService.getSampleResultAssessmentList(configAssayMethodId, asmtReportedStatus);
public CommonResult<JSONObject> getSampleResultAssessmentList(BusinessAssayTaskDataReqVO reqVO) {
JSONObject result = sampleAnalysisAuditService.getSampleResultAssessmentList(reqVO);
return success(result);
}

View File

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

View File

@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson2.JSONObject;
import com.yomahub.liteflow.core.FlowExecutor;
import com.yomahub.liteflow.flow.LiteflowResponse;
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
import com.zt.plat.module.qms.business.bus.controller.vo.*;
@@ -34,7 +34,7 @@ import jakarta.validation.Valid;
@RestController
@RequestMapping("/qms/bus/sample/entrust")
@Validated
public class SampleEntrustController {
public class SampleEntrustController implements BusinessControllerMarker {
@Resource
private FlowExecutor flowExecutor;
@@ -59,14 +59,6 @@ public class SampleEntrustController {
BusinessSampleEntrustRegistrationExtendRespVO sampleEntrustRegistration = sampleEntrustService.detail(id);
return success(sampleEntrustRegistration);
}
@GetMapping("/reportDetail")
@Operation(summary = "委托单详情数据")
public CommonResult<?> reportDetail(@RequestParam("id") Long id) {
JSONObject jsonObject = sampleEntrustService.reportDetail(id);
return success(jsonObject);
}
@PostMapping("/update")
@Operation(summary = "修改委托登记")

View File

@@ -1,39 +1,30 @@
package com.zt.plat.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 com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.framework.tenant.core.context.TenantContextHolder;
import com.zt.plat.module.qms.business.bus.liteflow.param.SampleFlowInfo;
import com.zt.plat.module.qms.business.bus.liteflow.param.SampleFlowParam;
import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleFlowContext;
import com.zt.plat.module.qms.business.bus.service.SampleFlowService;
import com.zt.plat.module.qms.core.sampleflow.SampleFlowDefinition;
import com.zt.plat.module.qms.core.sampleflow.SampleFlowNode;
import com.zt.plat.module.qms.enums.QmsCommonConstant;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import static com.zt.plat.framework.common.pojo.CommonResult.success;
import static com.zt.plat.framework.common.pojo.CommonResult.error;
@Tag(name = "管理后台 - 样品流转")
@RestController
@RequestMapping("/qms/bus/sample/flow")
@Validated
public class SampleFlowController {
public class SampleFlowController implements BusinessControllerMarker {
@Resource
private SampleFlowService sampleFlowService;
@@ -45,138 +36,22 @@ public class SampleFlowController {
public CommonResult<?> sampleFlow(@Validated @RequestBody SampleFlowParam sampleFlowParam) {
LiteflowResponse response = sampleFlowService.sampleFlow(sampleFlowParam);
return success(response.getContextBean(SampleFlowContext.class));
}
@GetMapping("/test")
public CommonResult<?> test() {
SampleFlowDefinition sampleFlowDefinition = new SampleFlowDefinition();
sampleFlowDefinition.setFlowKey("flw_sub_sample_process");
sampleFlowDefinition.setFlowName("子样样品流转流程");
List<SampleFlowNode> flowNodeList = new ArrayList<>();
SampleFlowNode zxr = new SampleFlowNode();
zxr.setNodeName("中心收样");
zxr.setNodeKey("flw_center_receive");
zxr.setSort(3100);
SampleFlowNode zxs = new SampleFlowNode();
zxs.setNodeName("中心送样");
zxs.setNodeKey("flw_center_send");
zxs.setSort(3200);
SampleFlowNode bzr = new SampleFlowNode();
bzr.setNodeName("班组收样");
bzr.setNodeKey("flw_team_receive");
bzr.setSort(3300);
SampleFlowNode ypbm = new SampleFlowNode();
ypbm.setNodeName("样品编密");
ypbm.setNodeKey("flw_sample_encrypt");
ypbm.setSort(3400);
// SampleFlowNode fxr = new SampleFlowNode();
// fxr.setNodeName("分析收样");
// fxr.setNodeKey("flw_analysis_receive");
// fxr.setSort(3500);
//
SampleFlowNode fx = new SampleFlowNode();
fx.setNodeName("样品分析");
fx.setNodeKey("flw_analysis");
fx.setSort(3550);
//
// SampleFlowNode fxs = new SampleFlowNode();
// fxs.setNodeName("分析送样");
// fxs.setNodeKey("flw_analysis_send");
// fxs.setSort(3600);
SampleFlowNode bzs = new SampleFlowNode();
bzs.setNodeName("班组送样");
bzs.setNodeKey("flw_team_send");
bzs.setSort(3700);
SampleFlowNode ypgk = new SampleFlowNode();
ypgk.setNodeName("样品归库");
ypgk.setNodeKey("flw_sample_storage");
ypgk.setSort(3800);
ypgk.setNextFlowNodeList(null);
flowNodeList.add(ypgk);
zxr.setNextFlowNodeList(new ArrayList<SampleFlowNode>() {
{
add(BeanUtils.toBean(zxs,SampleFlowNode.class).setIsDefault(true));
}
});
flowNodeList.add(zxr);
zxs.setNextFlowNodeList(new ArrayList<>() {{
add(BeanUtils.toBean(bzr,SampleFlowNode.class).setIsDefault(true));
}});
flowNodeList.add(zxs);
bzr.setNextFlowNodeList(new ArrayList<>() {{
add(BeanUtils.toBean(ypbm,SampleFlowNode.class).setCondition("subSampleEncrypt"));//样品需要编密并且没编密过
add(BeanUtils.toBean(fx,SampleFlowNode.class).setCondition("subSampleNotEncrypt"));//样品无需编密或样品已编密过
}});
flowNodeList.add(bzr);
ypbm.setNextFlowNodeList(new ArrayList<>() {{
add(BeanUtils.toBean(fx,SampleFlowNode.class).setIsDefault(true));
}});
flowNodeList.add(ypbm);
// fxr.setNextFlowNodeList(new ArrayList<>() {{
// add(BeanUtils.toBean(fxs,SampleFlowNode.class).setIsDefault(true));
// }});
// flowNodeList.add(fxr);
//
//
// fxs.setNextFlowNodeList(new ArrayList<>() {{
// add(BeanUtils.toBean(bzs,SampleFlowNode.class).setIsDefault(true).setCondition("当前部门任务已全部分析完"));
// }});
// flowNodeList.add(fxs);
fx.setNextFlowNodeList(new ArrayList<>() {{
add(BeanUtils.toBean(bzs,SampleFlowNode.class).setIsDefault(true).setCondition("当前部门任务已全部分析完"));
}});
flowNodeList.add(fx);
bzs.setNextFlowNodeList(new ArrayList<>() {{
// add(BeanUtils.toBean(fx,SampleFlowNode.class).setCondition("样品当前分析班组结果超差,需要发起复检"));
add(BeanUtils.toBean(bzr,SampleFlowNode.class).setCondition("subSampleSelfReportedOthersPending"));//当前部门数据已全部判断上报
add(BeanUtils.toBean(ypgk,SampleFlowNode.class).setCondition("subSampleAlldeptAnalyzed"));//当前样品所有分析任务已全部上报完
}});
flowNodeList.add(bzs);
sampleFlowDefinition.setFlowNodeList(flowNodeList);
String jsonSampleFlowDefinition = JSON.toJSONString(sampleFlowDefinition);
System.out.println(jsonSampleFlowDefinition);
Long tenantId = TenantContextHolder.getRequiredTenantId();
List<SampleFlowInfo> sampleFlowInfoList = new ArrayList<>();
sampleFlowInfoList.add(new SampleFlowInfo().setId(1967550576457330690L).setIsWeighing(0));
SampleFlowParam sampleFlowParam = new SampleFlowParam();
sampleFlowParam.setSampleSourceType(2);
sampleFlowParam.setCurrentSampleFlowKey("P3000");
sampleFlowParam.setSampleFlowInfoList(sampleFlowInfoList);
LiteflowResponse response = flowExecutor.execute2Resp("sampleFlowChain" + tenantId, sampleFlowParam, SampleFlowContext.class);
if (response.isSuccess()) {
return success(response.getContextBean(SampleFlowContext.class));
} else {
return error(1_032_100_000, response.getMessage());
}
//return success(FlowBus.getNodeMap());
}
}
/**
* 中心收样并送样
* @param sampleFlowParam
* @return
*/
@PostMapping("/centerReceiveAndSend")
public CommonResult<?> centerReceiveAndSend(@Validated @RequestBody SampleFlowParam sampleFlowParam) {
//中心收样
sampleFlowParam.setCurrentSampleFlowKey(QmsCommonConstant.FLOW_NODE_CENTER_RECEIVE);
LiteflowResponse response = sampleFlowService.sampleFlow(sampleFlowParam);
//中心送样
sampleFlowParam.setCurrentSampleFlowKey(QmsCommonConstant.FLOW_NODE_CENTER_SEND);
sampleFlowParam.setSendSampleOper(null);
response = sampleFlowService.sampleFlow(sampleFlowParam);
return success(response.getContextBean(SampleFlowContext.class));
}
}

View File

@@ -0,0 +1,45 @@
package com.zt.plat.module.qms.business.bus.controller.admin;
import static com.zt.plat.framework.common.pojo.CommonResult.success;
import org.springframework.web.bind.annotation.GetMapping;
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.JSONObject;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.qms.business.bus.service.SampleAnalysisAuditService;
import com.zt.plat.module.qms.business.bus.service.SampleEntrustService;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.annotation.Resource;
/**
* 报表数据查询接口不继承BusinessControllerMarker
*/
@RestController
@RequestMapping("/qms/bus/sample/reporting-data-query")
public class SampleReportDataQueryController {
@Resource
private SampleEntrustService sampleEntrustService;
@Resource
private SampleAnalysisAuditService sampleAnalysisAuditService;
@GetMapping("/entrust-report-detail")
@Operation(summary = "委托单详情数据")
public CommonResult<?> reportDetail(@RequestParam("id") Long id) {
JSONObject jsonObject = sampleEntrustService.reportDetail(id);
return success(jsonObject);
}
@Operation(summary = "委托单详情数据")
@GetMapping("/crossAuditByTaskId")
public CommonResult<?> crossAuditByTaskId(Long businessAssayTaskId) {
JSONObject result = sampleAnalysisAuditService.crossAuditByTaskId(businessAssayTaskId);
return success(result);
}
}

View File

@@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson2.JSONObject;
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.qms.business.bus.controller.vo.*;
import com.zt.plat.module.qms.business.bus.service.SampleResultReportingService;
@@ -28,7 +29,7 @@ import org.springframework.web.bind.annotation.RequestBody;
@RestController
@RequestMapping("/qms/bus/sample/result-reporting")
@Validated
public class SampleResultReportingController {
public class SampleResultReportingController implements BusinessControllerMarker {
@Resource
private SampleResultReportingService sampleResultReportingService;
@@ -42,8 +43,8 @@ public class SampleResultReportingController {
//获取方法对应的样品
@GetMapping("/getSampleResultReportingList")
public CommonResult<?> getSampleResultReportingList(Long configAssayMethodId) {
JSONObject result = sampleResultReportingService.getSampleResultReportingList(configAssayMethodId);
public CommonResult<?> getSampleResultReportingList(BusinessSubParentSampleAssessmentGroupReqVO reqVO) {
JSONObject result = sampleResultReportingService.getSampleResultReportingList(reqVO);
return success(result);
}

View File

@@ -11,6 +11,7 @@ import static com.zt.plat.framework.common.pojo.CommonResult.success;
import java.util.List;
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
import com.zt.plat.module.qms.business.bus.controller.vo.*;
@@ -27,7 +28,7 @@ import jakarta.annotation.Resource;
@RestController
@RequestMapping("/qms/bus/sample/task-assign")
@Validated
public class SampleTaskAssignController {
public class SampleTaskAssignController implements BusinessControllerMarker {
@Resource
private SampleTaskAssignService sampleTaskAssignService;
@@ -38,6 +39,13 @@ public class SampleTaskAssignController {
List<AdminUserRespDTO> list = sampleTaskAssignService.getAssignUserList();
return success(list);
}
@Operation(description = "根据用户id获取用户信息")
@GetMapping("/getUserInfoById")
public CommonResult<?> getUserInfoById(Long userId) {
AdminUserRespDTO userRespDTO = sampleTaskAssignService.getUserInfoById(userId);
return success(userRespDTO);
}
@GetMapping("/getAssaySampleList")
public CommonResult<?> getAssaySampleList(BusinessAssayTaskDataReqVO reqVO) {

View File

@@ -0,0 +1,155 @@
package com.zt.plat.module.qms.business.bus.controller.admin;
import static com.zt.plat.framework.common.pojo.CommonResult.success;
import java.util.ArrayList;
import java.util.List;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson2.JSON;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.module.qms.core.sampleflow.SampleFlowDefinition;
import com.zt.plat.module.qms.core.sampleflow.SampleFlowNode;
@RestController
@RequestMapping("/qms/bus/test")
public class TestController {
@GetMapping("/testSampleFlow")
public CommonResult<?> testSampleFlow() {
SampleFlowDefinition sampleFlowDefinition = new SampleFlowDefinition();
sampleFlowDefinition.setFlowKey("flw_sub_sample_process");
sampleFlowDefinition.setFlowName("子样样品流转流程");
List<SampleFlowNode> flowNodeList = new ArrayList<>();
SampleFlowNode zxr = new SampleFlowNode();
zxr.setNodeName("中心收样");
zxr.setNodeKey("flw_center_receive");
zxr.setSort(3100);
SampleFlowNode zxs = new SampleFlowNode();
zxs.setNodeName("中心送样");
zxs.setNodeKey("flw_center_send");
zxs.setSort(3200);
SampleFlowNode bzr = new SampleFlowNode();
bzr.setNodeName("班组收样");
bzr.setNodeKey("flw_team_receive");
bzr.setSort(3300);
SampleFlowNode ypbm = new SampleFlowNode();
ypbm.setNodeName("样品编密");
ypbm.setNodeKey("flw_sample_encrypt");
ypbm.setSort(3400);
// SampleFlowNode fxr = new SampleFlowNode();
// fxr.setNodeName("分析收样");
// fxr.setNodeKey("flw_analysis_receive");
// fxr.setSort(3500);
//
SampleFlowNode fx = new SampleFlowNode();
fx.setNodeName("样品分析");
fx.setNodeKey("flw_analysis");
fx.setSort(3550);
//
// SampleFlowNode fxs = new SampleFlowNode();
// fxs.setNodeName("分析送样");
// fxs.setNodeKey("flw_analysis_send");
// fxs.setSort(3600);
SampleFlowNode bzs = new SampleFlowNode();
bzs.setNodeName("班组送样");
bzs.setNodeKey("flw_team_send");
bzs.setSort(3700);
SampleFlowNode ypgk = new SampleFlowNode();
ypgk.setNodeName("样品归库");
ypgk.setNodeKey("flw_sample_storage");
ypgk.setSort(3800);
ypgk.setNextFlowNodeList(null);
flowNodeList.add(ypgk);
zxr.setNextFlowNodeList(new ArrayList<SampleFlowNode>() {
private static final long serialVersionUID = 6146393613606839512L;
{
add(BeanUtils.toBean(zxs,SampleFlowNode.class).setIsDefault(true));
}
});
flowNodeList.add(zxr);
zxs.setNextFlowNodeList(new ArrayList<>() {
private static final long serialVersionUID = 5357543125760924047L;
{
add(BeanUtils.toBean(bzr,SampleFlowNode.class).setIsDefault(true));
}});
flowNodeList.add(zxs);
bzr.setNextFlowNodeList(new ArrayList<>() {
private static final long serialVersionUID = 6376704859477839016L;
{
add(BeanUtils.toBean(ypbm,SampleFlowNode.class).setCondition("subSampleEncrypt"));//样品需要编密并且没编密过
add(BeanUtils.toBean(fx,SampleFlowNode.class).setCondition("subSampleNotEncrypt"));//样品无需编密或样品已编密过
}});
flowNodeList.add(bzr);
ypbm.setNextFlowNodeList(new ArrayList<>() {
private static final long serialVersionUID = 1014984817516902869L;
{
add(BeanUtils.toBean(fx,SampleFlowNode.class).setIsDefault(true));
}});
flowNodeList.add(ypbm);
// fxr.setNextFlowNodeList(new ArrayList<>() {{
// add(BeanUtils.toBean(fxs,SampleFlowNode.class).setIsDefault(true));
// }});
// flowNodeList.add(fxr);
//
//
// fxs.setNextFlowNodeList(new ArrayList<>() {{
// add(BeanUtils.toBean(bzs,SampleFlowNode.class).setIsDefault(true).setCondition("当前部门任务已全部分析完"));
// }});
// flowNodeList.add(fxs);
fx.setNextFlowNodeList(new ArrayList<>() {
private static final long serialVersionUID = -610440034210287957L;
{
add(BeanUtils.toBean(bzs,SampleFlowNode.class).setIsDefault(true).setCondition("当前部门任务已全部分析完"));
}});
flowNodeList.add(fx);
bzs.setNextFlowNodeList(new ArrayList<>() {
private static final long serialVersionUID = -5057434004685743838L;
{
// add(BeanUtils.toBean(fx,SampleFlowNode.class).setCondition("样品当前分析班组结果超差,需要发起复检"));
add(BeanUtils.toBean(bzr,SampleFlowNode.class).setCondition("subSampleSelfReportedOthersPending"));//当前部门数据已全部判断上报
add(BeanUtils.toBean(ypgk,SampleFlowNode.class).setCondition("subSampleAlldeptAnalyzed"));//当前样品所有分析任务已全部上报完
}});
flowNodeList.add(bzs);
sampleFlowDefinition.setFlowNodeList(flowNodeList);
String jsonSampleFlowDefinition = JSON.toJSONString(sampleFlowDefinition);
System.out.println(jsonSampleFlowDefinition);
return success(jsonSampleFlowDefinition);
}
}

View File

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

View File

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

View File

@@ -5,9 +5,14 @@ import lombok.Data;
@Data
public class BusinessAssayTaskDataGroupRespVO {
/** 方法id **/
private Long configAssayMethodId;
/** 方法名称 **/
private String configAssayMethodName;
/** 方法名称及类别 **/
private String configAssayMethodNameAndCategory;
private String assayType;

View File

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

View File

@@ -49,6 +49,9 @@ public class BusinessAssayTaskDataReqVO {
@Schema(description = "分析人")
private String assayOperator;
@Schema(description = "分析人ID", example = "27835")
private Long assayOperatorId;
@Schema(description = "分配任务时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] assignTaskTime;
@@ -62,6 +65,9 @@ public class BusinessAssayTaskDataReqVO {
@Schema(description = "上报人")
private String reporter;
@Schema(description = "上报人ID", example = "15920")
private Long reporterId;
@Schema(description = "上报时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] reportTime;
@@ -95,6 +101,26 @@ public class BusinessAssayTaskDataReqVO {
//=== 扩展字段,判定上报状态
@Schema(description = "判定上报状态")
private String asmtReportedStatus;
@Schema(description = "样品状态")
private String sampleStatus;
@Schema(description = "检测方法配置名称")
private String configAssayMethodName;
@Schema(description = "检测方法配置名称及类别")
private String configAssayMethodNameAndCategory;
@Schema(description = "收样时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] sampleReceiveTime;
@Schema(description = "样品编号")
private String sampleCode;
@Schema(description = "分析编号")
private String sampleAssayCode;
@Schema(description = "归库编号")
private String sampleReturnCode;
}

View File

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

View File

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

View File

@@ -4,6 +4,7 @@ import java.util.List;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigQCSampleMethodExtendRespVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
@@ -24,6 +25,9 @@ public class BusinessAssayTaskExtendRespVO extends BusinessAssayTaskRespVO {
/** 分析方法名称 **/
private String configAssayMethodName;
@Schema(description = "检测方法配置名称及类别")
private String configAssayMethodNameAndCategory;
/** 分析方法对应的分析项目 **/
private String configAssayMethodProjectShowNames;

View File

@@ -34,6 +34,9 @@ public class BusinessAssayTaskPageReqVO extends PageParam {
@Schema(description = "任务单分配人")
private String taskAssignOperator;
@Schema(description = "任务单分配人ID", example = "14545")
private Long taskAssignOperatorId;
@Schema(description = "任务单分配时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] taskAssignTime;
@@ -54,6 +57,9 @@ public class BusinessAssayTaskPageReqVO extends PageParam {
@Schema(description = "分析人")
private String assayOperator;
@Schema(description = "分析人", example = "17685")
private Long assayOperatorId;
@Schema(description = "分析时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] assayTime;
@@ -75,6 +81,9 @@ public class BusinessAssayTaskPageReqVO extends PageParam {
@Schema(description = "上报人")
private String reportOperator;
@Schema(description = "上报人ID", example = "7393")
private Long reportOperatorId;
@Schema(description = "任务单完成时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] taskFinishTime;
@@ -91,10 +100,10 @@ public class BusinessAssayTaskPageReqVO extends PageParam {
@Schema(description = "签名信息")
private String documentSignature;
@Schema(description = "完成状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "2")
@Schema(description = "完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "2")
private String finishStatus;
@Schema(description = "流程状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "1")
@Schema(description = "流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "1")
private String flowStatus;
@Schema(description = "所属部门")

View File

@@ -33,6 +33,9 @@ public class BusinessAssayTaskReqVO {
@Schema(description = "任务单分配人")
private String taskAssignOperator;
@Schema(description = "任务单分配人ID", example = "14545")
private Long taskAssignOperatorId;
@Schema(description = "任务单分配时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] taskAssignTime;
@@ -53,6 +56,9 @@ public class BusinessAssayTaskReqVO {
@Schema(description = "分析人")
private String assayOperator;
@Schema(description = "分析人", example = "17685")
private Long assayOperatorId;
@Schema(description = "分析时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] assayTime;
@@ -74,6 +80,9 @@ public class BusinessAssayTaskReqVO {
@Schema(description = "上报人")
private String reportOperator;
@Schema(description = "上报人ID", example = "7393")
private Long reportOperatorId;
@Schema(description = "任务单完成时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] taskFinishTime;
@@ -90,10 +99,10 @@ public class BusinessAssayTaskReqVO {
@Schema(description = "签名信息")
private String documentSignature;
@Schema(description = "完成状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "2")
@Schema(description = "完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "2")
private String finishStatus;
@Schema(description = "流程状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "1")
@Schema(description = "流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "1")
private String flowStatus;
@Schema(description = "所属部门")

View File

@@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
@Schema(description = "管理后台 - 检测任务分配业务 Response VO")
@Data
@@ -42,6 +43,10 @@ public class BusinessAssayTaskRespVO {
@ExcelProperty("任务单分配人")
private String taskAssignOperator;
@Schema(description = "任务单分配人ID", example = "14545")
@ExcelProperty("任务单分配人ID")
private Long taskAssignOperatorId;
@Schema(description = "任务单分配时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("任务单分配时间")
private LocalDateTime taskAssignTime;
@@ -64,6 +69,10 @@ public class BusinessAssayTaskRespVO {
@ExcelProperty("分析人")
private String assayOperator;
@Schema(description = "分析人", example = "17685")
@ExcelProperty("分析人")
private Long assayOperatorId;
@Schema(description = "分析时间")
@ExcelProperty("分析时间")
private LocalDateTime assayTime;
@@ -84,6 +93,10 @@ public class BusinessAssayTaskRespVO {
@ExcelProperty("上报人")
private String reportOperator;
@Schema(description = "上报人ID", example = "7393")
@ExcelProperty("上报人ID")
private Long reportOperatorId;
@Schema(description = "任务单完成时间")
@ExcelProperty("任务单完成时间")
private LocalDateTime taskFinishTime;
@@ -104,12 +117,13 @@ public class BusinessAssayTaskRespVO {
@ExcelProperty("签名信息")
private String documentSignature;
@Schema(description = "完成状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "2")
@ExcelProperty("完成状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved")
@Schema(description = "完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "2")
@ExcelProperty("完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed")
private String finishStatus;
@Schema(description = "流程状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "1")
@ExcelProperty("流程状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved")
@Dict(dicCode = "flow_status")
@Schema(description = "流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "1")
@ExcelProperty("流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed")
private String flowStatus;
@Schema(description = "所属部门")

View File

@@ -40,9 +40,11 @@ public class BusinessAssayTaskSaveReqVO {
private String taskSourceType;
@Schema(description = "任务单分配人", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "任务单分配人不能为空")
private String taskAssignOperator;
@Schema(description = "任务单分配人ID", example = "14545")
private Long taskAssignOperatorId;
@Schema(description = "任务单分配时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "任务单分配时间不能为空")
private LocalDateTime taskAssignTime;
@@ -64,6 +66,9 @@ public class BusinessAssayTaskSaveReqVO {
@Schema(description = "分析人")
private String assayOperator;
@Schema(description = "分析人", example = "17685")
private Long assayOperatorId;
@Schema(description = "分析时间")
private LocalDateTime assayTime;
@@ -79,6 +84,9 @@ public class BusinessAssayTaskSaveReqVO {
@Schema(description = "上报人")
private String reportOperator;
@Schema(description = "上报人ID", example = "7393")
private Long reportOperatorId;
@Schema(description = "任务单完成时间")
private LocalDateTime taskFinishTime;
@@ -94,10 +102,10 @@ public class BusinessAssayTaskSaveReqVO {
@Schema(description = "签名信息")
private String documentSignature;
@Schema(description = "完成状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "2")
@Schema(description = "完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "2")
private String finishStatus;
@Schema(description = "流程状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "1")
@Schema(description = "流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "1")
private String flowStatus;
@Schema(description = "所属部门")

View File

@@ -64,5 +64,16 @@ public class BusinessHandoverRecordSubPageReqVO extends PageParam {
@Schema(description = "备注")
private String remark;
//==============扩展字段================
private Long deptId;
@Schema(description = "分析编号")
private String sampleAssayCode;
@Schema(description = "归库编号")
private String sampleReturnCode;
@Schema(description = "样品名称")
private String sampleName;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -156,4 +156,7 @@ public class BusinessSampleEntrustRegistrationPageReqVO extends PageParam {
//====================扩展字段======================
@Schema(description = "委托来源名称")
private String configEntrustSourceName;
@Schema(description = "报表配置id")
private Long configReportTypeId;
}

View File

@@ -6,6 +6,7 @@ import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
@Schema(description = "管理后台 - 委检登记业务 Response VO")
@Data
@@ -144,10 +145,12 @@ public class BusinessSampleEntrustRegistrationRespVO {
@ExcelProperty("数据校验状态,success-数据校验成功、fail-数据校验失败")
private String dataCheckStatus;
@Dict(dicCode = "entrust_assay_status")
@Schema(description = "检验状态,unchecked-未检验checked-已检验", example = "2")
@ExcelProperty("检验状态,unchecked-未检验checked-已检验")
private String assayStatus;
@Dict(dicCode = "entrust_data_status")
@Schema(description = "数据回报状态,unreturned-未回报returned-已回报", example = "1")
@ExcelProperty("数据回报状态,unreturned-未回报returned-已回报")
private String dataStatus;

View File

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

View File

@@ -1,5 +1,11 @@
package com.zt.plat.module.qms.business.bus.controller.vo;
import static com.zt.plat.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;
@@ -11,10 +17,17 @@ public class BusinessSubParentSampleAssessmentGroupReqVO {
@Schema(description = "分析方法名称")
private String configAssayMethodName;
@Schema(description = "检测方法配置名称及类别")
private String configAssayMethodNameAndCategory;
@Schema(description = "分析部门ID")
private Long assayDepartmentId;
@Schema(description = "分析部门名称")
private String assayDepartmentName;
@Schema(description = "收样时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] sampleReceiveTime;
}

View File

@@ -11,6 +11,9 @@ public class BusinessSubParentSampleAssessmentGroupRespVO {
@Schema(description = "分析方法名称")
private String configAssayMethodName;
@Schema(description = "检测方法配置名称及类别")
private String configAssayMethodNameAndCategory;
@Schema(description = "分析部门ID")
private Long assayDepartmentId;

View File

@@ -31,6 +31,9 @@ public class BusinessSubSampleAnalysisGroupPageReqVO extends PageParam {
@Schema(description = "样品状态", example = "1")
private String sampleStatus;
@Schema(description = "是否送样")
private Integer isSend;
@Schema(description = "收样人")
private String sampleReceiver;

View File

@@ -40,6 +40,9 @@ public class BusinessSubSampleAnalysisGroupRespVO {
@ExcelProperty("样品状态")
private String sampleStatus;
@Schema(description = "是否送样")
private Integer isSend;
@Schema(description = "收样人")
@ExcelProperty("收样人")
private String sampleReceiver;

View File

@@ -37,6 +37,9 @@ public class BusinessSubSampleAnalysisGroupSaveReqVO {
@NotEmpty(message = "样品状态不能为空")
private String sampleStatus;
@Schema(description = "是否送样")
private Integer isSend;
@Schema(description = "收样人")
private String sampleReceiver;

View File

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

View File

@@ -6,6 +6,7 @@ import com.zt.plat.framework.common.pojo.PageParam;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import java.util.List;
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@@ -133,6 +134,8 @@ public class BusinessSubSamplePageReqVO extends PageParam {
@Schema(description = "备注")
private String remark;
//=======================================扩展字段=======================================
@Schema(description = "分析部门id")
private Long assayDepartmentId;
@@ -141,8 +144,13 @@ public class BusinessSubSamplePageReqVO extends PageParam {
@Schema(description = "分析部门状态")
private String assayDepartmentStatus;
//=======================================扩展字段=======================================
@Schema(description = "是否已送样")
private Integer isSendSample;
@Schema(description = "样品流程节点KEY列表")
private List<String> sampleFlowNodeKeyList;
@Schema(description = "库位编码")
private String warehouseLocationCode;

View File

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

View File

@@ -1,5 +1,7 @@
package com.zt.plat.module.qms.business.bus.controller.vo;
import java.time.LocalDateTime;
import lombok.Data;
@Data
@@ -22,4 +24,7 @@ public class NoReportSubParentSampleAssessmentRespVO {
private String taskType;
private String assayType;
private LocalDateTime sampleReceiveTime;
}

View File

@@ -4,6 +4,7 @@ import java.util.List;
import com.zt.plat.module.qms.business.config.controller.vo.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
@@ -20,6 +21,9 @@ public class RecheckSubSampleParentMethodRespVO {
private Long configAssayMethodId;
private String configAssayMethodName;
@Schema(description = "检测方法配置名称及类别")
private String configAssayMethodNameAndCategory;
private Long baseSampleId;

View File

@@ -6,7 +6,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import com.fasterxml.jackson.annotation.JsonFormat;

View File

@@ -1,5 +1,6 @@
package com.zt.plat.module.qms.business.bus.dal.dataobject;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
@@ -109,4 +110,20 @@ public class BusinessAssayReportDataDO extends BusinessBaseDO {
//样品创建时间
@TableField(exist = false)
private LocalDateTime baseSampleCreateTime;
//样品类型key
@TableField(exist = false)
private String sampleTypeKey;
//委托样品名称
@TableField(exist = false)
private String entrustSampleName;
//委托样品编号
@TableField(exist = false)
private String entrustSampleCode;
//委托明细排序
@TableField(exist = false)
private Integer entrustDetailSort;
}

View File

@@ -24,7 +24,6 @@ import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
public class BusinessAssayTaskDO extends BusinessBaseDO {
/**
* ID
*/
@@ -66,6 +65,11 @@ public class BusinessAssayTaskDO extends BusinessBaseDO {
@TableField("TSK_ASN_OPTR")
private String taskAssignOperator;
/**
* 任务单分配人ID
*/
@TableField("TSK_ASN_OPTR_ID")
private Long taskAssignOperatorId;
/**
* 任务单分配时间
*/
@TableField("TSK_ASN_TM")
@@ -76,8 +80,8 @@ public class BusinessAssayTaskDO extends BusinessBaseDO {
@TableField("TSK_ASN_STS")
private String taskAssignStatus;
/**
* 任务单分配提交时间
*/
* 任务单分配提交时间
*/
@TableField("TSK_ASN_SBM_TM")
private LocalDateTime taskAssignSubmitTime;
/**
@@ -96,6 +100,11 @@ public class BusinessAssayTaskDO extends BusinessBaseDO {
@TableField("ASY_OPTR")
private String assayOperator;
/**
* 分析人
*/
@TableField("ASY_OPTR_ID")
private Long assayOperatorId;
/**
* 分析时间
*/
@TableField("ASY_TM")
@@ -121,6 +130,11 @@ public class BusinessAssayTaskDO extends BusinessBaseDO {
@TableField("RPT_OPTR")
private String reportOperator;
/**
* 上报人ID
*/
@TableField("RPT_OPTR_ID")
private Long reportOperatorId;
/**
* 任务单完成时间
*/
@TableField("TSK_FIN_TM")
@@ -146,12 +160,12 @@ public class BusinessAssayTaskDO extends BusinessBaseDO {
@TableField("DOC_SIG")
private String documentSignature;
/**
* 完成状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved
* 完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed
*/
@TableField("FIN_STS")
private String finishStatus;
/**
* 流程状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved
* 流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed
*/
@TableField("FLW_STS")
private String flowStatus;

View File

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

View File

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

View File

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

View File

@@ -63,6 +63,11 @@ public class BusinessSubSampleAnalysisGroupDO extends BusinessBaseDO {
@TableField("SMP_STS")
private String sampleStatus;
/**
* 是否送样
*/
@TableField("IS_SND")
private Integer isSend;
/**
* 收样人
*/
@TableField("SMP_RCVR")

View File

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

View File

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

View File

@@ -2,7 +2,6 @@ package com.zt.plat.module.qms.business.bus.dal.mapper;
import java.util.*;
import com.alibaba.druid.sql.ast.statement.SQLForeignKeyImpl.On;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.zt.plat.framework.common.pojo.PageResult;
@@ -16,7 +15,6 @@ import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskDataRe
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAnalysisGroupDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAssessmentDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAssessmentProjectDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
import com.zt.plat.module.qms.enums.QmsCommonConstant;
@@ -26,7 +24,6 @@ import cn.hutool.core.util.ObjectUtil;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -39,79 +36,209 @@ import org.apache.ibatis.annotations.Param;
public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTaskDataDO> {
default List<BusinessAssayTaskDataExtendRespVO> selectList(BusinessAssayTaskDataReqVO reqVO) {
return selectJoinList(BusinessAssayTaskDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayTaskDataDO>()
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessAssayTaskDataDO::getConfigAssayMethodId)
.leftJoin(BusinessSubSampleDO.class, BusinessSubSampleDO::getId, BusinessAssayTaskDataDO::getBusinessSubSampleId)
.selectAll(BusinessAssayTaskDataDO.class)
.selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskDataExtendRespVO::getConfigAssayMethodName)
.selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName)
.selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode)
.selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessAssayTaskDataExtendRespVO::getSampleAssayCode)
.selectAs(BusinessSubSampleDO::getConfigSubSampleId, BusinessAssayTaskDataExtendRespVO::getConfigSubSampleId)
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId())
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId())
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId())
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubSampleAssessmentId, reqVO.getBusinessSubSampleAssessmentId())
.eqIfPresent(BusinessAssayTaskDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
.eqIfPresent(BusinessAssayTaskDataDO::getTaskType, reqVO.getTaskType())
.eqIfPresent(BusinessAssayTaskDataDO::getAssayType, reqVO.getAssayType())
.eqIfPresent(BusinessAssayTaskDataDO::getAssayProject, reqVO.getAssayProject())
.eqIfPresent(BusinessAssayTaskDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
.likeIfPresent(BusinessAssayTaskDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
.eqIfPresent(BusinessAssayTaskDataDO::getAssayOperator, reqVO.getAssayOperator())
.betweenIfPresent(BusinessAssayTaskDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
.eqIfPresent(BusinessAssayTaskDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
.eqIfPresent(BusinessAssayTaskDataDO::getIsReported, reqVO.getIsReported())
.eqIfPresent(BusinessAssayTaskDataDO::getReporter, reqVO.getReporter())
.betweenIfPresent(BusinessAssayTaskDataDO::getReportTime, reqVO.getReportTime())
.eqIfPresent(BusinessAssayTaskDataDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId())
.eqIfPresent(BusinessAssayTaskDataDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey())
.betweenIfPresent(BusinessAssayTaskDataDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime())
.eqIfPresent(BusinessAssayTaskDataDO::getAnalysisCount, reqVO.getAnalysisCount())
.eqIfPresent(BusinessAssayTaskDataDO::getUpdateCount, reqVO.getUpdateCount())
.eqIfPresent(BusinessAssayTaskDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.betweenIfPresent(BusinessAssayTaskDataDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(BusinessAssayTaskDataDO::getRemark, reqVO.getRemark())
.orderByDesc(BusinessAssayTaskDataDO::getId));
MPJLambdaWrapper<BusinessAssayTaskDataDO> mpjLambdaWrapper = new MPJLambdaWrapperX<BusinessAssayTaskDataDO>()
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessAssayTaskDataDO::getConfigAssayMethodId)
.leftJoin(BusinessSubSampleDO.class, BusinessSubSampleDO::getId, BusinessAssayTaskDataDO::getBusinessSubSampleId)
.leftJoin(BusinessSubSampleAnalysisGroupDO.class, on -> on
.eq(BusinessSubSampleAnalysisGroupDO::getBusinessSubSampleId, BusinessAssayTaskDataDO::getBusinessSubSampleId)
.eq(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentId, BusinessAssayTaskDataDO::getAssayDepartmentId))
.selectAll(BusinessAssayTaskDataDO.class)
.selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskDataExtendRespVO::getConfigAssayMethodName)
.selectAs(ConfigAssayMethodDO::getMethodNameCategory, BusinessAssayTaskDataExtendRespVO::getConfigAssayMethodNameAndCategory)
.selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName)
.selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode)
.selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessAssayTaskDataExtendRespVO::getSampleAssayCode)
.selectAs(BusinessSubSampleDO::getConfigSubSampleId, BusinessAssayTaskDataExtendRespVO::getConfigSubSampleId);
if (ObjectUtil.isNotEmpty(reqVO.getBusinessBaseSampleId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId());
}
if (ObjectUtil.isNotEmpty(reqVO.getBusinessSubParentSampleId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId());
}
if (ObjectUtil.isNotEmpty(reqVO.getBusinessSubSampleId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId());
}
if (ObjectUtil.isNotEmpty(reqVO.getConfigAssayMethodId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId());
}
if (ObjectUtil.isNotEmpty(reqVO.getBusinessAssayTaskId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId());
}
if (ObjectUtil.isNotEmpty(reqVO.getBusinessSubSampleAssessmentId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessSubSampleAssessmentId, reqVO.getBusinessSubSampleAssessmentId());
}
if (ObjectUtil.isNotEmpty(reqVO.getTaskType())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getTaskType, reqVO.getTaskType());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayType())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayType, reqVO.getAssayType());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayProject())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayProject, reqVO.getAssayProject());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayDepartmentId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayDepartmentName())) {
mpjLambdaWrapper.like(BusinessAssayTaskDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayOperator())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayOperator, reqVO.getAssayOperator());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayOperatorId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayOperatorId, reqVO.getAssayOperatorId());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssignTaskTime()) && ObjectUtil.isNotEmpty(reqVO.getAssignTaskTime()[0]) && ObjectUtil.isNotEmpty(reqVO.getAssignTaskTime()[1])) {
mpjLambdaWrapper.between(BusinessAssayTaskDataDO::getAssignTaskTime, reqVO.getAssignTaskTime()[0], reqVO.getAssignTaskTime()[1]);
}
if (ObjectUtil.isNotEmpty(reqVO.getIsAssignTasked())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getIsAssignTasked, reqVO.getIsAssignTasked());
}
if (ObjectUtil.isNotEmpty(reqVO.getIsReported())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getIsReported, reqVO.getIsReported());
}
if (ObjectUtil.isNotEmpty(reqVO.getReporter())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getReporter, reqVO.getReporter());
}
if (ObjectUtil.isNotEmpty(reqVO.getReporterId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getReporterId, reqVO.getReporterId());
}
if (ObjectUtil.isNotEmpty(reqVO.getReportTime()) && ObjectUtil.isNotEmpty(reqVO.getReportTime()[0]) && ObjectUtil.isNotEmpty(reqVO.getReportTime()[1])) {
mpjLambdaWrapper.between(BusinessAssayTaskDataDO::getReportTime, reqVO.getReportTime()[0], reqVO.getReportTime()[1]);
}
if (ObjectUtil.isNotEmpty(reqVO.getConfigSampleFlowId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId());
}
if (ObjectUtil.isNotEmpty(reqVO.getSampleFlowNodeKey())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey());
}
if (ObjectUtil.isNotEmpty(reqVO.getSampleFlowNodeTime()) && ObjectUtil.isNotEmpty(reqVO.getSampleFlowNodeTime()[0]) && ObjectUtil.isNotEmpty(reqVO.getSampleFlowNodeTime()[1])) {
mpjLambdaWrapper.between(BusinessAssayTaskDataDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime()[0], reqVO.getSampleFlowNodeTime()[1]);
}
if (ObjectUtil.isNotEmpty(reqVO.getAnalysisCount())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAnalysisCount, reqVO.getAnalysisCount());
}
if (ObjectUtil.isNotEmpty(reqVO.getUpdateCount())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getUpdateCount, reqVO.getUpdateCount());
}
if (ObjectUtil.isNotEmpty(reqVO.getSystemDepartmentCode())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode());
}
if (ObjectUtil.isNotEmpty(reqVO.getCreateTime()) && ObjectUtil.isNotEmpty(reqVO.getCreateTime()[0]) && ObjectUtil.isNotEmpty(reqVO.getCreateTime()[1])) {
mpjLambdaWrapper.between(BusinessAssayTaskDataDO::getCreateTime, reqVO.getCreateTime()[0], reqVO.getCreateTime()[1]);
}
if (ObjectUtil.isNotEmpty(reqVO.getRemark())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getRemark, reqVO.getRemark());
}
if (ObjectUtil.isNotEmpty(reqVO.getSampleStatus())) {
mpjLambdaWrapper.eq(BusinessSubSampleAnalysisGroupDO::getSampleStatus, reqVO.getSampleStatus());
}
mpjLambdaWrapper.orderByAsc(BusinessAssayTaskDataDO::getSampleFlowNodeTime);
return selectJoinList(BusinessAssayTaskDataExtendRespVO.class, mpjLambdaWrapper);
}
default PageResult<BusinessAssayTaskDataExtendRespVO> selectPage(BusinessAssayTaskDataPageReqVO reqVO) {
return selectJoinPage(reqVO, BusinessAssayTaskDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayTaskDataDO>()
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessAssayTaskDataDO::getConfigAssayMethodId)
.leftJoin(BusinessSubSampleDO.class, BusinessSubSampleDO::getId, BusinessAssayTaskDataDO::getBusinessSubSampleId)
.selectAll(BusinessAssayTaskDataDO.class)
.selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskDataExtendRespVO::getConfigAssayMethodName)
.selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName)
.selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode)
.selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessAssayTaskDataExtendRespVO::getSampleAssayCode)
.selectAs(BusinessSubSampleDO::getConfigSubSampleId, BusinessAssayTaskDataExtendRespVO::getConfigSubSampleId)
.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::getBusinessSubSampleAssessmentId, reqVO.getBusinessSubSampleAssessmentId())
.eqIfPresent(BusinessAssayTaskDataDO::getTaskType, reqVO.getTaskType())
.eqIfPresent(BusinessAssayTaskDataDO::getAssayType, reqVO.getAssayType())
.eqIfPresent(BusinessAssayTaskDataDO::getAssayProject, reqVO.getAssayProject())
.eqIfPresent(BusinessAssayTaskDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
.likeIfPresent(BusinessAssayTaskDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
.eqIfPresent(BusinessAssayTaskDataDO::getAssayOperator, reqVO.getAssayOperator())
.betweenIfPresent(BusinessAssayTaskDataDO::getAssignTaskTime, reqVO.getAssignTaskTime())
.eqIfPresent(BusinessAssayTaskDataDO::getIsAssignTasked, reqVO.getIsAssignTasked())
.eqIfPresent(BusinessAssayTaskDataDO::getIsReported, reqVO.getIsReported())
.eqIfPresent(BusinessAssayTaskDataDO::getReporter, reqVO.getReporter())
.betweenIfPresent(BusinessAssayTaskDataDO::getReportTime, reqVO.getReportTime())
.eqIfPresent(BusinessAssayTaskDataDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId())
.eqIfPresent(BusinessAssayTaskDataDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey())
.betweenIfPresent(BusinessAssayTaskDataDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime())
.eqIfPresent(BusinessAssayTaskDataDO::getAnalysisCount, reqVO.getAnalysisCount())
.eqIfPresent(BusinessAssayTaskDataDO::getUpdateCount, reqVO.getUpdateCount())
.eqIfPresent(BusinessAssayTaskDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.betweenIfPresent(BusinessAssayTaskDataDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(BusinessAssayTaskDataDO::getRemark, reqVO.getRemark())
.orderByDesc(BusinessAssayTaskDataDO::getId));
MPJLambdaWrapper<BusinessAssayTaskDataDO> mpjLambdaWrapper = new MPJLambdaWrapperX<BusinessAssayTaskDataDO>()
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessAssayTaskDataDO::getConfigAssayMethodId)
.leftJoin(BusinessSubSampleDO.class, BusinessSubSampleDO::getId, BusinessAssayTaskDataDO::getBusinessSubSampleId)
.leftJoin(BusinessSubSampleAnalysisGroupDO.class, on -> on
.eq(BusinessSubSampleAnalysisGroupDO::getBusinessSubSampleId, BusinessAssayTaskDataDO::getBusinessSubSampleId)
.eq(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentId, BusinessAssayTaskDataDO::getAssayDepartmentId))
.selectAll(BusinessAssayTaskDataDO.class)
.selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskDataExtendRespVO::getConfigAssayMethodName)
.selectAs(ConfigAssayMethodDO::getMethodNameCategory, BusinessAssayTaskDataExtendRespVO::getConfigAssayMethodNameAndCategory)
.selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName)
.selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode)
.selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessAssayTaskDataExtendRespVO::getSampleAssayCode)
.selectAs(BusinessSubSampleDO::getConfigSubSampleId, BusinessAssayTaskDataExtendRespVO::getConfigSubSampleId);
if (ObjectUtil.isNotEmpty(reqVO.getBusinessBaseSampleId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId());
}
if (ObjectUtil.isNotEmpty(reqVO.getBusinessSubParentSampleId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId());
}
if (ObjectUtil.isNotEmpty(reqVO.getBusinessSubSampleId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId());
}
if (ObjectUtil.isNotEmpty(reqVO.getConfigAssayMethodId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId());
}
if (ObjectUtil.isNotEmpty(reqVO.getBusinessAssayTaskId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId());
}
if (ObjectUtil.isNotEmpty(reqVO.getBusinessSubSampleAssessmentId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getBusinessSubSampleAssessmentId, reqVO.getBusinessSubSampleAssessmentId());
}
if (ObjectUtil.isNotEmpty(reqVO.getTaskType())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getTaskType, reqVO.getTaskType());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayType())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayType, reqVO.getAssayType());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayProject())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayProject, reqVO.getAssayProject());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayDepartmentId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayDepartmentId, reqVO.getAssayDepartmentId());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayDepartmentName())) {
mpjLambdaWrapper.like(BusinessAssayTaskDataDO::getAssayDepartmentName, reqVO.getAssayDepartmentName());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayOperator())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayOperator, reqVO.getAssayOperator());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssayOperatorId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAssayOperatorId, reqVO.getAssayOperatorId());
}
if (ObjectUtil.isNotEmpty(reqVO.getAssignTaskTime()) && ObjectUtil.isNotEmpty(reqVO.getAssignTaskTime()[0]) && ObjectUtil.isNotEmpty(reqVO.getAssignTaskTime()[1])) {
mpjLambdaWrapper.between(BusinessAssayTaskDataDO::getAssignTaskTime, reqVO.getAssignTaskTime()[0], reqVO.getAssignTaskTime()[1]);
}
if (ObjectUtil.isNotEmpty(reqVO.getIsAssignTasked())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getIsAssignTasked, reqVO.getIsAssignTasked());
}
if (ObjectUtil.isNotEmpty(reqVO.getIsReported())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getIsReported, reqVO.getIsReported());
}
if (ObjectUtil.isNotEmpty(reqVO.getReporter())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getReporter, reqVO.getReporter());
}
if (ObjectUtil.isNotEmpty(reqVO.getReporterId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getReporterId, reqVO.getReporterId());
}
if (ObjectUtil.isNotEmpty(reqVO.getReportTime()) && ObjectUtil.isNotEmpty(reqVO.getReportTime()[0]) && ObjectUtil.isNotEmpty(reqVO.getReportTime()[1])) {
mpjLambdaWrapper.between(BusinessAssayTaskDataDO::getReportTime, reqVO.getReportTime()[0], reqVO.getReportTime()[1]);
}
if (ObjectUtil.isNotEmpty(reqVO.getConfigSampleFlowId())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId());
}
if (ObjectUtil.isNotEmpty(reqVO.getSampleFlowNodeKey())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey());
}
if (ObjectUtil.isNotEmpty(reqVO.getSampleFlowNodeTime()) && ObjectUtil.isNotEmpty(reqVO.getSampleFlowNodeTime()[0]) && ObjectUtil.isNotEmpty(reqVO.getSampleFlowNodeTime()[1])) {
mpjLambdaWrapper.between(BusinessAssayTaskDataDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime()[0], reqVO.getSampleFlowNodeTime()[1]);
}
if (ObjectUtil.isNotEmpty(reqVO.getAnalysisCount())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getAnalysisCount, reqVO.getAnalysisCount());
}
if (ObjectUtil.isNotEmpty(reqVO.getUpdateCount())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getUpdateCount, reqVO.getUpdateCount());
}
if (ObjectUtil.isNotEmpty(reqVO.getSystemDepartmentCode())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode());
}
if (ObjectUtil.isNotEmpty(reqVO.getCreateTime()) && ObjectUtil.isNotEmpty(reqVO.getCreateTime()[0]) && ObjectUtil.isNotEmpty(reqVO.getCreateTime()[1])) {
mpjLambdaWrapper.between(BusinessAssayTaskDataDO::getCreateTime, reqVO.getCreateTime()[0], reqVO.getCreateTime()[1]);
}
if (ObjectUtil.isNotEmpty(reqVO.getRemark())) {
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getRemark, reqVO.getRemark());
}
if (ObjectUtil.isNotEmpty(reqVO.getSampleStatus())) {
mpjLambdaWrapper.eq(BusinessSubSampleAnalysisGroupDO::getSampleStatus, reqVO.getSampleStatus());
}
mpjLambdaWrapper.orderByAsc(BusinessAssayTaskDataDO::getSampleFlowNodeTime);
return selectJoinPage(reqVO, BusinessAssayTaskDataExtendRespVO.class, mpjLambdaWrapper);
}
@@ -136,6 +263,31 @@ public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTa
.eq(BusinessAssayTaskDataDO::getIsReported, QmsCommonConstant.NO));
}
default List<BusinessAssayTaskDataExtendRespVO> selectBySampleAssayCodesAndConfigAssayMethodId(List<String> sampleAssayCodes, Long configAssayMethodId) {
return selectJoinList(BusinessAssayTaskDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayTaskDataDO>()
.leftJoin(BusinessSubSampleDO.class, BusinessSubSampleDO::getId, BusinessAssayTaskDataDO::getBusinessSubSampleId)
.selectAll(BusinessAssayTaskDataDO.class)
.selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName)
.selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode)
.selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessAssayTaskDataExtendRespVO::getSampleAssayCode)
.in(BusinessSubSampleDO::getSampleAssayCode, sampleAssayCodes)
.eq(BusinessAssayTaskDataDO::getConfigAssayMethodId, configAssayMethodId)
.eq(BusinessAssayTaskDataDO::getIsReported, QmsCommonConstant.NO));
}
default List<BusinessAssayTaskDataExtendRespVO> selectBySampleAssayCodesAndConfigAssayMethodDictionaryBusinessKey(List<String> sampleAssayCodes, String configAssayMethodDictionaryBusinessKey) {
return selectJoinList(BusinessAssayTaskDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayTaskDataDO>()
.leftJoin(BusinessSubSampleDO.class, BusinessSubSampleDO::getId, BusinessAssayTaskDataDO::getBusinessSubSampleId)
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessAssayTaskDataDO::getConfigAssayMethodId)
.selectAll(BusinessAssayTaskDataDO.class)
.selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName)
.selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode)
.selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessAssayTaskDataExtendRespVO::getSampleAssayCode)
.in(BusinessSubSampleDO::getSampleAssayCode, sampleAssayCodes)
.eq(ConfigAssayMethodDO::getDictionaryBusinessKey, configAssayMethodDictionaryBusinessKey)
.eq(BusinessAssayTaskDataDO::getIsReported, QmsCommonConstant.NO));
}
default List<BusinessAssayTaskDataExtendRespVO> selectResultAssessmentList(BusinessAssayTaskDataReqVO reqVO) {
MPJLambdaWrapper<BusinessAssayTaskDataDO> mpjLambdaWrapper = new MPJLambdaWrapper<BusinessAssayTaskDataDO>()
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessAssayTaskDataDO::getConfigAssayMethodId)
@@ -146,6 +298,7 @@ public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTa
.eq(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentId, BusinessAssayTaskDataDO::getAssayDepartmentId))
.selectAll(BusinessAssayTaskDataDO.class)
.selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskDataExtendRespVO::getConfigAssayMethodName)
.selectAs(ConfigAssayMethodDO::getMethodNameCategory, BusinessAssayTaskDataExtendRespVO::getConfigAssayMethodNameAndCategory)
.selectAs(ConfigAssayMethodDO::getConfigReportTemplateKey, BusinessAssayTaskDataExtendRespVO::getConfigReportTemplateKey)
.selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName)
.selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode)
@@ -174,6 +327,9 @@ public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTa
break;
}
}
if (ObjectUtil.isNotEmpty(reqVO.getSampleReceiveTime()) && reqVO.getSampleReceiveTime().length == 2) {
mpjLambdaWrapper.between(BusinessSubSampleAnalysisGroupDO::getSampleReceiveTime, reqVO.getSampleReceiveTime()[0], reqVO.getSampleReceiveTime()[1]);
}
mpjLambdaWrapper.eq(BusinessSubSampleAnalysisGroupDO::getSampleStatus, "已收样");//已收样
mpjLambdaWrapper.orderByAsc(BusinessAssayTaskDataDO::getBusinessSubSampleId).orderByAsc(BusinessAssayTaskDataDO::getReportTime);
@@ -213,6 +369,20 @@ public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTa
return selectList(new LambdaQueryWrapperX<BusinessAssayTaskDataDO>()
.eq(BusinessAssayTaskDataDO::getBusinessSubSampleId, businessSubSampleId));
}
/**
* 根据子样及分析部门查询分析任务
* @param businessSubSampleId 子样id
* @param assayDepartmentId 分析部门id
* @return
*/
default List<BusinessAssayTaskDataDO> selectByBusinessSubSampleIdAndAssayDepartmentId(Long businessSubSampleId, Long assayDepartmentId) {
return selectList(new LambdaQueryWrapperX<BusinessAssayTaskDataDO>()
.eq(BusinessAssayTaskDataDO::getBusinessSubSampleId, businessSubSampleId)
.eq(BusinessAssayTaskDataDO::getAssayDepartmentId, assayDepartmentId));
}
/**
* 根据子样查询分析任务

View File

@@ -49,7 +49,7 @@ public interface BusinessAssayTaskDetailMapper extends BaseMapperX<BusinessAssay
.eqIfPresent(BusinessAssayTaskDetailDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.betweenIfPresent(BusinessAssayTaskDetailDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(BusinessAssayTaskDetailDO::getRemark, reqVO.getRemark())
.orderByDesc(BusinessAssayTaskDetailDO::getId));
.orderByAsc(BusinessAssayTaskDetailDO::getSampleCode));
}
default List<BusinessAssayTaskDetailExtendRespVO> selectList(BusinessAssayTaskDetailReqVO reqVO) {
@@ -80,7 +80,7 @@ public interface BusinessAssayTaskDetailMapper extends BaseMapperX<BusinessAssay
.eqIfPresent(BusinessAssayTaskDetailDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.betweenIfPresent(BusinessAssayTaskDetailDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(BusinessAssayTaskDetailDO::getRemark, reqVO.getRemark())
.orderByDesc(BusinessAssayTaskDetailDO::getId));
.orderByAsc(BusinessAssayTaskDetailDO::getSampleCode));
}
default List<BusinessAssayTaskDetailDO> selectByBusinessAssayTaskId(Long businessAssayTaskId) {

View File

@@ -9,8 +9,6 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetai
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
import com.zt.plat.module.qms.enums.QmsCommonConstant;
import jakarta.validation.Valid;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import java.util.List;
@@ -31,6 +29,7 @@ public interface BusinessAssayTaskMapper extends BaseMapperX<BusinessAssayTaskDO
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessAssayTaskDO::getConfigAssayMethodId)
.selectAll(BusinessAssayTaskDO.class)
.selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskExtendRespVO::getConfigAssayMethodName)
.selectAs(ConfigAssayMethodDO::getMethodNameCategory, BusinessAssayTaskExtendRespVO::getConfigAssayMethodNameAndCategory)
.eqIfPresent(BusinessAssayTaskDO::getTaskNo, reqVO.getTaskNo())
.likeIfPresent(BusinessAssayTaskDO::getTaskName, reqVO.getTaskName())
.eqIfPresent(BusinessAssayTaskDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
@@ -38,18 +37,21 @@ public interface BusinessAssayTaskMapper extends BaseMapperX<BusinessAssayTaskDO
.eqIfPresent(BusinessAssayTaskDO::getConfigReportTemplateKey, reqVO.getConfigReportTemplateKey())
.eqIfPresent(BusinessAssayTaskDO::getTaskSourceType, reqVO.getTaskSourceType())
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignOperator, reqVO.getTaskAssignOperator())
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignOperatorId, reqVO.getTaskAssignOperatorId())
.betweenIfPresent(BusinessAssayTaskDO::getTaskAssignTime, reqVO.getTaskAssignTime())
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignStatus, reqVO.getTaskAssignStatus())
.betweenIfPresent(BusinessAssayTaskDO::getTaskAssignSubmitTime, reqVO.getTaskAssignSubmitTime())
.eqIfPresent(BusinessAssayTaskDO::getIsIngredients, reqVO.getIsIngredients())
.eqIfPresent(BusinessAssayTaskDO::getIngredientsStatus, reqVO.getIngredientsStatus())
.eqIfPresent(BusinessAssayTaskDO::getAssayOperator, reqVO.getAssayOperator())
.eqIfPresent(BusinessAssayTaskDO::getAssayOperatorId, reqVO.getAssayOperatorId())
.betweenIfPresent(BusinessAssayTaskDO::getAssayTime, reqVO.getAssayTime())
.betweenIfPresent(BusinessAssayTaskDO::getAssaySubmitTime, reqVO.getAssaySubmitTime())
.eqIfPresent(BusinessAssayTaskDO::getTaskAssayStatus, reqVO.getTaskAssayStatus())
.inIfPresent(BusinessAssayTaskDO::getTaskAssayStatus, reqVO.getTaskAssayStatusList())
.betweenIfPresent(BusinessAssayTaskDO::getReportTime, reqVO.getReportTime())
.eqIfPresent(BusinessAssayTaskDO::getReportOperator, reqVO.getReportOperator())
.eqIfPresent(BusinessAssayTaskDO::getReportOperatorId, reqVO.getReportOperatorId())
.betweenIfPresent(BusinessAssayTaskDO::getTaskFinishTime, reqVO.getTaskFinishTime())
.eqIfPresent(BusinessAssayTaskDO::getFlowInstanceId, reqVO.getFlowInstanceId())
.eqIfPresent(BusinessAssayTaskDO::getFormDataCollectionId, reqVO.getFormDataCollectionId())
@@ -72,6 +74,7 @@ public interface BusinessAssayTaskMapper extends BaseMapperX<BusinessAssayTaskDO
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessAssayTaskDO::getConfigAssayMethodId)
.selectAll(BusinessAssayTaskDO.class)
.selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskExtendRespVO::getConfigAssayMethodName)
.selectAs(ConfigAssayMethodDO::getMethodNameCategory, BusinessAssayTaskExtendRespVO::getConfigAssayMethodNameAndCategory)
.eqIfPresent(BusinessAssayTaskDO::getTaskNo, reqVO.getTaskNo())
.likeIfPresent(BusinessAssayTaskDO::getTaskName, reqVO.getTaskName())
.eqIfPresent(BusinessAssayTaskDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
@@ -79,18 +82,21 @@ public interface BusinessAssayTaskMapper extends BaseMapperX<BusinessAssayTaskDO
.eqIfPresent(BusinessAssayTaskDO::getConfigReportTemplateKey, reqVO.getConfigReportTemplateKey())
.eqIfPresent(BusinessAssayTaskDO::getTaskSourceType, reqVO.getTaskSourceType())
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignOperator, reqVO.getTaskAssignOperator())
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignOperatorId, reqVO.getTaskAssignOperatorId())
.betweenIfPresent(BusinessAssayTaskDO::getTaskAssignTime, reqVO.getTaskAssignTime())
.eqIfPresent(BusinessAssayTaskDO::getTaskAssignStatus, reqVO.getTaskAssignStatus())
.betweenIfPresent(BusinessAssayTaskDO::getTaskAssignSubmitTime, reqVO.getTaskAssignSubmitTime())
.eqIfPresent(BusinessAssayTaskDO::getIsIngredients, reqVO.getIsIngredients())
.eqIfPresent(BusinessAssayTaskDO::getIngredientsStatus, reqVO.getIngredientsStatus())
.eqIfPresent(BusinessAssayTaskDO::getAssayOperator, reqVO.getAssayOperator())
.eqIfPresent(BusinessAssayTaskDO::getAssayOperatorId, reqVO.getAssayOperatorId())
.betweenIfPresent(BusinessAssayTaskDO::getAssayTime, reqVO.getAssayTime())
.betweenIfPresent(BusinessAssayTaskDO::getAssaySubmitTime, reqVO.getAssaySubmitTime())
.eqIfPresent(BusinessAssayTaskDO::getTaskAssayStatus, reqVO.getTaskAssayStatus())
.inIfPresent(BusinessAssayTaskDO::getTaskAssayStatus, reqVO.getTaskAssayStatusList())
.betweenIfPresent(BusinessAssayTaskDO::getReportTime, reqVO.getReportTime())
.eqIfPresent(BusinessAssayTaskDO::getReportOperator, reqVO.getReportOperator())
.eqIfPresent(BusinessAssayTaskDO::getReportOperatorId, reqVO.getReportOperatorId())
.betweenIfPresent(BusinessAssayTaskDO::getTaskFinishTime, reqVO.getTaskFinishTime())
.eqIfPresent(BusinessAssayTaskDO::getFlowInstanceId, reqVO.getFlowInstanceId())
.eqIfPresent(BusinessAssayTaskDO::getFormDataCollectionId, reqVO.getFormDataCollectionId())
@@ -132,6 +138,7 @@ public interface BusinessAssayTaskMapper extends BaseMapperX<BusinessAssayTaskDO
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessAssayTaskDO::getConfigAssayMethodId)
.selectAll(BusinessAssayTaskDO.class)
.selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskExtendRespVO::getConfigAssayMethodName)
.selectAs(ConfigAssayMethodDO::getMethodNameCategory, BusinessAssayTaskExtendRespVO::getConfigAssayMethodNameAndCategory)
.eq(BusinessAssayTaskDO::getId, id));
}

View File

@@ -47,7 +47,10 @@ public interface BusinessHandoverRecordSubMapper extends BaseMapperX<BusinessHan
.eqIfPresent(BusinessHandoverRecordSubDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
.betweenIfPresent(BusinessHandoverRecordSubDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(BusinessHandoverRecordSubDO::getRemark, reqVO.getRemark())
.eqIfPresent(BusinessHandoverRecordSubDO::getDeptId, reqVO.getDeptId())
.eqIfPresent(BusinessSubSampleDO::getSampleAssayCode, reqVO.getSampleAssayCode())
.eqIfPresent(BusinessSubSampleDO::getSampleReturnCode, reqVO.getSampleReturnCode())
.likeIfPresent(BusinessSubSampleDO::getSampleName, reqVO.getSampleName())
.eqIfPresent(BusinessHandoverRecordSubDO::getDeptId, reqVO.getDeptId())
.orderByDesc(BusinessHandoverRecordSubDO::getCreateTime));
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -82,6 +82,44 @@ public interface BusinessSampleEntrustDetailMapper extends BaseMapperX<BusinessS
default List<BusinessSampleEntrustDetailDO> selectByBusinessSampleEntrustRegistrationId(Long businessSampleEntrustRegistrationId) {
return selectList(new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>().eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, businessSampleEntrustRegistrationId));
}
default List<BusinessSampleEntrustDetailExtendRespVO> selectExtendByBusinessSampleEntrustRegistrationId(Long businessSampleEntrustRegistrationId) {
return selectJoinList(BusinessSampleEntrustDetailExtendRespVO.class, new MPJLambdaWrapperX<BusinessSampleEntrustDetailDO>()
.leftJoin(BaseSampleDO.class, BaseSampleDO::getId, BusinessSampleEntrustDetailDO::getBaseSampleId)
.selectAll(BusinessSampleEntrustDetailDO.class)
.selectAs(BaseSampleDO::getDictionaryBusinessKey, BusinessSampleEntrustDetailExtendRespVO::getSampleTypeDictionaryBusinessKey)
.eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, businessSampleEntrustRegistrationId));
}
default List<BusinessSampleEntrustDetailDO> selectByBusinessSampleEntrustRegistrationIds(List<Long> businessSampleEntrustRegistrationIds) {
return selectList(new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>().in(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, businessSampleEntrustRegistrationIds));
}
default BusinessSampleEntrustDetailDO selectByBusinessBaseSampleId(Long businessBaseSampleId) {
return selectOne(new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>().eq(BusinessSampleEntrustDetailDO::getBusinessBaseSampleId, businessBaseSampleId));
}
default List<BusinessSampleEntrustDetailDO> selectByBusinessBaseSampleIds(List<Long> businessBaseSampleIds) {
return selectList(new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>().in(BusinessSampleEntrustDetailDO::getBusinessBaseSampleId, businessBaseSampleIds));
}
/**
* 查询当前批次的第一条数据
* @param businessBaseSampleId 任意一条的主样id
* @param baseSampleDictionaryBusinessKey 样品大类类型key
* @return
*/
default BusinessSampleEntrustDetailDO selectCurrBatchFirstByBusinessBaseSampleIdAndBaseSampleDictionaryBusinessKey(Long businessBaseSampleId, String baseSampleDictionaryBusinessKey) {
BusinessSampleEntrustDetailDO businessSampleEntrustDetailDO = selectByBusinessBaseSampleId(businessBaseSampleId);
//查询当前委托的第一条
return selectJoinOne(BusinessSampleEntrustDetailDO.class, new MPJLambdaWrapperX<BusinessSampleEntrustDetailDO>()
.leftJoin(BaseSampleDO.class, BaseSampleDO::getId, BusinessSampleEntrustDetailDO::getBaseSampleId)
.eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, businessSampleEntrustDetailDO.getBusinessSampleEntrustRegistrationId())
.eq(BaseSampleDO::getDictionaryBusinessKey, baseSampleDictionaryBusinessKey)
.orderByAsc(BusinessSampleEntrustDetailDO::getSort)
.last(" limit 1 "));
}
/**
* 物理批量删除删除

View File

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

View File

@@ -4,8 +4,10 @@ import java.util.*;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
import com.zt.plat.module.qms.business.bus.controller.vo.*;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleAssessmentDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper;
@@ -34,6 +36,12 @@ public interface BusinessSubParentSampleAssessmentMapper extends BaseMapperX<Bus
.eqIfPresent(BusinessSubParentSampleAssessmentDO::getRemark, reqVO.getRemark())
.orderByDesc(BusinessSubParentSampleAssessmentDO::getId));
}
default List<BusinessSubParentSampleAssessmentDO> selectByBusinessSubParentSampleIds(List<Long> businessSubParentSampleIds) {
return selectJoinList(BusinessSubParentSampleAssessmentDO.class, new MPJLambdaWrapperX<BusinessSubParentSampleAssessmentDO>()
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessSubParentSampleAssessmentDO::getConfigAssayMethodId)
.in(BusinessSubParentSampleAssessmentDO::getBusinessSubParentSampleId, businessSubParentSampleIds));
}
default BusinessSubParentSampleAssessmentDO selectByBusinessSubParentSampleIdAndConfigAssayMethodId(Long businessSubParentSampleId, Long configAssayMethodId) {
return selectOne(new LambdaQueryWrapperX<BusinessSubParentSampleAssessmentDO>()
@@ -48,4 +56,12 @@ public interface BusinessSubParentSampleAssessmentMapper extends BaseMapperX<Bus
.eq(BusinessSubParentSampleAssessmentDO::getConfigAssayMethodId, configAssayMethodId));
}
default List<BusinessSubParentSampleAssessmentDO> selectByBusinessSubParentSampleIdsAndAssayDepartmentId(List<Long> businessSubParentSampleIds,
Long assayDepartmentId) {
return selectJoinList(BusinessSubParentSampleAssessmentDO.class, new MPJLambdaWrapperX<BusinessSubParentSampleAssessmentDO>()
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessSubParentSampleAssessmentDO::getConfigAssayMethodId)
.in(BusinessSubParentSampleAssessmentDO::getBusinessSubParentSampleId, businessSubParentSampleIds)
.eq(ConfigAssayMethodDO::getAssayDepartmentId, assayDepartmentId));
}
}

View File

@@ -49,7 +49,7 @@ public interface BusinessSubParentSampleAssessmentProjectMapper extends BaseMapp
.orderByDesc(BusinessSubParentSampleAssessmentProjectDO::getId));
}
default List<BusinessSubParentSampleAssessmentProjectExtendRespVO> selectByBusinessSubParentSampleIdAndConfigAssayMethodId(List<Long> businessSubParentSampleIds, Long configAssayMethodId) {
default List<BusinessSubParentSampleAssessmentProjectExtendRespVO> selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(List<Long> businessSubParentSampleIds, Long configAssayMethodId) {
return selectJoinList(BusinessSubParentSampleAssessmentProjectExtendRespVO.class, new MPJLambdaWrapperX<BusinessSubParentSampleAssessmentProjectDO>()
.leftJoin(ConfigAssayMethodProjectDO.class, ConfigAssayMethodProjectDO::getId, BusinessSubParentSampleAssessmentProjectDO::getConfigAssayMethodProjectId)
.leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessSubParentSampleAssessmentProjectDO::getDictionaryProjectId)
@@ -69,7 +69,7 @@ public interface BusinessSubParentSampleAssessmentProjectMapper extends BaseMapp
.eq(BusinessSubParentSampleAssessmentProjectDO::getConfigAssayMethodId, configAssayMethodId));
}
List<NoReportSubParentSampleAssessmentRespVO> selectNoReportSubParentSampleAssessment(@Param("configAssayMethodId") Long configAssayMethodId);
List<NoReportSubParentSampleAssessmentRespVO> selectNoReportSubParentSampleAssessment(@Param("reqVO") BusinessSubParentSampleAssessmentGroupReqVO reqVO);
List<RecheckSubSampleParentMethodRespVO> getRecheckAssayMethodList(@Param("baseSampleId") Long baseSampleId, @Param("businessSubParentSampleId") Long businessSubParentSampleId, @Param("configAssayMethodId") Long configAssayMethodId);

View File

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

View File

@@ -27,6 +27,7 @@ public interface BusinessSubSampleAnalysisGroupMapper extends BaseMapperX<Busine
.eqIfPresent(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
.likeIfPresent(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
.eqIfPresent(BusinessSubSampleAnalysisGroupDO::getSampleStatus, reqVO.getSampleStatus())
.eqIfPresent(BusinessSubSampleAnalysisGroupDO::getIsSend, reqVO.getIsSend())
.eqIfPresent(BusinessSubSampleAnalysisGroupDO::getSampleReceiver, reqVO.getSampleReceiver())
.betweenIfPresent(BusinessSubSampleAnalysisGroupDO::getSampleReceiveTime, reqVO.getSampleReceiveTime())
.eqIfPresent(BusinessSubSampleAnalysisGroupDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
@@ -46,6 +47,12 @@ public interface BusinessSubSampleAnalysisGroupMapper extends BaseMapperX<Busine
.in(BusinessSubSampleAnalysisGroupDO::getBusinessSubParentSampleId, businessSubParentSampleIds));
}
default List<BusinessSubSampleAnalysisGroupDO> selectByBusinessSubParentSampleIdsAndAssayDepartmentId(List<Long> businessSubParentSampleIds, Long assayDepartmentId) {
return selectList(new LambdaQueryWrapperX<BusinessSubSampleAnalysisGroupDO>()
.in(BusinessSubSampleAnalysisGroupDO::getBusinessSubParentSampleId, businessSubParentSampleIds)
.eq(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentId, assayDepartmentId));
}
default List<BusinessSubSampleAnalysisGroupDO> selectByBusinessSubSampleId(Long businessSubSampleId) {
return selectList(new LambdaQueryWrapperX<BusinessSubSampleAnalysisGroupDO>()
.eq(BusinessSubSampleAnalysisGroupDO::getBusinessSubSampleId, businessSubSampleId));
@@ -61,5 +68,11 @@ public interface BusinessSubSampleAnalysisGroupMapper extends BaseMapperX<Busine
.in(BusinessSubSampleAnalysisGroupDO::getBusinessSubSampleId, businessSubSampleIds)
.eq(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentId, assayDepartmentId));
}
default BusinessSubSampleAnalysisGroupDO selectByBusinessSubSampleIdAndAssayDepartmentId(Long businessSubSampleId, Long assayDepartmentId) {
return selectOne(new LambdaQueryWrapperX<BusinessSubSampleAnalysisGroupDO>()
.eq(BusinessSubSampleAnalysisGroupDO::getBusinessSubSampleId, businessSubSampleId)
.eq(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentId, assayDepartmentId));
}
}

View File

@@ -63,6 +63,7 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
.eqIfPresent(BusinessSubSampleDO::getLastBalanceCode, reqVO.getLastBalanceCode())
.eqIfPresent(BusinessSubSampleDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId())
.eqIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey())
.inIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKeyList())
.betweenIfPresent(BusinessSubSampleDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime())
.eqIfPresent(BusinessSubSampleDO::getNextSampleFlowNode, reqVO.getNextSampleFlowNode())
.eqIfPresent(BusinessSubSampleDO::getSampleStatus, reqVO.getSampleStatus())
@@ -118,6 +119,7 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
.eqIfPresent(BusinessSubSampleDO::getLastBalanceCode, reqVO.getLastBalanceCode())
.eqIfPresent(BusinessSubSampleDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId())
.eqIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey())
.inIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKeyList())
.betweenIfPresent(BusinessSubSampleDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime())
.eqIfPresent(BusinessSubSampleDO::getNextSampleFlowNode, reqVO.getNextSampleFlowNode())
.eqIfPresent(BusinessSubSampleDO::getSampleStatus, reqVO.getSampleStatus())
@@ -142,8 +144,8 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
.eqIfPresent(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentId, reqVO.getAssayDepartmentId())
.eqIfPresent(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentName, reqVO.getAssayDepartmentName())
.eqIfPresent(BusinessSubSampleAnalysisGroupDO::getSampleStatus, reqVO.getAssayDepartmentStatus())
.orderByAsc(BusinessSubSampleDO::getSampleCode)
);
.eqIfPresent(BusinessSubSampleAnalysisGroupDO::getIsSend, reqVO.getIsSendSample())
.orderByDesc(BusinessSubSampleDO::getSampleFlowNodeTime).orderByAsc(BusinessSubSampleDO::getSampleCode));
}
default List<BusinessSubSampleExtendRespVO> selectList(@Valid BusinessSubSampleReqVO reqVO) {
@@ -171,6 +173,7 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
.eqIfPresent(BusinessSubSampleDO::getLastBalanceCode, reqVO.getLastBalanceCode())
.eqIfPresent(BusinessSubSampleDO::getConfigSampleFlowId, reqVO.getConfigSampleFlowId())
.eqIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey())
.inIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKeyList())
.betweenIfPresent(BusinessSubSampleDO::getSampleFlowNodeTime, reqVO.getSampleFlowNodeTime())
.eqIfPresent(BusinessSubSampleDO::getNextSampleFlowNode, reqVO.getNextSampleFlowNode())
.eqIfPresent(BusinessSubSampleDO::getSampleStatus, reqVO.getSampleStatus())
@@ -203,6 +206,7 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
.selectAs(DictionaryBusinessDO::getName, BusinessSubSampleExtendRespVO::getDictionaryBusinessName)
.selectAs(ConfigSubSampleDO::getIsPrint, BusinessSubSampleExtendRespVO::getIsPrint)
.selectAs(ConfigSubSampleDO::getPrintTemplate, BusinessSubSampleExtendRespVO::getPrintTemplate)
.selectAs(ConfigSubSampleDO::getCodePrintQuantity, BusinessSubSampleExtendRespVO::getCodePrintQuantity)
.eq(BusinessSubSampleDO::getId, id)
.eq(BusinessSubSampleDO::getSampleStatus, QmsCommonConstant.NORMAL)
.eq(BusinessSubSampleDO::getIsEnabled, QmsCommonConstant.YES)
@@ -233,6 +237,7 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
.selectAs(ConfigSubSampleDO::getPrintTemplate, BusinessSubSampleExtendRespVO::getPrintTemplate)
.eqIfPresent(BusinessSubSampleDO::getSampleCode, reqVO.getSampleCode())
.eqIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKey())
.inIfPresent(BusinessSubSampleDO::getSampleFlowNodeKey, reqVO.getSampleFlowNodeKeyList())
.eqIfPresent(BusinessSubSampleDO::getSampleStatus, QmsCommonConstant.NORMAL)
.eqIfPresent(BusinessSubSampleDO::getIsEnabled, QmsCommonConstant.YES)
.orderByDesc(BusinessSubSampleDO::getId));

View File

@@ -6,14 +6,18 @@ import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
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 com.zt.plat.framework.common.exception.ServiceException;
import com.zt.plat.framework.tenant.core.context.TenantContextHolder;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayParameterDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayReportDataDO;
@@ -44,9 +48,11 @@ import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleAssessmen
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
import com.zt.plat.module.qms.business.bus.liteflow.param.SampleFlowInfo;
import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleEntrustContext;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodProjectExtendRespVO;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfAdd;
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfInfo;
import com.zt.plat.module.qms.business.config.dal.dataobject.BaseSampleDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectParameterDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigBaseSampleDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSampleFlowDO;
@@ -75,6 +81,13 @@ import com.zt.plat.module.qms.enums.QmsCommonConstant;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
/**
* 委检样 是否有来样品位S值, 是: 综合分析室分析配料元素,试金分析室获取分析的配料元素 不送往综合分析室配料时采用来样品位S值如果是必须含有Cu、S的则试金分析人员称样时估一个Cu品位进行配料。
*
* 商检分析样 这批样中第一个样品默认产生1个配料任务综合分析室分析最终这些配料元素对应到这批商检分析样的每一个试金样品的配料参数上
*
* 商检综合样 综合样除了杂质元素如果要分析Au、Ag单个样品综合分析室分析配料元素会单独生成1个任务这个结果匹配到综合样自身的试金任务的配料参数上
*/
@Slf4j
@LiteflowComponent(id = "sampleEntrustGenSampleDataCmp", name = "样品委托生成系统样品数据")
public class SampleEntrustGenSampleDataCmp extends NodeComponent {
@@ -178,47 +191,33 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
//样品来样品位
List<BusinessSampleAssayResultDO> sampleAssayResultList = sampleEntrustContext.getSampleAssayResultList();
//金银检测项目字典id列表
List<Long> auAgDictionaryProjectIdList = new ArrayList<>() {
private static final long serialVersionUID = 1L;
{
add(1000000000000000002L);
add(1000000000000000003L);
}};
//硫的检测项目字典id
Long sDictionaryProjectId = 1000000000000000004L;
//商检样品来源id
List<Long> sjEntrustSourceIdList = new ArrayList<>() {
private static final long serialVersionUID = 1L;
{
add(1000000000000000002L);//中铜国贸
}};
List<Long> baseSampleIdList = sampleEntrustDetailList.stream().map(m -> m.getBaseSampleId()).distinct().collect(Collectors.toList());
//样品大类列表
List<BaseSampleDO> baseSampleList = baseSampleMapper.selectList();
List<BaseSampleDO> baseSampleList = baseSampleMapper.selectByIds(baseSampleIdList);
//主样配置
List<ConfigBaseSampleDO> configBaseSampleList = configBaseSampleMapper.selectList();
List<ConfigBaseSampleDO> configBaseSampleList = configBaseSampleMapper.selectByBaseSampleIds(baseSampleIdList);
List<Long> configBaseSampleIdList = configBaseSampleList.stream().map(m -> m.getId()).collect(Collectors.toList());
//分样配置
List<ConfigSubSampleParentDO> configSubSampleParentList = configSubSampleParentMapper.selectList();
List<ConfigSubSampleParentDO> configSubSampleParentList = configSubSampleParentMapper.selectByBaseSampleIds(baseSampleIdList);
//子样配置
List<ConfigSubSampleDO> configSubSampleList = configSubSampleMapper.selectList();
List<ConfigSubSampleDO> configSubSampleList = configSubSampleMapper.selectByBaseSampleIds(baseSampleIdList);
List<Long> configSubSampleIdList = configSubSampleList.stream().map(m -> m.getId()).collect(Collectors.toList());
//子样分析方法配置
List<ConfigSubSampleMethodDO> configSubSampleMethodList = configSubSampleMethodMapper.selectList();
List<ConfigSubSampleMethodDO> configSubSampleMethodList = configSubSampleMethodMapper.selectByConfigSubSampleIds(configSubSampleIdList);
List<Long> configAssayMethodIdList = configSubSampleMethodList.stream().map(m -> m.getConfigAssayMethodId()).distinct().collect(Collectors.toList());
//分析方法配置
List<ConfigAssayMethodDO> configAssayMethodList = configAssayMethodMapper.selectList();
List<ConfigAssayMethodDO> configAssayMethodList = configAssayMethodMapper.selectByIds(configAssayMethodIdList);
//分析方法检测项目配置
List<ConfigAssayMethodProjectDO> configAssayMethodProjectList = configAssayMethodProjectMapper.selectList();
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectList = configAssayMethodProjectMapper.selectByConfigAssayMethodIds(configAssayMethodIdList);
//分析方法检测项目参数配置
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterList = configAssayMethodProjectParameterMapper.selectList();
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterList = configAssayMethodProjectParameterMapper.selectByConfigAssayMethodIds(configAssayMethodIdList);
//检测项目字典
List<DictionaryProjectDO> dictionaryProjectList = dictionaryProjectMapper.selectList();
//主样报表配置
List<ConfigSampleReportDO> configSampleReportList = configSampleReportMapper.selectList();
List<ConfigSampleReportDO> configSampleReportList = configSampleReportMapper.selectByConfigBaseSampleIds(configBaseSampleIdList);
//样品流程配置
List<String> configSampleFlowKeyList = new ArrayList<>();
@@ -249,13 +248,6 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
//分析报表数据
List<BusinessAssayReportDataDO> businessAssayReportDataDOList = new ArrayList<>();
//是否为商检委托
Boolean isSjEntrust = sjEntrustSourceIdList.contains(sampleEntrustRegistration.getConfigEntrustSourceId());
//是否分析金银
Boolean isAssayAuAg = sampleEntrustProjectList.stream().anyMatch(f -> auAgDictionaryProjectIdList.contains(f.getDictionaryProjectId()));
//是否分析硫
Boolean isAssayS = sampleEntrustProjectList.stream().anyMatch(f -> f.getDictionaryProjectId().equals(sDictionaryProjectId));
//子样流转信息列表
List<SampleFlowInfo> sampleFlowInfoList = new ArrayList<>();
@@ -263,11 +255,19 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
List<BusinessSampleEntrustDetailDO> sampleEntrustDetailListSort = sampleEntrustDetailList.stream().sorted(Comparator.comparingInt(BusinessSampleEntrustDetailDO::getSort)).collect(Collectors.toList());
//主样
BusinessBaseSampleDO businessBaseSampleDO = null;
int sort = 0;//委托明细顺序
int sjfxyOne = -1;//商检分析样第一个是值为0已经过商检分析样的值为1默认值为-1
for (BusinessSampleEntrustDetailDO businessSampleEntrustDetailDO : sampleEntrustDetailListSort) {//委托样品明细
//样品大类
BaseSampleDO baseSampleDO = baseSampleList.stream().filter(f -> f.getId().equals(businessSampleEntrustDetailDO.getBaseSampleId())).findFirst().orElse(null);
if (QmsCommonConstant.ENTRUST_INSPECTION_ANALYSIS_SAMPLE.equals(baseSampleDO.getDictionaryBusinessKey())){//如果是商检分析样
if (sjfxyOne == -1) {
sjfxyOne = 0;//第一个商检分析样
} else {
sjfxyOne = 1;//商检分析样已添加过
}
}
//获取当前样品的检测项目
List<BusinessSampleEntrustProjectDO> sampleEntrustProjectDOList = sampleEntrustProjectList.stream().filter(f -> businessSampleEntrustDetailDO.getId().equals(f.getBusinessSampleEntrustDetailId())).collect(Collectors.toList());
@@ -282,42 +282,17 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
List<MaterialAssayStandardMethodDO> materialAssayStandardMethodList = sampleEntrustContext.getMaterialAssayStandardMethodDefaultByMaterialAssayStandardDetailIds(materialAssayStandardDetailIdList);
//获取检测方法
List<Long> configAssayMethodIdList = materialAssayStandardMethodList.stream().map(m -> m.getConfigAssayMethodId()).distinct().collect(Collectors.toList());
List<Long> materialAssayStandardConfigAssayMethodIdList = materialAssayStandardMethodList.stream().map(m -> m.getConfigAssayMethodId()).distinct().collect(Collectors.toList());
//查找子样配置
List<Long> configSubSampleIdList = configSubSampleMethodList.stream().filter(f -> f.getIsDefaultUse().equals(QmsCommonConstant.YES) && configAssayMethodIdList.contains(f.getConfigAssayMethodId())).map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
//查找当前委托明细分析的子样配置
List<Long> currentConfigSubSampleIdList = configSubSampleMethodList.stream().filter(f -> f.getIsDefaultUse().equals(QmsCommonConstant.YES) && materialAssayStandardConfigAssayMethodIdList.contains(f.getConfigAssayMethodId())).map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
//查询当前委托样品对应的子样
List<ConfigSubSampleDO> entrustConfigSubSampleList = configSubSampleList.stream().filter(f -> configSubSampleIdList.contains(f.getId()) && f.getBaseSampleId().equals(businessSampleEntrustDetailDO.getBaseSampleId())).distinct().collect(Collectors.toList());
List<ConfigSubSampleDO> entrustConfigSubSampleList = configSubSampleList.stream().filter(f -> currentConfigSubSampleIdList.contains(f.getId()) && f.getBaseSampleId().equals(businessSampleEntrustDetailDO.getBaseSampleId())).distinct().collect(Collectors.toList());
if (entrustConfigSubSampleList.size() != 1) {
throw new ServiceException(1_032_100_000, "子样配置不正确");
}
//是否创建综合样S分析
Boolean isCreateZhy = false;
//综合样分析方法
ConfigAssayMethodDO configAssayMethodZhy = null;
//是商检样品,分析金银,第一个样品
if (isSjEntrust && isAssayAuAg && sort == 0) {
//是否分析硫
isAssayS = dictionaryProjectIdList.contains(sDictionaryProjectId);
if (isAssayS) {
isCreateZhy = false;
} else {
isCreateZhy = true;
MaterialAssayStandardMethodDO materialAssayStandardMethodDO = materialAssayStandardMethodMapper.selectByBaseSampleIdAndDictionaryProjectId(businessSampleEntrustDetailDO.getBaseSampleId(), sDictionaryProjectId);
if (materialAssayStandardMethodDO == null) {
throw new ServiceException(1_032_100_000, "商检样品检测项目存在金银但未找到S配置");
}
configAssayMethodZhy = configAssayMethodMapper.selectById(materialAssayStandardMethodDO.getConfigAssayMethodId());
}
}
//获取到子样配置
ConfigSubSampleDO configSubSample = entrustConfigSubSampleList.get(0);
Long configSubSampleParentId = configSubSample.getConfigSubSampleParentId();
@@ -432,14 +407,72 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
//子样对应的分析班组
BusinessSubSampleAnalysisGroupDO businessSubSampleAnalysisGroupDO = null;
for (Long configAssayMethodId : configAssayMethodIdList) {
for (Long configAssayMethodId : materialAssayStandardConfigAssayMethodIdList) {
//查询分析方法
ConfigAssayMethodDO configAssayMethodDO = configAssayMethodList.stream().filter(f -> f.getId().equals(configAssayMethodId)).findFirst().orElse(null);
//查询子样对应的分析方法
ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodList.stream().filter(f -> f.getIsDefaultUse().equals(QmsCommonConstant.YES) && f.getConfigAssayMethodId().equals(configAssayMethodId) && f.getConfigSubSampleId().equals(configSubSample.getId())).findFirst().orElse(null);
//扩展配置信息
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
if (StringUtils.isNotBlank(configInfomation)) {
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
ConfigSubSampleMethodConfAdd addAssayTask = configSubSampleMethodConfInfo.getAddAssayTask();
if (addAssayTask != null) {//需要添加任务
List<Long> conditionProjectIdList = addAssayTask.getConditionProjectIdList();
Long methodId = addAssayTask.getMethodId();
List<Long> projectIdList = addAssayTask.getProjectIdList();
//判定检测项目包含条件中的检测项目
Boolean isAssayConditionProjectList = sampleEntrustProjectList.stream().anyMatch(f -> conditionProjectIdList.contains(f.getDictionaryProjectId()));
//是否预报S值
Boolean isForecastS = false;
String forecastResult = businessSampleEntrustDetailDO.getForecastResult();
if (StringUtils.isNotBlank(forecastResult)) {
JSONArray array = JSON.parseArray(forecastResult);
for (int i = 0; i < array.size(); i++) {
JSONObject item = array.getJSONObject(i);
if ("S".equals(item.getString("simpleName"))) {
isForecastS = true;
break;
}
}
}
//如果是商检样分析,且为第一个商检分析样,并且包含要检测的项目,
if (QmsCommonConstant.ENTRUST_INSPECTION_ANALYSIS_SAMPLE.equals(baseSampleDO.getDictionaryBusinessKey()) && isAssayConditionProjectList && sjfxyOne == 0) {
addAssayTask(currentDateTime, configSubSampleMethodList, configAssayMethodProjectList,
configAssayMethodProjectParameterList, dictionaryProjectList,
businessSubParentSampleAssessmentDOList, businessSubSampleAnalysisGroupDOList,
businessSubSampleAssessmentDOList, businessAssayTaskDataDOList,
businessAssayProjectDataDOList, businessAssayParameterDataDOList, configSubSample,
configSampleFlowSub, sampleFlowNodeSub, businessSubSampleDO, methodId,
projectIdList);
} else if (QmsCommonConstant.ENTRUST_COMPREHENSIVE_INSPECTION_SAMPLE.equals(baseSampleDO.getDictionaryBusinessKey()) && isAssayConditionProjectList) {//如果是商检综合样,并且包含需检查的项目
addAssayTask(currentDateTime, configSubSampleMethodList, configAssayMethodProjectList,
configAssayMethodProjectParameterList, dictionaryProjectList,
businessSubParentSampleAssessmentDOList, businessSubSampleAnalysisGroupDOList,
businessSubSampleAssessmentDOList, businessAssayTaskDataDOList,
businessAssayProjectDataDOList, businessAssayParameterDataDOList, configSubSample,
configSampleFlowSub, sampleFlowNodeSub, businessSubSampleDO, methodId,
projectIdList);
} else if (QmsCommonConstant.ENTRUST_COMMISSION_INSPECTION_SAMPLE.equals(baseSampleDO.getDictionaryBusinessKey()) && isAssayConditionProjectList && !isForecastS ) {//如果是委检样包含检测项目未预报S值
addAssayTask(currentDateTime, configSubSampleMethodList, configAssayMethodProjectList,
configAssayMethodProjectParameterList, dictionaryProjectList,
businessSubParentSampleAssessmentDOList, businessSubSampleAnalysisGroupDOList,
businessSubSampleAssessmentDOList, businessAssayTaskDataDOList,
businessAssayProjectDataDOList, businessAssayParameterDataDOList, configSubSample,
configSampleFlowSub, sampleFlowNodeSub, businessSubSampleDO, methodId,
projectIdList);
}
}
}
//分析班组
businessSubSampleAnalysisGroupDO = businessSubSampleAnalysisGroupDOList.stream().filter(f -> f.getBusinessSubSampleId().equals(businessSubSampleDO.getId()) && f.getAssayDepartmentId().equals(configAssayMethodDO.getAssayDepartmentId())).findFirst().orElse(null);
if (businessSubSampleAnalysisGroupDO == null) {
businessSubSampleAnalysisGroupDO = new BusinessSubSampleAnalysisGroupDO();
@@ -482,7 +515,7 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
//根据检测方法循环
BusinessAssayTaskDataDO businessAssayTaskDataDO = null;
//根据任务数循环
for (int i = 0; i < configSubSampleMethodDO.getTaskCount(); i++) {
for (int i = 0; i < configSubSampleMethodDO.getTaskCount(); i++) {
//子样检测任务
businessAssayTaskDataDO = new BusinessAssayTaskDataDO();
businessAssayTaskDataDO.setId(IdWorker.getId());
@@ -500,11 +533,11 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
businessAssayTaskDataDO.setAssayDepartmentName(configAssayMethodDO.getAssayDepartmentName());
List<ConfigAssayMethodProjectDO> configAssayMethodProjectDOList = configAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId)).collect(Collectors.toList());
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectDOList = configAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId)).collect(Collectors.toList());
StringBuilder assayProjectBuilder = new StringBuilder();
for (ConfigAssayMethodProjectDO configAssayMethodProjectDO : configAssayMethodProjectDOList) {
for (ConfigAssayMethodProjectExtendRespVO configAssayMethodProjectDO : configAssayMethodProjectDOList) {
//如果当前分析方法的项目不在当前检测项目中,则跳出循环继续
if (!dictionaryProjectIdList.contains(configAssayMethodProjectDO.getDictionaryProjectId())) {
@@ -523,9 +556,6 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
businessAssayProjectDataDO.setDataType(configAssayMethodProjectDO.getDataType());
businessAssayProjectDataDO.setDecimalPosition(configAssayMethodProjectDO.getDecimalPosition());
businessAssayProjectDataDO.setUsage(QmsCommonConstant.ASSAY_PROJECT_USAGE_REPORT);
if (isSjEntrust && isAssayAuAg && sort == 0 && !isCreateZhy && sDictionaryProjectId.equals(configAssayMethodProjectDO.getDictionaryProjectId())) {//是商检样品分析金银第一个样品不创建综合样并且是S值
businessAssayProjectDataDO.setUsage(QmsCommonConstant.ASSAY_PROJECT_USAGE_INGREDIENT_REPORT);
}
businessAssayProjectDataDO.setMinimumLimitValue(configAssayMethodProjectDO.getMinimumLimitValue());
businessAssayProjectDataDO.setIsEnabled(1);
@@ -548,113 +578,21 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
}
}
assayProjectBuilder.delete(assayProjectBuilder.length() - 1 , assayProjectBuilder.length());
if (assayProjectBuilder.length() > 1) {
assayProjectBuilder.delete(assayProjectBuilder.length() - 1 , assayProjectBuilder.length());
}
businessAssayTaskDataDO.setAssayProject(assayProjectBuilder.toString());
businessAssayTaskDataDOList.add(businessAssayTaskDataDO);
}
}
//判定是商检 分析金银 需要创建综合样样品为第1个
if (isSjEntrust && isAssayAuAg && sort == 0 && isCreateZhy && configAssayMethodZhy != null) {
Long configAssayMethodIdZhy = configAssayMethodZhy.getId();
Long assayDepartmentIdZhy = configAssayMethodZhy.getAssayDepartmentId();
//查询子样对应的分析方法
ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodList.stream().filter(f -> f.getIsDefaultUse().equals(QmsCommonConstant.YES) && f.getConfigAssayMethodId().equals(configAssayMethodIdZhy) && f.getConfigSubSampleId().equals(configSubSample.getId())).findFirst().orElse(null);
businessSubSampleAnalysisGroupDO = businessSubSampleAnalysisGroupDOList.stream().filter(f -> f.getBusinessSubSampleId().equals(businessSubSampleDO.getId()) && f.getAssayDepartmentId().equals(assayDepartmentIdZhy)).findFirst().orElse(null);
if (businessSubSampleAnalysisGroupDO == null) {
businessSubSampleAnalysisGroupDO = new BusinessSubSampleAnalysisGroupDO();
businessSubSampleAnalysisGroupDO.setId(IdWorker.getId());
businessSubSampleAnalysisGroupDO.setBusinessBaseSampleId(businessSubSampleDO.getBusinessBaseSampleId());
businessSubSampleAnalysisGroupDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId());
businessSubSampleAnalysisGroupDO.setBusinessSubSampleId(businessSubSampleDO.getId());
businessSubSampleAnalysisGroupDO.setAssayDepartmentId(configAssayMethodZhy.getAssayDepartmentId());
businessSubSampleAnalysisGroupDO.setAssayDepartmentName(configAssayMethodZhy.getAssayDepartmentName());
businessSubSampleAnalysisGroupDO.setSampleStatus("待收样");
businessSubSampleAnalysisGroupDOList.add(businessSubSampleAnalysisGroupDO);
}
//根据任务数判断是平行还是
String assayType = configSubSampleMethodDO.getTaskCount() > 1 ? QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL : QmsCommonConstant.ASSAY_TYPE_SINGLE_CUP;
BusinessSubSampleAssessmentDO businessSubSampleAssessmentDO = new BusinessSubSampleAssessmentDO();
businessSubSampleAssessmentDO.setId(IdWorker.getId());
businessSubSampleAssessmentDO.setBusinessBaseSampleId(businessSubSampleDO.getBusinessBaseSampleId());
businessSubSampleAssessmentDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId());
businessSubSampleAssessmentDO.setBusinessSubSampleId(businessSubSampleDO.getId());
businessSubSampleAssessmentDO.setConfigAssayMethodId(configAssayMethodZhy.getId());
businessSubSampleAssessmentDO.setAssayType(assayType);
businessSubSampleAssessmentDO.setTaskType("常规");
businessSubSampleAssessmentDOList.add(businessSubSampleAssessmentDO);
//根据检测方法循环
BusinessAssayTaskDataDO businessAssayTaskDataDO = null;
//根据任务数循环
for (int i = 0; i < configSubSampleMethodDO.getTaskCount(); i++) {
//子样检测任务
businessAssayTaskDataDO = new BusinessAssayTaskDataDO();
businessAssayTaskDataDO.setId(IdWorker.getId());
businessAssayTaskDataDO.setBusinessBaseSampleId(businessSubSampleDO.getBusinessBaseSampleId());
businessAssayTaskDataDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId());
businessAssayTaskDataDO.setBusinessSubSampleId(businessSubSampleDO.getId());
businessAssayTaskDataDO.setBusinessSubSampleAssessmentId(businessSubSampleAssessmentDO.getId());//子样判定id
businessAssayTaskDataDO.setConfigAssayMethodId(configAssayMethodZhy.getId());
businessAssayTaskDataDO.setAssayType(assayType);
businessAssayTaskDataDO.setTaskType("常规");
businessAssayTaskDataDO.setConfigSampleFlowId(configSampleFlowSub.getId());
businessAssayTaskDataDO.setSampleFlowNodeKey(sampleFlowNodeSub.getNodeKey());
businessAssayTaskDataDO.setSampleFlowNodeTime(currentDateTime);
businessAssayTaskDataDO.setAssayDepartmentId(configAssayMethodZhy.getAssayDepartmentId());
businessAssayTaskDataDO.setAssayDepartmentName(configAssayMethodZhy.getAssayDepartmentName());
//查询S检测项目
ConfigAssayMethodProjectDO configAssayMethodProjectDO = configAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodIdZhy) && f.getDictionaryProjectId().equals(sDictionaryProjectId)).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.setUsage(QmsCommonConstant.ASSAY_PROJECT_USAGE_INGREDIENT);
businessAssayProjectDataDO.setMinimumLimitValue(configAssayMethodProjectDO.getMinimumLimitValue());
businessAssayProjectDataDO.setIsEnabled(1);
businessAssayProjectDataDO.setIsNotAssessment(0);
businessAssayProjectDataDOList.add(businessAssayProjectDataDO);
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterDOList = configAssayMethodProjectParameterList.stream().filter(f -> f.getConfigAssayMethodProjectId().equals(configAssayMethodProjectDO.getId())).collect(Collectors.toList());
for (ConfigAssayMethodProjectParameterDO configAssayMethodProjectParameterDO : configAssayMethodProjectParameterDOList) {
BusinessAssayParameterDataDO businessAssayParameterDataDO = new BusinessAssayParameterDataDO();
businessAssayParameterDataDO.setId(IdWorker.getId());
businessAssayParameterDataDO.setConfigAssayMethodProjectParameterId(configAssayMethodProjectParameterDO.getId());
businessAssayParameterDataDO.setBusinessAssayProjectDataId(businessAssayProjectDataDO.getId());
businessAssayParameterDataDO.setDictionaryParameterId(configAssayMethodProjectParameterDO.getDictionaryParameterId());
businessAssayParameterDataDO.setDataType(configAssayMethodProjectParameterDO.getDataType());
businessAssayParameterDataDO.setDecimalPosition(configAssayMethodProjectParameterDO.getDecimalPosition());
businessAssayParameterDataDOList.add(businessAssayParameterDataDO);
}
businessAssayTaskDataDO.setAssayProject("S");
businessAssayTaskDataDOList.add(businessAssayTaskDataDO);
}
}
sort++;
}
sampleEntrustRegistration.setRegistrationStatus(QmsCommonConstant.SUBMITTED);
sampleEntrustRegistration.setAssayStatus(QmsCommonConstant.UNCHECKED);
sampleEntrustRegistration.setDataStatus(QmsCommonConstant.UNRETURNED);
sampleEntrustRegistration.setTaskQuantity(businessAssayTaskDataDOList.size());
sampleEntrustContext.setSampleFlowInfoList(sampleFlowInfoList);
@@ -669,45 +607,165 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
businessSampleAssayResultMapper.updateBatch(sampleAssayResultList);
}
if (CollUtil.isNotEmpty(businessBaseSampleDOList)) {
log.info("插入 businessBaseSampleDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessBaseSampleMapper.insertBatch(businessBaseSampleDOList);
}
if (CollUtil.isNotEmpty(businessSubParentSampleDOList)) {
log.info("插入 businessSubParentSampleDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessSubParentSampleMapper.insertBatch(businessSubParentSampleDOList);
}
if (CollUtil.isNotEmpty(businessSubParentSampleAssessmentDOList)) {
log.info("插入 businessSubParentSampleAssessmentDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessSubParentSampleAssessmentMapper.insertBatch(businessSubParentSampleAssessmentDOList);
}
if (CollUtil.isNotEmpty(businessSubSampleDOList)) {
log.info("插入 businessSubSampleDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessSubSampleMapper.insertBatch(businessSubSampleDOList);
}
if (CollUtil.isNotEmpty(businessSubSampleAnalysisGroupDOList)) {
log.info("插入 businessSubSampleAnalysisGroupDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessSubSampleAnalysisGroupMapper.insertBatch(businessSubSampleAnalysisGroupDOList);
}
if (CollUtil.isNotEmpty(businessSubSampleAssessmentDOList)) {
log.info("插入 businessSubSampleAssessmentDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessSubSampleAssessmentMapper.insertBatch(businessSubSampleAssessmentDOList);
}
if (CollUtil.isNotEmpty(businessAssayTaskDataDOList)) {
log.info("插入 businessAssayTaskDataDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessAssayTaskDataMapper.insertBatch(businessAssayTaskDataDOList);
}
if (CollUtil.isNotEmpty(businessAssayProjectDataDOList)) {
log.info("插入 businessAssayProjectDataDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessAssayProjectDataMapper.insertBatch(businessAssayProjectDataDOList);
}
if (CollUtil.isNotEmpty(businessAssayParameterDataDOList)) {
log.info("插入 businessAssayParameterDataDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessAssayParameterDataMapper.insertBatch(businessAssayParameterDataDOList);
}
if (CollUtil.isNotEmpty(businessAssayReportDataDOList)) {
log.info("插入 businessAssayReportDataDOList 前 tenant_id = {}", TenantContextHolder.getTenantId());
businessAssayReportDataMapper.insertBatch(businessAssayReportDataDOList);
}
}
private void addAssayTask(LocalDateTime currentDateTime, List<ConfigSubSampleMethodDO> configSubSampleMethodList,
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectList,
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterList,
List<DictionaryProjectDO> dictionaryProjectList,
List<BusinessSubParentSampleAssessmentDO> businessSubParentSampleAssessmentDOList,
List<BusinessSubSampleAnalysisGroupDO> businessSubSampleAnalysisGroupDOList,
List<BusinessSubSampleAssessmentDO> businessSubSampleAssessmentDOList,
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList,
List<BusinessAssayProjectDataDO> businessAssayProjectDataDOList,
List<BusinessAssayParameterDataDO> businessAssayParameterDataDOList, ConfigSubSampleDO configSubSample,
ConfigSampleFlowDO configSampleFlowSub, SampleFlowNode sampleFlowNodeSub,
BusinessSubSampleDO businessSubSampleDO, Long methodId, List<Long> projectIdList) {
BusinessSubSampleAnalysisGroupDO businessSubSampleAnalysisGroupDO;
ConfigAssayMethodDO addAssayTaskConfigAssayMethod = configAssayMethodMapper.selectById(methodId);
Long addAssayTaskAssayDepartmentId = addAssayTaskConfigAssayMethod.getAssayDepartmentId();
//查询子样对应的分析方法
ConfigSubSampleMethodDO addAssayTaskConfigSubSampleMethodDO = configSubSampleMethodList.stream().filter(f -> f.getIsDefaultUse().equals(QmsCommonConstant.YES) && f.getConfigAssayMethodId().equals(methodId) && f.getConfigSubSampleId().equals(configSubSample.getId())).findFirst().orElse(null);
businessSubSampleAnalysisGroupDO = businessSubSampleAnalysisGroupDOList.stream().filter(f -> f.getBusinessSubSampleId().equals(businessSubSampleDO.getId()) && f.getAssayDepartmentId().equals(addAssayTaskAssayDepartmentId)).findFirst().orElse(null);
if (businessSubSampleAnalysisGroupDO == null) {
businessSubSampleAnalysisGroupDO = new BusinessSubSampleAnalysisGroupDO();
businessSubSampleAnalysisGroupDO.setId(IdWorker.getId());
businessSubSampleAnalysisGroupDO.setBusinessBaseSampleId(businessSubSampleDO.getBusinessBaseSampleId());
businessSubSampleAnalysisGroupDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId());
businessSubSampleAnalysisGroupDO.setBusinessSubSampleId(businessSubSampleDO.getId());
businessSubSampleAnalysisGroupDO.setAssayDepartmentId(addAssayTaskConfigAssayMethod.getAssayDepartmentId());
businessSubSampleAnalysisGroupDO.setAssayDepartmentName(addAssayTaskConfigAssayMethod.getAssayDepartmentName());
businessSubSampleAnalysisGroupDO.setSampleStatus("待收样");
businessSubSampleAnalysisGroupDOList.add(businessSubSampleAnalysisGroupDO);
}
//根据任务数判断是平行还是
String assayType = addAssayTaskConfigSubSampleMethodDO.getTaskCount() > 1 ? QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL : QmsCommonConstant.ASSAY_TYPE_SINGLE_CUP;
//分样判定数据
BusinessSubParentSampleAssessmentDO businessSubParentSampleAssessmentDO = new BusinessSubParentSampleAssessmentDO();
businessSubParentSampleAssessmentDO.setId(IdWorker.getId());
businessSubParentSampleAssessmentDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId());
businessSubParentSampleAssessmentDO.setConfigAssayMethodId(addAssayTaskConfigAssayMethod.getId());
businessSubParentSampleAssessmentDO.setAssayType(assayType);
businessSubParentSampleAssessmentDO.setTaskType("常规");
businessSubParentSampleAssessmentDOList.add(businessSubParentSampleAssessmentDO);
//子样判定数据
BusinessSubSampleAssessmentDO businessSubSampleAssessmentDO = new BusinessSubSampleAssessmentDO();
businessSubSampleAssessmentDO.setId(IdWorker.getId());
businessSubSampleAssessmentDO.setBusinessBaseSampleId(businessSubSampleDO.getBusinessBaseSampleId());
businessSubSampleAssessmentDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId());
businessSubSampleAssessmentDO.setBusinessSubParentSampleAssessmentId(businessSubParentSampleAssessmentDO.getId());
businessSubSampleAssessmentDO.setBusinessSubSampleId(businessSubSampleDO.getId());
businessSubSampleAssessmentDO.setConfigAssayMethodId(addAssayTaskConfigAssayMethod.getId());
businessSubSampleAssessmentDO.setAssayType(assayType);
businessSubSampleAssessmentDO.setTaskType("常规");
businessSubSampleAssessmentDOList.add(businessSubSampleAssessmentDO);
//根据检测方法循环
BusinessAssayTaskDataDO businessAssayTaskDataDO = null;
//根据任务数循环
for (int i = 0; i < addAssayTaskConfigSubSampleMethodDO.getTaskCount(); i++) {
//子样检测任务
businessAssayTaskDataDO = new BusinessAssayTaskDataDO();
businessAssayTaskDataDO.setId(IdWorker.getId());
businessAssayTaskDataDO.setBusinessBaseSampleId(businessSubSampleDO.getBusinessBaseSampleId());
businessAssayTaskDataDO.setBusinessSubParentSampleId(businessSubSampleDO.getBusinessSubParentSampleId());
businessAssayTaskDataDO.setBusinessSubSampleId(businessSubSampleDO.getId());
businessAssayTaskDataDO.setBusinessSubSampleAssessmentId(businessSubSampleAssessmentDO.getId());//子样判定id
businessAssayTaskDataDO.setConfigAssayMethodId(addAssayTaskConfigAssayMethod.getId());
businessAssayTaskDataDO.setAssayType(assayType);
businessAssayTaskDataDO.setTaskType("常规");
businessAssayTaskDataDO.setConfigSampleFlowId(configSampleFlowSub.getId());
businessAssayTaskDataDO.setSampleFlowNodeKey(sampleFlowNodeSub.getNodeKey());
businessAssayTaskDataDO.setSampleFlowNodeTime(currentDateTime);
businessAssayTaskDataDO.setAssayDepartmentId(addAssayTaskConfigAssayMethod.getAssayDepartmentId());
businessAssayTaskDataDO.setAssayDepartmentName(addAssayTaskConfigAssayMethod.getAssayDepartmentName());
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectDOList = configAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(methodId)).collect(Collectors.toList());
StringBuilder assayProjectBuilder = new StringBuilder();
for (ConfigAssayMethodProjectExtendRespVO configAssayMethodProjectDO : configAssayMethodProjectDOList) {
//如果当前分析方法的项目不在当前检测项目中,则跳出循环继续
if (!projectIdList.contains(configAssayMethodProjectDO.getDictionaryProjectId())) {
continue;
}
DictionaryProjectDO dictionaryProject = dictionaryProjectList.stream().filter(f -> f.getId().equals(configAssayMethodProjectDO.getDictionaryProjectId())).findFirst().orElse(null);
assayProjectBuilder.append(dictionaryProject.getShowName()).append(",");
//检测项目
BusinessAssayProjectDataDO businessAssayProjectDataDO = new BusinessAssayProjectDataDO();
businessAssayProjectDataDO.setId(IdWorker.getId());
businessAssayProjectDataDO.setBusinessAssayTaskDataId(businessAssayTaskDataDO.getId());
businessAssayProjectDataDO.setConfigAssayMethodProjectId(configAssayMethodProjectDO.getId());
businessAssayProjectDataDO.setDictionaryProjectId(configAssayMethodProjectDO.getDictionaryProjectId());
businessAssayProjectDataDO.setDataType(configAssayMethodProjectDO.getDataType());
businessAssayProjectDataDO.setDecimalPosition(configAssayMethodProjectDO.getDecimalPosition());
businessAssayProjectDataDO.setUsage(QmsCommonConstant.ASSAY_PROJECT_USAGE_INGREDIENT);
businessAssayProjectDataDO.setMinimumLimitValue(configAssayMethodProjectDO.getMinimumLimitValue());
businessAssayProjectDataDO.setIsEnabled(1);
businessAssayProjectDataDO.setIsNotAssessment(0);
businessAssayProjectDataDOList.add(businessAssayProjectDataDO);
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterDOList = configAssayMethodProjectParameterList.stream().filter(f -> f.getConfigAssayMethodProjectId().equals(configAssayMethodProjectDO.getId())).collect(Collectors.toList());
for (ConfigAssayMethodProjectParameterDO configAssayMethodProjectParameterDO : configAssayMethodProjectParameterDOList) {
BusinessAssayParameterDataDO businessAssayParameterDataDO = new BusinessAssayParameterDataDO();
businessAssayParameterDataDO.setId(IdWorker.getId());
businessAssayParameterDataDO.setConfigAssayMethodProjectParameterId(configAssayMethodProjectParameterDO.getId());
businessAssayParameterDataDO.setBusinessAssayProjectDataId(businessAssayProjectDataDO.getId());
businessAssayParameterDataDO.setDictionaryParameterId(configAssayMethodProjectParameterDO.getDictionaryParameterId());
businessAssayParameterDataDO.setDataType(configAssayMethodProjectParameterDO.getDataType());
businessAssayParameterDataDO.setDecimalPosition(configAssayMethodProjectParameterDO.getDecimalPosition());
businessAssayParameterDataDOList.add(businessAssayParameterDataDO);
}
}
if (assayProjectBuilder.length() > 1) {
assayProjectBuilder.delete(assayProjectBuilder.length() - 1 , assayProjectBuilder.length());
}
businessAssayTaskDataDO.setAssayProject(assayProjectBuilder.toString());
businessAssayTaskDataDOList.add(businessAssayTaskDataDO);
}
}
}

View File

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

View File

@@ -2,14 +2,16 @@ package com.zt.plat.module.qms.business.bus.liteflow.sample.flow;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils;
import com.alibaba.fastjson2.JSON;
import com.ql.util.express.DefaultContext;
import com.ql.util.express.ExpressRunner;
import com.alibaba.qlexpress4.Express4Runner;
import com.alibaba.qlexpress4.QLOptions;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.zt.plat.framework.common.exception.ServiceException;
@@ -41,7 +43,7 @@ public class SampleSubProcessUpdateCmp extends NodeComponent {
// private ConfigSubSampleService configSubSampleService;
@Resource
private ExpressRunner expressRunner;
private Express4Runner express4Runner;
@Resource
private ConfigRuleMapper configRuleMapper;
@@ -89,10 +91,10 @@ public class SampleSubProcessUpdateCmp extends NodeComponent {
for (SampleFlowNode flowNode : nextFlowNodeList) {
ConfigRuleDO conditionRule = configRuleMapper.selectLatestConfigRuleByCode(flowNode.getCondition());
Boolean isMeetCondition = false;
DefaultContext<String, Object> context = new DefaultContext<>();
Map<String, Object> context = new HashMap<>();
ConfigSubSampleDO configSubSample = sampleFlowContext.getConfigSubSampleById(businessSubSample.getConfigSubSampleId());
Boolean hasSubSimpleCodeRule = configSubSample != null && StringUtils.isNotBlank(configSubSample.getSimpleCodeRule());
Boolean hasSubSampleEncrypt = businessHandoverRecordSubDOList.stream().anyMatch(m -> QmsCommonConstant.FlOW_NODE_SAMPLE_ENCRYPT.equals(m.getSampleFlowNodeKey()));
Boolean hasSubSampleEncrypt = businessHandoverRecordSubDOList.stream().filter(f -> f.getBusinessSubSampleId().equals(businessSubSample.getId())).anyMatch(m -> QmsCommonConstant.FlOW_NODE_SAMPLE_ENCRYPT.equals(m.getSampleFlowNodeKey()));
if (CollUtil.isNotEmpty(businessSubSampleAnalysisGroupDOList)) {
List<BusinessSubSampleAnalysisGroupDO> curSubSampleAnalysisGroupDOList = businessSubSampleAnalysisGroupDOList.stream().filter(f -> f.getBusinessSubSampleId().equals(businessSubSample.getId())).collect(Collectors.toList());
@@ -105,7 +107,8 @@ public class SampleSubProcessUpdateCmp extends NodeComponent {
context.put("hasSubSimpleCodeRule", hasSubSimpleCodeRule);
context.put("hasSubSampleEncrypt", hasSubSampleEncrypt);
try {
isMeetCondition = (Boolean) expressRunner.execute(conditionRule.getExpression(), context, null, false, false);
// isMeetCondition = (Boolean) express4Runner.execute(conditionRule.getExpression(), context, null, false, false);
isMeetCondition = (Boolean) express4Runner.execute(conditionRule.getExpression(), context, QLOptions.DEFAULT_OPTIONS).getResult();
} catch (Exception e) {
e.printStackTrace();
throw new ServiceException(1_032_100_000, e.getMessage());
@@ -140,6 +143,16 @@ public class SampleSubProcessUpdateCmp extends NodeComponent {
}
sampleFlowContext.setBusinessSubSampleAnalysisGroupList(curDeptSubSampleAnalysisGroupDOList);
}
//如果是班组送样,需要更新分析班组表
if (QmsCommonConstant.FLOW_NODE_ANALYSIS_SEND.equals(currentSampleFlowKey)) {
List<BusinessSubSampleAnalysisGroupDO> curDeptSubSampleAnalysisGroupDOList = businessSubSampleAnalysisGroupDOList.stream().filter(f -> f.getAssayDepartmentId().equals(loginUser.getVisitDeptId())).collect(Collectors.toList());
for (BusinessSubSampleAnalysisGroupDO businessSubSampleAnalysisGroupDO : curDeptSubSampleAnalysisGroupDOList) {
businessSubSampleAnalysisGroupDO.setIsSend(QmsCommonConstant.YES);
}
sampleFlowContext.setBusinessSubSampleAnalysisGroupList(curDeptSubSampleAnalysisGroupDOList);
}
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -60,7 +60,7 @@ public class BusinessSampleDispatchServiceImpl implements BusinessSampleDispatch
@Override
@Transactional(rollbackFor = Exception.class)
public void addOrRemoveSample(BusinessSampleDispatchSaveReqVO paramVo) {
public void addOrRemoveSample(BusinessSampleDispatchSaveReqVO paramVo, boolean updateCancelFlag) {
Long id = paramVo.getId();
List<Long> addSubSampleIds = paramVo.getAddSubSampleIds();
List<Long> removeDetailIds = paramVo.getRemoveDetailIds();
@@ -84,14 +84,13 @@ public class BusinessSampleDispatchServiceImpl implements BusinessSampleDispatch
}
if(!insertList.isEmpty()){
businessSampleDispatchDetailService.insertBatch(insertList);
if("-1".equals(entity.getCancelStatus())){
if(updateCancelFlag && "-1".equals(entity.getCancelStatus())){
//如果有新增,修改临时数据状态
entity.setCancelStatus("0");
businessSampleDispatchMapper.updateById(entity);
}
}
}
}
@Override
@@ -161,6 +160,7 @@ public class BusinessSampleDispatchServiceImpl implements BusinessSampleDispatch
List<BusinessHandoverRecordSubDO> handoverRecordList = new ArrayList<>();
for (BusinessSampleDispatchDetailExtendRespVO detail : detailList) {
BusinessSampleDispatchDetailDO u = new BusinessSampleDispatchDetailDO();
u.setId(detail.getId());
u.setUseStatus("1");
u.setBorrowStatus("1");
u.setGivebackStatus("0");

View File

@@ -19,6 +19,8 @@ import com.zt.plat.framework.common.pojo.PageParam;
*/
public interface BusinessSampleEntrustRegistrationService {
/**
* 创建委检登记业务
*
@@ -56,6 +58,8 @@ public interface BusinessSampleEntrustRegistrationService {
*/
BusinessSampleEntrustRegistrationDO getBusinessSampleEntrustRegistration(Long id);
List<BusinessSampleEntrustRegistrationDO> listByIds(List<Long> ids);
/**
* 获得委检登记业务分页
*

View File

@@ -89,6 +89,11 @@ public class BusinessSampleEntrustRegistrationServiceImpl implements BusinessSam
return businessSampleEntrustRegistrationMapper.selectById(id);
}
@Override
public List<BusinessSampleEntrustRegistrationDO> listByIds(List<Long> ids) {
return businessSampleEntrustRegistrationMapper.selectByIds(ids);
}
@Override
public PageResult<BusinessSampleEntrustRegistrationExtendRespVO> getBusinessSampleEntrustRegistrationPage(BusinessSampleEntrustRegistrationPageReqVO pageReqVO) {
return businessSampleEntrustRegistrationMapper.selectPage(pageReqVO);

View File

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

View File

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

View File

@@ -57,6 +57,13 @@ public interface BusinessSubSampleService {
*/
BusinessSubSampleExtendRespVO getBusinessSubSample(Long id);
/**
* 获取打印子样业务数据
* @param id
* @return
*/
BusinessSubSampleExtendRespVO getPrintSubSample(Long id);
BusinessSubSampleDO getBySampleCode(String sampleCode);
BusinessSubSampleDO getBySampleReturnCode(String sampleReturnCode);

View File

@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zt.plat.framework.security.core.LoginUser;
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
import com.zt.plat.module.qms.business.bus.controller.vo.*;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessHandoverRecordSubDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleHandoverDetailDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAnalysisGroupDO;
@@ -37,6 +38,7 @@ import com.zt.plat.framework.common.exception.ServiceException;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleAnalysisGroupMapper;
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
import com.zt.plat.module.qms.enums.QmsCommonConstant;
@@ -61,6 +63,9 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
@Resource
private BusinessSubSampleAnalysisGroupMapper businessSubSampleAnalysisGroupMapper;
@Resource
private BusinessAssayTaskDataMapper businessAssayTaskDataMapper;
@Resource private ConfigWarehouseLocationService configWarehouseLocationService;
@Resource private BusinessSampleHandoverService businessSampleHandoverService;
@@ -135,6 +140,33 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
return businessSubSampleMapper.selectExtendById(id);
}
@Override
public BusinessSubSampleExtendRespVO getPrintSubSample(Long id) {
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
BusinessSubSampleExtendRespVO businessSubSample = businessSubSampleMapper.selectExtendById(id);
BusinessSubSampleAnalysisGroupDO businessSubSampleAnalysisGroupDO = businessSubSampleAnalysisGroupMapper.selectByBusinessSubSampleIdAndAssayDepartmentId(id, loginUser.getVisitDeptId());
businessSubSample.setAssayDepartmentId(businessSubSampleAnalysisGroupDO.getAssayDepartmentId());
businessSubSample.setAssayDepartmentName(businessSubSampleAnalysisGroupDO.getAssayDepartmentName());
businessSubSample.setSampleReceiver(businessSubSampleAnalysisGroupDO.getSampleReceiver());
businessSubSample.setSampleReceiveTime(businessSubSampleAnalysisGroupDO.getSampleReceiveTime());
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessSubSampleIdAndAssayDepartmentId(id, loginUser.getVisitDeptId());
Map<Long, List<BusinessAssayTaskDataDO>> businessAssayTaskDataDOMap = businessAssayTaskDataDOList.stream().collect(Collectors.groupingBy(BusinessAssayTaskDataDO::getConfigAssayMethodId));
List<String> assayProjectList = new ArrayList<>();
for (Map.Entry<Long, List<BusinessAssayTaskDataDO>> entry : businessAssayTaskDataDOMap.entrySet()) {
List<BusinessAssayTaskDataDO> val = entry.getValue();
BusinessAssayTaskDataDO businessAssayTaskDataDO = val.get(0);
String assayProject = businessAssayTaskDataDO.getAssayProject();
String[] split = assayProject.split(",");
for (String s : split) {
if (!assayProjectList.contains(s)) {
assayProjectList.add(s);
}
}
}
businessSubSample.setAssayProject(CollUtil.join(assayProjectList, ","));
return businessSubSample;
}
@Override
public BusinessSubSampleDO getBySampleCode(String sampleCode) {
LambdaQueryWrapper<BusinessSubSampleDO> queryWrapper = new LambdaQueryWrapper<>();
@@ -210,6 +242,9 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
BusinessSubSampleExtendRespVO subSample = null;
if (QmsCommonConstant.FLOW_NODE_TEAM_RECEIVE.equals(reqVO.getSampleFlowNodeKey())) {
subSample = businessSubSampleMapper.getBySampleCode(reqVO);
if (subSample == null) {
return subSample;
}
List<BusinessSubSampleAnalysisGroupDO> businessSubSampleAnalysisGroupList = businessSubSampleAnalysisGroupMapper.selectByBusinessSubSampleId(subSample.getId());
BusinessSubSampleAnalysisGroupDO receiveSample = businessSubSampleAnalysisGroupList.stream().filter(f -> "已收样".equals(f.getSampleStatus()) && !f.getAssayDepartmentId().equals(loginUser.getVisitDeptId())).findFirst().orElse(null);
if (receiveSample != null) {
@@ -297,7 +332,7 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
@Transactional(rollbackFor = Exception.class)
public Integer execTakeOff(JSONObject reqVo) {
String actionWay = reqVo.getString("actionWay");
String warehouseLocationCode = reqVo.getString("warehouseLocationCode");
String warehouseLocationCode = reqVo.getString("locationCode");
String sampleReturnCode = reqVo.getString("sampleReturnCodes");
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
String loginUserName = SecurityFrameworkUtils.getLoginUserNickname();
@@ -319,7 +354,7 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
ConfigWarehouseLocationDO locationDO = configWarehouseLocationService.getLocationByCode(warehouseLocationCode, QmsWarehouseLocationConstant.WAREHOUSE_TYPE_SAMPLE);
if(locationDO == null)
throw exception(CONFIG_WAREHOUSE_LOCATION_NOT_EXISTS);
queryWrapper.eq(BusinessSubSampleDO::getConfigWarehouseLocationInfomationId, warehouseLocationCode);
queryWrapper.eq(BusinessSubSampleDO::getConfigWarehouseLocationInfomationId, locationDO.getId());
}else{
throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "actionWay参数错误");
}
@@ -347,17 +382,17 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
for(BusinessSubSampleDO businessSubSampleDO : waitingList){
businessSubSampleDO.setReturnStatus(QmsCommonConstant.TAKEN_OFF);
//创建流转记录
BusinessHandoverRecordSubDO reecordDO = new BusinessHandoverRecordSubDO();
reecordDO.setBusinessSubSampleId(businessSubSampleDO.getId());
reecordDO.setSampleFlowNodeKey(QmsCommonConstant.FLOW_SAMPLE_STORAGE);
reecordDO.setSampleCode(businessSubSampleDO.getSampleReturnCode());
reecordDO.setOperationTime(LocalDateTime.now());
reecordDO.setOperator(loginUserName);
reecordDO.setOperatorId(loginUser.getId());
reecordDO.setSendSampleOperator("");
reecordDO.setReceiveSampleOperator("");
reecordDO.setConfigSampleFlowId(0L);
recordList.add(reecordDO);
BusinessHandoverRecordSubDO record = new BusinessHandoverRecordSubDO();
record.setBusinessSubSampleId(businessSubSampleDO.getId());
record.setSampleFlowNodeKey(QmsCommonConstant.FLOW_SAMPLE_STORAGE);
record.setSampleCode(businessSubSampleDO.getSampleReturnCode());
record.setOperationTime(LocalDateTime.now());
record.setOperator(loginUserName);
record.setOperatorId(loginUser.getId());
record.setSendSampleOperator("");
record.setReceiveSampleOperator("");
record.setConfigSampleFlowId(0L);
recordList.add(record);
BusinessSampleHandoverDetailDO detailDO = new BusinessSampleHandoverDetailDO();
@@ -386,8 +421,10 @@ public class BusinessSubSampleServiceImpl implements BusinessSubSampleService {
String warehouseLocationCode = reqVo.getString("warehouseLocationCode");
String sampleReturnCode = reqVo.getString("sampleReturnCode");
if(ObjectUtils.isEmpty(targetLocation))
throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "缺少目标库位参数!");
throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "缺少“变更后库位参数!");
ConfigWarehouseLocationDO targetLocationDO = configWarehouseLocationService.getLocationByCode(targetLocation, QmsWarehouseLocationConstant.WAREHOUSE_TYPE_SAMPLE);
if(targetLocationDO == null)
throw exception0(BUSINESS_SUB_SAMPLE_NOT_EXISTS.getCode(), "“变更后库位”不存在,请检查编码是否正确!");
//查询要操作的样品
LambdaQueryWrapper<BusinessSubSampleDO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(BusinessSubSampleDO::getSampleFlowNodeKey, QmsCommonConstant.FLOW_SAMPLE_STORAGE);

View File

@@ -3,18 +3,10 @@ package com.zt.plat.module.qms.business.bus.service;
import java.util.List;
import com.alibaba.fastjson2.JSONObject;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskDataReqVO;
/**
* <b>SampleAnalysisAuditService</b>
* <p>
* 更新历史:
* <pre> 版本 更新时间 更新者 更新内容<hr/>
* V1.0 2025年9月29日 wxr Add</pre>
* <b>Copyright (C) 云南志者竟成科技有限公司</b>
* </p>
* @author 王兴荣<wxr@wangxingrong.com>
* @version V1.0
* @since 2025年9月29日
*/
public interface SampleAnalysisAuditService {
@@ -22,7 +14,7 @@ public interface SampleAnalysisAuditService {
void crossAuditByByTaskId(Long businessAssayTaskId, String auditStatus);
JSONObject getSampleResultAssessmentList(Long configAssayMethodId, String asmtReportedStatus);
JSONObject getSampleResultAssessmentList(BusinessAssayTaskDataReqVO reqVO);
JSONObject getParallelResultAssessment(Long businessSubSampleId, Long configAssayMethodId);

View File

@@ -4,13 +4,10 @@ import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
import org.apache.commons.collections4.map.HashedMap;
@@ -23,18 +20,17 @@ import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONFactory;
import com.alibaba.fastjson2.JSONObject;
import com.alibaba.fastjson2.JSONWriter;
import com.alibaba.nacos.shaded.io.grpc.Attributes.Key;
import com.alibaba.qlexpress4.Express4Runner;
import com.alibaba.qlexpress4.QLOptions;
import com.alibaba.qlexpress4.QLResult;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.ql.util.express.DefaultContext;
import com.ql.util.express.ExpressRunner;
import com.zt.plat.framework.common.exception.ServiceException;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
import com.zt.plat.module.qms.business.bus.controller.vo.*;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayParameterDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayReportDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDetailDO;
@@ -67,7 +63,6 @@ import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleAssessmen
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
import com.zt.plat.module.qms.business.config.controller.vo.*;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectAssessmentDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigReportFieldDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigRuleDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleDO;
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleMethodDO;
@@ -104,7 +99,7 @@ import jakarta.annotation.Resource;
public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditService {
@Resource
private ExpressRunner expressRunner;
private Express4Runner express4Runner;
@Resource
private AllowanceCalculatorComponent allowanceCalculatorComponent;
@@ -152,7 +147,9 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
private ConfigSubSampleMethodMapper configSubSampleMethodMapper;
@Override
public JSONObject getSampleResultAssessmentList(Long configAssayMethodId, String asmtReportedStatus) {
public JSONObject getSampleResultAssessmentList(BusinessAssayTaskDataReqVO reqVO) {
Long configAssayMethodId = reqVO.getConfigAssayMethodId();
String asmtReportedStatus = reqVO.getAsmtReportedStatus();
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectDOList = configAssayMethodProjectMapper.selectByConfigAssayMethodId(configAssayMethodId);
List<Map<String, Object>> columnList = new ArrayList<>();
@@ -173,6 +170,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
BusinessAssayTaskDataReqVO search = new BusinessAssayTaskDataReqVO();
search.setConfigAssayMethodId(configAssayMethodId);
search.setAsmtReportedStatus(asmtReportedStatus);
search.setSampleReceiveTime(reqVO.getSampleReceiveTime());
List<BusinessAssayTaskDataExtendRespVO> resultAssessmentList = businessAssayTaskDataMapper.selectResultAssessmentList(search);
for (BusinessAssayTaskDataExtendRespVO businessAssayTaskDataExtendRespVO : resultAssessmentList) {
@@ -294,15 +292,18 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
if (businessAssayTaskDO == null) {
throw new ServiceException(1_032_100_000, "未找到任务分配单");
}
String formValue = businessAssayTaskDO.getFormValue();
JSONObject formValueJsonObject = JSON.parseObject(formValue);
JSONArray jsonArray = new JSONArray();
String jsonString = JSON.toJSONString(businessAssayTaskDO, context);
JSONObject businessAssayTaskJson = JSON.parseObject(jsonString);
formValueJsonObject.forEach((key, value) -> {
businessAssayTaskJson.put(key, value);
});
JSONArray jsonArray = new JSONArray();
String formValue = businessAssayTaskDO.getFormValue();
if (StringUtils.isNotBlank(formValue)) {
JSONObject formValueJsonObject = JSON.parseObject(formValue);
formValueJsonObject.forEach((key, value) -> {
businessAssayTaskJson.put(key, value);
});
}
jsonArray.add(businessAssayTaskJson);
resultJsonObject.put("businessAssayTask", jsonArray);
@@ -324,6 +325,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
map.put("sampleCode", businessAssayTaskDetailDO.getSampleCode());
map.put("sampleName", businessAssayTaskDetailDO.getSampleName());
map.put("analysisType", "analysis");
map.put("assayTime", businessAssayTaskJson.get("assayTime"));
BusinessAssayProjectDataReqVO projectDataSearch2 = new BusinessAssayProjectDataReqVO();
projectDataSearch2.setBusinessAssayTaskDataId(businessAssayTaskDataDO.getId());
@@ -359,6 +361,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
map.put("sampleCode", businessQCManagementData.getSampleCode());
map.put("sampleName", businessQCManagementData.getSampleName());
map.put("analysisType", businessQCManagementData.getDictionaryBusinessKey());
map.put("assayTime", businessAssayTaskJson.get("assayTime"));
BusinessQCManagementProjectDataReqVO projectDataSearch2 = new BusinessQCManagementProjectDataReqVO();
projectDataSearch2.setBusinessQCManagementDataId(businessQCManagementData.getId());
@@ -392,6 +395,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
map.put("sampleCode", businessQCCoefficientData.getSampleCode());
map.put("sampleName", businessQCCoefficientData.getSampleName());
map.put("analysisType", businessQCCoefficientData.getDictionaryBusinessKey());
map.put("assayTime", businessAssayTaskJson.get("assayTime"));
BusinessQCCoefficientParameterDataReqVO parameterDataSearch2 = new BusinessQCCoefficientParameterDataReqVO();
parameterDataSearch2.setBusinessQCCoefficientDataId(businessQCCoefficientData.getId());
@@ -433,10 +437,11 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
BusinessAssayTaskDO businessAssayTaskDO = businessAssayTaskMapper.selectById(businessAssayTaskId);
if (QmsCommonConstant.APPROVE.equals(auditStatus)) {
businessAssayTaskDO.setFinishStatus(QmsCommonConstant.APPROVED);
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.APPROVED);
businessAssayTaskDO.setFinishStatus(QmsCommonConstant.COMPLETED);
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.COMPLETED);
businessAssayTaskDO.setReportTime(LocalDateTime.now());
businessAssayTaskDO.setReportOperator(SecurityFrameworkUtils.getLoginUserNickname());
businessAssayTaskDO.setReportOperatorId(SecurityFrameworkUtils.getLoginUserId());
//查询分析任务明细
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessAssayTaskId(businessAssayTaskId);
@@ -636,8 +641,9 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
} else {
businessAssayTaskDO.setTaskAssayStatus(QmsCommonConstant.SAVED);
businessAssayTaskDO.setFinishStatus(QmsCommonConstant.PENDING);
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.NOT_START);
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.RETURNED);
}
businessAssayTaskMapper.updateById(businessAssayTaskDO);
@@ -980,12 +986,14 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
int elementScale = businessSubSampleAssessmentProjectDO.getDecimalPosition();
// 计算代表值(均值\
// BigDecimal representativeValue = calculateRepresentativeValue(sortedValues, elementScale);
DefaultContext<String, Object> context = new DefaultContext<>();
Map<String, Object> context = new HashMap<>();
context.put("values", sortedValues);
context.put("scale", elementScale);
BigDecimal representativeValue = null;
try {
representativeValue = (BigDecimal) expressRunner.execute(calculateAssessmentValue.getExpression(), context, null, false, false);
//representativeValue = (BigDecimal) expressRunner.execute(calculateAssessmentValue.getExpression(), context, null, false, false);
QLResult expressResult = express4Runner.execute(calculateAssessmentValue.getExpression(), context, QLOptions.builder().precise(true).build());//高精度计算
representativeValue = (BigDecimal) expressResult.getResult();
} catch (Exception e) {
e.printStackTrace();
}

View File

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

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