| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -150,8 +150,15 @@ public class InspectRecordServiceImpl implements InspectRecordService { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            // 添加空白数据
 | 
					 | 
					 | 
					 | 
					            // 添加空白数据
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            TestRecordSampleDataVO blankVo = new TestRecordSampleDataVO(); | 
					 | 
					 | 
					 | 
					            TestRecordSampleDataVO blankVo = new TestRecordSampleDataVO(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            blankVo.setName("空白"); | 
					 | 
					 | 
					 | 
					            blankVo.setName("空白" + materialType); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            blankVo.setCompoundName(compoundName); | 
					 | 
					 | 
					 | 
					            blankVo.setCompoundName(compoundName); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            blankVo.setPTargetRtTime("/"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            blankVo.setPRtTimeError("/"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            blankVo.setPRtTimeWithinError("否"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            blankVo.setPIonAbundanceRatio("/"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            blankVo.setPIonAbundanceRatioError("/"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            blankVo.setPIonAbundanceRatioWithinError("否"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            blankVo.setPIsDetected("否"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            dataDtos.add(blankVo); | 
					 | 
					 | 
					 | 
					            dataDtos.add(blankVo); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            // 根据样品类型分组
 | 
					 | 
					 | 
					 | 
					            // 根据样品类型分组
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -163,20 +170,22 @@ public class InspectRecordServiceImpl implements InspectRecordService { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                TestRecordSampleData std = map.get("STD").get(0); | 
					 | 
					 | 
					 | 
					                TestRecordSampleData std = map.get("STD").get(0); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                TestRecordSampleDataVO stdVo = new TestRecordSampleDataVO(); | 
					 | 
					 | 
					 | 
					                TestRecordSampleDataVO stdVo = new TestRecordSampleDataVO(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                BeanUtils.copyProperties(std, stdVo); | 
					 | 
					 | 
					 | 
					                BeanUtils.copyProperties(std, stdVo); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                stdVo.setName("空白添加"); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                stdVo.setIsDetected(1); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                List<TestRecordSampleDataExpand> expandList = dataExpandMap.get(std.getId()); | 
					 | 
					 | 
					 | 
					                List<TestRecordSampleDataExpand> expandList = dataExpandMap.get(std.getId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (expandList != null) { | 
					 | 
					 | 
					 | 
					                if (expandList != null) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    for (TestRecordSampleDataExpand expand : expandList) { | 
					 | 
					 | 
					 | 
					                    for (TestRecordSampleDataExpand expand : expandList) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        if (!expand.getBasePeak()) { | 
					 | 
					 | 
					 | 
					                        if (!expand.getBasePeak()) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            stdVo.setIonAbundanceRatio(expand.getIonAbundanceRatio()); | 
					 | 
					 | 
					 | 
					                            stdVo.setPIonAbundanceRatio(expand.getIonAbundanceRatio().toString()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            stdVo.setIonAbundanceRatioError(expand.getIonAbundanceRatioError()); | 
					 | 
					 | 
					 | 
					                            stdVo.setPIonAbundanceRatioError("/"); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            stdVo.setIonAbundanceRatioWithinError(expand.getIonAbundanceRatioWithinError()); | 
					 | 
					 | 
					 | 
					                            stdVo.setPIonAbundanceRatioWithinError("/"); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            break; // 只取第一个符合条件的扩展数据
 | 
					 | 
					 | 
					 | 
					                            break; // 只取第一个符合条件的扩展数据
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        } | 
					 | 
					 | 
					 | 
					                        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    } | 
					 | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                } | 
					 | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                stdVo.setName("空白" + materialType + "加标"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                stdVo.setPTargetRtTime(std.getTargetRtTime().toString()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                stdVo.setPRtTimeError("/"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                stdVo.setPRtTimeWithinError("/"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                stdVo.setPIsDetected("是"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                dataDtos.add(stdVo); | 
					 | 
					 | 
					 | 
					                dataDtos.add(stdVo); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -195,22 +204,25 @@ public class InspectRecordServiceImpl implements InspectRecordService { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    if (expandList != null) { | 
					 | 
					 | 
					 | 
					                    if (expandList != null) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        for (TestRecordSampleDataExpand expand : expandList) { | 
					 | 
					 | 
					 | 
					                        for (TestRecordSampleDataExpand expand : expandList) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            if (!expand.getBasePeak()) { | 
					 | 
					 | 
					 | 
					                            if (!expand.getBasePeak()) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                vo.setIonAbundanceRatio(expand.getIonAbundanceRatio()); | 
					 | 
					 | 
					 | 
					                                vo.setPIonAbundanceRatio(expand.getIonAbundanceRatio().toString()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                vo.setIonAbundanceRatioError(expand.getIonAbundanceRatioError()); | 
					 | 
					 | 
					 | 
					                                vo.setPIonAbundanceRatioError(expand.getIonAbundanceRatioError().toString()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                vo.setIonAbundanceRatioWithinError(expand.getIonAbundanceRatioWithinError()); | 
					 | 
					 | 
					 | 
					                                vo.setPIonAbundanceRatioWithinError(expand.getIonAbundanceRatioWithinError()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                break; // 只取第一个符合条件的扩展数据
 | 
					 | 
					 | 
					 | 
					                                break; // 只取第一个符合条件的扩展数据
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            } | 
					 | 
					 | 
					 | 
					                            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        } | 
					 | 
					 | 
					 | 
					                        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    } | 
					 | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    // 重新命名样品
 | 
					 | 
					 | 
					 | 
					                    // 重新命名样品
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    vo.setName((analyte.size() == 1) ? "检材样品" : (i + 1) + "号检材样品"); | 
					 | 
					 | 
					 | 
					                    vo.setName((dataList.size() == 1) ? "检材样品" : (i + 1) + "号检材样品"); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    dataVOS.add(vo); | 
					 | 
					 | 
					 | 
					                    dataVOS.add(vo); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                } | 
					 | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                dataDtos.addAll(dataVOS); | 
					 | 
					 | 
					 | 
					                dataDtos.addAll(dataVOS); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        int indexNum = 1; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        for (int i = 0; i < dataDtos.size(); i++) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            dataDtos.get(i).setIndexNum(String.valueOf(indexNum++)); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        // 返回处理后的数据
 | 
					 | 
					 | 
					 | 
					        // 返回处理后的数据
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        data.put("dataDtos", dataDtos); | 
					 | 
					 | 
					 | 
					        data.put("dataDtos", dataDtos); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        data.put("sampleSize", dataDtos.size()); | 
					 | 
					 | 
					 | 
					        data.put("sampleSize", dataDtos.size()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -218,6 +230,24 @@ public class InspectRecordServiceImpl implements InspectRecordService { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        return data; | 
					 | 
					 | 
					 | 
					        return data; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    public TestRecordSampleDataVO processingPrintData(TestRecordSampleDataVO vo, String materialType, String compoundName, Map<String, List<TestRecordSampleDataExpand>> dataExpandMap) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        String type = vo.getSampleType(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        switch (type) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            case "QC": | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                break; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            case "STD": | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                break; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            case "Analyte": | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            default: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                break; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        return vo; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    /** | 
					 | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * 根据委托信息和样本类型生成生物样本检验记录文件。 | 
					 | 
					 | 
					 | 
					     * 根据委托信息和样本类型生成生物样本检验记录文件。 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -253,7 +283,8 @@ public class InspectRecordServiceImpl implements InspectRecordService { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * @return 上传后的文件路径 | 
					 | 
					 | 
					 | 
					     * @return 上传后的文件路径 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * @throws Exception 可能抛出的异常 | 
					 | 
					 | 
					 | 
					     * @throws Exception 可能抛出的异常 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     */ | 
					 | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    private String buildDocFileAndUploadToOss(String entrustId, String templatePath, Configure config, Map<String, Object> data) throws Exception { | 
					 | 
					 | 
					 | 
					    private String buildDocFileAndUploadToOss(String entrustId, String templatePath, Configure | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            config, Map<String, Object> data) throws Exception { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        ByteArrayOutputStream bos = new ByteArrayOutputStream(); | 
					 | 
					 | 
					 | 
					        ByteArrayOutputStream bos = new ByteArrayOutputStream(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        ossFile.fileGet(templatePath, bos); | 
					 | 
					 | 
					 | 
					        ossFile.fileGet(templatePath, bos); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        byte[] templateArray = bos.toByteArray(); | 
					 | 
					 | 
					 | 
					        byte[] templateArray = bos.toByteArray(); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -319,7 +350,8 @@ public class InspectRecordServiceImpl implements InspectRecordService { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * @param materialType | 
					 | 
					 | 
					 | 
					     * @param materialType | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * @return 包含委托信息和检验记录信息的HashMap对象 | 
					 | 
					 | 
					 | 
					     * @return 包含委托信息和检验记录信息的HashMap对象 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     */ | 
					 | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    private HashMap<String, Object> buildCommonInspectRecordDocMap(EntrustInfo entrustInfo, TestRecord testRecord, String materialType) { | 
					 | 
					 | 
					 | 
					    private HashMap<String, Object> buildCommonInspectRecordDocMap(EntrustInfo entrustInfo, TestRecord | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            testRecord, String materialType) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        HashMap<String, Object> data = new HashMap<>(); | 
					 | 
					 | 
					 | 
					        HashMap<String, Object> data = new HashMap<>(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        data.put("entrustDepartment", entrustInfo.getEntrustDepartment()); | 
					 | 
					 | 
					 | 
					        data.put("entrustDepartment", entrustInfo.getEntrustDepartment()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |