| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -43,6 +43,7 @@ import com.epmet.dto.result.*; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.entity.ProjectEntity; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.entity.ProjectProcessEntity; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.entity.ProjectStaffEntity; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.feign.EpmetMessageOpenFeignClient; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.feign.EpmetUserFeignClient; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.feign.GovOrgFeignClient; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.redis.ProjectProcessRedis; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -87,6 +88,8 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private String scanApiUrl; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Value("${openapi.scan.method.textSyncScan}") | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private String textSyncScanMethod; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Autowired | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public PageData<ProjectProcessDTO> page(Map<String, Object> params) { | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -280,8 +283,12 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (!transferMessage(formDTO).success()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            throw new RenException(ProjectConstant.SAVE_MSG_EXCEPTION); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //5:调用epmet-message服务,给项目流转过程中的工作人员发送订阅的微信消息
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (!transferWxmpMessage(formDTO).success()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            throw new RenException(ProjectConstant.SAVE_WXMP_MSG_EXCEPTION); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    /** | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @Description 项目流转给流转工作人员推送消息 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @author sun | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -312,6 +319,35 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return messageFeignClient.saveUserMessageList(msgList); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    /** | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @Description 项目流转给流转工作人员推送订阅的微信消息 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @author sun | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private Result transferWxmpMessage(TransferFormDTO formDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<WxSubscribeMessageFormDTO> msgList = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ProjectEntity projectEntity = projectService.selectById(formDTO.getProjectId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (null == projectEntity) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            throw new RenException(ProjectConstant.SELECT_PROJECT_EXCEPTION); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //3:创建项目工作人员消息对象
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //所选人员如果即在部门下又在网格下则只发一条消息
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Map<String,String> map = new HashMap<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        String projectStaffMessage = String.format(UserMessageConstant.PROJECT_RESOLVED_MSG, projectEntity.getTitle()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        formDTO.getStaffList().forEach(staff->{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if(!map.containsKey(staff.getStaffId())){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                WxSubscribeMessageFormDTO msg = new WxSubscribeMessageFormDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                msg.setCustomerId(projectEntity.getCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                msg.setClientType(ProjectConstant.GOV); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                msg.setUserId(staff.getStaffId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                msg.setBehaviorType(UserMessageConstant.WXMP_PROJECT_TITLE); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                msg.setMessageContent(projectStaffMessage); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                msg.setMessageTime(new Date()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                msgList.add(msg); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                map.put(staff.getStaffId(),staff.getStaffId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return epmetMessageOpenFeignClient.sendWxSubscribeMessage(msgList); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    /** | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @Description  议题处理进展——已转项目 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |