Kaynağa Gözat

修改体温未检测主动通知。

zhengqiang 5 yıl önce
ebeveyn
işleme
1a45a6c3ca
20 değiştirilmiş dosya ile 481 ekleme ve 7 silme
  1. 1 3
      common/src/main/java/com/jpsoft/smart/config/WxConfig.java
  2. 18 0
      common/src/main/java/com/jpsoft/smart/modules/base/dao/AlarmConfigDAO.java
  3. 2 0
      common/src/main/java/com/jpsoft/smart/modules/base/dao/PersonDeviceFilterLogDAO.java
  4. 2 0
      common/src/main/java/com/jpsoft/smart/modules/base/dao/WarningPusherDAO.java
  5. 70 0
      common/src/main/java/com/jpsoft/smart/modules/base/entity/AlarmConfig.java
  6. 17 0
      common/src/main/java/com/jpsoft/smart/modules/base/service/AlarmConfigService.java
  7. 3 0
      common/src/main/java/com/jpsoft/smart/modules/base/service/PersonDeviceFilterLogService.java
  8. 2 0
      common/src/main/java/com/jpsoft/smart/modules/base/service/WarningPusherService.java
  9. 70 0
      common/src/main/java/com/jpsoft/smart/modules/base/service/impl/AlarmConfigServiceImpl.java
  10. 6 0
      common/src/main/java/com/jpsoft/smart/modules/base/service/impl/PersonDeviceFilterLogServiceImpl.java
  11. 5 0
      common/src/main/java/com/jpsoft/smart/modules/base/service/impl/WarningPusherServiceImpl.java
  12. 28 2
      common/src/main/java/com/jpsoft/smart/modules/common/utils/WechatMessageUtil.java
  13. 105 0
      common/src/main/resources/mapper/base/AlarmConfig.xml
  14. 13 1
      common/src/main/resources/mapper/base/PersonDeviceFilterLog.xml
  15. 3 0
      common/src/main/resources/mapper/base/WarningPusher.xml
  16. 5 0
      lapi/src/main/resources/application-dev.yml
  17. 1 0
      lapi/src/main/resources/application.yml
  18. 2 0
      web/src/main/java/com/jpsoft/smart/SmartCommunityServerApplication.java
  19. 1 1
      web/src/main/java/com/jpsoft/smart/modules/business/task/RechargeTask.java
  20. 127 0
      web/src/main/java/com/jpsoft/smart/schduled/AlarmTask.java

+ 1 - 3
common/src/main/java/com/jpsoft/smart/config/WxConfig.java

@@ -9,11 +9,9 @@ import org.springframework.stereotype.Component;
  * @date 2020-3-21 13:42
  */
 @Component
-@ConfigurationProperties(prefix = "wx")
+@ConfigurationProperties(prefix = "wx.pay")
 @Data
 public class WxConfig {
-
     private String appId;
-
     private String appSecret;
 }

+ 18 - 0
common/src/main/java/com/jpsoft/smart/modules/base/dao/AlarmConfigDAO.java

@@ -0,0 +1,18 @@
+package com.jpsoft.smart.modules.base.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.smart.modules.base.entity.AlarmConfig;
+import java.util.Map;
+import com.jpsoft.smart.modules.common.dto.Sort;
+
+@Repository
+public interface AlarmConfigDAO {
+	int insert(AlarmConfig entity);
+	int update(AlarmConfig entity);
+	int exist(String id);
+	AlarmConfig get(String id);
+	int delete(String id);
+	List<AlarmConfig> list();
+	List<AlarmConfig> search(Map<String, Object> searchParams, List<Sort> sortList);
+}

+ 2 - 0
common/src/main/java/com/jpsoft/smart/modules/base/dao/PersonDeviceFilterLogDAO.java

