Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
d1ca66ce
Commit
d1ca66ce
authored
Mar 26, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改统计逻辑
parent
39fff255
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
12 deletions
+16
-12
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
...n/java/com/mortals/xhx/busiz/web/DeviceApiController.java
+8
-10
device-manager/src/test/java/com/mortals/httpclient/device/DeviceController.http
.../java/com/mortals/httpclient/device/DeviceController.http
+6
-0
device-manager/src/test/java/com/mortals/httpclient/system.http
...-manager/src/test/java/com/mortals/httpclient/system.http
+2
-2
No files found.
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
View file @
d1ca66ce
...
@@ -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
{
...
...
device-manager/src/test/java/com/mortals/httpclient/device/DeviceController.http
View file @
d1ca66ce
...
@@ -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":"蓬溪县政务服务中心"}
...
...
device-manager/src/test/java/com/mortals/httpclient/system.http
View file @
d1ca66ce
...
@@ -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"}]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment