检测项目分配(已指定定检测方法)
This commit is contained in:
@@ -96,6 +96,13 @@ public class BusinessAssayProjectDataController implements BusinessControllerMar
|
||||
return success(BeanUtils.toBean(pageResult, BusinessAssayProjectDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得检测项目数据业务列表")
|
||||
public CommonResult<?> getBusinessAssayProjectDataList(BusinessAssayProjectDataReqVO reqVO) {
|
||||
List<BusinessAssayProjectDataExtendRespVO> list = businessAssayProjectDataService.getBusinessAssayProjectDataList(reqVO);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出检测项目数据业务 Excel")
|
||||
//@PreAuthorize("@ss.hasPermission('qms:business-assay-project-data:export')")
|
||||
|
||||
@@ -25,6 +25,8 @@ import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIg
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.framework.security.core.LoginUser;
|
||||
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.zt.plat.module.qms.business.bus.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustUnStandardProjectDO;
|
||||
import com.zt.plat.module.qms.business.bus.service.BusinessSampleEntrustUnStandardProjectService;
|
||||
@@ -95,6 +97,10 @@ public class BusinessSampleEntrustUnStandardProjectController implements Busines
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得委检登记样品检测项目表(无标准)列表")
|
||||
public CommonResult<List<BusinessSampleEntrustUnStandardProjectExtendRespVO>> getBusinessSampleEntrustUnStandardProjectList(BusinessSampleEntrustUnStandardProjectPageReqVO reqVO) {
|
||||
if (reqVO.getAssayDepartmentId() == null) {
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
reqVO.setAssayDepartmentId(loginUser.getVisitDeptId());
|
||||
}
|
||||
List<BusinessSampleEntrustUnStandardProjectExtendRespVO> list = businessSampleEntrustUnStandardProjectService.getBusinessSampleEntrustUnStandardProjectList(reqVO);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -11,6 +13,15 @@ public class BusinessAssayProjectDataExtendRespVO extends BusinessAssayProjectDa
|
||||
|
||||
@Schema(description = "主样配置ID")
|
||||
private Long configBaseSampleId;
|
||||
|
||||
@Schema(description = "检测方法配置ID", example = "9130")
|
||||
private Long configAssayMethodId;
|
||||
|
||||
@Schema(description = "分析方法名称")
|
||||
private String configAssayMethodName;
|
||||
|
||||
@Schema(description = "检测方法配置名称及类别")
|
||||
private String configAssayMethodNameAndCategory;
|
||||
|
||||
@Schema(description = "样品分样ID", example = "15024")
|
||||
private Long businessSubParentSampleId;
|
||||
@@ -33,6 +44,12 @@ public class BusinessAssayProjectDataExtendRespVO extends BusinessAssayProjectDa
|
||||
@Schema(description = "归库编号")
|
||||
private String sampleReturnCode;
|
||||
|
||||
@Schema(description = "样品流程节点KEY", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String sampleFlowNodeKey;
|
||||
|
||||
@Schema(description = "样品流程节点时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime sampleFlowNodeTime;
|
||||
|
||||
@Schema(description = "分析人员")
|
||||
private String assayOperator;
|
||||
|
||||
|
||||
@@ -89,4 +89,39 @@ public class BusinessAssayProjectDataReqVO {
|
||||
|
||||
@Schema(description = "检测任务ID列表", example = "16505")
|
||||
private List<Long> businessAssayTaskDataIdList;
|
||||
|
||||
@Schema(description = "分析部门ID", example = "18509")
|
||||
private Long assayDepartmentId;
|
||||
|
||||
@Schema(description = "是否已分配任务")
|
||||
private Integer isAssignTasked;
|
||||
|
||||
@Schema(description = "样品流程节点KEY")
|
||||
private String sampleFlowNodeKey;
|
||||
|
||||
@Schema(description = "样品流程节点时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] sampleFlowNodeTime;
|
||||
|
||||
@Schema(description = "检测项目字典id列表")
|
||||
private List<Long> dictionaryProjectIdList;
|
||||
|
||||
@Schema(description = "收样时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] sampleReceiveTime;
|
||||
|
||||
@Schema(description = "样品编号")
|
||||
private String sampleCode;
|
||||
|
||||
@Schema(description = "样品名称")
|
||||
private String sampleName;
|
||||
|
||||
@Schema(description = "分析编号")
|
||||
private String sampleAssayCode;
|
||||
|
||||
@Schema(description = "归库编号")
|
||||
private String sampleReturnCode;
|
||||
|
||||
@Schema(description = "样品状态")
|
||||
private String sampleStatus;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -377,18 +377,6 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
||||
//添加到列表
|
||||
businessBaseSampleDOList.add(businessBaseSampleDO);
|
||||
|
||||
//=======================报表==========================
|
||||
List<ConfigSampleReportDO> configSampleReportDOList = configSampleReportList.stream().filter(f -> f.getConfigBaseSampleId().equals(configBaseSampleId)).collect(Collectors.toList());
|
||||
for (ConfigSampleReportDO configSampleReport : configSampleReportDOList) {
|
||||
BusinessAssayReportDataDO businessAssayReportDataDO = new BusinessAssayReportDataDO();
|
||||
businessAssayReportDataDO.setBusinessBaseSampleId(businessBaseSampleDO.getId());
|
||||
businessAssayReportDataDO.setDataSource(configSampleReport.getDataSource());
|
||||
businessAssayReportDataDO.setConfigReportTypeId(configSampleReport.getConfigReportTypeId());
|
||||
businessAssayReportDataDO.setConfigSampleReportId(configSampleReport.getId());
|
||||
businessAssayReportDataDO.setSampleCode(businessBaseSampleDO.getSampleCode());
|
||||
|
||||
businessAssayReportDataDOList.add(businessAssayReportDataDO);
|
||||
}
|
||||
//=====================委托明细======================
|
||||
//设置主样id
|
||||
businessSampleEntrustDetailDO.setBusinessBaseSampleId(businessBaseSampleDO.getId());
|
||||
@@ -775,6 +763,24 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//=======================报表==========================
|
||||
List<ConfigSampleReportDO> configSampleReportDOList = configSampleReportList.stream().filter(f -> f.getConfigBaseSampleId().equals(configBaseSampleId)).collect(Collectors.toList());
|
||||
List<Long> currDataSourceConfigAssayMethodIdList = businessSubParentSampleAssessmentDOList.stream().filter(f -> f.getBusinessSubParentSampleId().equals(businessSubSampleDO.getBusinessSubParentSampleId())).map(m -> m.getConfigAssayMethodId()).distinct().collect(Collectors.toList());
|
||||
for (ConfigSampleReportDO configSampleReport : configSampleReportDOList) {
|
||||
BusinessAssayReportDataDO businessAssayReportDataDO = new BusinessAssayReportDataDO();
|
||||
businessAssayReportDataDO.setBusinessBaseSampleId(businessBaseSampleDO.getId());
|
||||
// if (StringUtils.isNotBlank(configSampleReport.getDataSource())){
|
||||
// businessAssayReportDataDO.setDataSource(configSampleReport.getDataSource());
|
||||
// } else {
|
||||
businessAssayReportDataDO.setDataSource(CollUtil.join(currDataSourceConfigAssayMethodIdList, ","));
|
||||
// }
|
||||
businessAssayReportDataDO.setConfigReportTypeId(configSampleReport.getConfigReportTypeId());
|
||||
businessAssayReportDataDO.setConfigSampleReportId(configSampleReport.getId());
|
||||
businessAssayReportDataDO.setSampleCode(businessBaseSampleDO.getSampleCode());
|
||||
|
||||
businessAssayReportDataDOList.add(businessAssayReportDataDO);
|
||||
}
|
||||
}
|
||||
|
||||
//处理委托登记下的分析部门及部门明细数据
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.qms.business.bus.liteflow.sample.taskassign;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||
@@ -121,6 +122,25 @@ public class SampleTaskAssignDataSaveOrUpdateCmp extends NodeComponent {
|
||||
|
||||
List<BusinessQCManagementParameterDataDO> businessQCManagementParameterDataDOList = sampleTaskAssignContext.getBusinessQCManagementParameterDataDOList();
|
||||
|
||||
|
||||
//需要删除的分析任务
|
||||
List<Long> removeAssayTaskDataIdList = sampleTaskAssignContext.getRemoveAssayTaskDataIdList();
|
||||
|
||||
//需要删除的分析任务参数
|
||||
List<Long> removeAssayTaskParameterDataIdList = sampleTaskAssignContext.getRemoveAssayTaskParameterDataIdList();
|
||||
|
||||
//需要删除的分析任务检测项目
|
||||
List<Long> removeAssayProjectIdList = sampleTaskAssignContext.getRemoveAssayProjectIdList();
|
||||
|
||||
//需要删除的分析任务检测项目参数
|
||||
List<Long> removeAssayParameterIdList = sampleTaskAssignContext.getRemoveAssayParameterIdList();
|
||||
|
||||
//需要删除的子样判定
|
||||
List<Long> removeSubSampleAssessmentIdList = sampleTaskAssignContext.getRemoveSubParentSampleAssessmentIdList();
|
||||
|
||||
//需要删除的分样判定
|
||||
List<Long> removeSubParentSampleAssessmentIdList = sampleTaskAssignContext.getRemoveSubParentSampleAssessmentIdList();
|
||||
|
||||
if (CollUtil.isNotEmpty(saveBusinessSubParentSampleAssessmentList)) {
|
||||
this.businessSubParentSampleAssessmentMapper.insertBatch(saveBusinessSubParentSampleAssessmentList);
|
||||
}
|
||||
@@ -188,6 +208,31 @@ public class SampleTaskAssignDataSaveOrUpdateCmp extends NodeComponent {
|
||||
if (CollUtil.isNotEmpty(businessQCManagementParameterDataDOList)) {
|
||||
this.businessQCManagementParameterDataMapper.insertBatch(businessQCManagementParameterDataDOList);
|
||||
}
|
||||
|
||||
if (CollUtil.isNotEmpty(removeAssayTaskDataIdList)) {
|
||||
this.businessAssayTaskDataMapper.deleteByIds(removeAssayTaskDataIdList);
|
||||
}
|
||||
|
||||
if (CollUtil.isNotEmpty(removeAssayTaskParameterDataIdList)) {
|
||||
this.businessAssayTaskParameterDataMapper.deleteByIds(removeAssayTaskParameterDataIdList);
|
||||
}
|
||||
|
||||
if (CollUtil.isNotEmpty(removeAssayProjectIdList)) {
|
||||
this.businessAssayProjectDataMapper.deleteByIds(removeAssayProjectIdList);
|
||||
}
|
||||
|
||||
if (CollUtil.isNotEmpty(removeAssayParameterIdList)) {
|
||||
this.businessAssayParameterDataMapper.deleteByIds(removeAssayParameterIdList);
|
||||
}
|
||||
|
||||
if (CollUtil.isNotEmpty(removeSubSampleAssessmentIdList)) {
|
||||
this.businessSubSampleAssessmentMapper.deleteByIds(removeSubSampleAssessmentIdList);
|
||||
}
|
||||
|
||||
if (CollUtil.isNotEmpty(removeSubParentSampleAssessmentIdList)) {
|
||||
this.businessSubParentSampleAssessmentMapper.deleteByIds(removeSubParentSampleAssessmentIdList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -398,6 +398,7 @@ public class SampleTaskAssignProjectNoMethodCmp extends NodeComponent {
|
||||
sampleTaskAssignContext.setUpdateBusinessAssayTaskList(updateBusinessAssayTaskList);
|
||||
|
||||
sampleTaskAssignContext.setSaveBusinessAssayTaskDataList(saveBusinessAssayTaskDataList);
|
||||
sampleTaskAssignContext.setSaveBusinessAssayTaskParameterDataList(saveBusinessAssayTaskParameterDataList);
|
||||
sampleTaskAssignContext.setSaveBusinessAssayProjectDataList(saveBusinessAssayProjectDataList);
|
||||
sampleTaskAssignContext.setSaveBusinessAssayParameterDataList(saveBusinessAssayParameterDataList);
|
||||
sampleTaskAssignContext.setSaveBusinessSampleEntrustUnStandardProjectList(saveBusinessSampleEntrustUnStandardProjectList);
|
||||
@@ -405,7 +406,6 @@ public class SampleTaskAssignProjectNoMethodCmp extends NodeComponent {
|
||||
|
||||
sampleTaskAssignContext.setBusinessAssayTaskDetailList(businessAssayTaskDetailList);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.zt.plat.module.qms.business.bus.liteflow.slot;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
@@ -148,4 +149,22 @@ public class SampleTaskAssignContext {
|
||||
/** 质控样-(质控空白)检测项目参数 **/
|
||||
private List<BusinessQCManagementParameterDataDO> businessQCManagementParameterDataDOList;
|
||||
|
||||
|
||||
/** 需要删除的分析任务 **/
|
||||
private List<Long> removeAssayTaskDataIdList;
|
||||
|
||||
/** 需要删除的分析任务参数 **/
|
||||
private List<Long> removeAssayTaskParameterDataIdList;
|
||||
|
||||
/** 需要删除的分析任务检测项目 **/
|
||||
private List<Long> removeAssayProjectIdList;
|
||||
|
||||
/** 需要删除的分析任务检测项目参数 **/
|
||||
private List<Long> removeAssayParameterIdList;
|
||||
|
||||
/** 需要删除的子样判定 **/
|
||||
private List<Long> removeSubSampleAssessmentIdList;
|
||||
|
||||
/** 需要删除的分样判定 **/
|
||||
private List<Long> removeSubParentSampleAssessmentIdList;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user