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

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

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

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

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

Loading…
Cancel
Save