|
|
|
@ -237,7 +237,7 @@ public class UserAnalysisNoteServiceImpl extends BaseServiceImpl<UserAnalysisNot |
|
|
|
//获取部门排行
|
|
|
|
Integer ranking = streeRanking.get(dto.getDeptId()); |
|
|
|
//组装短信内容参数
|
|
|
|
LinkedHashMap<String, String> noteParams = streeNoteContent(ranking,dto); |
|
|
|
LinkedHashMap<String, String> noteParams = streeNoteContent(ranking,dto,streeRanking,"1"); |
|
|
|
noteParams.put("deptType","街道"); |
|
|
|
contentNote.put(mobile,noteParams); |
|
|
|
}else {//社区级账号 发送街道模板
|
|
|
|
@ -247,7 +247,7 @@ public class UserAnalysisNoteServiceImpl extends BaseServiceImpl<UserAnalysisNot |
|
|
|
//获取部门排行
|
|
|
|
Integer rankingCommunity = communiytRanking.get(dto.getDeptId()); |
|
|
|
//组装短信内容参数
|
|
|
|
LinkedHashMap<String, String> noteParams = streeNoteContent(rankingCommunity,dto); |
|
|
|
LinkedHashMap<String, String> noteParams = streeNoteContent(rankingCommunity,dto,communiytRanking,"0"); |
|
|
|
noteParams.put("deptType","社区"); |
|
|
|
contentNote.put(mobile,noteParams); |
|
|
|
} |
|
|
|
@ -334,22 +334,37 @@ public class UserAnalysisNoteServiceImpl extends BaseServiceImpl<UserAnalysisNot |
|
|
|
* @param dto |
|
|
|
* @return wk |
|
|
|
*/ |
|
|
|
private LinkedHashMap<String, String> streeNoteContent(Integer ranking,UserAnalysisNoteDTO dto){ |
|
|
|
private LinkedHashMap<String, String> streeNoteContent(Integer ranking,UserAnalysisNoteDTO dto, |
|
|
|
Map<String,Integer>streeRanking, |
|
|
|
String type){ |
|
|
|
LinkedHashMap<String, String> noteParams = new LinkedHashMap<>(); |
|
|
|
noteParams.put("deptName",dto.getDeptName()); |
|
|
|
noteParams.put("month",getLastMonth()); |
|
|
|
noteParams.put("sort",ranking.toString()); |
|
|
|
noteParams.put("code",dto.getDeptId()); |
|
|
|
if (ranking<=3){ |
|
|
|
int i = streeRanking.size(); |
|
|
|
if (type.equals("0")){ //社区级
|
|
|
|
if (ranking<=i-127){ |
|
|
|
noteParams.put("msmType","恭喜"); |
|
|
|
}else if ( ranking>23 && ranking<=20){ |
|
|
|
}else if ( ranking>i+1 && ranking<=i-9){ |
|
|
|
noteParams.put("msmType","很遗憾"); |
|
|
|
}else { |
|
|
|
noteParams.put("msmType","祝贺"); |
|
|
|
} |
|
|
|
}else { |
|
|
|
if (ranking<=i-19){ |
|
|
|
noteParams.put("msmType","恭喜"); |
|
|
|
}else if ( ranking>i+1 && ranking<=i-2){ |
|
|
|
noteParams.put("msmType","很遗憾"); |
|
|
|
}else { |
|
|
|
noteParams.put("msmType","祝贺"); |
|
|
|
} |
|
|
|
} |
|
|
|
noteParams.put("deptName",dto.getDeptName()); |
|
|
|
noteParams.put("month",getLastMonth()); |
|
|
|
noteParams.put("sort",ranking.toString()); |
|
|
|
noteParams.put("code",dto.getDeptId()); |
|
|
|
return noteParams; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 根据部门排名,拼接部门短信内容参数 |
|
|
|
* @param ranking |
|
|
|
|