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
f037dec3
authored
Sep 25, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
820ffaaa
0abcc3b7
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
100 additions
and
39 deletions
saas-module/src/main/java/com/makeit/controller/plat/PlatRoleController.java
server-common/src/main/java/com/makeit/utils/data/convert/TreeUtil.java
server-common/src/main/java/com/makeit/utils/data/excel/easyexcel/ConfigConverter.java
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/FallAlarm.java
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/HeartAlarm.java
server-service/src/main/java/com/makeit/service/platform/alarm/impl/PlatAlarmConfigServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatOrgServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatUserServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderDayReportWeekServiceImpl.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/PlatSpaceServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/workstation/impl/WorkStationServiceImpl.java
server-service/src/main/java/com/makeit/service/wechat/impl/PlatElderCenterWechatServiceImpl.java
saas-module/src/main/java/com/makeit/controller/plat/PlatRoleController.java
View file @
f037dec3
...
@@ -49,14 +49,14 @@ public class PlatRoleController {
...
@@ -49,14 +49,14 @@ public class PlatRoleController {
@Autowired
@Autowired
private
PlatUserService
platUserService
;
private
PlatUserService
platUserService
;
@Action
(
module
=
"平台端-角色"
,
name
=
"分页列表"
,
code
=
"
tn
t:role:page"
)
@Action
(
module
=
"平台端-角色"
,
name
=
"分页列表"
,
code
=
"
pla
t:role:page"
)
@ApiOperation
(
"分页列表"
)
@ApiOperation
(
"分页列表"
)
@PostMapping
(
"page"
)
@PostMapping
(
"page"
)
public
ApiResponseEntity
<
PageVO
<
PlatRoleDTOVO
>>
page
(
@RequestBody
PageReqDTO
<
PlatRoleDTOVO
>
page
)
{
public
ApiResponseEntity
<
PageVO
<
PlatRoleDTOVO
>>
page
(
@RequestBody
PageReqDTO
<
PlatRoleDTOVO
>
page
)
{
return
ApiResponseUtils
.
success
(
platRoleService
.
page
(
page
));
return
ApiResponseUtils
.
success
(
platRoleService
.
page
(
page
));
}
}
@Action
(
module
=
"平台端-角色"
,
name
=
"列表"
,
code
=
"
tn
t:role:list"
)
@Action
(
module
=
"平台端-角色"
,
name
=
"列表"
,
code
=
"
pla
t:role:list"
)
@ApiOperation
(
"列表"
)
@ApiOperation
(
"列表"
)
@PostMapping
(
"list"
)
@PostMapping
(
"list"
)
public
ApiResponseEntity
<
List
<
PlatRoleDTOVO
>>
list
(
@RequestBody
PlatRoleDTOVO
dto
)
{
public
ApiResponseEntity
<
List
<
PlatRoleDTOVO
>>
list
(
@RequestBody
PlatRoleDTOVO
dto
)
{
...
@@ -75,14 +75,14 @@ public class PlatRoleController {
...
@@ -75,14 +75,14 @@ public class PlatRoleController {
return
ApiResponseUtils
.
success
(
platRoleService
.
list
(
dto
));
return
ApiResponseUtils
.
success
(
platRoleService
.
list
(
dto
));
}
}
@Action
(
module
=
"平台端-角色"
,
name
=
"新增"
,
code
=
"
tn
t:role:add"
)
@Action
(
module
=
"平台端-角色"
,
name
=
"新增"
,
code
=
"
pla
t:role:add"
)
@ApiOperation
(
"新增"
)
@ApiOperation
(
"新增"
)
@PostMapping
(
"add"
)
@PostMapping
(
"add"
)
public
ApiResponseEntity
<
String
>
add
(
@Validated
@RequestBody
PlatRoleDTOVO
dto
)
{
public
ApiResponseEntity
<
String
>
add
(
@Validated
@RequestBody
PlatRoleDTOVO
dto
)
{
return
ApiResponseUtils
.
success
(
platRoleService
.
add
(
dto
));
return
ApiResponseUtils
.
success
(
platRoleService
.
add
(
dto
));
}
}
@Action
(
module
=
"平台端-角色"
,
name
=
"编辑"
,
code
=
"
tn
t:role:edit"
)
@Action
(
module
=
"平台端-角色"
,
name
=
"编辑"
,
code
=
"
pla
t:role:edit"
)
@ApiOperation
(
"编辑"
)
@ApiOperation
(
"编辑"
)
@PostMapping
(
"edit"
)
@PostMapping
(
"edit"
)
public
ApiResponseEntity
<
Void
>
edit
(
@Validated
@RequestBody
PlatRoleDTOVO
dto
)
{
public
ApiResponseEntity
<
Void
>
edit
(
@Validated
@RequestBody
PlatRoleDTOVO
dto
)
{
...
@@ -90,14 +90,14 @@ public class PlatRoleController {
...
@@ -90,14 +90,14 @@ public class PlatRoleController {
return
ApiResponseUtils
.
success
();
return
ApiResponseUtils
.
success
();
}
}
@Action
(
module
=
"平台端-角色"
,
name
=
"详情"
,
code
=
"
tn
t:role:view"
)
@Action
(
module
=
"平台端-角色"
,
name
=
"详情"
,
code
=
"
pla
t:role:view"
)
@ApiOperation
(
"详情"
)
@ApiOperation
(
"详情"
)
@PostMapping
(
"view"
)
@PostMapping
(
"view"
)
public
ApiResponseEntity
<
PlatRoleDTOVO
>
view
(
@RequestBody
BaseIdDTO
dto
)
{
public
ApiResponseEntity
<
PlatRoleDTOVO
>
view
(
@RequestBody
BaseIdDTO
dto
)
{
return
ApiResponseUtils
.
success
(
platRoleService
.
view
(
dto
.
getId
()));
return
ApiResponseUtils
.
success
(
platRoleService
.
view
(
dto
.
getId
()));
}
}
@Action
(
module
=
"平台端-角色"
,
name
=
"删除"
,
code
=
"
tn
t:role:del"
)
@Action
(
module
=
"平台端-角色"
,
name
=
"删除"
,
code
=
"
pla
t:role:del"
)
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
@PostMapping
(
"del"
)
@PostMapping
(
"del"
)
public
ApiResponseEntity
<
Void
>
del
(
@RequestBody
BaseIdDTO
dto
)
{
public
ApiResponseEntity
<
Void
>
del
(
@RequestBody
BaseIdDTO
dto
)
{
...
@@ -105,7 +105,7 @@ public class PlatRoleController {
...
@@ -105,7 +105,7 @@ public class PlatRoleController {
return
ApiResponseUtils
.
success
();
return
ApiResponseUtils
.
success
();
}
}
@Action
(
module
=
"平台端-角色"
,
name
=
"改变状态"
,
code
=
"
tn
t:role:changeStatus"
)
@Action
(
module
=
"平台端-角色"
,
name
=
"改变状态"
,
code
=
"
pla
t:role:changeStatus"
)
@ApiOperation
(
"改变状态"
)
@ApiOperation
(
"改变状态"
)
@PostMapping
(
"changeStatus"
)
@PostMapping
(
"changeStatus"
)
public
ApiResponseEntity
<
Void
>
changeStatus
(
@RequestBody
StatusDTO
dto
)
{
public
ApiResponseEntity
<
Void
>
changeStatus
(
@RequestBody
StatusDTO
dto
)
{
...
@@ -113,7 +113,7 @@ public class PlatRoleController {
...
@@ -113,7 +113,7 @@ public class PlatRoleController {
return
ApiResponseUtils
.
success
();
return
ApiResponseUtils
.
success
();
}
}
@Action
(
module
=
"平台端-角色"
,
name
=
"分配用户"
,
code
=
"
tn
t:role:assignUserList"
)
@Action
(
module
=
"平台端-角色"
,
name
=
"分配用户"
,
code
=
"
pla
t:role:assignUserList"
)
@ApiOperation
(
"分配用户"
)
@ApiOperation
(
"分配用户"
)
@PostMapping
(
"assignUserList"
)
@PostMapping
(
"assignUserList"
)
public
ApiResponseEntity
<
Void
>
assignUserList
(
@RequestBody
List
<
PlatUserRoleDTO
>
userRoleDTOList
)
{
//参数要不要是一个对象里 有一个数组
public
ApiResponseEntity
<
Void
>
assignUserList
(
@RequestBody
List
<
PlatUserRoleDTO
>
userRoleDTOList
)
{
//参数要不要是一个对象里 有一个数组
...
@@ -121,7 +121,7 @@ public class PlatRoleController {
...
@@ -121,7 +121,7 @@ public class PlatRoleController {
return
ApiResponseUtils
.
success
();
return
ApiResponseUtils
.
success
();
}
}
@Action
(
module
=
"平台端-角色"
,
name
=
"删除分配用户"
,
code
=
"
tn
t:role:removeAssignUserList"
)
@Action
(
module
=
"平台端-角色"
,
name
=
"删除分配用户"
,
code
=
"
pla
t:role:removeAssignUserList"
)
@ApiOperation
(
"删除分配用户"
)
@ApiOperation
(
"删除分配用户"
)
@PostMapping
(
"removeAssignUserList"
)
@PostMapping
(
"removeAssignUserList"
)
public
ApiResponseEntity
<
Void
>
removeAssignUserList
(
@RequestBody
List
<
PlatUserRoleDTO
>
userRoleDTOList
)
{
public
ApiResponseEntity
<
Void
>
removeAssignUserList
(
@RequestBody
List
<
PlatUserRoleDTO
>
userRoleDTOList
)
{
...
@@ -129,7 +129,7 @@ public class PlatRoleController {
...
@@ -129,7 +129,7 @@ public class PlatRoleController {
return
ApiResponseUtils
.
success
();
return
ApiResponseUtils
.
success
();
}
}
@Action
(
module
=
"平台端-角色"
,
name
=
"分配菜单"
,
code
=
"
tn
t:role:assignMenuList"
)
@Action
(
module
=
"平台端-角色"
,
name
=
"分配菜单"
,
code
=
"
pla
t:role:assignMenuList"
)
@ApiOperation
(
"分配菜单"
)
@ApiOperation
(
"分配菜单"
)
@Deprecated
@Deprecated
@PostMapping
(
"assignMenuList"
)
@PostMapping
(
"assignMenuList"
)
...
@@ -138,7 +138,7 @@ public class PlatRoleController {
...
@@ -138,7 +138,7 @@ public class PlatRoleController {
return
ApiResponseUtils
.
success
();
return
ApiResponseUtils
.
success
();
}
}
@Action
(
module
=
"平台端-角色"
,
name
=
"获取分配菜单"
,
code
=
"
tn
t:role:getAssignMenuList"
)
@Action
(
module
=
"平台端-角色"
,
name
=
"获取分配菜单"
,
code
=
"
pla
t:role:getAssignMenuList"
)
@ApiOperation
(
"获取分配菜单"
)
@ApiOperation
(
"获取分配菜单"
)
@PostMapping
(
"getAssignMenuList"
)
@PostMapping
(
"getAssignMenuList"
)
public
ApiResponseEntity
<
List
<
PlatRoleMenu
>>
getAssignMenuList
(
@RequestBody
BaseIdDTO
baseIdDTO
)
{
public
ApiResponseEntity
<
List
<
PlatRoleMenu
>>
getAssignMenuList
(
@RequestBody
BaseIdDTO
baseIdDTO
)
{
...
@@ -151,7 +151,7 @@ public class PlatRoleController {
...
@@ -151,7 +151,7 @@ public class PlatRoleController {
return
ApiResponseUtils
.
success
(
platUserService
.
getHotelList
(
deptDTO
.
getOrgId
()));
return
ApiResponseUtils
.
success
(
platUserService
.
getHotelList
(
deptDTO
.
getOrgId
()));
}
}
@Action
(
module
=
"平台端-角色"
,
name
=
"分配管理权限"
,
code
=
"
tn
t:role:assignDeptList"
)
@Action
(
module
=
"平台端-角色"
,
name
=
"分配管理权限"
,
code
=
"
pla
t:role:assignDeptList"
)
@ApiOperation
(
"分配管理权限"
)
@ApiOperation
(
"分配管理权限"
)
@PostMapping
(
"assignDeptList"
)
@PostMapping
(
"assignDeptList"
)
public
ApiResponseEntity
<
Void
>
assignDeptList
(
@RequestBody
PlatRoleDeptDTOVO
roleDeptDTO
)
{
public
ApiResponseEntity
<
Void
>
assignDeptList
(
@RequestBody
PlatRoleDeptDTOVO
roleDeptDTO
)
{
...
@@ -159,14 +159,14 @@ public class PlatRoleController {
...
@@ -159,14 +159,14 @@ public class PlatRoleController {
return
ApiResponseUtils
.
success
();
return
ApiResponseUtils
.
success
();
}
}
@Action
(
module
=
"平台端-角色"
,
name
=
"获取分配管理权限"
,
code
=
"
tn
t:role:getDeptListByRoleId"
)
@Action
(
module
=
"平台端-角色"
,
name
=
"获取分配管理权限"
,
code
=
"
pla
t:role:getDeptListByRoleId"
)
@ApiOperation
(
"获取分配管理权限"
)
@ApiOperation
(
"获取分配管理权限"
)
@PostMapping
(
"getDeptListByRoleId"
)
@PostMapping
(
"getDeptListByRoleId"
)
public
ApiResponseEntity
<
List
<
PlatRoleOrg
>>
getDeptListByRoleId
(
@RequestBody
BaseIdDTO
baseIdDTO
)
{
public
ApiResponseEntity
<
List
<
PlatRoleOrg
>>
getDeptListByRoleId
(
@RequestBody
BaseIdDTO
baseIdDTO
)
{
return
ApiResponseUtils
.
success
(
platRoleService
.
getDeptListByRoleId
(
baseIdDTO
.
getId
()));
return
ApiResponseUtils
.
success
(
platRoleService
.
getDeptListByRoleId
(
baseIdDTO
.
getId
()));
}
}
@Action
(
module
=
"平台端-角色"
,
name
=
"复制角色及关联"
,
code
=
"
tn
t:role:copyRole"
)
@Action
(
module
=
"平台端-角色"
,
name
=
"复制角色及关联"
,
code
=
"
pla
t:role:copyRole"
)
@ApiOperation
(
"复制角色及关联"
)
@ApiOperation
(
"复制角色及关联"
)
@PostMapping
(
"copyRole"
)
@PostMapping
(
"copyRole"
)
public
ApiResponseEntity
<
Void
>
copyRole
(
@RequestBody
BaseIdDTO
baseIdDTO
)
{
public
ApiResponseEntity
<
Void
>
copyRole
(
@RequestBody
BaseIdDTO
baseIdDTO
)
{
...
...
server-common/src/main/java/com/makeit/utils/data/convert/TreeUtil.java
View file @
f037dec3
...
@@ -101,4 +101,20 @@ public class TreeUtil {
...
@@ -101,4 +101,20 @@ public class TreeUtil {
return
StreamUtil
.
join
(
new
ArrayList
<>(
list
),
Function
.
identity
());
return
StreamUtil
.
join
(
new
ArrayList
<>(
list
),
Function
.
identity
());
}
}
public
static
<
T
>
void
fillId
(
List
<
BiConsumer
<
T
,
String
>>
consumerList
,
T
t
,
String
path
,
int
start
)
{
if
(
StringUtils
.
isBlank
(
path
))
{
return
;
}
String
[]
arr
=
path
.
split
(
","
);
for
(
int
i
=
start
;
i
<
arr
.
length
;
i
++)
{
consumerList
.
get
(
i
-
start
).
accept
(
t
,
arr
[
i
-
start
]);
}
}
public
static
<
T
>
void
fillId
(
List
<
BiConsumer
<
T
,
String
>>
consumerList
,
T
t
,
String
path
)
{
fillId
(
consumerList
,
t
,
path
,
0
);
}
}
}
server-common/src/main/java/com/makeit/utils/data/excel/easyexcel/ConfigConverter.java
View file @
f037dec3
...
@@ -60,7 +60,9 @@ public class ConfigConverter implements Converter<String> {
...
@@ -60,7 +60,9 @@ public class ConfigConverter implements Converter<String> {
String
s
=
Arrays
.
stream
(
cellData
.
getStringValue
().
split
(
dictEnumFormat
.
split
())).
filter
(
StringUtils:
:
isNotBlank
).
map
(
m:
:
get
).
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
joining
(
","
));
String
s
=
Arrays
.
stream
(
cellData
.
getStringValue
().
split
(
dictEnumFormat
.
split
())).
filter
(
StringUtils:
:
isNotBlank
).
map
(
m:
:
get
).
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
joining
(
","
));
if
(
StringUtils
.
isBlank
(
s
))
{
if
(
StringUtils
.
isBlank
(
s
))
{
s
=
""
;
//s = "";
s
=
cellData
.
getStringValue
();
}
}
return
s
;
return
s
;
...
@@ -89,7 +91,10 @@ public class ConfigConverter implements Converter<String> {
...
@@ -89,7 +91,10 @@ public class ConfigConverter implements Converter<String> {
String
s
=
Arrays
.
stream
(
value
.
split
(
","
)).
filter
(
StringUtils:
:
isNotBlank
).
map
(
m:
:
get
).
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
joining
(
dictEnumFormat
.
split
().
substring
(
dictEnumFormat
.
split
().
length
()
-
1
)));
String
s
=
Arrays
.
stream
(
value
.
split
(
","
)).
filter
(
StringUtils:
:
isNotBlank
).
map
(
m:
:
get
).
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
joining
(
dictEnumFormat
.
split
().
substring
(
dictEnumFormat
.
split
().
length
()
-
1
)));
if
(
StringUtils
.
isBlank
(
s
))
{
if
(
StringUtils
.
isBlank
(
s
))
{
s
=
""
;
//s = "";
s
=
value
;
}
}
return
new
WriteCellData
(
s
);
return
new
WriteCellData
(
s
);
...
...
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/FallAlarm.java
View file @
f037dec3
...
@@ -47,16 +47,24 @@ public class FallAlarm implements IAlarm {
...
@@ -47,16 +47,24 @@ public class FallAlarm implements IAlarm {
String
deviceId
=
platDevice
.
getOriDeviceId
();
String
deviceId
=
platDevice
.
getOriDeviceId
();
String
personState
=
Convert
.
toStr
(
properties
.
get
(
"personState"
));
String
personState
=
Convert
.
toStr
(
properties
.
get
(
"personState"
));
AlarmRedisDTO
alarmRedisDTO
=
RedisUtil
.
get
(
RedisConst
.
ALARM_DEVICE_FALL_ID
+
deviceId
);
AlarmRedisDTO
alarmRedisDTO
=
RedisUtil
.
get
(
RedisConst
.
ALARM_DEVICE_FALL_ID
+
deviceId
);
if
(
alarmRedisDTO
==
null
){
alarmRedisDTO
=
new
AlarmRedisDTO
();
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
NO
.
getValue
());
RedisUtil
.
set
(
RedisConst
.
ALARM_DEVICE_FALL_ID
+
deviceId
,
alarmRedisDTO
);
}
if
(
StringUtils
.
equals
(
personState
,
CommonEnum
.
YES
.
getValue
()))
{
if
(
StringUtils
.
equals
(
personState
,
CommonEnum
.
YES
.
getValue
()))
{
if
(
StringUtils
.
equals
(
alarmRedisDTO
.
getAlarm
(),
CommonEnum
.
YES
.
getValue
())){
if
(
StringUtils
.
equals
(
alarmRedisDTO
.
getAlarm
(),
CommonEnum
.
YES
.
getValue
())){
log
.
error
(
"长者跌倒,已告警过,设备iot_id:"
+
deviceId
);
log
.
error
(
"长者跌倒,已告警过,设备iot_id:"
+
deviceId
);
return
;
}
}
notice
(
platAlarmCheckDTO
);
notice
(
platAlarmCheckDTO
);
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
YES
.
getValue
());
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
YES
.
getValue
());
RedisUtil
.
set
(
RedisConst
.
ALARM_DEVICE_FALL_ID
,
alarmRedisDTO
);
RedisUtil
.
set
(
RedisConst
.
ALARM_DEVICE_FALL_ID
+
deviceId
,
alarmRedisDTO
);
}
else
{
}
else
{
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
NO
.
getValue
());
if
(
StringUtils
.
equals
(
alarmRedisDTO
.
getAlarm
(),
CommonEnum
.
YES
.
getValue
()))
{
RedisUtil
.
set
(
RedisConst
.
ALARM_DEVICE_FALL_ID
,
alarmRedisDTO
);
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
NO
.
getValue
());
RedisUtil
.
set
(
RedisConst
.
ALARM_DEVICE_FALL_ID
+
deviceId
,
alarmRedisDTO
);
}
}
}
}
}
...
...
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/HeartAlarm.java
View file @
f037dec3
...
@@ -63,7 +63,7 @@ public class HeartAlarm implements IAlarm {
...
@@ -63,7 +63,7 @@ public class HeartAlarm implements IAlarm {
//计数
//计数
AlarmRedisDTO
alarmRedisDTO
=
RedisUtil
.
get
(
RedisConst
.
ALARM_DEVICE_HR_ID
+
deviceId
);
AlarmRedisDTO
alarmRedisDTO
=
RedisUtil
.
get
(
RedisConst
.
ALARM_DEVICE_HR_ID
+
deviceId
);
if
(
StringUtils
.
equals
(
personState
,
CommonEnum
.
NO
.
getValue
()
))
{
if
(
StringUtils
.
equals
Any
(
personState
,
CommonEnum
.
NO
.
getValue
(),
"3"
))
{
RedisUtil
.
delete
(
RedisConst
.
ALARM_DEVICE_HR_ID
+
deviceId
);
RedisUtil
.
delete
(
RedisConst
.
ALARM_DEVICE_HR_ID
+
deviceId
);
return
;
return
;
}
}
...
...
server-service/src/main/java/com/makeit/service/platform/alarm/impl/PlatAlarmConfigServiceImpl.java
View file @
f037dec3
...
@@ -91,7 +91,8 @@ public class PlatAlarmConfigServiceImpl extends ServiceImpl<PlatAlarmConfigMappe
...
@@ -91,7 +91,8 @@ public class PlatAlarmConfigServiceImpl extends ServiceImpl<PlatAlarmConfigMappe
updateById
(
alarmConfig
);
updateById
(
alarmConfig
);
alarmConfigUtil
.
put
(
alarmConfig
);
PlatAlarmConfig
entity
=
getById
(
dto
.
getId
());
alarmConfigUtil
.
put
(
entity
);
}
}
...
@@ -102,7 +103,8 @@ public class PlatAlarmConfigServiceImpl extends ServiceImpl<PlatAlarmConfigMappe
...
@@ -102,7 +103,8 @@ public class PlatAlarmConfigServiceImpl extends ServiceImpl<PlatAlarmConfigMappe
PlatAlarmConfig
alarmConfig
=
BeanDtoVoUtils
.
convert
(
dto
,
PlatAlarmConfig
.
class
);
PlatAlarmConfig
alarmConfig
=
BeanDtoVoUtils
.
convert
(
dto
,
PlatAlarmConfig
.
class
);
updateById
(
alarmConfig
);
updateById
(
alarmConfig
);
alarmConfigUtil
.
put
(
alarmConfig
);
PlatAlarmConfig
entity
=
getById
(
dto
.
getId
());
alarmConfigUtil
.
put
(
entity
);
}
}
...
...
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatOrgServiceImpl.java
View file @
f037dec3
...
@@ -307,7 +307,7 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
...
@@ -307,7 +307,7 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
public
void
edit
(
PlatOrg
dto
)
{
public
void
edit
(
PlatOrg
dto
)
{
check
(
dto
);
check
(
dto
);
PlatOrg
platOrg
=
this
.
getById
(
dto
.
getId
());
PlatOrg
platOrg
=
this
.
getById
(
dto
.
getId
());
if
(
StringUtils
.
isBlank
(
dto
.
getParentId
())||
StringUtils
.
equals
(
dto
.
getParentId
(),
"1"
))
{
if
(
StringUtils
.
isBlank
(
dto
.
getParentId
())||
StringUtils
.
equals
(
dto
.
getParentId
(),
TreeConst
.
TOP_LEVEL
))
{
}
else
{
}
else
{
PlatOrg
parent
=
getById
(
dto
.
getParentId
());
PlatOrg
parent
=
getById
(
dto
.
getParentId
());
dto
.
setPath
(
parent
.
getPath
()
+
","
+
parent
.
getId
());
dto
.
setPath
(
parent
.
getPath
()
+
","
+
parent
.
getId
());
...
@@ -316,7 +316,9 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
...
@@ -316,7 +316,9 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
if
(!
StringUtils
.
equals
(
dto
.
getType
(),
platOrg
.
getType
())){
if
(!
StringUtils
.
equals
(
dto
.
getType
(),
platOrg
.
getType
())){
LambdaUpdateWrapper
<
PlatSpace
>
platSpaceLambdaUpdateWrapper
=
Wrappers
.
lambdaUpdate
(
PlatSpace
.
class
)
LambdaUpdateWrapper
<
PlatSpace
>
platSpaceLambdaUpdateWrapper
=
Wrappers
.
lambdaUpdate
(
PlatSpace
.
class
)
.
set
(
PlatSpace:
:
getAttribute
,
dto
.
getType
())
.
set
(
PlatSpace:
:
getAttribute
,
dto
.
getType
())
.
eq
(
PlatSpace:
:
getOrgId
,
dto
.
getId
());
.
eq
(
PlatSpace:
:
getOrgId
,
dto
.
getId
())
.
set
(
PlatSpace:
:
getParentId
,
dto
.
getParentId
())
;
platSpaceService
.
update
(
platSpaceLambdaUpdateWrapper
);
platSpaceService
.
update
(
platSpaceLambdaUpdateWrapper
);
}
}
...
...
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatUserServiceImpl.java
View file @
f037dec3
...
@@ -427,8 +427,11 @@ public class PlatUserServiceImpl extends ServiceImpl<PlatUserMapper, PlatUser>
...
@@ -427,8 +427,11 @@ public class PlatUserServiceImpl extends ServiceImpl<PlatUserMapper, PlatUser>
}
}
String
path
=
platOrg
.
getPath
();
String
path
=
platOrg
.
getPath
();
String
[]
split
=
StringUtils
.
split
(
path
,
","
);
String
[]
split
=
StringUtils
.
split
(
path
,
","
);
ArrayList
<
String
>
orgIdList
=
new
ArrayList
<>();
orgIdList
.
addAll
(
Arrays
.
asList
(
split
));
orgIdList
.
add
(
orgId
);
LambdaQueryWrapper
<
PlatOrg
>
platOrgLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
PlatOrg
>
platOrgLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
platOrgLambdaQueryWrapper
.
in
(
BaseEntity:
:
getId
,
spli
t
)
platOrgLambdaQueryWrapper
.
in
(
BaseEntity:
:
getId
,
orgIdLis
t
)
.
eq
(
PlatOrg:
:
getStatus
,
CommonEnum
.
NO
.
getValue
());
.
eq
(
PlatOrg:
:
getStatus
,
CommonEnum
.
NO
.
getValue
());
long
count
=
platOrgService
.
count
(
platOrgLambdaQueryWrapper
);
long
count
=
platOrgService
.
count
(
platOrgLambdaQueryWrapper
);
if
(
count
>
0
)
{
if
(
count
>
0
)
{
...
...
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderDayReportWeekServiceImpl.java
View file @
f037dec3
...
@@ -367,15 +367,15 @@ public class PlatElderDayReportWeekServiceImpl implements PlatElderDayReportWeek
...
@@ -367,15 +367,15 @@ public class PlatElderDayReportWeekServiceImpl implements PlatElderDayReportWeek
String
finalDeviceId
=
deviceId
;
String
finalDeviceId
=
deviceId
;
String
finalOriDeviceId
=
oriDeviceId
;
String
finalOriDeviceId
=
oriDeviceId
;
lambdaQueryWrapper
.
and
(
qw
->
{
lambdaQueryWrapper
.
and
(
StringUtils
.
isNotBlank
(
platElderIdDTO
.
getElderId
())
||
StringUtils
.
isNotBlank
(
finalDeviceId
)
||
StringUtils
.
isNotBlank
(
finalOriDeviceId
),
qw
->
{
if
(
StringUtils
.
isNotBlank
(
platElderIdDTO
.
getElderId
()))
{
if
(
StringUtils
.
isNotBlank
(
platElderIdDTO
.
getElderId
()))
{
lambdaQueryWrapper
.
eq
(
PlatElderBreatheDayStat:
:
getElderId
,
platElderIdDTO
.
getElderId
());
qw
.
eq
(
PlatElderBreatheDayStat:
:
getElderId
,
platElderIdDTO
.
getElderId
());
}
}
if
(
StringUtils
.
isNotBlank
(
finalDeviceId
))
{
if
(
StringUtils
.
isNotBlank
(
finalDeviceId
))
{
lambdaQueryWrapper
.
or
().
eq
(
PlatElderBreatheDayStat:
:
getDeviceId
,
finalDeviceId
);
qw
.
or
().
eq
(
PlatElderBreatheDayStat:
:
getDeviceId
,
finalDeviceId
);
}
}
if
(
StringUtils
.
isNotBlank
(
finalOriDeviceId
))
{
if
(
StringUtils
.
isNotBlank
(
finalOriDeviceId
))
{
lambdaQueryWrapper
.
or
().
eq
(
PlatElderBreatheDayStat:
:
getOriDeviceId
,
finalOriDeviceId
);
qw
.
or
().
eq
(
PlatElderBreatheDayStat:
:
getOriDeviceId
,
finalOriDeviceId
);
}
}
});
});
...
...
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderServiceImpl.java
View file @
f037dec3
...
@@ -258,6 +258,12 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
...
@@ -258,6 +258,12 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
List
<
TreeDTOVO
>
treeList
=
BeanDtoVoUtils
.
listVo
(
spaceList
,
TreeDTOVO
.
class
);
List
<
TreeDTOVO
>
treeList
=
BeanDtoVoUtils
.
listVo
(
spaceList
,
TreeDTOVO
.
class
);
treeList
.
forEach
(
e
->{
if
(
StringUtils
.
isBlank
(
e
.
getParentId
())){
e
.
setParentId
(
TreeConst
.
TOP_LEVEL
);
}
});
List
<
PlatRoom
>
roomList
=
platRoomService
.
list
(
new
QueryWrapper
<
PlatRoom
>().
lambda
()
List
<
PlatRoom
>
roomList
=
platRoomService
.
list
(
new
QueryWrapper
<
PlatRoom
>().
lambda
()
.
in
(
PlatRoom:
:
getName
,
spaceNameList
));
.
in
(
PlatRoom:
:
getName
,
spaceNameList
));
...
@@ -418,7 +424,7 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
...
@@ -418,7 +424,7 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
spaceIdList
=
new
ArrayList
<>(
10
);
spaceIdList
=
new
ArrayList
<>(
10
);
spaceIdList
.
add
(
lastSpaceId
);
spaceIdList
.
add
(
lastSpaceId
);
for
(
int
j
=
0
;
j
<=
2
;
j
++)
{
for
(
int
j
=
0
;
j
<=
1
;
j
++)
{
String
id
=
null
;
String
id
=
null
;
Map
<
String
,
TreeDTOVO
>
nameAreaMap
=
parentIdName
.
get
(
spaceIdList
.
get
(
j
));
Map
<
String
,
TreeDTOVO
>
nameAreaMap
=
parentIdName
.
get
(
spaceIdList
.
get
(
j
));
...
@@ -786,7 +792,7 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
...
@@ -786,7 +792,7 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
platBedService
.
changeStatus
(
statusDTO
);
platBedService
.
changeStatus
(
statusDTO
);
if
(
CommonEnum
.
YES
.
getValue
().
equals
(
dto
.
getDelRoomStatus
()))
{
if
(
CommonEnum
.
YES
.
getValue
().
equals
(
dto
.
getDelRoomStatus
()))
{
platRoomService
.
delCascade
(
Arrays
.
asList
(
platBedService
.
getById
(
db
.
getBedId
()
).
getRoomId
()));
platRoomService
.
delCascade
(
Arrays
.
asList
(
platBedService
.
getById
(
bedId
).
getRoomId
()));
}
}
}
}
...
...
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatSpaceServiceImpl.java
View file @
f037dec3
...
@@ -114,7 +114,7 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
...
@@ -114,7 +114,7 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
//上级空间
//上级空间
PlatSpace
parentSpace
=
this
.
getById
(
dto
.
getParentId
());
PlatSpace
parentSpace
=
this
.
getById
(
dto
.
getParentId
());
if
(
parentSpace
.
getParentPath
().
contains
(
dto
.
getId
()))
{
if
(
parentSpace
!=
null
&&
parentSpace
.
getParentPath
().
contains
(
dto
.
getId
()))
{
throw
new
BusinessException
(
CodeMessageEnum
.
PLATFORM_ERROR_SPACE_NOT_DEL
);
throw
new
BusinessException
(
CodeMessageEnum
.
PLATFORM_ERROR_SPACE_NOT_DEL
);
}
}
...
...
server-service/src/main/java/com/makeit/service/platform/workstation/impl/WorkStationServiceImpl.java
View file @
f037dec3
...
@@ -160,7 +160,9 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -160,7 +160,9 @@ public class WorkStationServiceImpl implements WorkStationService {
if
(
spaces
.
isEmpty
())
{
if
(
spaces
.
isEmpty
())
{
return
new
PageVO
<>();
return
new
PageVO
<>();
}
}
List
<
String
>
spaceIds
=
spaces
.
stream
().
map
(
PlatSpace:
:
getId
).
collect
(
Collectors
.
toList
());
dto
.
setOrgIds
(
orgIds
);
dto
.
setOrgIds
(
orgIds
);
dto
.
setSpaceIds
(
spaceIds
);
}
else
{
}
else
{
//获取父级的所有子级空间
//获取父级的所有子级空间
spaces
=
platSpaceService
.
listChild
(
dto
.
getSpaceIds
());
spaces
=
platSpaceService
.
listChild
(
dto
.
getSpaceIds
());
...
@@ -172,6 +174,7 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -172,6 +174,7 @@ public class WorkStationServiceImpl implements WorkStationService {
.
eq
(
StringUtil
.
isNotEmpty
(
dto
.
getAlarmType
()),
PlatAlarmRecord:
:
getAlarmType
,
dto
.
getAlarmType
())
.
eq
(
StringUtil
.
isNotEmpty
(
dto
.
getAlarmType
()),
PlatAlarmRecord:
:
getAlarmType
,
dto
.
getAlarmType
())
.
eq
(
PlatAlarmRecord:
:
getStatus
,
PlatAlarmRecordEnum
.
AlarmRecordStatusEnum
.
UNHANDLED
.
getValue
())
.
eq
(
PlatAlarmRecord:
:
getStatus
,
PlatAlarmRecordEnum
.
AlarmRecordStatusEnum
.
UNHANDLED
.
getValue
())
.
in
(
PlatAlarmRecord:
:
getOrgId
,
dto
.
getOrgIds
())
.
in
(
PlatAlarmRecord:
:
getOrgId
,
dto
.
getOrgIds
())
.
orderByDesc
(
PlatAlarmRecord:
:
getAlarmDate
)
);
);
List
<
String
>
elderIds
=
alarmRecords
.
stream
().
filter
(
t
->
StringUtil
.
isNotEmpty
(
t
.
getElderIds
()))
List
<
String
>
elderIds
=
alarmRecords
.
stream
().
filter
(
t
->
StringUtil
.
isNotEmpty
(
t
.
getElderIds
()))
.
map
(
PlatAlarmRecord:
:
getElderIds
).
collect
(
Collectors
.
toList
());
.
map
(
PlatAlarmRecord:
:
getElderIds
).
collect
(
Collectors
.
toList
());
...
@@ -180,6 +183,9 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -180,6 +183,9 @@ public class WorkStationServiceImpl implements WorkStationService {
elderIdList
.
addAll
(
Arrays
.
asList
(
e
.
split
(
","
)));
elderIdList
.
addAll
(
Arrays
.
asList
(
e
.
split
(
","
)));
});
});
if
(
StringUtil
.
isNotEmpty
(
dto
.
getAlarmType
())){
if
(
StringUtil
.
isNotEmpty
(
dto
.
getAlarmType
())){
if
(
elderIdList
.
isEmpty
()){
return
new
PageVO
<>();
}
dto
.
setElderIds
(
elderIdList
);
dto
.
setElderIds
(
elderIdList
);
}
}
...
@@ -238,17 +244,22 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -238,17 +244,22 @@ public class WorkStationServiceImpl implements WorkStationService {
if
(
PlatAlarmConfigEnum
.
AlarmTypeEnum
.
HEART
.
getValue
().
equals
(
a
.
getAlarmType
())
if
(
PlatAlarmConfigEnum
.
AlarmTypeEnum
.
HEART
.
getValue
().
equals
(
a
.
getAlarmType
())
||
PlatAlarmConfigEnum
.
AlarmTypeEnum
.
BREATHE
.
getValue
().
equals
(
a
.
getAlarmType
())
||
PlatAlarmConfigEnum
.
AlarmTypeEnum
.
BREATHE
.
getValue
().
equals
(
a
.
getAlarmType
())
){
){
if
(
typeMap
.
containsKey
(
a
.
getAlarmType
())){
if
(!
typeMap
.
containsKey
(
a
.
getAlarmType
())){
if
(
StringUtil
.
isNotEmpty
(
a
.
getRemark
())){
String
remark
=
typeMap
.
get
(
a
.
getAlarmType
())+
","
+
a
.
getRemark
();
typeMap
.
put
(
a
.
getAlarmType
(),
remark
);
}
}
else
{
if
(
StringUtil
.
isNotEmpty
(
a
.
getRemark
())){
if
(
StringUtil
.
isNotEmpty
(
a
.
getRemark
())){
typeMap
.
put
(
a
.
getAlarmType
(),
a
.
getRemark
());
typeMap
.
put
(
a
.
getAlarmType
(),
a
.
getRemark
());
}
}
}
}
// if(typeMap.containsKey(a.getAlarmType())){
// if(StringUtil.isNotEmpty(a.getRemark())){
// String remark = typeMap.get(a.getAlarmType())+","+a.getRemark();
// typeMap.put(a.getAlarmType(),remark);
// }
//
// }else {
// if(StringUtil.isNotEmpty(a.getRemark())){
// typeMap.put(a.getAlarmType(),a.getRemark());
// }
// }
}
else
{
}
else
{
typeMap
.
put
(
a
.
getAlarmType
(),
""
);
typeMap
.
put
(
a
.
getAlarmType
(),
""
);
}
}
...
@@ -348,6 +359,8 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -348,6 +359,8 @@ public class WorkStationServiceImpl implements WorkStationService {
if
(
spaces
.
isEmpty
())
{
if
(
spaces
.
isEmpty
())
{
return
new
PageVO
<>();
return
new
PageVO
<>();
}
}
List
<
String
>
spaceIds
=
spaces
.
stream
().
map
(
PlatSpace:
:
getId
).
collect
(
Collectors
.
toList
());
dto
.
setSpaceIds
(
spaceIds
);
}
else
{
}
else
{
//获取父级的所有子级空间
//获取父级的所有子级空间
spaces
=
platSpaceService
.
listChild
(
dto
.
getSpaceIds
());
spaces
=
platSpaceService
.
listChild
(
dto
.
getSpaceIds
());
...
@@ -359,6 +372,7 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -359,6 +372,7 @@ public class WorkStationServiceImpl implements WorkStationService {
.
eq
(
StringUtil
.
isNotEmpty
(
dto
.
getAlarmType
()),
PlatAlarmRecord:
:
getAlarmType
,
dto
.
getAlarmType
())
.
eq
(
StringUtil
.
isNotEmpty
(
dto
.
getAlarmType
()),
PlatAlarmRecord:
:
getAlarmType
,
dto
.
getAlarmType
())
.
eq
(
PlatAlarmRecord:
:
getStatus
,
PlatAlarmRecordEnum
.
AlarmRecordStatusEnum
.
UNHANDLED
.
getValue
())
.
eq
(
PlatAlarmRecord:
:
getStatus
,
PlatAlarmRecordEnum
.
AlarmRecordStatusEnum
.
UNHANDLED
.
getValue
())
.
in
(
PlatAlarmRecord:
:
getOrgId
,
dto
.
getOrgIds
())
.
in
(
PlatAlarmRecord:
:
getOrgId
,
dto
.
getOrgIds
())
.
orderByDesc
(
PlatAlarmRecord:
:
getAlarmDate
)
);
);
List
<
String
>
elderIds
=
alarmRecords
.
stream
().
filter
(
t
->
StringUtil
.
isNotEmpty
(
t
.
getElderIds
()))
List
<
String
>
elderIds
=
alarmRecords
.
stream
().
filter
(
t
->
StringUtil
.
isNotEmpty
(
t
.
getElderIds
()))
.
map
(
PlatAlarmRecord:
:
getElderIds
).
collect
(
Collectors
.
toList
());
.
map
(
PlatAlarmRecord:
:
getElderIds
).
collect
(
Collectors
.
toList
());
...
@@ -368,6 +382,9 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -368,6 +382,9 @@ public class WorkStationServiceImpl implements WorkStationService {
elderIdList
.
addAll
(
Arrays
.
asList
(
e
.
split
(
","
)));
elderIdList
.
addAll
(
Arrays
.
asList
(
e
.
split
(
","
)));
});
});
if
(
StringUtil
.
isNotEmpty
(
dto
.
getAlarmType
())){
if
(
StringUtil
.
isNotEmpty
(
dto
.
getAlarmType
())){
if
(
elderIdList
.
isEmpty
()){
return
new
PageVO
<>();
}
dto
.
setElderIds
(
elderIdList
);
dto
.
setElderIds
(
elderIdList
);
}
}
...
...
server-service/src/main/java/com/makeit/service/wechat/impl/PlatElderCenterWechatServiceImpl.java
View file @
f037dec3
...
@@ -78,6 +78,7 @@ public class PlatElderCenterWechatServiceImpl implements PlatElderCenterWechatSe
...
@@ -78,6 +78,7 @@ public class PlatElderCenterWechatServiceImpl implements PlatElderCenterWechatSe
new
QueryWrapper
<
PlatAlarmRecord
>().
lambda
()
new
QueryWrapper
<
PlatAlarmRecord
>().
lambda
()
.
eq
(
PlatAlarmRecord:
:
getStatus
,
PlatAlarmRecordEnum
.
AlarmRecordStatusEnum
.
UNHANDLED
.
getValue
())
.
eq
(
PlatAlarmRecord:
:
getStatus
,
PlatAlarmRecordEnum
.
AlarmRecordStatusEnum
.
UNHANDLED
.
getValue
())
.
eq
(
PlatAlarmRecord:
:
getOrgId
,
space
.
getOrgId
())
.
eq
(
PlatAlarmRecord:
:
getOrgId
,
space
.
getOrgId
())
.
orderByDesc
(
PlatAlarmRecord:
:
getAlarmDate
)
);
);
//长者对应的报警类型
//长者对应的报警类型
Map
<
String
,
Map
<
String
,
String
>>
elderAlarmTypeMap
=
workStationService
.
mapElderAlarmType
(
alarmRecords
);
Map
<
String
,
Map
<
String
,
String
>>
elderAlarmTypeMap
=
workStationService
.
mapElderAlarmType
(
alarmRecords
);
...
@@ -133,6 +134,7 @@ public class PlatElderCenterWechatServiceImpl implements PlatElderCenterWechatSe
...
@@ -133,6 +134,7 @@ public class PlatElderCenterWechatServiceImpl implements PlatElderCenterWechatSe
new
QueryWrapper
<
PlatAlarmRecord
>().
lambda
()
new
QueryWrapper
<
PlatAlarmRecord
>().
lambda
()
.
eq
(
PlatAlarmRecord:
:
getStatus
,
PlatAlarmRecordEnum
.
AlarmRecordStatusEnum
.
UNHANDLED
.
getValue
())
.
eq
(
PlatAlarmRecord:
:
getStatus
,
PlatAlarmRecordEnum
.
AlarmRecordStatusEnum
.
UNHANDLED
.
getValue
())
.
eq
(
PlatAlarmRecord:
:
getOrgId
,
space
.
getOrgId
())
.
eq
(
PlatAlarmRecord:
:
getOrgId
,
space
.
getOrgId
())
.
orderByDesc
(
PlatAlarmRecord:
:
getAlarmDate
)
);
);
WorkStationQueryDTO
queryDTO
=
new
WorkStationQueryDTO
();
WorkStationQueryDTO
queryDTO
=
new
WorkStationQueryDTO
();
queryDTO
.
setSpaceIds
(
spaceIds
);
queryDTO
.
setSpaceIds
(
spaceIds
);
...
...
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