@@ -45,4 +45,6 @@ public interface PersonDeviceFilterLogDAO {
     PersonDeviceFilterLog get(Long id);
 
     long countByTimeRangeAndCompanyCode(String companyCode,int status, Date startDate, Date endDate);
+
+    List<PersonInfo> queryUnmeasuredList(String companyId, Date startTime, Date endTime);
 }

+ 2 - 0
common/src/main/java/com/jpsoft/smart/modules/base/dao/WarningPusherDAO.java

@@ -15,4 +15,6 @@ public interface WarningPusherDAO {
 	int delete(String id);
 	List<WarningPusher> list();
 	List<WarningPusher> search(Map<String,Object> searchParams,List<Sort> sortList);
+
+    List<WarningPusher> findByCompanyId(String companyId);
 }

+ 70 - 0
common/src/main/java/com/jpsoft/smart/modules/base/entity/AlarmConfig.java

@@ -0,0 +1,70 @@
+package com.jpsoft.smart.modules.base.entity;
+
+import java.util.Date;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+/**
+ * 描述:base_alarm_config的实体类
+ */
+@Data
+@ApiModel(value = "base_alarm_config的实体类")
+public class AlarmConfig {
+    /**
+     *主键
+     */
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 单位编号
+     */
+    @ApiModelProperty(value = "单位编号")
+    private String companyId;
+    /**
+     * 星期几提醒,可以设置多个
+     */
+    @ApiModelProperty(value = "星期几提醒,可以设置多个")
+    private String weekdays;
+    /**
+     * 几时几分开始
+     */
+    @ApiModelProperty(value = "几时几分开始")
+    private String startTime;
+    /**
+     * 几时几分结束
+     */
+    @ApiModelProperty(value = "几时几分结束")
+    private String endTime;
+    /**
+     * 是否删除
+     */
+    @ApiModelProperty(value = "是否删除")
+    private Boolean delFlag;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+}

+ 17 - 0
common/src/main/java/com/jpsoft/smart/modules/base/service/AlarmConfigService.java

@@ -0,0 +1,17 @@
+package com.jpsoft.smart.modules.base.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.smart.modules.base.entity.AlarmConfig;
+import com.github.pagehelper.Page;
+import com.jpsoft.smart.modules.common.dto.Sort;
+
+public interface AlarmConfigService {
+	AlarmConfig get(String id);
+	boolean exist(String id);
+	int insert(AlarmConfig model);
+	int update(AlarmConfig model);
+	int delete(String id);
+	List<AlarmConfig> list();
+	Page<AlarmConfig> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
+}

+ 3 - 0
common/src/main/java/com/jpsoft/smart/modules/base/service/PersonDeviceFilterLogService.java

@@ -3,6 +3,7 @@ package com.jpsoft.smart.modules.base.service;
 import cn.hutool.json.JSONObject;
 import com.github.pagehelper.Page;
 import com.jpsoft.smart.modules.base.entity.PersonDeviceFilterLog;
+import com.jpsoft.smart.modules.base.entity.PersonInfo;
 import com.jpsoft.smart.modules.common.dto.Sort;
 
 import java.math.BigDecimal;
@@ -45,4 +46,6 @@ public interface PersonDeviceFilterLogService {
     PersonDeviceFilterLog get(Long id);
 
     long countByTimeRangeAndCompanyCode(String companyCode,int status,Date startTime, Date endTime);
+
+    List<PersonInfo> queryUnmeasuredList(String companyId, Date startTime, Date endTime);
 }

+ 2 - 0
common/src/main/java/com/jpsoft/smart/modules/base/service/WarningPusherService.java

@@ -14,4 +14,6 @@ public interface WarningPusherService {
 	int delete(String id);
 	List<WarningPusher> list();
 	Page<WarningPusher> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,boolean count,List<Sort> sortList);
+
+    List<WarningPusher> findByCompanyId(String companyId);
 }

+ 70 - 0
common/src/main/java/com/jpsoft/smart/modules/base/service/impl/AlarmConfigServiceImpl.java

