Bläddra i källkod

Merge branch 'dev' of chenweida/patient-co-management into dev

chenweida 8 år sedan
förälder
incheckning
706666d0b2

+ 26 - 0
patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/dao/MessageDao.java

@ -14,7 +14,33 @@ import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
public interface MessageDao extends PagingAndSortingRepository<Message, Long>, JpaSpecificationExecutor<Message> {
    @Query("select count(a) from Message a where a.type =1 and a.read= 1 and a.receiver=?1 ")
    int amountUnreadByReceiver(String doctor);
    @Query("select a from Message a where a.type =1 and a.read= 1 and a.receiver=?1 order by a.czrq desc")
    Page<Message> amountUnreadLastByReceiver(String doctor, Pageable pageRequest);
    @Query("select count(a) from Message a where a.type =2 and a.read= 1 and a.receiver=?1 ")
    int amountUnreadHealthByReceiver(String doctor);
    @Query("select a from Message a where (a.type =2 ) and a.read= 1 and a.receiver=?1 order by a.czrq desc")
    Page<Message> amountUnreadHealthLastByReceiver(String doctor,Pageable pageRequest);
    @Modifying
    @Query("update Message a set a.read = 0,a.over='0' where a.id = ?1")
    int read(long msgid);
    @Query("SELECT a FROM Message a WHERE a.sender=?1 AND a.receiver = ?2 and a.signStatus = ?3 and read=1")
    Message findByParams(String sender, String receiver, String signStatus);
    @Query("SELECT a FROM Message a WHERE a.sender=?1 AND a.receiver = ?2 and a.signStatus = ?3 ")
    Message findAllByParams(String sender, String receiver, String signStatus);
    @Query(" from Message a where a.read = 1 and over ='1' and a.sender = ?1 and a.receiver=?2 and a.signStatus='1'")
    Message findByPatient(String patient,String doctor);
    @Query("select count(a) from Message a where a.read = 0 and over ='0'  and a.receiver=?1 and a.type=?2 ")
    int findMessageNum(String doctor, Integer type);
}

+ 65 - 5
patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/job/message/NoticeJob.java

