感知设备与视频设备接口更新

develop
hanrenchun 10 months ago
parent 2ea0a9f393
commit a302afe668

@ -18,6 +18,7 @@ import com.ruoyi.database.service.DevopsDeviceStatusService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.checkerframework.checker.units.qual.A;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@ -43,22 +44,22 @@ public class DevopsDeviceInfoController extends BaseController {
@GetMapping
@ApiOperation("查询智能设备信息表")
public TableDataInfo<DevopsDeviceInfo> list(DevopsDeviceInfo devopsDeviceInfo) {
startPage();
List<DevopsDeviceStatus> list1 = devopsDeviceStatusService.lambdaQuery().eq(DevopsDeviceStatus::getIsOnline, 1).list();
ArrayList<String> strings = new ArrayList<>();
QueryWrapper<DevopsDeviceStatus> devopsDeviceStatusQueryWrapper = new QueryWrapper<>();
devopsDeviceStatusQueryWrapper.eq("is_online",1).groupBy("gbs_channel_no");
List<DevopsDeviceStatus> list1 = devopsDeviceStatusService.list(devopsDeviceStatusQueryWrapper);
List<String> strings = new ArrayList<>();
for (DevopsDeviceStatus devopsDeviceStatus : list1) {
strings.add(devopsDeviceStatus.getGbsChannelNo());
}
List<DevopsDeviceInfo> list = devopsDeviceInfoService.lambdaQuery().in(DevopsDeviceInfo::getGbsChannelNo,strings).list();
ArrayList<DevopsDeviceInfo> devopsDeviceInfos = new ArrayList<>();
for (DevopsDeviceInfo deviceInfo : list){
deviceInfo.setIsOnline(1);
devopsDeviceInfos.add(deviceInfo);
}
return getDataTable(devopsDeviceInfos);
startPage();
QueryWrapper<DevopsDeviceInfo> devopsDeviceInfoQueryWrapper = new QueryWrapper<>();
devopsDeviceInfoQueryWrapper.in("gbs_channel_no",strings);
devopsDeviceInfoQueryWrapper.eq("device_type",devopsDeviceInfo.getDeviceType());
devopsDeviceInfoQueryWrapper.eq("parent_monitoring_type",devopsDeviceInfo.getParentMonitoringType());
List<DevopsDeviceInfo> list = devopsDeviceInfoService.list(devopsDeviceInfoQueryWrapper);
return getDataTable(list);
}
@GetMapping("/type")
@ApiOperation("查询智能设备沿海与海堤线")
public TableDataInfo<DevopsDeviceInfo> levelList(DevopsDeviceInfo devopsDeviceInfo){

@ -51,12 +51,7 @@ public class DevopsVideoInfoController extends BaseController {
strings.add(devopsVideoStatus.getGbsChannelNo());
}
List<DevopsVideoInfo> list = devopsVideoInfoService.lambdaQuery().in(DevopsVideoInfo::getGbsChannelNo,strings).list();
ArrayList<DevopsVideoInfo> devopsVideoInfos = new ArrayList<>();
for (DevopsVideoInfo devopsVideoInfo1 : list){
devopsVideoInfo1.setIsOnline(1);
devopsVideoInfos.add(devopsVideoInfo1);
}
return getDataTable(devopsVideoInfos);
return getDataTable(list);
}
@GetMapping("/type")

@ -63,7 +63,7 @@ public class DevopsDeviceInfo extends BaseEntity {
*/
@ApiModelProperty("通道国标编码")
@Excel(name = "通道国标编码")
@TableField(condition = SqlCondition.LIKE)
@TableField(condition = SqlCondition.LIKE,value = "gbs_channel_no")
private String gbsChannelNo;
/**
@ -71,6 +71,7 @@ public class DevopsDeviceInfo extends BaseEntity {
*/
@ApiModelProperty("监控大类")
@Excel(name = "监控大类")
@TableField(value = "parent_monitoring_type")
private Integer parentMonitoringType;
@ -79,6 +80,7 @@ public class DevopsDeviceInfo extends BaseEntity {
*/
@ApiModelProperty("设备类型")
@Excel(name = "设备类型")
@TableField(value = "device_type")
private Integer deviceType;
@TableField(exist = false)
private String deviceTypeCn;

@ -58,11 +58,20 @@ public class DevopsVideoInfo extends BaseEntity {
@TableField(condition = SqlCondition.LIKE)
private String deviceName;
/**
*
*/
@ApiModelProperty("监控大类")
@Excel(name = "监控大类")
@TableField(value = "parent_monitoring_type")
private Integer parentMonitoringType;
/**
*
*/
@ApiModelProperty("监控类型")
@Excel(name = "监控类型")
@TableField(value = "monitoring_type")
private Integer monitoringType;
@TableField(exist = false)
private String monitoringTypeCn;
@ -179,7 +188,7 @@ public class DevopsVideoInfo extends BaseEntity {
*/
@ApiModelProperty("通道国标编码")
@Excel(name = "通道国标编码")
@TableField(condition = SqlCondition.LIKE)
@TableField(condition = SqlCondition.LIKE,value = "gbs_channel_no")
private String gbsChannelNo;
/**

Loading…
Cancel
Save