Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zry
performance
Commits
b0df5767
Commit
b0df5767
authored
May 20, 2021
by
钟博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改用户批量表头顺序
parent
6769256d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
performance/Performance.Api/Controllers/AccountController.cs
+3
-0
performance/Performance.Services/UserService.cs
+6
-3
No files found.
performance/Performance.Api/Controllers/AccountController.cs
View file @
b0df5767
...
@@ -396,6 +396,9 @@ public ApiResponse BatchSaveUser([FromBody] UserCollectData data)
...
@@ -396,6 +396,9 @@ public ApiResponse BatchSaveUser([FromBody] UserCollectData data)
var
result
=
_userService
.
SaveUserHandsFlat
(
data
);
var
result
=
_userService
.
SaveUserHandsFlat
(
data
);
switch
(
result
)
switch
(
result
)
{
{
case
0
:
//hack:后续根据accounting更改提示信息
return
new
ApiResponse
(
ResponseType
.
Error
,
"科室字典为空"
);
case
1
:
case
1
:
return
new
ApiResponse
(
ResponseType
.
OK
);
return
new
ApiResponse
(
ResponseType
.
OK
);
case
2
:
case
2
:
...
...
performance/Performance.Services/UserService.cs
View file @
b0df5767
...
@@ -732,7 +732,9 @@ public int SaveUserHandsFlat(UserCollectData request)
...
@@ -732,7 +732,9 @@ public int SaveUserHandsFlat(UserCollectData request)
var
getUsers
=
_userRepository
.
GetEntities
();
var
getUsers
=
_userRepository
.
GetEntities
();
var
roles
=
_roleRepository
.
GetEntities
();
var
roles
=
_roleRepository
.
GetEntities
();
var
hospitals
=
_hospitalRepository
.
GetEntities
();
var
hospitals
=
_hospitalRepository
.
GetEntities
();
var
depts
=
_perdeptdicRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
).
Select
(
w
=>
w
.
Department
).
Distinct
();
//hack:后续修改为accounting中的数据
var
depts
=
_perdeptdicRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
)?.
Select
(
w
=>
w
.
Department
).
Distinct
();
List
<
sys_user
>
users
=
new
List
<
sys_user
>();
List
<
sys_user
>
users
=
new
List
<
sys_user
>();
List
<
sys_user_role
>
userRoles
=
new
List
<
sys_user_role
>();
List
<
sys_user_role
>
userRoles
=
new
List
<
sys_user_role
>();
List
<
sys_user_hospital
>
userHoss
=
new
List
<
sys_user_hospital
>();
List
<
sys_user_hospital
>
userHoss
=
new
List
<
sys_user_hospital
>();
...
@@ -742,7 +744,8 @@ public int SaveUserHandsFlat(UserCollectData request)
...
@@ -742,7 +744,8 @@ public int SaveUserHandsFlat(UserCollectData request)
var
json
=
JsonHelper
.
Serialize
(
item
);
var
json
=
JsonHelper
.
Serialize
(
item
);
var
data
=
JsonHelper
.
Deserialize
<
UserHandsResponse
>(
json
);
var
data
=
JsonHelper
.
Deserialize
<
UserHandsResponse
>(
json
);
if
(
users
.
Any
(
c
=>
c
.
Login
==
data
.
Login
)
||
getUsers
.
Any
(
c
=>
c
.
Login
==
data
?.
Login
))
return
2
;
if
(
roleArr
.
Contains
(
data
.
RoleName
)
&&
(
depts
==
null
||
!
depts
.
Any
()))
return
0
;
if
(
users
.
Any
(
c
=>
c
.
Login
==
data
?.
Login
)
||
getUsers
.
Any
(
c
=>
c
.
Login
==
data
?.
Login
))
return
2
;
if
(
roleArr
.
Contains
(
data
.
RoleName
)
&&
!
depts
.
Any
(
t
=>
t
==
data
.
Department
))
return
3
;
if
(
roleArr
.
Contains
(
data
.
RoleName
)
&&
!
depts
.
Any
(
t
=>
t
==
data
.
Department
))
return
3
;
if
(!
string
.
IsNullOrEmpty
(
data
.
Login
)
&&
!
string
.
IsNullOrEmpty
(
data
.
RealName
)
&&
!
string
.
IsNullOrEmpty
(
data
.
HosName
))
if
(!
string
.
IsNullOrEmpty
(
data
.
Login
)
&&
!
string
.
IsNullOrEmpty
(
data
.
RealName
)
&&
!
string
.
IsNullOrEmpty
(
data
.
HosName
))
...
@@ -796,8 +799,8 @@ public int SaveUserHandsFlat(UserCollectData request)
...
@@ -796,8 +799,8 @@ public int SaveUserHandsFlat(UserCollectData request)
{
nameof
(
sys_user
.
Mobile
),
"手机号码"
},
{
nameof
(
sys_user
.
Mobile
),
"手机号码"
},
{
nameof
(
sys_user
.
Mail
),
"邮箱"
},
{
nameof
(
sys_user
.
Mail
),
"邮箱"
},
{
nameof
(
sys_role
.
RoleName
),
"角色"
},
{
nameof
(
sys_role
.
RoleName
),
"角色"
},
{
nameof
(
sys_user
.
Department
),
"核算单元"
},
{
nameof
(
sys_hospital
.
HosName
),
"分配医院"
},
{
nameof
(
sys_hospital
.
HosName
),
"分配医院"
},
{
nameof
(
sys_user
.
Department
),
"核算单元"
},
};
};
private
List
<
Dictionary
<
string
,
string
>>
CreateDataRow
(
UserCollectData
request
,
Dictionary
<
string
,
string
>
config
)
private
List
<
Dictionary
<
string
,
string
>>
CreateDataRow
(
UserCollectData
request
,
Dictionary
<
string
,
string
>
config
)
...
...
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