|
|
@@ -43,13 +43,30 @@ public class DeviceToDoRemindJob extends BaseJob2 {
|
|
|
long count = (long)total.get("total");
|
|
|
if (count>0){
|
|
|
// 发系统消息给对应的专业组组长
|
|
|
- this.sendLeaders(deptId,count);
|
|
|
+ this.sendLeaders(deptId,"设备维护保养提醒","您的专业组有"+count+"条待处理的设备维护保养记录,请通知相关人员及时处理!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 设施环境待处理推送
|
|
|
+ String sshjSql = "select facs_type,bian_zhi_bu_men_ from v_facs_summary_daily where shi_fou_guo_shen_ ='待处理' GROUP BY bian_zhi_bu_men_";
|
|
|
+ List<Map<String, Object>> bumen = (List<Map<String, Object>>)commonDao.query(sshjSql);
|
|
|
+ if (BeanUtils.isNotEmpty(bumen)){
|
|
|
+ for (Map<String,Object> map : bumen){
|
|
|
+ String deptId = map.get("bian_zhi_bu_men_").toString();
|
|
|
+ String taskName = map.get("facs_type").toString();
|
|
|
+ taskName = taskName.substring(3);
|
|
|
+ Map<String,Object> total = commonDao.queryOne("select count(1) total from v_facs_summary_daily where bian_zhi_bu_men_ ='"+deptId+"'");
|
|
|
+ long count = (long)total.get("total");
|
|
|
+ if (count>0){
|
|
|
+ // 发系统消息给对应的专业组组长
|
|
|
+ this.sendLeaders(deptId,taskName+"待处理提醒","您的专业组有"+count+"条待处理的"+taskName+"记录,请通知相关人员及时处理!");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void sendLeaders(String deptId,long total){
|
|
|
+ private void sendLeaders(String deptId,String subject ,String content){
|
|
|
String SQL2 = "select *from v_professional_leader where id_ in(select id_ from ibps_party_employee where positions_ like '%%%s%%')";
|
|
|
SQL2 = String.format(SQL2,deptId);
|
|
|
List<Map<String, Object>> leads = (List<Map<String, Object>>)commonDao.query(SQL2);
|
|
|
@@ -57,8 +74,6 @@ public class DeviceToDoRemindJob extends BaseJob2 {
|
|
|
for (Map<String,Object> lead : leads){
|
|
|
List<String> receiver = new ArrayList<>();
|
|
|
receiver.add(lead.get("ID_").toString());
|
|
|
- String subject = "设备维护保养提醒";
|
|
|
- String content = "您的专业组有"+total+"条待处理的设备维护保养记录,请通知相关人员及时处理!";
|
|
|
MessageQueueProductorUtil.send("DeviceToDoRemindJob", "DeviceToDoRemindJob" , "inner" , receiver,null , subject, content, null, null, null);
|
|
|
//TODO 消息模版
|
|
|
}
|