package com.fzzy.igds.api.v1.service;
|
|
import com.fzzy.igds.api.v1.data.ApiV1Req;
|
import com.fzzy.igds.api.v1.data.ApiV1Resp;
|
import com.fzzy.igds.domain.Camera;
|
import com.fzzy.igds.domain.GatewaySer;
|
import com.fzzy.igds.service.SecCameraService;
|
import com.alibaba.fastjson.JSONObject;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.stereotype.Component;
|
|
import javax.annotation.Resource;
|
import java.util.List;
|
|
/**
|
* @Description 监控配置解析
|
* @Author CZT
|
* @Date 2026/1/7 11:05
|
*/
|
@Slf4j
|
@Component
|
public class ApiV1Service3021 {
|
|
@Resource
|
private SecCameraService cameraService;
|
|
/**
|
*
|
* @param req
|
* @param gatewaySer
|
* @return
|
*/
|
public ApiV1Resp<Object> analysis(ApiV1Req<JSONObject> req, GatewaySer gatewaySer) {
|
|
//获取库区下所有监控信息
|
List<Camera> list = cameraService.getCameraByDeptId(gatewaySer.getCompanyId(), gatewaySer.getDeptId());
|
|
if(null == list || list.isEmpty()){
|
return ApiV1Resp.error("未获取到监控信息!", req);
|
}
|
log.info("质押监管接口V1,3021接口解析完成={}", req);
|
return ApiV1Resp.success(list, req);
|
|
}
|
|
}
|