Commit d1ca66ce authored by 赵啸非's avatar 赵啸非

修改统计逻辑

parent 39fff255
...@@ -224,7 +224,7 @@ public class DeviceApiController { ...@@ -224,7 +224,7 @@ public class DeviceApiController {
query.setImageResolution(resolution); query.setImageResolution(resolution);
query.setDistribute(DistributeEnum..getValue()); query.setDistribute(DistributeEnum..getValue());
DeviceModuleDistributeEntity distribute = deviceModuleDistributeService.selectOne(query); DeviceModuleDistributeEntity distribute = deviceModuleDistributeService.selectOne(query);
if(!ObjectUtils.isEmpty(distribute)){ if (!ObjectUtils.isEmpty(distribute)) {
//homeDeviceUrl/1/pdj/1920x1080 //homeDeviceUrl/1/pdj/1920x1080
String homeUrl = String.format("/homeDeviceUrl/%s/%s/%s", distribute.getSiteId(), distribute.getProductCode(), distribute.getImageResolutionValue()); String homeUrl = String.format("/homeDeviceUrl/%s/%s/%s", distribute.getSiteId(), distribute.getProductCode(), distribute.getImageResolutionValue());
//根据部署的资源 生成homeurl //根据部署的资源 生成homeurl
...@@ -240,10 +240,10 @@ public class DeviceApiController { ...@@ -240,10 +240,10 @@ public class DeviceApiController {
serverInfo.setHomeUrl(decodeStr); serverInfo.setHomeUrl(decodeStr);
serverInfo.setEventUrl(productEntity.getEventUrl()); serverInfo.setEventUrl(productEntity.getEventUrl());
} }
}else{ } else {
buildHomeUrlBySite(deviceEntity, productEntity, serverInfo, serverName, serverPort); buildHomeUrlBySite(deviceEntity, productEntity, serverInfo, serverName, serverPort);
} }
}else{ } else {
buildHomeUrlBySite(deviceEntity, productEntity, serverInfo, serverName, serverPort); buildHomeUrlBySite(deviceEntity, productEntity, serverInfo, serverName, serverPort);
} }
//对外地址,访问ip+端口 端口号由platformEntity.getSendUrl()获取 //对外地址,访问ip+端口 端口号由platformEntity.getSendUrl()获取
...@@ -436,8 +436,6 @@ public class DeviceApiController { ...@@ -436,8 +436,6 @@ public class DeviceApiController {
if (ObjectUtils.isEmpty(scheme)) { if (ObjectUtils.isEmpty(scheme)) {
scheme = "http"; scheme = "http";
} }
// String serverName = request.getServerName();
// int serverPort = request.getServerPort();
log.info("【设备前端新增或更新】【请求体】-->{} ,serverName:{}", JSONObject.toJSONString(req), serverName); log.info("【设备前端新增或更新】【请求体】-->{} ,serverName:{}", JSONObject.toJSONString(req), serverName);
ApiResp<DeviceResp> rsp = new ApiResp<>(); ApiResp<DeviceResp> rsp = new ApiResp<>();
rsp.setCode(ApiRespCodeEnum.SUCCESS.getValue()); rsp.setCode(ApiRespCodeEnum.SUCCESS.getValue());
...@@ -514,7 +512,7 @@ public class DeviceApiController { ...@@ -514,7 +512,7 @@ public class DeviceApiController {
query.setImageResolution(resolution); query.setImageResolution(resolution);
query.setDistribute(DistributeEnum..getValue()); query.setDistribute(DistributeEnum..getValue());
DeviceModuleDistributeEntity distribute = deviceModuleDistributeService.selectOne(query); DeviceModuleDistributeEntity distribute = deviceModuleDistributeService.selectOne(query);
if(!ObjectUtils.isEmpty(distribute)){ if (!ObjectUtils.isEmpty(distribute)) {
//homeDeviceUrl/1/pdj/1920x1080 //homeDeviceUrl/1/pdj/1920x1080
String homeUrl = String.format("/homeDeviceUrl/%s/%s/%s", distribute.getSiteId(), distribute.getProductCode(), distribute.getImageResolutionValue()); String homeUrl = String.format("/homeDeviceUrl/%s/%s/%s", distribute.getSiteId(), distribute.getProductCode(), distribute.getImageResolutionValue());
//根据部署的资源 生成homeurl //根据部署的资源 生成homeurl
...@@ -530,10 +528,10 @@ public class DeviceApiController { ...@@ -530,10 +528,10 @@ public class DeviceApiController {
serverInfo.setHomeUrl(decodeStr); serverInfo.setHomeUrl(decodeStr);
serverInfo.setEventUrl(productEntity.getEventUrl()); serverInfo.setEventUrl(productEntity.getEventUrl());
} }
}else{ } else {
buildHomeUrlBySite(deviceEntity, productEntity, serverInfo, serverName, serverPort); buildHomeUrlBySite(deviceEntity, productEntity, serverInfo, serverName, serverPort);
} }
}else{ } else {
buildHomeUrlBySite(deviceEntity, productEntity, serverInfo, serverName, serverPort); buildHomeUrlBySite(deviceEntity, productEntity, serverInfo, serverName, serverPort);
} }
...@@ -999,7 +997,7 @@ public class DeviceApiController { ...@@ -999,7 +997,7 @@ public class DeviceApiController {
deviceEntity.setResolution(req.getResolution()); deviceEntity.setResolution(req.getResolution());
deviceEntity.setResolutionValue(req.getResolution()); deviceEntity.setResolutionValue(req.getResolution());
} }
deviceService.update(deviceEntity); deviceService.getDeviceDao().update(deviceEntity);
} }
private void deviceDel(DeviceReq req) throws AppException { private void deviceDel(DeviceReq req) throws AppException {
......
...@@ -165,6 +165,12 @@ Content-Type: application/json ...@@ -165,6 +165,12 @@ Content-Type: application/json
"siteName": "会东县行政审批局" "siteName": "会东县行政审批局"
} }
###设备更新
POST {{baseUrl}}/api/receive
Content-Type: application/json
{"deviceCode":"94-a4-08-ea-16-3e","deviceInBuilding":0,"deviceInFloor":0,"deviceMac":"94-a4-08-ea-16-3e","deviceName":"一楼A03","deviceRemark":"","ip":"","port":"","productCode":"hjq","receiveMethod":2,"resolution":"","siteCode":"510921000000-0001","siteId":1,"siteName":"蓬溪县政务服务中心"}
......
...@@ -102,9 +102,9 @@ POST {{baseUrl}}/device/message/stat/list ...@@ -102,9 +102,9 @@ POST {{baseUrl}}/device/message/stat/list
Content-Type: application/json Content-Type: application/json
{ {
"groupList": ["productCode","month"],
"size": -1, "size": -1,
"productCode": "pdj", "groupList": ["productCode","month"],
"productCodeList": ["pdj"],
"year": 2024, "year": 2024,
"siteId": 1, "siteId": 1,
"orderColList": [{"colName":"month","sortKind":"asc"}] "orderColList": [{"colName":"month","sortKind":"asc"}]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment