Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart-office-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
赵啸非
smart-office-platform
Commits
a630c1ab
Commit
a630c1ab
authored
May 26, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改同步用户
parent
695a0e37
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
15 deletions
+20
-15
smart-office-manager-ui/admin/src/views/gocome/record/list.vue
...-office-manager-ui/admin/src/views/gocome/record/list.vue
+2
-10
smart-office-manager-ui/admin/src/views/workman/drawershow.vue
...-office-manager-ui/admin/src/views/workman/drawershow.vue
+4
-0
smart-office-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
...a/com/mortals/xhx/module/device/web/DeviceController.java
+14
-5
No files found.
smart-office-manager-ui/admin/src/views/gocome/record/list.vue
View file @
a630c1ab
...
...
@@ -76,16 +76,8 @@
{
label
:
"
修改后状态
"
,
prop
:
"
afterStatus
"
},
{
label
:
"
更新时间
"
,
prop
:
"
updateTime
"
,
formatter
:
this
.
formatterDate
},
{
label
:
"
操作
"
,
width
:
240
,
formatter
:
row
=>
{
return
(
<
table
-
buttons
noAdd
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
);
}
}
{
label
:
"
修改时间
"
,
prop
:
"
createTime
"
,
formatter
:
this
.
formatterDate
},
]
}
};
...
...
smart-office-manager-ui/admin/src/views/workman/drawershow.vue
View file @
a630c1ab
...
...
@@ -76,6 +76,10 @@
roomId
:
[
{
required
:
true
,
message
:
"
请选择人员所属房间
"
,
trigger
:
"
blur
"
}
],
phone
:
[
{
required
:
true
,
message
:
"
请输入电话号码
"
,
trigger
:
"
blur
"
},
{
max
:
64
,
message
:
"
最多只能录入64个字符
"
,
trigger
:
"
blur
"
,},
],
mobile
:
[
{
required
:
true
,
message
:
"
请输入手机号码
"
,
trigger
:
"
blur
"
},
{
max
:
64
,
message
:
"
最多只能录入64个字符
"
,
trigger
:
"
blur
"
,},
...
...
smart-office-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
View file @
a630c1ab
...
...
@@ -3,9 +3,11 @@ import com.mortals.framework.common.Rest;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.EnabledEnum
;
import
com.mortals.xhx.module.device.model.DeviceQuery
;
import
com.mortals.xhx.module.room.model.RoomQuery
;
import
com.mortals.xhx.module.room.service.RoomService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -18,12 +20,10 @@ import com.mortals.xhx.module.device.model.DeviceEntity;
import
com.mortals.xhx.module.device.service.DeviceService
;
import
org.apache.commons.lang3.ArrayUtils
;
import
com.mortals.framework.util.StringUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.alibaba.fastjson.JSONObject
;
import
java.util.Arrays
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.*;
...
...
@@ -56,8 +56,17 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
this
.
addDict
(
model
,
"deviceInFloor"
,
paramService
.
getParamBySecondOrganize
(
"Device"
,
"deviceInFloor"
));
this
.
addDict
(
model
,
"deviceStatus"
,
paramService
.
getParamBySecondOrganize
(
"Device"
,
"deviceStatus"
));
this
.
addDict
(
model
,
"enabled"
,
paramService
.
getParamBySecondOrganize
(
"Device"
,
"enabled"
));
this
.
addDict
(
model
,
"roomId"
,
roomService
.
find
(
new
RoomQuery
()).
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getRoomName
(),
(
o
,
n
)
->
n
)));
DeviceEntity
entity
=
(
DeviceEntity
)
model
.
get
(
"entity"
);
if
(!
ObjectUtils
.
isEmpty
(
entity
)&&
entity
.
newEntity
()){
Set
<
Long
>
roomSet
=
this
.
service
.
find
(
new
DeviceQuery
()).
stream
().
map
(
item
->
item
.
getRoomId
()).
collect
(
Collectors
.
toSet
());
//排除已经有设备的房间
Map
<
String
,
String
>
roomMap
=
roomService
.
find
(
new
RoomQuery
()).
stream
().
filter
(
f
->
roomSet
.
contains
(
f
.
getId
())).
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getRoomName
(),
(
o
,
n
)
->
n
));
this
.
addDict
(
model
,
"roomId"
,
roomMap
);
}
else
{
Map
<
String
,
String
>
roomMap
=
roomService
.
find
(
new
RoomQuery
()).
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getRoomName
(),
(
o
,
n
)
->
n
));
this
.
addDict
(
model
,
"roomId"
,
roomMap
);
}
super
.
init
(
model
,
context
);
}
...
...
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