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
770e2ea2
Commit
770e2ea2
authored
Feb 24, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改提交分辨率更新
parent
dce848eb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
18 deletions
+7
-18
common-lib/src/main/java/com/mortals/xhx/common/pdu/DeviceReq.java
...b/src/main/java/com/mortals/xhx/common/pdu/DeviceReq.java
+2
-2
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
...n/java/com/mortals/xhx/busiz/web/DeviceApiController.java
+4
-6
device-manager/src/main/java/com/mortals/xhx/module/device/model/vo/DeviceVo.java
...java/com/mortals/xhx/module/device/model/vo/DeviceVo.java
+0
-9
device-manager/src/main/java/com/mortals/xhx/thread/SendThirdPartyThread.java
...ain/java/com/mortals/xhx/thread/SendThirdPartyThread.java
+1
-1
No files found.
common-lib/src/main/java/com/mortals/xhx/common/pdu/DeviceReq.java
View file @
770e2ea2
...
@@ -149,13 +149,13 @@ public class DeviceReq implements Serializable {
...
@@ -149,13 +149,13 @@ public class DeviceReq implements Serializable {
/**
/**
* 设备宽度
* 设备宽度
*/
*/
private
Double
width
;
private
String
width
;
/**
/**
* 设备高度
* 设备高度
*/
*/
private
Double
height
;
private
String
height
;
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
...
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
View file @
770e2ea2
...
@@ -433,8 +433,8 @@ public class DeviceApiController {
...
@@ -433,8 +433,8 @@ public class DeviceApiController {
ApiResp
<
DeviceResp
>
rsp
=
new
ApiResp
<>();
ApiResp
<
DeviceResp
>
rsp
=
new
ApiResp
<>();
rsp
.
setCode
(
ApiRespCodeEnum
.
SUCCESS
.
getValue
());
rsp
.
setCode
(
ApiRespCodeEnum
.
SUCCESS
.
getValue
());
DeviceResp
deviceResp
=
new
DeviceResp
();
DeviceResp
deviceResp
=
new
DeviceResp
();
Double
width
=
req
.
getWidth
();
String
width
=
req
.
getWidth
();
Double
height
=
req
.
getHeight
();
String
height
=
req
.
getHeight
();
try
{
try
{
...
@@ -570,12 +570,10 @@ public class DeviceApiController {
...
@@ -570,12 +570,10 @@ public class DeviceApiController {
return
JSON
.
toJSONString
(
rsp
);
return
JSON
.
toJSONString
(
rsp
);
}
}
private
void
checkAndUpdateImageRe
(
Double
width
,
Double
height
,
ProductEntity
productEntity
,
DeviceEntity
deviceEntity
)
{
private
void
checkAndUpdateImageRe
(
String
width
,
String
height
,
ProductEntity
productEntity
,
DeviceEntity
deviceEntity
)
{
if
(!
ObjectUtils
.
isEmpty
(
width
)
if
(!
ObjectUtils
.
isEmpty
(
width
)
&&
!
ObjectUtils
.
isEmpty
(
height
)
&&
!
ObjectUtils
.
isEmpty
(
height
)
&&
ObjectUtils
.
isEmpty
(
deviceEntity
.
getResolution
()))
{
&&
ObjectUtils
.
isEmpty
(
deviceEntity
.
getResolution
()))
{
deviceEntity
.
setWidth
(
width
);
deviceEntity
.
setHeight
(
height
);
deviceEntity
.
setResolution
(
width
+
"x"
+
height
);
deviceEntity
.
setResolution
(
width
+
"x"
+
height
);
deviceEntity
.
setResolutionValue
(
width
+
"x"
+
height
);
deviceEntity
.
setResolutionValue
(
width
+
"x"
+
height
);
...
@@ -591,7 +589,7 @@ public class DeviceApiController {
...
@@ -591,7 +589,7 @@ public class DeviceApiController {
//没有资源 根据宽和高存在 找一个相近的资源。
//没有资源 根据宽和高存在 找一个相近的资源。
if
(!
ObjectUtils
.
isEmpty
(
width
)
&&
!
ObjectUtils
.
isEmpty
(
height
))
{
if
(!
ObjectUtils
.
isEmpty
(
width
)
&&
!
ObjectUtils
.
isEmpty
(
height
))
{
//根据分辨率 自适应设置分辨率
//根据分辨率 自适应设置分辨率
double
div
=
NumberUtil
.
div
(
width
,
height
,
2
);
double
div
=
NumberUtil
.
div
(
Double
.
parseDouble
(
width
),
Double
.
parseDouble
(
height
)
,
2
);
if
(
div
>=
1.3
&&
div
<=
5.0
)
{
if
(
div
>=
1.3
&&
div
<=
5.0
)
{
deviceEntity
.
setResolutionValue
(
ImageReEnum
.
RE_1920X1080
.
getDesc
());
deviceEntity
.
setResolutionValue
(
ImageReEnum
.
RE_1920X1080
.
getDesc
());
deviceEntity
.
setResolution
(
ImageReEnum
.
RE_1920X1080
.
getDesc
());
deviceEntity
.
setResolution
(
ImageReEnum
.
RE_1920X1080
.
getDesc
());
...
...
device-manager/src/main/java/com/mortals/xhx/module/device/model/vo/DeviceVo.java
View file @
770e2ea2
...
@@ -51,16 +51,7 @@ public class DeviceVo extends BaseEntityLong {
...
@@ -51,16 +51,7 @@ public class DeviceVo extends BaseEntityLong {
private
List
<
Integer
>
deviceStatusList
;
private
List
<
Integer
>
deviceStatusList
;
/**
* 设备宽度
*/
private
Double
width
;
/**
* 设备高度
*/
private
Double
height
;
...
...
device-manager/src/main/java/com/mortals/xhx/thread/SendThirdPartyThread.java
View file @
770e2ea2
...
@@ -49,7 +49,7 @@ public class SendThirdPartyThread extends AbstractThread {
...
@@ -49,7 +49,7 @@ public class SendThirdPartyThread extends AbstractThread {
@Override
@Override
protected
void
process
()
{
protected
void
process
()
{
log
.
info
(
"SendThirdPartyThread process"
);
//
log.info("SendThirdPartyThread process");
List
<
DeviceReq
>
deviceMsgReqs
=
new
ArrayList
<>();
List
<
DeviceReq
>
deviceMsgReqs
=
new
ArrayList
<>();
while
(
true
)
{
while
(
true
)
{
DeviceReq
deviceReq
=
cacheService
.
lpop
(
KEY_DEVICE_THIRDPARTY_QUEUE
,
DeviceReq
.
class
);
DeviceReq
deviceReq
=
cacheService
.
lpop
(
KEY_DEVICE_THIRDPARTY_QUEUE
,
DeviceReq
.
class
);
...
...
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