Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -43,8 +43,8 @@ public class SampleResultReportingController implements BusinessControllerMarker
|
|||||||
|
|
||||||
//获取方法对应的样品
|
//获取方法对应的样品
|
||||||
@GetMapping("/getSampleResultReportingList")
|
@GetMapping("/getSampleResultReportingList")
|
||||||
public CommonResult<?> getSampleResultReportingList(Long configAssayMethodId) {
|
public CommonResult<?> getSampleResultReportingList(BusinessSubParentSampleAssessmentGroupReqVO reqVO) {
|
||||||
JSONObject result = sampleResultReportingService.getSampleResultReportingList(configAssayMethodId);
|
JSONObject result = sampleResultReportingService.getSampleResultReportingList(reqVO);
|
||||||
return success(result);
|
return success(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,10 +100,10 @@ public class BusinessAssayTaskPageReqVO extends PageParam {
|
|||||||
@Schema(description = "签名信息")
|
@Schema(description = "签名信息")
|
||||||
private String documentSignature;
|
private String documentSignature;
|
||||||
|
|
||||||
@Schema(description = "完成状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "2")
|
@Schema(description = "完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "2")
|
||||||
private String finishStatus;
|
private String finishStatus;
|
||||||
|
|
||||||
@Schema(description = "流程状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "1")
|
@Schema(description = "流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "1")
|
||||||
private String flowStatus;
|
private String flowStatus;
|
||||||
|
|
||||||
@Schema(description = "所属部门")
|
@Schema(description = "所属部门")
|
||||||
|
|||||||
@@ -99,10 +99,10 @@ public class BusinessAssayTaskReqVO {
|
|||||||
@Schema(description = "签名信息")
|
@Schema(description = "签名信息")
|
||||||
private String documentSignature;
|
private String documentSignature;
|
||||||
|
|
||||||
@Schema(description = "完成状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "2")
|
@Schema(description = "完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "2")
|
||||||
private String finishStatus;
|
private String finishStatus;
|
||||||
|
|
||||||
@Schema(description = "流程状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "1")
|
@Schema(description = "流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "1")
|
||||||
private String flowStatus;
|
private String flowStatus;
|
||||||
|
|
||||||
@Schema(description = "所属部门")
|
@Schema(description = "所属部门")
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import com.alibaba.excel.annotation.*;
|
import com.alibaba.excel.annotation.*;
|
||||||
|
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 检测任务分配业务 Response VO")
|
@Schema(description = "管理后台 - 检测任务分配业务 Response VO")
|
||||||
@Data
|
@Data
|
||||||
@@ -116,12 +117,13 @@ public class BusinessAssayTaskRespVO {
|
|||||||
@ExcelProperty("签名信息")
|
@ExcelProperty("签名信息")
|
||||||
private String documentSignature;
|
private String documentSignature;
|
||||||
|
|
||||||
@Schema(description = "完成状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "2")
|
@Schema(description = "完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "2")
|
||||||
@ExcelProperty("完成状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved")
|
@ExcelProperty("完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed")
|
||||||
private String finishStatus;
|
private String finishStatus;
|
||||||
|
|
||||||
@Schema(description = "流程状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "1")
|
@Dict(dicCode = "flow_status")
|
||||||
@ExcelProperty("流程状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved")
|
@Schema(description = "流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "1")
|
||||||
|
@ExcelProperty("流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed")
|
||||||
private String flowStatus;
|
private String flowStatus;
|
||||||
|
|
||||||
@Schema(description = "所属部门")
|
@Schema(description = "所属部门")
|
||||||
|
|||||||
@@ -102,10 +102,10 @@ public class BusinessAssayTaskSaveReqVO {
|
|||||||
@Schema(description = "签名信息")
|
@Schema(description = "签名信息")
|
||||||
private String documentSignature;
|
private String documentSignature;
|
||||||
|
|
||||||
@Schema(description = "完成状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "2")
|
@Schema(description = "完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "2")
|
||||||
private String finishStatus;
|
private String finishStatus;
|
||||||
|
|
||||||
@Schema(description = "流程状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved", example = "1")
|
@Schema(description = "流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed", example = "1")
|
||||||
private String flowStatus;
|
private String flowStatus;
|
||||||
|
|
||||||
@Schema(description = "所属部门")
|
@Schema(description = "所属部门")
|
||||||
|
|||||||
@@ -17,6 +17,11 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class BusinessSampleEntrustDetailExtendRespVO extends BusinessSampleEntrustDetailRespVO {
|
public class BusinessSampleEntrustDetailExtendRespVO extends BusinessSampleEntrustDetailRespVO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 样品类型key
|
||||||
|
*/
|
||||||
|
private String sampleTypeDictionaryBusinessKey;
|
||||||
|
|
||||||
/** 样品大类名称 **/
|
/** 样品大类名称 **/
|
||||||
private String baseSampleName;
|
private String baseSampleName;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -17,4 +23,8 @@ public class BusinessSubParentSampleAssessmentGroupReqVO {
|
|||||||
|
|
||||||
@Schema(description = "分析部门名称")
|
@Schema(description = "分析部门名称")
|
||||||
private String assayDepartmentName;
|
private String assayDepartmentName;
|
||||||
|
|
||||||
|
@Schema(description = "收样时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] sampleReceiveTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.zt.plat.module.qms.business.bus.controller.vo;
|
package com.zt.plat.module.qms.business.bus.controller.vo;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@@ -22,4 +24,7 @@ public class NoReportSubParentSampleAssessmentRespVO {
|
|||||||
private String taskType;
|
private String taskType;
|
||||||
|
|
||||||
private String assayType;
|
private String assayType;
|
||||||
|
|
||||||
|
|
||||||
|
private LocalDateTime sampleReceiveTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,12 +160,12 @@ public class BusinessAssayTaskDO extends BusinessBaseDO {
|
|||||||
@TableField("DOC_SIG")
|
@TableField("DOC_SIG")
|
||||||
private String documentSignature;
|
private String documentSignature;
|
||||||
/**
|
/**
|
||||||
* 完成状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved
|
* 完成状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed
|
||||||
*/
|
*/
|
||||||
@TableField("FIN_STS")
|
@TableField("FIN_STS")
|
||||||
private String finishStatus;
|
private String finishStatus;
|
||||||
/**
|
/**
|
||||||
* 流程状态,未开始-not_start、审核中-running、已退回-returned、已通过-approved
|
* 流程状态,未开始-not_start、审核中-in_progress、已退回-returned、已通过-completed
|
||||||
*/
|
*/
|
||||||
@TableField("FLW_STS")
|
@TableField("FLW_STS")
|
||||||
private String flowStatus;
|
private String flowStatus;
|
||||||
|
|||||||
@@ -83,6 +83,14 @@ public interface BusinessSampleEntrustDetailMapper extends BaseMapperX<BusinessS
|
|||||||
return selectList(new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>().eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, businessSampleEntrustRegistrationId));
|
return selectList(new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>().eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, businessSampleEntrustRegistrationId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default List<BusinessSampleEntrustDetailExtendRespVO> selectExtendByBusinessSampleEntrustRegistrationId(Long businessSampleEntrustRegistrationId) {
|
||||||
|
return selectJoinList(BusinessSampleEntrustDetailExtendRespVO.class, new MPJLambdaWrapperX<BusinessSampleEntrustDetailDO>()
|
||||||
|
.leftJoin(BaseSampleDO.class, BaseSampleDO::getId, BusinessSampleEntrustDetailDO::getBaseSampleId)
|
||||||
|
.selectAll(BusinessSampleEntrustDetailDO.class)
|
||||||
|
.selectAs(BaseSampleDO::getDictionaryBusinessKey, BusinessSampleEntrustDetailExtendRespVO::getSampleTypeDictionaryBusinessKey)
|
||||||
|
.eq(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, businessSampleEntrustRegistrationId));
|
||||||
|
}
|
||||||
|
|
||||||
default List<BusinessSampleEntrustDetailDO> selectByBusinessSampleEntrustRegistrationIds(List<Long> businessSampleEntrustRegistrationIds) {
|
default List<BusinessSampleEntrustDetailDO> selectByBusinessSampleEntrustRegistrationIds(List<Long> businessSampleEntrustRegistrationIds) {
|
||||||
return selectList(new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>().in(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, businessSampleEntrustRegistrationIds));
|
return selectList(new LambdaQueryWrapperX<BusinessSampleEntrustDetailDO>().in(BusinessSampleEntrustDetailDO::getBusinessSampleEntrustRegistrationId, businessSampleEntrustRegistrationIds));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ public interface BusinessSubParentSampleAssessmentProjectMapper extends BaseMapp
|
|||||||
.eq(BusinessSubParentSampleAssessmentProjectDO::getConfigAssayMethodId, configAssayMethodId));
|
.eq(BusinessSubParentSampleAssessmentProjectDO::getConfigAssayMethodId, configAssayMethodId));
|
||||||
}
|
}
|
||||||
|
|
||||||
List<NoReportSubParentSampleAssessmentRespVO> selectNoReportSubParentSampleAssessment(@Param("configAssayMethodId") Long configAssayMethodId);
|
List<NoReportSubParentSampleAssessmentRespVO> selectNoReportSubParentSampleAssessment(@Param("reqVO") BusinessSubParentSampleAssessmentGroupReqVO reqVO);
|
||||||
|
|
||||||
List<RecheckSubSampleParentMethodRespVO> getRecheckAssayMethodList(@Param("baseSampleId") Long baseSampleId, @Param("businessSubParentSampleId") Long businessSubParentSampleId, @Param("configAssayMethodId") Long configAssayMethodId);
|
List<RecheckSubSampleParentMethodRespVO> getRecheckAssayMethodList(@Param("baseSampleId") Long baseSampleId, @Param("businessSubParentSampleId") Long businessSubParentSampleId, @Param("configAssayMethodId") Long configAssayMethodId);
|
||||||
|
|
||||||
|
|||||||
@@ -439,8 +439,8 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
|||||||
|
|
||||||
BusinessAssayTaskDO businessAssayTaskDO = businessAssayTaskMapper.selectById(businessAssayTaskId);
|
BusinessAssayTaskDO businessAssayTaskDO = businessAssayTaskMapper.selectById(businessAssayTaskId);
|
||||||
if (QmsCommonConstant.APPROVE.equals(auditStatus)) {
|
if (QmsCommonConstant.APPROVE.equals(auditStatus)) {
|
||||||
businessAssayTaskDO.setFinishStatus(QmsCommonConstant.APPROVED);
|
businessAssayTaskDO.setFinishStatus(QmsCommonConstant.COMPLETED);
|
||||||
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.APPROVED);
|
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.COMPLETED);
|
||||||
businessAssayTaskDO.setReportTime(LocalDateTime.now());
|
businessAssayTaskDO.setReportTime(LocalDateTime.now());
|
||||||
businessAssayTaskDO.setReportOperator(SecurityFrameworkUtils.getLoginUserNickname());
|
businessAssayTaskDO.setReportOperator(SecurityFrameworkUtils.getLoginUserNickname());
|
||||||
businessAssayTaskDO.setReportOperatorId(SecurityFrameworkUtils.getLoginUserId());
|
businessAssayTaskDO.setReportOperatorId(SecurityFrameworkUtils.getLoginUserId());
|
||||||
@@ -643,8 +643,9 @@ public class SampleAnalysisAuditServiceImpl implements SampleAnalysisAuditServic
|
|||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
businessAssayTaskDO.setTaskAssayStatus(QmsCommonConstant.SAVED);
|
||||||
businessAssayTaskDO.setFinishStatus(QmsCommonConstant.PENDING);
|
businessAssayTaskDO.setFinishStatus(QmsCommonConstant.PENDING);
|
||||||
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.NOT_START);
|
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.RETURNED);
|
||||||
}
|
}
|
||||||
businessAssayTaskMapper.updateById(businessAssayTaskDO);
|
businessAssayTaskMapper.updateById(businessAssayTaskDO);
|
||||||
|
|
||||||
|
|||||||
@@ -1098,8 +1098,8 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
BusinessAssayTaskDO businessAssayTaskDO = businessAssayTaskMapper.selectById(businessAssayTaskId);
|
BusinessAssayTaskDO businessAssayTaskDO = businessAssayTaskMapper.selectById(businessAssayTaskId);
|
||||||
businessAssayTaskDO.setTaskAssayStatus(QmsCommonConstant.SUBMITTED);
|
businessAssayTaskDO.setTaskAssayStatus(QmsCommonConstant.SUBMITTED);
|
||||||
businessAssayTaskDO.setAssaySubmitTime(LocalDateTime.now());
|
businessAssayTaskDO.setAssaySubmitTime(LocalDateTime.now());
|
||||||
businessAssayTaskDO.setFinishStatus(QmsCommonConstant.NOT_START);
|
businessAssayTaskDO.setFinishStatus(QmsCommonConstant.IN_PROGRESS);
|
||||||
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.NOT_START);
|
businessAssayTaskDO.setFlowStatus(QmsCommonConstant.IN_PROGRESS);
|
||||||
businessAssayTaskMapper.updateById(businessAssayTaskDO);
|
businessAssayTaskMapper.updateById(businessAssayTaskDO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.zt.plat.module.qms.business.bus.service;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -114,21 +115,22 @@ public class SampleEntrustServiceImpl implements SampleEntrustService {
|
|||||||
sampleEntrustRegistration.put(key, value);
|
sampleEntrustRegistration.put(key, value);
|
||||||
});
|
});
|
||||||
|
|
||||||
JSONArray jsonArray = new JSONArray();
|
List<BusinessSampleEntrustDetailExtendRespVO> sampleEntrustDetailExtendRespVOList = businessSampleEntrustDetailMapper.selectExtendByBusinessSampleEntrustRegistrationId(id);
|
||||||
jsonArray.add(sampleEntrustRegistration);
|
for (BusinessSampleEntrustDetailExtendRespVO businessSampleEntrustDetailExtendRespVO : sampleEntrustDetailExtendRespVOList) {
|
||||||
|
List<BusinessSampleEntrustProjectExtendRespVO> businessSampleEntrustProjectExtendRespVOList = businessSampleEntrustProjectMapper.selectByBusinessSampleEntrustDetailId(businessSampleEntrustDetailExtendRespVO.getId());
|
||||||
List<BusinessSampleEntrustDetailExtendRespVO> sampleEntrustDetailExtendRespVOList = new ArrayList<>();
|
|
||||||
List<BusinessSampleEntrustDetailDO> sampleEntrustDetailList = businessSampleEntrustDetailMapper.selectByBusinessSampleEntrustRegistrationId(id);
|
|
||||||
BusinessSampleEntrustDetailExtendRespVO businessSampleEntrustDetailExtendRespVO = null;
|
|
||||||
for (BusinessSampleEntrustDetailDO businessSampleEntrustDetailDO : sampleEntrustDetailList) {
|
|
||||||
businessSampleEntrustDetailExtendRespVO = BeanUtils.toBean(businessSampleEntrustDetailDO, BusinessSampleEntrustDetailExtendRespVO.class);
|
|
||||||
|
|
||||||
List<BusinessSampleEntrustProjectExtendRespVO> businessSampleEntrustProjectExtendRespVOList = businessSampleEntrustProjectMapper.selectByBusinessSampleEntrustDetailId(businessSampleEntrustDetailDO.getId());
|
|
||||||
|
|
||||||
businessSampleEntrustDetailExtendRespVO.setSampleEntrustDetailProjectList(businessSampleEntrustProjectExtendRespVOList);
|
businessSampleEntrustDetailExtendRespVO.setSampleEntrustDetailProjectList(businessSampleEntrustProjectExtendRespVOList);
|
||||||
|
|
||||||
sampleEntrustDetailExtendRespVOList.add(businessSampleEntrustDetailExtendRespVO);
|
|
||||||
}
|
}
|
||||||
|
//样品类型分组统计
|
||||||
|
Map<String, Long> groupMap = sampleEntrustDetailExtendRespVOList.stream().collect(Collectors.groupingBy(BusinessSampleEntrustDetailExtendRespVO::getSampleTypeDictionaryBusinessKey, Collectors.counting()));
|
||||||
|
for (Map.Entry<String, Long> entry : groupMap.entrySet()) {
|
||||||
|
String key = entry.getKey();
|
||||||
|
Long val = entry.getValue();
|
||||||
|
sampleEntrustRegistration.put(key + "Count", val);
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONArray jsonArray = new JSONArray();
|
||||||
|
jsonArray.add(sampleEntrustRegistration);
|
||||||
|
|
||||||
String sampleEntrustDetailJsonString = JSON.toJSONString(sampleEntrustDetailExtendRespVOList, context);
|
String sampleEntrustDetailJsonString = JSON.toJSONString(sampleEntrustDetailExtendRespVOList, context);
|
||||||
result.put("sampleEntrustRegistration", jsonArray);
|
result.put("sampleEntrustRegistration", jsonArray);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public interface SampleResultReportingService {
|
|||||||
|
|
||||||
List<BusinessSubParentSampleAssessmentGroupRespVO> getUnReportMethodGroupList(BusinessSubParentSampleAssessmentGroupReqVO reqVO);
|
List<BusinessSubParentSampleAssessmentGroupRespVO> getUnReportMethodGroupList(BusinessSubParentSampleAssessmentGroupReqVO reqVO);
|
||||||
|
|
||||||
JSONObject getSampleResultReportingList(Long configAssayMethodId);
|
JSONObject getSampleResultReportingList(BusinessSubParentSampleAssessmentGroupReqVO reqVO);
|
||||||
|
|
||||||
List<RecheckSubSampleParentMethodRespVO> getRecheckAssayMethodList(Long baseSampleId, Long businessSubParentSampleId, Long configAssayMethodId);
|
List<RecheckSubSampleParentMethodRespVO> getRecheckAssayMethodList(Long baseSampleId, Long businessSubParentSampleId, Long configAssayMethodId);
|
||||||
|
|
||||||
|
|||||||
@@ -115,8 +115,8 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject getSampleResultReportingList(Long configAssayMethodId) {
|
public JSONObject getSampleResultReportingList(BusinessSubParentSampleAssessmentGroupReqVO reqVO) {
|
||||||
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectDOList = configAssayMethodProjectMapper.selectByConfigAssayMethodId(configAssayMethodId);
|
List<ConfigAssayMethodProjectExtendRespVO> configAssayMethodProjectDOList = configAssayMethodProjectMapper.selectByConfigAssayMethodId(reqVO.getConfigAssayMethodId());
|
||||||
List<Map<String, Object>> columnList = new ArrayList<>();
|
List<Map<String, Object>> columnList = new ArrayList<>();
|
||||||
|
|
||||||
//动态字段
|
//动态字段
|
||||||
@@ -136,7 +136,7 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
|||||||
List<Map<String, Object>> dataList = new ArrayList<>();
|
List<Map<String, Object>> dataList = new ArrayList<>();
|
||||||
|
|
||||||
//查询结果报送未上报的样品
|
//查询结果报送未上报的样品
|
||||||
List<NoReportSubParentSampleAssessmentRespVO> noReportSubParentSampleAssessmentRespList = businessSubParentSampleAssessmentProjectMapper.selectNoReportSubParentSampleAssessment(configAssayMethodId);
|
List<NoReportSubParentSampleAssessmentRespVO> noReportSubParentSampleAssessmentRespList = businessSubParentSampleAssessmentProjectMapper.selectNoReportSubParentSampleAssessment(reqVO);
|
||||||
|
|
||||||
if (CollUtil.isEmpty(noReportSubParentSampleAssessmentRespList)) {//没有查询到未上报的数据
|
if (CollUtil.isEmpty(noReportSubParentSampleAssessmentRespList)) {//没有查询到未上报的数据
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
@@ -148,18 +148,18 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
|||||||
//分样id列表
|
//分样id列表
|
||||||
List<Long> businessSubParentSampleIds = noReportSubParentSampleAssessmentRespList.stream().map(m -> m.getBusinessSubParentSampleId()).collect(Collectors.toList());
|
List<Long> businessSubParentSampleIds = noReportSubParentSampleAssessmentRespList.stream().map(m -> m.getBusinessSubParentSampleId()).collect(Collectors.toList());
|
||||||
//报送的检测项目数据
|
//报送的检测项目数据
|
||||||
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentDOList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIds, configAssayMethodId);
|
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentDOList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIds, reqVO.getConfigAssayMethodId());
|
||||||
//获取分析任务数
|
//获取分析任务数
|
||||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIds, configAssayMethodId);
|
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIds, reqVO.getConfigAssayMethodId());
|
||||||
List<Long> businessSubSampleIds = businessAssayTaskDataDOList.stream().map(m -> m.getBusinessSubSampleId()).distinct().collect(Collectors.toList());
|
List<Long> businessSubSampleIds = businessAssayTaskDataDOList.stream().map(m -> m.getBusinessSubSampleId()).distinct().collect(Collectors.toList());
|
||||||
//获取子样数据
|
//获取子样数据
|
||||||
List<BusinessSubSampleDO> businessSubSampleDOList = businessSubSampleMapper.selectByIds(businessSubSampleIds);
|
List<BusinessSubSampleDO> businessSubSampleDOList = businessSubSampleMapper.selectByIds(businessSubSampleIds);
|
||||||
|
|
||||||
//获取结果判定数据
|
//获取结果判定数据
|
||||||
List<BusinessSubSampleAssessmentProjectExtendRespVO> businessSubSampleAssessmentExtendRespVOList = businessSubSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIds, configAssayMethodId);
|
List<BusinessSubSampleAssessmentProjectExtendRespVO> businessSubSampleAssessmentExtendRespVOList = businessSubSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIds, reqVO.getConfigAssayMethodId());
|
||||||
|
|
||||||
//获取复测业务数据
|
//获取复测业务数据
|
||||||
List<BusinessSubSampleParentRecheckDO> businessSubSampleParentRecheckDOList = businessSubSampleParentRecheckMapper.selectByRecheckBusinessSubParentSampleIdsAndRecheckConfigAssayMethodId(businessSubParentSampleIds, configAssayMethodId);
|
List<BusinessSubSampleParentRecheckDO> businessSubSampleParentRecheckDOList = businessSubSampleParentRecheckMapper.selectByRecheckBusinessSubParentSampleIdsAndRecheckConfigAssayMethodId(businessSubParentSampleIds, reqVO.getConfigAssayMethodId());
|
||||||
|
|
||||||
//循环未上报的样品
|
//循环未上报的样品
|
||||||
for (NoReportSubParentSampleAssessmentRespVO noReportSubParentSampleAssessmentRespVO : noReportSubParentSampleAssessmentRespList) {
|
for (NoReportSubParentSampleAssessmentRespVO noReportSubParentSampleAssessmentRespVO : noReportSubParentSampleAssessmentRespList) {
|
||||||
@@ -170,6 +170,7 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
|||||||
Map<String, Object> subSampleAssessmentBeforeMap = BeanUtil.copyProperties(noReportSubParentSampleAssessmentMap, Map.class);
|
Map<String, Object> subSampleAssessmentBeforeMap = BeanUtil.copyProperties(noReportSubParentSampleAssessmentMap, Map.class);
|
||||||
Map<String, Object> subSampleAssessmentMap = BeanUtil.copyProperties(noReportSubParentSampleAssessmentMap, Map.class);
|
Map<String, Object> subSampleAssessmentMap = BeanUtil.copyProperties(noReportSubParentSampleAssessmentMap, Map.class);
|
||||||
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> curBusinessSubParentSampleAssessmentDOList = businessSubParentSampleAssessmentDOList.stream().filter(f -> f.getBusinessSubParentSampleId().equals(noReportSubParentSampleAssessmentRespVO.getBusinessSubParentSampleId())).collect(Collectors.toList());
|
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> curBusinessSubParentSampleAssessmentDOList = businessSubParentSampleAssessmentDOList.stream().filter(f -> f.getBusinessSubParentSampleId().equals(noReportSubParentSampleAssessmentRespVO.getBusinessSubParentSampleId())).collect(Collectors.toList());
|
||||||
|
noReportSubParentSampleAssessmentMap.put("sampleReceiveTime", noReportSubParentSampleAssessmentRespVO.getSampleReceiveTime());
|
||||||
noReportSubParentSampleAssessmentMap.put("configAssayMethodName", "报出结果");
|
noReportSubParentSampleAssessmentMap.put("configAssayMethodName", "报出结果");
|
||||||
StringBuilder businessSubParentSampleAssessmentIds = new StringBuilder();
|
StringBuilder businessSubParentSampleAssessmentIds = new StringBuilder();
|
||||||
for (BusinessSubParentSampleAssessmentProjectExtendRespVO businessSubParentSampleAssessmentDO : curBusinessSubParentSampleAssessmentDOList) {
|
for (BusinessSubParentSampleAssessmentProjectExtendRespVO businessSubParentSampleAssessmentDO : curBusinessSubParentSampleAssessmentDOList) {
|
||||||
@@ -187,6 +188,7 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
|||||||
List<BusinessSubSampleAssessmentProjectExtendRespVO> businessSubSampleAssessmentExtendBeforeList = businessSubSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdAndConfigAssayMethodId(businessSubSampleParentRecheckDO.getBusinessSubParentSampleId(), businessSubSampleParentRecheckDO.getConfigAssayMethodId());
|
List<BusinessSubSampleAssessmentProjectExtendRespVO> businessSubSampleAssessmentExtendBeforeList = businessSubSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdAndConfigAssayMethodId(businessSubSampleParentRecheckDO.getBusinessSubParentSampleId(), businessSubSampleParentRecheckDO.getConfigAssayMethodId());
|
||||||
StringBuilder businessSubSampleAssessmentIdsBefore = new StringBuilder();
|
StringBuilder businessSubSampleAssessmentIdsBefore = new StringBuilder();
|
||||||
for (BusinessSubSampleAssessmentProjectExtendRespVO businessSubSampleAssessmentProjectExtendRespVO : businessSubSampleAssessmentExtendBeforeList) {
|
for (BusinessSubSampleAssessmentProjectExtendRespVO businessSubSampleAssessmentProjectExtendRespVO : businessSubSampleAssessmentExtendBeforeList) {
|
||||||
|
subSampleAssessmentBeforeMap.put("sampleReceiveTime", noReportSubParentSampleAssessmentRespVO.getSampleReceiveTime());
|
||||||
subSampleAssessmentBeforeMap.put("configAssayMethodName", businessSubSampleAssessmentProjectExtendRespVO.getConfigAssayMethodName());
|
subSampleAssessmentBeforeMap.put("configAssayMethodName", businessSubSampleAssessmentProjectExtendRespVO.getConfigAssayMethodName());
|
||||||
subSampleAssessmentBeforeMap.put(businessSubSampleAssessmentProjectExtendRespVO.getSimpleName(), businessSubSampleAssessmentProjectExtendRespVO.getAssessmentValue());
|
subSampleAssessmentBeforeMap.put(businessSubSampleAssessmentProjectExtendRespVO.getSimpleName(), businessSubSampleAssessmentProjectExtendRespVO.getAssessmentValue());
|
||||||
businessSubSampleAssessmentIdsBefore.append(businessSubSampleAssessmentProjectExtendRespVO.getId()).append(",");
|
businessSubSampleAssessmentIdsBefore.append(businessSubSampleAssessmentProjectExtendRespVO.getId()).append(",");
|
||||||
@@ -202,6 +204,7 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
|||||||
List<BusinessSubSampleAssessmentProjectExtendRespVO> businessSubSampleAssessmentList = businessSubSampleAssessmentExtendRespVOList.stream().filter(f -> f.getBusinessSubParentSampleId().equals(noReportSubParentSampleAssessmentRespVO.getBusinessSubParentSampleId())).collect(Collectors.toList());
|
List<BusinessSubSampleAssessmentProjectExtendRespVO> businessSubSampleAssessmentList = businessSubSampleAssessmentExtendRespVOList.stream().filter(f -> f.getBusinessSubParentSampleId().equals(noReportSubParentSampleAssessmentRespVO.getBusinessSubParentSampleId())).collect(Collectors.toList());
|
||||||
StringBuilder businessSubSampleAssessmentIds = new StringBuilder();
|
StringBuilder businessSubSampleAssessmentIds = new StringBuilder();
|
||||||
for (BusinessSubSampleAssessmentProjectExtendRespVO businessSubSampleAssessmentProjectExtendRespVO : businessSubSampleAssessmentList) {
|
for (BusinessSubSampleAssessmentProjectExtendRespVO businessSubSampleAssessmentProjectExtendRespVO : businessSubSampleAssessmentList) {
|
||||||
|
subSampleAssessmentMap.put("sampleReceiveTime", noReportSubParentSampleAssessmentRespVO.getSampleReceiveTime());
|
||||||
subSampleAssessmentMap.put("configAssayMethodName", businessSubSampleAssessmentProjectExtendRespVO.getConfigAssayMethodName());
|
subSampleAssessmentMap.put("configAssayMethodName", businessSubSampleAssessmentProjectExtendRespVO.getConfigAssayMethodName());
|
||||||
subSampleAssessmentMap.put(businessSubSampleAssessmentProjectExtendRespVO.getSimpleName(), businessSubSampleAssessmentProjectExtendRespVO.getAssessmentValue());
|
subSampleAssessmentMap.put(businessSubSampleAssessmentProjectExtendRespVO.getSimpleName(), businessSubSampleAssessmentProjectExtendRespVO.getAssessmentValue());
|
||||||
businessSubSampleAssessmentIds.append(businessSubSampleAssessmentProjectExtendRespVO.getId()).append(",");
|
businessSubSampleAssessmentIds.append(businessSubSampleAssessmentProjectExtendRespVO.getId()).append(",");
|
||||||
|
|||||||
@@ -31,6 +31,9 @@
|
|||||||
tbssa.BSN_SB_PRN_SMP_ASMT_ID = tbspsa.ID
|
tbssa.BSN_SB_PRN_SMP_ASMT_ID = tbspsa.ID
|
||||||
LEFT JOIN T_CFG_ASY_MTHD tcam ON
|
LEFT JOIN T_CFG_ASY_MTHD tcam ON
|
||||||
tbssa.CFG_ASY_MTHD_ID = tcam.ID
|
tbssa.CFG_ASY_MTHD_ID = tcam.ID
|
||||||
|
LEFT JOIN T_BSN_SB_SMP_ANL_GRP tbssag ON
|
||||||
|
tbssa.BSN_SB_SMP_ID = tbssag.BSN_SB_SMP_ID
|
||||||
|
AND tcam.ASY_DEPT_ID = tbssag.ASY_DEPT_ID
|
||||||
WHERE
|
WHERE
|
||||||
tbssa.DELETED = 0
|
tbssa.DELETED = 0
|
||||||
AND tbssa.RPOD_STS = 'reported'
|
AND tbssa.RPOD_STS = 'reported'
|
||||||
@@ -40,6 +43,9 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="reqVO.assayDepartmentId != null and reqVO.assayDepartmentId != ''">
|
<if test="reqVO.assayDepartmentId != null and reqVO.assayDepartmentId != ''">
|
||||||
AND tcam.ASY_DEPT_ID = #{reqVO.assayDepartmentId}
|
AND tcam.ASY_DEPT_ID = #{reqVO.assayDepartmentId}
|
||||||
|
</if>
|
||||||
|
<if test="reqVO.sampleReceiveTime != null and reqVO.sampleReceiveTime.length == 2">
|
||||||
|
AND tbssag.SMP_RCV_TM BETWEEN #{reqVO.sampleReceiveTime[0]} AND #{reqVO.sampleReceiveTime[1]}
|
||||||
</if>
|
</if>
|
||||||
GROUP BY
|
GROUP BY
|
||||||
tbspsa.TENANT_ID ,
|
tbspsa.TENANT_ID ,
|
||||||
@@ -66,7 +72,8 @@
|
|||||||
tbssa.ASY_TP AS assayType,
|
tbssa.ASY_TP AS assayType,
|
||||||
tbsps.CFG_SB_SMP_PRN_ID AS configSubSampleParentId,
|
tbsps.CFG_SB_SMP_PRN_ID AS configSubSampleParentId,
|
||||||
tbsps.SMP_NAME AS sampleName,
|
tbsps.SMP_NAME AS sampleName,
|
||||||
tbs.NAME AS baseSampleName
|
tbs.NAME AS baseSampleName,
|
||||||
|
tbssag.SMP_RCV_TM AS sampleReceiveTime
|
||||||
FROM
|
FROM
|
||||||
T_BSN_SB_SMP_ASMT tbssa
|
T_BSN_SB_SMP_ASMT tbssa
|
||||||
LEFT JOIN T_BSN_SB_PRN_SMP tbsps ON
|
LEFT JOIN T_BSN_SB_PRN_SMP tbsps ON
|
||||||
@@ -75,6 +82,11 @@
|
|||||||
tbsps.CFG_SB_SMP_PRN_ID = tcssp.ID
|
tbsps.CFG_SB_SMP_PRN_ID = tcssp.ID
|
||||||
LEFT JOIN T_BSE_SMP tbs ON
|
LEFT JOIN T_BSE_SMP tbs ON
|
||||||
tcssp.BSE_SMP_ID = tbs.ID
|
tcssp.BSE_SMP_ID = tbs.ID
|
||||||
|
LEFT JOIN T_CFG_ASY_MTHD tcam ON
|
||||||
|
tbssa.CFG_ASY_MTHD_ID = tcam.ID
|
||||||
|
LEFT JOIN T_BSN_SB_SMP_ANL_GRP tbssag ON
|
||||||
|
tbssa.BSN_SB_SMP_ID = tbssag.BSN_SB_SMP_ID
|
||||||
|
AND tcam.ASY_DEPT_ID = tbssag.ASY_DEPT_ID
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT
|
SELECT
|
||||||
tbspsa.BSN_SB_PRN_SMP_ID ,
|
tbspsa.BSN_SB_PRN_SMP_ID ,
|
||||||
@@ -84,7 +96,7 @@
|
|||||||
T_BSN_SB_PRN_SMP_ASMT tbspsa
|
T_BSN_SB_PRN_SMP_ASMT tbspsa
|
||||||
WHERE
|
WHERE
|
||||||
tbspsa.IS_RPOD = 0
|
tbspsa.IS_RPOD = 0
|
||||||
AND tbspsa.CFG_ASY_MTHD_ID = #{configAssayMethodId}
|
AND tbspsa.CFG_ASY_MTHD_ID = #{reqVO.configAssayMethodId}
|
||||||
GROUP BY
|
GROUP BY
|
||||||
tbspsa.BSN_SB_PRN_SMP_ID ,
|
tbspsa.BSN_SB_PRN_SMP_ID ,
|
||||||
tbspsa.CFG_ASY_MTHD_ID ,
|
tbspsa.CFG_ASY_MTHD_ID ,
|
||||||
@@ -94,7 +106,10 @@
|
|||||||
WHERE
|
WHERE
|
||||||
tbssa.IS_RPOD = 1
|
tbssa.IS_RPOD = 1
|
||||||
AND t.IS_RPOD = 0
|
AND t.IS_RPOD = 0
|
||||||
AND tbssa.CFG_ASY_MTHD_ID = #{configAssayMethodId}
|
AND tbssa.CFG_ASY_MTHD_ID = #{reqVO.configAssayMethodId}
|
||||||
|
<if test="reqVO.sampleReceiveTime != null and reqVO.sampleReceiveTime.length == 2">
|
||||||
|
AND tbssag.SMP_RCV_TM BETWEEN #{reqVO.sampleReceiveTime[0]} AND #{reqVO.sampleReceiveTime[1]}
|
||||||
|
</if>
|
||||||
GROUP BY
|
GROUP BY
|
||||||
tcssp.BSE_SMP_ID ,
|
tcssp.BSE_SMP_ID ,
|
||||||
tbsps.BSN_BSE_SMP_ID ,
|
tbsps.BSN_BSE_SMP_ID ,
|
||||||
@@ -104,7 +119,8 @@
|
|||||||
tbssa.ASY_TP ,
|
tbssa.ASY_TP ,
|
||||||
tbsps.CFG_SB_SMP_PRN_ID,
|
tbsps.CFG_SB_SMP_PRN_ID,
|
||||||
tbsps.SMP_NAME ,
|
tbsps.SMP_NAME ,
|
||||||
tbs.NAME
|
tbs.NAME,
|
||||||
|
tbssag.SMP_RCV_TM
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getRecheckAssayMethodList" resultType="com.zt.plat.module.qms.business.bus.controller.vo.RecheckSubSampleParentMethodRespVO">
|
<select id="getRecheckAssayMethodList" resultType="com.zt.plat.module.qms.business.bus.controller.vo.RecheckSubSampleParentMethodRespVO">
|
||||||
@@ -134,12 +150,12 @@
|
|||||||
AND tmas.BSE_SMP_ID = #{baseSampleId}
|
AND tmas.BSE_SMP_ID = #{baseSampleId}
|
||||||
AND tmasd.DIC_PRJ_ID IN (
|
AND tmasd.DIC_PRJ_ID IN (
|
||||||
SELECT
|
SELECT
|
||||||
tbspsa.DIC_PRJ_ID
|
tbspsap.DIC_PRJ_ID
|
||||||
FROM
|
FROM
|
||||||
T_BSN_SB_PRN_SMP_ASMT tbspsa
|
T_BSN_SB_PRN_SMP_ASMT_PRJ tbspsap
|
||||||
WHERE
|
WHERE
|
||||||
tbspsa.BSN_SB_PRN_SMP_ID = #{businessSubParentSampleId}
|
tbspsap.BSN_SB_PRN_SMP_ID = #{businessSubParentSampleId}
|
||||||
AND tbspsa.CFG_ASY_MTHD_ID = #{configAssayMethodId}
|
AND tbspsap.CFG_ASY_MTHD_ID = #{configAssayMethodId}
|
||||||
)
|
)
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Reference in New Issue
Block a user