Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -47,7 +47,7 @@ public interface ErrorCodeConstants {
|
|||||||
ErrorCode CONFIG_SUB_SAMPLE_PARENT_NOT_EXISTS = new ErrorCode(1_032_050_000, "分样配置不存在");
|
ErrorCode CONFIG_SUB_SAMPLE_PARENT_NOT_EXISTS = new ErrorCode(1_032_050_000, "分样配置不存在");
|
||||||
ErrorCode CONFIG_SUB_SAMPLE_PARENT_METHOD_NOT_EXISTS = new ErrorCode(1_032_050_000, "分样与检测方法配置不存在");
|
ErrorCode CONFIG_SUB_SAMPLE_PARENT_METHOD_NOT_EXISTS = new ErrorCode(1_032_050_000, "分样与检测方法配置不存在");
|
||||||
//ErrorCode CONFIG_SUB_SAMPLE_PARENT_RECHECK_NOT_EXISTS = new ErrorCode(1_032_050_000, "分样与复检配置不存在");
|
//ErrorCode CONFIG_SUB_SAMPLE_PARENT_RECHECK_NOT_EXISTS = new ErrorCode(1_032_050_000, "分样与复检配置不存在");
|
||||||
ErrorCode CONFIG_SUB_SAMPLE_METHOD_NOT_EXISTS = new ErrorCode(1_032_050_000, "子样与检测方法配置不存在");
|
ErrorCode CONFIG_SUB_SAMPLE_METHOD_NOT_EXISTS = new ErrorCode(1_032_050_000, "子样与分样检测方法配置表不存在");
|
||||||
ErrorCode CONFIG_SUB_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_050_000, "子样配置不存在");
|
ErrorCode CONFIG_SUB_SAMPLE_NOT_EXISTS = new ErrorCode(1_032_050_000, "子样配置不存在");
|
||||||
ErrorCode CONFIG_SAMPLE_REPORT_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品报表关系不存在");
|
ErrorCode CONFIG_SAMPLE_REPORT_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品报表关系不存在");
|
||||||
ErrorCode CONFIG_SAMPLE_FLOW_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品流程配置不存在");
|
ErrorCode CONFIG_SAMPLE_FLOW_NOT_EXISTS = new ErrorCode(1_032_050_000, "样品流程配置不存在");
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
|
|
||||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||||
@@ -20,6 +21,8 @@ import com.zt.plat.module.qms.business.bus.liteflow.param.SampleTaskAssignMethod
|
|||||||
import com.zt.plat.module.qms.business.bus.liteflow.param.SampleTaskAssignSampleParam;
|
import com.zt.plat.module.qms.business.bus.liteflow.param.SampleTaskAssignSampleParam;
|
||||||
import com.zt.plat.module.qms.business.bus.service.SampleTaskAssignService;
|
import com.zt.plat.module.qms.business.bus.service.SampleTaskAssignService;
|
||||||
import com.zt.plat.module.system.api.user.dto.AdminUserRespDTO;
|
import com.zt.plat.module.system.api.user.dto.AdminUserRespDTO;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
@@ -53,11 +56,20 @@ public class SampleTaskAssignController implements BusinessControllerMarker {
|
|||||||
return success(list);
|
return success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
@GetMapping("/getAssayMethodList")
|
@GetMapping("/getAssayMethodList")
|
||||||
public CommonResult<?> getAssayMethodList(Long businessSubSampleId, Long configAssayMethodId) {
|
public CommonResult<?> getAssayMethodList(Long businessSubSampleId, Long configAssayMethodId) {
|
||||||
List<Object> list = sampleTaskAssignService.getAssayMethodList(businessSubSampleId, configAssayMethodId);
|
List<Object> list = sampleTaskAssignService.getAssayMethodList(businessSubSampleId, configAssayMethodId);
|
||||||
return success(list);
|
return success(list);
|
||||||
}
|
}
|
||||||
|
**/
|
||||||
|
|
||||||
|
@GetMapping("/getAssayMethodProjectList")
|
||||||
|
public CommonResult<?> getAssayMethodProjectList(String businessSubSampleIds, Long configAssayMethodId) {
|
||||||
|
List<Long> businessSubSampleIdList = Arrays.asList(businessSubSampleIds.split(",")).stream().map(Long::parseLong).toList();
|
||||||
|
List<AssayMethodProjectRespVO> list = sampleTaskAssignService.getAssayMethodProjectList(businessSubSampleIdList, configAssayMethodId);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/changeMethod")
|
@PostMapping("/changeMethod")
|
||||||
public CommonResult<?> changeMethod(@RequestBody ChangeAssayMethodReqVO req) {
|
public CommonResult<?> changeMethod(@RequestBody ChangeAssayMethodReqVO req) {
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodProjectExtendRespVO;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AssayMethodProjectRespVO {
|
||||||
|
|
||||||
|
private Long dictionaryProjectId;
|
||||||
|
|
||||||
|
private String dictionaryProjectName;
|
||||||
|
|
||||||
|
private String dictionaryProjectSimpleName;
|
||||||
|
|
||||||
|
private String dictionaryProjectShowName;
|
||||||
|
|
||||||
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
|
private String configAssayMethodName;
|
||||||
|
|
||||||
|
@Schema(description = "检测方法配置名称及类别")
|
||||||
|
private String configAssayMethodNameAndCategory;
|
||||||
|
|
||||||
|
private List<ConfigAssayMethodProjectExtendRespVO> methodList;
|
||||||
|
}
|
||||||
@@ -117,6 +117,9 @@ public class BusinessAssayTaskDataReqVO {
|
|||||||
|
|
||||||
@Schema(description = "样品编号")
|
@Schema(description = "样品编号")
|
||||||
private String sampleCode;
|
private String sampleCode;
|
||||||
|
|
||||||
|
@Schema(description = "样品名称")
|
||||||
|
private String sampleName;
|
||||||
|
|
||||||
@Schema(description = "分析编号")
|
@Schema(description = "分析编号")
|
||||||
private String sampleAssayCode;
|
private String sampleAssayCode;
|
||||||
|
|||||||
@@ -5,6 +5,12 @@ import lombok.Data;
|
|||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class BusinessSubParentSampleAssessmentExtendRespVO extends BusinessSubParentSampleAssessmentRespVO {
|
public class BusinessSubParentSampleAssessmentExtendRespVO extends BusinessSubParentSampleAssessmentRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "主样id")
|
||||||
|
private Long businessBaseSampleId;
|
||||||
|
|
||||||
|
@Schema(description = "分样配置id")
|
||||||
|
private Long configSubSampleParentId;
|
||||||
|
|
||||||
@Schema(description = "检测项目key")
|
@Schema(description = "检测项目key")
|
||||||
private String dictionaryProjectKey;
|
private String dictionaryProjectKey;
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ public class BusinessXRFDataPageReqVO extends PageParam {
|
|||||||
|
|
||||||
@Schema(description = "检测任务ID", example = "16505")
|
@Schema(description = "检测任务ID", example = "16505")
|
||||||
private Long businessAssayTaskDataId;
|
private Long businessAssayTaskDataId;
|
||||||
|
|
||||||
|
@Schema(description = "检测任务ID", example = "940")
|
||||||
|
private Long businessQCManagementDataId;
|
||||||
|
|
||||||
@Schema(description = "检测数据")
|
@Schema(description = "检测数据")
|
||||||
private String assayData;
|
private String assayData;
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ public class BusinessXRFDataReqVO {
|
|||||||
|
|
||||||
@Schema(description = "检测任务ID", example = "16505")
|
@Schema(description = "检测任务ID", example = "16505")
|
||||||
private Long businessAssayTaskDataId;
|
private Long businessAssayTaskDataId;
|
||||||
|
|
||||||
|
@Schema(description = "检测任务ID", example = "940")
|
||||||
|
private Long businessQCManagementDataId;
|
||||||
|
|
||||||
@Schema(description = "检测数据")
|
@Schema(description = "检测数据")
|
||||||
private String assayData;
|
private String assayData;
|
||||||
|
|||||||
@@ -58,6 +58,9 @@ public class BusinessXRFDataRespVO {
|
|||||||
|
|
||||||
@Schema(description = "检测任务ID", example = "16505")
|
@Schema(description = "检测任务ID", example = "16505")
|
||||||
private Long businessAssayTaskDataId;
|
private Long businessAssayTaskDataId;
|
||||||
|
|
||||||
|
@Schema(description = "检测任务ID", example = "940")
|
||||||
|
private Long businessQCManagementDataId;
|
||||||
|
|
||||||
@Schema(description = "检测数据", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "检测数据", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@ExcelProperty("检测数据")
|
@ExcelProperty("检测数据")
|
||||||
|
|||||||
@@ -51,6 +51,9 @@ public class BusinessXRFDataSaveReqVO {
|
|||||||
|
|
||||||
@Schema(description = "检测任务ID", example = "16505")
|
@Schema(description = "检测任务ID", example = "16505")
|
||||||
private Long businessAssayTaskDataId;
|
private Long businessAssayTaskDataId;
|
||||||
|
|
||||||
|
@Schema(description = "检测任务ID", example = "940")
|
||||||
|
private Long businessQCManagementDataId;
|
||||||
|
|
||||||
@Schema(description = "检测数据", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "检测数据", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotEmpty(message = "检测数据不能为空")
|
@NotEmpty(message = "检测数据不能为空")
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class ChangeAssayMethodReqVO {
|
public class ChangeAssayMethodReqVO {
|
||||||
|
|
||||||
private Long businessSubSampleId;
|
private List<Long> businessSubSampleIdList;
|
||||||
|
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
private List<Long> changeConfigAssayMethodIdList;
|
private List<AssayMethodProjectRespVO> changeConfigAssayMethodProjectList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,12 @@ public class UnAssignTaskedSubSampleRespVO implements Serializable {
|
|||||||
|
|
||||||
@Schema(description = "检测方法配置ID", example = "9130")
|
@Schema(description = "检测方法配置ID", example = "9130")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
|
@Schema(description = "分析方法名称")
|
||||||
|
private String configAssayMethodName;
|
||||||
|
|
||||||
|
@Schema(description = "检测方法配置名称及类别")
|
||||||
|
private String configAssayMethodNameAndCategory;
|
||||||
|
|
||||||
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯-single_cup、双杯-double_cup、平行-single_parallel...", example = "2")
|
@Schema(description = "分析类型,【字典】【jy_sample_assay_type】单杯-single_cup、双杯-double_cup、平行-single_parallel...", example = "2")
|
||||||
private String assayType;
|
private String assayType;
|
||||||
|
|||||||
@@ -89,6 +89,11 @@ public class BusinessXRFDataDO extends BusinessBaseDO {
|
|||||||
@TableField("BSN_ASY_TSK_DAT_ID")
|
@TableField("BSN_ASY_TSK_DAT_ID")
|
||||||
private Long businessAssayTaskDataId;
|
private Long businessAssayTaskDataId;
|
||||||
/**
|
/**
|
||||||
|
* 检测任务ID
|
||||||
|
*/
|
||||||
|
@TableField("BSN_QC_MNGT_DAT_ID")
|
||||||
|
private Long businessQCManagementDataId;
|
||||||
|
/**
|
||||||
* 检测数据
|
* 检测数据
|
||||||
*/
|
*/
|
||||||
@TableField("ASY_DAT")
|
@TableField("ASY_DAT")
|
||||||
|
|||||||
@@ -6,9 +6,6 @@ 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.LambdaQueryWrapperX;
|
||||||
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
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.*;
|
||||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectAndParameterRespVO;
|
|
||||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectDataPageReqVO;
|
|
||||||
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayProjectDataReqVO;
|
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||||
@@ -17,6 +14,7 @@ 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.module.qms.common.dic.dal.dataobject.DictionaryBusinessDO;
|
||||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测项目数据业务 Mapper
|
* 检测项目数据业务 Mapper
|
||||||
@@ -97,11 +95,17 @@ public interface BusinessAssayProjectDataMapper extends BaseMapperX<BusinessAssa
|
|||||||
|
|
||||||
default List<BusinessAssayProjectDataExtendRespVO> selectByBusinessAssayTaskDataIds(List<Long> businessAssayTaskDataIds) {
|
default List<BusinessAssayProjectDataExtendRespVO> selectByBusinessAssayTaskDataIds(List<Long> businessAssayTaskDataIds) {
|
||||||
return selectJoinList(BusinessAssayProjectDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayProjectDataDO>()
|
return selectJoinList(BusinessAssayProjectDataExtendRespVO.class, new MPJLambdaWrapperX<BusinessAssayProjectDataDO>()
|
||||||
|
.leftJoin(BusinessAssayTaskDataDO.class, BusinessAssayTaskDataDO::getId, BusinessAssayProjectDataDO::getBusinessAssayTaskDataId)
|
||||||
.leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessAssayProjectDataDO::getDictionaryProjectId)
|
.leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, BusinessAssayProjectDataDO::getDictionaryProjectId)
|
||||||
.selectAll(BusinessAssayProjectDataDO.class)
|
.selectAll(BusinessAssayProjectDataDO.class)
|
||||||
.selectAs(DictionaryProjectDO::getKey, BusinessAssayProjectDataExtendRespVO::getDictionaryProjectKey)
|
.selectAs(DictionaryProjectDO::getKey, BusinessAssayProjectDataExtendRespVO::getDictionaryProjectKey)
|
||||||
.selectAs(DictionaryProjectDO::getSimpleName, BusinessAssayProjectDataExtendRespVO::getSimpleName)
|
.selectAs(DictionaryProjectDO::getSimpleName, BusinessAssayProjectDataExtendRespVO::getSimpleName)
|
||||||
.selectAs(DictionaryProjectDO::getShowName, BusinessAssayProjectDataExtendRespVO::getShowName)
|
.selectAs(DictionaryProjectDO::getShowName, BusinessAssayProjectDataExtendRespVO::getShowName)
|
||||||
|
.selectAs(BusinessAssayTaskDataDO::getAssayOperator, BusinessAssayProjectDataExtendRespVO::getAssayOperator)
|
||||||
|
.selectAs(BusinessAssayTaskDataDO::getAnalysisCount, BusinessAssayProjectDataExtendRespVO::getAnalysisCount)
|
||||||
|
.selectAs(BusinessAssayTaskDataDO::getBusinessBaseSampleId, BusinessAssayProjectDataExtendRespVO::getBusinessBaseSampleId)
|
||||||
|
.selectAs(BusinessAssayTaskDataDO::getBusinessSubParentSampleId, BusinessAssayProjectDataExtendRespVO::getBusinessSubParentSampleId)
|
||||||
|
.selectAs(BusinessAssayTaskDataDO::getBusinessSubSampleId, BusinessAssayProjectDataExtendRespVO::getBusinessSubSampleId)
|
||||||
.in(BusinessAssayProjectDataDO::getBusinessAssayTaskDataId, businessAssayTaskDataIds));
|
.in(BusinessAssayProjectDataDO::getBusinessAssayTaskDataId, businessAssayTaskDataIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,4 +134,6 @@ public interface BusinessAssayProjectDataMapper extends BaseMapperX<BusinessAssa
|
|||||||
.eqIfPresent(BusinessAssayProjectDataDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId()));
|
.eqIfPresent(BusinessAssayProjectDataDO::getConfigAssayMethodProjectId, reqVO.getConfigAssayMethodProjectId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<AssayMethodProjectRespVO> selectAssayMethodProjectByBusinessSubSampleIdListAndConfigAssayMethodId(@Param("businessSubSampleIdList")List<Long> businessSubSampleIdList, @Param("configAssayMethodId") Long configAssayMethodId);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -46,6 +46,11 @@ public interface BusinessAssayReportDataMapper extends BaseMapperX<BusinessAssay
|
|||||||
.eqIfPresent(BusinessAssayReportDataDO::getBusinessBaseSampleId, businessBaseSampleId));
|
.eqIfPresent(BusinessAssayReportDataDO::getBusinessBaseSampleId, businessBaseSampleId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default List<BusinessAssayReportDataDO> selectBytBusinessBaseSampleIds(List<Long> businessBaseSampleIds) {
|
||||||
|
return selectList(new LambdaQueryWrapperX<BusinessAssayReportDataDO>()
|
||||||
|
.inIfPresent(BusinessAssayReportDataDO::getBusinessBaseSampleId, businessBaseSampleIds));
|
||||||
|
}
|
||||||
|
|
||||||
//查询报告待编制数据
|
//查询报告待编制数据
|
||||||
Page<BusinessAssayReportDataDO> queryWaitingDataForReport(IPage<?> page, @Param("param") BusinessAssayReportDataPageReqVO param);
|
Page<BusinessAssayReportDataDO> queryWaitingDataForReport(IPage<?> page, @Param("param") BusinessAssayReportDataPageReqVO param);
|
||||||
|
|
||||||
|
|||||||
@@ -420,7 +420,7 @@ public interface BusinessAssayTaskDataMapper extends BaseMapperX<BusinessAssayTa
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据分样查询分析任务
|
* 根据分样查询分析任务
|
||||||
* @param businessSubParentSampleIds 分样样id
|
* @param businessSubParentSampleIds 分样样id列表
|
||||||
* @param configAssayMethodId 分析方法
|
* @param configAssayMethodId 分析方法
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
|||||||
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
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.*;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleAssessmentDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleAssessmentDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
||||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
@@ -49,9 +50,12 @@ public interface BusinessSubParentSampleAssessmentMapper extends BaseMapperX<Bus
|
|||||||
.eq(BusinessSubParentSampleAssessmentDO::getConfigAssayMethodId, configAssayMethodId));
|
.eq(BusinessSubParentSampleAssessmentDO::getConfigAssayMethodId, configAssayMethodId));
|
||||||
}
|
}
|
||||||
|
|
||||||
default List<BusinessSubParentSampleAssessmentDO> selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(List<Long> businessSubParentSampleIds,
|
default List<BusinessSubParentSampleAssessmentExtendRespVO> selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(List<Long> businessSubParentSampleIds, Long configAssayMethodId) {
|
||||||
Long configAssayMethodId) {
|
return selectJoinList(BusinessSubParentSampleAssessmentExtendRespVO.class, new MPJLambdaWrapperX<BusinessSubParentSampleAssessmentDO>()
|
||||||
return selectList(new LambdaQueryWrapperX<BusinessSubParentSampleAssessmentDO>()
|
.leftJoin(BusinessSubParentSampleDO.class, BusinessSubParentSampleDO::getId, BusinessSubParentSampleAssessmentDO::getBusinessSubParentSampleId)
|
||||||
|
.selectAll(BusinessSubParentSampleAssessmentDO.class)
|
||||||
|
.selectAs(BusinessSubParentSampleDO::getConfigSubSampleParentId, BusinessSubParentSampleAssessmentExtendRespVO::getConfigSubSampleParentId)
|
||||||
|
.selectAs(BusinessSubParentSampleDO::getBusinessBaseSampleId, BusinessSubParentSampleAssessmentExtendRespVO::getBusinessBaseSampleId)
|
||||||
.in(BusinessSubParentSampleAssessmentDO::getBusinessSubParentSampleId, businessSubParentSampleIds)
|
.in(BusinessSubParentSampleAssessmentDO::getBusinessSubParentSampleId, businessSubParentSampleIds)
|
||||||
.eq(BusinessSubParentSampleAssessmentDO::getConfigAssayMethodId, configAssayMethodId));
|
.eq(BusinessSubParentSampleAssessmentDO::getConfigAssayMethodId, configAssayMethodId));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,18 @@ public interface BusinessSubSampleAssessmentMapper extends BaseMapperX<BusinessS
|
|||||||
.orderByDesc(BusinessSubSampleAssessmentDO::getId));
|
.orderByDesc(BusinessSubSampleAssessmentDO::getId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default BusinessSubSampleAssessmentDO selectByBusinessSubParentSampleIdAndConfigAssayMethodId(Long businessSubParentSampleId, Long configAssayMethodId) {
|
||||||
|
return selectOne(new LambdaQueryWrapperX<BusinessSubSampleAssessmentDO>()
|
||||||
|
.eq(BusinessSubSampleAssessmentDO::getBusinessSubParentSampleId, businessSubParentSampleId)
|
||||||
|
.eq(BusinessSubSampleAssessmentDO::getConfigAssayMethodId, configAssayMethodId));
|
||||||
|
}
|
||||||
|
|
||||||
|
default List<BusinessSubSampleAssessmentDO> selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(List<Long> businessSubParentSampleIds, Long configAssayMethodId) {
|
||||||
|
return selectList(new LambdaQueryWrapperX<BusinessSubSampleAssessmentDO>()
|
||||||
|
.in(BusinessSubSampleAssessmentDO::getBusinessSubParentSampleId, businessSubParentSampleIds)
|
||||||
|
.eq(BusinessSubSampleAssessmentDO::getConfigAssayMethodId, configAssayMethodId));
|
||||||
|
}
|
||||||
|
|
||||||
default BusinessSubSampleAssessmentDO selectByBusinessSubSampleIdAndConfigAssayMethodId(Long businessSubSampleId, Long configAssayMethodId) {
|
default BusinessSubSampleAssessmentDO selectByBusinessSubSampleIdAndConfigAssayMethodId(Long businessSubSampleId, Long configAssayMethodId) {
|
||||||
return selectOne(new LambdaQueryWrapperX<BusinessSubSampleAssessmentDO>()
|
return selectOne(new LambdaQueryWrapperX<BusinessSubSampleAssessmentDO>()
|
||||||
.eq(BusinessSubSampleAssessmentDO::getBusinessSubSampleId, businessSubSampleId)
|
.eq(BusinessSubSampleAssessmentDO::getBusinessSubSampleId, businessSubSampleId)
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ public interface BusinessXRFDataMapper extends BaseMapperX<BusinessXRFDataDO> {
|
|||||||
.eqIfPresent(BusinessXRFDataDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId())
|
.eqIfPresent(BusinessXRFDataDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId())
|
||||||
.eqIfPresent(BusinessXRFDataDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId())
|
.eqIfPresent(BusinessXRFDataDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId())
|
||||||
.eqIfPresent(BusinessXRFDataDO::getBusinessAssayTaskDataId, reqVO.getBusinessAssayTaskDataId())
|
.eqIfPresent(BusinessXRFDataDO::getBusinessAssayTaskDataId, reqVO.getBusinessAssayTaskDataId())
|
||||||
|
.eqIfPresent(BusinessXRFDataDO::getBusinessQCManagementDataId, reqVO.getBusinessQCManagementDataId())
|
||||||
.eqIfPresent(BusinessXRFDataDO::getAssayData, reqVO.getAssayData())
|
.eqIfPresent(BusinessXRFDataDO::getAssayData, reqVO.getAssayData())
|
||||||
.eqIfPresent(BusinessXRFDataDO::getIsCheckCreate, reqVO.getIsCheckCreate())
|
.eqIfPresent(BusinessXRFDataDO::getIsCheckCreate, reqVO.getIsCheckCreate())
|
||||||
.eqIfPresent(BusinessXRFDataDO::getIsMatched, reqVO.getIsMatched())
|
.eqIfPresent(BusinessXRFDataDO::getIsMatched, reqVO.getIsMatched())
|
||||||
@@ -57,6 +58,7 @@ public interface BusinessXRFDataMapper extends BaseMapperX<BusinessXRFDataDO> {
|
|||||||
.eqIfPresent(BusinessXRFDataDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId())
|
.eqIfPresent(BusinessXRFDataDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId())
|
||||||
.eqIfPresent(BusinessXRFDataDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId())
|
.eqIfPresent(BusinessXRFDataDO::getBusinessSubSampleId, reqVO.getBusinessSubSampleId())
|
||||||
.eqIfPresent(BusinessXRFDataDO::getBusinessAssayTaskDataId, reqVO.getBusinessAssayTaskDataId())
|
.eqIfPresent(BusinessXRFDataDO::getBusinessAssayTaskDataId, reqVO.getBusinessAssayTaskDataId())
|
||||||
|
.eqIfPresent(BusinessXRFDataDO::getBusinessQCManagementDataId, reqVO.getBusinessQCManagementDataId())
|
||||||
.eqIfPresent(BusinessXRFDataDO::getAssayData, reqVO.getAssayData())
|
.eqIfPresent(BusinessXRFDataDO::getAssayData, reqVO.getAssayData())
|
||||||
.eqIfPresent(BusinessXRFDataDO::getIsCheckCreate, reqVO.getIsCheckCreate())
|
.eqIfPresent(BusinessXRFDataDO::getIsCheckCreate, reqVO.getIsCheckCreate())
|
||||||
.eqIfPresent(BusinessXRFDataDO::getIsMatched, reqVO.getIsMatched())
|
.eqIfPresent(BusinessXRFDataDO::getIsMatched, reqVO.getIsMatched())
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ 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.ConfigAssayMethodProjectExtendRespVO;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfAdd;
|
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.controller.vo.ConfigSubSampleMethodConfInfo;
|
||||||
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodExtendRespVO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.BaseSampleDO;
|
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.ConfigAssayMethodDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectParameterDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectParameterDO;
|
||||||
@@ -205,7 +206,7 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
List<ConfigSubSampleDO> configSubSampleList = configSubSampleMapper.selectByBaseSampleIds(baseSampleIdList);
|
List<ConfigSubSampleDO> configSubSampleList = configSubSampleMapper.selectByBaseSampleIds(baseSampleIdList);
|
||||||
List<Long> configSubSampleIdList = configSubSampleList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
List<Long> configSubSampleIdList = configSubSampleList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
//子样分析方法配置
|
//子样分析方法配置
|
||||||
List<ConfigSubSampleMethodDO> configSubSampleMethodList = configSubSampleMethodMapper.selectByConfigSubSampleIds(configSubSampleIdList);
|
List<ConfigSubSampleMethodExtendRespVO> configSubSampleMethodList = configSubSampleMethodMapper.selectByConfigSubSampleIds(configSubSampleIdList);
|
||||||
List<Long> configAssayMethodIdList = configSubSampleMethodList.stream().map(m -> m.getConfigAssayMethodId()).distinct().collect(Collectors.toList());
|
List<Long> configAssayMethodIdList = configSubSampleMethodList.stream().map(m -> m.getConfigAssayMethodId()).distinct().collect(Collectors.toList());
|
||||||
//分析方法配置
|
//分析方法配置
|
||||||
List<ConfigAssayMethodDO> configAssayMethodList = configAssayMethodMapper.selectByIds(configAssayMethodIdList);
|
List<ConfigAssayMethodDO> configAssayMethodList = configAssayMethodMapper.selectByIds(configAssayMethodIdList);
|
||||||
@@ -413,7 +414,7 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
ConfigAssayMethodDO configAssayMethodDO = configAssayMethodList.stream().filter(f -> f.getId().equals(configAssayMethodId)).findFirst().orElse(null);
|
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);
|
ConfigSubSampleMethodExtendRespVO 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();
|
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
|
||||||
@@ -638,7 +639,7 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addAssayTask(LocalDateTime currentDateTime, List<ConfigSubSampleMethodDO> configSubSampleMethodList,
|
private void addAssayTask(LocalDateTime currentDateTime, List<ConfigSubSampleMethodExtendRespVO> configSubSampleMethodList,
|
||||||
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectList,
|
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectList,
|
||||||
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterList,
|
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterList,
|
||||||
List<DictionaryProjectDO> dictionaryProjectList,
|
List<DictionaryProjectDO> dictionaryProjectList,
|
||||||
@@ -655,7 +656,7 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
|||||||
Long addAssayTaskAssayDepartmentId = addAssayTaskConfigAssayMethod.getAssayDepartmentId();
|
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);
|
ConfigSubSampleMethodExtendRespVO 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);
|
businessSubSampleAnalysisGroupDO = businessSubSampleAnalysisGroupDOList.stream().filter(f -> f.getBusinessSubSampleId().equals(businessSubSampleDO.getId()) && f.getAssayDepartmentId().equals(addAssayTaskAssayDepartmentId)).findFirst().orElse(null);
|
||||||
if (businessSubSampleAnalysisGroupDO == null) {
|
if (businessSubSampleAnalysisGroupDO == null) {
|
||||||
|
|||||||
@@ -459,7 +459,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
|||||||
|
|
||||||
BusinessSubSampleDO businessSubSampleDO = businessSubSampleMapper.selectById(businessSubSampleId);
|
BusinessSubSampleDO businessSubSampleDO = businessSubSampleMapper.selectById(businessSubSampleId);
|
||||||
//获取子样分析方法配置
|
//获取子样分析方法配置
|
||||||
ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodMapper.selectByConfigSubSampleIdAndConfigAssayMethodId(businessSubSampleDO.getConfigSubSampleId(), businessAssayTaskDataDO.getConfigAssayMethodId());
|
ConfigSubSampleMethodExtendRespVO configSubSampleMethodDO = configSubSampleMethodMapper.selectByConfigSubSampleIdAndConfigAssayMethodId(businessSubSampleDO.getConfigSubSampleId(), businessAssayTaskDataDO.getConfigAssayMethodId());
|
||||||
|
|
||||||
if (QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL.equals(businessAssayTaskDataDO.getAssayType())) {
|
if (QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL.equals(businessAssayTaskDataDO.getAssayType())) {
|
||||||
//根据子样id及分析方法id,查询未上报的分析任务
|
//根据子样id及分析方法id,查询未上报的分析任务
|
||||||
@@ -954,7 +954,7 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
|||||||
//查询子样
|
//查询子样
|
||||||
BusinessSubSampleDO businessSubSampleDO = businessSubSampleMapper.selectById(businessSubSampleId);
|
BusinessSubSampleDO businessSubSampleDO = businessSubSampleMapper.selectById(businessSubSampleId);
|
||||||
//查询子样与方法的配置
|
//查询子样与方法的配置
|
||||||
ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodMapper.selectByConfigSubSampleIdAndConfigAssayMethodId(businessSubSampleDO.getConfigSubSampleId(), configAssayMethodId);
|
ConfigSubSampleMethodExtendRespVO configSubSampleMethodDO = configSubSampleMethodMapper.selectByConfigSubSampleIdAndConfigAssayMethodId(businessSubSampleDO.getConfigSubSampleId(), configAssayMethodId);
|
||||||
|
|
||||||
//计算判定值计算规则
|
//计算判定值计算规则
|
||||||
ConfigRuleDO calculateAssessmentValue = configRuleMapper.selectLatestConfigRuleByCode(configSubSampleMethodDO.getCalculateMethod());
|
ConfigRuleDO calculateAssessmentValue = configRuleMapper.selectLatestConfigRuleByCode(configSubSampleMethodDO.getCalculateMethod());
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ import com.zt.plat.module.qms.business.config.controller.vo.ConfigQCSampleMethod
|
|||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfInfo;
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfInfo;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfItem;
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfItem;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfPoint;
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfPoint;
|
||||||
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodExtendRespVO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.BaseSampleDO;
|
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.ConfigAssayMethodDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectCoefficientDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectCoefficientDO;
|
||||||
@@ -201,7 +202,7 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
List<Long> configSubSampleIdList = businessSubSampleDOList.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
|
List<Long> configSubSampleIdList = businessSubSampleDOList.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
//子样方法配置列表
|
//子样方法配置列表
|
||||||
List<ConfigSubSampleMethodDO> configSubSampleMethodDOList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodId(configSubSampleIdList, businessAssayTaskDO.getConfigAssayMethodId());
|
List<ConfigSubSampleMethodExtendRespVO> configSubSampleMethodDOList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodId(configSubSampleIdList, businessAssayTaskDO.getConfigAssayMethodId());
|
||||||
|
|
||||||
|
|
||||||
BusinessAssayProjectDataReqVO projectDataSearch = new BusinessAssayProjectDataReqVO();
|
BusinessAssayProjectDataReqVO projectDataSearch = new BusinessAssayProjectDataReqVO();
|
||||||
@@ -242,7 +243,7 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
|
|
||||||
|
|
||||||
BusinessSubSampleDO businessSubSampleDO = businessSubSampleDOList.stream().filter(f -> f.getId().equals(businessAssayTaskDataDO.getBusinessSubSampleId())).findFirst().orElse(null);
|
BusinessSubSampleDO businessSubSampleDO = businessSubSampleDOList.stream().filter(f -> f.getId().equals(businessAssayTaskDataDO.getBusinessSubSampleId())).findFirst().orElse(null);
|
||||||
ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodDOList.stream().filter(f -> f.getConfigAssayMethodId().equals(businessAssayTaskDataDO.getConfigAssayMethodId()) && f.getConfigSubSampleId().equals(businessSubSampleDO.getConfigSubSampleId())).findFirst().orElse(null);
|
ConfigSubSampleMethodExtendRespVO configSubSampleMethodDO = configSubSampleMethodDOList.stream().filter(f -> f.getConfigAssayMethodId().equals(businessAssayTaskDataDO.getConfigAssayMethodId()) && f.getConfigSubSampleId().equals(businessSubSampleDO.getConfigSubSampleId())).findFirst().orElse(null);
|
||||||
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
|
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
|
||||||
if (StringUtils.isNotBlank(configInfomation)) {
|
if (StringUtils.isNotBlank(configInfomation)) {
|
||||||
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
|
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
|
||||||
@@ -558,7 +559,7 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
List<Long> configSubSampleIdList = businessSubSampleDOList.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
|
List<Long> configSubSampleIdList = businessSubSampleDOList.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
//子样方法配置列表
|
//子样方法配置列表
|
||||||
List<ConfigSubSampleMethodDO> configSubSampleMethodDOList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodId(configSubSampleIdList, businessAssayTaskDO.getConfigAssayMethodId());
|
List<ConfigSubSampleMethodExtendRespVO> configSubSampleMethodDOList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodId(configSubSampleIdList, businessAssayTaskDO.getConfigAssayMethodId());
|
||||||
|
|
||||||
|
|
||||||
List<Long> businessAssayTaskDataIdList = businessAssayTaskDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
List<Long> businessAssayTaskDataIdList = businessAssayTaskDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
@@ -599,7 +600,7 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
BusinessAssayTaskDetailDO businessAssayTaskDetailDO = businessAssayTaskDetailList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(businessAssayTaskDataDO.getId())).findFirst().orElse(null);
|
BusinessAssayTaskDetailDO businessAssayTaskDetailDO = businessAssayTaskDetailList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(businessAssayTaskDataDO.getId())).findFirst().orElse(null);
|
||||||
|
|
||||||
BusinessSubSampleDO businessSubSampleDO = businessSubSampleDOList.stream().filter(f -> f.getId().equals(businessAssayTaskDataDO.getBusinessSubSampleId())).findFirst().orElse(null);
|
BusinessSubSampleDO businessSubSampleDO = businessSubSampleDOList.stream().filter(f -> f.getId().equals(businessAssayTaskDataDO.getBusinessSubSampleId())).findFirst().orElse(null);
|
||||||
ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodDOList.stream().filter(f -> f.getConfigAssayMethodId().equals(businessAssayTaskDataDO.getConfigAssayMethodId()) && f.getConfigSubSampleId().equals(businessSubSampleDO.getConfigSubSampleId())).findFirst().orElse(null);
|
ConfigSubSampleMethodExtendRespVO configSubSampleMethodDO = configSubSampleMethodDOList.stream().filter(f -> f.getConfigAssayMethodId().equals(businessAssayTaskDataDO.getConfigAssayMethodId()) && f.getConfigSubSampleId().equals(businessSubSampleDO.getConfigSubSampleId())).findFirst().orElse(null);
|
||||||
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
|
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
|
||||||
if (StringUtils.isNotBlank(configInfomation)) {
|
if (StringUtils.isNotBlank(configInfomation)) {
|
||||||
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
|
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
|
||||||
@@ -1173,7 +1174,7 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
//子样配置id列表
|
//子样配置id列表
|
||||||
List<Long> configSubSampleIdList = businessSubSampleDOList.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
|
List<Long> configSubSampleIdList = businessSubSampleDOList.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
|
||||||
//子样配置方法
|
//子样配置方法
|
||||||
List<ConfigSubSampleMethodDO> configSubSampleMethodList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodId(configSubSampleIdList, businessAssayTaskDO.getConfigAssayMethodId());
|
List<ConfigSubSampleMethodExtendRespVO> configSubSampleMethodList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodId(configSubSampleIdList, businessAssayTaskDO.getConfigAssayMethodId());
|
||||||
|
|
||||||
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataIds(businessAssayTaskDataIdList);
|
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataIds(businessAssayTaskDataIdList);
|
||||||
List<Long> businessAssayProjectDataIdList = businessAssayProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
List<Long> businessAssayProjectDataIdList = businessAssayProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
@@ -1185,7 +1186,7 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
BusinessSubSampleDO businessSubSampleDO = businessSubSampleDOList.stream().filter(f -> f.getId().equals(businessAssayTaskDataDO.getBusinessSubSampleId())).findFirst().orElse(null);
|
BusinessSubSampleDO businessSubSampleDO = businessSubSampleDOList.stream().filter(f -> f.getId().equals(businessAssayTaskDataDO.getBusinessSubSampleId())).findFirst().orElse(null);
|
||||||
|
|
||||||
//子样配置信息
|
//子样配置信息
|
||||||
ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodList.stream().filter(f -> f.getConfigSubSampleId().equals(businessSubSampleDO.getConfigSubSampleId())).findFirst().orElse(null);
|
ConfigSubSampleMethodExtendRespVO configSubSampleMethodDO = configSubSampleMethodList.stream().filter(f -> f.getConfigSubSampleId().equals(businessSubSampleDO.getConfigSubSampleId())).findFirst().orElse(null);
|
||||||
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
|
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
|
||||||
if (StringUtils.isNotBlank(configInfomation)) {
|
if (StringUtils.isNotBlank(configInfomation)) {
|
||||||
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
|
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodRes
|
|||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigProjectExtendRespVO;
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigProjectExtendRespVO;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSampleReportExtendRespVO;
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSampleReportExtendRespVO;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSampleReportReqVO;
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSampleReportReqVO;
|
||||||
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodExtendRespVO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
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.ConfigAssayMethodProjectDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectParameterDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectParameterDO;
|
||||||
@@ -257,6 +258,7 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
|||||||
ConfigAssayMethodRespVO configAssayMethodRespVO = new ConfigAssayMethodRespVO();
|
ConfigAssayMethodRespVO configAssayMethodRespVO = new ConfigAssayMethodRespVO();
|
||||||
configAssayMethodRespVO.setId(recheckSubSampleParentMethod.getConfigAssayMethodId());
|
configAssayMethodRespVO.setId(recheckSubSampleParentMethod.getConfigAssayMethodId());
|
||||||
configAssayMethodRespVO.setName(recheckSubSampleParentMethod.getConfigAssayMethodName());
|
configAssayMethodRespVO.setName(recheckSubSampleParentMethod.getConfigAssayMethodName());
|
||||||
|
configAssayMethodRespVO.setMethodNameCategory(recheckSubSampleParentMethod.getConfigAssayMethodNameAndCategory());
|
||||||
methodList.add(configAssayMethodRespVO);
|
methodList.add(configAssayMethodRespVO);
|
||||||
}
|
}
|
||||||
recheckSubSampleParentMethodRespVO.setMethodList(methodList);
|
recheckSubSampleParentMethodRespVO.setMethodList(methodList);
|
||||||
@@ -328,7 +330,7 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
|||||||
|
|
||||||
//查询分析方法
|
//查询分析方法
|
||||||
ConfigAssayMethodDO configAssayMethodDO = configAssayMethodMapper.selectById(configAssayMethodId);
|
ConfigAssayMethodDO configAssayMethodDO = configAssayMethodMapper.selectById(configAssayMethodId);
|
||||||
ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodMapper.selectByConfigSubSampleIdAndConfigAssayMethodId(businessSubSampleDO.getConfigSubSampleId(), configAssayMethodId);
|
ConfigSubSampleMethodExtendRespVO configSubSampleMethodDO = configSubSampleMethodMapper.selectByConfigSubSampleIdAndConfigAssayMethodId(businessSubSampleDO.getConfigSubSampleId(), configAssayMethodId);
|
||||||
|
|
||||||
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectList = configAssayMethodProjectMapper.selectByConfigAssayMethodId(configAssayMethodId);
|
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectList = configAssayMethodProjectMapper.selectByConfigAssayMethodId(configAssayMethodId);
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,15 @@ public interface SampleTaskAssignService {
|
|||||||
* @param configAssayMethodId
|
* @param configAssayMethodId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Object> getAssayMethodList(Long businessSubSampleId, Long configAssayMethodId);
|
// List<Object> getAssayMethodList(Long businessSubSampleId, Long configAssayMethodId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据子样id列表,查询分析方法项目
|
||||||
|
* @param businessSubSampleIdList 子样id列表
|
||||||
|
* @param configAssayMethodId 分析方法id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<AssayMethodProjectRespVO> getAssayMethodProjectList(List<Long> businessSubSampleIdList, Long configAssayMethodId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改分析方法
|
* 修改分析方法
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
import com.yomahub.liteflow.core.FlowExecutor;
|
import com.yomahub.liteflow.core.FlowExecutor;
|
||||||
import com.yomahub.liteflow.flow.LiteflowResponse;
|
import com.yomahub.liteflow.flow.LiteflowResponse;
|
||||||
@@ -34,6 +33,8 @@ import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientP
|
|||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementParameterDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementParameterDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementProjectDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementProjectDataDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubParentSampleAssessmentDO;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleAssessmentDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayParameterDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayParameterDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayProjectDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessAssayProjectDataMapper;
|
||||||
@@ -46,6 +47,8 @@ import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientParam
|
|||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementParameterDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementParameterDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementProjectDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementProjectDataMapper;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubParentSampleAssessmentMapper;
|
||||||
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleAssessmentMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.liteflow.param.SampleTaskAssignManualParam;
|
import com.zt.plat.module.qms.business.bus.liteflow.param.SampleTaskAssignManualParam;
|
||||||
import com.zt.plat.module.qms.business.bus.liteflow.param.SampleTaskAssignMethodParam;
|
import com.zt.plat.module.qms.business.bus.liteflow.param.SampleTaskAssignMethodParam;
|
||||||
@@ -107,6 +110,12 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
|||||||
@Resource
|
@Resource
|
||||||
private BusinessAssayParameterDataMapper businessAssayParameterDataMapper;
|
private BusinessAssayParameterDataMapper businessAssayParameterDataMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessSubSampleAssessmentMapper businessSubSampleAssessmentMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessSubParentSampleAssessmentMapper businessSubParentSampleAssessmentMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private BusinessAssayReportDataMapper businessAssayReportDataMapper;
|
private BusinessAssayReportDataMapper businessAssayReportDataMapper;
|
||||||
|
|
||||||
@@ -179,6 +188,7 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
@Override
|
@Override
|
||||||
public List<Object> getAssayMethodList(Long businessSubSampleId, Long configAssayMethodId) {
|
public List<Object> getAssayMethodList(Long businessSubSampleId, Long configAssayMethodId) {
|
||||||
List<Object> resutList = new ArrayList<>();
|
List<Object> resutList = new ArrayList<>();
|
||||||
@@ -235,7 +245,471 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
|||||||
|
|
||||||
return resutList;
|
return resutList;
|
||||||
}
|
}
|
||||||
|
**/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AssayMethodProjectRespVO> getAssayMethodProjectList(List<Long> businessSubSampleIdList, Long configAssayMethodId) {
|
||||||
|
//当前登录用户
|
||||||
|
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||||
|
Long visitDeptId = loginUser.getVisitDeptId();
|
||||||
|
|
||||||
|
List<BusinessSubSampleDO> businessSubSampleList = businessSubSampleMapper.selectByIds(businessSubSampleIdList);
|
||||||
|
List<Long> configSubSampleIdList = businessSubSampleList.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
|
||||||
|
//查询子样分析方法及检测项目
|
||||||
|
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectList = configAssayMethodProjectMapper.selectByConfigSubSampleIdsAndAssayDepartmentId(configSubSampleIdList, visitDeptId);
|
||||||
|
//查询分析方法检测项目
|
||||||
|
List<AssayMethodProjectRespVO> list = businessAssayProjectDataMapper.selectAssayMethodProjectByBusinessSubSampleIdListAndConfigAssayMethodId(businessSubSampleIdList, configAssayMethodId);
|
||||||
|
for (AssayMethodProjectRespVO assayMethodProject : list) {
|
||||||
|
List<ConfigAssayMethodProjectExtendRespVO> methodList = configAssayMethodProjectList.stream().filter(f -> assayMethodProject.getDictionaryProjectId().equals(f.getDictionaryProjectId())).collect(Collectors.toList());
|
||||||
|
assayMethodProject.setMethodList(methodList);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void changeMethod(ChangeAssayMethodReqVO req) {
|
||||||
|
List<Long> businessSubSampleIdList = req.getBusinessSubSampleIdList();
|
||||||
|
Long configAssayMethodId = req.getConfigAssayMethodId();
|
||||||
|
List<AssayMethodProjectRespVO> changeConfigAssayMethodProjectList = req.getChangeConfigAssayMethodProjectList();
|
||||||
|
List<Long> changeConfigAssayMethodIdList = changeConfigAssayMethodProjectList.stream().map(m -> m.getConfigAssayMethodId()).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
|
LocalDateTime currentDateTime = LocalDateTime.now();
|
||||||
|
|
||||||
|
//需要更新的报表数据
|
||||||
|
List<BusinessAssayReportDataDO> updateBusinessAssayReportDataDOList = new ArrayList<>();
|
||||||
|
|
||||||
|
//需要更新的分析任务
|
||||||
|
List<BusinessAssayTaskDataDO> updateBusinessAssayTaskDataDOList = new ArrayList<>();
|
||||||
|
//需要更新的分析任务检测项目
|
||||||
|
List<BusinessAssayProjectDataDO> updateBusinessAssayProjectDataDOList = new ArrayList<>();
|
||||||
|
//需要更新的分析任务检测项目参数
|
||||||
|
List<BusinessAssayParameterDataDO> updateBusinessAssayParameterDataDOList = new ArrayList<>();
|
||||||
|
|
||||||
|
//需要更新的子样判定
|
||||||
|
List<BusinessSubSampleAssessmentDO> updateBusinessSubSampleAssessmentDOList = new ArrayList<>();
|
||||||
|
|
||||||
|
//需要更新的分样判定
|
||||||
|
List<BusinessSubParentSampleAssessmentDO> updateBusinessSubParentSampleAssessmentDOList = new ArrayList<>();
|
||||||
|
|
||||||
|
//需要新建的分析任务
|
||||||
|
List<BusinessAssayTaskDataDO> saveBusinessAssayTaskDataDOList = new ArrayList<>();
|
||||||
|
//需要新建的分析任务检测项目
|
||||||
|
List<BusinessAssayProjectDataDO> saveBusinessAssayProjectDataDOList = new ArrayList<>();
|
||||||
|
//需要新建的分析任务检测项目参数
|
||||||
|
List<BusinessAssayParameterDataDO> saveBusinessAssayParameterDataDOList = new ArrayList<>();
|
||||||
|
|
||||||
|
//需要新建的子样判定
|
||||||
|
List<BusinessSubSampleAssessmentDO> saveBusinessSubSampleAssessmentDOList = new ArrayList<>();
|
||||||
|
|
||||||
|
//需要新建的分样判定
|
||||||
|
List<BusinessSubParentSampleAssessmentDO> saveBusinessSubParentSampleAssessmentDOList = new ArrayList<>();
|
||||||
|
|
||||||
|
//需要删除的分析任务
|
||||||
|
List<Long> removeAssayTaskDataIdList = new ArrayList<>();
|
||||||
|
//需要删除的分析任务检测项目
|
||||||
|
List<Long> removeAssayProjectIdList = new ArrayList<>();
|
||||||
|
//需要删除的分析任务检测项目参数
|
||||||
|
List<Long> removeAssayParameterIdList = new ArrayList<>();
|
||||||
|
|
||||||
|
//需要删除的子样判定
|
||||||
|
List<Long> removeSubSampleAssessmentIdList = new ArrayList<>();
|
||||||
|
|
||||||
|
//需要删除的分样判定
|
||||||
|
List<Long> removeSubParentSampleAssessmentIdList = new ArrayList<>();
|
||||||
|
|
||||||
|
//查询子样
|
||||||
|
List<BusinessSubSampleDO> businessSubSampleDOList = businessSubSampleMapper.selectByIds(businessSubSampleIdList);
|
||||||
|
List<Long> businessBaseSampleIdList = businessSubSampleDOList.stream().map(m -> m.getBusinessBaseSampleId()).distinct().collect(Collectors.toList());
|
||||||
|
List<Long> businessSubParentSampleIdList = businessSubSampleDOList.stream().map(m -> m.getBusinessSubParentSampleId()).distinct().collect(Collectors.toList());
|
||||||
|
List<Long> configSubSampleIdList = businessSubSampleDOList.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
|
||||||
|
//查询检测任务 (通过分样id,可以查询双杯样的)
|
||||||
|
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIdList, configAssayMethodId);
|
||||||
|
|
||||||
|
boolean disabled = businessAssayTaskDataDOList.stream().anyMatch(m -> m.getIsAssignTasked().equals(QmsCommonConstant.YES));
|
||||||
|
if (disabled) {
|
||||||
|
throw new ServiceException(1_032_001_000, "当前样品存在已分配任务,不允许修改分析方法");
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Long> businessAssayTaskDataIdList = businessAssayTaskDataDOList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//查询检测任务的检测项目
|
||||||
|
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataIds(businessAssayTaskDataIdList);
|
||||||
|
List<Long> businessAssayProjectDataIdList = businessAssayProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//查询检测任务的检测项目的参数
|
||||||
|
List<BusinessAssayParameterDataDO> businessAssayParameterDataDOList = businessAssayParameterDataMapper.selectByBusinessAssayProjectDataIds(businessAssayProjectDataIdList);
|
||||||
|
|
||||||
|
//查询子样判定 (通过分样id,可以查询双杯样的)
|
||||||
|
List<BusinessSubSampleAssessmentDO> businessSubSampleAssessmentDOList = businessSubSampleAssessmentMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIdList, configAssayMethodId);
|
||||||
|
|
||||||
|
//查询分样判定
|
||||||
|
List<BusinessSubParentSampleAssessmentExtendRespVO> businessSubParentSampleAssessmentList = businessSubParentSampleAssessmentMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIdList, configAssayMethodId);
|
||||||
|
|
||||||
|
//查询要变更的分析方法配置
|
||||||
|
List<ConfigAssayMethodDO> configAssayMethodDOList = configAssayMethodMapper.selectByIds(changeConfigAssayMethodIdList);
|
||||||
|
//分析方法检测项目配置
|
||||||
|
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectList = configAssayMethodProjectMapper.selectByConfigAssayMethodIds(changeConfigAssayMethodIdList);
|
||||||
|
//分析方法检测项目参数配置
|
||||||
|
List<ConfigAssayMethodProjectParameterDO> configAssayMethodProjectParameterList = configAssayMethodProjectParameterMapper.selectByConfigAssayMethodIds(changeConfigAssayMethodIdList);
|
||||||
|
//查询要变更的子样及分析方法配置
|
||||||
|
List<ConfigSubSampleMethodExtendRespVO> configSubSampleMethodList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodIds(configSubSampleIdList, changeConfigAssayMethodIdList);
|
||||||
|
|
||||||
|
//循环分样判定
|
||||||
|
for (BusinessSubParentSampleAssessmentExtendRespVO businessSubParentSampleAssessment : businessSubParentSampleAssessmentList) {
|
||||||
|
|
||||||
|
//循环变更的分析方法
|
||||||
|
for (Long changeConfigAssayMethodId : changeConfigAssayMethodIdList) {
|
||||||
|
//如果当前分析方法不等于要变更的方法
|
||||||
|
if (!businessSubParentSampleAssessment.getConfigAssayMethodId().equals(changeConfigAssayMethodId)) {
|
||||||
|
//查询是否已有要变更的方法的分样判定
|
||||||
|
BusinessSubParentSampleAssessmentDO businessSubParentSampleAssessmentDO = businessSubParentSampleAssessmentMapper.selectByBusinessSubParentSampleIdAndConfigAssayMethodId(businessSubParentSampleAssessment.getBusinessSubParentSampleId(), changeConfigAssayMethodId);
|
||||||
|
if (businessSubParentSampleAssessmentDO == null) {//不存在
|
||||||
|
//根据变更方法过滤出检测项目
|
||||||
|
List<Long> projectIdList = changeConfigAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(changeConfigAssayMethodId)).map(m -> m.getDictionaryProjectId()).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
|
//查询分析方法
|
||||||
|
ConfigAssayMethodDO configAssayMethodDO = configAssayMethodDOList.stream().filter(f -> f.getId().equals(changeConfigAssayMethodId)).findFirst().orElse(null);
|
||||||
|
//查询子样分析方法
|
||||||
|
ConfigSubSampleMethodExtendRespVO configSubSampleMethod = configSubSampleMethodList.stream().filter(f -> f.getConfigSubSampleParentId().equals(businessSubParentSampleAssessment.getConfigSubSampleParentId()) && f.getConfigAssayMethodId().equals(changeConfigAssayMethodId)).findFirst().orElse(null);
|
||||||
|
|
||||||
|
//根据任务数判断是平行还是
|
||||||
|
String assayType = configSubSampleMethod.getTaskCount() > 1 ? QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL : QmsCommonConstant.ASSAY_TYPE_SINGLE_CUP;
|
||||||
|
businessSubParentSampleAssessmentDO = new BusinessSubParentSampleAssessmentDO();
|
||||||
|
businessSubParentSampleAssessmentDO.setId(IdWorker.getId());
|
||||||
|
businessSubParentSampleAssessmentDO.setBusinessSubParentSampleId(businessSubParentSampleAssessment.getBusinessSubParentSampleId());
|
||||||
|
businessSubParentSampleAssessmentDO.setConfigAssayMethodId(changeConfigAssayMethodId);
|
||||||
|
businessSubParentSampleAssessmentDO.setAssayType(assayType);
|
||||||
|
businessSubParentSampleAssessmentDO.setTaskType("常规");
|
||||||
|
saveBusinessSubParentSampleAssessmentDOList.add(businessSubParentSampleAssessmentDO);
|
||||||
|
|
||||||
|
BusinessSubSampleDO businessSubSampleDO = null;
|
||||||
|
if (!QmsCommonConstant.ASSAY_TYPE_DOUBLE_CUP.equals(businessSubParentSampleAssessment.getAssayType())) {//如果不为双杯样
|
||||||
|
businessSubSampleDO = businessSubSampleDOList.stream().filter(f -> f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).findFirst().orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
//子样判定数据
|
||||||
|
BusinessSubSampleAssessmentDO businessSubSampleAssessmentDO = new BusinessSubSampleAssessmentDO();
|
||||||
|
businessSubSampleAssessmentDO.setId(IdWorker.getId());
|
||||||
|
businessSubSampleAssessmentDO.setBusinessBaseSampleId(businessSubParentSampleAssessment.getBusinessBaseSampleId());
|
||||||
|
businessSubSampleAssessmentDO.setBusinessSubParentSampleId(businessSubParentSampleAssessment.getBusinessSubParentSampleId());
|
||||||
|
businessSubSampleAssessmentDO.setBusinessSubParentSampleAssessmentId(businessSubParentSampleAssessmentDO.getId());
|
||||||
|
if (businessSubSampleDO != null) {
|
||||||
|
businessSubSampleAssessmentDO.setBusinessSubSampleId(businessSubSampleDO.getId());
|
||||||
|
}
|
||||||
|
businessSubSampleAssessmentDO.setConfigAssayMethodId(changeConfigAssayMethodId);
|
||||||
|
businessSubSampleAssessmentDO.setAssayType(assayType);
|
||||||
|
businessSubSampleAssessmentDO.setTaskType("常规");
|
||||||
|
|
||||||
|
saveBusinessSubSampleAssessmentDOList.add(businessSubSampleAssessmentDO);
|
||||||
|
|
||||||
|
//查询旧的检测项目
|
||||||
|
List<Long> oldBusinessAssayProjectDataIdList = businessAssayProjectDataList.stream().filter(f -> projectIdList.contains(f.getDictionaryProjectId()) && f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//添加到删除列表
|
||||||
|
removeAssayProjectIdList.addAll(oldBusinessAssayProjectDataIdList);
|
||||||
|
List<Long> oldBusinessAssayParameterDataIdList = businessAssayParameterDataDOList.stream().filter(f -> oldBusinessAssayProjectDataIdList.contains(f.getBusinessAssayProjectDataId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
removeAssayParameterIdList.addAll(oldBusinessAssayParameterDataIdList);
|
||||||
|
if (projectIdList.size() == changeConfigAssayMethodProjectList.size()) {
|
||||||
|
//查询旧的检测任务
|
||||||
|
List<Long> oldBusinessAssayTaskDataIdList = businessAssayTaskDataDOList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId) && f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//添加到删除列表
|
||||||
|
removeAssayTaskDataIdList.addAll(oldBusinessAssayTaskDataIdList);
|
||||||
|
//查询旧的子样判定
|
||||||
|
List<Long> oldBusinessSubSampleAssesmentIdList = businessSubSampleAssessmentDOList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId) && f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//添加到删除列表
|
||||||
|
removeSubSampleAssessmentIdList.addAll(oldBusinessSubSampleAssesmentIdList);
|
||||||
|
|
||||||
|
//添加到删除列表
|
||||||
|
removeSubParentSampleAssessmentIdList.add(businessSubParentSampleAssessment.getId());
|
||||||
|
} else {
|
||||||
|
List<String> projectShowNameList = changeConfigAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId)).map(m -> m.getDictionaryProjectShowName()).distinct().collect(Collectors.toList());
|
||||||
|
//查询旧的检测任务
|
||||||
|
List<BusinessAssayTaskDataDO> oldBusinessAssayTaskDataList = businessAssayTaskDataDOList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId) && f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).collect(Collectors.toList());
|
||||||
|
for (BusinessAssayTaskDataDO oldBusinessAssayTaskData : oldBusinessAssayTaskDataList) {
|
||||||
|
boolean isAdd = updateBusinessAssayTaskDataDOList.stream().anyMatch(m -> m.getId().equals(oldBusinessAssayTaskData.getId()));
|
||||||
|
if (!isAdd) {//如果未添加过更新,则修改检测项目并添加更新
|
||||||
|
oldBusinessAssayTaskData.setAssayProject(CollUtil.join(projectShowNameList, ","));
|
||||||
|
updateBusinessAssayTaskDataDOList.add(oldBusinessAssayTaskData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BusinessAssayTaskDataDO oldBusinessAssayTaskDataDO = businessAssayTaskDataDOList.stream().filter(f -> f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).findFirst().orElse(null);
|
||||||
|
|
||||||
|
//根据检测方法循环
|
||||||
|
BusinessAssayTaskDataDO businessAssayTaskDataDO = null;
|
||||||
|
//根据任务数循环
|
||||||
|
for (int i = 0; i < configSubSampleMethod.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(changeConfigAssayMethodId);
|
||||||
|
businessAssayTaskDataDO.setAssayType(assayType);
|
||||||
|
businessAssayTaskDataDO.setTaskType("常规");
|
||||||
|
businessAssayTaskDataDO.setConfigSampleFlowId(oldBusinessAssayTaskDataDO.getConfigSampleFlowId());
|
||||||
|
businessAssayTaskDataDO.setSampleFlowNodeKey(oldBusinessAssayTaskDataDO.getSampleFlowNodeKey());
|
||||||
|
businessAssayTaskDataDO.setSampleFlowNodeTime(currentDateTime);
|
||||||
|
businessAssayTaskDataDO.setAssayDepartmentId(configAssayMethodDO.getAssayDepartmentId());
|
||||||
|
businessAssayTaskDataDO.setAssayDepartmentName(configAssayMethodDO.getAssayDepartmentName());
|
||||||
|
|
||||||
|
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectDOList = configAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(changeConfigAssayMethodId)).collect(Collectors.toList());
|
||||||
|
|
||||||
|
StringBuilder assayProjectBuilder = new StringBuilder();
|
||||||
|
|
||||||
|
for (ConfigAssayMethodProjectExtendRespVO configAssayMethodProjectDO : configAssayMethodProjectDOList) {
|
||||||
|
|
||||||
|
//如果当前分析方法的项目不在当前检测项目中,则跳出循环继续
|
||||||
|
if (!projectIdList.contains(configAssayMethodProjectDO.getDictionaryProjectId())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
assayProjectBuilder.append(configAssayMethodProjectDO.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_REPORT);
|
||||||
|
businessAssayProjectDataDO.setMinimumLimitValue(configAssayMethodProjectDO.getMinimumLimitValue());
|
||||||
|
businessAssayProjectDataDO.setIsEnabled(QmsCommonConstant.YES);
|
||||||
|
businessAssayProjectDataDO.setIsNotAssessment(QmsCommonConstant.NO);
|
||||||
|
|
||||||
|
saveBusinessAssayProjectDataDOList.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());
|
||||||
|
|
||||||
|
saveBusinessAssayParameterDataDOList.add(businessAssayParameterDataDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (assayProjectBuilder.length() > 1) {
|
||||||
|
assayProjectBuilder.delete(assayProjectBuilder.length() - 1 , assayProjectBuilder.length());
|
||||||
|
}
|
||||||
|
businessAssayTaskDataDO.setAssayProject(assayProjectBuilder.toString());
|
||||||
|
saveBusinessAssayTaskDataDOList.add(businessAssayTaskDataDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {//已存在
|
||||||
|
//根据变更方法过滤出检测项目
|
||||||
|
List<Long> projectIdList = changeConfigAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(changeConfigAssayMethodId)).map(m -> m.getDictionaryProjectId()).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
|
//查询分析方法
|
||||||
|
//ConfigAssayMethodDO configAssayMethodDO = configAssayMethodDOList.stream().filter(f -> f.getId().equals(changeConfigAssayMethodId)).findFirst().orElse(null);
|
||||||
|
//查询子样分析方法
|
||||||
|
//ConfigSubSampleMethodExtendRespVO configSubSampleMethod = configSubSampleMethodList.stream().filter(f -> f.getConfigSubSampleParentId().equals(businessSubParentSampleAssessment.getConfigSubSampleParentId()) && f.getConfigAssayMethodId().equals(changeConfigAssayMethodId)).findFirst().orElse(null);
|
||||||
|
|
||||||
|
//根据任务数判断是平行还是
|
||||||
|
//String assayType = configSubSampleMethod.getTaskCount() > 1 ? QmsCommonConstant.ASSAY_TYPE_SINGLE_PARALLEL : QmsCommonConstant.ASSAY_TYPE_SINGLE_CUP;
|
||||||
|
|
||||||
|
//查询子样判定
|
||||||
|
//BusinessSubSampleAssessmentDO businessSubSampleAssessmentDO = businessSubSampleAssessmentMapper.selectByBusinessSubParentSampleIdAndConfigAssayMethodId(businessSubParentSampleAssessmentDO.getBusinessSubParentSampleId(), changeConfigAssayMethodId);
|
||||||
|
|
||||||
|
//查询旧的检测项目
|
||||||
|
List<Long> oldBusinessAssayProjectDataIdList = businessAssayProjectDataList.stream().filter(f -> projectIdList.contains(f.getDictionaryProjectId()) && f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//添加到删除列表
|
||||||
|
removeAssayProjectIdList.addAll(oldBusinessAssayProjectDataIdList);
|
||||||
|
List<Long> oldBusinessAssayParameterDataIdList = businessAssayParameterDataDOList.stream().filter(f -> oldBusinessAssayProjectDataIdList.contains(f.getBusinessAssayProjectDataId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
removeAssayParameterIdList.addAll(oldBusinessAssayParameterDataIdList);
|
||||||
|
if (projectIdList.size() == changeConfigAssayMethodProjectList.size()) {
|
||||||
|
//查询旧的检测任务
|
||||||
|
List<Long> oldBusinessAssayTaskDataIdList = businessAssayTaskDataDOList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId) && f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//添加到删除列表
|
||||||
|
removeAssayTaskDataIdList.addAll(oldBusinessAssayTaskDataIdList);
|
||||||
|
//查询旧的子样判定
|
||||||
|
List<Long> oldBusinessSubSampleAssesmentIdList = businessSubSampleAssessmentDOList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId) && f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).map(m -> m.getId()).collect(Collectors.toList());
|
||||||
|
//添加到删除列表
|
||||||
|
removeSubSampleAssessmentIdList.addAll(oldBusinessSubSampleAssesmentIdList);
|
||||||
|
|
||||||
|
//添加到删除列表
|
||||||
|
removeSubParentSampleAssessmentIdList.add(businessSubParentSampleAssessment.getId());
|
||||||
|
} else {
|
||||||
|
List<String> projectShowNameList = changeConfigAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId)).map(m -> m.getDictionaryProjectShowName()).distinct().collect(Collectors.toList());
|
||||||
|
//查询旧的检测任务
|
||||||
|
List<BusinessAssayTaskDataDO> oldBusinessAssayTaskDataList = businessAssayTaskDataDOList.stream().filter(f -> f.getConfigAssayMethodId().equals(configAssayMethodId) && f.getBusinessSubParentSampleId().equals(businessSubParentSampleAssessment.getBusinessSubParentSampleId())).collect(Collectors.toList());
|
||||||
|
for (BusinessAssayTaskDataDO oldBusinessAssayTaskData : oldBusinessAssayTaskDataList) {
|
||||||
|
boolean isAdd = updateBusinessAssayTaskDataDOList.stream().anyMatch(m -> m.getId().equals(oldBusinessAssayTaskData.getId()));
|
||||||
|
if (!isAdd) {//如果未添加过更新,则修改检测项目并添加更新
|
||||||
|
oldBusinessAssayTaskData.setAssayProject(CollUtil.join(projectShowNameList, ","));
|
||||||
|
updateBusinessAssayTaskDataDOList.add(oldBusinessAssayTaskData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询当前存在的分析任务
|
||||||
|
List<BusinessAssayTaskDataDO> currBusinessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessSubParentSampleIdAndConfigAssayMethodId(businessSubParentSampleAssessmentDO.getBusinessSubParentSampleId(), changeConfigAssayMethodId);
|
||||||
|
|
||||||
|
//当前存在的分析任务循环
|
||||||
|
for (BusinessAssayTaskDataDO businessAssayTaskDataDO : currBusinessAssayTaskDataDOList) {
|
||||||
|
|
||||||
|
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectDOList = configAssayMethodProjectList.stream().filter(f -> f.getConfigAssayMethodId().equals(changeConfigAssayMethodId)).collect(Collectors.toList());
|
||||||
|
|
||||||
|
StringBuilder assayProjectBuilder = new StringBuilder(businessAssayTaskDataDO.getAssayProject());
|
||||||
|
assayProjectBuilder.append(",");
|
||||||
|
|
||||||
|
for (ConfigAssayMethodProjectExtendRespVO configAssayMethodProjectDO : configAssayMethodProjectDOList) {
|
||||||
|
|
||||||
|
//如果当前分析方法的项目不在当前检测项目中,则跳出循环继续
|
||||||
|
if (!projectIdList.contains(configAssayMethodProjectDO.getDictionaryProjectId())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
assayProjectBuilder.append(configAssayMethodProjectDO.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_REPORT);
|
||||||
|
businessAssayProjectDataDO.setMinimumLimitValue(configAssayMethodProjectDO.getMinimumLimitValue());
|
||||||
|
businessAssayProjectDataDO.setIsEnabled(QmsCommonConstant.YES);
|
||||||
|
businessAssayProjectDataDO.setIsNotAssessment(QmsCommonConstant.NO);
|
||||||
|
|
||||||
|
saveBusinessAssayProjectDataDOList.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());
|
||||||
|
|
||||||
|
saveBusinessAssayParameterDataDOList.add(businessAssayParameterDataDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (assayProjectBuilder.length() > 1) {
|
||||||
|
assayProjectBuilder.delete(assayProjectBuilder.length() - 1 , assayProjectBuilder.length());
|
||||||
|
}
|
||||||
|
businessAssayTaskDataDO.setAssayProject(assayProjectBuilder.toString());
|
||||||
|
updateBusinessAssayTaskDataDOList.add(businessAssayTaskDataDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询报表数据
|
||||||
|
List<BusinessAssayReportDataDO> businessAssayReportDataDOList = businessAssayReportDataMapper.selectBytBusinessBaseSampleIds(businessBaseSampleIdList);
|
||||||
|
for (BusinessAssayReportDataDO businessAssayReportDataDO : businessAssayReportDataDOList) {
|
||||||
|
String dataSource = businessAssayReportDataDO.getDataSource();
|
||||||
|
if (dataSource.contains(req.getConfigAssayMethodId().toString())) {//判定是否存在
|
||||||
|
List<Long> dataSourceList = new ArrayList<>();
|
||||||
|
String[] dataSourceSplit = dataSource.split(",");
|
||||||
|
for (int i = 0; i < dataSourceSplit.length; i++) {
|
||||||
|
dataSourceList.add(Long.parseLong(dataSourceSplit[i]));
|
||||||
|
}
|
||||||
|
|
||||||
|
//移除当前的
|
||||||
|
dataSourceList.remove(req.getConfigAssayMethodId());
|
||||||
|
//添加新的
|
||||||
|
dataSourceList.addAll(changeConfigAssayMethodIdList);
|
||||||
|
|
||||||
|
//重新赋值
|
||||||
|
businessAssayReportDataDO.setDataSource(CollUtil.join(dataSourceList, ","));
|
||||||
|
|
||||||
|
//添加到更新列表
|
||||||
|
updateBusinessAssayReportDataDOList.add(businessAssayReportDataDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//======================== 删除 =====================================================================
|
||||||
|
|
||||||
|
if (removeAssayTaskDataIdList.size() > 0) {
|
||||||
|
businessAssayTaskDataMapper.deleteByIds(removeAssayTaskDataIdList);
|
||||||
|
}
|
||||||
|
if (removeAssayProjectIdList.size() > 0) {
|
||||||
|
businessAssayProjectDataMapper.deleteByIds(removeAssayProjectIdList);
|
||||||
|
}
|
||||||
|
if (removeAssayParameterIdList.size() > 0) {
|
||||||
|
businessAssayParameterDataMapper.deleteByIds(removeAssayParameterIdList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (removeSubSampleAssessmentIdList.size() > 0) {
|
||||||
|
businessSubSampleAssessmentMapper.deleteByIds(removeSubSampleAssessmentIdList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (removeSubParentSampleAssessmentIdList.size() > 0) {
|
||||||
|
businessSubParentSampleAssessmentMapper.deleteByIds(removeSubParentSampleAssessmentIdList);
|
||||||
|
}
|
||||||
|
|
||||||
|
//======================== 修改 =====================================================================
|
||||||
|
|
||||||
|
if (updateBusinessAssayReportDataDOList.size() > 0) {
|
||||||
|
businessAssayReportDataMapper.updateBatch(updateBusinessAssayReportDataDOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (updateBusinessAssayTaskDataDOList.size() > 0) {
|
||||||
|
businessAssayTaskDataMapper.updateBatch(updateBusinessAssayTaskDataDOList);
|
||||||
|
}
|
||||||
|
if (updateBusinessAssayProjectDataDOList.size() > 0) {
|
||||||
|
businessAssayProjectDataMapper.updateBatch(updateBusinessAssayProjectDataDOList);
|
||||||
|
}
|
||||||
|
if (updateBusinessAssayParameterDataDOList.size() > 0) {
|
||||||
|
businessAssayParameterDataMapper.updateBatch(updateBusinessAssayParameterDataDOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (updateBusinessSubSampleAssessmentDOList.size() > 0) {
|
||||||
|
businessSubSampleAssessmentMapper.updateBatch(updateBusinessSubSampleAssessmentDOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (updateBusinessSubParentSampleAssessmentDOList.size() > 0) {
|
||||||
|
businessSubParentSampleAssessmentMapper.updateBatch(updateBusinessSubParentSampleAssessmentDOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
//======================== 新建 =====================================================================
|
||||||
|
|
||||||
|
if (saveBusinessAssayTaskDataDOList.size() > 0) {
|
||||||
|
businessAssayTaskDataMapper.insertBatch(saveBusinessAssayTaskDataDOList);
|
||||||
|
}
|
||||||
|
if (saveBusinessAssayProjectDataDOList.size() > 0) {
|
||||||
|
businessAssayProjectDataMapper.insertBatch(saveBusinessAssayProjectDataDOList);
|
||||||
|
}
|
||||||
|
if (saveBusinessAssayParameterDataDOList.size() > 0) {
|
||||||
|
businessAssayParameterDataMapper.insertBatch(saveBusinessAssayParameterDataDOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (saveBusinessSubSampleAssessmentDOList.size() > 0) {
|
||||||
|
businessSubSampleAssessmentMapper.insertBatch(saveBusinessSubSampleAssessmentDOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (saveBusinessSubParentSampleAssessmentDOList.size() > 0) {
|
||||||
|
businessSubParentSampleAssessmentMapper.insertBatch(saveBusinessSubParentSampleAssessmentDOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void changeMethod(ChangeAssayMethodReqVO req) {
|
public void changeMethod(ChangeAssayMethodReqVO req) {
|
||||||
@@ -374,6 +848,7 @@ public class SampleTaskAssignServiceImpl implements SampleTaskAssignService {
|
|||||||
businessAssayParameterDataMapper.insertBatch(saveBusinessAssayParameterDataDOList);
|
businessAssayParameterDataMapper.insertBatch(saveBusinessAssayParameterDataDOList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
**/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import com.zt.plat.module.qms.business.config.controller.vo.*;
|
|||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleMethodDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleMethodDO;
|
||||||
import com.zt.plat.module.qms.business.config.service.ConfigSubSampleMethodService;
|
import com.zt.plat.module.qms.business.config.service.ConfigSubSampleMethodService;
|
||||||
|
|
||||||
@Tag(name = "管理后台 - 子样与检测方法配置")
|
@Tag(name = "管理后台 - 子样与分样检测方法配置表")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/qms/config-sub-sample-method")
|
@RequestMapping("/qms/config-sub-sample-method")
|
||||||
@Validated
|
@Validated
|
||||||
@@ -45,14 +45,14 @@ public class ConfigSubSampleMethodController implements BusinessControllerMarker
|
|||||||
private ConfigSubSampleMethodService configSubSampleMethodService;
|
private ConfigSubSampleMethodService configSubSampleMethodService;
|
||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建子样与检测方法配置")
|
@Operation(summary = "创建子样与分样检测方法配置表")
|
||||||
//@PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:create')")
|
//@PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:create')")
|
||||||
public CommonResult<ConfigSubSampleMethodRespVO> createConfigSubSampleMethod(@Valid @RequestBody ConfigSubSampleMethodSaveReqVO createReqVO) {
|
public CommonResult<ConfigSubSampleMethodRespVO> createConfigSubSampleMethod(@Valid @RequestBody ConfigSubSampleMethodSaveReqVO createReqVO) {
|
||||||
return success(configSubSampleMethodService.createConfigSubSampleMethod(createReqVO));
|
return success(configSubSampleMethodService.createConfigSubSampleMethod(createReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "更新子样与检测方法配置")
|
@Operation(summary = "更新子样与分样检测方法配置表")
|
||||||
//@PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:update')")
|
//@PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:update')")
|
||||||
public CommonResult<Boolean> updateConfigSubSampleMethod(@Valid @RequestBody ConfigSubSampleMethodSaveReqVO updateReqVO) {
|
public CommonResult<Boolean> updateConfigSubSampleMethod(@Valid @RequestBody ConfigSubSampleMethodSaveReqVO updateReqVO) {
|
||||||
configSubSampleMethodService.updateConfigSubSampleMethod(updateReqVO);
|
configSubSampleMethodService.updateConfigSubSampleMethod(updateReqVO);
|
||||||
@@ -60,7 +60,7 @@ public class ConfigSubSampleMethodController implements BusinessControllerMarker
|
|||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除子样与检测方法配置")
|
@Operation(summary = "删除子样与分样检测方法配置表")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
//@PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:delete')")
|
//@PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:delete')")
|
||||||
public CommonResult<Boolean> deleteConfigSubSampleMethod(@RequestParam("id") Long id) {
|
public CommonResult<Boolean> deleteConfigSubSampleMethod(@RequestParam("id") Long id) {
|
||||||
@@ -70,7 +70,7 @@ public class ConfigSubSampleMethodController implements BusinessControllerMarker
|
|||||||
|
|
||||||
@DeleteMapping("/delete-list")
|
@DeleteMapping("/delete-list")
|
||||||
@Parameter(name = "ids", description = "编号", required = true)
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
@Operation(summary = "批量删除子样与检测方法配置")
|
@Operation(summary = "批量删除子样与分样检测方法配置表")
|
||||||
//@PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:delete')")
|
//@PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:delete')")
|
||||||
public CommonResult<Boolean> deleteConfigSubSampleMethodList(@RequestBody BatchDeleteReqVO req) {
|
public CommonResult<Boolean> deleteConfigSubSampleMethodList(@RequestBody BatchDeleteReqVO req) {
|
||||||
configSubSampleMethodService.deleteConfigSubSampleMethodListByIds(req.getIds());
|
configSubSampleMethodService.deleteConfigSubSampleMethodListByIds(req.getIds());
|
||||||
@@ -78,7 +78,7 @@ public class ConfigSubSampleMethodController implements BusinessControllerMarker
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
@Operation(summary = "获得子样与检测方法配置")
|
@Operation(summary = "获得子样与分样检测方法配置表")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
//@PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:query')")
|
//@PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:query')")
|
||||||
public CommonResult<ConfigSubSampleMethodRespVO> getConfigSubSampleMethod(@RequestParam("id") Long id) {
|
public CommonResult<ConfigSubSampleMethodRespVO> getConfigSubSampleMethod(@RequestParam("id") Long id) {
|
||||||
@@ -87,7 +87,7 @@ public class ConfigSubSampleMethodController implements BusinessControllerMarker
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@Operation(summary = "获得子样与检测方法配置分页")
|
@Operation(summary = "获得子样与分样检测方法配置表分页")
|
||||||
//@PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:query')")
|
//@PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:query')")
|
||||||
public CommonResult<PageResult<ConfigSubSampleMethodRespVO>> getConfigSubSampleMethodPage(@Valid ConfigSubSampleMethodPageReqVO pageReqVO) {
|
public CommonResult<PageResult<ConfigSubSampleMethodRespVO>> getConfigSubSampleMethodPage(@Valid ConfigSubSampleMethodPageReqVO pageReqVO) {
|
||||||
PageResult<ConfigSubSampleMethodDO> pageResult = configSubSampleMethodService.getConfigSubSampleMethodPage(pageReqVO);
|
PageResult<ConfigSubSampleMethodDO> pageResult = configSubSampleMethodService.getConfigSubSampleMethodPage(pageReqVO);
|
||||||
@@ -95,7 +95,7 @@ public class ConfigSubSampleMethodController implements BusinessControllerMarker
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/export-excel")
|
@GetMapping("/export-excel")
|
||||||
@Operation(summary = "导出子样与检测方法配置 Excel")
|
@Operation(summary = "导出子样与分样检测方法配置表 Excel")
|
||||||
//@PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:export')")
|
//@PreAuthorize("@ss.hasPermission('qms:config-sub-sample-method:export')")
|
||||||
@ApiAccessLog(operateType = EXPORT)
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
public void exportConfigSubSampleMethodExcel(@Valid ConfigSubSampleMethodPageReqVO pageReqVO,
|
public void exportConfigSubSampleMethodExcel(@Valid ConfigSubSampleMethodPageReqVO pageReqVO,
|
||||||
@@ -103,7 +103,7 @@ public class ConfigSubSampleMethodController implements BusinessControllerMarker
|
|||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
List<ConfigSubSampleMethodDO> list = configSubSampleMethodService.getConfigSubSampleMethodPage(pageReqVO).getList();
|
List<ConfigSubSampleMethodDO> list = configSubSampleMethodService.getConfigSubSampleMethodPage(pageReqVO).getList();
|
||||||
// 导出 Excel
|
// 导出 Excel
|
||||||
ExcelUtils.write(response, "子样与检测方法配置.xls", "数据", ConfigSubSampleMethodRespVO.class,
|
ExcelUtils.write(response, "子样与分样检测方法配置表.xls", "数据", ConfigSubSampleMethodRespVO.class,
|
||||||
BeanUtils.toBean(list, ConfigSubSampleMethodRespVO.class));
|
BeanUtils.toBean(list, ConfigSubSampleMethodRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,12 @@ import lombok.Data;
|
|||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class ConfigAssayMethodProjectExtendRespVO extends ConfigAssayMethodProjectRespVO {
|
public class ConfigAssayMethodProjectExtendRespVO extends ConfigAssayMethodProjectRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "分析方法名称")
|
||||||
|
private String configAssayMethodName;
|
||||||
|
|
||||||
|
@Schema(description = "检测方法配置名称及类别")
|
||||||
|
private String configAssayMethodNameAndCategory;
|
||||||
|
|
||||||
@Schema(description = "检测项目key")
|
@Schema(description = "检测项目key")
|
||||||
private String dictionaryProjectKey;
|
private String dictionaryProjectKey;
|
||||||
|
|||||||
@@ -5,6 +5,21 @@ import lombok.Data;
|
|||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class ConfigSubSampleMethodExtendRespVO extends ConfigSubSampleMethodRespVO {
|
public class ConfigSubSampleMethodExtendRespVO extends ConfigSubSampleMethodRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "样品大类ID", example = "15082")
|
||||||
|
private Long baseSampleId;
|
||||||
|
|
||||||
|
@Schema(description = "主样配置ID", example = "1906")
|
||||||
|
private Long configBaseSampleId;
|
||||||
|
|
||||||
|
@Schema(description = "分样配置ID", example = "13652")
|
||||||
|
private Long configSubSampleParentId;
|
||||||
|
|
||||||
|
@Schema(description = "分析方法id")
|
||||||
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
|
@Schema(description = "是否默认使用,1-是,0-否")
|
||||||
|
private Integer isDefaultUse;
|
||||||
|
|
||||||
/** 分析方法名称 **/
|
/** 分析方法名称 **/
|
||||||
@Schema(description = "分析方法名称")
|
@Schema(description = "分析方法名称")
|
||||||
|
|||||||
@@ -9,18 +9,15 @@ import java.time.LocalDateTime;
|
|||||||
|
|
||||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 子样与检测方法配置分页 Request VO")
|
@Schema(description = "管理后台 - 子样与分样检测方法配置表分页 Request VO")
|
||||||
@Data
|
@Data
|
||||||
public class ConfigSubSampleMethodPageReqVO extends PageParam {
|
public class ConfigSubSampleMethodPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "子样配置ID", example = "27079")
|
@Schema(description = "子样配置ID", example = "27079")
|
||||||
private Long configSubSampleId;
|
private Long configSubSampleId;
|
||||||
|
|
||||||
@Schema(description = "检测方法配置ID", example = "30543")
|
@Schema(description = "分样与检测方法配置ID", example = "30543")
|
||||||
private Long configAssayMethodId;
|
private Long configSubSampleParentMethodId;
|
||||||
|
|
||||||
@Schema(description = "是否默认使用,1-启用,0-不启用")
|
|
||||||
private Integer isDefaultUse;
|
|
||||||
|
|
||||||
@Schema(description = "任务数", example = "27414")
|
@Schema(description = "任务数", example = "27414")
|
||||||
private Integer taskCount;
|
private Integer taskCount;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import com.alibaba.excel.annotation.*;
|
import com.alibaba.excel.annotation.*;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 子样与检测方法配置 Response VO")
|
@Schema(description = "管理后台 - 子样与分样检测方法配置表 Response VO")
|
||||||
@Data
|
@Data
|
||||||
@ExcelIgnoreUnannotated
|
@ExcelIgnoreUnannotated
|
||||||
public class ConfigSubSampleMethodRespVO {
|
public class ConfigSubSampleMethodRespVO {
|
||||||
@@ -20,13 +20,8 @@ public class ConfigSubSampleMethodRespVO {
|
|||||||
@ExcelProperty("子样配置ID")
|
@ExcelProperty("子样配置ID")
|
||||||
private Long configSubSampleId;
|
private Long configSubSampleId;
|
||||||
|
|
||||||
@Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30543")
|
@Schema(description = "分样与检测方法配置ID", example = "30543")
|
||||||
@ExcelProperty("检测方法配置ID")
|
private Long configSubSampleParentMethodId;
|
||||||
private Long configAssayMethodId;
|
|
||||||
|
|
||||||
@Schema(description = "是否默认使用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@ExcelProperty("是否默认使用,1-启用,0-不启用")
|
|
||||||
private Integer isDefaultUse;
|
|
||||||
|
|
||||||
@Schema(description = "任务数", example = "27414")
|
@Schema(description = "任务数", example = "27414")
|
||||||
@ExcelProperty("任务数")
|
@ExcelProperty("任务数")
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import lombok.*;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 子样与检测方法配置新增/修改 Request VO")
|
@Schema(description = "管理后台 - 子样与分样检测方法配置表新增/修改 Request VO")
|
||||||
@Data
|
@Data
|
||||||
public class ConfigSubSampleMethodSaveReqVO {
|
public class ConfigSubSampleMethodSaveReqVO {
|
||||||
|
|
||||||
@@ -16,13 +16,8 @@ public class ConfigSubSampleMethodSaveReqVO {
|
|||||||
@NotNull(message = "子样配置ID不能为空")
|
@NotNull(message = "子样配置ID不能为空")
|
||||||
private Long configSubSampleId;
|
private Long configSubSampleId;
|
||||||
|
|
||||||
@Schema(description = "检测方法配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30543")
|
@Schema(description = "分样与检测方法配置ID", example = "30543")
|
||||||
@NotNull(message = "检测方法配置ID不能为空")
|
private Long configSubSampleParentMethodId;
|
||||||
private Long configAssayMethodId;
|
|
||||||
|
|
||||||
@Schema(description = "是否默认使用,1-启用,0-不启用", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@NotNull(message = "是否默认使用,1-启用,0-不启用不能为空")
|
|
||||||
private Integer isDefaultUse;
|
|
||||||
|
|
||||||
@Schema(description = "任务数", example = "27414")
|
@Schema(description = "任务数", example = "27414")
|
||||||
private Integer taskCount;
|
private Integer taskCount;
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ public class ConfigSubSampleParentMethodPageReqVO extends PageParam {
|
|||||||
@Schema(description = "检测方法配置ID", example = "24094")
|
@Schema(description = "检测方法配置ID", example = "24094")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
|
@Schema(description = "是否默认使用,1-启用,0-不启用")
|
||||||
|
private Integer isDefaultUse;
|
||||||
|
|
||||||
@Schema(description = "结果处理方式,automatic-自动报出(不超差),manual-手动报出,modify-允许修改")
|
@Schema(description = "结果处理方式,automatic-自动报出(不超差),manual-手动报出,modify-允许修改")
|
||||||
private String resultTreatmentWay;
|
private String resultTreatmentWay;
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ public class ConfigSubSampleParentMethodRespVO {
|
|||||||
@ExcelProperty("检测方法配置ID")
|
@ExcelProperty("检测方法配置ID")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
|
@Schema(description = "是否默认使用,1-启用,0-不启用")
|
||||||
|
private Integer isDefaultUse;
|
||||||
|
|
||||||
@Schema(description = "结果处理方式,automatic-自动报出(不超差),manual-手动报出,modify-允许修改")
|
@Schema(description = "结果处理方式,automatic-自动报出(不超差),manual-手动报出,modify-允许修改")
|
||||||
@ExcelProperty("结果处理方式,automatic-自动报出(不超差),manual-手动报出,modify-允许修改")
|
@ExcelProperty("结果处理方式,automatic-自动报出(不超差),manual-手动报出,modify-允许修改")
|
||||||
private String resultTreatmentWay;
|
private String resultTreatmentWay;
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ public class ConfigSubSampleParentMethodSaveReqVO {
|
|||||||
@NotNull(message = "检测方法配置ID不能为空")
|
@NotNull(message = "检测方法配置ID不能为空")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
|
|
||||||
|
@Schema(description = "是否默认使用,1-启用,0-不启用")
|
||||||
|
private Integer isDefaultUse;
|
||||||
|
|
||||||
@Schema(description = "结果处理方式,automatic-自动报出(不超差),manual-手动报出,modify-允许修改")
|
@Schema(description = "结果处理方式,automatic-自动报出(不超差),manual-手动报出,modify-允许修改")
|
||||||
private String resultTreatmentWay;
|
private String resultTreatmentWay;
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import java.util.*;
|
|||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||||
/**
|
/**
|
||||||
* 子样与检测方法配置 DO
|
* 子样与分样检测方法配置表 DO
|
||||||
*
|
*
|
||||||
* @author 后台管理
|
* @author 后台管理
|
||||||
*/
|
*/
|
||||||
@@ -37,15 +37,10 @@ public class ConfigSubSampleMethodDO extends BusinessBaseDO {
|
|||||||
@TableField("CFG_SB_SMP_ID")
|
@TableField("CFG_SB_SMP_ID")
|
||||||
private Long configSubSampleId;
|
private Long configSubSampleId;
|
||||||
/**
|
/**
|
||||||
* 检测方法配置ID
|
* 分样与检测方法配置ID
|
||||||
*/
|
*/
|
||||||
@TableField("CFG_ASY_MTHD_ID")
|
@TableField("CFG_SB_SMP_PRN_MTHD_ID")
|
||||||
private Long configAssayMethodId;
|
private Long configSubSampleParentMethodId;
|
||||||
/**
|
|
||||||
* 是否默认使用,1-是,0-否
|
|
||||||
*/
|
|
||||||
@TableField("IS_DFT_USE")
|
|
||||||
private Integer isDefaultUse;
|
|
||||||
/**
|
/**
|
||||||
* 任务数
|
* 任务数
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -42,6 +42,11 @@ public class ConfigSubSampleParentMethodDO extends BusinessBaseDO {
|
|||||||
@TableField("CFG_ASY_MTHD_ID")
|
@TableField("CFG_ASY_MTHD_ID")
|
||||||
private Long configAssayMethodId;
|
private Long configAssayMethodId;
|
||||||
/**
|
/**
|
||||||
|
* 是否默认使用,1-是,0-否
|
||||||
|
*/
|
||||||
|
@TableField("IS_DFT_USE")
|
||||||
|
private Integer isDefaultUse;
|
||||||
|
/**
|
||||||
* 结果处理方式,automatic-自动报出(不超差),manual-手动报出,modify-允许修改
|
* 结果处理方式,automatic-自动报出(不超差),manual-手动报出,modify-允许修改
|
||||||
*/
|
*/
|
||||||
@TableField("RSLT_TMT_WY")
|
@TableField("RSLT_TMT_WY")
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
|||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodProjectPageReqVO;
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodProjectPageReqVO;
|
||||||
|
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.ConfigAssayMethodProjectDO;
|
||||||
import com.zt.plat.module.qms.business.dic.dal.dataobject.DictionaryProjectDO;
|
import com.zt.plat.module.qms.business.dic.dal.dataobject.DictionaryProjectDO;
|
||||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
@@ -63,5 +64,27 @@ public interface ConfigAssayMethodProjectMapper extends BaseMapperX<ConfigAssayM
|
|||||||
.selectAs(DictionaryProjectDO::getShowName, ConfigAssayMethodProjectExtendRespVO::getShowName)
|
.selectAs(DictionaryProjectDO::getShowName, ConfigAssayMethodProjectExtendRespVO::getShowName)
|
||||||
.in(ConfigAssayMethodProjectDO::getConfigAssayMethodId, configAssayMethodIds));
|
.in(ConfigAssayMethodProjectDO::getConfigAssayMethodId, configAssayMethodIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据子样配置及分析部门查询检测项目
|
||||||
|
* @param configSubSampleIds 子样配置
|
||||||
|
* @param assayDepartmentId 分析部门
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
default List<ConfigAssayMethodProjectExtendRespVO> selectByConfigSubSampleIdsAndAssayDepartmentId(List<Long> configSubSampleIds, Long assayDepartmentId) {
|
||||||
|
StringBuilder inSql = new StringBuilder("SELECT tcssm.CFG_ASY_MTHD_ID FROM T_CFG_SB_SMP_MTHD tcssm WHERE tcssm.DELETED = 0 AND tcssm.CFG_SB_SMP_ID IN (");
|
||||||
|
for (Long configSubSampleId : configSubSampleIds) {
|
||||||
|
inSql.append(configSubSampleId).append(",");
|
||||||
|
}
|
||||||
|
inSql.delete(inSql.length() - 1, inSql.length());
|
||||||
|
inSql.append(")");
|
||||||
|
return selectJoinList(ConfigAssayMethodProjectExtendRespVO.class, new MPJLambdaWrapperX<ConfigAssayMethodProjectDO>()
|
||||||
|
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, ConfigAssayMethodProjectDO::getConfigAssayMethodId)
|
||||||
|
.selectAll(ConfigAssayMethodProjectDO.class)
|
||||||
|
.selectAs(ConfigAssayMethodDO::getName, ConfigAssayMethodProjectExtendRespVO::getConfigAssayMethodName)
|
||||||
|
.selectAs(ConfigAssayMethodDO::getMethodNameCategory, ConfigAssayMethodProjectExtendRespVO::getConfigAssayMethodNameAndCategory)
|
||||||
|
.eq(ConfigAssayMethodDO::getAssayDepartmentId, assayDepartmentId)
|
||||||
|
.inSql(ConfigAssayMethodProjectDO::getConfigAssayMethodId, inSql.toString()));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
package com.zt.plat.module.qms.business.config.dal.mapper;
|
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.common.pojo.PageResult;
|
||||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodPageReqVO;
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodPageReqVO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
||||||
|
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.dataobject.ConfigSubSampleMethodDO;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleParentMethodDO;
|
||||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -15,7 +16,7 @@ import java.util.List;
|
|||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 子样与检测方法配置 Mapper
|
* 子样与分样检测方法配置表 Mapper
|
||||||
*
|
*
|
||||||
* @author 后台管理
|
* @author 后台管理
|
||||||
*/
|
*/
|
||||||
@@ -25,8 +26,7 @@ public interface ConfigSubSampleMethodMapper extends BaseMapperX<ConfigSubSample
|
|||||||
default PageResult<ConfigSubSampleMethodDO> selectPage(ConfigSubSampleMethodPageReqVO reqVO) {
|
default PageResult<ConfigSubSampleMethodDO> selectPage(ConfigSubSampleMethodPageReqVO reqVO) {
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigSubSampleMethodDO>()
|
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigSubSampleMethodDO>()
|
||||||
.eqIfPresent(ConfigSubSampleMethodDO::getConfigSubSampleId, reqVO.getConfigSubSampleId())
|
.eqIfPresent(ConfigSubSampleMethodDO::getConfigSubSampleId, reqVO.getConfigSubSampleId())
|
||||||
.eqIfPresent(ConfigSubSampleMethodDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
.eqIfPresent(ConfigSubSampleMethodDO::getConfigSubSampleParentMethodId, reqVO.getConfigSubSampleParentMethodId())
|
||||||
.eqIfPresent(ConfigSubSampleMethodDO::getIsDefaultUse, reqVO.getIsDefaultUse())
|
|
||||||
.eqIfPresent(ConfigSubSampleMethodDO::getTaskCount, reqVO.getTaskCount())
|
.eqIfPresent(ConfigSubSampleMethodDO::getTaskCount, reqVO.getTaskCount())
|
||||||
.eqIfPresent(ConfigSubSampleMethodDO::getResultTreatmentWay, reqVO.getResultTreatmentWay())
|
.eqIfPresent(ConfigSubSampleMethodDO::getResultTreatmentWay, reqVO.getResultTreatmentWay())
|
||||||
.eqIfPresent(ConfigSubSampleMethodDO::getAssessmentMethod, reqVO.getAssessmentMethod())
|
.eqIfPresent(ConfigSubSampleMethodDO::getAssessmentMethod, reqVO.getAssessmentMethod())
|
||||||
@@ -40,8 +40,11 @@ public interface ConfigSubSampleMethodMapper extends BaseMapperX<ConfigSubSample
|
|||||||
|
|
||||||
default List<ConfigSubSampleMethodExtendRespVO> selectByConfigSubSampleIdAndAssayDepartmentId(Long configSubSampleId, Long assayDepartmentId) {
|
default List<ConfigSubSampleMethodExtendRespVO> selectByConfigSubSampleIdAndAssayDepartmentId(Long configSubSampleId, Long assayDepartmentId) {
|
||||||
return selectJoinList(ConfigSubSampleMethodExtendRespVO.class, new MPJLambdaWrapperX<ConfigSubSampleMethodDO>()
|
return selectJoinList(ConfigSubSampleMethodExtendRespVO.class, new MPJLambdaWrapperX<ConfigSubSampleMethodDO>()
|
||||||
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, ConfigSubSampleMethodDO::getConfigAssayMethodId)
|
.leftJoin(ConfigSubSampleParentMethodDO.class, ConfigSubSampleParentMethodDO::getId, ConfigSubSampleMethodDO::getConfigSubSampleParentMethodId)
|
||||||
|
.leftJoin(ConfigAssayMethodDO.class, ConfigAssayMethodDO::getId, ConfigSubSampleParentMethodDO::getConfigAssayMethodId)
|
||||||
.selectAll(ConfigSubSampleMethodDO.class)
|
.selectAll(ConfigSubSampleMethodDO.class)
|
||||||
|
.selectAs(ConfigSubSampleParentMethodDO::getConfigAssayMethodId, ConfigSubSampleMethodExtendRespVO::getConfigAssayMethodId)
|
||||||
|
.selectAs(ConfigSubSampleParentMethodDO::getIsDefaultUse, ConfigSubSampleMethodExtendRespVO::getIsDefaultUse)
|
||||||
.selectAs(ConfigAssayMethodDO::getName, ConfigSubSampleMethodExtendRespVO::getConfigAssayMethodName)
|
.selectAs(ConfigAssayMethodDO::getName, ConfigSubSampleMethodExtendRespVO::getConfigAssayMethodName)
|
||||||
.selectAs(ConfigAssayMethodDO::getMethodNameCategory, ConfigSubSampleMethodExtendRespVO::getConfigAssayMethodNameAndCategory)
|
.selectAs(ConfigAssayMethodDO::getMethodNameCategory, ConfigSubSampleMethodExtendRespVO::getConfigAssayMethodNameAndCategory)
|
||||||
.selectAs(ConfigAssayMethodDO::getMethodCode, ConfigSubSampleMethodExtendRespVO::getConfigAssayMethodCode)
|
.selectAs(ConfigAssayMethodDO::getMethodCode, ConfigSubSampleMethodExtendRespVO::getConfigAssayMethodCode)
|
||||||
@@ -49,20 +52,46 @@ public interface ConfigSubSampleMethodMapper extends BaseMapperX<ConfigSubSample
|
|||||||
.eq(ConfigAssayMethodDO::getAssayDepartmentId, assayDepartmentId));
|
.eq(ConfigAssayMethodDO::getAssayDepartmentId, assayDepartmentId));
|
||||||
}
|
}
|
||||||
|
|
||||||
default ConfigSubSampleMethodDO selectByConfigSubSampleIdAndConfigAssayMethodId(Long configSubSampleId, Long configAssayMethodId) {
|
default ConfigSubSampleMethodExtendRespVO selectByConfigSubSampleIdAndConfigAssayMethodId(Long configSubSampleId, Long configAssayMethodId) {
|
||||||
return selectOne(new LambdaQueryWrapper<ConfigSubSampleMethodDO>()
|
return selectJoinOne(ConfigSubSampleMethodExtendRespVO.class, new MPJLambdaWrapperX<ConfigSubSampleMethodDO>()
|
||||||
|
.leftJoin(ConfigSubSampleParentMethodDO.class, ConfigSubSampleParentMethodDO::getId, ConfigSubSampleMethodDO::getConfigSubSampleParentMethodId)
|
||||||
|
.selectAll(ConfigSubSampleMethodDO.class)
|
||||||
|
.selectAs(ConfigSubSampleParentMethodDO::getConfigAssayMethodId, ConfigSubSampleMethodExtendRespVO::getConfigAssayMethodId)
|
||||||
|
.selectAs(ConfigSubSampleParentMethodDO::getIsDefaultUse, ConfigSubSampleMethodExtendRespVO::getIsDefaultUse)
|
||||||
.eq(ConfigSubSampleMethodDO::getConfigSubSampleId, configSubSampleId)
|
.eq(ConfigSubSampleMethodDO::getConfigSubSampleId, configSubSampleId)
|
||||||
.eq(ConfigSubSampleMethodDO::getConfigAssayMethodId, configAssayMethodId));
|
.eq(ConfigSubSampleParentMethodDO::getConfigAssayMethodId, configAssayMethodId));
|
||||||
}
|
}
|
||||||
|
|
||||||
default List<ConfigSubSampleMethodDO> selectByConfigSubSampleIdsAndConfigAssayMethodId(List<Long> configSubSampleIds, Long configAssayMethodId) {
|
default List<ConfigSubSampleMethodExtendRespVO> selectByConfigSubSampleIdsAndConfigAssayMethodId(List<Long> configSubSampleIds, Long configAssayMethodId) {
|
||||||
return selectList(new LambdaQueryWrapper<ConfigSubSampleMethodDO>()
|
return selectJoinList(ConfigSubSampleMethodExtendRespVO.class, new MPJLambdaWrapperX<ConfigSubSampleMethodDO>()
|
||||||
|
.leftJoin(ConfigSubSampleParentMethodDO.class, ConfigSubSampleParentMethodDO::getId, ConfigSubSampleMethodDO::getConfigSubSampleParentMethodId)
|
||||||
|
.selectAll(ConfigSubSampleMethodDO.class)
|
||||||
|
.selectAs(ConfigSubSampleParentMethodDO::getConfigAssayMethodId, ConfigSubSampleMethodExtendRespVO::getConfigAssayMethodId)
|
||||||
|
.selectAs(ConfigSubSampleParentMethodDO::getIsDefaultUse, ConfigSubSampleMethodExtendRespVO::getIsDefaultUse)
|
||||||
.in(ConfigSubSampleMethodDO::getConfigSubSampleId, configSubSampleIds)
|
.in(ConfigSubSampleMethodDO::getConfigSubSampleId, configSubSampleIds)
|
||||||
.eq(ConfigSubSampleMethodDO::getConfigAssayMethodId, configAssayMethodId));
|
.eq(ConfigSubSampleParentMethodDO::getConfigAssayMethodId, configAssayMethodId));
|
||||||
}
|
}
|
||||||
|
|
||||||
default List<ConfigSubSampleMethodDO> selectByConfigSubSampleIds(List<Long> configSubSampleIds) {
|
default List<ConfigSubSampleMethodExtendRespVO> selectByConfigSubSampleIdsAndConfigAssayMethodIds(List<Long> configSubSampleIds, List<Long> configAssayMethodIds) {
|
||||||
return selectList(new LambdaQueryWrapper<ConfigSubSampleMethodDO>()
|
return selectJoinList(ConfigSubSampleMethodExtendRespVO.class, new MPJLambdaWrapperX<ConfigSubSampleMethodDO>()
|
||||||
|
.leftJoin(ConfigSubSampleParentMethodDO.class, ConfigSubSampleParentMethodDO::getId, ConfigSubSampleMethodDO::getConfigSubSampleParentMethodId)
|
||||||
|
.leftJoin(ConfigSubSampleDO.class, ConfigSubSampleDO::getId, ConfigSubSampleMethodDO::getConfigSubSampleId)
|
||||||
|
.selectAll(ConfigSubSampleMethodDO.class)
|
||||||
|
.selectAs(ConfigSubSampleParentMethodDO::getConfigAssayMethodId, ConfigSubSampleMethodExtendRespVO::getConfigAssayMethodId)
|
||||||
|
.selectAs(ConfigSubSampleParentMethodDO::getIsDefaultUse, ConfigSubSampleMethodExtendRespVO::getIsDefaultUse)
|
||||||
|
.selectAs(ConfigSubSampleDO::getConfigSubSampleParentId, ConfigSubSampleMethodExtendRespVO::getConfigSubSampleParentId)
|
||||||
|
.selectAs(ConfigSubSampleDO::getConfigBaseSampleId, ConfigSubSampleMethodExtendRespVO::getConfigBaseSampleId)
|
||||||
|
.selectAs(ConfigSubSampleDO::getBaseSampleId, ConfigSubSampleMethodExtendRespVO::getBaseSampleId)
|
||||||
|
.in(ConfigSubSampleMethodDO::getConfigSubSampleId, configSubSampleIds)
|
||||||
|
.in(ConfigSubSampleParentMethodDO::getConfigAssayMethodId, configAssayMethodIds));
|
||||||
|
}
|
||||||
|
|
||||||
|
default List<ConfigSubSampleMethodExtendRespVO> selectByConfigSubSampleIds(List<Long> configSubSampleIds) {
|
||||||
|
return selectJoinList(ConfigSubSampleMethodExtendRespVO.class, new MPJLambdaWrapperX<ConfigSubSampleMethodDO>()
|
||||||
|
.leftJoin(ConfigSubSampleParentMethodDO.class, ConfigSubSampleParentMethodDO::getId, ConfigSubSampleMethodDO::getConfigSubSampleParentMethodId)
|
||||||
|
.selectAll(ConfigSubSampleMethodDO.class)
|
||||||
|
.selectAs(ConfigSubSampleParentMethodDO::getConfigAssayMethodId, ConfigSubSampleMethodExtendRespVO::getConfigAssayMethodId)
|
||||||
|
.selectAs(ConfigSubSampleParentMethodDO::getIsDefaultUse, ConfigSubSampleMethodExtendRespVO::getIsDefaultUse)
|
||||||
.in(ConfigSubSampleMethodDO::getConfigSubSampleId, configSubSampleIds));
|
.in(ConfigSubSampleMethodDO::getConfigSubSampleId, configSubSampleIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ public interface ConfigSubSampleParentMethodMapper extends BaseMapperX<ConfigSub
|
|||||||
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigSubSampleParentMethodDO>()
|
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigSubSampleParentMethodDO>()
|
||||||
.eqIfPresent(ConfigSubSampleParentMethodDO::getConfigSubSampleParentId, reqVO.getConfigSubSampleParentId())
|
.eqIfPresent(ConfigSubSampleParentMethodDO::getConfigSubSampleParentId, reqVO.getConfigSubSampleParentId())
|
||||||
.eqIfPresent(ConfigSubSampleParentMethodDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
.eqIfPresent(ConfigSubSampleParentMethodDO::getConfigAssayMethodId, reqVO.getConfigAssayMethodId())
|
||||||
|
.eqIfPresent(ConfigSubSampleParentMethodDO::getIsDefaultUse, reqVO.getIsDefaultUse())
|
||||||
.eqIfPresent(ConfigSubSampleParentMethodDO::getResultTreatmentWay, reqVO.getResultTreatmentWay())
|
.eqIfPresent(ConfigSubSampleParentMethodDO::getResultTreatmentWay, reqVO.getResultTreatmentWay())
|
||||||
.eqIfPresent(ConfigSubSampleParentMethodDO::getCalculateMethod, reqVO.getCalculateMethod())
|
.eqIfPresent(ConfigSubSampleParentMethodDO::getCalculateMethod, reqVO.getCalculateMethod())
|
||||||
.eqIfPresent(ConfigSubSampleParentMethodDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
.eqIfPresent(ConfigSubSampleParentMethodDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||||
|
|||||||
@@ -12,14 +12,14 @@ import com.zt.plat.framework.common.pojo.PageResult;
|
|||||||
import com.zt.plat.framework.common.pojo.PageParam;
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 子样与检测方法配置 Service 接口
|
* 子样与分样检测方法配置表 Service 接口
|
||||||
*
|
*
|
||||||
* @author 后台管理
|
* @author 后台管理
|
||||||
*/
|
*/
|
||||||
public interface ConfigSubSampleMethodService {
|
public interface ConfigSubSampleMethodService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建子样与检测方法配置
|
* 创建子样与分样检测方法配置表
|
||||||
*
|
*
|
||||||
* @param createReqVO 创建信息
|
* @param createReqVO 创建信息
|
||||||
* @return 编号
|
* @return 编号
|
||||||
@@ -27,39 +27,39 @@ public interface ConfigSubSampleMethodService {
|
|||||||
ConfigSubSampleMethodRespVO createConfigSubSampleMethod(@Valid ConfigSubSampleMethodSaveReqVO createReqVO);
|
ConfigSubSampleMethodRespVO createConfigSubSampleMethod(@Valid ConfigSubSampleMethodSaveReqVO createReqVO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新子样与检测方法配置
|
* 更新子样与分样检测方法配置表
|
||||||
*
|
*
|
||||||
* @param updateReqVO 更新信息
|
* @param updateReqVO 更新信息
|
||||||
*/
|
*/
|
||||||
void updateConfigSubSampleMethod(@Valid ConfigSubSampleMethodSaveReqVO updateReqVO);
|
void updateConfigSubSampleMethod(@Valid ConfigSubSampleMethodSaveReqVO updateReqVO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除子样与检测方法配置
|
* 删除子样与分样检测方法配置表
|
||||||
*
|
*
|
||||||
* @param id 编号
|
* @param id 编号
|
||||||
*/
|
*/
|
||||||
void deleteConfigSubSampleMethod(Long id);
|
void deleteConfigSubSampleMethod(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除子样与检测方法配置
|
* 批量删除子样与分样检测方法配置表
|
||||||
*
|
*
|
||||||
* @param ids 编号
|
* @param ids 编号
|
||||||
*/
|
*/
|
||||||
void deleteConfigSubSampleMethodListByIds(List<Long> ids);
|
void deleteConfigSubSampleMethodListByIds(List<Long> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得子样与检测方法配置
|
* 获得子样与分样检测方法配置表
|
||||||
*
|
*
|
||||||
* @param id 编号
|
* @param id 编号
|
||||||
* @return 子样与检测方法配置
|
* @return 子样与分样检测方法配置表
|
||||||
*/
|
*/
|
||||||
ConfigSubSampleMethodDO getConfigSubSampleMethod(Long id);
|
ConfigSubSampleMethodDO getConfigSubSampleMethod(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得子样与检测方法配置分页
|
* 获得子样与分样检测方法配置表分页
|
||||||
*
|
*
|
||||||
* @param pageReqVO 分页查询
|
* @param pageReqVO 分页查询
|
||||||
* @return 子样与检测方法配置分页
|
* @return 子样与分样检测方法配置表分页
|
||||||
*/
|
*/
|
||||||
PageResult<ConfigSubSampleMethodDO> getConfigSubSampleMethodPage(ConfigSubSampleMethodPageReqVO pageReqVO);
|
PageResult<ConfigSubSampleMethodDO> getConfigSubSampleMethodPage(ConfigSubSampleMethodPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import static com.zt.plat.framework.common.util.collection.CollectionUtils.conve
|
|||||||
import static com.zt.plat.module.qms.enums.ErrorCodeConstants.CONFIG_SUB_SAMPLE_METHOD_NOT_EXISTS;
|
import static com.zt.plat.module.qms.enums.ErrorCodeConstants.CONFIG_SUB_SAMPLE_METHOD_NOT_EXISTS;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 子样与检测方法配置 Service 实现类
|
* 子样与分样检测方法配置表 Service 实现类
|
||||||
*
|
*
|
||||||
* @author 后台管理
|
* @author 后台管理
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessSubSampleMapper;
|
|||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfInfo;
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfInfo;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfItem;
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfItem;
|
||||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfPoint;
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfPoint;
|
||||||
|
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodExtendRespVO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleMethodDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigSubSampleMethodDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigSubSampleMethodMapper;
|
import com.zt.plat.module.qms.business.config.dal.mapper.ConfigSubSampleMethodMapper;
|
||||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||||
@@ -115,7 +116,7 @@ public class AutoIngredientsServiceImpl implements AutoIngredientsService {
|
|||||||
List<Long> configSubSampleIdList = list.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
|
List<Long> configSubSampleIdList = list.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
//子样配置方法
|
//子样配置方法
|
||||||
List<ConfigSubSampleMethodDO> configSubSampleMethodList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodId(configSubSampleIdList, businessAssayTaskDO.getConfigAssayMethodId());
|
List<ConfigSubSampleMethodExtendRespVO> configSubSampleMethodList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodId(configSubSampleIdList, businessAssayTaskDO.getConfigAssayMethodId());
|
||||||
|
|
||||||
//分析任务id列表
|
//分析任务id列表
|
||||||
List<Long> businessAssayTaskDataIdList = list.stream().map(m -> m.getId()).collect(Collectors.toList());
|
List<Long> businessAssayTaskDataIdList = list.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
@@ -135,7 +136,7 @@ public class AutoIngredientsServiceImpl implements AutoIngredientsService {
|
|||||||
//分析人员信息
|
//分析人员信息
|
||||||
AdminUserRespDTO user = userList.stream().filter(f -> f.getId().equals(m.getAssayOperatorId())).findFirst().orElse(null);
|
AdminUserRespDTO user = userList.stream().filter(f -> f.getId().equals(m.getAssayOperatorId())).findFirst().orElse(null);
|
||||||
//子样配置信息
|
//子样配置信息
|
||||||
ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodList.stream().filter(f -> f.getConfigSubSampleId().equals(m.getConfigSubSampleId())).findFirst().orElse(null);
|
ConfigSubSampleMethodExtendRespVO configSubSampleMethodDO = configSubSampleMethodList.stream().filter(f -> f.getConfigSubSampleId().equals(m.getConfigSubSampleId())).findFirst().orElse(null);
|
||||||
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
|
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
|
||||||
//当前检测项目列表
|
//当前检测项目列表
|
||||||
List<BusinessAssayProjectDataExtendRespVO> currentBusinessAssayProjectDataList = businessAssayProjectDataList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(m.getId())).collect(Collectors.toList());
|
List<BusinessAssayProjectDataExtendRespVO> currentBusinessAssayProjectDataList = businessAssayProjectDataList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(m.getId())).collect(Collectors.toList());
|
||||||
@@ -196,7 +197,7 @@ public class AutoIngredientsServiceImpl implements AutoIngredientsService {
|
|||||||
//子样配置id列表
|
//子样配置id列表
|
||||||
List<Long> configSubSampleIdList = businessSubSampleDOList.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
|
List<Long> configSubSampleIdList = businessSubSampleDOList.stream().map(m -> m.getConfigSubSampleId()).distinct().collect(Collectors.toList());
|
||||||
//子样配置方法
|
//子样配置方法
|
||||||
List<ConfigSubSampleMethodDO> configSubSampleMethodList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodId(configSubSampleIdList, businessAssayTaskDO.getConfigAssayMethodId());
|
List<ConfigSubSampleMethodExtendRespVO> configSubSampleMethodList = configSubSampleMethodMapper.selectByConfigSubSampleIdsAndConfigAssayMethodId(configSubSampleIdList, businessAssayTaskDO.getConfigAssayMethodId());
|
||||||
|
|
||||||
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataIds(businessAssayTaskDataIdList);
|
List<BusinessAssayProjectDataExtendRespVO> businessAssayProjectDataList = businessAssayProjectDataMapper.selectByBusinessAssayTaskDataIds(businessAssayTaskDataIdList);
|
||||||
List<Long> businessAssayProjectDataIdList = businessAssayProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
List<Long> businessAssayProjectDataIdList = businessAssayProjectDataList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
||||||
@@ -210,7 +211,7 @@ public class AutoIngredientsServiceImpl implements AutoIngredientsService {
|
|||||||
BusinessSubSampleDO businessSubSampleDO = businessSubSampleDOList.stream().filter(f -> f.getId().equals(businessAssayTaskDataDO.getBusinessSubSampleId())).findFirst().orElse(null);
|
BusinessSubSampleDO businessSubSampleDO = businessSubSampleDOList.stream().filter(f -> f.getId().equals(businessAssayTaskDataDO.getBusinessSubSampleId())).findFirst().orElse(null);
|
||||||
|
|
||||||
//子样配置信息
|
//子样配置信息
|
||||||
ConfigSubSampleMethodDO configSubSampleMethodDO = configSubSampleMethodList.stream().filter(f -> f.getConfigSubSampleId().equals(businessSubSampleDO.getConfigSubSampleId())).findFirst().orElse(null);
|
ConfigSubSampleMethodExtendRespVO configSubSampleMethodDO = configSubSampleMethodList.stream().filter(f -> f.getConfigSubSampleId().equals(businessSubSampleDO.getConfigSubSampleId())).findFirst().orElse(null);
|
||||||
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
|
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
|
||||||
if (StringUtils.isNotBlank(configInfomation)) {
|
if (StringUtils.isNotBlank(configInfomation)) {
|
||||||
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
|
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ import com.zt.plat.framework.common.util.object.BeanUtils;
|
|||||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayProjectDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientDataDO;
|
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCCoefficientParameterDataDO;
|
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementProjectDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessQCManagementProjectDataDO;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessXRFDataDO;
|
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessXRFDataDO;
|
||||||
@@ -31,6 +29,7 @@ import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCCoefficientParam
|
|||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementProjectDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessQCManagementProjectDataMapper;
|
||||||
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessXRFDataMapper;
|
import com.zt.plat.module.qms.business.bus.dal.mapper.BusinessXRFDataMapper;
|
||||||
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodProjectDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigXRFConversionRateDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigXRFConversionRateDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigXRFLineDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigXRFLineDO;
|
||||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigXRFProjectDO;
|
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigXRFProjectDO;
|
||||||
@@ -223,13 +222,22 @@ public class XRFDataServiceImpl implements XRFDataService {
|
|||||||
if(conYgElement.getDataType() != null && "decimal".equals(conYgElement.getDataType())) {
|
if(conYgElement.getDataType() != null && "decimal".equals(conYgElement.getDataType())) {
|
||||||
conYgElementDataType = conYgElement.getDecimalPosition();
|
conYgElementDataType = conYgElement.getDecimalPosition();
|
||||||
}
|
}
|
||||||
Long elementId = conYgElement.getDictionaryProjectId();
|
Long elementId = conYgElement.getDictionaryProjectId();
|
||||||
List<BusinessAssayProjectDataExtendRespVO> currBusElementValueList = tempBusElementValueList.stream().filter(f -> f.getDictionaryProjectId().equals(elementId) && f.getIsEnabled().equals(1)).collect(Collectors.toList());
|
List<BusinessAssayProjectDataExtendRespVO> currBusElementValueList = tempBusElementValueList.stream().filter(f -> f.getDictionaryProjectId().equals(elementId) && f.getIsEnabled().equals(1)).collect(Collectors.toList());
|
||||||
|
String symbol = "=";
|
||||||
|
String minimumLimitValue = "";
|
||||||
if (currBusElementValueList != null && currBusElementValueList.size() > 0) {
|
if (currBusElementValueList != null && currBusElementValueList.size() > 0) {
|
||||||
for (BusinessAssayProjectDataExtendRespVO busElementValue : currBusElementValueList) {
|
for (BusinessAssayProjectDataExtendRespVO busElementValue : currBusElementValueList) {
|
||||||
//化验数据小数精度四舍六入五单双
|
//化验数据小数精度四舍六入五单双
|
||||||
if("decimal".equals(busElementValue.getDataType())) {
|
if("decimal".equals(busElementValue.getDataType())) {
|
||||||
busElementValue.setValue(elementValue.setScale(busElementValue.getDecimalPosition(), RoundingMode.HALF_EVEN).toPlainString());
|
busElementValue.setValue(elementValue.setScale(busElementValue.getDecimalPosition(), RoundingMode.HALF_EVEN).toPlainString());
|
||||||
|
if (elementValue.compareTo(new BigDecimal(busElementValue.getMinimumLimitValue())) < 0) {
|
||||||
|
symbol = "<";
|
||||||
|
minimumLimitValue = busElementValue.getMinimumLimitValue();
|
||||||
|
busElementValue.setValue(busElementValue.getMinimumLimitValue());
|
||||||
|
}
|
||||||
|
busElementValue.setSymbol(symbol);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
busElementValue.setValue(elementValue.setScale(conYgElementDataType, RoundingMode.HALF_EVEN).toPlainString());
|
busElementValue.setValue(elementValue.setScale(conYgElementDataType, RoundingMode.HALF_EVEN).toPlainString());
|
||||||
}
|
}
|
||||||
@@ -245,6 +253,13 @@ public class XRFDataServiceImpl implements XRFDataService {
|
|||||||
//化验数据小数精度四舍六入五单双
|
//化验数据小数精度四舍六入五单双
|
||||||
if("decimal".equals(busElementValue.getDataType())) {
|
if("decimal".equals(busElementValue.getDataType())) {
|
||||||
busElementValue.setValue(elementValue.setScale(busElementValue.getDecimalPosition(), RoundingMode.HALF_EVEN).toPlainString());
|
busElementValue.setValue(elementValue.setScale(busElementValue.getDecimalPosition(), RoundingMode.HALF_EVEN).toPlainString());
|
||||||
|
ConfigAssayMethodProjectDO configAssayMethodProjectDO = configAssayMethodProjectMapper.selectById(busElementValue.getConfigAssayMethodProjectId());
|
||||||
|
if (elementValue.compareTo(new BigDecimal(configAssayMethodProjectDO.getMinimumLimitValue())) < 0) {
|
||||||
|
symbol = "<";
|
||||||
|
minimumLimitValue = configAssayMethodProjectDO.getMinimumLimitValue();
|
||||||
|
busElementValue.setValue(configAssayMethodProjectDO.getMinimumLimitValue());
|
||||||
|
}
|
||||||
|
busElementValue.setSymbol(symbol);
|
||||||
} else {
|
} else {
|
||||||
busElementValue.setValue(elementValue.setScale(conYgElementDataType, RoundingMode.HALF_EVEN).toPlainString());
|
busElementValue.setValue(elementValue.setScale(conYgElementDataType, RoundingMode.HALF_EVEN).toPlainString());
|
||||||
}
|
}
|
||||||
@@ -258,13 +273,16 @@ public class XRFDataServiceImpl implements XRFDataService {
|
|||||||
reportFieldValueData.setFieldName(conYgElement.getSaveColumn());
|
reportFieldValueData.setFieldName(conYgElement.getSaveColumn());
|
||||||
reportFieldValueData.setFieldValue(elementValue.setScale(conYgElementDataType, RoundingMode.HALF_EVEN).toPlainString());
|
reportFieldValueData.setFieldValue(elementValue.setScale(conYgElementDataType, RoundingMode.HALF_EVEN).toPlainString());
|
||||||
reportFieldValueData.setDecimalPosition(ygDeviceSampleElement.getValueDecimals());
|
reportFieldValueData.setDecimalPosition(ygDeviceSampleElement.getValueDecimals());
|
||||||
reportFieldValueData.setMathSymbol("=");
|
reportFieldValueData.setMathSymbol(symbol);
|
||||||
|
if ("<".equals(symbol)) {
|
||||||
|
reportFieldValueData.setFieldValue(minimumLimitValue);
|
||||||
|
}
|
||||||
reportFieldValueData.setUnit(ygDeviceSampleElement.getXrfProjectUnit());
|
reportFieldValueData.setUnit(ygDeviceSampleElement.getXrfProjectUnit());
|
||||||
assayDataJson.put(conYgElement.getSaveColumn(), reportFieldValueData);
|
assayDataJson.put(conYgElement.getSaveColumn(), reportFieldValueData);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//循环元素修改流程节点
|
//循环元素修改
|
||||||
for (BusinessAssayProjectDataExtendRespVO busElementValue : tempBusElementValueList) {
|
for (BusinessAssayProjectDataExtendRespVO busElementValue : tempBusElementValueList) {
|
||||||
boolean match = busElementValueList.stream().anyMatch(m -> m.getId().equals(busElementValue.getId()));
|
boolean match = busElementValueList.stream().anyMatch(m -> m.getId().equals(busElementValue.getId()));
|
||||||
if (!match) {//已经添加过的,不再添加
|
if (!match) {//已经添加过的,不再添加
|
||||||
@@ -285,6 +303,13 @@ public class XRFDataServiceImpl implements XRFDataService {
|
|||||||
businessAssayTaskDataDOList.add(BeanUtils.toBean(businessAssayTaskData, BusinessAssayTaskDataDO.class));
|
businessAssayTaskDataDOList.add(BeanUtils.toBean(businessAssayTaskData, BusinessAssayTaskDataDO.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (currBusinessQCManagementDataList != null && currBusinessQCManagementDataList.size() > 0) {
|
||||||
|
for (BusinessQCManagementDataDO businessQCManagementData : currBusinessQCManagementDataList) {
|
||||||
|
busYgData.setBusinessQCManagementDataId(businessQCManagementData.getId());
|
||||||
|
busYgData.setIsMatched(QmsCommonConstant.YES);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
busYgDataList.add(busYgData);
|
busYgDataList.add(busYgData);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,4 +9,45 @@
|
|||||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<select id="selectAssayMethodProjectByBusinessSubSampleIdListAndConfigAssayMethodId" resultType="com.zt.plat.module.qms.business.bus.controller.vo.AssayMethodProjectRespVO">
|
||||||
|
SELECT
|
||||||
|
tbapd.DIC_PRJ_ID dictionaryProjectId,
|
||||||
|
tdp.NAME AS dictionaryProjectName,
|
||||||
|
tdp.SMPL_NAME AS dictionaryProjectSimpleName,
|
||||||
|
tdp.SHW_NAME AS dictionaryProjectShowName,
|
||||||
|
tbatd.CFG_ASY_MTHD_ID AS configAssayMethodId,
|
||||||
|
tcam.NAME AS configAssayMethodName,
|
||||||
|
tcam.MTHD_NAME_CTGR AS configAssayMethodNameAndCategory,
|
||||||
|
tcamp.SRT_NO
|
||||||
|
FROM
|
||||||
|
T_BSN_ASY_PRJ_DAT tbapd
|
||||||
|
LEFT JOIN T_BSN_ASY_TSK_DAT tbatd ON
|
||||||
|
tbapd.BSN_ASY_TSK_DAT_ID = tbatd.ID
|
||||||
|
LEFT JOIN T_CFG_ASY_MTHD tcam ON
|
||||||
|
tbatd.CFG_ASY_MTHD_ID = tcam.ID
|
||||||
|
LEFT JOIN T_CFG_ASY_MTHD_PRJ tcamp ON
|
||||||
|
tbapd.CFG_ASY_MTHD_PRJ_ID = tcamp.ID
|
||||||
|
LEFT JOIN T_DIC_PRJ tdp ON
|
||||||
|
tbapd.DIC_PRJ_ID = tdp.ID
|
||||||
|
WHERE
|
||||||
|
tbapd.DELETED = 0
|
||||||
|
AND tbapd.IS_ENBD = 1
|
||||||
|
AND tbatd.DELETED = 0
|
||||||
|
AND tbatd.IS_ASN_TSKD = 0
|
||||||
|
AND tbatd.BSN_SB_SMP_ID IN
|
||||||
|
<foreach collection="businessSubSampleIdList" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
AND tbatd.CFG_ASY_MTHD_ID = #{configAssayMethodId}
|
||||||
|
GROUP BY
|
||||||
|
tbapd.DIC_PRJ_ID,
|
||||||
|
tdp.NAME,
|
||||||
|
tdp.SMPL_NAME,
|
||||||
|
tdp.SHW_NAME,
|
||||||
|
tbatd.CFG_ASY_MTHD_ID,
|
||||||
|
tcam.NAME,
|
||||||
|
tcam.MTHD_NAME_CTGR,
|
||||||
|
tcamp.SRT_NO
|
||||||
|
ORDER BY tcamp.SRT_NO ASC
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -128,6 +128,8 @@
|
|||||||
tbss.SMP_FLW_NDE_TM AS sampleFlowNodeTime,
|
tbss.SMP_FLW_NDE_TM AS sampleFlowNodeTime,
|
||||||
tbatd.BSN_SB_SMP_ID AS businessSubSampleId,
|
tbatd.BSN_SB_SMP_ID AS businessSubSampleId,
|
||||||
tbatd.CFG_ASY_MTHD_ID AS configAssayMethodId,
|
tbatd.CFG_ASY_MTHD_ID AS configAssayMethodId,
|
||||||
|
tcam.NAME AS configAssayMethodName,
|
||||||
|
tcam.MTHD_NAME_CTGR AS configAssayMethodNameAndCategory,
|
||||||
tbatd.ASY_TP AS assayType,
|
tbatd.ASY_TP AS assayType,
|
||||||
tbatd.ASY_PRJ AS assayProject,
|
tbatd.ASY_PRJ AS assayProject,
|
||||||
tbatd.ASY_DEPT_ID AS assayDepartmentId,
|
tbatd.ASY_DEPT_ID AS assayDepartmentId,
|
||||||
@@ -136,6 +138,8 @@
|
|||||||
T_BSN_ASY_TSK_DAT tbatd
|
T_BSN_ASY_TSK_DAT tbatd
|
||||||
LEFT JOIN T_BSN_SB_SMP tbss ON
|
LEFT JOIN T_BSN_SB_SMP tbss ON
|
||||||
tbatd.BSN_SB_SMP_ID = tbss.ID
|
tbatd.BSN_SB_SMP_ID = tbss.ID
|
||||||
|
LEFT JOIN T_CFG_ASY_MTHD tcam ON
|
||||||
|
tbatd.CFG_ASY_MTHD_ID = tcam.ID
|
||||||
WHERE
|
WHERE
|
||||||
tbatd.DELETED = 0
|
tbatd.DELETED = 0
|
||||||
AND tbatd.IS_ASN_TSKD = 0
|
AND tbatd.IS_ASN_TSKD = 0
|
||||||
@@ -157,15 +161,23 @@
|
|||||||
<if test="reqVO.sampleReturnCode != null and reqVO.sampleReturnCode != ''">
|
<if test="reqVO.sampleReturnCode != null and reqVO.sampleReturnCode != ''">
|
||||||
AND tbss.SMP_RTN_CD = #{reqVO.sampleReturnCode}
|
AND tbss.SMP_RTN_CD = #{reqVO.sampleReturnCode}
|
||||||
</if>
|
</if>
|
||||||
GROUP BY tbss.ID ,
|
<if test="reqVO.sampleName != null and reqVO.sampleName != ''">
|
||||||
tbss.SMP_NAME ,
|
AND tbss.SMP_NAME like '%' || #{reqVO.sampleName} || '%'
|
||||||
tbss.SMP_CD ,
|
</if>
|
||||||
tbss.SMP_ASY_CD ,
|
<if test="reqVO.configAssayMethodNameAndCategory != null and reqVO.configAssayMethodNameAndCategory != ''">
|
||||||
tbss.SMP_RTN_CD ,
|
AND tcam.MTHD_NAME_CTGR like '%' || #{reqVO.configAssayMethodNameAndCategory} || '%'
|
||||||
|
</if>
|
||||||
|
GROUP BY tbss.ID,
|
||||||
|
tbss.SMP_NAME,
|
||||||
|
tbss.SMP_CD,
|
||||||
|
tbss.SMP_ASY_CD,
|
||||||
|
tbss.SMP_RTN_CD,
|
||||||
tbss.SMP_FLW_NDE_TM,
|
tbss.SMP_FLW_NDE_TM,
|
||||||
tbatd.BSN_SB_SMP_ID ,
|
tbatd.BSN_SB_SMP_ID,
|
||||||
tbatd.CFG_ASY_MTHD_ID ,
|
tbatd.CFG_ASY_MTHD_ID,
|
||||||
tbatd.ASY_TP ,
|
tcam.NAME,
|
||||||
|
tcam.MTHD_NAME_CTGR,
|
||||||
|
tbatd.ASY_TP,
|
||||||
tbatd.ASY_PRJ,
|
tbatd.ASY_PRJ,
|
||||||
tbatd.ASY_DEPT_ID,
|
tbatd.ASY_DEPT_ID,
|
||||||
tbatd.ASY_DEPT_NAME
|
tbatd.ASY_DEPT_NAME
|
||||||
|
|||||||
Reference in New Issue
Block a user