@ -1,12 +1,14 @@
package com.yihu.wlyy.statistics.job.message;
import com.yihu.wlyy.statistics.dao.DoctorDao;
import com.yihu.wlyy.statistics.dao.MessageDao;
import com.yihu.wlyy.statistics.dao.QuartzJobLogDao;
import com.yihu.wlyy.statistics.job.business.QuartzHelper;
import com.yihu.wlyy.statistics.model.doctor.Doctor;
import com.yihu.wlyy.statistics.model.job.QuartzJobLog;
import com.yihu.wlyy.statistics.model.signfamily.Message;
import com.yihu.wlyy.statistics.service.DoctorWorkTimeService;
import com.yihu.wlyy.statistics.task.PushMsgTask;
import com.yihu.wlyy.statistics.util.DateUtil;
import com.yihu.wlyy.statistics.util.HttpClientUtil;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@ -16,6 +18,8 @@ import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
@ -49,6 +53,8 @@ public class NoticeJob implements Job {
    private String url;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Autowired
    private MessageDao messageDao;
    @Transactional
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
@ -148,7 +154,7 @@ public class NoticeJob implements Job {
     * @param type       1是咨询 2个签约 3是体征
     * @return
     */
    private Integer getDoctorMesssageCount(String doctorCode, int type) {
    private Integer getDoctorMesssageCount(String doctorCode, int type) throws Exception {
        switch (type) {
            case 1: {
                return getImMsgAmount(doctorCode);
@ -161,13 +167,67 @@ public class NoticeJob implements Job {
        return 0;
    }
    private Integer getImMsgAmount(String doctor) {
    private JSONObject findDoctorAllMessage(String doctor) {
        // 签约未读消息总数
        int sign = messageDao.amountUnreadByReceiver(doctor);
        org.json.JSONObject signJson = new org.json.JSONObject();
        signJson.put("amount", sign);
        if (sign > 0) {
            PageRequest pageRequest = new PageRequest(0, 1);
            Page<Message> msgs = messageDao.amountUnreadLastByReceiver(doctor, pageRequest);
            if (msgs != null && msgs.getSize() > 0) {
                for (Message msg : msgs) {
                    org.json.JSONObject msgJson = new org.json.JSONObject();
                    if (msg.getSignStatus().equals("4")) {
                        msgJson.put("msg", msg.getSenderName() + "申请与您解除家庭签约");
                    } else {
                        msgJson.put("msg", msg.getSenderName() + "申请与您签约家庭医生");
                    }
                    msgJson.put("msgTime", msg.getCzrq() != null ? DateUtil.dateToStr(msg.getCzrq(), DateUtil.YYYY_MM_DD) : "");
                    signJson.put("lastMessage", msgJson);
                }
            }
        }
        // 体征指标未读消息总数
        int healthIndex = messageDao.amountUnreadHealthByReceiver(doctor);
        org.json.JSONObject indexJson = new org.json.JSONObject();
        indexJson.put("amount", healthIndex);
        if (sign > 0) {
            PageRequest pageRequest = new PageRequest(0, 1);
            Page<Message> msgs = messageDao.amountUnreadHealthLastByReceiver(doctor, pageRequest);
            if (msgs != null && msgs.getSize() > 0) {
                for (Message msg : msgs) {
                    org.json.JSONObject msgJson = new org.json.JSONObject();
                    msgJson.put("msg", msg.getContent());
                    msgJson.put("msgTime", msg.getCzrq() != null ? DateUtil.dateToStr(msg.getCzrq(), DateUtil.YYYY_MM_DD) : "");
                    indexJson.put("lastMessage", msgJson);
                }
            }
        }
        JSONObject json = new JSONObject();
        getImMsgAmount(json, doctor);
        //json.put("consult", consultJson);
        //json.put("famousConsult", famousJson);
        json.put("sign", signJson);
        json.put("healthIndex", indexJson);
        return json;
    }
    private void getImMsgAmount(JSONObject obj, String doctor) {
        String urlall = url + "/api/v1/chats/msg/amount?user_id=" + doctor;
        String response = HttpClientUtil.get(urlall, "UTF-8");
        String response = HttpClientUtil.get(url, "UTF-8");
        obj.put("imMsgCount", response);
    }
    private Integer getImMsgAmount(String doctor) throws Exception {
        /**
         * {"msg":"获取消息总数成功!","data":{"imMsgCount":"{\"doctor\":0,\"patient\":0}","healthIndex":{"amount":0},"sign":{"amount":0}},"status":200}
         */
        JSONObject jo = JSONObject.fromObject(response);
        JSONObject jo = findDoctorAllMessage(doctor);
        JSONObject jochildren = jo.getJSONObject("data");
        Integer countAll = jochildren.getJSONObject("imMsgCount").getInt("doctor") +
                jochildren.getJSONObject("imMsgCount").getInt("patient") +

+ 106 - 105
patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/service/JobService.java

@ -138,7 +138,7 @@ public class JobService {
        //往quartz框架添加任务
        if (!StringUtils.isEmpty(quartzJobConfig.getJobClass())) {
            quartzHelper.startNow(getRightClass(quartzJobConfig), quartzJobConfig.getId()+ UUID.randomUUID().toString().replace("-",""), params);
            quartzHelper.startNow(getRightClass(quartzJobConfig), quartzJobConfig.getId() + UUID.randomUUID().toString().replace("-", ""), params);
        }
    }
@ -158,10 +158,10 @@ public class JobService {
            params.put("jobConfig", wlyyJobConfigVO);
            for (int i = 1; i <= day; i++) {
                //往quartz框架添加任务
                params.put("daybefore", getYesterday(0 - i-1 ));
                params.put("daybefore", getYesterday(0 - i - 1));
                params.put("yesterday", getYesterday(0 - i));
                if (!StringUtils.isEmpty(quartzJobConfig.getJobClass())) {
                    quartzHelper.startNow(getRightClass(quartzJobConfig), quartzJobConfig.getId() + UUID.randomUUID().toString().replace("-",""), params);
                    quartzHelper.startNow(getRightClass(quartzJobConfig), quartzJobConfig.getId() + UUID.randomUUID().toString().replace("-", ""), params);
                    Thread.sleep(20000L);
                }
            }
@ -203,7 +203,7 @@ public class JobService {
            params.put("daybefore", daybefore);
            params.put("yesterday", yesterday);
            if (!StringUtils.isEmpty(quartzJobConfig.getJobClass())) {
                quartzHelper.startNow(getRightClass(quartzJobConfig), quartzJobConfig.getId() + UUID.randomUUID().toString().replace("-",""), params);
                quartzHelper.startNow(getRightClass(quartzJobConfig), quartzJobConfig.getId() + UUID.randomUUID().toString().replace("-", ""), params);
                Thread.sleep(20000L);
            }
@ -211,7 +211,6 @@ public class JobService {
    }
    /**
     *
     * @param quartzJobConfig
     * @return
     * @throws ClassNotFoundException
@ -250,69 +249,70 @@ public class JobService {
        params.put("daybefore", daybefore);
        params.put("yesterday", yesterday);
        if (!StringUtils.isEmpty(quartzJobConfig.getJobClass())) {
            quartzHelper.startNow(getRightClass(quartzJobConfig), quartzJobConfig.getId() + UUID.randomUUID().toString().replace("-",""), params);
            quartzHelper.startNow(getRightClass(quartzJobConfig), quartzJobConfig.getId() + UUID.randomUUID().toString().replace("-", ""), params);
            Thread.sleep(20000L);
        }
    }
    @Transactional
    @Async("dbExtractExecutor")
    public void startaaaa() throws  Exception{
        quartzHelper.startNow(HealthMessageJob.class,UUID.randomUUID().toString().replace("-",""),new HashMap<>());
    public void startaaaa() throws Exception {
        quartzHelper.startNow(HealthMessageJob.class, UUID.randomUUID().toString().replace("-", ""), new HashMap<>());
    }
    public void productDataByDayAndId(Integer day, String id) throws Exception{
    public void productDataByDayAndId(Integer day, String id) throws Exception {
        QuartzJobConfig quartzJobConfig = wlyyJobConfigDao.findById(id);
        if(quartzJobConfig==null){
        if (quartzJobConfig == null) {
            throw new Exception("id不存在");
        }
            WlyyQuota wlyyQuota = quotaDao.findOne(quartzJobConfig.getQuotaId());
        WlyyQuota wlyyQuota = quotaDao.findOne(quartzJobConfig.getQuotaId());
            WlyyQuotaVO wlyyQuotaVO = new WlyyQuotaVO();
            WlyyJobConfigVO wlyyJobConfigVO = new WlyyJobConfigVO();
            BeanUtils.copyProperties(wlyyQuota, wlyyQuotaVO);
            BeanUtils.copyProperties(quartzJobConfig, wlyyJobConfigVO);
        WlyyQuotaVO wlyyQuotaVO = new WlyyQuotaVO();
        WlyyJobConfigVO wlyyJobConfigVO = new WlyyJobConfigVO();
        BeanUtils.copyProperties(wlyyQuota, wlyyQuotaVO);
        BeanUtils.copyProperties(quartzJobConfig, wlyyJobConfigVO);
            Map<String, Object> params = new HashMap<String, Object>();
            params.put("quota", wlyyQuotaVO);
            params.put("jobConfig", wlyyJobConfigVO);
            for (int i = 1; i <= day; i++) {
                //往quartz框架添加任务
                params.put("daybefore", getYesterday(0 - i -1));
                params.put("yesterday", getYesterday(0 - i));
                if (!StringUtils.isEmpty(quartzJobConfig.getJobClass())) {
                    quartzHelper.startNow(getRightClass(quartzJobConfig), quartzJobConfig.getId() + UUID.randomUUID().toString().replace("-",""), params);
                    Thread.sleep(20000L);
                }
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("quota", wlyyQuotaVO);
        params.put("jobConfig", wlyyJobConfigVO);
        for (int i = 1; i <= day; i++) {
            //往quartz框架添加任务
            params.put("daybefore", getYesterday(0 - i - 1));
            params.put("yesterday", getYesterday(0 - i));
            if (!StringUtils.isEmpty(quartzJobConfig.getJobClass())) {
                quartzHelper.startNow(getRightClass(quartzJobConfig), quartzJobConfig.getId() + UUID.randomUUID().toString().replace("-", ""), params);
                Thread.sleep(20000L);
            }
        }
    }
    public void startCheckSignJob() throws  Exception{
        if(!quartzHelper.isExistJob(CheckSignJob.jobKey)){
            quartzHelper.addJob(CheckSignJob.class,CheckSignJob.cron,CheckSignJob.jobKey,new HashMap<>());
    public void startCheckSignJob() throws Exception {
        if (!quartzHelper.isExistJob(CheckSignJob.jobKey)) {
            quartzHelper.addJob(CheckSignJob.class, CheckSignJob.cron, CheckSignJob.jobKey, new HashMap<>());
        }
    }
    public void stopCheckSignJob()throws  Exception {
        if(quartzHelper.isExistJob(CheckSignJob.jobKey)){
    public void stopCheckSignJob() throws Exception {
        if (quartzHelper.isExistJob(CheckSignJob.jobKey)) {
            quartzHelper.removeJob(CheckSignJob.jobKey);
        }
    }
    public void productDataByDayToDay(String start, String end) throws Exception {
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
        Date startDate=sdf.parse(start);
        Date endDate=sdf.parse(end);
        if(startDate.after(endDate)){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Date startDate = sdf.parse(start);
        Date endDate = sdf.parse(end);
        if (startDate.after(endDate)) {
            throw new Exception("日期参数错误");
        }
        int day=daysBetween(startDate,endDate);
        for(int i=0;i<day;i++){
            productDataByOneDay(getYesterday(i,startDate));
        int day = daysBetween(startDate, endDate);
        for (int i = 0; i < day; i++) {
            productDataByOneDay(getYesterday(i, startDate));
        }
    }
    public static String getYesterday(Integer day,Date startDate) {
    public static String getYesterday(Integer day, Date startDate) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(startDate);
        cal.add(Calendar.DAY_OF_MONTH, day);
@ -320,47 +320,46 @@ public class JobService {
        return yesterday;
    }
    public static int daysBetween(Date smdate,Date bdate) throws ParseException
    {
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
        smdate=sdf.parse(sdf.format(smdate));
        bdate=sdf.parse(sdf.format(bdate));
    public static int daysBetween(Date smdate, Date bdate) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        smdate = sdf.parse(sdf.format(smdate));
        bdate = sdf.parse(sdf.format(bdate));
        Calendar cal = Calendar.getInstance();
        cal.setTime(smdate);
        long time1 = cal.getTimeInMillis();
        cal.setTime(bdate);
        long time2 = cal.getTimeInMillis();
        long between_days=(time2-time1)/(1000*3600*24);
        long between_days = (time2 - time1) / (1000 * 3600 * 24);
        return Integer.parseInt(String.valueOf(between_days));
    }
    public void productDataByDayToDayAndId(String start, String end, String id) throws Exception {
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
        Date startDate=sdf.parse(start);
        Date endDate=sdf.parse(end);
        if(startDate.after(endDate)){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Date startDate = sdf.parse(start);
        Date endDate = sdf.parse(end);
        if (startDate.after(endDate)) {
            throw new Exception("日期参数错误");
        }
        int day=daysBetween(startDate,endDate);
        for(int i=0;i<day;i++){
            productDataByOneDayWithId(getYesterday(i,startDate),id);
        int day = daysBetween(startDate, endDate);
        for (int i = 0; i < day; i++) {
            productDataByOneDayWithId(getYesterday(i, startDate), id);
        }
    }
    public void startCleanCacheJob() throws  Exception {
        if(!quartzHelper.isExistJob(CacheCleanJob.jobKey)){
            quartzHelper.addJob(CacheCleanJob.class,CacheCleanJob.cron,CacheCleanJob.jobKey,new HashMap<>());
        }else{
    public void startCleanCacheJob() throws Exception {
        if (!quartzHelper.isExistJob(CacheCleanJob.jobKey)) {
            quartzHelper.addJob(CacheCleanJob.class, CacheCleanJob.cron, CacheCleanJob.jobKey, new HashMap<>());
        } else {
            throw new Exception("已经启动");
        }
    }
    public void stopCleanCacheJob()throws  Exception  {
        if(quartzHelper.isExistJob(CacheCleanJob.jobKey)){
    public void stopCleanCacheJob() throws Exception {
        if (quartzHelper.isExistJob(CacheCleanJob.jobKey)) {
            quartzHelper.removeJob(CacheCleanJob.jobKey);
        }else{
        } else {
            throw new Exception("已经停止");
        }
    }
@ -370,37 +369,37 @@ public class JobService {
    }
    public String seeCache() {
        Map<String, CacheModel> cacheModesCache= CachePool.getArriveSignFamilyExpenseStatus1Map();
        Map<String, String> patientGroupCache=CachePool.getPatientGroup();
        Map<String, String> healthGroupCache=CachePool.getHealthGroup();
        Map<String, List<String>> diseaseGroupCache=CachePool.getDiseaseGroup();
        String returnMessage=" 签约缓存:缓存存在"+cacheModesCache.size()+"天的缓存,";
        for(Map.Entry<String, CacheModel> entry:cacheModesCache.entrySet()){
               returnMessage+=entry.getKey()+",";
        }
        returnMessage+="patientGroupCache"+(patientGroupCache.size()>0?"有缓存":"没有缓存");
        returnMessage+="healthGroupCache"+(healthGroupCache.size()>0?"有缓存":"没有缓存");
        returnMessage+="diseaseGroupCache"+(diseaseGroupCache.size()>0?"有缓存":"没有缓存");
        Map<String, CacheModel> cacheModesCache = CachePool.getArriveSignFamilyExpenseStatus1Map();
        Map<String, String> patientGroupCache = CachePool.getPatientGroup();
        Map<String, String> healthGroupCache = CachePool.getHealthGroup();
        Map<String, List<String>> diseaseGroupCache = CachePool.getDiseaseGroup();
        String returnMessage = " 签约缓存:缓存存在" + cacheModesCache.size() + "天的缓存,";
        for (Map.Entry<String, CacheModel> entry : cacheModesCache.entrySet()) {
            returnMessage += entry.getKey() + ",";
        }
        returnMessage += "patientGroupCache" + (patientGroupCache.size() > 0 ? "有缓存" : "没有缓存");
        returnMessage += "healthGroupCache" + (healthGroupCache.size() > 0 ? "有缓存" : "没有缓存");
        returnMessage += "diseaseGroupCache" + (diseaseGroupCache.size() > 0 ? "有缓存" : "没有缓存");
        return returnMessage;
    }
    public void startHealthMessageJob() throws Exception {
        if(!quartzHelper.isExistJob(HealthMessageJob.jobKey)){
            quartzHelper.addJob(HealthMessageJob.class,HealthMessageJob.cron,HealthMessageJob.jobKey,new HashMap<>());
        }else{
        if (!quartzHelper.isExistJob(HealthMessageJob.jobKey)) {
            quartzHelper.addJob(HealthMessageJob.class, HealthMessageJob.cron, HealthMessageJob.jobKey, new HashMap<>());
        } else {
            throw new Exception("已经启动");
        }
    }
    public void stopHealthMessageJob()throws Exception  {
        if(quartzHelper.isExistJob(HealthMessageJob.jobKey)){
    public void stopHealthMessageJob() throws Exception {
        if (quartzHelper.isExistJob(HealthMessageJob.jobKey)) {
            quartzHelper.removeJob(HealthMessageJob.jobKey);
        }else{
        } else {
            throw new Exception("已经停止");
        }
    }
    public void productHealthDataByOneDay(String day)throws Exception {
    public void productHealthDataByOneDay(String day) throws Exception {
        SimpleDateFormat dataSimple = new SimpleDateFormat("yyyy-MM-dd");
        Date date = dataSimple.parse(day);
@ -416,61 +415,63 @@ public class JobService {
        //往quartz框架添加任务
        params.put("now", yesterday);
        params.put("yesterday", day);
        quartzHelper.startNow(HealthMessageJob.class, HealthMessageJob.jobKey + UUID.randomUUID().toString().replace("-",""), params);
        quartzHelper.startNow(HealthMessageJob.class, HealthMessageJob.jobKey + UUID.randomUUID().toString().replace("-", ""), params);
        Thread.sleep(20000L);
    }
    public void productHealthDataByDayToDay(String start, String end) throws Exception{
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
        Date startDate=sdf.parse(start);
        Date endDate=sdf.parse(end);
        if(startDate.after(endDate)){
    public void productHealthDataByDayToDay(String start, String end) throws Exception {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Date startDate = sdf.parse(start);
        Date endDate = sdf.parse(end);
        if (startDate.after(endDate)) {
            throw new Exception("日期参数错误");
        }
        int day=daysBetween(startDate,endDate);
        for(int i=0;i<day;i++){
            productHealthDataByOneDay(getYesterday(i,startDate));
        int day = daysBetween(startDate, endDate);
        for (int i = 0; i < day; i++) {
            productHealthDataByOneDay(getYesterday(i, startDate));
        }
    }
    public static void main(String[] args) throws Exception{
    public static void main(String[] args) throws Exception {
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
        Date startDate=sdf.parse("2016-10-20");
        Date endDate=sdf.parse("2016-10-28");
        System.out.println(daysBetween(startDate,endDate));
        System.out.println(getYesterday(0,startDate));
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Date startDate = sdf.parse("2016-10-20");
        Date endDate = sdf.parse("2016-10-28");
        System.out.println(daysBetween(startDate, endDate));
        System.out.println(getYesterday(0, startDate));
    }
    public void startEveryDayReportJob()throws Exception {
        if(!quartzHelper.isExistJob(ReportAllLogJob.jobKey)){
            quartzHelper.addJob(ReportAllLogJob.class,ReportAllLogJob.cron,ReportAllLogJob.jobKey,new HashMap<>());
        }else{
    public void startEveryDayReportJob() throws Exception {
        if (!quartzHelper.isExistJob(ReportAllLogJob.jobKey)) {
            quartzHelper.addJob(ReportAllLogJob.class, ReportAllLogJob.cron, ReportAllLogJob.jobKey, new HashMap<>());
        } else {
            throw new Exception("已经启动");
        }
    }
    public void stopEveryDayReportJob() throws Exception{
        if(quartzHelper.isExistJob(ReportAllLogJob.jobKey)){
    public void stopEveryDayReportJob() throws Exception {
        if (quartzHelper.isExistJob(ReportAllLogJob.jobKey)) {
            quartzHelper.removeJob(ReportAllLogJob.jobKey);
        }else{
        } else {
            throw new Exception("已经停止");
        }
    }
    public void startNoticeJob() throws Exception {
        if(!quartzHelper.isExistJob(NoticeJob.jobKey)){
            quartzHelper.addJob(NoticeJob.class,NoticeJob.jobCron,NoticeJob.jobKey,new HashMap<>());
        }else{
        if (!quartzHelper.isExistJob(NoticeJob.jobKey)) {
            // quartzHelper.addJob(NoticeJob.class,NoticeJob.jobCron,NoticeJob.jobKey,new HashMap<>());
            quartzHelper.startNow(NoticeJob.class, UUID.randomUUID().toString().replace("-", ""), new HashMap<>());
        } else {
            throw new Exception("已经启动");
        }
    }
    public void stopNoticeJob()throws Exception  {
        if(quartzHelper.isExistJob(NoticeJob.jobKey)){
    public void stopNoticeJob() throws Exception {
        if (quartzHelper.isExistJob(NoticeJob.jobKey)) {
            quartzHelper.removeJob(NoticeJob.jobKey);
        }else{
        } else {
            throw new Exception("已经停止");
        }
    }

+ 1 - 1
patient-co-statistics/src/main/resources/application.yml

@ -199,4 +199,4 @@ fv:
    password: 123456
systemConfig:
  msg_push_server: http://192.168.131.102:3000
  msg_push_server: http://172.19.103.76:3000