瀏覽代碼

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

wangzhinan 2 年之前
父節點
當前提交
02b5a9ace1

+ 163 - 57
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/util/MQTTKXClientUtil.java

@ -1,8 +1,6 @@
package com.yihu.jw.care.util;
import com.yihu.jw.care.dao.device.BaseMqttCallbackRecordDao;
import com.yihu.jw.entity.care.device.BaseMqttCallbackRecordDO;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.paho.client.mqttv3.*;
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
import org.slf4j.Logger;
@ -11,6 +9,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.concurrent.ScheduledExecutorService;
/**
@ -22,7 +24,7 @@ public class MQTTKXClientUtil {
    private static Logger logger = LoggerFactory.getLogger(MQTTKXClientUtil.class);
    public static final String HOST = "tcp://121.40.135.79";
    public static final String deviceId = "18202a08724e5573";
    public static final String deviceId = "18183412724e5573";
    public static final Integer qos = 1;
    @Autowired
@ -30,24 +32,71 @@ public class MQTTKXClientUtil {
    @Autowired
    private BaseMqttCallbackRecordDao mqttCallbackRecordDao;
/*    	1、心跳保活,设置为30s:
    mosquitto_pub -h 121.40.135.79 -t "device/18202a08724e5573/cmd/ipcam_keep_alive" -u admin -P admin -m "30"
            2、订阅:
    mosquitto_sub -h 121.40.135.79 -t "device/18202a08724e5573/response/+"
            3、开启视频推流:
    mosquitto_pub -h 121.40.135.79 -t "device/18202a08724e5573/cmd/ipcam_video_start" -u admin -P admin -m "1"
            6、解析步骤2的payload,获取直播SourceURL:
    如:http://121.40.135.79/live/18202a08724e5573_1673488105807/hls.m3u8
    /**
     * 获取凯旋摄像头列表
     * @return
     */
    public List<Map<String,Object>> getDeviceList(){
        String sql = "select dict_code code,dict_value name from wlyy_hospital_sys_dict where dict_name = 'mqttkxVideoDevice' order by sort";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        return list;
    }
            5、关闭视频推流:
    mosquitto_pub -h 121.40.135.79 -t "device/18202a08724e5573/cmd/ipcam_video_start" -u admin -P admin -m "0"*/
/*  	1、心跳保活,设置为30s:
		mosquitto_pub -h 121.40.135.79 -t "device/18183412724e5573/cmd/ipcam_keep_alive" -u admin -P admin -m "30"
	2、订阅:
		mosquitto_sub -h 121.40.135.79 -t "device/18183412724e5573/response/+"
	3、开启视频推流:
		mosquitto_pub -h 121.40.135.79 -t "device/18183412724e5573/cmd/ipcam_video_start" -u admin -P admin -m "1"
	6、解析步骤2的payload,获取直播SourceURL:
		如:http://121.40.135.79/live/18183412724e5573_1673488105807/hls.m3u8
	5、关闭视频推流:
		mosquitto_pub -h 121.40.135.79 -t "device/18183412724e5573/cmd/ipcam_video_start" -u admin -P admin -m "0"
	5、开启音频推流:[优化中]
		mosquitto_pub -h 121.40.135.79 -t "device/18183412724e5573/cmd/ipcam_audio_start" -u admin -P admin -m "1"
	6、关闭音频推流(静音):[优化中]
		mosquitto_pub -h 121.40.135.79 -t "device/18183412724e5573/cmd/ipcam_audio_start" -u admin -P admin -m "1"
	7、固件升级:[临时测试使用,后续调整OTA升级策略]
		mosquitto_pub -h 121.40.135.79 -t "device/18183412724e5573/cmd/ipcam_upgrade_firmware" -u admin -P admin -m "http://192.168.168.218:8866/9.20230116.zip"
	8、视频画面截图保存:
		mosquitto_pub -h 121.40.135.79 -t "device/18183412724e5573/cmd/ipcam_jpeg_snapshot" -u admin -P admin -m "1"
	9、控制云台复位(校准):
		mosquitto_pub -h 121.40.135.79 -t "device/18183412724e5573/cmd/ipcam_motor_reset" -u admin -P admin -m "0"
	10、控制云台左移:
		mosquitto_pub -h 121.40.135.79 -t "device/18183412724e5573/cmd/ipcam_motor_left" -u admin -P admin -m "0"
	11、控制云台右移:
		mosquitto_pub -h 121.40.135.79 -t "device/18183412724e5573/cmd/ipcam_motor_right" -u admin -P admin -m "0"
	12、控制云台上移:
		mosquitto_pub -h 121.40.135.79 -t "device/18183412724e5573/cmd/ipcam_motor_up" -u admin -P admin -m "0"
	13、控制云台下移:
		mosquitto_pub -h 121.40.135.79 -t "device/18183412724e5573/cmd/ipcam_motor_down" -u admin -P admin -m "0"*/
    public static final String ipcam_keep_alive = "device/{deviceId}/cmd/ipcam_keep_alive";
    public static final String TOPIC = "device/{deviceId}/response/+";
    public static final String ipcam_video_start = "device/{deviceId}/cmd/ipcam_video_start";
    public static final String ipcam_audio_start = "device/{deviceId}/cmd/ipcam_audio_start";
    public static final String ipcam_upgrade_firmware = "device/{deviceId}/cmd/ipcam_upgrade_firmware";
    public static final String ipcam_jpeg_snapshot = "device/{deviceId}/cmd/ipcam_jpeg_snapshot";
    public static final String ipcam_motor_reset = "device/{deviceId}/cmd/ipcam_motor_reset";
    public static final String ipcam_motor_left = "device/{deviceId}/cmd/ipcam_motor_left";
    public static final String ipcam_motor_right = "device/{deviceId}/cmd/ipcam_motor_right";
    public static final String ipcam_motor_up = "device/{deviceId}/cmd/ipcam_motor_up";
    public static final String ipcam_motor_down = "device/{deviceId}/cmd/ipcam_motor_down";
    public static Map<String,String> commandMap = new HashMap<>();
    static {
        commandMap.put("ipcam_keep_alive",ipcam_keep_alive);
        commandMap.put("TOPIC",TOPIC);
        commandMap.put("ipcam_video_start",ipcam_video_start);
        commandMap.put("ipcam_audio_start",ipcam_audio_start);
        commandMap.put("ipcam_upgrade_firmware",ipcam_upgrade_firmware);
        commandMap.put("ipcam_jpeg_snapshot",ipcam_jpeg_snapshot);
        commandMap.put("ipcam_motor_reset",ipcam_motor_reset);
        commandMap.put("ipcam_motor_left",ipcam_motor_left);
        commandMap.put("ipcam_motor_right",ipcam_motor_right);
        commandMap.put("ipcam_motor_up",ipcam_motor_up);
        commandMap.put("ipcam_motor_down",ipcam_motor_down);
    }
    private static final String clientid = String.valueOf(System.currentTimeMillis());;
