Browse Source

#定时任务注解修改

zhongwei
yang_shj 3 months ago
parent
commit
71db733760
  1. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/BasicScheduledTask.java
  2. 7
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/BasicScheduledTask.java

@ -67,8 +67,6 @@ public class BasicScheduledTask {
@XxlJob(CERTIFICATET_DEAD_LINE_NOTICE) @XxlJob(CERTIFICATET_DEAD_LINE_NOTICE)
//@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> certificatetDeadLineNotice(String param) throws ParseException { public ReturnT<String> certificatetDeadLineNotice(String param) throws ParseException {
// public ReturnT<String> certificatetDeadLineNotice() throws ParseException {
// String param="";
Date endTime = new Date(); Date endTime = new Date();
if (StringUtils.isNotBlank(param)) { if (StringUtils.isNotBlank(param)) {
endTime = new SimpleDateFormat("yyyy-MM-dd").parse(param); endTime = new SimpleDateFormat("yyyy-MM-dd").parse(param);
@ -118,7 +116,7 @@ public class BasicScheduledTask {
} }
private void sendMessage(CertificatetEntity certificatetEntity, Integer date, String users,String personNotice) { private void sendMessage(CertificatetEntity certificatetEntity, Integer date, String users,String personNotice) {
// //注意:通知人是创建人所在机构 //注意:通知人是创建人所在机构
BusinessMessageDTO message = new BusinessMessageDTO(); BusinessMessageDTO message = new BusinessMessageDTO();
message.setBusinessClassify("system"); message.setBusinessClassify("system");
message.setBusinessKey("certificatet-notice-message"); message.setBusinessKey("certificatet-notice-message");

7
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java

@ -60,10 +60,9 @@ public class RealTargetScheduledTask {
/** /**
* 水电站-机组指标加载 * 水电站-机组指标加载
*/ */
//@XxlJob(LOAD_HYDROPOWER_UNIT_TARGET) @XxlJob(LOAD_HYDROPOWER_UNIT_TARGET)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadHydropowerTarget() { public ReturnT<String> loadHydropowerTarget(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }

Loading…
Cancel
Save