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
3325e3a8
Commit
3325e3a8
authored
Jul 12, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人员、科室数据保存,null值检验;数据录入,多角色添加配置
parent
088ac466
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
9 deletions
+18
-9
performance/Performance.Services/CollectService.cs
+8
-1
performance/Performance.Services/PersonService.cs
+10
-8
No files found.
performance/Performance.Services/CollectService.cs
View file @
3325e3a8
...
@@ -184,10 +184,16 @@ public void SetPermission(int userid, IEnumerable<CollectPermission> collects)
...
@@ -184,10 +184,16 @@ public void SetPermission(int userid, IEnumerable<CollectPermission> collects)
}
}
// 新增
// 新增
var
users
=
new
List
<
sys_user
>
{
user
};
var
children
=
userRepository
.
GetEntities
(
w
=>
w
.
ParentID
==
userid
);
if
(
children
!=
null
&&
children
.
Any
())
users
.
AddRange
(
children
);
var
data2
=
collects
.
Where
(
w
=>
!
w
.
PermissionId
.
HasValue
&&
(
w
.
Visible
>
0
||
w
.
AttachLast
>
0
||
w
.
Readnoly
>
0
));
var
data2
=
collects
.
Where
(
w
=>
!
w
.
PermissionId
.
HasValue
&&
(
w
.
Visible
>
0
||
w
.
AttachLast
>
0
||
w
.
Readnoly
>
0
));
foreach
(
var
item
in
users
)
{
var
inserts
=
data2
?.
Select
(
w
=>
new
collect_permission
var
inserts
=
data2
?.
Select
(
w
=>
new
collect_permission
{
{
UserId
=
userid
,
UserId
=
item
.
ID
,
SheetName
=
w
.
SheetName
,
SheetName
=
w
.
SheetName
,
SheetType
=
w
.
SheetType
,
SheetType
=
w
.
SheetType
,
HospitalId
=
w
.
HospitalId
,
HospitalId
=
w
.
HospitalId
,
...
@@ -201,6 +207,7 @@ public void SetPermission(int userid, IEnumerable<CollectPermission> collects)
...
@@ -201,6 +207,7 @@ public void SetPermission(int userid, IEnumerable<CollectPermission> collects)
perforcollectpermissionRepository
.
AddRange
(
inserts
.
ToArray
());
perforcollectpermissionRepository
.
AddRange
(
inserts
.
ToArray
());
}
}
}
}
}
public
IEnumerable
<
collect_permission
>
GetCollectSheet
(
int
hospitalId
,
int
userId
,
string
sheetName
=
""
)
public
IEnumerable
<
collect_permission
>
GetCollectSheet
(
int
hospitalId
,
int
userId
,
string
sheetName
=
""
)
{
{
...
...
performance/Performance.Services/PersonService.cs
View file @
3325e3a8
...
@@ -720,7 +720,7 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
...
@@ -720,7 +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
>();
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"
]))
...
@@ -748,9 +748,10 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
...
@@ -748,9 +748,10 @@ 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
();
var
delPerson
=
persons
?.
Where
(
t
=>
delPersonsNum
.
Contains
(
t
.
PersonnelNumber
));
peremployeeRepository
.
RemoveRange
(
delPerson
);
if
(
delPerson
!=
null
&&
delPerson
.
Any
())
if
(
employees
.
Any
())
peremployeeRepository
.
RemoveRange
(
delPerson
.
ToArray
());
if
(
employees
!=
null
&&
employees
.
Any
())
peremployeeRepository
.
AddRange
(
employees
.
ToArray
());
peremployeeRepository
.
AddRange
(
employees
.
ToArray
());
return
true
;
return
true
;
...
@@ -760,7 +761,7 @@ public void SaveDeptDicHands(int HospitalId, SaveCollectData request)
...
@@ -760,7 +761,7 @@ public void SaveDeptDicHands(int HospitalId, SaveCollectData request)
{
{
var
dicData
=
CreateDataRow
(
request
,
DeptDic
);
var
dicData
=
CreateDataRow
(
request
,
DeptDic
);
var
deptDic
=
perdeptdicRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
HospitalId
);
var
deptDic
=
perdeptdicRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
HospitalId
);
var
depts
=
deptDic
?.
Select
(
w
=>
new
{
w
.
Department
,
w
.
HISDeptName
}).
Distinct
();
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
>();
var
delDepartment
=
new
List
<
string
>();
foreach
(
var
dic
in
dicData
)
foreach
(
var
dic
in
dicData
)
...
@@ -778,9 +779,10 @@ public void SaveDeptDicHands(int HospitalId, SaveCollectData request)
...
@@ -778,9 +779,10 @@ public void SaveDeptDicHands(int HospitalId, SaveCollectData request)
}
}
}
}
var
delDept
=
deptDic
.
Where
(
t
=>
delDepartment
.
Contains
(
t
.
HISDeptName
)).
ToArray
();
var
delDept
=
deptDic
?.
Where
(
t
=>
delDepartment
.
Contains
(
t
.
HISDeptName
));
perdeptdicRepository
.
RemoveRange
(
delDept
);
if
(
delDept
!=
null
&&
delDept
.
Any
())
if
(
deptDics
.
Any
())
perdeptdicRepository
.
RemoveRange
(
delDept
.
ToArray
());
if
(
deptDics
!=
null
&&
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