@@ -0,0 +1,70 @@
+package com.jpsoft.smart.modules.base.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.smart.modules.base.dao.AlarmConfigDAO;
+import com.jpsoft.smart.modules.base.entity.AlarmConfig;
+import com.jpsoft.smart.modules.base.service.AlarmConfigService;
+import com.github.pagehelper.Page;
+import com.jpsoft.smart.modules.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="alarmConfigService")
+public class AlarmConfigServiceImpl implements AlarmConfigService {
+	@Resource(name="alarmConfigDAO")
+	private AlarmConfigDAO alarmConfigDAO;
+
+	@Override
+	public AlarmConfig get(String id) {
+		// TODO Auto-generated method stub
+		return alarmConfigDAO.get(id);
+	}
+
+	@Override
+	public int insert(AlarmConfig model) {
+		// TODO Auto-generated method stub
+		//model.set${PkFieldName}(UUID.randomUUID().toString());
+		
+		return alarmConfigDAO.insert(model);
+	}
+
+	@Override
+	public int update(AlarmConfig model) {
+		// TODO Auto-generated method stub
+		return alarmConfigDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return alarmConfigDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = alarmConfigDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<AlarmConfig> list() {
+		// TODO Auto-generated method stub
+		return alarmConfigDAO.list();
+	}
+		
+	@Override
+	public Page<AlarmConfig> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,boolean count,List<Sort> sortList) {
+        Page<AlarmConfig> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+            alarmConfigDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+}

+ 6 - 0
common/src/main/java/com/jpsoft/smart/modules/base/service/impl/PersonDeviceFilterLogServiceImpl.java

@@ -8,6 +8,7 @@ import com.jpsoft.smart.config.OSSConfig;
 import com.jpsoft.smart.modules.base.dao.PersonDeviceFilterLogDAO;
 import com.jpsoft.smart.modules.base.dao.PersonDeviceLogDAO;
 import com.jpsoft.smart.modules.base.entity.PersonDeviceFilterLog;
+import com.jpsoft.smart.modules.base.entity.PersonInfo;
 import com.jpsoft.smart.modules.base.service.PersonDeviceFilterLogService;
 import com.jpsoft.smart.modules.common.dto.Sort;
 import com.jpsoft.smart.modules.common.utils.LApiUtil;
@@ -191,4 +192,9 @@ public class PersonDeviceFilterLogServiceImpl implements PersonDeviceFilterLogSe
     public List<Map<String, Object>> unusualStatistics(String companyCode, BigDecimal temperature, Date startDate, Date endDate) {
         return personDeviceFilterLogDAO.unusualStatistics(companyCode,temperature,startDate,endDate);
     }
+
+    @Override
+    public List<PersonInfo> queryUnmeasuredList(String companyId, Date startTime, Date endTime) {
+        return personDeviceFilterLogDAO.queryUnmeasuredList(companyId,startTime,endTime);
+    }
 }

+ 5 - 0
common/src/main/java/com/jpsoft/smart/modules/base/service/impl/WarningPusherServiceImpl.java

@@ -67,4 +67,9 @@ public class WarningPusherServiceImpl implements WarningPusherService {
         
         return page;
 	}
+
+	@Override
+	public List<WarningPusher> findByCompanyId(String companyId) {
+		return warningPusherDAO.findByCompanyId(companyId);
+	}
 }

+ 28 - 2
common/src/main/java/com/jpsoft/smart/modules/common/utils/WechatMessageUtil.java

@@ -401,16 +401,42 @@ public class WechatMessageUtil {
 		keyword2.put("value", place);
 		keyword2.put("color", "#173177");
 
+		String remarkStr = "发现有一例体温异常情况,点击查看详情";
 
+		JSONObject remark = new JSONObject();
+		remark.put("value", remarkStr);
+		remark.put("color", "#173177");
 
+		sendData.put("first", first);
+		sendData.put("keyword1", keyword1);
+		sendData.put("keyword2", keyword2);
+		sendData.put("remark", remark);
 
+		//w8Zk_VQMFIEVSIBPZid7zSrvHmBdrgnqF76u8PLCZEs cs
+		boolean ret = sendTemplate(sendData, appId,appSecret,templateId,openId, TEMPERATURE_ALARM_PRE_URL);
 
-		String remarkStr = "发现有一例体温异常情况,点击查看详情";
+		return ret;
+	}
 
