|
|
@@ -34,12 +34,12 @@ public class DeviceToDoRemindJob extends BaseJob2 {
|
|
|
|
|
|
|
|
|
// 按部门分组,查询每个部门没做保养的设备数量
|
|
|
- String sql = "select bian_zhi_bu_men_ from t_mjsbwhbyjlby where shi_fou_guo_shen_ ='待处理' group by bian_zhi_bu_men_";
|
|
|
+ String sql = "select bian_zhi_bu_men_ from t_mjsbwhbyjlby where shi_fou_guo_shen_ ='待处理' and ji_hua_shi_jian_=current_date group by bian_zhi_bu_men_";
|
|
|
List<Map<String, Object>> deptList = (List<Map<String, Object>>)commonDao.query(sql);
|
|
|
if (BeanUtils.isNotEmpty(deptList)){
|
|
|
for (Map<String,Object> map : deptList){
|
|
|
String deptId = map.get("bian_zhi_bu_men_").toString();
|
|
|
- Map<String,Object> total = commonDao.queryOne("select count(1) total from t_mjsbwhbyjlby where bian_zhi_bu_men_ ='"+deptId+"'");
|
|
|
+ Map<String,Object> total = commonDao.queryOne("select count(1) total from t_mjsbwhbyjlby where ji_hua_shi_jian_=current_date and bian_zhi_bu_men_ ='"+deptId+"'");
|
|
|
long count = (long)total.get("total");
|
|
|
if (count>0){
|
|
|
// 发系统消息给对应的专业组组长
|