Переглянути джерело

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

LAPTOP-KB9HII50\70708 2 роки тому
батько
коміт
d48b2fcb7d
25 змінених файлів з 661 додано та 22 видалено
  1. 28 0
      common/common-entity/sql记录
  2. 2 0
      common/common-entity/src/main/java/com/yihu/jw/entity/hospital/message/SystemMessageDO.java
  3. 83 0
      common/common-entity/src/main/java/com/yihu/jw/entity/log/BasePatientPadPushOnOffEntity.java
  4. 13 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/log/BasePatientPadPushOnOffDao.java
  5. 13 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/ManageMessagePush/ManageSystemPushMessageController.java
  6. 70 7
      svr/svr-base/src/main/java/com/yihu/jw/base/service/ManageMessagePush/ManageSystemPushMessageService.java
  7. 19 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/log/BasePatientPadPushOnOffDao.java
  8. 7 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/doctor/DoctorBirthdayWishesEndpoint.java
  9. 45 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/message/PatientMessageEndpoint.java
  10. 21 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/message/PatientMessageService.java
  11. 6 3
      svr/svr-cloud-device/src/main/java/com/yihu/jw/care/service/DeviceUploadService.java
  12. 19 0
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/event/ApplicationEvent.java
  13. 1 0
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/job/device/DeviceOffLoneJob.java
  14. 1 0
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/job/device/DeviceWatchOffWearJob.java
  15. 3 2
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/job/device/DeviceWatchRemainingPowerJob.java
  16. 1 1
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/job/pushRecord/PushRecordJob.java
  17. 41 0
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/job/pushRecord/PushTimeIntegerPointJob.java
  18. 42 0
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/job/pushRecord/PushWeatherForecastJob.java
  19. 1 0
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/service/device/PatientDeviceService.java
  20. 55 0
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/service/message/PushTimeIntegerPointService.java
  21. 72 0
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/service/message/PushWeatherForecastService.java
  22. 13 0
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/util/DateUtil.java
  23. 15 6
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/util/DeviceLostMessageUtil.java
  24. 83 0
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/util/SystemPushMessageUtil.java
  25. 7 3
      svr/svr-cloud-job/src/main/resources/system.properties

+ 28 - 0
common/common-entity/sql记录