+	public static boolean sendUnmeasureAlarmInfo(String openId,String companyName,String message,String appId,String appSecret) {
+		String templateId = "Mg9Ldk_kaoHAUwXFHEatrGugTlOz3yrMmMk7VoBca4M";
 
+		JSONObject sendData = new JSONObject();
+
+		JSONObject first = new JSONObject();
+		first.put("value", "未测量体温提醒");
+		first.put("color", "#FF0000");
+
+		JSONObject keyword1 = new JSONObject();
+		keyword1.put("value", DateUtil.format(new Date(), "yyyy-MM-dd HH:mm"));
+		keyword1.put("color", "#173177");
+
+		JSONObject keyword2 = new JSONObject();
+		keyword2.put("value", companyName);
+		keyword2.put("color", "#173177");
 
 		JSONObject remark = new JSONObject();
-		remark.put("value", remarkStr);
+		remark.put("value", message);
 		remark.put("color", "#173177");
 
 		sendData.put("first", first);

+ 105 - 0
common/src/main/resources/mapper/base/AlarmConfig.xml

@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.smart.modules.base.dao.AlarmConfigDAO">
+    <resultMap id="AlarmConfigMap" type="com.jpsoft.smart.modules.base.entity.AlarmConfig">
+        <result property="id" column="id_"/>
+        <result property="companyId" column="company_id"/>
+        <result property="weekdays" column="weekdays_"/>
+        <result property="startTime" column="start_time"/>
+        <result property="endTime" column="end_time"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+    <insert id="insert" parameterType="com.jpsoft.smart.modules.base.entity.AlarmConfig">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="${pkFieldName}">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into base_alarm_config
+	    (id_,company_id,weekdays_,start_time,end_time,del_flag,create_by,create_time,update_by,update_time)
+		values
+		(
+            #{id,jdbcType=VARCHAR}
+            ,#{companyId,jdbcType=VARCHAR}
+            ,#{weekdays,jdbcType=VARCHAR}
+            ,#{startTime,jdbcType=VARCHAR}
+            ,#{endTime,jdbcType=VARCHAR}
+            ,#{delFlag,jdbcType= NUMERIC }
+            ,#{createBy,jdbcType=VARCHAR}
+            ,#{createTime,jdbcType= TIMESTAMP }
+            ,#{updateBy,jdbcType=VARCHAR}
+            ,#{updateTime,jdbcType= TIMESTAMP }
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from base_alarm_config where ${pkField.columnName}=#{$pkFieldName,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="com.jpsoft.smart.modules.base.entity.AlarmConfig">
+        update base_alarm_config
+        <set>
+            <if test="id!=null">
+                id_=#{id,jdbcType=VARCHAR},
+            </if>
+            <if test="companyId!=null">
+                company_id=#{companyId,jdbcType=VARCHAR},
+            </if>
+            <if test="weekdays!=null">
+                weekdays_=#{weekdays,jdbcType=VARCHAR},
+            </if>
+            <if test="startTime!=null">
+                start_time=#{startTime,jdbcType=VARCHAR},
+            </if>
+            <if test="endTime!=null">
+                end_time=#{endTime,jdbcType=VARCHAR},
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+        </set>
+        where ${pkField.ColumnName}=#{$pkFieldName}
+    </update>
+    <select id="get" parameterType="string" resultMap="AlarmConfigMap">
+        select
+        id_,company_id,weekdays_,start_time,end_time,del_flag,create_by,create_time,update_by,update_time from
+        base_alarm_config where ${pkField.ColumnName}=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from base_alarm_config where ${pkField.ColumnName}=#{0}
+    </select>
+    <select id="list" resultMap="AlarmConfigMap">
+        select * from base_alarm_config where del_flag=0
+    </select>
+    <select id="search" parameterType="hashmap" resultMap="AlarmConfigMap">
+        <![CDATA[
+			select * from base_alarm_config
+		]]>
+        <where>
+            <if test="searchParams.id != null">
+                and ID_ like #{searchParams.id}
+            </if>
+        </where>
+        <foreach item="sort" collection="sortList" open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+</mapper>

+ 13 - 1
common/src/main/resources/mapper/base/PersonDeviceFilterLog.xml

@@ -239,9 +239,21 @@
         ]]>
         </if>
         <if test="status==1">
