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
560f4bda
Commit
560f4bda
authored
Jul 28, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充科室信息
parent
6c6049b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
108 additions
and
1 deletions
+108
-1
performance/Performance.Services/CollectService.cs
+108
-1
No files found.
performance/Performance.Services/CollectService.cs
View file @
560f4bda
...
...
@@ -398,7 +398,7 @@ public HandsonTable GetCollectData(int userId, int allotId, string sheetName)
}
if
(
rowDatas
==
null
||
!
rowDatas
.
Any
())
rowDatas
=
GetAccountExtra
(
allot
,
sheet
.
SheetType
.
Value
);
rowDatas
=
GetAccountExtra
(
allot
,
sheet
.
SheetType
.
Value
,
sheetName
);
rowDatas
?.
RemoveAll
(
t
=>
!
t
.
CellData
.
Any
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
Value
?.
ToString
())));
if
(
rowDatas
!=
null
&&
rowDatas
.
Any
())
...
...
@@ -534,6 +534,113 @@ private List<HandsonRowData> GetAccountExtra(per_allot allot, int sheetType)
return
handsonRows
;
}
private
List
<
HandsonRowData
>
GetAccountExtra
(
per_allot
allot
,
int
sheetType
,
string
sheetName
)
{
List
<
HandsonRowData
>
handsonRows
=
new
List
<
HandsonRowData
>();
var
unitTypes
=
new
string
[]
{
UnitType
.
医生组
.
ToString
(),
UnitType
.
医技组
.
ToString
(),
UnitType
.
护理组
.
ToString
(),
UnitType
.
特殊核算组
.
ToString
()
};
var
departments
=
perforPerdeptdicRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
&&
unitTypes
.
Contains
(
t
.
UnitType
)
&&
!
string
.
IsNullOrEmpty
(
t
.
Department
)
&&
t
.
Department
.
Replace
(
"无"
,
""
).
Replace
(
"/"
,
""
).
Trim
()
!=
""
);
if
(
departments
==
null
||
!
departments
.
Any
())
return
handsonRows
;
var
data
=
departments
.
GroupBy
(
t
=>
t
.
Department
).
Select
(
t
=>
new
{
Department
=
t
.
Key
,
AccountingUnitDoctor
=
GetAccountingUnit
(
t
.
FirstOrDefault
(
group
=>
group
.
Source
==
"门诊"
&&
group
.
UnitType
==
UnitType
.
医生组
.
ToString
())?.
AccountingUnit
,
t
.
FirstOrDefault
(
group
=>
group
.
Source
==
"住院"
&&
group
.
UnitType
==
UnitType
.
医生组
.
ToString
())?.
AccountingUnit
),
AccountingUnitTechnician
=
GetAccountingUnit
(
t
.
FirstOrDefault
(
group
=>
group
.
Source
==
"门诊"
&&
group
.
UnitType
==
UnitType
.
医技组
.
ToString
())?.
AccountingUnit
,
t
.
FirstOrDefault
(
group
=>
group
.
Source
==
"住院"
&&
group
.
UnitType
==
UnitType
.
医技组
.
ToString
())?.
AccountingUnit
),
AccountingUnitNurse
=
GetAccountingUnit
(
t
.
FirstOrDefault
(
group
=>
group
.
Source
==
"门诊"
&&
group
.
UnitType
==
UnitType
.
护理组
.
ToString
())?.
AccountingUnit
,
t
.
FirstOrDefault
(
group
=>
group
.
Source
==
"住院"
&&
group
.
UnitType
==
UnitType
.
护理组
.
ToString
())?.
AccountingUnit
),
AccountingUnitSpecial
=
t
.
FirstOrDefault
(
group
=>
group
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
())?.
Department
}).
OrderBy
(
t
=>
t
.
Department
).
ToList
();
int
rownumber
;
switch
(
sheetType
)
{
case
(
int
)
SheetType
.
OtherIncome
:
data
=
data
.
Where
(
t
=>
string
.
IsNullOrEmpty
(
t
.
AccountingUnitSpecial
))?.
ToList
();
if
(
data
!=
null
&&
data
.
Any
())
{
rownumber
=
0
;
foreach
(
var
item
in
data
)
{
List
<
HandsonCellData
>
handsonCells
=
new
List
<
HandsonCellData
>();
handsonCells
.
Add
(
new
HandsonCellData
(
"核算单元(医技组)"
,
item
.
AccountingUnitTechnician
));
handsonCells
.
Add
(
new
HandsonCellData
(
"核算单元(医生组)"
,
item
.
AccountingUnitDoctor
));
handsonCells
.
Add
(
new
HandsonCellData
(
"核算单元(护理组)"
,
item
.
AccountingUnitNurse
));
handsonCells
.
Add
(
new
HandsonCellData
(
"科室名称"
,
item
.
Department
));
handsonRows
.
Add
(
new
HandsonRowData
(
rownumber
,
handsonCells
));
rownumber
++;
}
}
break
;
case
(
int
)
SheetType
.
SpecialUnit
:
var
specials
=
data
.
Where
(
t
=>
!
string
.
IsNullOrEmpty
(
t
.
AccountingUnitSpecial
)).
Select
(
t
=>
t
.
AccountingUnitSpecial
);
if
(
specials
!=
null
&&
specials
.
Any
())
{
rownumber
=
0
;
foreach
(
var
item
in
specials
)
{
List
<
HandsonCellData
>
handsonCells
=
new
List
<
HandsonCellData
>();
handsonCells
.
Add
(
new
HandsonCellData
(
"科室名称"
,
item
));
handsonRows
.
Add
(
new
HandsonRowData
(
rownumber
,
handsonCells
));
rownumber
++;
}
}
break
;
case
int
type
when
type
==
(
int
)
SheetType
.
Workload
&&
sheetName
.
Contains
(
"医生"
):
data
=
data
.
Where
(
t
=>
string
.
IsNullOrEmpty
(
t
.
AccountingUnitSpecial
)
&&
(!
string
.
IsNullOrEmpty
(
t
.
AccountingUnitDoctor
)
||
!
string
.
IsNullOrEmpty
(
t
.
AccountingUnitTechnician
)))?.
ToList
();
if
(
data
!=
null
&&
data
.
Any
())
{
rownumber
=
0
;
foreach
(
var
item
in
data
)
{
List
<
HandsonCellData
>
handsonCells
=
new
List
<
HandsonCellData
>();
handsonCells
.
Add
(
new
HandsonCellData
(
"核算单元"
,
GetAccountingUnit
(
item
.
AccountingUnitDoctor
,
item
.
AccountingUnitTechnician
)));
handsonCells
.
Add
(
new
HandsonCellData
(
"科室名称"
,
item
.
Department
));
handsonRows
.
Add
(
new
HandsonRowData
(
rownumber
,
handsonCells
));
rownumber
++;
}
}
break
;
case
int
type
when
type
==
(
int
)
SheetType
.
Workload
&&
sheetName
.
Contains
(
"护理"
):
data
=
data
.
Where
(
t
=>
string
.
IsNullOrEmpty
(
t
.
AccountingUnitSpecial
)
&&
!
string
.
IsNullOrEmpty
(
t
.
AccountingUnitNurse
))?.
ToList
();
if
(
data
!=
null
&&
data
.
Any
())
{
rownumber
=
0
;
foreach
(
var
item
in
data
)
{
List
<
HandsonCellData
>
handsonCells
=
new
List
<
HandsonCellData
>();
handsonCells
.
Add
(
new
HandsonCellData
(
"核算单元"
,
item
.
AccountingUnitNurse
));
handsonCells
.
Add
(
new
HandsonCellData
(
"科室名称"
,
item
.
Department
));
handsonRows
.
Add
(
new
HandsonRowData
(
rownumber
,
handsonCells
));
rownumber
++;
}
}
break
;
}
return
handsonRows
;
}
private
string
GetAccountingUnit
(
params
string
[]
account
)
{
if
(
account
==
null
||
!
account
.
Any
())
return
""
;
return
account
.
FirstOrDefault
(
t
=>
!
string
.
IsNullOrEmpty
(
t
?.
Trim
()));
}
private
HandsonRowData
CreateRowData
(
int
row
,
ColumnInfo
[]
columns
,
SortedDictionary
<
string
,
object
>
dic
)
{
var
setdata
=
from
cfg
in
columns
...
...
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