| | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.mongodb.client.result.DeleteResult; |
| | | import com.ycl.feign.UYClient; |
| | | import com.ycl.platform.domain.param.UY.OneMachineFileParam; |
| | | import com.ycl.platform.domain.param.UY.OsdMonitorParam; |
| | | import com.ycl.platform.domain.param.UY.QueryVqdParam; |
| | | import com.ycl.platform.domain.param.UY.RecordMetaDSumParam; |
| | | import com.ycl.platform.domain.param.UY.*; |
| | | import com.ycl.platform.domain.result.UY.OneMachineFileResult; |
| | | import com.ycl.platform.domain.result.UY.OsdMonitorResult; |
| | | import com.ycl.platform.domain.result.UY.QueryVqdResult; |
| | |
| | | import org.springframework.data.mongodb.core.MongoTemplate; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | |
| | | private ITMonitorService monitorService; |
| | | @Value("${youYun.tenantId}") |
| | | private String tenantId; |
| | | |
| | | @Value("${youYun.email}") |
| | | private String email; |
| | | @Value("${youYun.passwd}") |
| | | private String passwd; |
| | | //一机一档 |
| | | public void monitorTask() { |
| | | //一机一档合格率 |
| | |
| | | OneMachineFileParam param = new OneMachineFileParam(); |
| | | JSONObject jsonObject = uyClient.oneMachineFile(param); |
| | | if (jsonObject != null) { |
| | | log.info("数据格式"+jsonObject); |
| | | JSONObject cameraList = jsonObject.getJSONObject("CameraList"); |
| | | if (cameraList != null) { |
| | | List<OneMachineFileResult> data = cameraList.getList("data", OneMachineFileResult.class); |
| | |
| | | param.setTenantId(tenantId); |
| | | JSONObject jsonObject = uyClient.queryVqdResult(param); |
| | | if (jsonObject != null) { |
| | | log.info("数据格式"+jsonObject); |
| | | Integer statusCode = jsonObject.getInteger("statusCode"); |
| | | if (ApiConstants.UYSuccessCode.equals(statusCode)) { |
| | | JSONObject data = jsonObject.getJSONObject("data"); |
| | |
| | | param.setTenantId(tenantId); |
| | | JSONObject jsonObject = uyClient.recordMetaDSumList(param); |
| | | if (jsonObject != null) { |
| | | log.info("数据格式"+jsonObject); |
| | | if (jsonObject.getBoolean("success")) { |
| | | JSONObject data = jsonObject.getJSONObject("data"); |
| | | if (data != null) { |
| | |
| | | OsdMonitorParam param = new OsdMonitorParam(); |
| | | JSONObject jsonObject = uyClient.osdMonitorList(param,tenantId); |
| | | if (jsonObject != null) { |
| | | log.info("数据格式"+jsonObject); |
| | | if (jsonObject.getBoolean("success")) { |
| | | JSONObject data = jsonObject.getJSONObject("data"); |
| | | if (data != null) { |