| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -121,17 +121,20 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    dto.setSourceTypeName(statusMap.get(dto.getSourceType())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                //每个事件对应的图片数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                List<String> imageList = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                List<String> voiceList = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                dto.getAttachmentList().forEach(file -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    if ("image".equals(file.getType())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        imageList.add(file.getUrl()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } else if ("voice".equals(file.getType())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        voiceList.add(file.getUrl()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if(!CollectionUtils.isEmpty(dto.getAttachmentList())){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    List<String> imageList = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    List<String> voiceList = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    for(IcEventListResultDTO.Attachment file: dto.getAttachmentList()){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        if ("image".equals(file.getType())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            imageList.add(file.getUrl()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        } else if ("voice".equals(file.getType())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            voiceList.add(file.getUrl()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                dto.setImageList(imageList); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                dto.setVoiceList(voiceList); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    dto.setImageList(imageList); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    dto.setVoiceList(voiceList); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return new PageData<>(list, pageInfo.getTotal()); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -211,10 +214,17 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        String icEventId = UUID.randomUUID().toString().replace("-", ""); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //2.判断是否立项或转需求
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //2-1.项目立项
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (StringUtils.isNotBlank(formDTO.getOperationType()) && "1".equals(formDTO.getOperationType())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            EventToProjectResultDTO project = projectTraceService.icEventToProject(formDTO.getProject()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            IcEventToProjectFormDTO toProject = formDTO.getProject(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            toProject.setCustomerId(formDTO.getCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            toProject.setUserId(formDTO.getUserId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            toProject.setApp(formDTO.getApp()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            toProject.setClient(formDTO.getClient()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            toProject.setIcEventId(icEventId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            EventToProjectResultDTO project = projectTraceService.icEventToProject(toProject); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            formDTO.setOperationId(project.getProjectId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //2-2.转需求
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -223,6 +233,8 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //需求人默认是当前用户id
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dto.setDemandUserId(formDTO.getUserId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dto.setCustomerId(formDTO.getCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dto.setOrigin("ic_event"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dto.setOriginId(icEventId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            Result<DemandRecId> recIdResult = epmetHeartOpenFeignClient.icEventToDemand(dto); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (!recIdResult.success() || recIdResult.getData() == null) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new RenException(recIdResult.getCode(), recIdResult.getMsg()); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -233,10 +245,14 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //3.新增事件数据、附件数据、分类数据、回复数据、操作记录数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //3-1.事件数据保存
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        IcEventEntity entity = ConvertUtils.sourceToTarget(formDTO, IcEventEntity.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        entity.setId(icEventId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        entity.setAgencyId(gridInfo.getPid()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        entity.setGridPids(gridInfo.getPids()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        entity.setLatestOperatedTime(new Date()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        entity.setAuditStatus(TopicConstant.AUTO_PASSED); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if("closed_case".equals(formDTO.getStatus())){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            entity.setCloseCaseTime(new Date()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        insert(entity); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //3-2.附件数据保存
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<IcEventAttachmentEntity> imageEntityList = new ArrayList<>(); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -260,19 +276,19 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //3-3.分类数据保存
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (!CollectionUtils.isEmpty(formDTO.getCategoryList())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), formDTO.getCategoryList()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            AtomicReference<IcEventCategoryEntity> categoryEntity = null; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            category.getCategoryList().forEach(ca -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            IcEventCategoryEntity categoryEntity = null; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            for (IssueProjectCategoryDictDTO ca : category.getCategoryList()){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if (ca.getId().equals(formDTO.getCategoryList().get(0))) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    categoryEntity.set(new IcEventCategoryEntity()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    categoryEntity.get().setCustomerId(formDTO.getCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    categoryEntity.get().setIcEventId(entity.getId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    categoryEntity.get().setCategoryId(ca.getId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    categoryEntity.get().setCategoryPids(ca.getPids()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    categoryEntity.get().setCategoryCode(ca.getCategoryCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    categoryEntity = new IcEventCategoryEntity(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    categoryEntity.setCustomerId(formDTO.getCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    categoryEntity.setIcEventId(entity.getId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    categoryEntity.setCategoryId(ca.getId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    categoryEntity.setCategoryPids(ca.getPids()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    categoryEntity.setCategoryCode(ca.getCategoryCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (categoryEntity.get() != null) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                icEventCategoryService.insert(categoryEntity.get()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (categoryEntity != null) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                icEventCategoryService.insert(categoryEntity); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |