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
c447d46c
Commit
c447d46c
authored
Sep 16, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
科室考核得分率
parent
74e46b54
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
166 additions
and
109 deletions
+166
-109
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+4
-1
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
+5
-0
performance/Performance.Services/AgainAllot/AgainService.cs
+2
-1
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+23
-2
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+3
-2
performance/Performance.Services/AllotService.cs
+5
-2
performance/Performance.Services/ComputeService.cs
+13
-3
performance/Performance.Services/PerExcelService/NopiSevice.cs
+67
-67
performance/Performance.Services/PerExcelService/PerSheetDataFactory.cs
+3
-0
performance/Performance.Services/PerExcelService/PerSheetService.cs
+2
-0
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadAccountExtra.cs
+7
-6
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadBillIncome.cs
+5
-4
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccountingSpecial.cs
+3
-2
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadExpend.cs
+4
-3
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadIncome.cs
+4
-3
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadOtherIncome.cs
+4
-3
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadPersonExtra.cs
+7
-6
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadWorkload.cs
+5
-4
No files found.
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
c447d46c
...
...
@@ -664,6 +664,9 @@
<member
name=
"F:Performance.DtoModels.SheetType.LogisticsEmployee"
>
<summary>
行政后勤
</summary>
</member>
<member
name=
"F:Performance.DtoModels.SheetType.AccountScoreAverage"
>
<summary>
科室材料考核
</summary>
</member>
<member
name=
"T:Performance.DtoModels.AccountUnitType"
>
<summary>
核算单元类型
...
...
@@ -1082,7 +1085,7 @@
科室类别(例如 医技科室 临床科室 其他科室)
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataLogisticsEmployee.
Job
Number"
>
<member
name=
"P:Performance.DtoModels.PerDataLogisticsEmployee.
Personnel
Number"
>
<summary>
人员工号
</summary>
...
...
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
View file @
c447d46c
...
...
@@ -114,6 +114,11 @@ public enum SheetType
/// <summary> 行政后勤 </summary>
[
Description
(
"行政后勤"
)]
LogisticsEmployee
=
21
,
/// <summary> 科室材料考核 </summary>
[
Description
(
"科室考核"
)]
AccountScoreAverage
=
25
,
}
/// <summary>
...
...
performance/Performance.Services/AgainAllot/AgainService.cs
View file @
c447d46c
...
...
@@ -82,7 +82,8 @@ private List<PerAgainData> SlideRowRead(ISheet sheet, PerHeader header, int r, I
for
(
int
c
=
0
;
c
<
header
.
Children
.
Count
();
c
++)
{
var
athead
=
header
.
Children
.
ElementAt
(
c
);
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
));
//var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
var
cellValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
athead
.
PointCell
).
GetValue
());
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
var
factorValue
=
ConvertHelper
.
To
<
decimal
?>(
sheet
.
GetRow
(
FactorRow
).
GetCell
(
athead
.
PointCell
)?.
ToString
());
...
...
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
c447d46c
...
...
@@ -249,7 +249,7 @@ public void Save(List<PerSheet> perSheets, int allotId)
/// <param name="perSheet"></param>
/// <returns></returns>
public
List
<
PerSheet
>
Compute
(
PerExcel
excel
,
List
<
PerSheet
>
perSheet
,
IEnumerable
<
AccountUnitTotal
>
extras
,
IEnumerable
<
AccountUnitTotal
>
drugExtras
,
IEnumerable
<
AccountUnitTotal
>
materialsExtras
)
IEnumerable
<
AccountUnitTotal
>
drugExtras
,
IEnumerable
<
AccountUnitTotal
>
materialsExtras
,
IEnumerable
<
AccountUnitTotal
>
accountScoreAverages
)
{
var
accountList
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountBasic
)?.
PerData
?.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
var
economicData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeEconomic
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
...
...
@@ -276,6 +276,7 @@ public void Save(List<PerSheet> perSheets, int allotId)
var
extra
=
extras
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
unitType
.
ToString
()
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
)?.
TotelValue
;
var
drugExtra
=
drugExtras
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
unitType
.
ToString
()
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
)?.
TotelValue
;
var
materialsExtra
=
materialsExtras
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
unitType
.
ToString
()
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
)?.
TotelValue
;
var
scoreAverage
=
accountScoreAverages
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
unitType
.
ToString
()
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
)?.
TotelValue
;
var
econDoctor
=
economicData
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
AccountingUnit
);
var
workDoctor
=
info
.
Data
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
AccountingUnit
);
...
...
@@ -288,7 +289,7 @@ public void Save(List<PerSheet> perSheets, int allotId)
workDoctor
=
info
.
Data
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
UnitType
.
医生组
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
AccountingUnit
);
dept
.
MedicineFactor
=
workDoctor
?.
MedicineFactor
;
dept
.
ScoringAverage
=
dept
.
ScoringAverage
==
0
m
?
0
:
dept
.
ScoringAverage
;
dept
.
ScoringAverage
=
(
scoreAverage
.
HasValue
?
scoreAverage
:
dept
.
ScoringAverage
)
??
0
;
dept
.
AdjustFactor
=
dept
.
AdjustFactor
==
0
m
?
1
:
dept
.
AdjustFactor
;
dept
.
Income
=
econDoctor
?.
CellValue
??
0
;
dept
.
WorkloadFee
=
workDoctor
?.
CellValue
??
0
;
...
...
@@ -422,6 +423,26 @@ public IEnumerable<EmpolyeeTotal> GetEmployeeExtra(PerExcel excel)
});
}
/// <summary>
/// 获取科室考核得分率
/// </summary>
/// <param name="excel"></param>
public
IEnumerable
<
AccountUnitTotal
>
GetAccountScoreAverage
(
PerExcel
excel
,
SheetType
sheetType
,
bool
isTotal
=
false
)
{
var
assessList
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
sheetType
)
?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
assessList
=
(
isTotal
)
?
assessList
?.
Where
(
w
=>
w
.
IsTotal
==
1
)
:
assessList
?.
Where
(
w
=>
w
.
IsTotal
!=
1
);
return
assessList
?.
GroupBy
(
t
=>
new
{
t
.
UnitType
,
t
.
AccountingUnit
})
?.
Select
(
t
=>
new
AccountUnitTotal
{
UnitType
=
t
.
Key
.
UnitType
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
TotelValue
=
t
.
Sum
(
g
=>
g
.
CellValue
)
});
}
///// <summary>
///// 计算保底绩效参考标准
...
...
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
c447d46c
...
...
@@ -121,7 +121,7 @@ public class ResultComputeService : IAutoInjection
/// <param name="allot"></param>
public
void
SpecialUnitCompute
(
PerExcel
excel
,
per_allot
allot
,
List
<
PerSheet
>
sheetLast
,
List
<
res_baiscnorm
>
baiscnormList
,
IEnumerable
<
AccountUnitTotal
>
accountExtras
,
IEnumerable
<
AccountUnitTotal
>
drugExtras
,
IEnumerable
<
AccountUnitTotal
>
materialsExtras
,
IEnumerable
<
EmpolyeeTotal
>
employeeExtra
)
IEnumerable
<
EmpolyeeTotal
>
employeeExtra
,
IEnumerable
<
AccountUnitTotal
>
accountScoreAverages
)
{
var
isBudget
=
budgetService
.
GetAdjustAndGrant
(
allot
,
out
decimal
adjust
,
out
decimal
grant
);
var
typeList
=
EnumHelper
.
GetItems
<
PerforType
>();
...
...
@@ -169,6 +169,7 @@ public class ResultComputeService : IAutoInjection
var
extra
=
accountExtras
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
()
&&
w
.
AccountingUnit
==
dept
?.
AccountingUnit
)?.
TotelValue
;
var
drugExtra
=
drugExtras
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
()
&&
w
.
AccountingUnit
==
dept
?.
AccountingUnit
)?.
TotelValue
;
var
materialsExtra
=
materialsExtras
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
()
&&
w
.
AccountingUnit
==
dept
?.
AccountingUnit
)?.
TotelValue
;
var
scoreAverage
=
accountScoreAverages
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
()
&&
w
.
AccountingUnit
==
dept
?.
AccountingUnit
)?.
TotelValue
;
decimal
?
headcount
=
null
;
if
(
typeList
.
Any
(
o
=>
o
.
Description
==
item
.
QuantitativeIndicators
))
...
...
@@ -187,7 +188,7 @@ public class ResultComputeService : IAutoInjection
Quantity
=
item
.
Quantity
,
QuantitativeIndicatorsValue
=
item
.
QuantitativeIndicatorsValue
,
QuantitativeFee
=
item
.
Quantity
*
item
.
QuantitativeIndicatorsValue
*
headcount
,
ScoringAverage
=
dept
?.
ScoringAverage
,
ScoringAverage
=
scoreAverage
.
HasValue
?
scoreAverage
:
dept
?.
ScoringAverage
,
//OtherPerfor = dept?.OtherPerfor,
Punishment
=
(
extra
??
0
),
MedicineExtra
=
(
drugExtra
??
0
),
...
...
performance/Performance.Services/AllotService.cs
View file @
c447d46c
...
...
@@ -359,6 +359,9 @@ public void Generate(per_allot allot, string mail)
// 科室材料占比考核
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"科室材料占比考核"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
materialsExtras
=
processComputService
.
GetAccountExtra
(
excel
,
SheetType
.
AccountMaterialsAssess
,
true
);
// 科室考核得分率
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"科室考核得分率"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
accountScoreAverages
=
processComputService
.
GetAccountScoreAverage
(
excel
,
SheetType
.
AccountScoreAverage
,
true
);
////科室药占比考核
//logManageService.WriteMsg("正在生成绩效", "科室奖罚汇总", 1, allot.ID, "ReceiveMessage", true);
...
...
@@ -370,7 +373,7 @@ public void Generate(per_allot allot, string mail)
//重新计算科室业绩(含所有提供保底金额)
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算科室业绩分"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
sheetLast
=
processComputService
.
Compute
(
excel
,
mergeSheets
,
accountExtras
,
drugExtras
,
materialsExtras
);
var
sheetLast
=
processComputService
.
Compute
(
excel
,
mergeSheets
,
accountExtras
,
drugExtras
,
materialsExtras
,
accountScoreAverages
);
//保存计算过程数据
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存科室业绩结果及计算过程中产生的数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
...
...
@@ -389,7 +392,7 @@ public void Generate(per_allot allot, string mail)
// 计算特殊科室
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算最终特殊科室绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
resultComputeService
.
SpecialUnitCompute
(
excel
,
allot
,
sheetLast
,
baiscnormList
,
accountExtras
,
drugExtras
,
materialsExtras
,
employeeExtra
);
resultComputeService
.
SpecialUnitCompute
(
excel
,
allot
,
sheetLast
,
baiscnormList
,
accountExtras
,
drugExtras
,
materialsExtras
,
employeeExtra
,
accountScoreAverages
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存最终特殊科室绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
//保存 绩效人均参考标准
...
...
performance/Performance.Services/ComputeService.cs
View file @
c447d46c
...
...
@@ -709,8 +709,8 @@ 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
,
(
int
)
SheetType
.
Account
Extra
,
(
int
)
SheetType
.
AccountDrugAssess
,
(
int
)
SheetType
.
AccountMaterialsAssess
(
int
)
SheetType
.
Income
,
(
int
)
SheetType
.
OtherIncome
,
(
int
)
SheetType
.
Expend
,
(
int
)
SheetType
.
Workload
,
(
int
)
SheetType
.
AccountExtra
,
(
int
)
SheetType
.
Account
DrugAssess
,
(
int
)
SheetType
.
AccountMaterialsAssess
,
(
int
)
SheetType
.
AccountScoreAverage
};
foreach
(
var
stype
in
sheetType
)
{
...
...
@@ -758,6 +758,11 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
sheettype
=
7
;
amount
=
doctor
?.
MaterialsExtra
??
0
;
}
else
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
AccountScoreAverage
)
{
sheettype
=
8
;
amount
=
doctor
?.
ScoringAverage
??
0
;
}
var
item
=
new
DetailDtos
{
...
...
@@ -959,7 +964,7 @@ public DeptDataDetails SpecialDeptDetail(ag_secondallot second)
var
sheetType
=
new
List
<
int
>
{
(
int
)
SheetType
.
AccountExtra
,
(
int
)
SheetType
.
AccountDrugAssess
,
(
int
)
SheetType
.
AccountMaterialsAssess
(
int
)
SheetType
.
AccountExtra
,
(
int
)
SheetType
.
AccountDrugAssess
,
(
int
)
SheetType
.
AccountMaterialsAssess
,(
int
)
SheetType
.
AccountScoreAverage
};
Regex
reg
=
new
Regex
(
"[0-9]*"
);
int
groupBasis
=
0
;
...
...
@@ -991,6 +996,11 @@ public DeptDataDetails SpecialDeptDetail(ag_secondallot second)
sheettype
=
7
;
amount
=
special
.
FirstOrDefault
()?.
MaterialsExtra
??
0
;
}
else
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
AccountScoreAverage
)
{
sheettype
=
8
;
amount
=
special
.
FirstOrDefault
()?.
ScoringAverage
??
0
;
}
var
item
=
new
DetailDtos
{
...
...
performance/Performance.Services/PerExcelService/NopiSevice.cs
View file @
c447d46c
...
...
@@ -12,53 +12,53 @@ namespace Performance.Services
{
public
static
class
NopiSevice
{
public
static
string
GetCellStringValue
(
ICell
cell
)
{
if
(
cell
!=
null
)
{
try
{
switch
(
cell
.
CellType
)
{
case
CellType
.
Numeric
:
return
cell
.
NumericCellValue
.
ToString
().
Replace
(
"0"
,
""
);
case
CellType
.
String
:
return
cell
.
StringCellValue
.
ToString
().
Replace
(
"0"
,
""
);
case
CellType
.
Formula
:
cell
.
SetCellType
(
CellType
.
String
);
return
cell
.
StringCellValue
.
ToString
().
Replace
(
"0"
,
""
);
}
}
catch
(
Exception
ex
)
{
//throw ex;
}
}
return
null
;
}
public
static
decimal
?
GetCellValue
(
ICell
cell
)
{
if
(
cell
!=
null
)
{
try
{
switch
(
cell
.
CellType
)
{
case
CellType
.
Numeric
:
return
ConvertHelper
.
To
<
decimal
?>(
cell
.
NumericCellValue
);
case
CellType
.
String
:
return
ConvertHelper
.
To
<
decimal
?>(
cell
.
StringCellValue
);
case
CellType
.
Formula
:
return
ConvertHelper
.
To
<
decimal
?>(
cell
.
NumericCellValue
);
}
}
catch
(
Exception
ex
)
{
//throw ex;
}
}
return
null
;
}
//
public static string GetCellStringValue(ICell cell)
//
{
//
if (cell != null)
//
{
//
try
//
{
//
switch (cell.CellType)
//
{
//
case CellType.Numeric:
//
return cell.NumericCellValue.ToString().Replace("0", "");
//
case CellType.String:
//
return cell.StringCellValue.ToString().Replace("0", "");
//
case CellType.Formula:
//
cell.SetCellType(CellType.String);
//
return cell.StringCellValue.ToString().Replace("0", "");
//
}
//
}
//
catch (Exception ex)
//
{
//
//throw ex;
//
}
//
}
//
return null;
//
}
//
public static decimal? GetCellValue(ICell cell)
//
{
//
if (cell != null)
//
{
//
try
//
{
//
switch (cell.CellType)
//
{
//
case CellType.Numeric:
//
return ConvertHelper.To<decimal?>(cell.NumericCellValue);
//
case CellType.String:
//
return ConvertHelper.To<decimal?>(cell.StringCellValue);
//
case CellType.Formula:
//
return ConvertHelper.To<decimal?>(cell.NumericCellValue);
//
}
//
}
//
catch (Exception ex)
//
{
//
//throw ex;
//
}
//
}
//
return null;
//
}
public
static
string
GetValue
(
this
ICell
cell
)
{
...
...
@@ -98,25 +98,25 @@ public static bool TryGetPoint(List<PerHeader> headers, string title, out int po
return
x
.
HasValue
;
}
public
static
DateTime
?
GetCellDatetimeValue
(
ICell
cell
)
{
if
(
cell
!=
null
)
{
if
(
cell
.
CellType
==
CellType
.
Numeric
)
{
if
(
HSSFDateUtil
.
IsCellDateFormatted
(
cell
))
{
return
cell
.
DateCellValue
;
}
}
else
if
(
cell
.
CellType
==
CellType
.
String
)
{
var
reg
=
@"(19|20)\d{2}(-|/)[01]?\d(-|/)[0123]?\d( [012]?\d\:\d{2}\:\d{2})?"
;
if
(!
string
.
IsNullOrEmpty
(
cell
.
StringCellValue
)
&&
Regex
.
Match
(
cell
.
StringCellValue
.
Trim
(),
reg
).
ToString
()
==
cell
.
StringCellValue
.
Trim
())
return
ConvertHelper
.
To
<
DateTime
>(
cell
.
StringCellValue
);
}
}
return
null
;
}
//
public static DateTime? GetCellDatetimeValue(ICell cell)
//
{
//
if (cell != null)
//
{
//
if (cell.CellType == CellType.Numeric)
//
{
//
if (HSSFDateUtil.IsCellDateFormatted(cell))
//
{
//
return cell.DateCellValue;
//
}
//
}
//
else if (cell.CellType == CellType.String)
//
{
//
var reg = @"(19|20)\d{2}(-|/)[01]?\d(-|/)[0123]?\d( [012]?\d\:\d{2}\:\d{2})?";
//
if (!string.IsNullOrEmpty(cell.StringCellValue) && Regex.Match(cell.StringCellValue.Trim(), reg).ToString() == cell.StringCellValue.Trim())
//
return ConvertHelper.To<DateTime>(cell.StringCellValue);
//
}
//
}
//
return null;
//
}
}
}
performance/Performance.Services/PerExcelService/PerSheetDataFactory.cs
View file @
c447d46c
...
...
@@ -72,6 +72,9 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType, bool isnew = fa
dataread
=
new
PerSheetDataReadAccountExtra
();
//dataread = new PerSheetDataReadAccountMaterialsAssess(); // 科室材料考核
break
;
case
SheetType
.
AccountScoreAverage
:
dataread
=
new
PerSheetDataReadAccountExtra
();
break
;
}
return
dataread
;
}
...
...
performance/Performance.Services/PerExcelService/PerSheetService.cs
View file @
c447d46c
...
...
@@ -104,6 +104,8 @@ public SheetType GetSheetType(string sheetName)
return
SheetType
.
AccountDrugAssess
;
else
if
(
sheetName
.
StartsWith
(
"5.4"
))
return
SheetType
.
AccountMaterialsAssess
;
else
if
(
sheetName
.
StartsWith
(
"6.1"
))
return
SheetType
.
AccountScoreAverage
;
return
SheetType
.
Unidentifiable
;
}
}
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadAccountExtra.cs
View file @
c447d46c
...
...
@@ -49,7 +49,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
{
var
athead
=
vhead
.
ElementAt
(
c
);
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
));
//var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
var
cellValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
athead
.
PointCell
).
GetValue
());
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
...
...
@@ -57,8 +58,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{
RowNumber
=
r
,
SignID
=
athead
.
SignID
,
UnitType
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
UnitTypeNum
.
Value
)
),
AccountingUnit
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)
),
UnitType
=
row
.
GetCell
(
unit
.
UnitTypeNum
.
Value
).
GetValue
(
),
AccountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
).
GetValue
(
),
TypeName
=
athead
?.
CellValue
,
CellValue
=
cellValue
,
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
...
...
@@ -68,11 +69,11 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
if
(
Point
.
TotalCellNum
.
HasValue
&&
athead
.
PointCell
==
Point
.
TotalCellNum
)
data
.
IsTotal
=
1
;
if
(
unit
.
DeptCellNum
.
HasValue
)
data
.
Department
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)
);
data
.
Department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
).
GetValue
(
);
if
(
unit
.
EmpNameCellNum
.
HasValue
)
data
.
EmployeeName
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
EmpNameCellNum
.
Value
)
);
data
.
EmployeeName
=
row
.
GetCell
(
unit
.
EmpNameCellNum
.
Value
).
GetValue
(
);
if
(
unit
.
JobCellNum
.
HasValue
)
data
.
JobNumber
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
JobCellNum
.
Value
)
);
data
.
JobNumber
=
row
.
GetCell
(
unit
.
JobCellNum
.
Value
).
GetValue
(
);
if
(
string
.
IsNullOrEmpty
(
data
.
AccountingUnit
)
&&
string
.
IsNullOrEmpty
(
data
.
Department
))
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadBillIncome.cs
View file @
c447d46c
...
...
@@ -68,20 +68,21 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
{
var
athead
=
vhead
.
ElementAt
(
c
);
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
));
//var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
var
cellValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
athead
.
PointCell
).
GetValue
());
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
PerData
data
=
new
PerData
{
RowNumber
=
r
,
SignID
=
athead
.
SignID
,
AccountingUnit
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)
),
Department
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)
),
AccountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
).
GetValue
(
),
Department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
).
GetValue
(
),
TypeName
=
athead
?.
CellValue
,
CellValue
=
cellValue
,
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
UnitType
=
unit
.
UnitType
,
//手动匹配
FactorValue
=
ConvertHelper
.
To
<
decimal
?>(
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
).
GetCell
(
athead
.
PointCell
)
?.
NumericCellValue
),
FactorValue
=
ConvertHelper
.
To
<
decimal
?>(
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
).
GetCell
(
athead
.
PointCell
)
.
GetValue
()
),
IsFactor
=
true
,
};
dataList
.
Add
(
data
);
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccountingSpecial.cs
View file @
c447d46c
...
...
@@ -45,7 +45,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
{
var
athead
=
vhead
.
ElementAt
(
c
);
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
));
//var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
var
cellValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
athead
.
PointCell
).
GetValue
());
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
...
...
@@ -53,7 +54,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{
RowNumber
=
r
,
SignID
=
athead
.
SignID
,
AccountingUnit
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)
),
AccountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
).
GetValue
(
),
//Department = NopiSevice.GetCellStringValue(row.GetCell(unit.DeptCellNum.Value)),
TypeName
=
athead
?.
CellValue
,
CellValue
=
cellValue
,
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadExpend.cs
View file @
c447d46c
...
...
@@ -70,7 +70,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
continue
;
if
(!
string
.
IsNullOrEmpty
(
athead
?.
CellValue
)
&&
athead
.
CellValue
.
Contains
(
"备注"
))
continue
;
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
));
//var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
var
cellValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
athead
.
PointCell
).
GetValue
());
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
...
...
@@ -78,8 +79,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{
RowNumber
=
r
,
SignID
=
athead
.
SignID
,
AccountingUnit
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)
),
Department
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)
),
AccountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
).
GetValue
(
),
Department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
).
GetValue
(
),
TypeName
=
athead
?.
CellValue
,
CellValue
=
cellValue
,
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadIncome.cs
View file @
c447d46c
...
...
@@ -66,15 +66,16 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
{
var
athead
=
vhead
.
ElementAt
(
c
);
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
));
//var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
var
cellValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
athead
.
PointCell
).
GetValue
());
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
PerData
data
=
new
PerData
{
RowNumber
=
r
,
SignID
=
athead
.
SignID
,
AccountingUnit
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)
),
Department
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)
),
AccountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
).
GetValue
(
),
Department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
).
GetValue
(
),
TypeName
=
athead
?.
CellValue
,
CellValue
=
cellValue
,
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadOtherIncome.cs
View file @
c447d46c
...
...
@@ -66,15 +66,16 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
{
var
athead
=
vhead
.
ElementAt
(
c
);
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
));
//var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
var
cellValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
athead
.
PointCell
).
GetValue
());
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
PerData
data
=
new
PerData
{
RowNumber
=
r
,
SignID
=
athead
.
SignID
,
AccountingUnit
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)
),
Department
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)
),
AccountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
).
GetValue
(
),
Department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
).
GetValue
(
),
TypeName
=
athead
?.
CellValue
,
CellValue
=
cellValue
,
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadPersonExtra.cs
View file @
c447d46c
...
...
@@ -48,7 +48,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
{
var
athead
=
vhead
.
ElementAt
(
c
);
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
));
//var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
var
cellValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
athead
.
PointCell
).
GetValue
());
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
...
...
@@ -56,8 +57,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{
RowNumber
=
r
,
SignID
=
athead
.
SignID
,
UnitType
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
UnitTypeNum
.
Value
)
),
AccountingUnit
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)
),
UnitType
=
row
.
GetCell
(
unit
.
UnitTypeNum
.
Value
).
GetValue
(
),
AccountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
).
GetValue
(
),
TypeName
=
athead
?.
CellValue
,
CellValue
=
cellValue
,
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
...
...
@@ -67,11 +68,11 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
if
(
Point
.
TotalCellNum
.
HasValue
&&
athead
.
PointCell
==
Point
.
TotalCellNum
)
data
.
IsTotal
=
1
;
if
(
unit
.
DeptCellNum
.
HasValue
)
data
.
Department
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)
);
data
.
Department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
).
GetValue
(
);
if
(
unit
.
EmpNameCellNum
.
HasValue
)
data
.
EmployeeName
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
EmpNameCellNum
.
Value
)
);
data
.
EmployeeName
=
row
.
GetCell
(
unit
.
EmpNameCellNum
.
Value
).
GetValue
(
);
if
(
unit
.
JobCellNum
.
HasValue
)
data
.
JobNumber
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
JobCellNum
.
Value
)
);
data
.
JobNumber
=
row
.
GetCell
(
unit
.
JobCellNum
.
Value
).
GetValue
(
);
if
(
string
.
IsNullOrEmpty
(
data
.
AccountingUnit
)
&&
string
.
IsNullOrEmpty
(
data
.
Department
))
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadWorkload.cs
View file @
c447d46c
...
...
@@ -46,7 +46,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
{
var
athead
=
vhead
.
ElementAt
(
c
);
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
));
//var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
var
cellValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
athead
.
PointCell
).
GetValue
());
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
...
...
@@ -54,13 +55,13 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{
RowNumber
=
r
,
SignID
=
athead
.
SignID
,
AccountingUnit
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)
),
Department
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)
),
AccountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
).
GetValue
(
),
Department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
).
GetValue
(
),
TypeName
=
athead
?.
CellValue
,
CellValue
=
cellValue
,
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
UnitType
=
unit
.
UnitType
,
FactorValue
=
ConvertHelper
.
To
<
decimal
?>(
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
).
GetCell
(
athead
.
PointCell
)
?.
NumericCellValue
),
FactorValue
=
ConvertHelper
.
To
<
decimal
?>(
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
).
GetCell
(
athead
.
PointCell
)
.
GetValue
()
),
IsFactor
=
true
,
};
if
(
sheet
.
SheetName
.
Contains
(
"医生组"
))
...
...
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