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
ac7614ad
Commit
ac7614ad
authored
Oct 23, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改字段名称
parent
00bb4dd4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
30 deletions
+30
-30
performance/Performance.Services/ComputeService.cs
+30
-30
No files found.
performance/Performance.Services/ComputeService.cs
View file @
ac7614ad
...
@@ -391,11 +391,11 @@ public DeptDetailResponse GetDepartmentDetail(int allotId, int accountId, int ty
...
@@ -391,11 +391,11 @@ public DeptDetailResponse GetDepartmentDetail(int allotId, int accountId, int ty
var
sheetList
=
_perforPerSheetRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
var
sheetList
=
_perforPerSheetRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
if
(
type
==
1
)
if
(
type
==
1
)
{
{
var
doctor
=
perforResaccountRepository
.
GetEntity
(
t
=>
t
.
UnitType
!=
(
int
)
UnitType
.
护理组
&&
t
.
AllotID
==
allotId
&&
t
.
ID
==
accountId
);
var
account
=
perforResaccountRepository
.
GetEntity
(
t
=>
t
.
UnitType
!=
(
int
)
UnitType
.
护理组
&&
t
.
AllotID
==
allotId
&&
t
.
ID
==
accountId
);
DeptDetailResponse
response
=
new
DeptDetailResponse
()
DeptDetailResponse
response
=
new
DeptDetailResponse
()
{
{
Pandect
=
Mapper
.
Map
<
PerDataAccountBaisc
>(
doctor
),
Pandect
=
Mapper
.
Map
<
PerDataAccountBaisc
>(
account
),
Economic
=
new
List
<
DeptDetail
>(),
Economic
=
new
List
<
DeptDetail
>(),
Workload
=
new
List
<
DeptDetail
>()
Workload
=
new
List
<
DeptDetail
>()
};
};
...
@@ -403,14 +403,14 @@ public DeptDetailResponse GetDepartmentDetail(int allotId, int accountId, int ty
...
@@ -403,14 +403,14 @@ public DeptDetailResponse GetDepartmentDetail(int allotId, int accountId, int ty
var
sheetWorkload
=
sheetList
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
(
int
)
SheetType
.
ComputeDoctorWorkload
);
var
sheetWorkload
=
sheetList
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
(
int
)
SheetType
.
ComputeDoctorWorkload
);
if
(
sheetWorkload
==
null
)
if
(
sheetWorkload
==
null
)
return
null
;
return
null
;
var
dataWorkloadList
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
SheetID
==
sheetWorkload
.
ID
&&
t
.
IsTotal
!=
1
&&
t
.
AccountingUnit
==
doctor
.
AccountingUnit
);
var
dataWorkloadList
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
SheetID
==
sheetWorkload
.
ID
&&
t
.
IsTotal
!=
1
&&
t
.
AccountingUnit
==
account
.
AccountingUnit
);
if
(
dataWorkloadList
!=
null
&&
dataWorkloadList
.
Count
>
0
)
if
(
dataWorkloadList
!=
null
&&
dataWorkloadList
.
Count
>
0
)
dataWorkloadList
.
ForEach
(
t
=>
response
.
Workload
.
Add
(
new
DeptDetail
{
ItemName
=
t
.
TypeName
,
ItemValue
=
t
.
CellValue
??
0
}));
dataWorkloadList
.
ForEach
(
t
=>
response
.
Workload
.
Add
(
new
DeptDetail
{
ItemName
=
t
.
TypeName
,
ItemValue
=
t
.
CellValue
??
0
}));
var
sheetEconomic
=
sheetList
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
(
int
)
SheetType
.
ComputeEconomic
);
var
sheetEconomic
=
sheetList
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
(
int
)
SheetType
.
ComputeEconomic
);
if
(
sheetEconomic
==
null
)
if
(
sheetEconomic
==
null
)
return
null
;
return
null
;
var
dataEconomicList
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
SheetID
==
sheetEconomic
.
ID
&&
t
.
UnitType
==
1
&&
t
.
IsTotal
!=
1
&&
t
.
AccountingUnit
==
doctor
.
AccountingUnit
);
var
dataEconomicList
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
SheetID
==
sheetEconomic
.
ID
&&
t
.
UnitType
==
1
&&
t
.
IsTotal
!=
1
&&
t
.
AccountingUnit
==
account
.
AccountingUnit
);
if
(
dataEconomicList
!=
null
&&
dataEconomicList
.
Count
>
0
)
if
(
dataEconomicList
!=
null
&&
dataEconomicList
.
Count
>
0
)
dataEconomicList
.
ForEach
(
t
=>
response
.
Economic
.
Add
(
new
DeptDetail
{
ItemName
=
t
.
TypeName
,
ItemValue
=
t
.
CellValue
??
0
}));
dataEconomicList
.
ForEach
(
t
=>
response
.
Economic
.
Add
(
new
DeptDetail
{
ItemName
=
t
.
TypeName
,
ItemValue
=
t
.
CellValue
??
0
}));
...
@@ -705,17 +705,17 @@ public List<res_baiscnorm> GetBaiscnorm(int allotId)
...
@@ -705,17 +705,17 @@ public List<res_baiscnorm> GetBaiscnorm(int allotId)
/// <returns></returns>
/// <returns></returns>
public
DeptDataDetails
<
DetailModuleExtend
>
DeptDetail
(
int
accountId
)
public
DeptDataDetails
<
DetailModuleExtend
>
DeptDetail
(
int
accountId
)
{
{
var
doctor
=
perforResaccountRepository
.
GetEntity
(
t
=>
t
.
ID
==
accountId
);
var
account
=
perforResaccountRepository
.
GetEntity
(
t
=>
t
.
ID
==
accountId
);
var
allot
=
perforPerallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
doctor
.
AllotID
);
var
allot
=
perforPerallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
account
.
AllotID
);
var
persheet
=
_perforPerSheetRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
doctor
.
AllotID
);
var
persheet
=
_perforPerSheetRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
);
var
headers
=
_perforImheaderRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
doctor
.
AllotID
);
var
headers
=
_perforImheaderRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
);
var
basicData
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
doctor
.
AllotID
&&
t
.
AccountingUnit
==
doctor
.
AccountingUnit
);
var
basicData
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
&&
t
.
AccountingUnit
==
account
.
AccountingUnit
);
DeptDataDetails
deptDetails
=
new
DeptDataDetails
DeptDataDetails
deptDetails
=
new
DeptDataDetails
{
{
ShowFormula
=
allot
.
ShowFormula
,
ShowFormula
=
allot
.
ShowFormula
,
Pandect
=
Mapper
.
Map
<
PerDataAccountBaisc
>(
doctor
),
Pandect
=
Mapper
.
Map
<
PerDataAccountBaisc
>(
account
),
Detail
=
new
List
<
DetailDtos
>()
Detail
=
new
List
<
DetailDtos
>()
};
};
...
@@ -732,34 +732,34 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
...
@@ -732,34 +732,34 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
{
{
foreach
(
var
sheet
in
persheet
.
Where
(
t
=>
t
.
SheetType
==
stype
))
foreach
(
var
sheet
in
persheet
.
Where
(
t
=>
t
.
SheetType
==
stype
))
{
{
var
type
=
TypeConversion
(
doctor
.
UnitType
);
var
type
=
TypeConversion
(
account
.
UnitType
);
if
(
single
!=
""
&&
sheet
.
SheetName
.
Substring
(
0
,
3
)
!=
single
)
if
(
single
!=
""
&&
sheet
.
SheetName
.
Substring
(
0
,
3
)
!=
single
)
groupbasis
+=
1
;
groupbasis
+=
1
;
single
=
sheet
.
SheetName
.
Substring
(
0
,
3
);
single
=
sheet
.
SheetName
.
Substring
(
0
,
3
);
Dictionary
<
SheetType
,
decimal
?>
pairs
=
new
Dictionary
<
SheetType
,
decimal
?>
Dictionary
<
SheetType
,
decimal
?>
pairs
=
new
Dictionary
<
SheetType
,
decimal
?>
{
{
{
SheetType
.
AccountExtra
,
doctor
.
Extra
},
{
SheetType
.
AccountExtra
,
account
.
Extra
},
{
SheetType
.
AccountDrugAssess
,
doctor
.
MedicineExtra
},
{
SheetType
.
AccountDrugAssess
,
account
.
MedicineExtra
},
{
SheetType
.
AccountMaterialsAssess
,
doctor
.
MaterialsExtra
},
{
SheetType
.
AccountMaterialsAssess
,
account
.
MaterialsExtra
},
};
};
var
sheetName
=
new
Regex
(
"[0-9]*"
).
Replace
(
sheet
.
SheetName
,
""
,
5
).
Replace
(
"."
,
""
).
Replace
(
" "
,
""
);
var
sheetName
=
new
Regex
(
"[0-9]*"
).
Replace
(
sheet
.
SheetName
,
""
,
5
).
Replace
(
"."
,
""
).
Replace
(
" "
,
""
);
var
(
sheettype
,
amount
)
=
ClinicDepartmentDetail
(
persheet
,
doctor
,
basicData
,
sheet
,
type
,
sheetName
);
var
(
sheettype
,
amount
)
=
ClinicDepartmentDetail
(
persheet
,
account
,
basicData
,
sheet
,
type
,
sheetName
);
(
sheettype
,
amount
)
=
CommonDepartmentDetail
(
basicData
,
sheet
,
type
,
pairs
);
(
sheettype
,
amount
)
=
CommonDepartmentDetail
(
basicData
,
sheet
,
type
,
pairs
);
var
items
=
CommonDetailItems
(
basicData
,
headers
,
sheet
,
type
);
var
items
=
CommonDetailItems
(
basicData
,
headers
,
sheet
,
type
);
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
Workload
)
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
Workload
)
{
{
var
workitems
=
cofworkitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
doctor
.
AllotID
);
var
workitems
=
cofworkitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
);
var
allotCmi
=
cofcmiRepository
.
GetEntity
(
t
=>
t
.
AllotId
==
doctor
.
AllotID
&&
t
.
UnitType
==
doctor
.
UnitType
&&
t
.
AccountingUnit
==
doctor
.
AccountingUnit
);
var
allotCmi
=
cofcmiRepository
.
GetEntity
(
t
=>
t
.
AllotId
==
account
.
AllotID
&&
t
.
UnitType
==
account
.
UnitType
&&
t
.
AccountingUnit
==
account
.
AccountingUnit
);
foreach
(
var
dto
in
items
)
foreach
(
var
dto
in
items
)
{
{
foreach
(
var
name
in
items
.
GroupBy
(
t
=>
t
.
ItemName
))
foreach
(
var
name
in
items
.
GroupBy
(
t
=>
t
.
ItemName
))
{
{
if
(
workitems
!=
null
&&
workitems
.
Any
(
a
=>
a
.
Type
==
1
&&
a
.
Item
==
name
.
Key
))
if
(
workitems
!=
null
&&
workitems
.
Any
(
a
=>
a
.
Type
==
1
&&
a
.
Item
==
name
.
Key
))
dto
.
MediFactor
=
doctor
.
MedicineFactor
;
dto
.
MediFactor
=
account
.
MedicineFactor
;
if
(
workitems
!=
null
&&
workitems
.
Any
(
a
=>
a
.
Type
==
2
&&
a
.
Item
==
name
.
Key
)
&&
allotCmi
!=
null
)
if
(
workitems
!=
null
&&
workitems
.
Any
(
a
=>
a
.
Type
==
2
&&
a
.
Item
==
name
.
Key
)
&&
allotCmi
!=
null
)
dto
.
CMIFactor
=
allotCmi
.
Value
;
dto
.
CMIFactor
=
allotCmi
.
Value
;
dto
.
ItemValue
=
dto
.
ItemValue
*
(
dto
.
MediFactor
??
1
)
*
(
dto
.
CMIFactor
??
1
);
dto
.
ItemValue
=
dto
.
ItemValue
*
(
dto
.
MediFactor
??
1
)
*
(
dto
.
CMIFactor
??
1
);
...
@@ -974,17 +974,17 @@ private UnitType TypeConversion(int? unitType)
...
@@ -974,17 +974,17 @@ private UnitType TypeConversion(int? unitType)
}
}
public
DeptDataDetails
DeptOfficeDetail
(
int
accountId
)
public
DeptDataDetails
DeptOfficeDetail
(
int
accountId
)
{
{
var
doctor
=
perforResaccountRepository
.
GetEntity
(
t
=>
t
.
ID
==
accountId
);
var
account
=
perforResaccountRepository
.
GetEntity
(
t
=>
t
.
ID
==
accountId
);
var
allot
=
perforPerallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
doctor
.
AllotID
);
var
allot
=
perforPerallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
account
.
AllotID
);
var
computes
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
ID
==
doctor
.
AllotID
&&
t
.
UnitType
==
UnitType
.
行政后勤
.
ToString
()
&&
t
.
AccountingUnit
==
doctor
.
AccountingUnit
);
var
computes
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
ID
==
account
.
AllotID
&&
t
.
UnitType
==
UnitType
.
行政后勤
.
ToString
()
&&
t
.
AccountingUnit
==
account
.
AccountingUnit
);
var
persheet
=
_perforPerSheetRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
doctor
.
AllotID
);
var
persheet
=
_perforPerSheetRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
);
var
headers
=
_perforImheaderRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
doctor
.
AllotID
);
var
headers
=
_perforImheaderRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
);
var
basicData
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
doctor
.
AllotID
&&
t
.
AccountingUnit
==
doctor
.
AccountingUnit
);
var
basicData
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
&&
t
.
AccountingUnit
==
account
.
AccountingUnit
);
DeptDataDetails
deptDetails
=
new
DeptDataDetails
DeptDataDetails
deptDetails
=
new
DeptDataDetails
{
{
ShowFormula
=
allot
.
ShowFormula
,
ShowFormula
=
allot
.
ShowFormula
,
Pandect
=
Mapper
.
Map
<
PerDataAccountBaisc
>(
doctor
),
Pandect
=
Mapper
.
Map
<
PerDataAccountBaisc
>(
account
),
Detail
=
new
List
<
DetailDtos
>()
Detail
=
new
List
<
DetailDtos
>()
};
};
...
@@ -996,9 +996,9 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
...
@@ -996,9 +996,9 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
var
detail
=
new
DetailDtos
var
detail
=
new
DetailDtos
{
{
ItemName
=
"
特殊
核算单元绩效测算表"
,
ItemName
=
"
行政后勤
核算单元绩效测算表"
,
IncomeType
=
4
,
IncomeType
=
4
,
Amount
=
doctor
.
PerforTotal
??
0
,
Amount
=
account
.
PerforTotal
??
0
,
Items
=
new
List
<
DetailModule
>(),
Items
=
new
List
<
DetailModule
>(),
GroupBasis
=
1
,
GroupBasis
=
1
,
};
};
...
@@ -1021,9 +1021,9 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
...
@@ -1021,9 +1021,9 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
groupBasis
++;
groupBasis
++;
Dictionary
<
SheetType
,
decimal
?>
pairs
=
new
Dictionary
<
SheetType
,
decimal
?>
Dictionary
<
SheetType
,
decimal
?>
pairs
=
new
Dictionary
<
SheetType
,
decimal
?>
{
{
{
SheetType
.
AccountExtra
,
doctor
.
Extra
},
{
SheetType
.
AccountExtra
,
account
.
Extra
},
{
SheetType
.
AccountDrugAssess
,
doctor
.
MedicineExtra
},
{
SheetType
.
AccountDrugAssess
,
account
.
MedicineExtra
},
{
SheetType
.
AccountMaterialsAssess
,
doctor
.
MaterialsExtra
},
{
SheetType
.
AccountMaterialsAssess
,
account
.
MaterialsExtra
},
};
};
var
(
sheettype
,
amount
)
=
CommonDepartmentDetail
(
basicData
,
sheet
,
UnitType
.
行政后勤
,
pairs
);
var
(
sheettype
,
amount
)
=
CommonDepartmentDetail
(
basicData
,
sheet
,
UnitType
.
行政后勤
,
pairs
);
var
items
=
CommonDetailItems
(
basicData
,
headers
,
sheet
,
UnitType
.
行政后勤
);
var
items
=
CommonDetailItems
(
basicData
,
headers
,
sheet
,
UnitType
.
行政后勤
);
...
...
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