|
|
|
@ -192,4 +192,25 @@ public class InteractiveSchedule {
|
|
|
|
|
Boolean status = interactiveService.updateCanvas(param); |
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//@XxlJob(SYNCHRONOUS_FAULT_INSTRUCT) String params
|
|
|
|
|
@Scheduled(cron = "0/10 * * * * ?") |
|
|
|
|
public ReturnT synchronousFaultInstruct() { |
|
|
|
|
Map<String,Object> request = new HashMap<>(2); |
|
|
|
|
// 获取站点列表
|
|
|
|
|
R<List<StationEntity>> stationsR = stationClient.list(new StationEntity()); |
|
|
|
|
if(!stationsR.isSuccess() || CollectionUtil.isEmpty(stationsR.getData())) { |
|
|
|
|
XxlJobLogger.log("获取站点列表失败!"); |
|
|
|
|
return ReturnT.FAIL; |
|
|
|
|
} |
|
|
|
|
List<UpdateStationVO> updateStationList = stationsR.getData().stream().map(station -> { |
|
|
|
|
UpdateStationVO stationVO = new UpdateStationVO(); |
|
|
|
|
stationVO.setId(station.getCode()); |
|
|
|
|
stationVO.setName(station.getName()); |
|
|
|
|
return stationVO; |
|
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
request.put("stations", updateStationList); |
|
|
|
|
interactiveService.updateFault(request); |
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|