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
326b249f
Commit
326b249f
authored
Jul 01, 2021
by
钟博
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/粘贴数据过滤' into develop
parents
8ae4fdda
34a16fa9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
performance/Performance.Services/PersonService.cs
+13
-5
No files found.
performance/Performance.Services/PersonService.cs
View file @
326b249f
...
@@ -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,23 +759,27 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
...
@@ -755,23 +759,27 @@ 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
.
HISDeptName
?.
Trim
()
==
data
.
HISDeptName
?.
Trim
()))
delDepartment
.
Add
(
data
.
HISDeptName
)
;
var
any
=
deptDics
.
Any
(
w
=>
w
.
Department
?.
Trim
()
==
data
.
Department
?.
Trim
());
var
any
=
deptDics
.
Any
(
w
=>
w
.
HISDeptName
?.
Trim
()
==
data
.
HISDeptName
?.
Trim
());
if
(!
string
.
IsNullOrEmpty
(
data
.
Department
?.
Trim
())
&&
!
any
)
if
(!
string
.
IsNullOrEmpty
(
data
.
HISDeptName
?.
Trim
())
&&
!
any
)
{
{
DeptDicList
(
HospitalId
,
deptDics
,
data
);
DeptDicList
(
HospitalId
,
deptDics
,
data
);
}
}
}
}
var
delDept
=
deptDic
.
Where
(
t
=>
delDepartment
.
Contains
(
t
.
HISDeptName
)).
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