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
a23f125a
Commit
a23f125a
authored
Aug 29, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口设备更新站点后,站点名称和编码未更新问题
parent
02d773af
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
10 deletions
+22
-10
device-manager/src/main/java/com/mortals/xhx/busiz/req/DeviceReq.java
...er/src/main/java/com/mortals/xhx/busiz/req/DeviceReq.java
+5
-0
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
...n/java/com/mortals/xhx/busiz/web/DeviceApiController.java
+13
-8
doc/api.md
doc/api.md
+4
-2
No files found.
device-manager/src/main/java/com/mortals/xhx/busiz/req/DeviceReq.java
View file @
a23f125a
...
@@ -137,4 +137,9 @@ public class DeviceReq implements Serializable {
...
@@ -137,4 +137,9 @@ public class DeviceReq implements Serializable {
*/
*/
private
Integer
source
;
private
Integer
source
;
/**
* 激活(0.否,1.是)
*/
private
Integer
active
;
}
}
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
View file @
a23f125a
...
@@ -203,13 +203,13 @@ public class DeviceApiController {
...
@@ -203,13 +203,13 @@ public class DeviceApiController {
}
}
private
void
buildHomeUrl
(
DeviceEntity
deviceEntity
,
ProductEntity
productEntity
,
ServerInfo
serverInfo
)
{
private
void
buildHomeUrl
(
DeviceEntity
deviceEntity
,
ProductEntity
productEntity
,
ServerInfo
serverInfo
)
{
String
homeUrl
=
""
;
String
homeUrl
=
""
;
if
(!
ObjectUtils
.
isEmpty
(
productEntity
.
getHomeUrl
()))
{
if
(!
ObjectUtils
.
isEmpty
(
productEntity
.
getHomeUrl
()))
{
homeUrl
=
productEntity
.
getHomeUrl
();
homeUrl
=
productEntity
.
getHomeUrl
();
}
}
if
(!
ObjectUtils
.
isEmpty
(
deviceEntity
.
getHomeUrl
()))
{
if
(!
ObjectUtils
.
isEmpty
(
deviceEntity
.
getHomeUrl
()))
{
homeUrl
=
deviceEntity
.
getHomeUrl
();
homeUrl
=
deviceEntity
.
getHomeUrl
();
}
}
String
domain
=
GlobalSysInfo
.
getParamValue
(
PARAM_SERVER_HTTP_URL
,
"http://192.168.0.98:11091"
);
String
domain
=
GlobalSysInfo
.
getParamValue
(
PARAM_SERVER_HTTP_URL
,
"http://192.168.0.98:11091"
);
...
@@ -435,7 +435,12 @@ public class DeviceApiController {
...
@@ -435,7 +435,12 @@ public class DeviceApiController {
deviceEntity
.
setDeviceCode
(
req
.
getDeviceCode
());
deviceEntity
.
setDeviceCode
(
req
.
getDeviceCode
());
deviceEntity
.
setEnabled
(
YesNoEnum
.
YES
.
getValue
());
deviceEntity
.
setEnabled
(
YesNoEnum
.
YES
.
getValue
());
// deviceEntity.setDeviceStatus(DeviceStatusEnum.未激活.getValue());
if
(!
ObjectUtils
.
isEmpty
(
req
.
getActive
()))
{
deviceEntity
.
setDeviceStatus
(
req
.
getActive
()
==
YesNoEnum
.
YES
.
getValue
()
?
DeviceStatusEnum
.
离线
.
getValue
()
:
DeviceStatusEnum
.
未激活
.
getValue
());
}
// deviceEntity.setDeviceStatus(DeviceStatusEnum.未激活.getValue());
deviceEntity
.
setSource
(
req
.
getSource
());
deviceEntity
.
setSource
(
req
.
getSource
());
}
}
...
@@ -508,8 +513,8 @@ public class DeviceApiController {
...
@@ -508,8 +513,8 @@ public class DeviceApiController {
header
.
put
(
MessageHeader
.
DEVICECODE
,
deviceEntity
.
getDeviceCode
());
header
.
put
(
MessageHeader
.
DEVICECODE
,
deviceEntity
.
getDeviceCode
());
for
(
int
i
=
0
;
i
<
100
;
i
++)
{
for
(
int
i
=
0
;
i
<
100
;
i
++)
{
log
.
info
(
"sendMesageTopic:{}"
,
JSON
.
toJSONString
(
info
));
log
.
info
(
"sendMesageTopic:{}"
,
JSON
.
toJSONString
(
info
));
deviceService
.
sendDeviceMessage
(
deviceEntity
,
info
,
header
,
JSON
.
toJSONString
(
req
),
null
,
null
);
deviceService
.
sendDeviceMessage
(
deviceEntity
,
info
,
header
,
JSON
.
toJSONString
(
req
),
null
,
null
);
Thread
.
sleep
(
50
);
Thread
.
sleep
(
50
);
}
}
//log.info(String.format("sendMsgResp:%s", JSON.toJSONString(sendDeviceMessageResp)));
//log.info(String.format("sendMsgResp:%s", JSON.toJSONString(sendDeviceMessageResp)));
...
...
doc/api.md
View file @
a23f125a
...
@@ -326,6 +326,7 @@ defectsLiabilityPeriod|Date|否|保修期,如2020-08-12 15:00:00
...
@@ -326,6 +326,7 @@ defectsLiabilityPeriod|Date|否|保修期,如2020-08-12 15:00:00
leadingOfficial|String|否|负责人
leadingOfficial|String|否|负责人
leadingOfficialTelephone|String|否|联系电话
leadingOfficialTelephone|String|否|联系电话
source|Integer|否|设备来源,默认1(0.旧设备,1.新设备)
source|Integer|否|设备来源,默认1(0.旧设备,1.新设备)
active|Integer|否|设备激活,默认0(0.否,1.是)
**请求样例:**
**请求样例:**
```
```
...
@@ -344,8 +345,9 @@ source|Integer|否|设备来源,默认1(0.旧设备,1.新设备)
...
@@ -344,8 +345,9 @@ source|Integer|否|设备来源,默认1(0.旧设备,1.新设备)
"deviceInFloor":22,
"deviceInFloor":22,
"defectsLiabilityPeriod":"2022-06-30",
"defectsLiabilityPeriod":"2022-06-30",
"leadingOfficial":"张三",
"leadingOfficial":"张三",
"leadingOfficialTelephone":"13281114856",,
"leadingOfficialTelephone":"13281114856",
"source":1
"source":1,
"active":1
}
}
```
```
...
...
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