UserContractCertificateTask.java 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. package cn.com.lzt.personnelbasearchivesmanage.timertask;
  2. import java.util.Date;
  3. import org.springframework.beans.factory.annotation.Autowired;
  4. import org.springframework.stereotype.Service;
  5. import cn.com.lzt.personnelbasearchivesmanage.service.PersonnelBaseArchivesManageServiceI;
  6. /**
  7. *
  8. * @ClassName:UserContractCertificateTask 处理证书到期提醒、合同到期提醒、人事信息自动转正的定时任务类
  9. * @Description: TODO
  10. * @author zhijia.wang
  11. * @date 2018-01-18 14:13:38
  12. *
  13. */
  14. //@Service("userContractCertificateTask")
  15. public class UserContractCertificateTask{
  16. // @Autowired
  17. // private PersonnelBaseArchivesManageServiceI archivesManageServiceI;
  18. //
  19. // /**
  20. // * 处理证书到期提醒定时任务
  21. // * dealCertificateMessageExpirationAlert
  22. // * @author zbw
  23. // * 2018-1-8
  24. // */
  25. // public void dealCertificateMessageExpirationAlert() {
  26. // long start = System.currentTimeMillis();
  27. // org.jeecgframework.core.util.LogUtil.info("===================处理证书到期提醒定时任务===================");
  28. // try {
  29. // System.out.println("===================处理证书到期提醒定时任务开始"+new Date());
  30. // archivesManageServiceI.dealCertificateMessageExpirationAlert();
  31. // System.out.println("===================处理证书到期提醒定时任务结束"+new Date());
  32. // } catch (Exception e) {
  33. // e.printStackTrace();
  34. // }
  35. // org.jeecgframework.core.util.LogUtil.info("===================处理证书到期提醒定时任务===================");
  36. // long end = System.currentTimeMillis();
  37. // long times = end - start;
  38. // org.jeecgframework.core.util.LogUtil.info("总耗时"+times+"毫秒");
  39. // }
  40. //
  41. // /**
  42. // * 处理合同到期提醒定时任务
  43. // * dealContractMessageExpirationAlert
  44. // * @author zbw
  45. // * 2018-1-8
  46. // */
  47. // public void dealContractMessageExpirationAlert() {
  48. // long start = System.currentTimeMillis();
  49. // org.jeecgframework.core.util.LogUtil.info("===================处理合同到期提醒定时任务开始===================");
  50. // try {
  51. // System.out.println("===================处理合同到期提醒定时任务开始"+new Date());
  52. // archivesManageServiceI.dealContractMessageExpirationAlert();
  53. // System.out.println("===================处理合同到期提醒定时任务结束"+new Date());
  54. // } catch (Exception e) {
  55. // e.printStackTrace();
  56. // }
  57. // org.jeecgframework.core.util.LogUtil.info("===================处理合同到期提醒定时任务结束===================");
  58. // long end = System.currentTimeMillis();
  59. // long times = end - start;
  60. // org.jeecgframework.core.util.LogUtil.info("总耗时"+times+"毫秒");
  61. // }
  62. //
  63. //
  64. // /**
  65. // * 人事信息自动转正定时任务
  66. // * getAllautoCorrection
  67. // * @author liujie
  68. // * 2018-1-9
  69. // */
  70. // public void getAllautoCorrection() {
  71. // long start = System.currentTimeMillis();
  72. // org.jeecgframework.core.util.LogUtil.info("===================自动转正定时任务开始===================");
  73. // try {
  74. // System.out.println("===================人事信息自动转正定时任务开始"+new Date());
  75. // archivesManageServiceI.getAllautoCorrection();
  76. // System.out.println("===================人事信息自动转正定时任务结束"+new Date());
  77. // } catch (Exception e) {
  78. // e.printStackTrace();
  79. // }
  80. // org.jeecgframework.core.util.LogUtil.info("===================自动转正定时任务结束===================");
  81. // long end = System.currentTimeMillis();
  82. // long times = end - start;
  83. // org.jeecgframework.core.util.LogUtil.info("总耗时"+times+"毫秒");
  84. // }
  85. /*@Scheduled(cron="0 0/1 * * * ?")*/
  86. /*public void userContractCertificate() {
  87. long start = System.currentTimeMillis();
  88. org.jeecgframework.core.util.LogUtil.info("===================员工合同到期证书到期定时任务开始===================");
  89. try {
  90. System.out.println("员工合同到期证书到期定时任务执行开始"+new Date());
  91. archivesManageServiceI.dealMessageExpirationAlert();
  92. System.out.println("员工合同到期证书到期定时任务执行结束"+new Date());
  93. } catch (Exception e) {
  94. e.printStackTrace();
  95. }
  96. org.jeecgframework.core.util.LogUtil.info("===================员工合同到期证书到期定时任务结束===================");
  97. long end = System.currentTimeMillis();
  98. long times = end - start;
  99. org.jeecgframework.core.util.LogUtil.info("总耗时"+times+"毫秒");
  100. }*/
  101. }