|
|
@ -16,7 +16,6 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.scheduling.annotation.Scheduled; |
|
|
|
import org.springframework.scheduling.annotation.Scheduled; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
|
|
|
|
import javax.validation.constraints.NotNull; |
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
@ -183,7 +182,7 @@ public class ScheduledCreateTask { |
|
|
|
* @return ReturnT<String> |
|
|
|
* @return ReturnT<String> |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@XxlJob(REGIONAL_DUTY_INFO) |
|
|
|
@XxlJob(REGIONAL_DUTY_INFO) |
|
|
|
//@Scheduled(cron = "0/10 * * * * ? ")
|
|
|
|
//@Scheduled(cron = "0/40 * * * * ? ")
|
|
|
|
public ReturnT<String> loadDutyInfo(String param) throws Exception { |
|
|
|
public ReturnT<String> loadDutyInfo(String param) throws Exception { |
|
|
|
if (Func.isBlank(param)) { |
|
|
|
if (Func.isBlank(param)) { |
|
|
|
param = DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"); |
|
|
|
param = DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"); |
|
|
@ -221,33 +220,35 @@ public class ScheduledCreateTask { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 水利-泵组实时加载 |
|
|
|
* 首页-指标数据加载 |
|
|
|
* @return ReturnT<String> |
|
|
|
* @return ReturnT<String> |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@XxlJob(LOAD_WATER_PUMP_REAL) |
|
|
|
@XxlJob(LOAD_HOME_TARGET) |
|
|
|
//@Scheduled(cron = "0/10 * * * * ? ")
|
|
|
|
//@Scheduled(cron = "0/40 * * * * ? ")
|
|
|
|
public ReturnT<String> loadWaterPumpReal(String param) throws Exception { |
|
|
|
public ReturnT<String> loadHomeTarget(String param) throws Exception { |
|
|
|
if (Func.isBlank(param)) { |
|
|
|
if (Func.isBlank(param)) { |
|
|
|
param = DateUtil.format(new Date(), "yyyy-MM"); |
|
|
|
param = DateUtil.format(new Date(), "yyyy-MM"); |
|
|
|
} |
|
|
|
} |
|
|
|
waterService.loadWaterPumpReal(param); |
|
|
|
homeService.loadHomeTarget(param); |
|
|
|
return new ReturnT<>("SUCCESS"); |
|
|
|
return new ReturnT<>("SUCCESS"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 首页-指标数据加载 |
|
|
|
* 水利-泵组实时加载 |
|
|
|
* @return ReturnT<String> |
|
|
|
* @return ReturnT<String> |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@XxlJob(LOAD_HOME_TARGET) |
|
|
|
//@XxlJob(LOAD_WATER_PUMP_REAL)
|
|
|
|
//@Scheduled(cron = "0/40 * * * * ? ")
|
|
|
|
@Scheduled(cron = "0/10 * * * * ? ") |
|
|
|
public ReturnT<String> loadHomeTarget(String param) throws Exception { |
|
|
|
public ReturnT<String> loadWaterPumpReal() throws Exception { |
|
|
|
|
|
|
|
String param = ""; |
|
|
|
if (Func.isBlank(param)) { |
|
|
|
if (Func.isBlank(param)) { |
|
|
|
param = DateUtil.format(new Date(), "yyyy-MM"); |
|
|
|
param = DateUtil.format(new Date(), "yyyy-MM"); |
|
|
|
} |
|
|
|
} |
|
|
|
homeService.loadHomeTarget(param); |
|
|
|
waterService.loadWaterPumpReal(param); |
|
|
|
return new ReturnT<>("SUCCESS"); |
|
|
|
return new ReturnT<>("SUCCESS"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 水利-泵组指标加载 |
|
|
|
* 水利-泵组指标加载 |
|
|
|
* @return ReturnT<String> |
|
|
|
* @return ReturnT<String> |
|
|
|