Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3d7966e2
authored
Dec 04, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix: 修复bug
parent
29587672
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
3 deletions
server-service/src/main/java/com/makeit/dto/platform/device/PlatDeviceQueryDTO.java
server-service/src/main/java/com/makeit/service/platform/alarm/impl/PlatAlarmRecordServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatBedServiceImpl.java
server-service/src/main/java/com/makeit/vo/platform/alarm/PlatAlarmRecordVO.java
server-service/src/main/resources/mappers/PlatDeviceMapper.xml
server-service/src/main/java/com/makeit/dto/platform/device/PlatDeviceQueryDTO.java
View file @
3d7966e2
...
@@ -39,6 +39,8 @@ public class PlatDeviceQueryDTO extends BaseTenantDTO {
...
@@ -39,6 +39,8 @@ public class PlatDeviceQueryDTO extends BaseTenantDTO {
@ApiModelProperty
(
value
=
"组织id"
)
@ApiModelProperty
(
value
=
"组织id"
)
private
String
orgId
;
private
String
orgId
;
@ApiModelProperty
(
value
=
"设备是否激活 1 激活 0 没激活"
)
private
Integer
active
;
@ApiModelProperty
(
value
=
"数据权限"
)
@ApiModelProperty
(
value
=
"数据权限"
)
private
List
<
String
>
orgIds
;
private
List
<
String
>
orgIds
;
...
...
server-service/src/main/java/com/makeit/service/platform/alarm/impl/PlatAlarmRecordServiceImpl.java
View file @
3d7966e2
...
@@ -129,6 +129,14 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
...
@@ -129,6 +129,14 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
JoinUtil
.
join
(
dtos
,
platAlarmConfigService
,
PlatAlarmRecordVO:
:
getAlarmId
,
BaseEntity:
:
getId
,
(
t
,
m
)
->
t
.
setNotifyRelation
(
m
.
getNotifyRelation
()));
JoinUtil
.
join
(
dtos
,
platAlarmConfigService
,
PlatAlarmRecordVO:
:
getAlarmId
,
BaseEntity:
:
getId
,
(
t
,
m
)
->
t
.
setNotifyRelation
(
m
.
getNotifyRelation
()));
List
<
PlatDevice
>
platDeviceList
=
platDeviceService
.
list
();
Map
<
String
,
PlatDevice
>
deviceMap
=
StreamUtil
.
toMap
(
platDeviceList
,
BaseEntity:
:
getId
);
for
(
PlatAlarmRecordVO
platAlarmRecordVO
:
dtos
)
{
PlatDevice
platDevice
=
deviceMap
.
get
(
platAlarmRecordVO
.
getDeviceId
());
if
(
platDevice
!=
null
)
{
platAlarmRecordVO
.
setDevice
(
platDevice
);
}
}
return
PageUtil
.
toPageVO
(
dtos
,
page
);
return
PageUtil
.
toPageVO
(
dtos
,
page
);
}
}
...
@@ -165,7 +173,7 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
...
@@ -165,7 +173,7 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
}
}
List
<
String
>
orgIdList
=
Lists
.
newArrayList
();
List
<
String
>
orgIdList
=
Lists
.
newArrayList
();
if
(
com
.
makeit
.
utils
.
old
.
StringUtils
.
isNotEmpty
(
param
.
getType
())
&&
com
.
makeit
.
utils
.
old
.
StringUtils
.
isEmpty
(
param
.
getOrgId
()))
{
if
(
com
.
makeit
.
utils
.
old
.
StringUtils
.
isNotEmpty
(
param
.
getType
())
&&
com
.
makeit
.
utils
.
old
.
StringUtils
.
isEmpty
(
param
.
getOrgId
()))
{
orgIdList
=
choic
eOrgIdList
;
orgIdList
=
typ
eOrgIdList
;
if
(
CollectionUtils
.
isEmpty
(
orgIdList
))
{
if
(
CollectionUtils
.
isEmpty
(
orgIdList
))
{
orgIdList
.
add
(
"-1"
);
orgIdList
.
add
(
"-1"
);
}
}
...
...
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderServiceImpl.java
View file @
3d7966e2
...
@@ -130,7 +130,7 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
...
@@ -130,7 +130,7 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
}
}
List
<
String
>
orgIdList
=
Lists
.
newArrayList
();
List
<
String
>
orgIdList
=
Lists
.
newArrayList
();
if
(
StringUtils
.
isNotEmpty
(
dto
.
getType
())
&&
StringUtils
.
isEmpty
(
dto
.
getOrgId
()))
{
if
(
StringUtils
.
isNotEmpty
(
dto
.
getType
())
&&
StringUtils
.
isEmpty
(
dto
.
getOrgId
()))
{
orgIdList
=
choic
eOrgIdList
;
orgIdList
=
typ
eOrgIdList
;
if
(
CollectionUtils
.
isEmpty
(
orgIdList
))
{
if
(
CollectionUtils
.
isEmpty
(
orgIdList
))
{
orgIdList
.
add
(
"-1"
);
orgIdList
.
add
(
"-1"
);
}
}
...
...
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatBedServiceImpl.java
View file @
3d7966e2
...
@@ -172,7 +172,7 @@ public class PlatBedServiceImpl extends ServiceImpl<PlatBedMapper, PlatBed> impl
...
@@ -172,7 +172,7 @@ public class PlatBedServiceImpl extends ServiceImpl<PlatBedMapper, PlatBed> impl
}
}
List
<
String
>
orgIdList
=
Lists
.
newArrayList
();
List
<
String
>
orgIdList
=
Lists
.
newArrayList
();
if
(
com
.
makeit
.
utils
.
old
.
StringUtils
.
isNotEmpty
(
dto
.
getType
())
&&
com
.
makeit
.
utils
.
old
.
StringUtils
.
isEmpty
(
dto
.
getOrgId
()))
{
if
(
com
.
makeit
.
utils
.
old
.
StringUtils
.
isNotEmpty
(
dto
.
getType
())
&&
com
.
makeit
.
utils
.
old
.
StringUtils
.
isEmpty
(
dto
.
getOrgId
()))
{
orgIdList
=
choic
eOrgIdList
;
orgIdList
=
typ
eOrgIdList
;
if
(
CollectionUtils
.
isEmpty
(
orgIdList
))
{
if
(
CollectionUtils
.
isEmpty
(
orgIdList
))
{
orgIdList
.
add
(
"-1"
);
orgIdList
.
add
(
"-1"
);
}
}
...
...
server-service/src/main/java/com/makeit/vo/platform/alarm/PlatAlarmRecordVO.java
View file @
3d7966e2
...
@@ -2,6 +2,7 @@ package com.makeit.vo.platform.alarm;
...
@@ -2,6 +2,7 @@ package com.makeit.vo.platform.alarm;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.makeit.common.dto.BaseTenantDTO
;
import
com.makeit.common.dto.BaseTenantDTO
;
import
com.makeit.entity.platform.device.PlatDevice
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -66,5 +67,6 @@ public class PlatAlarmRecordVO extends BaseTenantDTO {
...
@@ -66,5 +67,6 @@ public class PlatAlarmRecordVO extends BaseTenantDTO {
private
String
misinformationFlag
;
private
String
misinformationFlag
;
private
String
deviceId
;
private
String
deviceId
;
private
PlatDevice
device
;
}
}
server-service/src/main/resources/mappers/PlatDeviceMapper.xml
View file @
3d7966e2
...
@@ -43,6 +43,14 @@
...
@@ -43,6 +43,14 @@
<if
test=
"param.tenantId != null and param.tenantId != ''"
>
<if
test=
"param.tenantId != null and param.tenantId != ''"
>
and pd.tenant_id = #{param.tenantId}
and pd.tenant_id = #{param.tenantId}
</if>
</if>
<choose>
<when
test=
"param.active !=null and param.active !='' and param.active == 1"
>
and pd.device_license is not null
</when>
<when
test=
"param.active !=null and param.active !='' and param.active == 0"
>
and pd.device_license is null
</when>
</choose>
<if
test=
"param.orgIds != null and param.orgIds.size() > 0 "
>
<if
test=
"param.orgIds != null and param.orgIds.size() > 0 "
>
AND pd.org_id in
AND pd.org_id in
<foreach
collection=
"param.orgIds"
item=
"item"
separator=
","
open=
"("
close=
")"
index=
""
>
<foreach
collection=
"param.orgIds"
item=
"item"
separator=
","
open=
"("
close=
")"
index=
""
>
...
...
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