Преглед изворни кода

1.移动端查询未测量人员接口修改。
2.未测量提醒根据上下班区分提醒内容。

tomatozq пре 5 година
родитељ
комит
5a358463a0

+ 10 - 3
web/src/main/java/com/jpsoft/smart/schduled/UnmeasureTemperatureAlarmTask.java

@@ -127,7 +127,14 @@ public class UnmeasureTemperatureAlarmTask {
                 DateTime attendanceTime = new DateTime(sdf.parse(date + " " + alarmConfig.getAttendanceTime()));
                 DateTime endTime = new DateTime(sdf.parse(date + " " + alarmConfig.getEndTime()));
 
-                DateTime alarmTime = attendanceTime.plusMinutes(-10);
+                DateTime alarmTime = null;
+
+                if (alarmConfig.getClassifier()!=null && alarmConfig.getClassifier().equals(1)){
+                    alarmTime = attendanceTime.plusMinutes(-10);
+                }
+                else{
+                    alarmTime = attendanceTime.plusMinutes(10);
+                }
 
                 //开始时间
                 if (weekdays.indexOf(String.valueOf(weekday)) != -1) {
@@ -293,7 +300,7 @@ public class UnmeasureTemperatureAlarmTask {
             if (personInfo.getWechatNoticeEnabled()!=null
             && personInfo.getWechatNoticeEnabled()
             && StringUtils.isNotEmpty(personInfo.getOpenId())) {
-                String message = "尊敬的用户:" + personInfo.getName();
+                String message = "尊敬的" + personInfo.getName();
 
                 if (alarmConfig.getClassifier()!=null && alarmConfig.getClassifier().equals(1)){
                     message += ",请在" + startTime.toString("HH:mm") + "至" + attendanceTime.toString("HH:mm") + "时间内测量体温!";
@@ -345,7 +352,7 @@ public class UnmeasureTemperatureAlarmTask {
         for (WarningPusher pusher: pusherList) {
             if (StringUtils.isNotEmpty(pusher.getOpenId())
             && pusher.getMissingNoticeEnabled()!=null && pusher.getMissingNoticeEnabled()) {
-                String message = "尊敬的用户:" + pusher.getName()
+                String message = "尊敬的" + pusher.getName()
                         + ",当天时段" + startTime.toString("HH:mm") + "至" + endTime.toString("HH:mm")
                         + ",有" + total + "人未测量体温。名单如下:" + sb.toString();