提交 5eb61ab9 作者: Administrator

feat:基站信息查询

上级 16b1e2cf
...@@ -27,8 +27,8 @@ public class PersonnelStatisticsExportExcel implements Serializable { ...@@ -27,8 +27,8 @@ public class PersonnelStatisticsExportExcel implements Serializable {
String region; String region;
@ExcelColumn(title = "入场人数", width = 5) @ExcelColumn(title = "入场人数", width = 5)
String admissionNumber; Long admissionNumber;
@ExcelColumn(title = "出场人数", width = 5) @ExcelColumn(title = "出场人数", width = 5)
String attendance; Long attendance;
} }
...@@ -95,8 +95,8 @@ public class VideoServiceImpl implements VideoService { ...@@ -95,8 +95,8 @@ public class VideoServiceImpl implements VideoService {
.mediaServerId("ZbnQN5csqxrPix7a") .mediaServerId("ZbnQN5csqxrPix7a")
.enable(true) .enable(true)
.enable_hls(true) .enable_hls(true)
.type(video.getM3u8().contains("sss") ? "ffmpeg" : "default") .type(video.getM3u8().contains("/h265") ? "ffmpeg" : "default")
.timeout_ms(video.getM3u8().contains("sss") ? 60 : null) .timeout_ms(video.getM3u8().contains("/h265") ? 60 : null)
.build(); .build();
JSONObject jsonObject = gbClient.proxySave(streamProxyItem, gbCookie()); JSONObject jsonObject = gbClient.proxySave(streamProxyItem, gbCookie());
if (!jsonObject.get("code").equals(0)) { if (!jsonObject.get("code").equals(0)) {
......
/* (C) 2022 YiRing, Inc. */
package com.yiring.app.vo.location.station;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.yiring.app.util.GeoUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.*;
import lombok.experimental.FieldDefaults;
import org.locationtech.jts.geom.Point;
/**
* @author tzl
* @version 1.0
* @description:
* @date 2022/5/17 10:41
*/
@ApiModel("LocationBaseStationVo")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE)
public class LocationBaseStationVo implements Serializable {
@Serial
private static final long serialVersionUID = 2580621691725484516L;
@JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "主键", example = "188354391834")
Long id;
@ApiModelProperty(value = "编号", example = "BTI88888888")
String deviceId;
@ApiModelProperty(value = "类型", example = "BTI88888888")
String deviceType;
@ApiModelProperty(value = "最后一次在线时间", example = "BTI88888888")
LocalDateTime time;
@ApiModelProperty(value = "坐标", example = "01010000805C8FC2F528D4734033333333335B7D400000000000000000")
Point point;
public Point getPoint() {
if (x != null && y != null && z != null) {
return GeoUtils.xyzToPoint(x, y, z);
}
return null;
}
@JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "所属地图id", example = "1:总图2:一层3:二层")
Long areaId;
@ApiModelProperty(value = "所属地图", example = "1:总图2:一层3:二层")
String areaName;
@ApiModelProperty(value = "电量单位", example = "")
String voltUnit;
Double x;
Double y;
Double z;
}
/* (C) 2022 YiRing, Inc. */
package com.yiring.app.web.location.station;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.yiring.app.feign.zy.location.beacon.LocationBeaconClient;
import com.yiring.app.util.zy.ZyUtil;
import com.yiring.app.vo.location.station.LocationBaseStationVo;
import com.yiring.common.core.Result;
import com.yiring.common.vo.PageVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.HashMap;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
* @author tzl
* @version 1.0
* @description:
* @date 2022/5/17 10:36
*/
@Validated
@SuppressWarnings({ "deprecation" })
@Api(tags = "基站", description = "")
@RestController
@RequestMapping("/station/")
public class LocationBaseStationController {
@Resource
LocationBeaconClient locationBeaconClient;
@ApiOperation(value = "查询基站信息")
@PostMapping("/page")
public Result<PageVo<LocationBaseStationVo>> page() {
HashMap<String, Object> hashMap = new HashMap<>();
hashMap.put("deviceType", "BTR");
hashMap.put("pageSize", 1000);
hashMap.put("pageNum", 1);
hashMap.put("orgId", 100);
hashMap.put("deviceId", "");
JSONObject page = locationBeaconClient.page(JSONUtil.toJsonStr(hashMap), ZyUtil.manageLogin());
JSONObject data = JSONUtil.parseObj(page.get("data"));
JSONArray records = JSONUtil.parseArray(data.get("records"));
List<LocationBaseStationVo> locationBaseStationVos = JSONUtil.toList(
JSONUtil.toJsonStr(records),
LocationBaseStationVo.class
);
return Result.ok(PageVo.build(locationBaseStationVos, locationBaseStationVos.size()));
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论