Compare commits
2 Commits
06be110e5d
...
d41f69cc51
| Author | SHA1 | Date | |
|---|---|---|---|
| d41f69cc51 | |||
| 15621a9a56 |
@@ -1,33 +1,24 @@
|
|||||||
package com.zt.plat.module.qms.business.bus.controller.admin;
|
package com.zt.plat.module.qms.business.bus.controller.admin;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
|
||||||
import com.yomahub.liteflow.core.FlowExecutor;
|
import com.yomahub.liteflow.core.FlowExecutor;
|
||||||
import com.yomahub.liteflow.flow.LiteflowResponse;
|
import com.yomahub.liteflow.flow.LiteflowResponse;
|
||||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
|
||||||
import com.zt.plat.framework.tenant.core.context.TenantContextHolder;
|
|
||||||
import com.zt.plat.module.qms.business.bus.liteflow.param.SampleFlowInfo;
|
|
||||||
import com.zt.plat.module.qms.business.bus.liteflow.param.SampleFlowParam;
|
import com.zt.plat.module.qms.business.bus.liteflow.param.SampleFlowParam;
|
||||||
import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleFlowContext;
|
import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleFlowContext;
|
||||||
import com.zt.plat.module.qms.business.bus.service.SampleFlowService;
|
import com.zt.plat.module.qms.business.bus.service.SampleFlowService;
|
||||||
import com.zt.plat.module.qms.core.sampleflow.SampleFlowDefinition;
|
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||||
import com.zt.plat.module.qms.core.sampleflow.SampleFlowNode;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
||||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||||
import static com.zt.plat.framework.common.pojo.CommonResult.error;
|
|
||||||
|
|
||||||
@Tag(name = "管理后台 - 样品流转")
|
@Tag(name = "管理后台 - 样品流转")
|
||||||
@RestController
|
@RestController
|
||||||
@@ -47,136 +38,20 @@ public class SampleFlowController implements BusinessControllerMarker {
|
|||||||
return success(response.getContextBean(SampleFlowContext.class));
|
return success(response.getContextBean(SampleFlowContext.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/test")
|
/**
|
||||||
public CommonResult<?> test() {
|
* 中心收样并送样
|
||||||
|
* @param sampleFlowParam
|
||||||
SampleFlowDefinition sampleFlowDefinition = new SampleFlowDefinition();
|
* @return
|
||||||
sampleFlowDefinition.setFlowKey("flw_sub_sample_process");
|
*/
|
||||||
sampleFlowDefinition.setFlowName("子样样品流转流程");
|
@PostMapping("/centerReceiveAndSend")
|
||||||
List<SampleFlowNode> flowNodeList = new ArrayList<>();
|
public CommonResult<?> centerReceiveAndSend(@Validated @RequestBody SampleFlowParam sampleFlowParam) {
|
||||||
|
//中心收样
|
||||||
SampleFlowNode zxr = new SampleFlowNode();
|
sampleFlowParam.setCurrentSampleFlowKey(QmsCommonConstant.FLOW_NODE_CENTER_RECEIVE);
|
||||||
zxr.setNodeName("中心收样");
|
LiteflowResponse response = sampleFlowService.sampleFlow(sampleFlowParam);
|
||||||
zxr.setNodeKey("flw_center_receive");
|
//中心送样
|
||||||
zxr.setSort(3100);
|
sampleFlowParam.setCurrentSampleFlowKey(QmsCommonConstant.FLOW_NODE_CENTER_SEND);
|
||||||
|
sampleFlowParam.setSendSampleOper(null);
|
||||||
SampleFlowNode zxs = new SampleFlowNode();
|
response = sampleFlowService.sampleFlow(sampleFlowParam);
|
||||||
zxs.setNodeName("中心送样");
|
|
||||||
zxs.setNodeKey("flw_center_send");
|
|
||||||
zxs.setSort(3200);
|
|
||||||
|
|
||||||
SampleFlowNode bzr = new SampleFlowNode();
|
|
||||||
bzr.setNodeName("班组收样");
|
|
||||||
bzr.setNodeKey("flw_team_receive");
|
|
||||||
bzr.setSort(3300);
|
|
||||||
|
|
||||||
SampleFlowNode ypbm = new SampleFlowNode();
|
|
||||||
ypbm.setNodeName("样品编密");
|
|
||||||
ypbm.setNodeKey("flw_sample_encrypt");
|
|
||||||
ypbm.setSort(3400);
|
|
||||||
|
|
||||||
// SampleFlowNode fxr = new SampleFlowNode();
|
|
||||||
// fxr.setNodeName("分析收样");
|
|
||||||
// fxr.setNodeKey("flw_analysis_receive");
|
|
||||||
// fxr.setSort(3500);
|
|
||||||
//
|
|
||||||
SampleFlowNode fx = new SampleFlowNode();
|
|
||||||
fx.setNodeName("样品分析");
|
|
||||||
fx.setNodeKey("flw_analysis");
|
|
||||||
fx.setSort(3550);
|
|
||||||
//
|
|
||||||
// SampleFlowNode fxs = new SampleFlowNode();
|
|
||||||
// fxs.setNodeName("分析送样");
|
|
||||||
// fxs.setNodeKey("flw_analysis_send");
|
|
||||||
// fxs.setSort(3600);
|
|
||||||
|
|
||||||
SampleFlowNode bzs = new SampleFlowNode();
|
|
||||||
bzs.setNodeName("班组送样");
|
|
||||||
bzs.setNodeKey("flw_team_send");
|
|
||||||
bzs.setSort(3700);
|
|
||||||
|
|
||||||
SampleFlowNode ypgk = new SampleFlowNode();
|
|
||||||
ypgk.setNodeName("样品归库");
|
|
||||||
ypgk.setNodeKey("flw_sample_storage");
|
|
||||||
ypgk.setSort(3800);
|
|
||||||
ypgk.setNextFlowNodeList(null);
|
|
||||||
flowNodeList.add(ypgk);
|
|
||||||
|
|
||||||
|
|
||||||
zxr.setNextFlowNodeList(new ArrayList<SampleFlowNode>() {
|
|
||||||
{
|
|
||||||
add(BeanUtils.toBean(zxs,SampleFlowNode.class).setIsDefault(true));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
flowNodeList.add(zxr);
|
|
||||||
|
|
||||||
|
|
||||||
zxs.setNextFlowNodeList(new ArrayList<>() {{
|
|
||||||
add(BeanUtils.toBean(bzr,SampleFlowNode.class).setIsDefault(true));
|
|
||||||
}});
|
|
||||||
flowNodeList.add(zxs);
|
|
||||||
|
|
||||||
bzr.setNextFlowNodeList(new ArrayList<>() {{
|
|
||||||
add(BeanUtils.toBean(ypbm,SampleFlowNode.class).setCondition("subSampleEncrypt"));//样品需要编密并且没编密过
|
|
||||||
add(BeanUtils.toBean(fx,SampleFlowNode.class).setCondition("subSampleNotEncrypt"));//样品无需编密或样品已编密过
|
|
||||||
}});
|
|
||||||
flowNodeList.add(bzr);
|
|
||||||
|
|
||||||
|
|
||||||
ypbm.setNextFlowNodeList(new ArrayList<>() {{
|
|
||||||
add(BeanUtils.toBean(fx,SampleFlowNode.class).setIsDefault(true));
|
|
||||||
}});
|
|
||||||
flowNodeList.add(ypbm);
|
|
||||||
|
|
||||||
|
|
||||||
// fxr.setNextFlowNodeList(new ArrayList<>() {{
|
|
||||||
// add(BeanUtils.toBean(fxs,SampleFlowNode.class).setIsDefault(true));
|
|
||||||
// }});
|
|
||||||
// flowNodeList.add(fxr);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// fxs.setNextFlowNodeList(new ArrayList<>() {{
|
|
||||||
// add(BeanUtils.toBean(bzs,SampleFlowNode.class).setIsDefault(true).setCondition("当前部门任务已全部分析完"));
|
|
||||||
// }});
|
|
||||||
// flowNodeList.add(fxs);
|
|
||||||
|
|
||||||
fx.setNextFlowNodeList(new ArrayList<>() {{
|
|
||||||
add(BeanUtils.toBean(bzs,SampleFlowNode.class).setIsDefault(true).setCondition("当前部门任务已全部分析完"));
|
|
||||||
}});
|
|
||||||
flowNodeList.add(fx);
|
|
||||||
|
|
||||||
bzs.setNextFlowNodeList(new ArrayList<>() {{
|
|
||||||
// add(BeanUtils.toBean(fx,SampleFlowNode.class).setCondition("样品当前分析班组结果超差,需要发起复检"));
|
|
||||||
add(BeanUtils.toBean(bzr,SampleFlowNode.class).setCondition("subSampleSelfReportedOthersPending"));//当前部门数据已全部判断上报
|
|
||||||
add(BeanUtils.toBean(ypgk,SampleFlowNode.class).setCondition("subSampleAlldeptAnalyzed"));//当前样品所有分析任务已全部上报完
|
|
||||||
}});
|
|
||||||
flowNodeList.add(bzs);
|
|
||||||
|
|
||||||
sampleFlowDefinition.setFlowNodeList(flowNodeList);
|
|
||||||
|
|
||||||
String jsonSampleFlowDefinition = JSON.toJSONString(sampleFlowDefinition);
|
|
||||||
|
|
||||||
System.out.println(jsonSampleFlowDefinition);
|
|
||||||
|
|
||||||
Long tenantId = TenantContextHolder.getRequiredTenantId();
|
|
||||||
|
|
||||||
List<SampleFlowInfo> sampleFlowInfoList = new ArrayList<>();
|
|
||||||
sampleFlowInfoList.add(new SampleFlowInfo().setId(1967550576457330690L).setIsWeighing(0));
|
|
||||||
|
|
||||||
SampleFlowParam sampleFlowParam = new SampleFlowParam();
|
|
||||||
sampleFlowParam.setSampleSourceType(2);
|
|
||||||
sampleFlowParam.setCurrentSampleFlowKey("P3000");
|
|
||||||
sampleFlowParam.setSampleFlowInfoList(sampleFlowInfoList);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
LiteflowResponse response = flowExecutor.execute2Resp("sampleFlowChain" + tenantId, sampleFlowParam, SampleFlowContext.class);
|
|
||||||
if (response.isSuccess()) {
|
|
||||||
return success(response.getContextBean(SampleFlowContext.class));
|
return success(response.getContextBean(SampleFlowContext.class));
|
||||||
} else {
|
|
||||||
return error(1_032_100_000, response.getMessage());
|
|
||||||
}
|
}
|
||||||
//return success(FlowBus.getNodeMap());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,155 @@
|
|||||||
|
package com.zt.plat.module.qms.business.bus.controller.admin;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
|
import com.zt.plat.module.qms.core.sampleflow.SampleFlowDefinition;
|
||||||
|
import com.zt.plat.module.qms.core.sampleflow.SampleFlowNode;
|
||||||
|
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/qms/bus/test")
|
||||||
|
public class TestController {
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/testSampleFlow")
|
||||||
|
public CommonResult<?> testSampleFlow() {
|
||||||
|
|
||||||
|
SampleFlowDefinition sampleFlowDefinition = new SampleFlowDefinition();
|
||||||
|
sampleFlowDefinition.setFlowKey("flw_sub_sample_process");
|
||||||
|
sampleFlowDefinition.setFlowName("子样样品流转流程");
|
||||||
|
List<SampleFlowNode> flowNodeList = new ArrayList<>();
|
||||||
|
|
||||||
|
SampleFlowNode zxr = new SampleFlowNode();
|
||||||
|
zxr.setNodeName("中心收样");
|
||||||
|
zxr.setNodeKey("flw_center_receive");
|
||||||
|
zxr.setSort(3100);
|
||||||
|
|
||||||
|
SampleFlowNode zxs = new SampleFlowNode();
|
||||||
|
zxs.setNodeName("中心送样");
|
||||||
|
zxs.setNodeKey("flw_center_send");
|
||||||
|
zxs.setSort(3200);
|
||||||
|
|
||||||
|
SampleFlowNode bzr = new SampleFlowNode();
|
||||||
|
bzr.setNodeName("班组收样");
|
||||||
|
bzr.setNodeKey("flw_team_receive");
|
||||||
|
bzr.setSort(3300);
|
||||||
|
|
||||||
|
SampleFlowNode ypbm = new SampleFlowNode();
|
||||||
|
ypbm.setNodeName("样品编密");
|
||||||
|
ypbm.setNodeKey("flw_sample_encrypt");
|
||||||
|
ypbm.setSort(3400);
|
||||||
|
|
||||||
|
// SampleFlowNode fxr = new SampleFlowNode();
|
||||||
|
// fxr.setNodeName("分析收样");
|
||||||
|
// fxr.setNodeKey("flw_analysis_receive");
|
||||||
|
// fxr.setSort(3500);
|
||||||
|
//
|
||||||
|
SampleFlowNode fx = new SampleFlowNode();
|
||||||
|
fx.setNodeName("样品分析");
|
||||||
|
fx.setNodeKey("flw_analysis");
|
||||||
|
fx.setSort(3550);
|
||||||
|
//
|
||||||
|
// SampleFlowNode fxs = new SampleFlowNode();
|
||||||
|
// fxs.setNodeName("分析送样");
|
||||||
|
// fxs.setNodeKey("flw_analysis_send");
|
||||||
|
// fxs.setSort(3600);
|
||||||
|
|
||||||
|
SampleFlowNode bzs = new SampleFlowNode();
|
||||||
|
bzs.setNodeName("班组送样");
|
||||||
|
bzs.setNodeKey("flw_team_send");
|
||||||
|
bzs.setSort(3700);
|
||||||
|
|
||||||
|
SampleFlowNode ypgk = new SampleFlowNode();
|
||||||
|
ypgk.setNodeName("样品归库");
|
||||||
|
ypgk.setNodeKey("flw_sample_storage");
|
||||||
|
ypgk.setSort(3800);
|
||||||
|
ypgk.setNextFlowNodeList(null);
|
||||||
|
flowNodeList.add(ypgk);
|
||||||
|
|
||||||
|
|
||||||
|
zxr.setNextFlowNodeList(new ArrayList<SampleFlowNode>() {
|
||||||
|
private static final long serialVersionUID = 6146393613606839512L;
|
||||||
|
|
||||||
|
{
|
||||||
|
add(BeanUtils.toBean(zxs,SampleFlowNode.class).setIsDefault(true));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
flowNodeList.add(zxr);
|
||||||
|
|
||||||
|
|
||||||
|
zxs.setNextFlowNodeList(new ArrayList<>() {
|
||||||
|
private static final long serialVersionUID = 5357543125760924047L;
|
||||||
|
|
||||||
|
{
|
||||||
|
add(BeanUtils.toBean(bzr,SampleFlowNode.class).setIsDefault(true));
|
||||||
|
}});
|
||||||
|
flowNodeList.add(zxs);
|
||||||
|
|
||||||
|
bzr.setNextFlowNodeList(new ArrayList<>() {
|
||||||
|
private static final long serialVersionUID = 6376704859477839016L;
|
||||||
|
|
||||||
|
{
|
||||||
|
add(BeanUtils.toBean(ypbm,SampleFlowNode.class).setCondition("subSampleEncrypt"));//样品需要编密并且没编密过
|
||||||
|
add(BeanUtils.toBean(fx,SampleFlowNode.class).setCondition("subSampleNotEncrypt"));//样品无需编密或样品已编密过
|
||||||
|
}});
|
||||||
|
flowNodeList.add(bzr);
|
||||||
|
|
||||||
|
|
||||||
|
ypbm.setNextFlowNodeList(new ArrayList<>() {
|
||||||
|
private static final long serialVersionUID = 1014984817516902869L;
|
||||||
|
|
||||||
|
{
|
||||||
|
add(BeanUtils.toBean(fx,SampleFlowNode.class).setIsDefault(true));
|
||||||
|
}});
|
||||||
|
flowNodeList.add(ypbm);
|
||||||
|
|
||||||
|
|
||||||
|
// fxr.setNextFlowNodeList(new ArrayList<>() {{
|
||||||
|
// add(BeanUtils.toBean(fxs,SampleFlowNode.class).setIsDefault(true));
|
||||||
|
// }});
|
||||||
|
// flowNodeList.add(fxr);
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// fxs.setNextFlowNodeList(new ArrayList<>() {{
|
||||||
|
// add(BeanUtils.toBean(bzs,SampleFlowNode.class).setIsDefault(true).setCondition("当前部门任务已全部分析完"));
|
||||||
|
// }});
|
||||||
|
// flowNodeList.add(fxs);
|
||||||
|
|
||||||
|
fx.setNextFlowNodeList(new ArrayList<>() {
|
||||||
|
private static final long serialVersionUID = -610440034210287957L;
|
||||||
|
|
||||||
|
{
|
||||||
|
add(BeanUtils.toBean(bzs,SampleFlowNode.class).setIsDefault(true).setCondition("当前部门任务已全部分析完"));
|
||||||
|
}});
|
||||||
|
flowNodeList.add(fx);
|
||||||
|
|
||||||
|
bzs.setNextFlowNodeList(new ArrayList<>() {
|
||||||
|
private static final long serialVersionUID = -5057434004685743838L;
|
||||||
|
|
||||||
|
{
|
||||||
|
// add(BeanUtils.toBean(fx,SampleFlowNode.class).setCondition("样品当前分析班组结果超差,需要发起复检"));
|
||||||
|
add(BeanUtils.toBean(bzr,SampleFlowNode.class).setCondition("subSampleSelfReportedOthersPending"));//当前部门数据已全部判断上报
|
||||||
|
add(BeanUtils.toBean(ypgk,SampleFlowNode.class).setCondition("subSampleAlldeptAnalyzed"));//当前样品所有分析任务已全部上报完
|
||||||
|
}});
|
||||||
|
flowNodeList.add(bzs);
|
||||||
|
|
||||||
|
sampleFlowDefinition.setFlowNodeList(flowNodeList);
|
||||||
|
|
||||||
|
String jsonSampleFlowDefinition = JSON.toJSONString(sampleFlowDefinition);
|
||||||
|
|
||||||
|
System.out.println(jsonSampleFlowDefinition);
|
||||||
|
|
||||||
|
return success(jsonSampleFlowDefinition);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -638,7 +638,7 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
List<Long> businessSubParentSampleIdList = Arrays.asList(businessAssayTaskDataDO.getBusinessSubParentSampleId());
|
List<Long> businessSubParentSampleIdList = Arrays.asList(businessAssayTaskDataDO.getBusinessSubParentSampleId());
|
||||||
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentProjectList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIdList, configMethodId);
|
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentProjectList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIdList, configMethodId);
|
||||||
BusinessSubParentSampleAssessmentProjectExtendRespVO businessSubParentSampleAssessmentProject = businessSubParentSampleAssessmentProjectList.stream().filter(f -> f.getSimpleName().equals(sourceProject)).findFirst().orElse(null);
|
BusinessSubParentSampleAssessmentProjectExtendRespVO businessSubParentSampleAssessmentProject = businessSubParentSampleAssessmentProjectList.stream().filter(f -> f.getSimpleName().equals(sourceProject)).findFirst().orElse(null);
|
||||||
if (businessSubParentSampleAssessmentProject == null || StringUtils.isBlank(businessSubParentSampleAssessmentProject.getAssessmentValue())) {
|
if (businessSubParentSampleAssessmentProject != null && StringUtils.isNotBlank(businessSubParentSampleAssessmentProject.getAssessmentValue())) {
|
||||||
businessAssayParameterDataDO.setValue(businessSubParentSampleAssessmentProject.getAssessmentValue());
|
businessAssayParameterDataDO.setValue(businessSubParentSampleAssessmentProject.getAssessmentValue());
|
||||||
}
|
}
|
||||||
} else if (QmsCommonConstant.ENTRUST_COMMISSION_INSPECTION_SAMPLE.equals(baseSampleDO.getDictionaryBusinessKey())) {//如果是委检样
|
} else if (QmsCommonConstant.ENTRUST_COMMISSION_INSPECTION_SAMPLE.equals(baseSampleDO.getDictionaryBusinessKey())) {//如果是委检样
|
||||||
@@ -670,7 +670,7 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
|||||||
List<Long> businessSubParentSampleIdList = Arrays.asList(businessAssayTaskDataDO.getBusinessSubParentSampleId());
|
List<Long> businessSubParentSampleIdList = Arrays.asList(businessAssayTaskDataDO.getBusinessSubParentSampleId());
|
||||||
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentProjectList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIdList, configMethodId);
|
List<BusinessSubParentSampleAssessmentProjectExtendRespVO> businessSubParentSampleAssessmentProjectList = businessSubParentSampleAssessmentProjectMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(businessSubParentSampleIdList, configMethodId);
|
||||||
BusinessSubParentSampleAssessmentProjectExtendRespVO businessSubParentSampleAssessmentProject = businessSubParentSampleAssessmentProjectList.stream().filter(f -> f.getSimpleName().equals(sourceProject)).findFirst().orElse(null);
|
BusinessSubParentSampleAssessmentProjectExtendRespVO businessSubParentSampleAssessmentProject = businessSubParentSampleAssessmentProjectList.stream().filter(f -> f.getSimpleName().equals(sourceProject)).findFirst().orElse(null);
|
||||||
if (businessSubParentSampleAssessmentProject == null || StringUtils.isBlank(businessSubParentSampleAssessmentProject.getAssessmentValue())) {
|
if (businessSubParentSampleAssessmentProject != null && StringUtils.isNotBlank(businessSubParentSampleAssessmentProject.getAssessmentValue())) {
|
||||||
businessAssayParameterDataDO.setValue(businessSubParentSampleAssessmentProject.getAssessmentValue());
|
businessAssayParameterDataDO.setValue(businessSubParentSampleAssessmentProject.getAssessmentValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -546,36 +546,6 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
//处理子样分析任务数据
|
|
||||||
List<BusinessAssayTaskDataDO> businessAssayTaskDataDOList = businessAssayTaskDataMapper.selectByBusinessSubParentSampleIdsAndConfigAssayMethodId(reqVO.getBusinessSubParentSampleIds(), reqVO.getConfigAssayMethodId());
|
|
||||||
List<Long> businessSubSampleIdList = businessAssayTaskDataDOList.stream().map(m -> m.getBusinessSubSampleId()).distinct().collect(Collectors.toList());
|
|
||||||
List<BusinessSubSampleDO> businessSubSampleDOList = businessSubSampleMapper.selectByIds(businessSubSampleIdList);
|
|
||||||
List<BusinessSubSampleAnalysisGroupDO> businessSubSampleAnalysisGroupDOList = businessSubSampleAnalysisGroupMapper.selectByBusinessSubParentSampleIds(reqVO.getBusinessSubParentSampleIds());
|
|
||||||
//根据子样id进行分组
|
|
||||||
Map<Long, List<BusinessAssayTaskDataDO>> businessAssayTaskDataDOMap = businessAssayTaskDataDOList.stream().collect(Collectors.groupingBy(BusinessAssayTaskDataDO::getBusinessSubSampleId));
|
|
||||||
for (Map.Entry<Long, List<BusinessAssayTaskDataDO>> businessAssayTaskDataDOEntry : businessAssayTaskDataDOMap.entrySet()) {
|
|
||||||
Long businessSubSampleId = businessAssayTaskDataDOEntry.getKey();
|
|
||||||
//子样下的分析任务
|
|
||||||
List<BusinessAssayTaskDataDO> valList = businessAssayTaskDataDOEntry.getValue();
|
|
||||||
//查询子样
|
|
||||||
BusinessSubSampleDO businessSubSampleDO = businessSubSampleDOList.stream().filter(f -> businessSubSampleId.equals(f.getId())).findFirst().orElse(null);
|
|
||||||
//查询子样下的分析班组
|
|
||||||
List<BusinessSubSampleAnalysisGroupDO> subSampleAnalysisGroupList = businessSubSampleAnalysisGroupDOList.stream().filter(f -> f.getBusinessSubSampleId().equals(businessSubSampleId)).collect(Collectors.toList());
|
|
||||||
for (BusinessSubSampleAnalysisGroupDO subSampleAnalysisGroupDO : subSampleAnalysisGroupList) {
|
|
||||||
long count = valList.stream().filter(f -> f.getIsReported().equals(QmsCommonConstant.NO) && f.getAssayDepartmentId().equals(subSampleAnalysisGroupDO.getAssayDepartmentId())).count();
|
|
||||||
if (count > 0) {//如果还存在未上报的数据,则继续
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
subSampleAnalysisGroupDO.setSampleStatus("已完成");//当前班组分析已完成
|
|
||||||
updateBusinessSubSampleAnalysisGroupDOList.add(subSampleAnalysisGroupDO);
|
|
||||||
|
|
||||||
updateBusinessSubSampleDOList.add(businessSubSampleDO);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
**/
|
|
||||||
//分析方法信息
|
//分析方法信息
|
||||||
ConfigAssayMethodDO configAssayMethodDO = configAssayMethodMapper.selectById(reqVO.getConfigAssayMethodId());
|
ConfigAssayMethodDO configAssayMethodDO = configAssayMethodMapper.selectById(reqVO.getConfigAssayMethodId());
|
||||||
//查询当前分析部门下的分样判定信息
|
//查询当前分析部门下的分样判定信息
|
||||||
@@ -618,9 +588,6 @@ public class SampleResultReportingServiceImpl implements SampleResultReportingSe
|
|||||||
updatebBusinessSampleEntrustRegistrationDOList.add(businessSampleEntrustRegistrationDO);
|
updatebBusinessSampleEntrustRegistrationDOList.add(businessSampleEntrustRegistrationDO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (saveBusinessAssayReportDataDOList.size() > 0) {
|
if (saveBusinessAssayReportDataDOList.size() > 0) {
|
||||||
businessAssayReportDataMapper.insertBatch(saveBusinessAssayReportDataDOList);
|
businessAssayReportDataMapper.insertBatch(saveBusinessAssayReportDataDOList);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user