| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -69,9 +69,9 @@ public class UserAnalysisNoteServiceImpl extends BaseServiceImpl<UserAnalysisNot | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Autowired | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private AnalysisFeignClient analysisFeignClient; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //街道级别短息模板类型
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    static final  String  SMSTYPENAME = ""; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    static final  String  SMSTYPENAME = "GOVERN_RANK_DEPT"; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //区级别短息模板类型
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    static final  String  DISTRICTSMSTYPENAME = ""; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    static final  String  DISTRICTSMSTYPENAME = "GOVERN_RANK_LIST"; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public PageData<UserAnalysisNoteDTO> page(Map<String, Object> params) { | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -209,6 +209,8 @@ public class UserAnalysisNoteServiceImpl extends BaseServiceImpl<UserAnalysisNot | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<String> streetMobiles = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //街道模板内容
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Map<String,LinkedHashMap<String, String>> contentNote = new HashMap<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //区模板内容
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Map<String,LinkedHashMap<String, String>> districtContentNote = new HashMap<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //2.查询出要发送的用户信息
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Map<String, Object> params = new HashMap<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<UserAnalysisNoteDTO>  userNoteList =   baseDao.getList(params); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -222,8 +224,12 @@ public class UserAnalysisNoteServiceImpl extends BaseServiceImpl<UserAnalysisNot | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //查询部门类型
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					           String deptType = dto.getDeptType(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					           if ("0".equals(deptType)){ // 区级 账号  发送区级模板
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					               LinkedHashMap<String, String> noteParams = new LinkedHashMap<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              String mobile = dto.getMobile(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					               districtMobiles.add(mobile); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					               noteParams.put("deptName",dto.getDeptName()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					               noteParams.put("month",getLastMonth()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					               districtContentNote.put(mobile,noteParams); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					           }else if ("1".equals(deptType)){ //街道级账号 发送街道模板
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					               //获取电话号
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					               String mobile = dto.getMobile(); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -248,7 +254,7 @@ public class UserAnalysisNoteServiceImpl extends BaseServiceImpl<UserAnalysisNot | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //6.开始发送发送短信(区级,和街道级分开发)
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //区级 短信
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        sendMessagesDistrict(districtMobiles); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        sendMessagesDistrict(districtMobiles,districtContentNote); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //街道级短信
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        sendMessages(streetMobiles,contentNote); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -308,16 +314,18 @@ public class UserAnalysisNoteServiceImpl extends BaseServiceImpl<UserAnalysisNot | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @Param: streeContentNoteList 短信模板内容 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @return: void | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @Author: wk | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @Date: 2020/5/8 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @Date: 2020/11/25 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Async | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public void sendMessagesDistrict( List<String>mobiles){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public void sendMessagesDistrict(  List<String>mobiles, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                       Map<String,LinkedHashMap<String, String>> contentNoteList){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //获取所有手机号,以及短信模板
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        SmsNoticeFormDTO smsNoticeFormDTO = new SmsNoticeFormDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        smsNoticeFormDTO.setMobiles(mobiles); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        smsNoticeFormDTO.setNoteContent(contentNoteList); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //插入固定短信模板
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        smsNoticeFormDTO.setSmsTemplateType(DISTRICTSMSTYPENAME); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        messageFeignClient.sendSmsNoticeDistrict(smsNoticeFormDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        messageFeignClient.sendSmsNotice(smsNoticeFormDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    /** | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -342,4 +350,17 @@ public class UserAnalysisNoteServiceImpl extends BaseServiceImpl<UserAnalysisNot | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return noteParams; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    /** | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * 根据部门排名,拼接部门短信内容参数 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @param ranking | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @param dto | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @return wk | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private  LinkedHashMap<String, String> districtNoteContent(Integer ranking,UserAnalysisNoteDTO dto){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        LinkedHashMap<String, String> noteParams = new LinkedHashMap<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        noteParams.put("deptName",dto.getDeptName()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        noteParams.put("month",getLastMonth()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return noteParams; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} |