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
0f1f0e75
Commit
0f1f0e75
authored
Jun 28, 2021
by
钟博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
粘贴数据过滤
parent
30a3a895
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
performance/Performance.Services/PersonService.cs
+11
-3
No files found.
performance/Performance.Services/PersonService.cs
View file @
0f1f0e75
...
@@ -720,6 +720,7 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
...
@@ -720,6 +720,7 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
var
dicData
=
CreateDataRow
(
request
,
dict
);
var
dicData
=
CreateDataRow
(
request
,
dict
);
List
<
per_employee
>
employees
=
new
List
<
per_employee
>();
List
<
per_employee
>
employees
=
new
List
<
per_employee
>();
var
persons
=
peremployeeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
HospitalId
&&
t
.
AllotId
==
AllotId
);
var
persons
=
peremployeeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
HospitalId
&&
t
.
AllotId
==
AllotId
);
var
delPersonsNum
=
new
List
<
string
>();
foreach
(
var
item
in
dicData
)
foreach
(
var
item
in
dicData
)
{
{
if
(!
string
.
IsNullOrEmpty
(
item
[
"AttendanceDay"
])
&&
!
string
.
IsNullOrEmpty
(
item
[
"ReservedRatio"
]))
if
(!
string
.
IsNullOrEmpty
(
item
[
"AttendanceDay"
])
&&
!
string
.
IsNullOrEmpty
(
item
[
"ReservedRatio"
]))
...
@@ -732,7 +733,8 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
...
@@ -732,7 +733,8 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
var
json
=
JsonHelper
.
Serialize
(
item
);
var
json
=
JsonHelper
.
Serialize
(
item
);
var
data
=
JsonHelper
.
Deserialize
<
per_employee
>(
json
);
var
data
=
JsonHelper
.
Deserialize
<
per_employee
>(
json
);
if
(
persons
!=
null
)
if
(
persons
!=
null
)
if
(
persons
.
Any
(
t
=>
t
.
PersonnelNumber
?.
Trim
()
==
data
.
PersonnelNumber
?.
Trim
()
&&
t
.
DoctorName
?.
Trim
()
==
data
.
DoctorName
?.
Trim
()))
continue
;
if
(
persons
.
Any
(
t
=>
t
.
PersonnelNumber
?.
Trim
()
==
data
.
PersonnelNumber
?.
Trim
()))
delPersonsNum
.
Add
(
data
.
PersonnelNumber
);
var
any
=
employees
.
Any
(
w
=>
w
.
Department
?.
Trim
()
==
data
.
Department
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
data
.
DoctorName
?.
Trim
());
var
any
=
employees
.
Any
(
w
=>
w
.
Department
?.
Trim
()
==
data
.
Department
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
data
.
DoctorName
?.
Trim
());
if
(!
string
.
IsNullOrEmpty
(
data
.
Department
?.
Trim
())
&&
!
string
.
IsNullOrEmpty
(
data
.
AccountingUnit
?.
Trim
())
&&
!
string
.
IsNullOrEmpty
(
data
.
DoctorName
?.
Trim
())
&&
!
any
)
if
(!
string
.
IsNullOrEmpty
(
data
.
Department
?.
Trim
())
&&
!
string
.
IsNullOrEmpty
(
data
.
AccountingUnit
?.
Trim
())
&&
!
string
.
IsNullOrEmpty
(
data
.
DoctorName
?.
Trim
())
&&
!
any
)
...
@@ -746,6 +748,8 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
...
@@ -746,6 +748,8 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
employees
.
Add
(
data
);
employees
.
Add
(
data
);
}
}
}
}
var
delPerson
=
persons
.
Where
(
t
=>
delPersonsNum
.
Contains
(
t
.
PersonnelNumber
)).
ToArray
();
peremployeeRepository
.
RemoveRange
(
delPerson
);
if
(
employees
.
Any
())
if
(
employees
.
Any
())
peremployeeRepository
.
AddRange
(
employees
.
ToArray
());
peremployeeRepository
.
AddRange
(
employees
.
ToArray
());
...
@@ -755,15 +759,17 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
...
@@ -755,15 +759,17 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
public
void
SaveDeptDicHands
(
int
HospitalId
,
SaveCollectData
request
)
public
void
SaveDeptDicHands
(
int
HospitalId
,
SaveCollectData
request
)
{
{
var
dicData
=
CreateDataRow
(
request
,
DeptDic
);
var
dicData
=
CreateDataRow
(
request
,
DeptDic
);
var
depts
=
perdeptdicRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
HospitalId
)?.
Select
(
w
=>
new
{
w
.
Department
,
w
.
HISDeptName
}).
Distinct
();
var
deptDic
=
perdeptdicRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
HospitalId
);
var
depts
=
deptDic
?.
Select
(
w
=>
new
{
w
.
Department
,
w
.
HISDeptName
}).
Distinct
();
List
<
per_dept_dic
>
deptDics
=
new
List
<
per_dept_dic
>();
List
<
per_dept_dic
>
deptDics
=
new
List
<
per_dept_dic
>();
var
delDepartment
=
new
List
<
string
>();
foreach
(
var
dic
in
dicData
)
foreach
(
var
dic
in
dicData
)
{
{
var
json
=
JsonHelper
.
Serialize
(
dic
);
var
json
=
JsonHelper
.
Serialize
(
dic
);
var
data
=
JsonHelper
.
Deserialize
<
DeptdicHands
>(
json
);
var
data
=
JsonHelper
.
Deserialize
<
DeptdicHands
>(
json
);
if
(
depts
!=
null
)
if
(
depts
!=
null
)
if
(
depts
.
Any
(
t
=>
t
.
Department
?.
Trim
()
==
data
.
Department
?.
Trim
()))
continue
;
if
(
depts
.
Any
(
t
=>
t
.
Department
?.
Trim
()
==
data
.
Department
?.
Trim
()))
delDepartment
.
Add
(
data
.
Department
)
;
var
any
=
deptDics
.
Any
(
w
=>
w
.
Department
?.
Trim
()
==
data
.
Department
?.
Trim
());
var
any
=
deptDics
.
Any
(
w
=>
w
.
Department
?.
Trim
()
==
data
.
Department
?.
Trim
());
if
(!
string
.
IsNullOrEmpty
(
data
.
Department
?.
Trim
())
&&
!
any
)
if
(!
string
.
IsNullOrEmpty
(
data
.
Department
?.
Trim
())
&&
!
any
)
...
@@ -772,6 +778,8 @@ public void SaveDeptDicHands(int HospitalId, SaveCollectData request)
...
@@ -772,6 +778,8 @@ public void SaveDeptDicHands(int HospitalId, SaveCollectData request)
}
}
}
}
var
delDept
=
deptDic
.
Where
(
t
=>
delDepartment
.
Contains
(
t
.
Department
)).
ToArray
();
perdeptdicRepository
.
RemoveRange
(
delDept
);
if
(
deptDics
.
Any
())
if
(
deptDics
.
Any
())
perdeptdicRepository
.
AddRange
(
deptDics
.
ToArray
());
perdeptdicRepository
.
AddRange
(
deptDics
.
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