PrenatalInspectorJob.java 1.0 KB

123456789101112131415161718192021222324252627282930
  1. package com.yihu.wlyy.job;
  2. import com.yihu.wlyy.service.app.prenatalInspector.PrenatalInspectorPreCardService;
  3. import com.yihu.wlyy.util.DateUtil;
  4. import org.quartz.Job;
  5. import org.quartz.JobExecutionContext;
  6. import org.quartz.JobExecutionException;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.web.context.support.SpringBeanAutowiringSupport;
  9. import java.util.Date;
  10. /**
  11. * 产检提醒(1预约提醒,2就诊提醒)
  12. * Created by yeshijie on 2017/6/7.
  13. */
  14. public class PrenatalInspectorJob implements Job{
  15. @Autowired
  16. private PrenatalInspectorPreCardService preCardService;
  17. @Override
  18. public void execute(JobExecutionContext context) throws JobExecutionException {
  19. SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
  20. System.out.print("prenatal inspector wx message sending...");
  21. String date = DateUtil.dateToStrShort(new Date());
  22. //发送产检微信模板提醒消息
  23. preCardService.sendPrenatalInspectorRemind();
  24. }
  25. }