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
7e4c9653
Commit
7e4c9653
authored
Jul 14, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Excel读取5.1 科室绩效详情返回增加 5.1内容
parent
072dee28
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
135 additions
and
6 deletions
+135
-6
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+8
-0
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
+4
-0
performance/Performance.DtoModels/PerExcel/PerSheetPoint.cs
+4
-0
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+19
-1
performance/Performance.Services/AllotService.cs
+1
-1
performance/Performance.Services/ComputeService.cs
+21
-4
performance/Performance.Services/PerExcelService/PerSheetDataFactory.cs
+3
-0
performance/Performance.Services/PerExcelService/PerSheetService.cs
+2
-0
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadAccountAssess.cs
+73
-0
No files found.
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
7e4c9653
...
...
@@ -634,6 +634,9 @@
<member
name=
"F:Performance.DtoModels.SheetType.AccountBasicSpecial"
>
<summary>
特殊临床科室医护绩效测算基础
</summary>
</member>
<member
name=
"F:Performance.DtoModels.SheetType.AccountAssess"
>
<summary>
临床科室医护绩效考核表
</summary>
</member>
<member
name=
"T:Performance.DtoModels.AccountUnitType"
>
<summary>
核算单元类型
...
...
@@ -1192,6 +1195,11 @@
科室名称
</summary>
</member>
<member
name=
"P:Performance.DtoModels.AccountingUnit.UnitTypeNum"
>
<summary>
核算单元类型列
</summary>
</member>
<member
name=
"P:Performance.DtoModels.AccountingUnit.UnitType"
>
<summary>
核算单元类型
...
...
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
View file @
7e4c9653
...
...
@@ -88,6 +88,10 @@ public enum SheetType
/// <summary> 特殊临床科室医护绩效测算基础 </summary>
[
Description
(
"特殊临床科室医护绩效测算基础"
)]
AccountBasicSpecial
=
16
,
/// <summary> 临床科室医护绩效考核表 </summary>
[
Description
(
"临床科室医护绩效考核表"
)]
AccountAssess
=
17
,
}
/// <summary>
...
...
performance/Performance.DtoModels/PerExcel/PerSheetPoint.cs
View file @
7e4c9653
...
...
@@ -44,6 +44,10 @@ public class AccountingUnit
/// </summary>
public
int
?
DeptCellNum
{
get
;
set
;
}
/// <summary>
/// 核算单元类型列
/// </summary>
public
int
?
UnitTypeNum
{
get
;
set
;
}
/// <summary>
/// 核算单元类型
/// </summary>
public
string
UnitType
{
get
;
set
;
}
...
...
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
7e4c9653
...
...
@@ -241,11 +241,25 @@ public void Save(List<PerSheet> perSheets, int allotId)
/// <param name="economicData"></param>
/// <param name="workloadData"></param>
/// <returns></returns>
public
List
<
PerSheet
>
Compute
(
PerExcel
excel
,
List
<
PerSheet
>
perSheet
,
List
<
res_baiscnorm
>
baiscnormList
)
public
List
<
PerSheet
>
Compute
(
PerExcel
excel
,
List
<
PerSheet
>
perSheet
,
List
<
res_baiscnorm
>
baiscnormList
,
bool
isFirst
=
false
)
{
var
deptAccounting
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountBasic
);
var
accountList
=
deptAccounting
.
PerData
.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
var
deptAccountAssess
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountAssess
);
var
assessList
=
deptAccountAssess
.
PerData
.
Select
(
t
=>
(
PerData
)
t
);
var
deptExtra
=
new
List
<
PerData
>();
if
(
isFirst
&&
assessList
!=
null
&&
assessList
.
Any
())
{
deptExtra
=
assessList
.
GroupBy
(
t
=>
new
{
t
.
UnitType
,
t
.
AccountingUnit
,
t
.
Department
}).
Select
(
t
=>
new
PerData
{
UnitType
=
t
.
Key
.
UnitType
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
Department
=
t
.
Key
.
Department
,
CellValue
=
t
.
Sum
(
g
=>
g
.
CellValue
)
}).
ToList
();
}
var
economicData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeEconomic
)?.
PerData
.
Select
(
t
=>
(
PerData
)
t
);
var
doctorWorkloadData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeDoctorWorkload
)?.
PerData
.
Select
(
t
=>
(
PerData
)
t
);
var
nurseWorkloadData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeNurseWorkload
)?.
PerData
.
Select
(
t
=>
(
PerData
)
t
);
...
...
@@ -291,6 +305,10 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
dept
.
MinimumFee
=
minimum
.
AvgValue
*
(
dept
.
MinimumFactor
??
0
)
*
(
dept
.
ManagerNumber
+
dept
.
Number
);
}
var
extra
=
deptExtra
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
dept
.
AccountingUnit
&&
t
.
UnitType
==
dept
.
UnitType
&&
t
.
Department
==
dept
.
Department
);
if
(
isFirst
&&
extra
!=
null
)
dept
.
Extra
+=
extra
.
CellValue
??
0
;
dept
.
ScoringAverage
=
dept
.
ScoringAverage
==
0
m
?
1
:
dept
.
ScoringAverage
;
dept
.
AdjustFactor
=
dept
.
AdjustFactor
==
0
m
?
1
:
dept
.
AdjustFactor
;
dept
.
WorkSlopeFactor
=
dept
.
WorkSlopeFactor
==
0
m
?
1
:
dept
.
WorkSlopeFactor
;
...
...
performance/Performance.Services/AllotService.cs
View file @
7e4c9653
...
...
@@ -317,7 +317,7 @@ public void Generate(per_allot allot, string mail)
//计算科室业绩(含保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效)保底绩效
logManageService
.
WriteMsg
(
"计算保底绩效参考标准值"
,
"计算科室业绩"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
sheet
=
processComputService
.
Compute
(
excel
,
mergeSheets
,
minimumBaiscnorm
);
var
sheet
=
processComputService
.
Compute
(
excel
,
mergeSheets
,
minimumBaiscnorm
,
true
);
//计算科室自定义保底绩效范围
logManageService
.
WriteMsg
(
"计算保底绩效参考标准值"
,
"正在计算科室自定义保底绩效范围"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
...
...
performance/Performance.Services/ComputeService.cs
View file @
7e4c9653
...
...
@@ -540,7 +540,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
int
groupbasis
=
1
;
string
single
=
""
;
var
sheetType
=
new
List
<
int
>
{
(
int
)
SheetType
.
Income
,
(
int
)
SheetType
.
OtherIncome
,
(
int
)
SheetType
.
Expend
,
(
int
)
SheetType
.
Workload
};
var
sheetType
=
new
List
<
int
>
{
(
int
)
SheetType
.
Income
,
(
int
)
SheetType
.
OtherIncome
,
(
int
)
SheetType
.
Expend
,
(
int
)
SheetType
.
Workload
,
(
int
)
SheetType
.
AccountAssess
};
foreach
(
var
stype
in
sheetType
)
{
if
(
type
==
3
&&
stype
==
(
int
)
SheetType
.
Workload
)
type
=
1
;
...
...
@@ -556,12 +556,29 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
var
headerData
=
headers
?.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
);
var
sheettype
=
1
;
//特殊核算科室 4
var
amount
=
0
m
;
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
Expend
)
{
sheettype
=
2
;
amount
=
economic
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
Contains
(
sheetName
)
&&
t
.
UnitType
==
type
)?.
ItemValue
??
0
m
;
}
else
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
Workload
)
{
sheettype
=
3
;
amount
=
doctor
.
WorkloadFee
??
0
m
;
}
else
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
AccountAssess
)
{
sheettype
=
5
;
amount
=
sheetData
.
Sum
(
t
=>
t
.
CellValue
??
0
m
);
}
var
item
=
new
DetailDtos
{
ItemName
=
sheetName
,
IncomeType
=
sheet
.
SheetType
==
(
int
)
SheetType
.
Expend
?
2
:
sheet
.
SheetType
==
(
int
)
SheetType
.
Workload
?
3
:
1
,
Amount
=
(
sheet
.
SheetType
==
(
int
)
SheetType
.
Workload
?
doctor
.
WorkloadFee
:
economic
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
Contains
(
sheetName
)
&&
t
.
UnitType
==
type
)?.
ItemValue
)
??
0
m
,
IncomeType
=
sheettype
,
Amount
=
amount
,
GroupBasis
=
groupbasis
,
};
...
...
performance/Performance.Services/PerExcelService/PerSheetDataFactory.cs
View file @
7e4c9653
...
...
@@ -53,6 +53,9 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType, bool isnew = fa
case
SheetType
.
AccountBasicSpecial
:
dataread
=
new
PerSheetDataReadDeptAccountingSpecial
();
break
;
case
SheetType
.
AccountAssess
:
dataread
=
new
PerSheetDataReadAccountAssess
();
break
;
}
return
dataread
;
}
...
...
performance/Performance.Services/PerExcelService/PerSheetService.cs
View file @
7e4c9653
...
...
@@ -94,6 +94,8 @@ public SheetType GetSheetType(string sheetName)
return
SheetType
.
AccountBasic
;
else
if
(
sheetName
.
StartsWith
(
"4.2"
))
return
SheetType
.
SpecialUnit
;
else
if
(
sheetName
.
StartsWith
(
"5.1"
))
return
SheetType
.
AccountAssess
;
return
SheetType
.
Unidentifiable
;
}
}
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadAccountAssess.cs
0 → 100644
View file @
7e4c9653
using
NPOI.SS.UserModel
;
using
Performance.DtoModels
;
using
Performance.Infrastructure
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Performance.Services
{
public
class
PerSheetDataReadAccountAssess
:
IPerSheetDataRead
{
public
PerSheetPoint
Point
=>
new
PerSheetPoint
{
HeaderFirstRowNum
=
1
,
HeaderLastRowNum
=
1
,
HeaderFirstCellNum
=
0
,
DataFirstRowNum
=
2
,
AccountingUnit
=
new
List
<
AccountingUnit
>
{
new
AccountingUnit
{
UnitTypeNum
=
1
,
AccountingUnitCellNum
=
2
,
DeptCellNum
=
3
,
}
}
};
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
var
unit
=
Point
.
AccountingUnit
.
First
();
//查询除了 核算单元 科室名称 有效数据列头位置
var
vhead
=
perHeader
.
Where
(
t
=>
t
.
PointCell
!=
unit
.
UnitTypeNum
&&
t
.
PointCell
!=
unit
.
AccountingUnitCellNum
&&
t
.
PointCell
!=
unit
.
DeptCellNum
).
OrderBy
(
t
=>
t
.
PointCell
);
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
{
var
row
=
sheet
.
GetRow
(
r
);
if
(
row
==
null
)
continue
;
for
(
int
c
=
1
;
c
<
vhead
.
Count
();
c
++)
{
var
athead
=
vhead
.
ElementAt
(
c
);
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
));
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
PerData
data
=
new
PerData
{
RowNumber
=
r
,
SignID
=
athead
.
SignID
,
UnitType
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
UnitTypeNum
.
Value
)),
AccountingUnit
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)),
Department
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)),
TypeName
=
athead
?.
CellValue
,
CellValue
=
cellValue
,
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
FactorValue
=
1
,
IsFactor
=
true
,
};
if
(
string
.
IsNullOrEmpty
(
data
.
AccountingUnit
)
&&
string
.
IsNullOrEmpty
(
data
.
Department
))
continue
;
dataList
.
Add
(
data
);
}
}
return
dataList
;
}
}
}
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