@ -88,18 +137,18 @@ public class MQTTKXClientUtil {
                @Override
                public void messageArrived(String topic, MqttMessage message) throws Exception {
                    // subscribe后得到的消息会执行到这里面
                    BaseMqttCallbackRecordDO mqttCallbackRecordDO = new BaseMqttCallbackRecordDO();
                    if(StringUtils.isNotBlank(topic)){
                        String[] deviceId = topic.split("//");
                        if(deviceId.length>1){
                            mqttCallbackRecordDO.setDeviceId(deviceId[1]);
                        }
                    }
                    mqttCallbackRecordDO.setTopic(topic);
                    mqttCallbackRecordDO.setPayload(new String(message.getPayload()));
                    mqttCallbackRecordDao.save(mqttCallbackRecordDO);
                    logger.info("接收消息主题 : " + topic+","+"接收消息内容 : " + new String(message.getPayload()));
                    // subscribe后得到的消息会执行到这里面
//                    BaseMqttCallbackRecordDO mqttCallbackRecordDO = new BaseMqttCallbackRecordDO();
//                    if(StringUtils.isNotBlank(topic)){
//                        String[] deviceId = topic.split("//");
//                        if(deviceId.length>1){
//                            mqttCallbackRecordDO.setDeviceId(deviceId[1]);
//                        }
//                    }
//                    mqttCallbackRecordDO.setTopic(topic);
//                    mqttCallbackRecordDO.setPayload(new String(message.getPayload()));
//                    mqttCallbackRecordDao.save(mqttCallbackRecordDO);
                }
                @Override
@ -135,6 +184,26 @@ public class MQTTKXClientUtil {
        getClient().publish(topic, message);
    }
    /**
     * 通用方法
     * @param open
     * @param deviceId
     * @param command
     * @throws Exception
     */
    public void common(String open,String deviceId,String command) throws Exception{
        String payload = open;//
        MqttMessage message = new MqttMessage(payload.getBytes("UTF-8"));
        // 设置消息的服务质量
        message.setQos(qos);
        message.setRetained(true);
        // 发布消息
        String topic = commandMap.get(command).replace("{deviceId}",deviceId);
        logger.info(topic);
        getClient().publish(topic, message);
    }
    /**
     * 心跳
     */
@ -161,35 +230,72 @@ public class MQTTKXClientUtil {
        getClient().subscribe(topic1, Qos);
    }
//    public static void main(String[] args) throws Exception {
//        try {
//            MQTTKXClientUtil mqttkxClientUtil = new MQTTKXClientUtil();
//            mqttkxClientUtil.start();
//            logger.info("启动监听mqtt");
//            // 心跳
//            heart(client,deviceId);
//
//            //订阅消息
//            subscribe(client,deviceId);
//
//            Scanner scanner = new Scanner(System.in);
//            System.out.println("请输入1-3数字");
//            String username = scanner.nextLine();
//            if("1".equals(username)){
//                //开启直播
//                logger.info("开启直播");
//                ipcam_video_start(client,"1",deviceId);
//            }
//            System.out.println("请输入密码");
//            String password = scanner.nextLine();
//            if("2".equals(password)){
//                //关闭直播
//                logger.info("关闭直播");
//                ipcam_video_start(client,"0",deviceId);
//            }
//        }catch (Exception e){
//            e.printStackTrace();
//        }
//    }
    public static void main(String[] args) throws Exception {
        try {
            MQTTKXClientUtil mqttkxClientUtil = new MQTTKXClientUtil();
            mqttkxClientUtil.start();
            logger.info("启动监听mqtt");
            // 心跳
            mqttkxClientUtil.heart(deviceId);
            //订阅消息
            mqttkxClientUtil.subscribe(deviceId);
            boolean flag = true;
            Scanner scanner = new Scanner(System.in);
            while (flag){
                System.out.println("请输入3-13数字");
                String username = scanner.nextLine();
                switch (username){
                    case "3":
                        logger.info("开启视频推流");
                        mqttkxClientUtil.common("1",deviceId,"ipcam_video_start");
                        break;
                    case "4":
                        logger.info("关闭视频推流");
                        mqttkxClientUtil.common("0",deviceId,"ipcam_video_start");
                        break;
                    case "5":
                        logger.info("开启音频推流");
                        mqttkxClientUtil.common("1",deviceId,"ipcam_audio_start");
                        break;
                    case "6":
                        logger.info("关闭音频推流");
                        mqttkxClientUtil.common("0",deviceId,"ipcam_audio_start");
                        break;
                    case "8":
                        logger.info("视频画面截图保存");
                        mqttkxClientUtil.common("1",deviceId,"ipcam_jpeg_snapshot");
                        break;
                    case "9":
                        logger.info("控制云台复位(校准)");
                        mqttkxClientUtil.common("0",deviceId,"ipcam_motor_reset");
                        break;
                    case "10":
                        logger.info("控制云台左移");
                        mqttkxClientUtil.common("0",deviceId,"ipcam_motor_left");
                        break;
                    case "11":
                        logger.info("控制云台右移");
                        mqttkxClientUtil.common("0",deviceId,"ipcam_motor_right");
                        break;
                    case "12":
                        logger.info("控制云台上移");
                        mqttkxClientUtil.common("0",deviceId,"ipcam_motor_up");
                        break;
                    case "13":
                        logger.info("控制云台下移");
                        mqttkxClientUtil.common("0",deviceId,"ipcam_motor_down");
                        break;
                    default:
                        flag = false;
                        System.out.println("结束");
                        break;
                }
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}

+ 111 - 1
svr/svr-cloud-care/src/main/resources/application.yml

@ -514,4 +514,114 @@ base:
  hospitalUrl: http://127.0.0.7:10022/
cloudCare:
  deviceUrl: https://zhyzh.gongshu.gov.cn/device/
  deviceUrl: https://zhyzh.gongshu.gov.cn/device/
---
spring:
  profiles: hzkxtest
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://172.26.0.16/base?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true&useSSL=false
    username: wlyy
    password: 4D^tK%!4
  #  elasticsearch:
  #    cluster-name: jkzl #集群名 默认elasticsearch
  #    cluster-nodes: 172.26.0.115:9300,172.26.0.115:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
  #    client-transport-sniff: false
  #    jest:
  #      uris: http://172.26.0.112:9200,http://172.26.0.112:9200
  #      connection-timeout: 60000 # Connection timeout in milliseconds.
  #      multi-threaded: true # Enable connection requests from multiple execution threads.
  activemq:
    broker-url: tcp://172.26.0.116:61616
    user: admin
    password: admin
  redis:
    host: 172.26.0.16 # Redis server host.
    port: 6380 # Redis server port.
    password: Kb6wKDQP1W4
fastDFS:
  fastdfs_file_url: http://172.26.0.16:8888/
fast-dfs:
  tracker-server: 172.26.0.16:22122 #服务器地址
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP
myFamily:
  qrCodeFailurTime: 2
# mq 是否获取his数据,flag代表获取演示数据,false代表获取his真实数据
demo:
  flag: true
#支付支付
pay:
  flag: true
hospital:
  url: https://wx.xmzsh.com
  mqUser: JKZL
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
wechat:
  appId: wx6c8827a953dc237f
  appSecret: b3e4481e27bdb613a2010dbc7e7d9382
  apiKey: zhongjianxinlianxiamenkejiyouxia
  mchId: 1611059985
  wechat_token: 27eb3bb24f149a7760cf1bb154b08040
  wechat_base_url: http%3a%2f%2fweixin.xmtyw.cn%2fwlyy-dev
  accId: gh_382eac531b79
  id: hz_yyyzh_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
im:
  im_list_get: http://172.26.0.17:3000/
  data_base_name: im_internet_hospital
es:
  pwflag: 1 # 1需要密码,2不需要密码
  index:
    Statistics: hlw_quota_test
    FollowUp: wlyy_followup
  type:
    Statistics: hlw_quota_test
    FollowUpContent: wlyy_followup_content
  host:  http://172.26.0.112:9000
  tHost: 172.26.0.112:9300
  clusterName: jkzl
  securityUser: zjxl:6Dbq&fHg
  user: zjxl
  password: 6Dbq&fHg
# 上传文件临时路径配置
FileTempPath:
  upload_temp_path : /var/local/temp
  image_path : /var/local/upload/images
  voice_path : /var/local/upload/voice
  chat_file_path : /var/local/upload/chat
#文件服务器上传配置 0本地,1.I健康,2.内网调用
testPattern:
  sign: 0
  remote_inner_url: 172.16.100.240:10023/open/fileUpload/upload_stream
wlyy:
  url: http://ehr.yihu.com/wlyy/
qywx:
  url: 2
  id: 1
express:
  sf_url: http://mrds-admin-ci.sit.sf-express.com:45478
  sf_code: HD000001
  sf_check_word: AAAABBBBCCCCDDDD
baiduApi:
  AK: 0vjnCSReegE7A47a941ohjv9a07ONiMC
  url: http://api.map.baidu.com/
  # 系统配置
systemSetting:
  isApplication: 0 # 是否需要资质申请 1需要 0 不需要
base:
  url: http://172.26.0.17:10020/
  hospitalUrl: http://172.26.0.107:10022/
cloudCare:
  deviceUrl: http://172.26.0.17:9112/

+ 9 - 2
svr/svr-cloud-care/src/main/resources/bootstrap.yml

@ -1,6 +1,6 @@
spring:
  application:
    name:  svr-cloud-care
    name:  svr-cloud-care111
  cloud:
    config:
      failFast: true
@ -36,4 +36,11 @@ spring:
  cloud:
    config:
      uri: ${wlyy-spring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy-spring.config.label:master}
      label: ${wlyy-spring.config.label:master}
---
spring:
  profiles: hzkxtest
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.26.0.17:1221}
      label: ${wlyy.spring.config.label:master}

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

@ -5,6 +5,7 @@ import com.yihu.jw.care.job.QuartzHelper;
import com.yihu.jw.care.job.birthday.BirthdayWishesNotPushJob;
import com.yihu.jw.care.job.consult.FinishConsultJob;
import com.yihu.jw.care.job.data.SaveDataPushJob;
import com.yihu.jw.care.job.data.TimeApiJob;
import com.yihu.jw.care.job.device.*;
import com.yihu.jw.care.job.message.PatientSendUnreadJob;
import com.yihu.jw.care.job.order.*;
@ -39,16 +40,25 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
           //居民24小时未回复的咨询自动关闭 每小时59分开始执行一次
            if (!quartzHelper.isExistJob("finish_consult_job")) {
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("finish_consult_job");
                quartzHelper.addJob(FinishConsultJob.class, trigger, "finish_consult_job", new HashMap<String, Object>());
                quartzHelper.addJob(FinishConsultJob.class, trigger, "finish_consult_job", new HashMap<>());
                logger.info("finish_consult_job success");
            } else {
                logger.info("finish_consult_job exist");
            }
            //每天晚上1点执行
            if (!quartzHelper.isExistJob("time_api_job")) {
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("time_api_job");
                quartzHelper.addJob(TimeApiJob.class, trigger, "time_api_job", new HashMap<>());
                logger.info("time_api_job success");
            } else {
                logger.info("time_api_job exist");
            }
            //#每天的早上9:00,给所有医生/社工/教师发送一条短信
            /*if (!quartzHelper.isExistJob("DOCTOR_SEND_UNREAD_MES_JOB")) {
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("DOCTOR_SEND_UNREAD_MES_JOB");
                quartzHelper.addJob(DoctorSendUnreadJob.class, trigger, "DOCTOR_SEND_UNREAD_MES_JOB", new HashMap<String, Object>());
                quartzHelper.addJob(DoctorSendUnreadJob.class, trigger, "DOCTOR_SEND_UNREAD_MES_JOB", new HashMap<>());
                logger.info("DOCTOR_SEND_UNREAD_MES_JOB success");
            } else {
                logger.info("DOCTOR_SEND_UNREAD_MES_JOB exist");
@ -57,7 +67,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //#每天的早上9:00,给所有居民发送未读消息微信模板
            if (!quartzHelper.isExistJob("PATIENT_SEND_UNREAD_MES_JOB")) {
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("PATIENT_SEND_UNREAD_MES_JOB");
                quartzHelper.addJob(PatientSendUnreadJob.class, trigger, "PATIENT_SEND_UNREAD_MES_JOB", new HashMap<String, Object>());
                quartzHelper.addJob(PatientSendUnreadJob.class, trigger, "PATIENT_SEND_UNREAD_MES_JOB", new HashMap<>());
                logger.info("PATIENT_SEND_UNREAD_MES_JOB success");
            } else {
                logger.info("PATIENT_SEND_UNREAD_MES_JOB exist");
@ -66,7 +76,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //#每天的早上9:00,生日祝福提醒短信
            if (!quartzHelper.isExistJob("BIRTHDAY_REMINDER_JOB")) {
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("BIRTHDAY_REMINDER_JOB");
                quartzHelper.addJob(BirthdayReminderJob.class, trigger, "BIRTHDAY_REMINDER_JOB", new HashMap<String, Object>());
                quartzHelper.addJob(BirthdayReminderJob.class, trigger, "BIRTHDAY_REMINDER_JOB", new HashMap<>());
                logger.info("BIRTHDAY_REMINDER_JOB success");
            } else {
                logger.info("BIRTHDAY_REMINDER_JOB exist");
@ -75,7 +85,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //#取消订单支付超时的订单,每3分钟执行一次
            if (!quartzHelper.isExistJob("CANCEL_PAY_ORDER_OVERTIME_JOB")) {
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("CANCEL_PAY_ORDER_OVERTIME_JOB");
                quartzHelper.addJob(CancelPayOrderJob.class, trigger, "CANCEL_PAY_ORDER_OVERTIME_JOB", new HashMap<String, Object>());
                quartzHelper.addJob(CancelPayOrderJob.class, trigger, "CANCEL_PAY_ORDER_OVERTIME_JOB", new HashMap<>());
                logger.info("CANCEL_PAY_ORDER_OVERTIME_JOB success");
            } else {
                logger.info("CANCEL_PAY_ORDER_OVERTIME_JOB exist");
@ -84,7 +94,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //#居民紧急联系人数据同步更新每2分钟执行一次
            if (!quartzHelper.isExistJob("PATIENT_SOS_CONTACTS_JOB")) {
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("PATIENT_SOS_CONTACTS_JOB");
                quartzHelper.addJob(PatientSosContactsJob.class, trigger, "PATIENT_SOS_CONTACTS_JOB", new HashMap<String, Object>());
                quartzHelper.addJob(PatientSosContactsJob.class, trigger, "PATIENT_SOS_CONTACTS_JOB", new HashMap<>());
                logger.info("PATIENT_SOS_CONTACTS_JOB success");
            } else {
                logger.info("PATIENT_SOS_CONTACTS_JOB exist");
@ -92,7 +102,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            if (!quartzHelper.isExistJob("DEVICE_LOST_ASSOCIATION_JOB")) {
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("DEVICE_LOST_ASSOCIATION_JOB");
                quartzHelper.addJob(DeviceLostAssociationJob.class, trigger, "DEVICE_LOST_ASSOCIATION_JOB", new HashMap<String, Object>());
                quartzHelper.addJob(DeviceLostAssociationJob.class, trigger, "DEVICE_LOST_ASSOCIATION_JOB", new HashMap<>());
                logger.info("DEVICE_LOST_ASSOCIATION_JOB success");
            } else {
                logger.info("DEVICE_LOST_ASSOCIATION_JOB exist");
@ -101,7 +111,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //#居民紧急预警工单超时未处理弹框推送
            if (!quartzHelper.isExistJob("EME_WARNING_OVERTIME_NOT_RESPONSE")) {
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("EME_WARNING_OVERTIME_NOT_RESPONSE");
                quartzHelper.addJob(EmeWarnOrderJob.class, trigger, "EME_WARNING_OVERTIME_NOT_RESPONSE", new HashMap<String, Object>());
                quartzHelper.addJob(EmeWarnOrderJob.class, trigger, "EME_WARNING_OVERTIME_NOT_RESPONSE", new HashMap<>());
                logger.info("EME_WARNING_OVERTIME_NOT_RESPONSE success");
            } else {
                logger.info("EME_WARNING_OVERTIME_NOT_RESPONSE exist");
@ -110,7 +120,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //#居民紧急预警工单超时未处理弹框推送
            if (!quartzHelper.isExistJob("EME_WARNING_OVERTIME_NOT_RESPONSE_DAY")) {
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("EME_WARNING_OVERTIME_NOT_RESPONSE_DAY");
                quartzHelper.addJob(EmeWarnOrderDayJob.class, trigger, "EME_WARNING_OVERTIME_NOT_RESPONSE_DAY", new HashMap<String, Object>());
                quartzHelper.addJob(EmeWarnOrderDayJob.class, trigger, "EME_WARNING_OVERTIME_NOT_RESPONSE_DAY", new HashMap<>());
                logger.info("EME_WARNING_OVERTIME_NOT_RESPONSE_DAY success");
            } else {
                logger.info("EME_WARNING_OVERTIME_NOT_RESPONSE_DAY exist");
@ -119,7 +129,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //#取消订单支付超时的订单,每5分钟执行一次
            if (!quartzHelper.isExistJob("OVERTIME_VISIT_JOB")) {
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("OVERTIME_VISIT_JOB");
                quartzHelper.addJob(OverTimeVistJob.class, trigger, "OVERTIME_VISIT_JOB", new HashMap<String, Object>());
                quartzHelper.addJob(OverTimeVistJob.class, trigger, "OVERTIME_VISIT_JOB", new HashMap<>());
                logger.info("OVERTIME_VISIT_JOB success");
            } else {
                logger.info("OVERTIME_VISIT_JOB exist");
@ -128,7 +138,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //归集数据定时推送 每天凌晨两点
            if (!quartzHelper.isExistJob("SAVE_DATA_PUSH_JOB")){
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("SAVE_DATA_PUSH_JOB");
                quartzHelper.addJob(SaveDataPushJob.class, trigger, "SAVE_DATA_PUSH_JOB", new HashMap<String, Object>());
                quartzHelper.addJob(SaveDataPushJob.class, trigger, "SAVE_DATA_PUSH_JOB", new HashMap<>());
                logger.info("SAVE_DATA_PUSH_JOB success");
            }else {
                logger.info("SAVE_DATA_PUSH_JOB exist");
@ -137,7 +147,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //定时查询移动平台物联卡信息
            if (!quartzHelper.isExistJob("UPDATE_SIMS_JOB")){
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("UPDATE_SIMS_JOB");
                quartzHelper.addJob(UpdateSimsJob.class, trigger, "UPDATE_SIMS_JOB", new HashMap<String, Object>());
                quartzHelper.addJob(UpdateSimsJob.class, trigger, "UPDATE_SIMS_JOB", new HashMap<>());
                logger.info("UPDATE_SIMS_JOB success");
            }else {
                logger.info("UPDATE_SIMS_JOB exist");
@ -146,7 +156,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //定时查询移动平台物联卡信息--日
            if (!quartzHelper.isExistJob("GET_SIMS_VOICE_FLOW_DAY_JOB")){
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("GET_SIMS_VOICE_FLOW_DAY_JOB");
                quartzHelper.addJob(GetSimsVoiceFlowDayJob.class, trigger, "GET_SIMS_VOICE_FLOW_DAY_JOB", new HashMap<String, Object>());
                quartzHelper.addJob(GetSimsVoiceFlowDayJob.class, trigger, "GET_SIMS_VOICE_FLOW_DAY_JOB", new HashMap<>());
                logger.info("GET_SIMS_VOICE_FLOW_DAY_JOB success");
            }else {
                logger.info("GET_SIMS_VOICE_FLOW_DAY_JOB exist");
@ -155,7 +165,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //定时查询移动平台物联卡信息--月
            if (!quartzHelper.isExistJob("GET_SIMS_VOICE_FLOW_MONTH_JOB")){
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("GET_SIMS_VOICE_FLOW_MONTH_JOB");
                quartzHelper.addJob(GetSimsVoiceFlowMonthJob.class, trigger, "GET_SIMS_VOICE_FLOW_MONTH_JOB", new HashMap<String, Object>());
                quartzHelper.addJob(GetSimsVoiceFlowMonthJob.class, trigger, "GET_SIMS_VOICE_FLOW_MONTH_JOB", new HashMap<>());
                logger.info("GET_SIMS_VOICE_FLOW_MONTH_JOB success");
            }else {
                logger.info("GET_SIMS_VOICE_FLOW_MONTH_JOB exist");
@ -164,7 +174,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //#每天早上10点发送血压(1天)血糖(7天)未测量通知
            if (!quartzHelper.isExistJob("BLOOD_PRESSURE_GLUCOSE_NOT_MEASURED")){
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("BLOOD_PRESSURE_GLUCOSE_NOT_MEASURED");
                quartzHelper.addJob(PressureGlucoseNotJob.class, trigger, "BLOOD_PRESSURE_GLUCOSE_NOT_MEASURED", new HashMap<String, Object>());
                quartzHelper.addJob(PressureGlucoseNotJob.class, trigger, "BLOOD_PRESSURE_GLUCOSE_NOT_MEASURED", new HashMap<>());
                logger.info("BLOOD_PRESSURE_GLUCOSE_NOT_MEASURED success");
            }else {
                logger.info("BLOOD_PRESSURE_GLUCOSE_NOT_MEASURED exist");
@ -182,7 +192,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //#智慧水表工单触发
            if (!quartzHelper.isExistJob("DAILY_WATER_JOB")){
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("DAILY_WATER_JOB");
                quartzHelper.addJob(DailyWaterJob.class, trigger, "DAILY_WATER_JOB", new HashMap<String, Object>());
                quartzHelper.addJob(DailyWaterJob.class, trigger, "DAILY_WATER_JOB", new HashMap<>());
                logger.info("DAILY_WATER_JOB success");
            }else {
                logger.info("DAILY_WATER_JOB exist");
@ -191,7 +201,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //#人脸库每天晚上3点跑一次
            if (!quartzHelper.isExistJob("DEVICE_DATA_FACE_JOB")){
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("DEVICE_DATA_FACE_JOB");
                quartzHelper.addJob(UpdPatientFaceJob.class, trigger, "DEVICE_DATA_FACE_JOB", new HashMap<String, Object>());
                quartzHelper.addJob(UpdPatientFaceJob.class, trigger, "DEVICE_DATA_FACE_JOB", new HashMap<>());
                logger.info("DEVICE_DATA_FACE_JOB success");
            }else {
                logger.info("DEVICE_DATA_FACE_JOB exist");
@ -200,7 +210,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //#人脸记录每30分钟跑一次
            if (!quartzHelper.isExistJob("SYN_FACE_RECORD_JOB")){
                String trigger = SystemConf.getInstance().getSystemProperties().getProperty("SYN_FACE_RECORD_JOB");
                quartzHelper.addJob(SynPatientFaceRecordsJob.class, trigger, "SYN_FACE_RECORD_JOB", new HashMap<String, Object>());
                quartzHelper.addJob(SynPatientFaceRecordsJob.class, trigger, "SYN_FACE_RECORD_JOB", new HashMap<>());
                logger.info("SYN_FACE_RECORD_JOB success");
            }else {
                logger.info("SYN_FACE_RECORD_JOB exist");
@ -262,7 +272,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //天气预报:每天早上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>());
                quartzHelper.addJob(PushWeatherForecastJob.class,trigger,"PUSH_MESSAGE_WEATHER_FORECAST_JOB", new HashMap<>());
                logger.info("PUSH_MESSAGE_WEATHER_FORECAST_JOB success");
            }else {
                logger.info("PUSH_MESSAGE_WEATHER_FORECAST_JOB exist");
@ -278,7 +288,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //朝晖日报:每天晚上8点发送
            if (!quartzHelper.isExistJob("PUSH_ZHAO_HUI_RI_BAO_JOB")){
                String trigger =  SystemConf.getInstance().getSystemProperties().getProperty("PUSH_ZHAO_HUI_RI_BAO_JOB");
                quartzHelper.addJob(PushZhaohuiRoundJob.class,trigger,"PUSH_ZHAO_HUI_RI_BAO_JOB",new HashMap<String,Object>());
                quartzHelper.addJob(PushZhaohuiRoundJob.class,trigger,"PUSH_ZHAO_HUI_RI_BAO_JOB", new HashMap<>());
                logger.info("PUSH_ZHAO_HUI_RI_BAO_JOB success");
            }else {
                logger.info("PUSH_ZHAO_HUI_RI_BAO_JOB exist");
@ -286,7 +296,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //家属设备微信推送
            if (!quartzHelper.isExistJob("FAMILY_WECHAT_PUSH_DEVICE_JOB")){
                String trigger =  SystemConf.getInstance().getSystemProperties().getProperty("FAMILY_WECHAT_PUSH_DEVICE_JOB");
                quartzHelper.addJob(FamilySystemWechatPushJob.class,trigger,"FAMILY_WECHAT_PUSH_DEVICE_JOB",new HashMap<String,Object>());
                quartzHelper.addJob(FamilySystemWechatPushJob.class,trigger,"FAMILY_WECHAT_PUSH_DEVICE_JOB", new HashMap<>());
                logger.info("FAMILY_WECHAT_PUSH_DEVICE_JOB success");
            }else {
                logger.info("FAMILY_WECHAT_PUSH_DEVICE_JOB exist");
@ -294,7 +304,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //物联设备
            if (!quartzHelper.isExistJob("DEVICE_SYNC_JOB")){
                String trigger =  SystemConf.getInstance().getSystemProperties().getProperty("DEVICE_SYNC_JOB");
                quartzHelper.addJob(DeviceSyncJob.class,trigger,"DEVICE_SYNC_JOB",new HashMap<String,Object>());
                quartzHelper.addJob(DeviceSyncJob.class,trigger,"DEVICE_SYNC_JOB",new HashMap<>());
                logger.info("DEVICE_SYNC_JOB success");
            }else {
                logger.info("DEVICE_SYNC_JOB exist");
@ -303,7 +313,7 @@ public class ApplicationEvent implements ApplicationListener<ContextRefreshedEve
            //预警中的工单,2小时无人处理时,由系统自动发送一条工作提醒给对应的社工
            if (!quartzHelper.isExistJob("ORDER_URGE_REMINDER_JOB")){
                String trigger =  SystemConf.getInstance().getSystemProperties().getProperty("ORDER_URGE_REMINDER_JOB");
                quartzHelper.addJob(OrderUrgeReminderJob.class,trigger,"ORDER_URGE_REMINDER_JOB",new HashMap<String,Object>());
                quartzHelper.addJob(OrderUrgeReminderJob.class,trigger,"ORDER_URGE_REMINDER_JOB", new HashMap<>());
                logger.info("ORDER_URGE_REMINDER_JOB success");
            }else {
                logger.info("ORDER_URGE_REMINDER_JOB exist");

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

@ -0,0 +1,42 @@
package com.yihu.jw.care.job.data;
import com.yihu.jw.util.http.HttpClientUtil;
import org.quartz.DisallowConcurrentExecution;
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;
import org.springframework.stereotype.Service;
/**
 * 验收需求调用组件接口 每天执行一次
 * Created by yeshijie on 2023/2/8.
 */
@Service
@DisallowConcurrentExecution
public class TimeApiJob implements Job {
    private static Logger logger = LoggerFactory.getLogger(TimeApiJob.class);
    @Autowired
    private HttpClientUtil httpClientUtil;
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        logger.info("TimeApiJob start");
        try {
            String SecretKey ="aca6359fe02946818b5b217b722af74e";
            String AccessKey ="76708a866c414cc6aa55387b1346b876";
            String url = "https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020221107000005/ls/landslide/series/train";
        }catch (Exception e){
            e.printStackTrace();
        }
        logger.info("TimeApiJob end");
    }
}

+ 2 - 0
svr/svr-cloud-job/src/main/resources/system.properties

@ -4,6 +4,8 @@ finish_consult_job=0 59 * * * ?
DOCTOR_SEND_UNREAD_MES_JOB=0 0 9 * * ?
#\u6BCF\u5929\u7684\u65E9\u4E0A9:00\uFF0C\u7ED9\u6240\u6709\u5C45\u6C11\u53D1\u9001\u672A\u8BFB\u6D88\u606F\u5FAE\u4FE1\u6A21\u677F
PATIENT_SEND_UNREAD_MES_JOB=0 0 9 * * ?
#\u6BCF\u5929\u7684\u65E9\u4E0A1:00\uFF0C\u9A8C\u6536\u9700\u6C42\u8C03\u7528\u7EC4\u4EF6\u63A5\u53E3
time_api_job = 0 0 1 * * ?
#\u6BCF\u5929\u7684\u65E9\u4E0A9:00\uFF0C\u751F\u65E5\u795D\u798F\u63D0\u9192\u77ED\u4FE1
BIRTHDAY_REMINDER_JOB=0 0 9 * * ?
#\u53D6\u6D88\u8BA2\u5355\u652F\u4ED8\u8D85\u65F6\u7684\u8BA2\u5355\uFF0C\u6BCF3\u5206\u949F\u6267\u884C\u4E00\u6B21

+ 0 - 7
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/rehabilitation/RehabilitationPlanController.java

@ -172,13 +172,6 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
            PatientRehabilitationPlanDO planDO = toEntity(json.toString(), PatientRehabilitationPlanDO.class);
            planDO = rehabilitationPlanService.createPatientRehabilitationPlan(planDO);
            details = rehabilitationPlanService.createRehabilitationDetail(details, planDO.getId());
            //调用服务包接口
            /*if(planDO != null && details != null) {
                String servicePackageId = rehabilitationPlanService.addServicePackage(planDO, details);
                if (StringUtils.isNotBlank(servicePackageId)) {
                    rehabilitationPlanService.updateServicePackageId(planDO.getId(), servicePackageId);
                }
            }*/
            return MixEnvelop.getSuccessList(SpecialistMapping.api_success, details);
        }catch (Exception e){
            e.printStackTrace();