Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
self-service
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
廖旭伟
self-service
Commits
e5e7bfcd
Commit
e5e7bfcd
authored
May 15, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改下发设备开柜指令
parent
42b30e45
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
sst-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
...a/com/mortals/xhx/module/device/web/DeviceController.java
+17
-10
No files found.
sst-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
View file @
e5e7bfcd
...
@@ -3,6 +3,7 @@ package com.mortals.xhx.module.device.web;
...
@@ -3,6 +3,7 @@ package com.mortals.xhx.module.device.web;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.model.Result
;
...
@@ -14,6 +15,7 @@ import com.mortals.xhx.common.pdu.device.DeviceModuleUsePdu;
...
@@ -14,6 +15,7 @@ import com.mortals.xhx.common.pdu.device.DeviceModuleUsePdu;
import
com.mortals.xhx.common.pdu.device.DeviceNotifyPdu
;
import
com.mortals.xhx.common.pdu.device.DeviceNotifyPdu
;
import
com.mortals.xhx.common.pdu.device.DevicePdu
;
import
com.mortals.xhx.common.pdu.device.DevicePdu
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.common.utils.StringUtils
;
import
com.mortals.xhx.feign.device.IDeviceAlarmFeign
;
import
com.mortals.xhx.feign.device.IDeviceAlarmFeign
;
import
com.mortals.xhx.feign.device.IDeviceFeign
;
import
com.mortals.xhx.feign.device.IDeviceFeign
;
import
com.mortals.xhx.feign.device.IDeviceModuleUseFeign
;
import
com.mortals.xhx.feign.device.IDeviceModuleUseFeign
;
...
@@ -262,18 +264,23 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
...
@@ -262,18 +264,23 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
try
{
try
{
DeviceNotifyPdu
pdu
=
new
DeviceNotifyPdu
();
DeviceNotifyPdu
pdu
=
new
DeviceNotifyPdu
();
List
<
String
>
deviceCodeList
=
new
ArrayList
<>();
List
<
String
>
deviceCodeList
=
new
ArrayList
<>();
if
(
StringUtils
.
isNotEmpty
(
device
.
getTargetDevice
())){
deviceCodeList
.
add
(
device
.
getTargetDevice
());
}
else
{
DevicePdu
devicePdu
=
new
DevicePdu
();
DevicePdu
devicePdu
=
new
DevicePdu
();
devicePdu
.
setSiteId
(
device
.
getSiteId
());
devicePdu
.
setSiteId
(
device
.
getSiteId
());
devicePdu
.
setProductName
(
"取件柜"
);
devicePdu
.
setProductName
(
"取件柜"
);
Rest
<
RespData
<
List
<
DevicePdu
>>>
restd
=
deviceFeign
.
list
(
devicePdu
);
Rest
<
RespData
<
List
<
DevicePdu
>>>
restd
=
deviceFeign
.
list
(
devicePdu
);
if
(
restd
.
getCode
().
equals
(
YesNoEnum
.
YES
.
getValue
()))
{
if
(
restd
.
getCode
().
equals
(
YesNoEnum
.
YES
.
getValue
()))
{
if
(
restd
.
getData
()!=
null
&&
restd
.
getData
().
getData
().
size
()>
0
)
{
if
(
restd
.
getData
()
!=
null
&&
restd
.
getData
().
getData
().
size
()
>
0
)
{
deviceCodeList
.
add
(
restd
.
getData
().
getData
().
get
(
0
).
getDeviceCode
());
deviceCodeList
.
add
(
restd
.
getData
().
getData
().
get
(
0
).
getDeviceCode
());
}
}
}
}
//
}
//
// deviceCodeList.add(device.getTargetDevice());
if
(
deviceCodeList
.
size
()==
0
){
throw
new
AppException
(
"指令发送失败,没有找到适配的取件柜"
);
}
pdu
.
setDeviceCodeList
(
deviceCodeList
);
pdu
.
setDeviceCodeList
(
deviceCodeList
);
pdu
.
setAction
(
"openBox"
);
pdu
.
setAction
(
"openBox"
);
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
...
...
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