结果判定调整
This commit is contained in:
@@ -11,6 +11,8 @@ import com.alibaba.fastjson2.JSONObject;
|
||||
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;
|
||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
@@ -52,9 +54,9 @@ public class SampleAnalysisAuditController {
|
||||
@GetMapping("/getResultAssessment")
|
||||
public CommonResult<?> getResultAssessment(String assayType, Long sampleId, Long configAssayMethodId) {
|
||||
JSONObject result = null;
|
||||
if ("平行".equals(assayType)) {
|
||||
if (QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL.equals(assayType)) {//平行
|
||||
result = sampleAnalysisAuditService.getParallelResultAssessment(sampleId, configAssayMethodId);
|
||||
} else if ("双杯".equals(assayType)) {
|
||||
} else if (QmsCommonConstant.ASSAY_TYPE_DOUBLE_CUP.equals(assayType)) {//双杯
|
||||
result = sampleAnalysisAuditService.getDoubleCupResultAssessment(sampleId, configAssayMethodId);
|
||||
}
|
||||
return success(result);
|
||||
@@ -78,9 +80,9 @@ public class SampleAnalysisAuditController {
|
||||
@PostMapping("/modifyResultAssessment")
|
||||
public CommonResult<?> modifyResultAssessment(@RequestBody ModifyResultAssessmentReqVO reqVO) {
|
||||
JSONObject result = null;
|
||||
if ("平行".equals(reqVO.getAssayType())) {
|
||||
if (QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL.equals(reqVO.getAssayType())) {//平行
|
||||
result = sampleAnalysisAuditService.modifyParallelResultAssessment(reqVO.getSampleId(), reqVO.getConfigAssayMethodId(), reqVO.getSampleAssessmentId(), reqVO.getBusinessAssayProjectDataIds());
|
||||
} else if ("双杯".equals(reqVO.getAssayType())) {
|
||||
} else if (QmsCommonConstant.ASSAY_TYPE_DOUBLE_CUP.equals(reqVO.getAssayType())) {//双杯
|
||||
|
||||
}
|
||||
return success(result);
|
||||
@@ -93,6 +95,14 @@ public class SampleAnalysisAuditController {
|
||||
return success("成功");
|
||||
}
|
||||
|
||||
@PostMapping("/batchAssessmentDataReporting")
|
||||
public CommonResult<?> batchAssessmentDataReporting(@RequestBody BatchAssessmentDataReportingReqVO reqVO) {
|
||||
for (Long businessSubSampleId : reqVO.getBusinessSubSampleIds()) {
|
||||
sampleAnalysisAuditService.assessmentDataReporting(businessSubSampleId, reqVO.getConfigAssayMethodId());
|
||||
}
|
||||
return success("成功");
|
||||
}
|
||||
|
||||
//重新创建复检委托
|
||||
@PostMapping("/createReAnalysis")
|
||||
public CommonResult<?> createReAnalysis(Long businessSubSampleId, Long configAssayMethodId) {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BatchAssessmentDataReportingReqVO {
|
||||
|
||||
private List<Long> businessSubSampleIds;
|
||||
|
||||
private Long configAssayMethodId;
|
||||
}
|
||||
@@ -31,7 +31,7 @@ public class BusinessAssayTaskDataPageReqVO extends PageParam {
|
||||
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", example = "2")
|
||||
private String taskType;
|
||||
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...", example = "2")
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯-single_cup、双杯-double_cup、平行-single_parallel...", example = "2")
|
||||
private String assayType;
|
||||
|
||||
@Schema(description = "检测项目")
|
||||
|
||||
@@ -31,7 +31,7 @@ public class BusinessAssayTaskDataReqVO {
|
||||
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", example = "2")
|
||||
private String taskType;
|
||||
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...", example = "2")
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯-single_cup、双杯-double_cup、平行-single_parallel...", example = "2")
|
||||
private String assayType;
|
||||
|
||||
@Schema(description = "检测项目")
|
||||
|
||||
@@ -40,8 +40,8 @@ public class BusinessAssayTaskDataRespVO {
|
||||
@ExcelProperty("任务类型,【字典】【jy_sample_task_type】常规、抽查...")
|
||||
private String taskType;
|
||||
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...")
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯-single_cup、双杯-double_cup、平行-single_parallel...", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("分析类型,【字典】【jy_sample_assay_type】单杯-single_cup、双杯-double_cup、平行-single_parallel...")
|
||||
private String assayType;
|
||||
|
||||
@Schema(description = "检测项目", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
||||
@@ -38,8 +38,8 @@ public class BusinessAssayTaskDataSaveReqVO {
|
||||
@NotEmpty(message = "任务类型,【字典】【jy_sample_task_type】常规、抽查...不能为空")
|
||||
private String taskType;
|
||||
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...不能为空")
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯-single_cup、双杯-double_cup、平行-single_parallel...", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "分析类型,【字典】【jy_sample_assay_type】单杯-single_cup、双杯-double_cup、平行-single_parallel...不能为空")
|
||||
private String assayType;
|
||||
|
||||
@Schema(description = "检测项目", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
||||
@@ -28,7 +28,7 @@ public class BusinessSubSampleAssessmentPageReqVO extends PageParam {
|
||||
@Schema(description = "任务类型,【字典】【jy_sample_task_type】常规、抽查...", example = "2")
|
||||
private String taskType;
|
||||
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...", example = "1")
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯-single_cup、双杯-double_cup、平行-single_parallel...", example = "1")
|
||||
private String assayType;
|
||||
|
||||
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", example = "1")
|
||||
|
||||
@@ -36,8 +36,8 @@ public class BusinessSubSampleAssessmentRespVO {
|
||||
@ExcelProperty("任务类型,【字典】【jy_sample_task_type】常规、抽查...")
|
||||
private String taskType;
|
||||
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...")
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯-single_cup、双杯-double_cup、平行-single_parallel...", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("分析类型,【字典】【jy_sample_assay_type】单杯-single_cup、双杯-double_cup、平行-single_parallel...")
|
||||
private String assayType;
|
||||
|
||||
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
|
||||
@@ -34,8 +34,8 @@ public class BusinessSubSampleAssessmentSaveReqVO {
|
||||
@NotEmpty(message = "任务类型,【字典】【jy_sample_task_type】常规、抽查...不能为空")
|
||||
private String taskType;
|
||||
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...不能为空")
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯-single_cup、双杯-double_cup、平行-single_parallel...", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "分析类型,【字典】【jy_sample_assay_type】单杯-single_cup、双杯-double_cup、平行-single_parallel...不能为空")
|
||||
private String assayType;
|
||||
|
||||
@Schema(description = "数据类型,字典表【T_DIC_BSN】string-字符串,int-整数,decimal-小数,date-日期,datetime-时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
|
||||
@@ -35,7 +35,7 @@ public class UnAssignTaskedSubSampleRespVO implements Serializable {
|
||||
@Schema(description = "检测方法配置ID", example = "9130")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...", example = "2")
|
||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯-single_cup、双杯-double_cup、平行-single_parallel...", example = "2")
|
||||
private String assayType;
|
||||
|
||||
@Schema(description = "检测项目")
|
||||
|
||||
@@ -65,7 +65,7 @@ public class BusinessAssayTaskDataDO extends BusinessBaseDO {
|
||||
@TableField("TSK_TP")
|
||||
private String taskType;
|
||||
/**
|
||||
* 分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...
|
||||
* 分析类型,【字典】【jy_sample_assay_type】单杯-single_cup、双杯-double_cup、平行-single_parallel...
|
||||
*/
|
||||
@TableField("ASY_TP")
|
||||
private String assayType;
|
||||
|
||||
@@ -33,6 +33,11 @@ public class BusinessSubSampleAssessmentDO extends BusinessBaseDO {
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 样品分样ID
|
||||
*/
|
||||
@TableField("BSN_SB_PRN_SMP_ID")
|
||||
private Long businessSubParentSampleId;
|
||||
/**
|
||||
* 分样子样ID
|
||||
*/
|
||||
@TableField("BSN_SB_SMP_ID")
|
||||
@@ -58,7 +63,7 @@ public class BusinessSubSampleAssessmentDO extends BusinessBaseDO {
|
||||
@TableField("TSK_TP")
|
||||
private String taskType;
|
||||
/**
|
||||
* 分析类型,【字典】【jy_sample_assay_type】单杯、双杯、平行...
|
||||
* 分析类型,【字典】【jy_sample_assay_type】单杯-single_cup、双杯-double_cup、平行-single_parallel...
|
||||
*/
|
||||
@TableField("ASY_TP")
|
||||
private String assayType;
|
||||
|
||||
@@ -20,8 +20,11 @@ import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO
|
||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
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;
|
||||
|
||||
@@ -106,45 +109,68 @@ public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTa
|
||||
}
|
||||
|
||||
default List<BusinessAssayTaskDataExtendRespVO> selectResultAssessmentList(BusinessAssayTaskDataReqVO reqVO) {
|
||||
return selectJoinList(BusinessAssayTaskDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayTaskDataDO>()
|
||||
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessAssayTaskDataDO::getConfigAssayMethodId)
|
||||
MPJLambdaWrapper<BusinessAssayTaskDataDO> mpjLambdaWrapper = new MPJLambdaWrapper<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, 103))
|
||||
.leftJoin(BusinessSubSampleAnalysisGroupDO.class, on -> on
|
||||
.eq(BusinessSubSampleAnalysisGroupDO::getBusinessSubSampleId, BusinessAssayTaskDataDO::getBusinessSubSampleId)
|
||||
.eq(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentId, BusinessAssayTaskDataDO::getAssayDepartmentId))
|
||||
.selectAll(BusinessAssayTaskDataDO.class)
|
||||
.selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskDataExtendRespVO::getConfigAssayMethodName)
|
||||
.selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName)
|
||||
.selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode)
|
||||
.selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessAssayTaskDataExtendRespVO::getSampleAssayCode)
|
||||
// .selectAs(BusinessSubSampleAnalysisGroupDO::getSampleReceiver, BusinessAssayTaskDataExtendRespVO::getSampleReceiver)
|
||||
// .selectAs(BusinessSubSampleAnalysisGroupDO::getSampleReceiveTime, BusinessAssayTaskDataExtendRespVO::getSampleReceiveTime)
|
||||
.eq(BusinessAssayTaskDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getTaskType, reqVO.getTaskType())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::getAssayType, reqVO.getAssayType())
|
||||
.eqIfPresent(BusinessAssayTaskDataDO::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())
|
||||
.orderByAsc(BusinessAssayTaskDataDO::getBusinessSubSampleId)
|
||||
.orderByAsc(BusinessAssayTaskDataDO::getReportTime));
|
||||
.selectAs(BusinessSubSampleAnalysisGroupDO::getSampleReceiver, BusinessAssayTaskDataExtendRespVO::getSampleReceiver)
|
||||
.selectAs(BusinessSubSampleAnalysisGroupDO::getSampleReceiveTime, BusinessAssayTaskDataExtendRespVO::getSampleReceiveTime);
|
||||
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.getConfigAssayMethodId())) {
|
||||
mpjLambdaWrapper.eq(BusinessAssayTaskDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId());
|
||||
}
|
||||
mpjLambdaWrapper.ne(BusinessSubSampleAnalysisGroupDO::getSampleStatus, "待收样");
|
||||
mpjLambdaWrapper.orderByAsc(BusinessAssayTaskDataDO::getBusinessSubSampleId).orderByAsc(BusinessAssayTaskDataDO::getReportTime);
|
||||
|
||||
return selectJoinList(BusinessAssayTaskDataExtendRespVO.class, mpjLambdaWrapper);
|
||||
|
||||
|
||||
// return selectJoinList(BusinessAssayTaskDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayTaskDataDO>()
|
||||
// .leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, BusinessAssayTaskDataDO::getConfigAssayMethodId)
|
||||
// .leftJoin(BusinessSubSampleDO.class, BusinessSubSampleDO::getId, BusinessAssayTaskDataDO::getBusinessSubSampleId)
|
||||
// .selectAll(BusinessAssayTaskDataDO.class)
|
||||
// .selectAs(ConfigAssayMethodDO::getName, BusinessAssayTaskDataExtendRespVO::getConfigAssayMethodName)
|
||||
// .selectAs(BusinessSubSampleDO::getSampleName, BusinessAssayTaskDataExtendRespVO::getSampleName)
|
||||
// .selectAs(BusinessSubSampleDO::getSampleCode, BusinessAssayTaskDataExtendRespVO::getSampleCode)
|
||||
// .selectAs(BusinessSubSampleDO::getSampleAssayCode, BusinessAssayTaskDataExtendRespVO::getSampleAssayCode)
|
||||
// .eqIfPresent(BusinessAssayTaskDataDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId())
|
||||
// .eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId())
|
||||
// .eqIfPresent(BusinessAssayTaskDataDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId())
|
||||
// .eqIfPresent(BusinessAssayTaskDataDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||
// .eqIfPresent(BusinessAssayTaskDataDO::getBusinessAssayTaskId, reqVO.getBusinessAssayTaskId())
|
||||
// .eqIfPresent(BusinessAssayTaskDataDO::getTaskType, reqVO.getTaskType())
|
||||
// .eqIfPresent(BusinessAssayTaskDataDO::getAssayType, reqVO.getAssayType())
|
||||
// .eqIfPresent(BusinessAssayTaskDataDO::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())
|
||||
// .orderByAsc(BusinessAssayTaskDataDO::getBusinessSubSampleId)
|
||||
// .orderByAsc(BusinessAssayTaskDataDO::getReportTime));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -223,6 +249,25 @@ public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTa
|
||||
.eq(BusinessAssayTaskDataDO::getIsReported, isReported);
|
||||
return selectList(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询双杯样是否上报的分析任务
|
||||
* @param excludeIds 排除的id列表
|
||||
* @param businessSubParentSampleId 分样id
|
||||
* @param configAssayMethodId 分析方法id
|
||||
* @param isReported 是否上报
|
||||
* @return
|
||||
*/
|
||||
default List<BusinessAssayTaskDataDO> selectDoubleCupIsReportedList(List<Long> excludeIds, Long businessSubParentSampleId, Long configAssayMethodId, Integer isReported) {
|
||||
LambdaQueryWrapper<BusinessAssayTaskDataDO> queryWrapper = new LambdaQueryWrapperX<BusinessAssayTaskDataDO>();
|
||||
if (CollUtil.isNotEmpty(excludeIds)) {
|
||||
queryWrapper.notIn(BusinessAssayTaskDataDO::getId, excludeIds);
|
||||
}
|
||||
queryWrapper.eq(BusinessAssayTaskDataDO::getBusinessSubParentSampleId, businessSubParentSampleId)
|
||||
.eq(BusinessAssayTaskDataDO::getConfigAssayMethodId, configAssayMethodId)
|
||||
.eq(BusinessAssayTaskDataDO::getIsReported, isReported);
|
||||
return selectList(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询最大分析次数的检测任务数据
|
||||
|
||||
@@ -6,6 +6,9 @@ import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessSubSampleAnalysisGroupPageReqVO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAnalysisGroupDO;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
@@ -32,5 +35,11 @@ public interface BusinessSubSampleAnalysisGroupMapper extends BaseMapperX<Busine
|
||||
.eqIfPresent(BusinessSubSampleAnalysisGroupDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(BusinessSubSampleAnalysisGroupDO::getId));
|
||||
}
|
||||
|
||||
default List<BusinessSubSampleAnalysisGroupDO> selectByBusinessSubSampleIdsAndAssayDepartmentId(List<Long> businessSubSampleIds, Long assayDepartmentId) {
|
||||
return selectList(new LambdaQueryWrapperX<BusinessSubSampleAnalysisGroupDO>()
|
||||
.in(BusinessSubSampleAnalysisGroupDO::getBusinessSubSampleId, businessSubSampleIds)
|
||||
.eq(BusinessSubSampleAnalysisGroupDO::getAssayDepartmentId, assayDepartmentId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -295,6 +295,7 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
||||
for (ConfigSampleReportDO configSampleReport : configSampleReportDOList) {
|
||||
BusinessAssayReportDataDO businessAssayReportDataDO = new BusinessAssayReportDataDO();
|
||||
businessAssayReportDataDO.setBusinessBaseSampleId(configBaseSampleId);
|
||||
businessAssayReportDataDO.setDataSource(configSampleReport.getDataSource());
|
||||
businessAssayReportDataDO.setConfigReportTypeId(configSampleReport.getConfigReportTypeId());
|
||||
businessAssayReportDataDO.setConfigSampleReportId(configSampleReport.getId());
|
||||
businessAssayReportDataDO.setSampleCode(businessBaseSampleDO.getSampleCode());
|
||||
@@ -365,7 +366,7 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
||||
//查询子样对应的分析方法
|
||||
ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodList.stream().filter(f -> f.getIsDefaultUse().equals(QmsCommonConstant.YES) && f.getConfigAssayMethodId().equals(configAssayMethodId) && f.getConfigSubSampleId().equals(configSubSample.getId())).findFirst().orElse(null);
|
||||
|
||||
businessSubSampleAnalysisGroupDO = businessSubSampleAnalysisGroupDOList.stream().filter(f -> f.getAssayDepartmentId().equals(configAssayMethodDO.getAssayDepartmentId())).findFirst().orElse(null);
|
||||
businessSubSampleAnalysisGroupDO = businessSubSampleAnalysisGroupDOList.stream().filter(f -> f.getBusinessSubSampleId().equals(businessSubSampleDO.getId()) && f.getAssayDepartmentId().equals(configAssayMethodDO.getAssayDepartmentId())).findFirst().orElse(null);
|
||||
if (businessSubSampleAnalysisGroupDO == null) {
|
||||
businessSubSampleAnalysisGroupDO = new BusinessSubSampleAnalysisGroupDO();
|
||||
businessSubSampleAnalysisGroupDO.setId(IdWorker.getId());
|
||||
@@ -383,7 +384,7 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
||||
BusinessAssayTaskDataDO businessAssayTaskDataDO = null;
|
||||
|
||||
//根据任务数判断是平行还是
|
||||
String assayType = configSubSampleMethodDO.getTaskCount() > 1 ? "平行" : "单杯";
|
||||
String assayType = configSubSampleMethodDO.getTaskCount() > 1 ? QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL : QmsCommonConstant.ASSAY_TYPE_SINGLE_CUP;
|
||||
|
||||
//根据任务数循环
|
||||
for (int i = 0; i < configSubSampleMethodDO.getTaskCount(); i++) {
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessHandoverRecord
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleHandoverDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleHandoverDetailDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAnalysisGroupDO;
|
||||
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.BusinessBaseSampleMapper;
|
||||
@@ -19,6 +20,7 @@ import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessHandoverRecordSubM
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSampleHandoverDetailMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSampleHandoverMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleAnalysisGroupMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
|
||||
import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleFlowContext;
|
||||
import jakarta.annotation.Resource;
|
||||
@@ -38,6 +40,9 @@ public class SampleDataSaveOrUpdateCmp extends NodeComponent {
|
||||
@Resource
|
||||
private BusinessAssayTaskDataMapper businessAssayTaskDataMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessSubSampleAnalysisGroupMapper businessSubSampleAnalysisGroupMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessHandoverRecordSubMapper businessHandoverRecordSubMapper;
|
||||
|
||||
@@ -70,6 +75,11 @@ public class SampleDataSaveOrUpdateCmp extends NodeComponent {
|
||||
if (CollUtil.isNotEmpty(businessAssayTaskDataList)) {
|
||||
businessAssayTaskDataMapper.updateBatch(businessAssayTaskDataList);
|
||||
}
|
||||
//子样分析班组
|
||||
List<BusinessSubSampleAnalysisGroupDO> businessSubSampleAnalysisGroupList = sampleFlowContext.getBusinessSubSampleAnalysisGroupList();
|
||||
if (CollUtil.isNotEmpty(businessSubSampleAnalysisGroupList)) {
|
||||
businessSubSampleAnalysisGroupMapper.updateBatch(businessSubSampleAnalysisGroupList);
|
||||
}
|
||||
//交接记录
|
||||
List<BusinessHandoverRecordSubDO> busHandoverRecordSubList = sampleFlowContext.getBusinessHandoverRecordSubList();
|
||||
if (CollUtil.isNotEmpty(busHandoverRecordSubList)) {
|
||||
|
||||
@@ -13,10 +13,13 @@ import com.ql.util.express.ExpressRunner;
|
||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
import com.zt.plat.framework.common.exception.ServiceException;
|
||||
import com.zt.plat.framework.security.core.LoginUser;
|
||||
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.BusinessSubSampleAnalysisGroupDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessHandoverRecordSubMapper;
|
||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleAnalysisGroupMapper;
|
||||
import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleFlowContext;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigRuleDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSampleFlowDO;
|
||||
@@ -47,13 +50,16 @@ public class SampleSubProcessUpdateCmp extends NodeComponent {
|
||||
|
||||
@Resource
|
||||
private BusinessHandoverRecordSubMapper businessHandoverRecordSubMapper;
|
||||
|
||||
@Resource
|
||||
private BusinessSubSampleAnalysisGroupMapper businessSubSampleAnalysisGroupMapper;
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
SampleFlowContext sampleFlowContext = this.getContextBean(SampleFlowContext.class);
|
||||
String currentSampleFlowKey = sampleFlowContext.getCurrentSampleFlowKey();
|
||||
// LoginUser loginUser = sampleFlowContext.getLoginUser();
|
||||
// String loginRealname = sampleFlowContext.getLoginRealname();
|
||||
LoginUser loginUser = sampleFlowContext.getLoginUser();
|
||||
String loginRealname = sampleFlowContext.getLoginRealname();
|
||||
LocalDateTime currentDateTime = sampleFlowContext.getCurrentDateTime();
|
||||
List<Long> sampleIdList = sampleFlowContext.getSampleIdList();
|
||||
List<BusinessSubSampleDO> busSubCsampleList = sampleFlowContext.getBusinessSubSampleList();
|
||||
@@ -112,6 +118,16 @@ public class SampleSubProcessUpdateCmp extends NodeComponent {
|
||||
}
|
||||
}
|
||||
|
||||
//如果是班组收样,需要更新分析班组表
|
||||
if (QmsCommonConstant.FLOW_NODE_TEAM_RECEIVE.equals(currentSampleFlowKey)) {
|
||||
List<BusinessSubSampleAnalysisGroupDO> businessSubSampleAnalysisGroupDOList = businessSubSampleAnalysisGroupMapper.selectByBusinessSubSampleIdsAndAssayDepartmentId(sampleIdList, loginUser.getVisitDeptId());
|
||||
for (BusinessSubSampleAnalysisGroupDO businessSubSampleAnalysisGroupDO : businessSubSampleAnalysisGroupDOList) {
|
||||
businessSubSampleAnalysisGroupDO.setSampleReceiveTime(currentDateTime);
|
||||
businessSubSampleAnalysisGroupDO.setSampleReceiver(loginRealname);
|
||||
businessSubSampleAnalysisGroupDO.setSampleStatus("已收样");
|
||||
}
|
||||
sampleFlowContext.setBusinessSubSampleAnalysisGroupList(businessSubSampleAnalysisGroupDOList);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessHandoverRecord
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleHandoverDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleHandoverDetailDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAnalysisGroupDO;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||
import com.zt.plat.module.qms.business.bus.liteflow.param.SampleFlowInfo;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSampleHandoverDO;
|
||||
@@ -90,6 +91,9 @@ public class SampleFlowContext {
|
||||
/** 分样子样任务信息 **/
|
||||
private List<BusinessAssayTaskDataDO> businessAssayTaskDataList;
|
||||
|
||||
/** 分样子样分析班组 **/
|
||||
private List<BusinessSubSampleAnalysisGroupDO> businessSubSampleAnalysisGroupList;
|
||||
|
||||
/** 交接记录信息 **/
|
||||
private List<BusinessHandoverRecordSubDO> businessHandoverRecordSubList;
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayTaskDataMappe
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.security.core.LoginUser;
|
||||
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
|
||||
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertList;
|
||||
@@ -86,6 +88,10 @@ public class BusinessAssayTaskDataServiceImpl implements BusinessAssayTaskDataSe
|
||||
|
||||
@Override
|
||||
public List<BusinessAssayTaskDataGroupRespVO> getUnAssayTaskGroupList(BusinessAssayTaskDataReqVO reqVO) {
|
||||
//当前登录用户
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
//设置当前登录用户的部门id
|
||||
reqVO.setAssayDepartmentId(loginUser.getVisitDeptId());
|
||||
return businessAssayTaskDataMapper.selectUnAssayTaskGroupList(reqVO);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodPr
|
||||
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;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectAssessmentMapper;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigAssayMethodProjectMapper;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigProjectMapper;
|
||||
@@ -57,6 +58,7 @@ import com.zt.plat.module.qms.business.config.dal.mapper.ConfigReportTypeMapper;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigRuleMapper;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigSampleReportMapper;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigSubSampleMapper;
|
||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigSubSampleMethodMapper;
|
||||
import com.zt.plat.module.qms.core.qlexpress.cmp.AllowanceCalculatorComponent;
|
||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||
|
||||
@@ -107,6 +109,9 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
|
||||
@Resource
|
||||
private ConfigAssayMethodProjectMapper configAssayMethodProjectMapper;
|
||||
|
||||
@Resource
|
||||
private ConfigSubSampleMethodMapper configSubSampleMethodMapper;
|
||||
|
||||
@Override
|
||||
public JSONObject getSampleResultAssessmentList(Long configAssayMethodId, String assessmentStatus) {
|
||||
@@ -130,6 +135,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
BusinessAssayTaskDataReqVO search = new BusinessAssayTaskDataReqVO();
|
||||
search.setConfigAssayMethodId(configAssayMethodId);
|
||||
List<BusinessAssayTaskDataExtendRespVO> resultAssessmentList = businessAssayTaskDataMapper.selectResultAssessmentList(search);
|
||||
|
||||
for (BusinessAssayTaskDataExtendRespVO businessAssayTaskDataExtendRespVO : resultAssessmentList) {
|
||||
Map<String,Object> businessAssayTaskDataMap = BeanUtil.beanToMap(businessAssayTaskDataExtendRespVO);
|
||||
Map<String,Object> businessAssayTaskDataAssessmentMap = BeanUtil.copyProperties(businessAssayTaskDataMap, Map.class);
|
||||
@@ -145,7 +151,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
).findFirst().orElse(null);
|
||||
//为空则未添加过判定记录
|
||||
if (assessmentMap == null) {
|
||||
if ("平行".equals(businessAssayTaskDataExtendRespVO.getAssayType())) {
|
||||
if (QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL.equals(businessAssayTaskDataExtendRespVO.getAssayType())) {//平行
|
||||
List<BusinessSubSampleAssessmentExtendRespVO> businessSubSampleAssessmentList = businessSubSampleAssessmentMapper.selectByBusinessSubSampleIdAndConfigAssayMethodId(businessAssayTaskDataExtendRespVO.getBusinessSubSampleId(), configAssayMethodId);
|
||||
for (BusinessSubSampleAssessmentExtendRespVO businessSubSampleAssessment : businessSubSampleAssessmentList) {
|
||||
businessAssayTaskDataAssessmentMap.put("id", businessSubSampleAssessment.getId());
|
||||
@@ -154,7 +160,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
businessAssayTaskDataAssessmentMap.put(businessSubSampleAssessment.getSimpleName(), businessSubSampleAssessment.getAssessmentValue());
|
||||
businessAssayTaskDataAssessmentMap.put("assessmentValue", businessSubSampleAssessment.getAssessmentValue());
|
||||
}
|
||||
} else if ("双杯".equals(businessAssayTaskDataExtendRespVO.getAssayType())) {
|
||||
} else if (QmsCommonConstant.ASSAY_TYPE_DOUBLE_CUP.equals(businessAssayTaskDataExtendRespVO.getAssayType())) {//双杯
|
||||
//businessTeamAssessmentMapper.selectBy
|
||||
}
|
||||
dataList.add(businessAssayTaskDataAssessmentMap);
|
||||
@@ -248,10 +254,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
//当前登录用户昵称
|
||||
String nickName = SecurityFrameworkUtils.getLoginUserNickname();
|
||||
|
||||
//班组长双杯判定记录
|
||||
// List<BusinessTeamAssessmentDO> businessTeamAssessmentDOList = new ArrayList<>();
|
||||
|
||||
//平行样判定记录
|
||||
//判定记录
|
||||
List<BusinessSubSampleAssessmentDO> saveBusinessSubSampleAssessmentDOList = new ArrayList<>();
|
||||
List<BusinessSubSampleAssessmentDO> updateBusinessSubSampleAssessmentDOList = new ArrayList<>();
|
||||
|
||||
@@ -262,19 +265,19 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
businessAssayTaskDO.setReportTime(LocalDateTime.now());
|
||||
businessAssayTaskDO.setReportOperator(SecurityFrameworkUtils.getLoginUserNickname());
|
||||
|
||||
//List<BusinessAssayTaskDetailDO> businessAssayTaskDetailDOList = businessAssayTaskDetailMapper.selectByBusinessAssayTaskId(businessAssayTaskId);
|
||||
|
||||
//查询分析任务明细
|
||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessAssayTaskId(businessAssayTaskId);
|
||||
|
||||
//根据子样分组
|
||||
Map<Long, List<BusinessAssayTaskDataDO>> businessAssayTaskDataDOMap = businessAssayTaskDataDOList.stream().collect(Collectors.groupingBy(BusinessAssayTaskDataDO::getBusinessSubSampleId));
|
||||
//循环分组
|
||||
for (Map.Entry<Long, List<BusinessAssayTaskDataDO>> businessAssayTaskDataDOMapEntry : businessAssayTaskDataDOMap.entrySet()) {
|
||||
|
||||
Long businessSubSampleId = businessAssayTaskDataDOMapEntry.getKey();
|
||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataList = businessAssayTaskDataDOMapEntry.getValue();
|
||||
List<Long> businessAssayTaskDataIdList = businessAssayTaskDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||
BusinessAssayTaskDataDO businessAssayTaskDataDO = businessAssayTaskDataList.get(0);
|
||||
|
||||
if ("平行".equals(businessAssayTaskDataDO.getAssayType())) {
|
||||
|
||||
if (QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL.equals(businessAssayTaskDataDO.getAssayType())) {
|
||||
//根据子样id及分析方法id,查询未上报的分析任务
|
||||
List<BusinessAssayTaskDataDO> unReportedList = businessAssayTaskDataMapper.selectIsReportedList(businessAssayTaskDataIdList, businessAssayTaskDataDO.getBusinessSubSampleId(), businessAssayTaskDataDO.getConfigAssayMethodId(), QmsCommonConstant.NO);
|
||||
if (unReportedList.size() > 0) {//还有未上报数据,直接处理,无需判定
|
||||
@@ -364,7 +367,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
}
|
||||
|
||||
|
||||
} else if ("双杯".equals(businessAssayTaskDataDO.getAssayType())) {
|
||||
} else if (QmsCommonConstant.ASSAY_TYPE_DOUBLE_CUP.equals(businessAssayTaskDataDO.getAssayType())) {
|
||||
|
||||
} else {//单杯
|
||||
|
||||
@@ -479,11 +482,11 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
if (unReportedList.size() > 0) {
|
||||
throw new ServiceException(1_032_100_000, "存在未上报的数据");
|
||||
}
|
||||
List<BusinessAssayReportDataDO> saveBusinessAssayReportDataDOList = new ArrayList<>();
|
||||
List<BusinessAssayReportDataDO> updateBusinessAssayReportDataDOList = new ArrayList<>();
|
||||
// List<BusinessAssayReportDataDO> saveBusinessAssayReportDataDOList = new ArrayList<>();
|
||||
// List<BusinessAssayReportDataDO> updateBusinessAssayReportDataDOList = new ArrayList<>();
|
||||
//分析任务已全部上报
|
||||
List<BusinessAssayTaskDataDO> reportedList = businessAssayTaskDataMapper.selectIsReportedList(null, businessSubSampleId, configAssayMethodId, QmsCommonConstant.YES);
|
||||
//平行样判定结果
|
||||
//判定结果
|
||||
List<BusinessSubSampleAssessmentExtendRespVO> businessSubSampleAssessmentList = businessSubSampleAssessmentMapper.selectByBusinessSubSampleIdAndConfigAssayMethodId(businessSubSampleId, configAssayMethodId);
|
||||
|
||||
List<Long> businessSubSampleAssessmentIdList = businessSubSampleAssessmentList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||
@@ -492,7 +495,12 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
|
||||
//查询主样
|
||||
BusinessBaseSampleDO businessBaseSampleDO = businessBaseSampleMapper.selectById(businessAssayTaskDataDO.getBusinessBaseSampleId());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
//查询报表
|
||||
List<BusinessAssayReportDataDO> businessAssayReportDataDOList = businessAssayReportDataMapper.selectBytBusinessBaseSampleId(businessAssayTaskDataDO.getBusinessBaseSampleId());
|
||||
|
||||
@@ -509,6 +517,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
//根据检测方法查询字段配置
|
||||
List<ConfigProjectExtendRespVO> configProjectList = configProjectMapper.selectByConfigAssayMethodId(configAssayMethodId);
|
||||
|
||||
|
||||
for (ConfigSampleReportExtendRespVO configSampleReport : configSampleReportList) {
|
||||
BusinessAssayReportDataDO businessAssayReportDataDO = businessAssayReportDataDOList.stream().filter(f -> f.getConfigReportTypeId().equals(configSampleReport.getConfigReportTypeId()) && f.getConfigSampleReportId().equals(configSampleReport.getId())).findFirst().orElse(null);
|
||||
if (businessAssayReportDataDO == null) {
|
||||
@@ -580,6 +589,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
if (updateBusinessAssayReportDataDOList.size() > 0) {
|
||||
businessAssayReportDataMapper.updateBatch(updateBusinessAssayReportDataDOList);
|
||||
}
|
||||
**/
|
||||
businessSubSampleAssessmentMapper.update(new LambdaUpdateWrapper<BusinessSubSampleAssessmentDO>()
|
||||
.set(BusinessSubSampleAssessmentDO::getIsReported, QmsCommonConstant.YES)
|
||||
.set(BusinessSubSampleAssessmentDO::getReporter, nickName)
|
||||
@@ -701,9 +711,13 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject modifyParallelResultAssessment(Long businessSubSampleId, Long configAssayMethodId, Long businessSubSampleAssessmentId, List<Long> businessAssayProjectDataIds) {
|
||||
BusinessSubSampleAssessmentDO businessSubSampleAssessmentDO = businessSubSampleAssessmentMapper.selectById(businessSubSampleAssessmentId);
|
||||
//查询子样
|
||||
BusinessSubSampleDO businessSubSampleDO = businessSubSampleMapper.selectById(businessSubSampleId);
|
||||
//查询子样与方法的配置
|
||||
ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodMapper.selectByConfigSubSampleIdAndConfigAssayMethodId(businessSubSampleDO.getConfigSubSampleId(), configAssayMethodId);
|
||||
|
||||
//计算平均值
|
||||
ConfigRuleDO calculateAverageValue = configRuleMapper.selectLatestConfigRuleByCode("calculateAverageValue");
|
||||
//计算判定值计算规则
|
||||
ConfigRuleDO calculateAssessmentValue = configRuleMapper.selectLatestConfigRuleByCode(configSubSampleMethodDO.getCalculateMethod());
|
||||
|
||||
BusinessAssayProjectDataReqVO businessAssayProjectDataSearch = new BusinessAssayProjectDataReqVO();
|
||||
businessAssayProjectDataSearch.setBusinessSubSampleId(businessSubSampleId);
|
||||
@@ -737,7 +751,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
||||
context.put("scale", elementScale);
|
||||
BigDecimal representativeValue = null;
|
||||
try {
|
||||
representativeValue = (BigDecimal) expressRunner.execute(calculateAverageValue.getExpression(), context, null, false, false);
|
||||
representativeValue = (BigDecimal) expressRunner.execute(calculateAssessmentValue.getExpression(), context, null, false, false);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.qms.business.config.dal.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
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;
|
||||
@@ -42,5 +43,11 @@ public interface ConfigSubSampleMethodMapper extends BaseMapperX<ConfigSubSample
|
||||
.eq(ConfigSubSampleMethodDO::getConfigSubSampleId, configSubSampleId)
|
||||
.eq(ConfigAssayMethodDO::getAssayDepartmentId, assayDepartmentId));
|
||||
}
|
||||
|
||||
default ConfigSubSampleMethodDO selectByConfigSubSampleIdAndConfigAssayMethodId(Long configSubSampleId, Long configAssayMethodId) {
|
||||
return selectOne(new LambdaQueryWrapper<ConfigSubSampleMethodDO>()
|
||||
.eq(ConfigSubSampleMethodDO::getConfigSubSampleId, configSubSampleId)
|
||||
.eq(ConfigSubSampleMethodDO::getConfigAssayMethodId, configAssayMethodId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,6 +22,9 @@
|
||||
tbatd.IS_ASN_TSKD = 0
|
||||
AND tbatd.IS_RPOD = 0
|
||||
AND tbatd.DELETED = 0
|
||||
<if test="reqVO.assayDepartmentId != null and reqVO.assayDepartmentId != ''">
|
||||
AND tbatd.ASY_DEPT_ID = #{reqVO.assayDepartmentId}
|
||||
</if>
|
||||
<if test="reqVO.sampleFlowNodeKey != null and reqVO.sampleFlowNodeKey != ''">
|
||||
AND tbatd.SMP_FLW_NDE_KY = #{reqVO.sampleFlowNodeKey}
|
||||
</if>
|
||||
@@ -32,7 +35,7 @@
|
||||
tbatd.CFG_ASY_MTHD_ID,
|
||||
tcam.NAME
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectUnAuditTaskGroupList" resultType="com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayTaskDataGroupRespVO">
|
||||
SELECT
|
||||
tbatd.CFG_ASY_MTHD_ID AS configAssayMethodId,
|
||||
|
||||
Reference in New Issue
Block a user