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
a0bd3be4
Commit
a0bd3be4
authored
Sep 21, 2022
by
纪旭 韦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人员字典标签修改密码
parent
ea4ea9f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
performance/Performance.Services/PersonService.cs
+13
-3
No files found.
performance/Performance.Services/PersonService.cs
View file @
a0bd3be4
...
...
@@ -984,7 +984,7 @@ public ApiResponse BathSavePerson(int allotId, int HospitalId, SaveCollectData r
var
backupTab
=
perforPeremployeeBackupRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
);
employees
.
ForEach
(
e
=>
{
var
result
=
backupTab
.
FirstOrDefault
(
d
=>
d
.
PersonnelNumber
.
Replace
(
" "
,
""
)
==
e
.
PersonnelNumber
.
Replace
(
" "
,
""
)
&&
d
.
AllotId
==
e
.
AllotId
&&
d
.
HospitalId
==
e
.
HospitalId
);
var
result
=
backupTab
.
FirstOrDefault
(
d
=>
d
.
PersonnelNumber
.
Replace
(
" "
,
""
)
==
e
.
PersonnelNumber
.
Replace
(
" "
,
""
)
&&
d
.
AllotId
==
e
.
AllotId
&&
d
.
HospitalId
==
e
.
HospitalId
);
if
(
result
!=
null
)
{
e
.
JobNumber
=
result
.
JobNumber
;
...
...
@@ -1317,6 +1317,7 @@ public void SaveQueryRole(int hospitalId, int userId, List<Dictionary<string, st
var
users
=
perforUserRepository
.
GetEntities
(
t
=>
userRole
.
Contains
(
t
.
ID
));
var
newUsers
=
new
List
<
string
[
]>
();
var
updateUsers
=
new
List
<
sys_user
>();
foreach
(
var
item
in
dicData
)
{
var
json
=
JsonHelper
.
Serialize
(
item
);
...
...
@@ -1324,13 +1325,22 @@ public void SaveQueryRole(int hospitalId, int userId, List<Dictionary<string, st
if
(
hospital
.
IsOwnerQuery
==
1
)
{
var
isNewRole
=
!
string
.
IsNullOrEmpty
(
data
.
PersonnelNumber
?.
Trim
())
&&
!
string
.
IsNullOrEmpty
(
item
[
"Password"
]);
var
isRepeat
=
users
!=
null
&&
users
.
Any
(
t
=>
t
.
Login
==
data
.
PersonnelNumber
?.
Trim
());
if
(
isNewRole
&&
!
isRepeat
)
var
isRepeat
=
users
.
FirstOrDefault
(
t
=>
t
.
Login
==
data
.
PersonnelNumber
?.
Trim
());
if
(
isRepeat
!=
null
)
{
isRepeat
.
Password
=
item
[
"Password"
];
updateUsers
.
Add
(
isRepeat
);
}
if
(
isNewRole
&&
isRepeat
==
null
)
{
newUsers
.
Add
(
new
[]
{
$"
{
data
.
DoctorName
?.
Trim
()}
"
,
$"
{
data
.
PersonnelNumber
?.
Trim
()}
"
,
$"
{
item
[
"Password"
]}
"
,
""
,
""
,
"绩效查询"
,
$"
{
hospital
.
HosName
}
"
,
$"
{
data
.
AccountingUnit
?.
Trim
()}
"
});
}
}
}
if
(
updateUsers
.
Count
>
0
)
{
perforUserRepository
.
UpdateRange
(
updateUsers
.
ToArray
());
}
if
(
newUsers
.
Count
>
0
)
{
usercollor
.
Data
=
newUsers
.
ToArray
();
...
...
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