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
d8751755
Commit
d8751755
authored
Aug 17, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
计算修改2
parent
f76984c7
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
190 additions
and
39 deletions
+190
-39
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+15
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+10
-0
performance/Performance.DtoModels/PerExcel/PerDataAccountBaisc.cs
+4
-4
performance/Performance.DtoModels/PerExcel/PerSheetHeader.cs
+1
-1
performance/Performance.DtoModels/PerExcel/PerSheetPoint.cs
+8
-0
performance/Performance.EntityModels/Entity/res_specialunit.cs
+29
-19
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+9
-3
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+10
-4
performance/Performance.Services/AllotService.cs
+10
-4
performance/Performance.Services/PerExcelService/PerSheetDataFactory.cs
+1
-1
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadAccountExtra.cs
+8
-2
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadPersonExtra.cs
+83
-0
performance/Performance.Services/SheetSevice.cs
+2
-1
No files found.
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
d8751755
...
...
@@ -802,6 +802,11 @@
材料占比奖罚
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.Extra"
>
<summary>
医院奖罚
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.ScoringAverage"
>
<summary>
考核对分率
...
...
@@ -1202,6 +1207,16 @@
核算单元类型
</summary>
</member>
<member
name=
"P:Performance.DtoModels.AccountingUnit.EmpNameCellNum"
>
<summary>
人员名称
</summary>
</member>
<member
name=
"P:Performance.DtoModels.AccountingUnit.JobCellNum"
>
<summary>
人员工号
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ReportData.ChartType"
>
<summary>
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
d8751755
...
...
@@ -4524,6 +4524,16 @@
医院奖罚
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_specialunit.MedicineExtra"
>
<summary>
药占比奖罚
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_specialunit.MaterialsExtra"
>
<summary>
材料占比奖罚
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_specialunit.Adjust"
>
<summary>
调节系数
...
...
performance/Performance.DtoModels/PerExcel/PerDataAccountBaisc.cs
View file @
d8751755
...
...
@@ -78,10 +78,10 @@ public class PerDataAccountBaisc : IPerData
/// </summary>
public
decimal
MaterialsExtra
{
get
;
set
;
}
///
//
<summary>
///
//
医院奖罚
///
//
</summary>
//
public decimal Extra { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
public
decimal
Extra
{
get
;
set
;
}
/// <summary>
/// 考核对分率
...
...
performance/Performance.DtoModels/PerExcel/PerSheetHeader.cs
View file @
d8751755
...
...
@@ -41,7 +41,7 @@ public class PerSheetHeader
(
"职务分类"
,
(
t
)
=>
t
.
JobTitle
,
1
,
1
,
false
,
true
,
false
,
"JobTitle"
),
//("岗位系数", (t) => t.PostCoefficient, 1, 1, false, true, false, "PostCoefficient"),
(
"基础绩效系数"
,
(
t
)
=>
Math
.
Round
(
t
.
Basics
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
false
,
"Basics"
),
(
"效率绩效人数"
,
(
t
)
=>
Math
.
Round
(
t
.
PermanentStaff
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"PermanentStaff"
),
(
"效率绩效人数"
,
(
t
)
=>
Math
.
Round
(
(
t
.
PermanentStaff
??
0
)
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"PermanentStaff"
),
(
"效率绩效系数"
,
(
t
)
=>
Math
.
Round
(
t
.
Efficiency
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Efficiency"
),
(
"规模绩效系数"
,
(
t
)
=>
Math
.
Round
(
t
.
Scale
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Scale"
),
(
"管理绩效发放系数"
,
(
t
)
=>
Math
.
Round
(
t
.
Management
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Management"
),
...
...
performance/Performance.DtoModels/PerExcel/PerSheetPoint.cs
View file @
d8751755
...
...
@@ -51,5 +51,13 @@ public class AccountingUnit
/// 核算单元类型
/// </summary>
public
string
UnitType
{
get
;
set
;
}
/// <summary>
/// 人员名称
/// </summary>
public
int
?
EmpNameCellNum
{
get
;
set
;
}
/// <summary>
/// 人员工号
/// </summary>
public
int
?
JobCellNum
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/res_specialunit.cs
View file @
d8751755
...
...
@@ -7,95 +7,105 @@
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
namespace
Performance.EntityModels
{
/// <summary>
///
/// </summary>
[
Table
(
"res_specialunit"
)]
public
class
res_specialunit
public
class
res_specialunit
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
ID
{
get
;
set
;
}
public
int
ID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
AllotID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
SheetID
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 科室名称
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 人数
/// </summary>
public
Nullable
<
decimal
>
Number
{
get
;
set
;
}
/// <summary>
/// 量化指标
/// </summary>
public
string
QuantitativeIndicators
{
get
;
set
;
}
/// <summary>
/// 数量
/// </summary>
public
Nullable
<
decimal
>
Quantity
{
get
;
set
;
}
/// <summary>
/// 量化指标绩效分值
/// </summary>
public
Nullable
<
decimal
>
QuantitativeIndicatorsValue
{
get
;
set
;
}
/// <summary>
/// 考核得分率
/// </summary>
public
Nullable
<
decimal
>
ScoringAverage
{
get
;
set
;
}
/// <summary>
/// 其他绩效
/// </summary>
public
Nullable
<
decimal
>
OtherPerfor
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
/// </summary>
public
Nullable
<
decimal
>
Punishment
{
get
;
set
;
}
/// <summary>
/// 药占比奖罚
/// </summary>
public
decimal
MedicineExtra
{
get
;
set
;
}
/// <summary>
/// 材料占比奖罚
/// </summary>
public
decimal
MaterialsExtra
{
get
;
set
;
}
/// <summary>
/// 调节系数
/// </summary>
public
Nullable
<
decimal
>
Adjust
{
get
;
set
;
}
/// <summary>
/// 人均绩效
/// </summary>
public
Nullable
<
decimal
>
Avg
{
get
;
set
;
}
/// <summary>
/// 应发绩效
/// </summary>
public
Nullable
<
decimal
>
GiveFee
{
get
;
set
;
}
/// <summary>
/// 实发绩效
/// </summary>
public
Nullable
<
decimal
>
RealGiveFee
{
get
;
set
;
}
/// <summary>
/// 业绩总绩效
/// </summary>
...
...
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
d8751755
...
...
@@ -245,7 +245,8 @@ public void Save(List<PerSheet> perSheets, int allotId)
/// <param name="excel"></param>
/// <param name="perSheet"></param>
/// <returns></returns>
public
List
<
PerSheet
>
Compute
(
PerExcel
excel
,
List
<
PerSheet
>
perSheet
,
IEnumerable
<
AccountUnitTotal
>
extras
)
public
List
<
PerSheet
>
Compute
(
PerExcel
excel
,
List
<
PerSheet
>
perSheet
,
IEnumerable
<
AccountUnitTotal
>
extras
,
IEnumerable
<
AccountUnitTotal
>
drugExtras
,
IEnumerable
<
AccountUnitTotal
>
materialsExtras
)
{
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
);
...
...
@@ -270,6 +271,8 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, IEnumerab
{
//科室奖罚汇总结果
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
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
);
...
...
@@ -286,6 +289,9 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, IEnumerab
dept
.
AdjustFactor
=
dept
.
AdjustFactor
==
0
m
?
1
:
dept
.
AdjustFactor
;
dept
.
Income
=
econDoctor
?.
CellValue
??
0
;
dept
.
WorkloadFee
=
workDoctor
?.
CellValue
??
0
;
dept
.
Extra
=
(
extra
??
0
);
dept
.
MedicineExtra
=
(
drugExtra
??
0
);
dept
.
MaterialsExtra
=
(
materialsExtra
??
0
);
dept
.
PerforFee
=
dept
.
Income
*
dept
.
BasicFactor
;
dept
.
PerforTotal
=
Math
.
Round
((
dept
.
PerforFee
+
dept
.
WorkloadFee
+
dept
.
OtherPerfor1
)
??
0
);
dept
.
RealGiveFee
=
Math
.
Round
(((
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
MedicineExtra
+
dept
.
MaterialsExtra
+
dept
.
OtherPerfor2
+
(
extra
??
0
))
*
dept
.
AdjustFactor
)
??
0
);
...
...
@@ -303,10 +309,10 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, IEnumerab
/// 获取科室奖罚汇总结果
/// </summary>
/// <param name="excel"></param>
public
IEnumerable
<
AccountUnitTotal
>
GetAccountExtra
(
PerExcel
excel
)
public
IEnumerable
<
AccountUnitTotal
>
GetAccountExtra
(
PerExcel
excel
,
SheetType
sheetType
)
{
var
assessList
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountExtra
)
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
sheetType
)
?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
...
...
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
d8751755
...
...
@@ -105,7 +105,8 @@ public class ResultComputeService : IAutoInjection
/// <param name="excel"></param>
/// <param name="allot"></param>
public
void
SpecialUnitCompute
(
PerExcel
excel
,
per_allot
allot
,
List
<
PerSheet
>
sheetLast
,
List
<
res_baiscnorm
>
baiscnormList
,
IEnumerable
<
AccountUnitTotal
>
accountExtras
,
IEnumerable
<
EmpolyeeTotal
>
employeeExtra
)
IEnumerable
<
AccountUnitTotal
>
accountExtras
,
IEnumerable
<
AccountUnitTotal
>
drugExtras
,
IEnumerable
<
AccountUnitTotal
>
materialsExtras
,
IEnumerable
<
EmpolyeeTotal
>
employeeExtra
)
{
var
isBudget
=
budgetService
.
GetAdjustAndGrant
(
allot
,
out
decimal
adjust
,
out
decimal
grant
);
var
typeList
=
EnumHelper
.
GetItems
<
PerforType
>();
...
...
@@ -149,6 +150,11 @@ public class ResultComputeService : IAutoInjection
var
groupAdjust
=
isBudget
?
adjust
:
(
dept
?.
AdjustFactor
??
0
);
foreach
(
var
item
in
accountDataList
)
{
//科室奖罚汇总结果
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
res
=
new
res_specialunit
{
AllotID
=
allot
.
ID
,
...
...
@@ -160,11 +166,11 @@ public class ResultComputeService : IAutoInjection
QuantitativeIndicatorsValue
=
item
.
QuantitativeIndicatorsValue
,
ScoringAverage
=
dept
?.
ScoringAverage
,
//OtherPerfor = dept?.OtherPerfor,
//Punishment = group.Punishment,
Punishment
=
(
extra
??
0
),
MedicineExtra
=
(
drugExtra
??
0
),
MaterialsExtra
=
(
materialsExtra
??
0
),
Adjust
=
(
groupAdjust
==
0
)
?
1
:
groupAdjust
,
};
//科室奖罚汇总结果
var
extra
=
accountExtras
.
FirstOrDefault
(
w
=>
w
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
()
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
)?.
TotelValue
;
res
.
GiveFee
=
Math
.
Round
((
sumValue
+
(
extra
??
0
))
??
0
);
res
.
RealGiveFee
=
Math
.
Round
(
res
.
GiveFee
*
(
res
.
ScoringAverage
??
0
)
*
(
groupAdjust
==
0
?
1
:
groupAdjust
)
??
0
);
...
...
performance/Performance.Services/AllotService.cs
View file @
d8751755
...
...
@@ -341,9 +341,15 @@ public void Generate(per_allot allot, string mail)
//logManageService.WriteMsg("计算保底绩效参考标准值", "保存保底绩效参考标准", 1, allot.ID, "ReceiveMessage", true);
//perforResbaiscnormRepository.AddRange(minimumBaiscnorm.ToArray());
//科室奖罚汇总
//
科室奖罚汇总
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"科室奖罚汇总"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
accountExtras
=
processComputService
.
GetAccountExtra
(
excel
);
var
accountExtras
=
processComputService
.
GetAccountExtra
(
excel
,
SheetType
.
AccountExtra
);
// 科室药占比考核
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"科室药占比考核"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
drugExtras
=
processComputService
.
GetAccountExtra
(
excel
,
SheetType
.
AccountDrugAssess
);
// 科室材料占比考核
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"科室材料占比考核"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
materialsExtras
=
processComputService
.
GetAccountExtra
(
excel
,
SheetType
.
AccountMaterialsAssess
);
////科室药占比考核
//logManageService.WriteMsg("正在生成绩效", "科室奖罚汇总", 1, allot.ID, "ReceiveMessage", true);
...
...
@@ -355,7 +361,7 @@ public void Generate(per_allot allot, string mail)
//重新计算科室业绩(含所有提供保底金额)
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算科室业绩分"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
sheetLast
=
processComputService
.
Compute
(
excel
,
mergeSheets
,
accountExtras
);
var
sheetLast
=
processComputService
.
Compute
(
excel
,
mergeSheets
,
accountExtras
,
drugExtras
,
materialsExtras
);
//保存计算过程数据
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存科室业绩结果及计算过程中产生的数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
...
...
@@ -371,7 +377,7 @@ public void Generate(per_allot allot, string mail)
// 计算特殊科室
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算最终特殊科室绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
resultComputeService
.
SpecialUnitCompute
(
excel
,
allot
,
sheetLast
,
baiscnormList
,
accountExtras
,
employeeExtra
);
resultComputeService
.
SpecialUnitCompute
(
excel
,
allot
,
sheetLast
,
baiscnormList
,
accountExtras
,
drugExtras
,
materialsExtras
,
employeeExtra
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存最终特殊科室绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
//保存 绩效人均参考标准
...
...
performance/Performance.Services/PerExcelService/PerSheetDataFactory.cs
View file @
d8751755
...
...
@@ -62,7 +62,7 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType, bool isnew = fa
break
;
case
SheetType
.
PersonExtra
:
//dataread = new PerSheetDataReadPersonExtra(); // 业务中层行政中高层医院奖罚
dataread
=
new
PerSheetDataRead
Account
Extra
();
dataread
=
new
PerSheetDataRead
Person
Extra
();
break
;
case
SheetType
.
AccountDrugAssess
:
dataread
=
new
PerSheetDataReadAccountExtra
();
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadAccountExtra.cs
View file @
d8751755
...
...
@@ -25,7 +25,7 @@ public class PerSheetDataReadAccountExtra : IPerSheetDataRead
{
UnitTypeNum
=
1
,
AccountingUnitCellNum
=
2
,
DeptCellNum
=
3
,
//
DeptCellNum = 3,
}
}
};
...
...
@@ -56,13 +56,19 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
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
(
unit
.
DeptCellNum
.
HasValue
)
data
.
Department
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
));
if
(
unit
.
EmpNameCellNum
.
HasValue
)
data
.
EmployeeName
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
EmpNameCellNum
.
Value
));
if
(
unit
.
JobCellNum
.
HasValue
)
data
.
JobNumber
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
JobCellNum
.
Value
));
if
(
string
.
IsNullOrEmpty
(
data
.
AccountingUnit
)
&&
string
.
IsNullOrEmpty
(
data
.
Department
))
continue
;
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadPersonExtra.cs
0 → 100644
View file @
d8751755
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
{
/// <summary>
/// 科室奖罚
/// </summary>
public
class
PerSheetDataReadPersonExtra
:
IPerSheetDataRead
{
public
PerSheetPoint
Point
=>
new
PerSheetPoint
{
HeaderFirstRowNum
=
1
,
HeaderLastRowNum
=
1
,
HeaderFirstCellNum
=
0
,
DataFirstRowNum
=
2
,
AccountingUnit
=
new
List
<
AccountingUnit
>
{
new
AccountingUnit
{
UnitTypeNum
=
1
,
AccountingUnitCellNum
=
2
,
JobCellNum
=
3
,
EmpNameCellNum
=
4
,
}
}
};
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
)),
TypeName
=
athead
?.
CellValue
,
CellValue
=
cellValue
,
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
FactorValue
=
1
,
IsFactor
=
true
,
};
if
(
unit
.
DeptCellNum
.
HasValue
)
data
.
Department
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
));
if
(
unit
.
EmpNameCellNum
.
HasValue
)
data
.
EmployeeName
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
EmpNameCellNum
.
Value
));
if
(
unit
.
JobCellNum
.
HasValue
)
data
.
JobNumber
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
unit
.
JobCellNum
.
Value
));
if
(
string
.
IsNullOrEmpty
(
data
.
AccountingUnit
)
&&
string
.
IsNullOrEmpty
(
data
.
Department
))
continue
;
dataList
.
Add
(
data
);
}
}
return
dataList
;
}
}
}
performance/Performance.Services/SheetSevice.cs
View file @
d8751755
...
...
@@ -232,7 +232,8 @@ private void CommonExport(int sheetID, SheetExportResponse response)
if
(
head
.
CellValue
.
Contains
(
"核算单元类型"
))
{
var
value
=
dataList
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
rowNumber
).
UnitType
;
rowbody
.
Data
.
Add
(
new
Cell
(
head
.
PointCell
.
Value
,
((
UnitType
)
value
).
ToString
(),
1
,
1
,
false
,
false
));
var
unitType
=
value
.
HasValue
?
((
UnitType
)
value
).
ToString
()
:
""
;
rowbody
.
Data
.
Add
(
new
Cell
(
head
.
PointCell
.
Value
,
unitType
,
1
,
1
,
false
,
false
));
}
else
if
(
head
.
CellValue
.
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