-            <![CDATA[
+        <![CDATA[
             and a.temperature_<37
         ]]>
         </if>
     </select>
+    <select id="queryUnmeasuredList" resultMap="com.jpsoft.smart.modules.base.dao.PersonInfoDAO.PersonInfoMap">
+        <![CDATA[
+            select * from base_person_info
+            where company_id=#{companyId}
+            and del_flag=0
+            and id_ not in (
+                select person_id from base_person_device_filter_log
+                where record_time>=#{startTime}
+                and record_time <= #{endTime}
+            )
+        ]]>
+    </select>
 </mapper>

+ 3 - 0
common/src/main/resources/mapper/base/WarningPusher.xml

@@ -114,4 +114,7 @@
             ${sort.name} ${sort.order}
         </foreach>
     </select>
+    <select id="findByCompanyId" resultMap="WarningPusherMap">
+        select * from base_warning_pusher where company_id=#{companyId}
+    </select>
 </mapper>

+ 5 - 0
lapi/src/main/resources/application-dev.yml

@@ -14,3 +14,8 @@ spring:
 logger:
   level: WARN
   dir: E:\mye\WORK\wisdowHouse
+
+wx:
+  pay:
+    appId: wx0b3c41a903053808
+    appSecret: 43557bd62f77b0c3d6670e991872f0e7

+ 1 - 0
lapi/src/main/resources/application.yml

@@ -96,3 +96,4 @@ oss:
   urlPrefix: http://rccs.oss-cn-hangzhou.aliyuncs.com
   objectPre: smart
 
+

+ 2 - 0
web/src/main/java/com/jpsoft/smart/SmartCommunityServerApplication.java

@@ -6,10 +6,12 @@ import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.builder.SpringApplicationBuilder;
 import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
 
 @SpringBootApplication
 @EnableTransactionManagement
+@EnableScheduling
 @MapperScan("com.jpsoft.smart.**.dao")
 public class SmartCommunityServerApplication extends SpringBootServletInitializer {
 

+ 1 - 1
web/src/main/java/com/jpsoft/smart/modules/business/task/RechargeTask.java

@@ -28,7 +28,7 @@ public class RechargeTask {
     @Autowired
     private ElectricClientInfoService electricClientInfoService;
 
-    @Scheduled(cron = "0/30 * * * * *")
+//    @Scheduled(cron = "0/30 * * * * *")
     public void recharge(){
         Map<String,Object> searchParams = new HashMap<>();
 

+ 127 - 0
web/src/main/java/com/jpsoft/smart/schduled/AlarmTask.java

@@ -0,0 +1,127 @@
+package com.jpsoft.smart.schduled;
+
+import com.jpsoft.smart.config.WxConfig;
+import com.jpsoft.smart.modules.base.entity.*;
+import com.jpsoft.smart.modules.base.service.AlarmConfigService;
+import com.jpsoft.smart.modules.base.service.CompanyInfoService;
+import com.jpsoft.smart.modules.base.service.PersonDeviceFilterLogService;
+import com.jpsoft.smart.modules.base.service.WarningPusherService;
+import com.jpsoft.smart.modules.common.utils.WechatMessageUtil;
+import com.jpsoft.smart.modules.common.utils.WeixinUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.joda.time.DateTime;
+import org.joda.time.Minutes;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+@Component
+@Slf4j
+public class AlarmTask {
+    @Autowired
+    private AlarmConfigService alarmConfigService;
+
+    @Autowired
+    private WarningPusherService warningPusherService;
+
+    @Autowired
+    private PersonDeviceFilterLogService personDeviceFilterLogService;
+
+    @Autowired
+    private CompanyInfoService companyInfoService;
+
+    @Autowired
+    private WxConfig wxConfig;
+
+    //每5分钟执行一次
+    @Scheduled(cron="0 0/5 * * * ?")
+    public void run() {
+        int intervalMinute = 5;
+
+        List<AlarmConfig> configList = alarmConfigService.list();
+
+        DateTime now = DateTime.now();
+
+        String date = now.toString("yyyy-MM-dd");
+        int weekday = now.getDayOfWeek();
+
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+
+        for (AlarmConfig alarmConfig : configList) {
+            try {
+                String weekdays = alarmConfig.getWeekdays();
+                DateTime startTime = new DateTime(sdf.parse(date + " " + alarmConfig.getStartTime()));
+                DateTime endTime = new DateTime(sdf.parse(date + " " + alarmConfig.getEndTime()));
+
+                if (weekdays.indexOf(String.valueOf(weekday)) != -1) {
+                    if (now.compareTo(endTime)>=0) {
+                        int minutes = Minutes.minutesBetween(endTime,now).getMinutes();
+
+                        if (minutes<=intervalMinute){
+                            //todo 进行通知
+                            notice(alarmConfig.getCompanyId(),startTime,endTime);
+
+                            break;
+                        }
+                    }
+                }
+            }
+            catch (Exception ex){
+                log.error(ex.getMessage(),ex);
+            }
+        }
+    }
+
+    private void notice(String companyId, DateTime startTime, DateTime endTime) {
+        CompanyInfo companyInfo = companyInfoService.get(companyId);
+
+        //todo 查询该单位当前时间段是否有人员未测体温
+        List<PersonInfo> unmeasuredList = personDeviceFilterLogService.queryUnmeasuredList(companyId,startTime.toDate(),endTime.toDate());
+
+        if (unmeasuredList.size()==0){
+            return;
+        }
+
+        StringBuilder sb = new StringBuilder();
+        int total = 0;
+
+        //todo 给未测量人推送微信通知
+        for (PersonInfo personInfo : unmeasuredList) {
+            if (StringUtils.isNotEmpty(personInfo.getOpenId())) {
+                String message = "尊敬的用户:" + personInfo.getName()
+                        + ",您未在" + startTime.toString("HH:mm") + "至" + endTime.toString("HH:mm") + "测量体温,请及时补测!";
+
+                if (sb.length() != 0) {
+                    sb.append(",");
+                }
+
+                sb.append(personInfo.getName());
+
+                WechatMessageUtil.sendUnmeasureAlarmInfo(personInfo.getOpenId(), companyInfo.getName(), message, wxConfig.getAppId(), wxConfig.getAppSecret());
+            }
+
+            total++;
+        }
+
+        //todo 查询该单位的通知人
+        List<WarningPusher> pusherList = warningPusherService.findByCompanyId(companyId);
+
+        //todo 给单位相关人员推送通知
+        for (WarningPusher pusher: pusherList) {
+            if (StringUtils.isNotEmpty(pusher.getOpenId())) {
+                String message = "尊敬的用户:" + pusher.getName()
+                        + ",当天时段" + startTime.toString("HH:mm") + "至" + endTime.toString("HH:mm")
+                        + ",有" + total + "人未测量体温。名单如下:" + sb.toString();
+
+                WechatMessageUtil.sendUnmeasureAlarmInfo(
+                        pusher.getOpenId(),
+                        companyInfo.getName(),
+                        message, wxConfig.getAppId(), wxConfig.getAppSecret());
+            }
+        }
+    }
+}