@ -2001,6 +2001,34 @@ CREATE TABLE `base_child_manage` (
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='幼儿管理\r\n';
-- 2022-07-27 wsl
INSERT INTO `base`.`wlyy_hospital_sys_dict`(`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('pushOnOff7', NULL, 'pushOnOff', '7', '天气预报', 'true', 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict`(`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('pushOnOff8', NULL, 'pushOnOff', '8', '整点报时', 'true', 8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict`(`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('pushMessageType7', NULL, 'pushMessageType', '7', '天气预报', NULL, 8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict`(`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('pushMessageType8', NULL, 'pushMessageType', '8', '整点报时', NULL, 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict`(`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('padMessageSubscribe1', NULL, 'padMessageSubscribe', '1', '时间整点报时', 'false', 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict`(`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('padMessageSubscribe2', NULL, 'padMessageSubscribe', '2', '智能安居设备状态播报(必选)', 'false', 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict`(`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('padMessageSubscribe3', NULL, 'padMessageSubscribe', '3', '体征测量消息', 'false', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict`(`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('padMessageSubscribe4', NULL, 'padMessageSubscribe', '4', '用药提醒', 'false', 4, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict`(`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('padMessageSubscribe5', NULL, 'padMessageSubscribe', '5', '天气预报', 'false', 5, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict`(`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('padMessageSubscribe6', NULL, 'padMessageSubscribe', '6', '服务预约提醒', 'false', 6, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict`(`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('padMessageSubscribe7', NULL, 'padMessageSubscribe', '7', '生日祝福提醒', 'false', 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict`(`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('padMessageSubscribe8', NULL, 'padMessageSubscribe', '8', '热点新闻播报', 'false', 8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
CREATE TABLE `base_patient_pad_pushonoff` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `patient` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '居民code',
  `type` int(3) DEFAULT NULL COMMENT '推送类型 ',
  `type_name` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '推送类型名字 ',
  `on_off` int(1) DEFAULT NULL COMMENT '开关状态 0 关 1开',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='居民pad推送开关';
-- 2022-07-27
alter table base_daily_report_detail add column doubt TINYINT(2) default null COMMENT '疑惑0无疑惑1存疑';
alter table base_daily_report_detail add column doubt_state TINYINT(2) default null COMMENT '疑惑核实状态0未核实1已核实';

+ 2 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/message/SystemMessageDO.java

@ -32,6 +32,8 @@ public class SystemMessageDO extends UuidIdentityEntity {
     * 智能手表电量提示 992
     * 报警器电量提示 993
     * 设备离线提示 994   推送给 老人Pad
     * 天气预报 995
     * 整点定时发送 996
     * 人工手动系统推送 999
     */
    private String type;

+ 83 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/log/BasePatientPadPushOnOffEntity.java

@ -0,0 +1,83 @@
package com.yihu.jw.entity.log;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by wsl on 2022/7/28
 */
@Entity
@Table(name = "base_patient_pad_pushonoff")
public class BasePatientPadPushOnOffEntity extends IdEntity {
    private String patient;  //居民code
    private Integer type;  //推送类型
    //1	时间整点报时
    //2	智能安居设备状态播报(必选)
    //3	体征测量消息
    //4	用药提醒
    //5	天气预报
    //6	服务预约提醒
    //7	生日祝福提醒
    //8	热点新闻播报
    private String typeName;  //推送类型名字
    private Integer onOff;  //开关状态 0 关 1开
    private Date createTime;  //创建时间
    @Column(name = "patient")
    public String getPatient() {
        return patient;
    }
    public void setPatient(String patient) {
        this.patient = patient;
    }
    @Column(name = "type")
    public Integer getType() {
        return type;
    }
    public void setType(Integer type) {
        this.type = type;
    }
    @Column(name = "type_name")
    public String getTypeName() {
        return typeName;
    }
    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }
    @Column(name = "on_off")
    public Integer getOnOff() {
        return onOff;
    }
    public void setOnOff(Integer onOff) {
        this.onOff = onOff;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 13 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/log/BasePatientPadPushOnOffDao.java

@ -0,0 +1,13 @@
package com.yihu.jw.base.dao.log;
import com.yihu.jw.entity.log.BasePatientPadPushOnOffEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by wsl on 2022/7/28
 */
public interface BasePatientPadPushOnOffDao extends PagingAndSortingRepository<BasePatientPadPushOnOffEntity, String>, JpaSpecificationExecutor<BasePatientPadPushOnOffEntity> {
}

+ 13 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/ManageMessagePush/ManageSystemPushMessageController.java

@ -116,5 +116,18 @@ public class ManageSystemPushMessageController extends EnvelopRestEndpoint {
    }
    @ApiOperation("初始化居民推送开关")
    @PostMapping(value = "/patientPushOnOff")
    public Envelop patientPushOnOff(){
        try {
            mspmservice.patientPushOnOff();
            return success("成功!");
        } catch (Exception e) {
            e.printStackTrace();
            return failed("初始化失败!",500);
        }
    }
}

+ 70 - 7
svr/svr-base/src/main/java/com/yihu/jw/base/service/ManageMessagePush/ManageSystemPushMessageService.java

@ -1,12 +1,15 @@
package com.yihu.jw.base.service.ManageMessagePush;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.yihu.jw.base.dao.log.BasePatientPadPushOnOffDao;
import com.yihu.jw.base.dao.log.BasePushRecordLogDao;
import com.yihu.jw.base.dao.log.BasePushrecordLogInfoDao;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.entity.log.BasePatientPadPushOnOffEntity;
import com.yihu.jw.entity.log.BasePushRecordLogEntity;
import com.yihu.jw.entity.log.BasePushrecordLogInfoEntity;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
@ -44,6 +47,8 @@ public class ManageSystemPushMessageService {
    @Autowired
    private BasePushrecordLogInfoDao basePushrecordLogInfoDao;
    @Autowired
    private BasePatientPadPushOnOffDao basePatientPadPushOnOffDao;
    @Autowired
    private WlyyHospitalSysDictDao dictDao;
    @Autowired
    private RestTemplate restTemplate;
@ -209,6 +214,70 @@ public class ManageSystemPushMessageService {
        basePushRecordLogDao.delete(id);
    }
    //初始化居民推送开关
    @Transactional(rollbackFor = Exception.class)
    public String patientPushOnOff(){
        JSONObject jsonObject = new JSONObject();
        JSONArray jsonArray = new JSONArray();
        jsonObject.put("1","时间整点报时");
        jsonArray.add(jsonObject);
        jsonObject.put("2","智能安居设备状态播报(必选)");
        jsonArray.add(jsonObject);
        jsonObject.put("3","体征测量消息");
        jsonArray.add(jsonObject);
        jsonObject.put("4","用药提醒");
        jsonArray.add(jsonObject);
        jsonObject.put("5","天气预报");
        jsonArray.add(jsonObject);
        jsonObject.put("6","服务预约提醒");
        jsonArray.add(jsonObject);
        jsonObject.put("7","生日祝福提醒");
        jsonArray.add(jsonObject);
        jsonObject.put("8","热点新闻播报");
        jsonArray.add(jsonObject);
        String sql = "SELECT p.id FROM  base_patient p WHERE  p.sign_status = 1 AND p.del = 1  ";
        List<String> patientList = jdbcTemplate.queryForList(sql, String.class);
        List<BasePatientPadPushOnOffEntity> onOffEntityList = new ArrayList<>();
        patientList.forEach(patientId -> {
            for (int i = 1; i <= jsonArray.size(); i++) {
                BasePatientPadPushOnOffEntity onOffEntity = new BasePatientPadPushOnOffEntity();
                onOffEntity.setPatient(patientId);
                onOffEntity.setType(i);
                onOffEntity.setTypeName(jsonArray.getJSONObject(0).getString(i+""));
                if (jsonArray.getJSONObject(0).getString(i+"").equals("智能安居设备状态播报(必选)")){
                    onOffEntity.setOnOff(1);
                }else {
                    onOffEntity.setOnOff(0);
                }
                onOffEntity.setCreateTime(new Date());
                onOffEntityList.add(onOffEntity);
            }
        });
        
        basePatientPadPushOnOffDao.save(onOffEntityList);
        return null;
    }
    //推送开关修改
    public void pushOnOff(String id,String dictName,String pyCode) {
        dictDao.updatePyCode(pyCode,id,dictName);
    }
    private void SystemMessageDOListSave(List<BasePatientDO> basePatientDOS,String content){
        List<SystemMessageDO> messageDOS = new ArrayList<>();
        for (BasePatientDO basePatientDO : basePatientDOS) {
@ -238,6 +307,7 @@ public class ManageSystemPushMessageService {
    }
    //处理名字
    private String  nameStringHandle(List<BasePatientDO> basePatientDOS){
        String names = "";
@ -250,13 +320,6 @@ public class ManageSystemPushMessageService {
    }
    //推送开关修改
    public void pushOnOff(String id,String dictName,String pyCode) {
        dictDao.updatePyCode(pyCode,id,dictName);
    }
    //腾讯语音
    private String audioUrl(String content){
        ResponseEntity<String> forEntity = restTemplate.getForEntity("http://svr-cloud-care/common/open/wordToVoice?text={1}", String.class, content);

+ 19 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/log/BasePatientPadPushOnOffDao.java

@ -0,0 +1,19 @@
package com.yihu.jw.care.dao.log;
import com.yihu.jw.entity.log.BasePatientPadPushOnOffEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by wsl on 2022/7/28
 */
public interface BasePatientPadPushOnOffDao extends PagingAndSortingRepository<BasePatientPadPushOnOffEntity, String>, JpaSpecificationExecutor<BasePatientPadPushOnOffEntity> {
    @Modifying
    @Query("update BasePatientPadPushOnOffEntity a set a.onOff =?3 where a.patient=?1 and a.type = ?2")
    void updPushOnOff(String patient,Integer type,Integer onOff);
}

+ 7 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/doctor/DoctorBirthdayWishesEndpoint.java

@ -23,6 +23,7 @@ import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
@ -286,6 +287,12 @@ public class DoctorBirthdayWishesEndpoint extends BaseController {
        birthDayWishesToPatient.stream().forEach(one -> {
            //根据openid进行发送祝福
            String patient = one.getPatientCode();
            //判断居民是否开启开关
            String patientOnOffSql = "select on_off from base_patient_pad_pushonoff where patient = '" + patient + "' and type = 7";
            Integer integer = jdbcTemplate.queryForObject(patientOnOffSql, new BeanPropertyRowMapper<>(Integer.class));
            if (!(integer==0?false:true)){
                return;
            }
            if (StringUtils.isNotBlank(patient)){
                String sql = " select p.id as patient,p.name,we.openid from base_patient p Left join  base_patient_wechat we on p.id = we.patient_id " +
                        "where p.id = '"+patient+"' " +

+ 45 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/message/PatientMessageEndpoint.java

@ -15,6 +15,9 @@ import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
 * Created by Bing on 2021/5/19.
 */
@ -159,6 +162,48 @@ public class PatientMessageEndpoint extends EnvelopRestEndpoint {
        }catch (Exception e){
            return failedException2(e);
        }
    }
/*
1	时间整点报时
2	智能安居设备状态播报(必选)
3	体征测量消息
4	用药提醒
5	天气预报
6	服务预约提醒
7	生日祝福提醒
8	热点新闻播报*/
    @PostMapping(value = "/patientPadPushOnOffUpd")
    @ApiOperation("修改居民推送开关")
    public Envelop patientPadPushOnOffUpd(@ApiParam(name = "patient",required = true)
                                          @RequestParam(value = "patient")String patient,
                                          @ApiParam(name = "type",value = "以数据库为主 base_patient_pad_pushonoff ",required = true)
                                          @RequestParam(value = "type")Integer type,
                                          @ApiParam(name = "onOff",required = true)
                                          @RequestParam(value = "onOff")Integer onOff){
        try {
            patientMessageService.patientPadPushOnOffUpd(patient,type,onOff);
            return Envelop.getSuccess("修改成功!");
        } catch (Exception e) {
            e.printStackTrace();
            return failedException2(e);
        }
    }
    @GetMapping(value = "/patientPadPushOnOff")
    @ApiOperation(value = "获取居民推送开关")
    public ListEnvelop patientPadPushOnOff(@ApiParam(name ="patient",required =true)
                                           @RequestParam(value = "patient")String patient){
        try {
            List<Map<String, Object>> list = patientMessageService.patientPadPushOnOff(patient);
            return success("获取成功",200,list);
        } catch (Exception e) {
            e.printStackTrace();
            return failedListEnvelopException2(e);
        }
    }
}

+ 21 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/message/PatientMessageService.java

@ -3,6 +3,7 @@ package com.yihu.jw.care.service.message;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.dao.device.PatientSafeAreaConfirmDao;
import com.yihu.jw.care.dao.device.PatientSafeAreaDao;
import com.yihu.jw.care.dao.log.BasePatientPadPushOnOffDao;
import com.yihu.jw.care.dao.message.OrgNoticeDao;
import com.yihu.jw.care.dao.message.UserNoticeDao;
import com.yihu.jw.care.dao.security.BaseEmergencyWarnLogDao;
@ -54,6 +55,8 @@ public class PatientMessageService {
    private PatientDeviceService patientDeviceService;
    @Autowired
    private EmergencyAssistanceService emergencyAssistanceService;
    @Autowired
    private BasePatientPadPushOnOffDao basePatientPadPushOnOffDao;
    public PageEnvelop getNoticeList(String patient,String beginTime, String endTime, int page, int size){
        page = page>0?page-1:0;
@ -229,4 +232,22 @@ public class PatientMessageService {
        result.put(ResponseContant.resultMsg,"已确认");
        return result;
    }
    //pad端 获取居民推送开关
    public List<Map<String, Object>> patientPadPushOnOff(String patient){
        String sql = "select patient,type,type_name,on_off from base_patient_pad_pushonoff where patient ='"+patient+"'";
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        return list;
    }
    //pad端 修改居民推送开关
    @Transactional(rollbackFor = Exception.class)
    public void patientPadPushOnOffUpd(String patient, Integer type, Integer onOff) {
        basePatientPadPushOnOffDao.updPushOnOff(patient, type, onOff);
    }
}

+ 6 - 3
svr/svr-cloud-device/src/main/java/com/yihu/jw/care/service/DeviceUploadService.java

@ -28,6 +28,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
@ -167,10 +168,12 @@ public class DeviceUploadService {
                }
                if (StringUtils.isNotBlank(typeName)){
                    String sql = "SELECT py_code FROM wlyy_hospital_sys_dict WHERE dict_name = 'pushOnOff' AND dict_code ='"+6+"' ";
                    String onOff= jdbcTemplate.queryForObject(sql,String.class);
                    String adminSql = "SELECT py_code FROM wlyy_hospital_sys_dict WHERE dict_name = 'pushOnOff' AND dict_code ='"+6+"' ";
                    String onOff= jdbcTemplate.queryForObject(adminSql,String.class);
                    Boolean kg = Boolean.parseBoolean(onOff);
                    if (kg) {
                    String patientOnOffSql = "select on_off from base_patient_pad_pushonoff where patient = '" + patientDO.getId() + "' and type = 3";
                    Integer integer = jdbcTemplate.queryForObject(patientOnOffSql, new BeanPropertyRowMapper<>(Integer.class));
                    if (kg&&integer==0?false:true) {
                        messageDO.setTitle(typeName);
                        messageDO.setType("42");//42体征设备测量
                        messageDO.setSender("system");

+ 19 - 0
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/event/ApplicationEvent.java

@ -13,6 +13,8 @@ import com.yihu.jw.care.job.order.DailyWaterJob;
import com.yihu.jw.care.job.order.EmeWarnOrderDayJob;
import com.yihu.jw.care.job.order.EmeWarnOrderJob;
import com.yihu.jw.care.job.pushRecord.PushRecordJob;
import com.yihu.jw.care.job.pushRecord.PushTimeIntegerPointJob;
import com.yihu.jw.care.job.pushRecord.PushWeatherForecastJob;
import com.yihu.jw.care.job.sim.GetSimsVoiceFlowDayJob;
import com.yihu.jw.care.job.sim.GetSimsVoiceFlowMonthJob;
import com.yihu.jw.care.job.sim.UpdateSimsJob;
@ -254,6 +256,23 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            }else {
                logger.info("DEVICE_WATCH_REMAINING_POWER_JOB exist");
            }
            //时间整点报时:早上10点到下午18点进行准点播报
            if(!quartzHelper.isExistJob("PUSH_MASSAGE_TIME_INTEGER_POINT_JOB")){
               String trigger =  SystemConf.getInstance().getSystemProperties().getProperty("PUSH_MASSAGE_TIME_INTEGER_POINT_JOB");
               quartzHelper.addJob(PushTimeIntegerPointJob.class,trigger,"PUSH_MASSAGE_TIME_INTEGER_POINT_JOB",new HashMap<String,Object>());
                logger.info("PUSH_MASSAGE_TIME_INTEGER_POINT_JOB success");
            }else {
                logger.info("PUSH_MASSAGE_TIME_INTEGER_POINT_JOB success");
            }
            //天气预报:每天早上11点播报
            if (!quartzHelper.isExistJob("PUSH_MESSAGE_WEATHER_FORECAST_JOB")){
                String trigger =  SystemConf.getInstance().getSystemProperties().getProperty("PUSH_MESSAGE_WEATHER_FORECAST_JOB");
                quartzHelper.addJob(PushWeatherForecastJob.class,trigger,"PUSH_MESSAGE_WEATHER_FORECAST_JOB",new HashMap<String,Object>());
                logger.info("PUSH_MESSAGE_WEATHER_FORECAST_JOB success");
            }else {
                logger.info("PUSH_MESSAGE_WEATHER_FORECAST_JOB success");
            }
        } catch (Exception e) {
            logger.info(" job start failed");

+ 1 - 0
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/job/device/DeviceOffLoneJob.java

@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
/**
 * 设备离线
 * Created by wsl on 2022/7/6
 */
public class DeviceOffLoneJob implements Job {

+ 1 - 0
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/job/device/DeviceWatchOffWearJob.java

@ -10,6 +10,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
 * 手表佩戴
 * Created by wsl on 2022/7/8
 */
public class DeviceWatchOffWearJob implements Job {

+ 3 - 2
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/job/device/DeviceWatchRemainingPowerJob.java

@ -10,6 +10,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
 * 设备电量
 * Created by wsl on 2022/7/8
 */
public class DeviceWatchRemainingPowerJob implements Job {
@ -20,9 +21,9 @@ public class DeviceWatchRemainingPowerJob implements Job {
    private PatientDeviceService patientDeviceService;
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        System.out.println("====================系统推送设备电量低start==================");
        logger.info("DeviceWatchRemainingPowerJob start");
        try {
            System.out.println("====================系统推送设备电量低start==================");
            logger.info("DeviceWatchRemainingPowerJob start");
            patientDeviceService.deviceWatchRemainingPower();
            logger.info("DeviceWatchRemainingPowerJob end");
            System.out.println("====================系统推送设备电量低end==================");

+ 1 - 1
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/job/pushRecord/PushRecordJob.java

@ -83,7 +83,7 @@ public class PushRecordJob implements Job {
                for (SystemMessageDO messageDO : messageDOS) {
                    devicelostMessageUtil.patientMessageSocket(messageDO);
                    devicelostMessageUtil.patientMessageSocket(messageDO,null);
                }
                systemMessageDao.save(messageDOS);
                basePushrecordLogInfoDao.save(logInfoEntityList);

+ 41 - 0
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/job/pushRecord/PushTimeIntegerPointJob.java

@ -0,0 +1,41 @@
package com.yihu.jw.care.job.pushRecord;
import com.yihu.jw.care.service.message.PushTimeIntegerPointService;
import com.yihu.jw.care.util.DeviceLostMessageUtil;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
 * Created by wsl on 2022/7/28
 */
public class PushTimeIntegerPointJob implements Job {
    private static Logger logger = LoggerFactory.getLogger(PushTimeIntegerPointJob.class);
    @Autowired
    private PushTimeIntegerPointService pushTimeIntegerPointService;
    @Autowired
    private DeviceLostMessageUtil deviceLostMessageUtil;
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        try {
            if (deviceLostMessageUtil.messageOnOff(8) ) {
                System.out.println("====================系统推送整点报时start==================");
                logger.info("PushTimeIntegerPointJob start");
                pushTimeIntegerPointService.pushTimeIntegerPoint();
                logger.info("PushTimeIntegerPointJob end");
                System.out.println("====================系统推送整点报时end==================");
            }
        } catch (Exception e) {
            logger.info("PushTimeIntegerPointJob --ERROR MSG:" + e.getMessage());
            e.printStackTrace();
        }
    }
}

+ 42 - 0
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/job/pushRecord/PushWeatherForecastJob.java

@ -0,0 +1,42 @@
package com.yihu.jw.care.job.pushRecord;
import com.yihu.jw.care.service.message.PushWeatherForecastService;
import com.yihu.jw.care.util.DeviceLostMessageUtil;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
 * 天气预报预报
 * Created by wsl on 2022/7/28
 */
public class PushWeatherForecastJob implements Job {
    private static Logger logger = LoggerFactory.getLogger(PushWeatherForecastJob.class);
    @Autowired
    private PushWeatherForecastService pushWeatherForecastService;
    @Autowired
    private DeviceLostMessageUtil deviceLostMessageUtil;
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        try {
            if (deviceLostMessageUtil.messageOnOff(7)) {
                System.out.println("====================系统推送天气预报start==================");
                logger.info("PushWeatherForecastJob start");
                pushWeatherForecastService.weatherForecastS();
                logger.info("PushWeatherForecastJob end");
                System.out.println("====================系统推送天气预报end==================");
            }
        } catch (Exception e) {
            logger.info("PushWeatherForecastJob --ERROR MSG:" + e.getMessage());
            e.printStackTrace();
        }
    }
}

+ 1 - 0
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/service/device/PatientDeviceService.java

@ -356,6 +356,7 @@ public class PatientDeviceService {
                    patients.put("sex",map.get("sex"));
                    patients.put("photo",map.get("photo"));
                    patients.put("category_code",map.get("category_code"));
                    patients.put("deviceSn",map.get("device_sn").toString());
                    rslist.add(patients);
                }
                Thread.sleep(1000);

+ 55 - 0
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/service/message/PushTimeIntegerPointService.java

@ -0,0 +1,55 @@
package com.yihu.jw.care.service.message;
import com.yihu.jw.care.util.DateUtil;
import com.yihu.jw.care.util.DeviceLostMessageUtil;
import com.yihu.jw.care.util.SystemPushMessageUtil;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.hospital.message.dao.SystemMessageDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * Created by wsl on 2022/7/29
 */
@Component
public class PushTimeIntegerPointService {
    @Autowired
    private SystemPushMessageUtil systemPushMessageUtil;
    @Autowired
    private DeviceLostMessageUtil deviceLostMessageUtil;
    @Autowired
    private SystemMessageDao systemMessageDao;
    private static String message = "现在是北京时间{Time}点整";
    public void pushTimeIntegerPoint() {
        int i = DateUtil.integerTime();
        String content = message.replace("{Time}", i + "");
        List<SystemMessageDO> systemMessageDOList = new ArrayList<>();
        List<Map<String, Object>> signOldPatientList = systemPushMessageUtil.signOldPatient();
        String url = deviceLostMessageUtil.audioUrl(content);
        for (Map<String, Object> map : signOldPatientList) {
            String patient = map.get("id").toString();
            if (!systemPushMessageUtil.findPatientPushOnOff(patient,1)){
                continue;
            }
            SystemMessageDO messageDO = systemPushMessageUtil.systemMessageDOSave("整点报时", content,"996","0","system","整点报时通知助手",patient,map.get("name").toString(),"1",map.get("photo").toString(),url);
            /*socket 推送*/
            deviceLostMessageUtil.patientMessageSocket(messageDO,null);
            systemMessageDOList.add(messageDO);
        }
        systemMessageDao.save(systemMessageDOList);
        systemPushMessageUtil.basePushRecordLogEntitySave(content,"2",new Date(),signOldPatientList.size(),1,"签约老人",1,8);
    }
}

+ 72 - 0
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/service/message/PushWeatherForecastService.java

@ -0,0 +1,72 @@
package com.yihu.jw.care.service.message;
import com.yihu.jw.care.util.DeviceLostMessageUtil;
import com.yihu.jw.care.util.SystemPushMessageUtil;
import com.yihu.jw.care.util.WeatherUtil;
import com.yihu.jw.entity.care.weather.BaseWeatherDayDO;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.hospital.message.dao.SystemMessageDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * Created by wsl on 2022/7/29
 */
@Component
public class PushWeatherForecastService {
    @Autowired
    private WeatherUtil weatherUtil;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Autowired
    private DeviceLostMessageUtil deviceLostMessageUtil;
    @Autowired
    private SystemPushMessageUtil systemPushMessageUtil;
    @Autowired
    private SystemMessageDao systemMessageDao;
    private static String message = "今天气温是{tem}摄氏度,{wea}";
    //{"nums":3,"cityid":"101210101","city":"杭州","date":"2022-07-27","week":"星期三","update_time":"14:35","wea":"多云","wea_img":"yun","tem":"37","tem_day":"38"
    // ,"tem_night":"28","win":"东风","win_speed":"2级","win_meter":"7km\/h","air":"118","pressure":"999","humidity":"50%"}
    public void weatherForecastS(){
        List<SystemMessageDO> messageDOList = new ArrayList<>();
        String sql = "SELECT p.id,p.`name`,p.photo FROM  base_patient p " +
                " WHERE  p.sign_status = 1 AND p.del = 1  ";
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        BaseWeatherDayDO weatherDay = weatherUtil.getWeatherDay(null, null);
        String content = message.replace("{tem}",weatherDay.getTem()).replace("{wea}",weatherDay.getWea());
        //文字转语音
        String url = deviceLostMessageUtil.audioUrl(content);
        for (Map<String, Object> map : list) {
            String patient = map.get("id").toString();
            //判断居民是否开启通知
            if (!systemPushMessageUtil.findPatientPushOnOff(patient,5)){
                continue;
            }
            SystemMessageDO messageDO = systemPushMessageUtil.systemMessageDOSave("天气预报",content,"995","0","system","天气预报通知助手",patient,map.get("name").toString(),"1",map.get("photo").toString(),url);
            /*socket 推送*/
            deviceLostMessageUtil.patientMessageSocket(messageDO,null);
            messageDOList.add(messageDO);
        }
        systemMessageDao.save(messageDOList);
        systemPushMessageUtil.basePushRecordLogEntitySave(content,"2",new Date(),list.size(),1,"签约老人",1,7);
    }
}

+ 13 - 0
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/util/DateUtil.java

@ -924,4 +924,17 @@ public class DateUtil {
		c.add(Calendar.DATE, -day_of_week + 7);
		return c.getTime();
	}
	public static int integerTime() {
		Calendar cal = Calendar.getInstance();
		/*int y=cal.get(Calendar.YEAR);
		int m=cal.get(Calendar.MONTH);
		int d=cal.get(Calendar.DATE);*/
		int h = cal.get(Calendar.HOUR_OF_DAY);
		/*int mi=cal.get(Calendar.MINUTE);
		int s=cal.get(Calendar.SECOND);*/
		//System.out.println("现在时刻是"+y+"年"+m+"月"+d+"日"+h+"时"+mi+"分"+s+"秒");
		return h;
	}
}

+ 15 - 6
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/util/DeviceLostMessageUtil.java

@ -181,6 +181,7 @@ public class DeviceLostMessageUtil {
            String[] deviceSplit = deviceSns.split(",");
            System.out.println(patient.get("id"));
            String deivceName = "";
            String deviceSnS = "";
            for (String deviceSn : deviceSplit) {
                //离线的设备  offLineDevice
                for (String offLineDeviceSn : devices) {
@ -194,14 +195,15 @@ public class DeviceLostMessageUtil {
                        List<DevicePatientDevice> query = jdbcTemplate.query(deviceInfoSql, new BeanPropertyRowMapper<>(DevicePatientDevice.class));
                        if (StringUtils.isNotBlank(deivceName)){
                            deivceName+=","+query.get(0).getDeviceName();
                            deviceSnS +=","+query.get(0).getDeviceSn();
                        }else {
                            deivceName+= query.get(0).getDeviceName();
                            deviceSnS+= query.get(0).getDeviceSn();
                        }
                        System.out.println(deivceName);
                    }
                }
            }
            if (StringUtils.isNotBlank(deivceName)){
                String sContent = content;
                sContent = sContent.replace("{name}",patient.get("name").toString());
@ -225,7 +227,7 @@ public class DeviceLostMessageUtil {
                messageDOS.add(messageDO);
                //socket推送
                patientMessageSocket(messageDO);
                patientMessageSocket(messageDO,deviceSnS);
            }
        }
        if (messageDOS.size()>0){
@ -307,16 +309,23 @@ public class DeviceLostMessageUtil {
    public void patientMessageSocket(SystemMessageDO messageDOWatch){
    public void patientMessageSocket(SystemMessageDO messageDOWatch,String deviceSn){
        JSONObject message = new JSONObject();
        message.put("title",messageDOWatch.getTitle());
        message.put("type",messageDOWatch.getType());
        message.put("content",messageDOWatch.getContent());
        message.put("audioUrl",messageDOWatch.getAudioUrl());
        message.put("content_type",999);
        if (StringUtils.isNotBlank(deviceSn)){
            message.put("deviceSn",deviceSn);
            message.put("content_type",991);
        }else {
            message.put("content_type",999);
        }
        imUtil.sendPatientSystemMessage(messageDOWatch.getReceiver(), JSON.toJSONString(message, SerializerFeature.WriteMapNullValue));
    }
    /**
     * 手表 报警器 电量低通知
     * @param patientList
@ -364,7 +373,7 @@ public class DeviceLostMessageUtil {
                            watchName+=jsonObject.getString("name");
                        }
                        /*socket 推送*/
                        patientMessageSocket(messageDOWatch);
                        patientMessageSocket(messageDOWatch, jsonObject.getString("deviceSn"));
                    }
                    break;
                case 7:
@ -392,7 +401,7 @@ public class DeviceLostMessageUtil {
                            SOSName += jsonObject.getString("patient");
                        }
                        /*socket 推送*/
                        patientMessageSocket(messageDO);
                        patientMessageSocket(messageDO,jsonObject.getString("deviceSn"));
                    }
                    break;
            }

+ 83 - 0
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/util/SystemPushMessageUtil.java

@ -0,0 +1,83 @@
package com.yihu.jw.care.util;
import com.yihu.jw.care.dao.pushLog.BasePushRecordLogDao;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.entity.log.BasePushRecordLogEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * Created by wsl on 2022/7/29
 */
@Component
public class SystemPushMessageUtil {
    @Autowired
    private BasePushRecordLogDao basePushRecordLogDao;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    public List<Map<String, Object>> signOldPatient() {
        String sql = "SELECT p.id,p.`name`,p.photo,p.sex FROM  base_patient p " +
                " WHERE  p.sign_status = 1 AND p.del = 1  ";
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        return list;
    }
    public Boolean findPatientPushOnOff(String patient, Integer type) {
        String sql = "select on_off from base_patient_pad_pushonoff where patient = '" + patient + "' and type ='" + type + "'";
        Integer integer = jdbcTemplate.queryForObject(sql, new BeanPropertyRowMapper<>(Integer.class));
        return integer == 0 ? false : true;
    }
    //basePushRecordLogEntity
    @Transactional(rollbackFor = Exception.class)
    public void basePushRecordLogEntitySave(String content, String push_type, Date sendTime, Integer num, Integer status, String sendObject, Integer sendObjectType, Integer messageType) {
        BasePushRecordLogEntity basePushRecordLogEntity = new BasePushRecordLogEntity();
        basePushRecordLogEntity.setContent(content);
        basePushRecordLogEntity.setPushType(push_type);
        basePushRecordLogEntity.setSendTime(sendTime);
        basePushRecordLogEntity.setNum(num);
        basePushRecordLogEntity.setStatus(status);
        basePushRecordLogEntity.setSendObject(sendObject);
        basePushRecordLogEntity.setSendObjectType(sendObjectType);
        basePushRecordLogEntity.setMessageType(messageType);
        basePushRecordLogEntity.setCreateTime(new Date());
        basePushRecordLogDao.save(basePushRecordLogEntity);
    }
    public SystemMessageDO systemMessageDOSave(String title, String content, String type, String isRead, String sender, String senderName, String receiver, String receiverName, String over, String senderPhoto, String url) {
        SystemMessageDO messageDO = new SystemMessageDO();
        messageDO.setTitle(title);
        messageDO.setContent(content);
        messageDO.setType(type);
        messageDO.setIsRead(isRead);
        messageDO.setSender(sender);
        messageDO.setSenderName(senderName);
        messageDO.setReceiver(receiver);
        messageDO.setReceiverName(receiverName);
        messageDO.setOver(over);
        // messageDO.setData(deviceName+"离线");
        messageDO.setDel("1");
        messageDO.setCreateTime(new Date());
        messageDO.setSenderPhoto(senderPhoto);
        messageDO.setAudioUrl(url);
        return messageDO;
    }
}

+ 7 - 3
svr/svr-cloud-job/src/main/resources/system.properties

@ -40,9 +40,13 @@ SYN_FACE_RECORD_JOB= 0 0/30 * * * ? *
SYN_ELECTRIC_RECORD_JOB= 0 0 8 * * ? *
#\u63A8\u9001\u8BB0\u5165\u624B\u52A8\u5B9A\u65F6 \u6BCF\u4E94\u5206\u949F\u8DD1\u4E00\u6B21
PUSHRECORD_LOG_INFO_JOB= 0 0/5 * * * ? *
#\u6BCF\u5929\u65E9\u4E0A\u4E5D\u70B9\u534A\u8DD1\u4E00\u6B21
#\u8BBE\u5907\u79BB\u7EBF\u6BCF\u5929\u65E9\u4E0A\u4E5D\u70B9\u534A\u8DD1\u4E00\u6B21
PUSH_DEVICE_OFF_LONE_JOB= 0 30 9 * * ?
#\u6BCF\u5929\u65E9\u4E0A\u5341\u4E00\u70B9 \u624B\u8868\u4F69\u6234\u63D0\u9192
DEVICE_WATCH_OFF_WEAR_JOB= 0 0 11 * * ?
#\u624B\u8868\u7535\u91CF\u4F4E  \u6BCF\u4E00\u4E2A\u5C0F\u65F6\u83B7\u53D6\u4E00\u6B21 \u7535\u91CF
DEVICE_WATCH_REMAINING_POWER_JOB= 0 0 0/1 * * ?
#\u624B\u8868\u7535\u91CF\u4F4E \u6BCF\u4E00\u4E2A\u5C0F\u65F6\u83B7\u53D6\u4E00\u6B21 \u7535\u91CF
DEVICE_WATCH_REMAINING_POWER_JOB= 0 0 8,9,10,14,15,16,17,18,19,20 * * ?
#\u65F6\u95F4\u6574\u70B9\u62A5\u65F6\uFF1A\u65E9\u4E0A10\u70B9\u5230\u4E0B\u534818\u70B9\u8FDB\u884C\u51C6\u70B9\u64AD\u62A5
PUSH_MASSAGE_TIME_INTEGER_POINT_JOB= 0 0 10,11,12,13,14,15,16,17,18 * * ?
#\u5929\u6C14\u9884\u62A5\uFF1A\u6BCF\u5929\u65E9\u4E0A11\u70B9\u64AD\u62A5
PUSH_MESSAGE_WEATHER_FORECAST_JOB= 0 0 11 * * ?