| 
						
						
							
								
							
						
						
					 | 
					@ -183,6 +183,10 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return ConvertUtils.sourceToTarget(entity, IcEventDTO.class); | 
					 | 
					 | 
					        return ConvertUtils.sourceToTarget(entity, IcEventDTO.class); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * 事件管理-新增 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @param formDTO | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Transactional(rollbackFor = Exception.class) | 
					 | 
					 | 
					    @Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public void save(IcEventAddEditFormDTO formDTO) { | 
					 | 
					 | 
					    public void save(IcEventAddEditFormDTO formDTO) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -243,6 +247,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //事件Id
 | 
					 | 
					 | 
					        //事件Id
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        String icEventId = IdWorker.getIdStr(); | 
					 | 
					 | 
					        String icEventId = IdWorker.getIdStr(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        Date nowTime=new Date(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //事件表红点,回复、立项、转服务、办结展示红点【0不展示 1展示】
 | 
					 | 
					 | 
					        //事件表红点,回复、立项、转服务、办结展示红点【0不展示 1展示】
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        int redDot = NumConstant.ZERO; | 
					 | 
					 | 
					        int redDot = NumConstant.ZERO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        String operationType = ""; | 
					 | 
					 | 
					        String operationType = ""; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -276,6 +281,33 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            formDTO.setOperationId(recIdResult.getData().getDemandRecId()); | 
					 | 
					 | 
					            formDTO.setOperationId(recIdResult.getData().getDemandRecId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        //2-3.转议题
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if(StringUtils.isNotBlank(formDTO.getOperationType()) && NumConstant.THREE_STR.equals(formDTO.getOperationType())){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            //调用issue服务转议题
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            PublishIssueFormDTO issueFormDTO=new PublishIssueFormDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            issueFormDTO.setIssueStatus("voting"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            issueFormDTO.setAddress(formDTO.getAddress()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            issueFormDTO.setLatitude(formDTO.getLatitude()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            issueFormDTO.setLongitude(formDTO.getLongitude()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            issueFormDTO.setIssueTitle(formDTO.getIssueInfo().getIssueTitle()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            issueFormDTO.setSuggestion(formDTO.getIssueInfo().getSuggestion()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            issueFormDTO.setGridId(formDTO.getGridId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            issueFormDTO.setOrgId(gridInfo.getPid()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            issueFormDTO.setOrgIdPath(gridInfo.getPids()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            issueFormDTO.setSourceType("ic_event"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            issueFormDTO.setSourceId(icEventId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            issueFormDTO.setCreatedBy(formDTO.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            issueFormDTO.setUpdatedBy(formDTO.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            issueFormDTO.setCreatedTime(nowTime); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            issueFormDTO.setUpdatedTime(nowTime); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            issueFormDTO.setDecidedTime(nowTime); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            issueFormDTO.setEventReportUserName(formDTO.getName()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            Result<IssueDTO> issueRes=govIssueOpenFeignClient.publishIssue(issueFormDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            if (!issueRes.success() || null == issueRes.getData()) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "事件转议题异常,返参:" + JSON.toJSONString(issueRes), "事件转议题异常"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            formDTO.setOperationId(issueRes.getData().getIssueId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //3.新增事件数据、附件数据、分类数据、回复数据、操作记录数据
 | 
					 | 
					 | 
					        //3.新增事件数据、附件数据、分类数据、回复数据、操作记录数据
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //3-1.事件数据保存
 | 
					 | 
					 | 
					        //3-1.事件数据保存
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -283,7 +315,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        entity.setId(icEventId); | 
					 | 
					 | 
					        entity.setId(icEventId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        entity.setAgencyId(gridInfo.getPid()); | 
					 | 
					 | 
					        entity.setAgencyId(gridInfo.getPid()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        entity.setGridPids(gridInfo.getPids()); | 
					 | 
					 | 
					        entity.setGridPids(gridInfo.getPids()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        entity.setLatestOperatedTime(new Date()); | 
					 | 
					 | 
					        entity.setLatestOperatedTime(nowTime); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        entity.setAuditStatus(TopicConstant.AUTO_PASSED); | 
					 | 
					 | 
					        entity.setAuditStatus(TopicConstant.AUTO_PASSED); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if("closed_case".equals(formDTO.getStatus())){ | 
					 | 
					 | 
					        if("closed_case".equals(formDTO.getStatus())){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            entity.setCloseCaseTime(new Date()); | 
					 | 
					 | 
					            entity.setCloseCaseTime(new Date()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -346,16 +378,20 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            icEventReplyService.insert(replyEntity); | 
					 | 
					 | 
					            icEventReplyService.insert(replyEntity); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //回复对应的操作记录
 | 
					 | 
					 | 
					            //回复对应的操作记录
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            date.setTime(date.getTime() + 6000 * 1); | 
					 | 
					 | 
					            date.setTime(date.getTime() + 6000 * 1); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "reply", "reply")); | 
					 | 
					 | 
					            logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "reply", "回复")); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //立项对应的操作记录
 | 
					 | 
					 | 
					        //立项对应的操作记录
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (StringUtils.isNotBlank(formDTO.getOperationType()) && NumConstant.ONE_STR.equals(formDTO.getOperationType())) { | 
					 | 
					 | 
					        if (StringUtils.isNotBlank(formDTO.getOperationType()) && NumConstant.ONE_STR.equals(formDTO.getOperationType())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            date.setTime(date.getTime() + 6000 * 1); | 
					 | 
					 | 
					            date.setTime(date.getTime() + 6000 * 1); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "shift_project", "shift_project")); | 
					 | 
					 | 
					            logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "shift_project", "立项")); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //转需求对应的操作记录
 | 
					 | 
					 | 
					        //转需求对应的操作记录
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (StringUtils.isNotBlank(formDTO.getOperationType()) && NumConstant.TWO_STR.equals(formDTO.getOperationType())) { | 
					 | 
					 | 
					        if (StringUtils.isNotBlank(formDTO.getOperationType()) && NumConstant.TWO_STR.equals(formDTO.getOperationType())) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), formDTO.getDemand().getWantServiceTime(), "shift_demand", "shift_demand")); | 
					 | 
					 | 
					            logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), formDTO.getDemand().getWantServiceTime(), "shift_demand", "转服务")); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        //转议题
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (StringUtils.isNotBlank(formDTO.getOperationType()) && NumConstant.THREE_STR.equals(formDTO.getOperationType())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "shift_to_issue", "转议题")); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //选择了已完成
 | 
					 | 
					 | 
					        //选择了已完成
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (StringUtils.isNotBlank(formDTO.getOperationType()) && "closed_case".equals(formDTO.getStatus())) { | 
					 | 
					 | 
					        if (StringUtils.isNotBlank(formDTO.getOperationType()) && "closed_case".equals(formDTO.getStatus())) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -391,7 +427,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * | 
					 | 
					 | 
					     * | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     * @return | 
					 | 
					 | 
					     * @return | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     */ | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    private IcEventOperationLogEntity logEntity(String customerId, String icEventId, String userId, Date date, String actionCode, String actionDesc) { | 
					 | 
					 | 
					    private IcEventOperationLogEntity logEntity(String customerId, String icEventId, String userId, Date operateTime, String actionCode, String actionDesc) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        IcEventOperationLogEntity logEntity = new IcEventOperationLogEntity(); | 
					 | 
					 | 
					        IcEventOperationLogEntity logEntity = new IcEventOperationLogEntity(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        logEntity.setCustomerId(customerId); | 
					 | 
					 | 
					        logEntity.setCustomerId(customerId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        logEntity.setIcEventId(icEventId); | 
					 | 
					 | 
					        logEntity.setIcEventId(icEventId); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -399,7 +435,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        logEntity.setUserIdentity("staff"); | 
					 | 
					 | 
					        logEntity.setUserIdentity("staff"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        logEntity.setActionCode(actionCode); | 
					 | 
					 | 
					        logEntity.setActionCode(actionCode); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        logEntity.setActionDesc(actionDesc); | 
					 | 
					 | 
					        logEntity.setActionDesc(actionDesc); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        logEntity.setOperateTime(date); | 
					 | 
					 | 
					        logEntity.setOperateTime(operateTime); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        return logEntity; | 
					 | 
					 | 
					        return logEntity; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |