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
3d10d611
Commit
3d10d611
authored
Apr 29, 2022
by
1391696987
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复bug,下拉框数据筛选
parent
15138d91
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
performance/Performance.Services/EmployeeService.cs
+17
-10
No files found.
performance/Performance.Services/EmployeeService.cs
View file @
3d10d611
...
...
@@ -1265,7 +1265,9 @@ public List<GatherDropResponse> GetGatherDrop(Gather gather)
var
specials
=
exspecialRepository
.
GetEntities
();
var
headers
=
exitemRepository
.
GetEntities
(
w
=>
sheets
.
Select
(
m
=>
m
.
Id
).
Contains
(
w
.
ModuleId
??
0
))
??
new
List
<
ex_item
>();
var
takeOut
=
new
[]
{
"核算单元(医技组)"
,
"核算单元(医生组)"
,
"核算单元(护理组)"
};
var
headers
=
exitemRepository
.
GetEntities
(
w
=>
sheets
.
Select
(
m
=>
m
.
Id
).
Contains
(
w
.
ModuleId
??
0
)
&&
!
takeOut
.
Contains
(
w
.
ItemName
))
??
new
List
<
ex_item
>();
if
(
specials
!=
null
&&
specials
.
Any
())
{
...
...
@@ -1278,6 +1280,7 @@ public List<GatherDropResponse> GetGatherDrop(Gather gather)
headers
.
AddRange
(
specials
.
Select
(
t
=>
new
ex_item
{
ItemName
=
t
.
Target
,
ModuleId
=
0
}));
}
// 查询sheet和列头对应
var
sheetHeads
=
from
sheet
in
sheets
join
head
in
headers
on
sheet
.
Id
equals
head
.
ModuleId
...
...
@@ -1409,17 +1412,18 @@ public GatherResponse GetGatherTotal(Gather gather)
{
exp
=
exp
.
And
(
t
=>
t
.
Category
.
Contains
(
gather
.
SearchQuery
)
||
t
.
Source
.
Contains
(
gather
.
SearchQuery
));
}
var
user
name
=
userRepository
.
GetEntities
();
if
(
user
name
.
FirstOrDefault
(
t
=>
t
.
ID
==
gather
.
UserId
)
.
Login
!=
"admin"
)
var
user
=
userRepository
.
GetEntities
();
var
userLogin
=
user
.
FirstOrDefault
(
t
=>
t
.
ID
==
gather
.
UserId
);
if
(
user
Login
.
Login
!=
"admin"
)
{
var
userSource
=
perforcollectpermissionRepository
.
GetEntities
(
t
=>
t
.
UserId
==
gather
.
UserId
)
.
Select
(
s
=>
Regex
.
Replace
(
s
.
SheetName
.
Replace
(
" "
,
""
).
Replace
(
"."
,
""
),
"[0-9]"
,
""
))
.
Distinct
().
ToList
();
exp
=
exp
.
And
(
t
=>
userSource
.
Contains
(
t
.
Source
));
}
var
hasDepartment
=
perdeptdicRepository
.
GetEntities
(
p
=>
p
.
AccountingUnit
.
Contains
(
userLogin
.
Department
)).
Select
(
s
=>
s
.
Department
).
Distinct
();
exp
=
exp
.
And
(
t
=>
hasDepartment
.
Contains
(
t
.
Department
));
}
var
datas
=
exresultgatherRepository
.
GetEntities
(
exp
)
...
...
@@ -1430,7 +1434,7 @@ public GatherResponse GetGatherTotal(Gather gather)
Source
=
s
.
Key
.
Source
,
Category
=
s
.
Key
.
Category
,
UserId
=
s
.
Key
.
Submitter
,
Login
=
user
name
.
FirstOrDefault
(
t
=>
t
.
ID
==
s
.
Key
.
Submitter
).
Login
,
Login
=
user
.
FirstOrDefault
(
t
=>
t
.
ID
==
s
.
Key
.
Submitter
).
Login
,
CreateTime
=
s
.
Max
(
t
=>
t
.
CreateTime
).
ToString
(
"d"
),
AuditTime
=
s
.
Max
(
t
=>
t
.
AuditTime
)?.
ToString
(
"d"
),
States
=
s
.
Any
(
w
=>
w
.
States
==
(
int
)
AuditGatherEnum
.
未通过
)
?
"未通过"
...
...
@@ -1586,7 +1590,10 @@ public ApiResponse SaveGatherHands(int allotId, SaveGatherData saveGather)
{
"错误原因"
,
"关键信息缺失”请补全或删除"
},
});
var
ExistsDeptData
=
departments
.
FirstOrDefault
(
w
=>
w
.
AllotId
==
allotId
&&
(
w
.
Department
.
Contains
(
newGather
[
i
].
Department
)
||
w
.
HISDeptName
.
Contains
(
newGather
[
i
].
Department
)));
var
ExistsDeptData
=
departments
.
FirstOrDefault
(
w
=>
w
.
AllotId
==
allotId
&&
(
w
.
Department
!=
null
&&
w
.
Department
.
Contains
(
newGather
[
i
].
Department
))
||
(
w
.
HISDeptName
!=
null
&&
w
.
HISDeptName
.
Contains
(
newGather
[
i
].
Department
))
);
if
(
ExistsDeptData
==
null
)
error
.
Add
(
new
Dictionary
<
string
,
string
>
{
...
...
@@ -1599,7 +1606,7 @@ public ApiResponse SaveGatherHands(int allotId, SaveGatherData saveGather)
{
"错误原因"
,
$"科室字典中不存在科室[
{
newGather
[
i
].
Department
}
]"
},
});
var
ExistNameData
=
employees
.
FirstOrDefault
(
w
=>
w
.
AllotId
==
allotId
&&
w
.
DoctorName
==
newGather
[
i
].
DoctorName
);
var
ExistNameData
=
employees
.
FirstOrDefault
(
w
=>
w
.
AllotId
==
allotId
&&
(
w
.
DoctorName
!=
null
&&
w
.
DoctorName
==
newGather
[
i
].
DoctorName
)
);
if
(
ExistNameData
==
null
)
error
.
Add
(
new
Dictionary
<
string
,
string
>
{
...
...
@@ -1612,7 +1619,7 @@ public ApiResponse SaveGatherHands(int allotId, SaveGatherData saveGather)
{
"错误原因"
,
$"人员字典中不存在医生姓名[
{
newGather
[
i
].
DoctorName
}
]"
},
});
var
ExistNumberData
=
employees
.
FirstOrDefault
(
w
=>
w
.
AllotId
==
allotId
&&
w
.
PersonnelNumber
==
newGather
[
i
].
PersonnelNumber
);
var
ExistNumberData
=
employees
.
FirstOrDefault
(
w
=>
w
.
AllotId
==
allotId
&&
(
w
.
PersonnelNumber
!=
null
&&
w
.
PersonnelNumber
==
newGather
[
i
].
PersonnelNumber
)
);
if
(
ExistNumberData
==
null
)
error
.
Add
(
new
Dictionary
<
string
,
string
>
{
...
...
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