Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cneeds-server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangzr
cneeds-server
Commits
ae27453c
Commit
ae27453c
authored
May 27, 2020
by
zzrdark
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改适配配置配置结果
parent
367f0119
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
0 deletions
+52
-0
DeviceClient.java
...va/com/mx/cneeds/server/datashow/client/DeviceClient.java
+2
-0
DeviceController.java
...x/cneeds/server/datashow/web/device/DeviceController.java
+12
-0
DeviceInfoChannelService.java
...needs/server/device/service/DeviceInfoChannelService.java
+2
-0
DeviceInfoChannelServiceImpl.java
...ver/device/service/impl/DeviceInfoChannelServiceImpl.java
+7
-0
DeviceInfoController.java
...com/mx/cneeds/server/device/web/DeviceInfoController.java
+29
-0
No files found.
cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/client/DeviceClient.java
View file @
ae27453c
...
@@ -102,4 +102,6 @@ public interface DeviceClient {
...
@@ -102,4 +102,6 @@ public interface DeviceClient {
@PostMapping
(
"/device/devicechannel/queryTotalStatisticsDeviceChannel"
)
@PostMapping
(
"/device/devicechannel/queryTotalStatisticsDeviceChannel"
)
List
<
DeviceChannelStatisticsDto
>
queryTotalStatisticsDeviceChannel
(
@RequestBody
(
required
=
false
)
List
<
Long
>
channelIds
);
List
<
DeviceChannelStatisticsDto
>
queryTotalStatisticsDeviceChannel
(
@RequestBody
(
required
=
false
)
List
<
Long
>
channelIds
);
@PostMapping
(
"/device/info/queryDeviceChannelSetting"
)
List
<
String
>
queryDeviceChannelSetting
(
List
<
String
>
imeis
);
}
}
cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/device/DeviceController.java
View file @
ae27453c
...
@@ -351,4 +351,16 @@ public class DeviceController {
...
@@ -351,4 +351,16 @@ public class DeviceController {
}
}
return
response
;
return
response
;
}
}
@RequestMapping
(
"/device/queryDeviceChannelSetting"
)
public
R
queryDeviceChannelSetting
(
List
<
String
>
imeis
){
if
(
imeis
!=
null
||
imeis
.
size
()
!=
0
){
List
<
String
>
imeiList
=
deviceClient
.
queryDeviceChannelSetting
(
imeis
);
return
R
.
ok
().
put
(
"data"
,
imeiList
);
}
return
R
.
error
(
ResultCode
.
PARAMERROR
,
"参数错误"
);
}
}
}
cneeds-server-device/src/main/java/com/mx/cneeds/server/device/service/DeviceInfoChannelService.java
View file @
ae27453c
...
@@ -20,5 +20,7 @@ public interface DeviceInfoChannelService extends IService<DeviceInfoChannelEnti
...
@@ -20,5 +20,7 @@ public interface DeviceInfoChannelService extends IService<DeviceInfoChannelEnti
void
removeDeivceInfoChannelByChannelId
(
List
<
Long
>
channelIds
);
void
removeDeivceInfoChannelByChannelId
(
List
<
Long
>
channelIds
);
List
<
DeviceInfoChannelEntity
>
queryDeviceInfoChannelByChannelIds
(
List
<
Long
>
channelIds
);
List
<
DeviceInfoChannelEntity
>
queryDeviceInfoChannelByChannelIds
(
List
<
Long
>
channelIds
);
List
<
DeviceInfoChannelEntity
>
queryDeviceInfoChannelByDeviceIds
(
List
<
Long
>
deviceIds
);
}
}
cneeds-server-device/src/main/java/com/mx/cneeds/server/device/service/impl/DeviceInfoChannelServiceImpl.java
View file @
ae27453c
...
@@ -39,4 +39,11 @@ public class DeviceInfoChannelServiceImpl extends ServiceImpl<DeviceInfoChannelD
...
@@ -39,4 +39,11 @@ public class DeviceInfoChannelServiceImpl extends ServiceImpl<DeviceInfoChannelD
return
deviceInfoChannelEntities
;
return
deviceInfoChannelEntities
;
}
}
@Override
public
List
<
DeviceInfoChannelEntity
>
queryDeviceInfoChannelByDeviceIds
(
List
<
Long
>
deviceIds
){
List
<
DeviceInfoChannelEntity
>
deviceInfoChannelEntities
=
getBaseMapper
().
selectList
(
new
QueryWrapper
<
DeviceInfoChannelEntity
>()
.
in
(
"device_id"
,
deviceIds
));
return
deviceInfoChannelEntities
;
}
}
}
cneeds-server-device/src/main/java/com/mx/cneeds/server/device/web/DeviceInfoController.java
View file @
ae27453c
...
@@ -229,6 +229,35 @@ public class DeviceInfoController {
...
@@ -229,6 +229,35 @@ public class DeviceInfoController {
return
R
.
ok
();
return
R
.
ok
();
}
}
@RequestMapping
(
"/queryDeviceChannelSetting"
)
public
List
<
String
>
queryDeviceChannelSetting
(
@RequestBody
List
<
String
>
imeis
){
Set
<
Long
>
deviceIds
=
new
HashSet
<>();
Set
<
String
>
ChannelSettingImeis
=
new
HashSet
<>();
List
<
DeviceInfoEntity
>
entities
=
deviceInfoService
.
queryDeviceByImeis
(
imeis
);
entities
.
forEach
(
deviceInfoEntity
->
{
deviceIds
.
add
(
deviceInfoEntity
.
getDeptId
());
if
(
deviceInfoEntity
.
getChannelRules
()
==
null
||
deviceInfoEntity
.
getChannelRules
()
==
1
){
ChannelSettingImeis
.
add
(
deviceInfoEntity
.
getImei
());
}
});
List
<
DeviceInfoChannelEntity
>
deviceInfoChannelEntities
=
deviceInfoChannelService
.
queryDeviceInfoChannelByDeviceIds
(
new
LinkedList
<>(
deviceIds
));
deviceInfoChannelEntities
.
forEach
(
deviceInfoChannelEntity
->
{
entities
.
forEach
(
deviceInfoEntity
->
{
if
(
deviceInfoEntity
.
getDeptId
().
equals
(
deviceInfoChannelEntity
.
getDeviceId
())){
ChannelSettingImeis
.
add
(
deviceInfoEntity
.
getImei
());
}
});
});
return
new
LinkedList
<>(
ChannelSettingImeis
);
}
/**
/**
* 保存
* 保存
*/
*/
...
...
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