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
bf947789
Commit
bf947789
authored
May 19, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绩效科室详情 工作量系数不*100,列排序根据上传excel中的位置排序
parent
3aedb7db
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
5 deletions
+21
-5
performance/Performance.Services/ComputeService.cs
+21
-5
No files found.
performance/Performance.Services/ComputeService.cs
View file @
bf947789
...
...
@@ -18,6 +18,7 @@ public class ComputeService : IAutoInjection
//private readonly PerforResaccountnurseRepository _perforResAccountnurseRepository;
private
readonly
PerforPersheetRepository
_perforPerSheetRepository
;
private
readonly
PerforImdataRepository
_perforImDataRepository
;
private
readonly
PerforImheaderRepository
_perforImheaderRepository
;
private
readonly
PerforRescomputeRepository
_perforRescomputeRepository
;
private
readonly
PerforResspecialunitRepository
_perforResspecialunitRepository
;
private
readonly
PerforPeragainallotRepository
_perforPeragainallotRepository
;
...
...
@@ -33,6 +34,7 @@ public class ComputeService : IAutoInjection
//PerforResaccountnurseRepository perforResAccountnurseRepository,
PerforPersheetRepository
perforPerSheetRepository
,
PerforImdataRepository
perforImDataRepository
,
PerforImheaderRepository
perforImheaderRepository
,
PerforRescomputeRepository
perforRescomputeRepository
,
PerforResspecialunitRepository
perforResspecialunitRepository
,
PerforPeragainallotRepository
perforPeragainallotRepository
,
...
...
@@ -48,6 +50,7 @@ public class ComputeService : IAutoInjection
//this._perforResAccountnurseRepository = perforResAccountnurseRepository;
this
.
_perforPerSheetRepository
=
perforPerSheetRepository
;
this
.
_perforImDataRepository
=
perforImDataRepository
;
this
.
_perforImheaderRepository
=
perforImheaderRepository
;
this
.
_perforRescomputeRepository
=
perforRescomputeRepository
;
this
.
_perforResspecialunitRepository
=
perforResspecialunitRepository
;
this
.
_perforPeragainallotRepository
=
perforPeragainallotRepository
;
...
...
@@ -402,6 +405,7 @@ public DeptDataDetails DeptDetail(int accountId)
var
dataEconomicList
=
basicData
.
Where
(
t
=>
t
.
SheetID
==
sheetEconomic
?.
ID
&&
t
.
UnitType
==
type
&&
t
.
IsTotal
!=
1
&&
t
.
AccountingUnit
==
doctor
.
AccountingUnit
).
ToList
();
var
economic
=
dataEconomicList
?.
Select
(
t
=>
new
DeptDetail
{
ItemName
=
t
.
TypeName
.
Replace
(
$"(
{
typeValue
}
)"
,
""
),
ItemValue
=
t
.
CellValue
??
0
});
var
headers
=
_perforImheaderRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
doctor
.
AllotID
);
Regex
reg
=
new
Regex
(
"[0-9]*"
);
foreach
(
var
stype
in
sheetType
)
{
...
...
@@ -411,19 +415,31 @@ public DeptDataDetails DeptDetail(int accountId)
var
sheetData
=
basicData
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
).
ToList
();
if
(
sheetData
==
null
||
!
sheetData
.
Any
())
continue
;
var
headerData
=
headers
?.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
);
var
item
=
new
DetailDtos
{
ItemName
=
sheetName
,
IncomeType
=
sheet
.
SheetType
==
(
int
)
SheetType
.
Expend
?
2
:
sheet
.
SheetType
==
(
int
)
SheetType
.
Workload
?
3
:
1
,
Amount
=
(
sheetName
.
Contains
(
"工作量"
)
?
doctor
.
WorkloadFee
:
economic
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
Contains
(
sheetName
))?.
ItemValue
)
??
0
m
,
Items
=
sheetData
?.
Select
(
t
=>
new
DetailModule
Amount
=
(
sheet
.
SheetType
==
(
int
)
SheetType
.
Workload
?
doctor
.
WorkloadFee
:
economic
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
Contains
(
sheetName
))?.
ItemValue
)
??
0
m
,
};
var
items
=
sheetData
?.
Select
(
t
=>
new
DetailModule
{
ItemName
=
t
.
TypeName
,
CellValue
=
t
.
CellValue
,
Factor
=
t
.
FactorValue
*
100
,
Factor
=
sheet
.
SheetType
==
(
int
)
SheetType
.
Workload
?
t
.
FactorValue
:
t
.
FactorValue
*
100
,
ItemValue
=
t
.
IsFactor
==
1
?
(
t
.
CellValue
*
(
t
.
FactorValue
??
0
))
:
t
.
CellValue
}).
ToList
()
};
}).
ToList
();
if
(
headerData
!=
null
&&
headerData
.
Any
())
{
items
=
items
?.
OrderBy
(
t
=>
(
headerData
.
FirstOrDefault
(
h
=>
h
.
CellValue
==
t
.
ItemName
)?.
PointCell
)
??
100
)
?.
ThenBy
(
t
=>
t
.
ItemName
).
ToList
();
}
item
.
Items
=
items
;
deptDetails
.
Detail
.
Add
(
item
);
}
}
...
...
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