Browse Source

优化机柜定时

develop
wangsixiang 2 weeks ago
parent
commit
25e98a9a38
  1. 5
      zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java

5
zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java

@ -1498,7 +1498,7 @@ private VideoController videoController;
jsonObject.put("functions", functions);
return batchInvokedFunction2(jsonObject);
}
//一体机柜空调定时调用,采数据
//一体机柜定时调用,采数据
//@PostMapping("/integratedCabinetAir")
@Scheduled(cron = "0 11/10 * * * ?")
public AjaxResult integratedCabinetAirConditioner() throws InterruptedException, IOException, HttpException {
@ -1522,7 +1522,7 @@ private VideoController videoController;
ArrayList functions = new ArrayList();
for (int i = UniversalEnum.ONE.getNumber(); i <= UniversalEnum.FOUR.getNumber(); i++) {
JSONObject function = new JSONObject();
if (i == 2 || i==1) {
if (i == 2 || i==1 ||i== 3) {
continue;
}
String valueOf = String.valueOf(i);
@ -1535,6 +1535,7 @@ private VideoController videoController;
jsonObject.put("functions", functions);
return batchInvokedFunction2(jsonObject);
}
public AjaxResult batchInvokedFunction2(@RequestBody Map<String, Object> props) throws HttpException, IOException, InterruptedException {
ArrayList<JSONObject> devices = (ArrayList<JSONObject>) props.get("devices");
ArrayList<JSONObject> functions = (ArrayList<JSONObject>) props.get("functions");

Loading…
Cancel
Save