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
c1e4cd41
Commit
c1e4cd41
authored
Aug 27, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开单医院读取数据修改
parent
f7df1761
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
24 deletions
+42
-24
performance/Performance.Api/Template/医院绩效模板(无执行科室).xlsx
+0
-0
performance/Performance.Services/AllotCompute/CheckDataService.cs
+2
-1
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadBillIncome.cs
+37
-20
performance/Performance.Services/SheetSevice.cs
+3
-3
No files found.
performance/Performance.Api/Template/医院绩效模板(无执行科室).xlsx
View file @
c1e4cd41
No preview for this file type
performance/Performance.Services/AllotCompute/CheckDataService.cs
View file @
c1e4cd41
...
@@ -168,7 +168,8 @@ public bool CheckData(PerExcel excel, per_allot allot)
...
@@ -168,7 +168,8 @@ public bool CheckData(PerExcel excel, per_allot allot)
{
{
var
doctor
=
item
.
Where
(
t
=>
t
.
UnitType
==
"医生组"
).
FirstOrDefault
();
var
doctor
=
item
.
Where
(
t
=>
t
.
UnitType
==
"医生组"
).
FirstOrDefault
();
var
nurse
=
item
.
Where
(
t
=>
t
.
UnitType
==
"护理组"
).
FirstOrDefault
();
var
nurse
=
item
.
Where
(
t
=>
t
.
UnitType
==
"护理组"
).
FirstOrDefault
();
if
(
string
.
IsNullOrEmpty
(
doctor
.
AccountingUnit
)
&&
string
.
IsNullOrEmpty
(
nurse
.
AccountingUnit
))
var
technician
=
item
.
Where
(
t
=>
t
.
UnitType
==
"医技组"
).
FirstOrDefault
();
if
(
string
.
IsNullOrEmpty
(
doctor
?.
AccountingUnit
)
&&
string
.
IsNullOrEmpty
(
nurse
?.
AccountingUnit
)
&&
string
.
IsNullOrEmpty
(
technician
?.
AccountingUnit
))
{
{
flag
=
false
;
flag
=
false
;
rowNumber
.
Add
(
doctor
.
RowNumber
+
1
);
rowNumber
.
Add
(
doctor
.
RowNumber
+
1
);
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadBillIncome.cs
View file @
c1e4cd41
...
@@ -15,10 +15,10 @@ public class PerSheetDataReadBillIncome : IPerSheetDataRead
...
@@ -15,10 +15,10 @@ public class PerSheetDataReadBillIncome : IPerSheetDataRead
{
{
public
PerSheetPoint
Point
=>
new
PerSheetPoint
public
PerSheetPoint
Point
=>
new
PerSheetPoint
{
{
HeaderFirstRowNum
=
6
,
HeaderFirstRowNum
=
5
,
HeaderLastRowNum
=
6
,
HeaderLastRowNum
=
5
,
HeaderFirstCellNum
=
0
,
HeaderFirstCellNum
=
0
,
DataFirstRowNum
=
7
,
DataFirstRowNum
=
6
,
AccountingUnit
=
new
List
<
AccountingUnit
>
AccountingUnit
=
new
List
<
AccountingUnit
>
{
{
//核算单元(医技组)
//核算单元(医技组)
...
@@ -52,11 +52,11 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
...
@@ -52,11 +52,11 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{
{
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
var
prevRow
=
sheet
.
GetRow
(
5
);
//循环 当前有几个核算单元
//循环 当前有几个核算单元
foreach
(
var
unit
in
Point
.
AccountingUnit
)
foreach
(
var
unit
in
Point
.
AccountingUnit
)
{
{
if
(
unit
.
UnitType
==
"医技组"
)
continue
;
//查询除了 核算单元 科室名称 有效数据列头位置
//查询除了 核算单元 科室名称 有效数据列头位置
var
vhead
=
perHeader
.
Where
(
t
=>
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
AccountingUnitCellNum
).
Contains
(
t
.
PointCell
)
var
vhead
=
perHeader
.
Where
(
t
=>
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
AccountingUnitCellNum
).
Contains
(
t
.
PointCell
)
&&
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
DeptCellNum
).
Contains
(
t
.
PointCell
)).
OrderBy
(
t
=>
t
.
PointCell
);
&&
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
DeptCellNum
).
Contains
(
t
.
PointCell
)).
OrderBy
(
t
=>
t
.
PointCell
);
...
@@ -71,25 +71,12 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
...
@@ -71,25 +71,12 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
));
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
));
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
continue
;
string
accountingUnit
,
department
;
if
(
unit
.
AccountingUnitCellNum
.
Value
==
-
1
)
{
if
(
prevRow
==
null
)
continue
;
accountingUnit
=
prevRow
.
GetCell
(
athead
.
PointCell
).
StringCellValue
;
if
(
string
.
IsNullOrEmpty
(
accountingUnit
)
||
r
!=
Point
.
DataFirstRowNum
.
Value
)
continue
;
department
=
accountingUnit
;
}
else
{
accountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)?.
ToString
();
department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)?.
ToString
();
}
PerData
data
=
new
PerData
PerData
data
=
new
PerData
{
{
RowNumber
=
r
,
RowNumber
=
r
,
SignID
=
athead
.
SignID
,
SignID
=
athead
.
SignID
,
AccountingUnit
=
accountingUnit
,
AccountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)?.
ToString
()
,
Department
=
department
,
Department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)?.
ToString
()
,
TypeName
=
athead
?.
CellValue
,
TypeName
=
athead
?.
CellValue
,
CellValue
=
cellValue
,
CellValue
=
cellValue
,
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
...
@@ -101,6 +88,36 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
...
@@ -101,6 +88,36 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
}
}
}
}
}
}
var
tunit
=
Point
.
AccountingUnit
[
0
];
var
rownum
=
sheet
.
LastRowNum
+
1
;
var
technicianRow
=
sheet
.
GetRow
(
4
);
if
(
technicianRow
!=
null
)
{
//查询除了 核算单元 科室名称 有效数据列头位置
var
vhead
=
perHeader
.
Where
(
t
=>
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
AccountingUnitCellNum
).
Contains
(
t
.
PointCell
)
&&
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
DeptCellNum
).
Contains
(
t
.
PointCell
)).
OrderBy
(
t
=>
t
.
PointCell
);
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
{
var
athead
=
vhead
.
ElementAt
(
c
);
var
cellValue
=
technicianRow
.
GetCell
(
athead
.
PointCell
).
StringCellValue
;
if
(
string
.
IsNullOrEmpty
(
cellValue
))
continue
;
PerData
data
=
new
PerData
{
RowNumber
=
rownum
,
SignID
=
athead
.
SignID
,
AccountingUnit
=
cellValue
,
Department
=
cellValue
,
TypeName
=
athead
?.
CellValue
,
CellValue
=
dataList
.
Select
(
t
=>
(
PerData
)
t
)?.
Where
(
t
=>
t
.
TypeName
==
athead
.
CellValue
).
Sum
(
t
=>
t
.
CellValue
)
??
0
,
Annotation
=
technicianRow
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
UnitType
=
tunit
.
UnitType
,
//手动匹配
FactorValue
=
ConvertHelper
.
To
<
decimal
?>(
sheet
.
GetRow
(
tunit
.
FactorRow
.
Value
).
GetCell
(
athead
.
PointCell
)?.
ToString
()),
IsFactor
=
true
,
};
dataList
.
Add
(
data
);
}
}
return
dataList
;
return
dataList
;
}
}
}
}
...
...
performance/Performance.Services/SheetSevice.cs
View file @
c1e4cd41
...
@@ -169,14 +169,14 @@ private void CommonExport(int sheetID, SheetExportResponse response)
...
@@ -169,14 +169,14 @@ private void CommonExport(int sheetID, SheetExportResponse response)
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
Income
&&
!
headList
.
Select
(
t
=>
t
.
CellValue
).
Contains
(
"医技组"
))
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
Income
&&
!
headList
.
Select
(
t
=>
t
.
CellValue
).
Contains
(
"医技组"
))
{
{
var
technicianvalue
=
new
Row
(
response
.
Header
.
Count
());
technicianvalue
.
Data
.
Add
(
new
Cell
(
0
,
"医技组核算收入"
,
1
,
4
,
false
,
false
));
//
var technicianvalue = new Row(response.Header.Count()); technicianvalue.Data.Add(new Cell(0, "医技组核算收入", 1, 4, false, false));
response
.
Header
.
Add
(
technicianvalue
);
//
response.Header.Add(technicianvalue);
var
technicianhead
=
new
Row
(
response
.
Header
.
Count
());
technicianhead
.
Data
.
Add
(
new
Cell
(
0
,
"医技组核算单元"
,
1
,
4
,
false
,
false
));
var
technicianhead
=
new
Row
(
response
.
Header
.
Count
());
technicianhead
.
Data
.
Add
(
new
Cell
(
0
,
"医技组核算单元"
,
1
,
4
,
false
,
false
));
response
.
Header
.
Add
(
technicianhead
);
response
.
Header
.
Add
(
technicianhead
);
foreach
(
var
technician
in
dataList
.
Where
(
t
=>
t
.
UnitType
==
3
))
foreach
(
var
technician
in
dataList
.
Where
(
t
=>
t
.
UnitType
==
3
))
{
{
var
header
=
headList
.
First
(
t
=>
t
.
CellValue
==
technician
.
TypeName
);
var
header
=
headList
.
First
(
t
=>
t
.
CellValue
==
technician
.
TypeName
);
technicianvalue
.
Data
.
Add
(
new
Cell
(
header
.
PointCell
.
Value
,
technician
.
CellValue
,
header
.
MergeRow
.
Value
,
header
.
MergeCell
.
Value
,
header
.
IsTotal
==
1
,
false
));
//
technicianvalue.Data.Add(new Cell(header.PointCell.Value, technician.CellValue, header.MergeRow.Value, header.MergeCell.Value, header.IsTotal == 1, false));
technicianhead
.
Data
.
Add
(
new
Cell
(
header
.
PointCell
.
Value
,
technician
.
AccountingUnit
,
header
.
MergeRow
.
Value
,
header
.
MergeCell
.
Value
,
header
.
IsTotal
==
1
,
false
));
technicianhead
.
Data
.
Add
(
new
Cell
(
header
.
PointCell
.
Value
,
technician
.
AccountingUnit
,
header
.
MergeRow
.
Value
,
header
.
MergeCell
.
Value
,
header
.
IsTotal
==
1
,
false
));
}
}
}
}
...
...
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