| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -15,6 +15,7 @@ import digital.laboratory.platform.entrustment.convert.DrugLiteConvert; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import digital.laboratory.platform.entrustment.dto.ApprovedUpdateEntrustDTO; | 
					 | 
					 | 
					 | 
					import digital.laboratory.platform.entrustment.dto.ApprovedUpdateEntrustDTO; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import digital.laboratory.platform.entrustment.dto.EntrustAlterApplyApproveDTO; | 
					 | 
					 | 
					 | 
					import digital.laboratory.platform.entrustment.dto.EntrustAlterApplyApproveDTO; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import digital.laboratory.platform.entrustment.dto.EntrustAlterApplyDTO; | 
					 | 
					 | 
					 | 
					import digital.laboratory.platform.entrustment.dto.EntrustAlterApplyDTO; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					import digital.laboratory.platform.entrustment.dto.MaterialDTO; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import digital.laboratory.platform.entrustment.entity.CaseEvent; | 
					 | 
					 | 
					 | 
					import digital.laboratory.platform.entrustment.entity.CaseEvent; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import digital.laboratory.platform.entrustment.entity.EntrustAlterApply; | 
					 | 
					 | 
					 | 
					import digital.laboratory.platform.entrustment.entity.EntrustAlterApply; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import digital.laboratory.platform.entrustment.entity.Entrustment; | 
					 | 
					 | 
					 | 
					import digital.laboratory.platform.entrustment.entity.Entrustment; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -203,17 +204,16 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        caseEventService.update(Wrappers.<CaseEvent>lambdaUpdate().eq(CaseEvent::getId, entrustment.getCaseId()).set(CaseEvent::getCaseBrief, dto.getCaseBrief())); | 
					 | 
					 | 
					 | 
					        caseEventService.update(Wrappers.<CaseEvent>lambdaUpdate().eq(CaseEvent::getId, entrustment.getCaseId()).set(CaseEvent::getCaseBrief, dto.getCaseBrief())); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        // 添加更新记录
 | 
					 | 
					 | 
					 | 
					        // 添加更新记录
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        updateRecordBuilder.append("操作记录:\\n").append("该委托案件的案件简要由 [").append(oldCaseInfo.getCaseBrief()).append("] 更改为 [").append(dto.getCaseBrief()).append("] 。"); | 
					 | 
					 | 
					 | 
					        updateRecordBuilder.append("操作记录:\\n").append("该委托案件的案件简要由 [").append(oldCaseInfo.getCaseBrief()).append("] 更改为 [").append(dto.getCaseBrief()).append("] 。"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        updateRecordBuilder.append("检材信息的更新记录:"); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        // 2.修改检材 信息
 | 
					 | 
					 | 
					 | 
					        // 2.修改检材 信息
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        // 这里之所以要取未更新前的信息是为了留痕
 | 
					 | 
					 | 
					 | 
					        // 这里之所以要取未更新前的信息是为了留痕
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        Map<String, EntrustmentIdentificationMaterial> oldInfoMap = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery() | 
					 | 
					 | 
					 | 
					        Map<String, EntrustmentIdentificationMaterial> oldInfoMap = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                .eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustmentId) | 
					 | 
					 | 
					 | 
					                .eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustmentId) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                .orderByAsc(EntrustmentIdentificationMaterial::getOrderNo)) | 
					 | 
					 | 
					 | 
					                .orderByAsc(EntrustmentIdentificationMaterial::getOrderNo)) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                .stream().collect(Collectors.toMap(EntrustmentIdentificationMaterial::getId, Function.identity())); | 
					 | 
					 | 
					 | 
					                .stream().collect(Collectors.toMap(EntrustmentIdentificationMaterial::getId, Function.identity())); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        List<ApprovedUpdateEntrustDTO.MaterialDTO> materialList = dto.getMaterialList(); | 
					 | 
					 | 
					 | 
					        List<MaterialDTO> materialList = dto.getMaterialList(); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        Integer index = 1; | 
					 | 
					 | 
					 | 
					        Integer index = 1; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        List<EntrustmentIdentificationMaterial> entrustmentIdentificationMaterialList = new ArrayList<>(); | 
					 | 
					 | 
					 | 
					        List<EntrustmentIdentificationMaterial> entrustmentIdentificationMaterialList = new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        for (ApprovedUpdateEntrustDTO.MaterialDTO item : materialList) { | 
					 | 
					 | 
					 | 
					        for (MaterialDTO item : materialList) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            String materialId = item.getId(); | 
					 | 
					 | 
					 | 
					            String materialId = item.getId(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            String name = item.getName(); | 
					 | 
					 | 
					 | 
					            String name = item.getName(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            List<DrugLite> candidateDrugs = item.getCandidateDrugs(); | 
					 | 
					 | 
					 | 
					            List<DrugLite> candidateDrugs = item.getCandidateDrugs(); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -230,6 +230,9 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                // 信息并没有修改,不操作
 | 
					 | 
					 | 
					 | 
					                // 信息并没有修改,不操作
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                continue; | 
					 | 
					 | 
					 | 
					                continue; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            if (index == 1) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                updateRecordBuilder.append("检材信息的更新记录:"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            updateRecordBuilder | 
					 | 
					 | 
					 | 
					            updateRecordBuilder | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    .append("\\n") | 
					 | 
					 | 
					 | 
					                    .append("\\n") | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    .append(index++) | 
					 | 
					 | 
					 | 
					                    .append(index++) | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -273,7 +276,7 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            // 4.删除鉴定事项确认书和委托书
 | 
					 | 
					 | 
					 | 
					            // 4.删除鉴定事项确认书和委托书
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            deleteConfirmEntrustLetter(entrustment.getEntrustmentNo(), entrustmentId); | 
					 | 
					 | 
					 | 
					            deleteConfirmEntrustLetter(entrustment.getEntrustmentNo(), entrustmentId); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        return super.update(Wrappers.<EntrustAlterApply>lambdaUpdate().eq(EntrustAlterApply::getId, entrustment.getId()) | 
					 | 
					 | 
					 | 
					        return super.update(Wrappers.<EntrustAlterApply>lambdaUpdate().eq(EntrustAlterApply::getId, dto.getId()) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                .set(EntrustAlterApply::getUpdateRecord, updateRecordBuilder.toString()) | 
					 | 
					 | 
					 | 
					                .set(EntrustAlterApply::getUpdateRecord, updateRecordBuilder.toString()) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                .set(dto.getFinished(), EntrustAlterApply::getStatus, EntrustAlterApplyStatus.FINISHED.getStatus())); | 
					 | 
					 | 
					 | 
					                .set(dto.getFinished(), EntrustAlterApply::getStatus, EntrustAlterApplyStatus.FINISHED.getStatus())); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -283,7 +286,7 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * @param entrustmentId | 
					 | 
					 | 
					 | 
					     * @param entrustmentId | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * @param entrustment | 
					 | 
					 | 
					 | 
					     * @param entrustment | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     */ | 
					 | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    private void updateEntrustmentRequirement(String entrustmentId, Entrustment entrustment) { | 
					 | 
					 | 
					 | 
					    public void updateEntrustmentRequirement(String entrustmentId, Entrustment entrustment) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        List<EntrustmentIdentificationMaterial> renewList = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery() | 
					 | 
					 | 
					 | 
					        List<EntrustmentIdentificationMaterial> renewList = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                .eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustmentId) | 
					 | 
					 | 
					 | 
					                .eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustmentId) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                .orderByAsc(EntrustmentIdentificationMaterial::getOrderNo)); | 
					 | 
					 | 
					 | 
					                .orderByAsc(EntrustmentIdentificationMaterial::getOrderNo)); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -331,7 +334,7 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        // 状态合法,开始修改委托信息
 | 
					 | 
					 | 
					 | 
					        // 状态合法,开始修改委托信息
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        // 1. 修改委托案件简要
 | 
					 | 
					 | 
					 | 
					        // 1. 修改委托案件简要
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        Entrustment entrustment = entrustmentService.getById(dto.getId()); | 
					 | 
					 | 
					 | 
					        Entrustment entrustment = entrustmentService.getById(dto.getEntrustId()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (entrustment == null) { | 
					 | 
					 | 
					 | 
					        if (entrustment == null) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            throw new ValidateCodeException("修改的委托记录不存在!"); | 
					 | 
					 | 
					 | 
					            throw new ValidateCodeException("修改的委托记录不存在!"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |