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
8b007359
Commit
8b007359
authored
Nov 26, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2020morge' into custom_script
parents
2d8b7d47
891117c8
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
103 additions
and
115 deletions
+103
-115
performance/Performance.Api/Controllers/AccountController.cs
+0
-3
performance/Performance.Api/Controllers/AssessController.cs
+17
-25
performance/Performance.Api/Controllers/ComputeController.cs
+2
-0
performance/Performance.Api/Controllers/NotFoundController.cs
+2
-5
performance/Performance.Api/Startup.cs
+0
-11
performance/Performance.DtoModels/PerExcel/PerSheetHeader.cs
+10
-12
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+1
-1
performance/Performance.Services/ComputeService.cs
+13
-0
performance/Performance.Services/ExtractExcelService/SheetDataWrite/SpecialUnitDataWrite.cs
+13
-10
performance/Performance.Services/PerExcelService/PerSheetService.cs
+1
-0
performance/Performance.Services/SecondAllotService.cs
+44
-48
No files found.
performance/Performance.Api/Controllers/AccountController.cs
View file @
8b007359
...
...
@@ -3,17 +3,14 @@
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.Extensions.Caching.Memory
;
using
Microsoft.Extensions.Options
;
using
Newtonsoft.Json.Linq
;
using
Performance.DtoModels
;
using
Performance.DtoModels.AppSettings
;
using
Performance.EntityModels
;
using
Performance.Infrastructure
;
using
Performance.Services
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Security.Claims
;
using
System.Threading.Tasks
;
namespace
Performance.Api.Controllers
{
...
...
performance/Performance.Api/Controllers/AssessController.cs
View file @
8b007359
using
FluentValidation.AspNetCore
;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.Extensions.Caching.Memory
;
using
Microsoft.Extensions.Options
;
using
Newtonsoft.Json.Linq
;
using
Performance.DtoModels
;
using
Performance.DtoModels.AppSettings
;
using
Performance.EntityModels
;
using
Performance.Infrastructure
;
using
Performance.Services
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
Performance.Api.Controllers
{
...
...
@@ -21,6 +11,7 @@ public class AssessController : Controller
private
ClaimService
claimService
;
private
AssessService
assessService
;
private
UserService
userService
;
public
AssessController
(
ClaimService
claimService
,
AssessService
assessService
,
UserService
userService
)
{
...
...
@@ -32,7 +23,7 @@ public class AssessController : Controller
//考核类别列表
[
HttpPost
]
[
Route
(
"assesslist"
)]
public
ApiResponse
AssessList
([
CustomizeValidator
(
RuleSet
=
"List"
),
FromBody
]
AssessRequest
request
)
public
ApiResponse
AssessList
([
CustomizeValidator
(
RuleSet
=
"List"
),
FromBody
]
AssessRequest
request
)
{
return
assessService
.
AssessList
(
request
.
AllotID
);
}
...
...
@@ -40,7 +31,7 @@ public ApiResponse AssessList([CustomizeValidator(RuleSet = "List"), FromBody]As
//新增考核类别
[
HttpPost
]
[
Route
(
"addassess"
)]
public
ApiResponse
AddAssess
([
CustomizeValidator
(
RuleSet
=
"Add"
),
FromBody
]
AssessRequest
request
)
public
ApiResponse
AddAssess
([
CustomizeValidator
(
RuleSet
=
"Add"
),
FromBody
]
AssessRequest
request
)
{
return
assessService
.
AddAssess
(
request
.
AllotID
,
request
.
AssessName
);
}
...
...
@@ -48,7 +39,7 @@ public ApiResponse AddAssess([CustomizeValidator(RuleSet = "Add"), FromBody]Asse
//修改考核类别
[
HttpPost
]
[
Route
(
"editassess"
)]
public
ApiResponse
EditAssess
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
AssessRequest
request
)
public
ApiResponse
EditAssess
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
AssessRequest
request
)
{
return
assessService
.
EditAssess
(
request
.
AssessID
,
request
.
AssessName
);
}
...
...
@@ -56,7 +47,7 @@ public ApiResponse EditAssess([CustomizeValidator(RuleSet = "Update"), FromBody]
//删除考核类别
[
HttpPost
]
[
Route
(
"delassess"
)]
public
ApiResponse
DelAssess
([
CustomizeValidator
(
RuleSet
=
"Del"
),
FromBody
]
AssessRequest
request
)
public
ApiResponse
DelAssess
([
CustomizeValidator
(
RuleSet
=
"Del"
),
FromBody
]
AssessRequest
request
)
{
return
assessService
.
DelAssess
(
request
.
AssessID
);
}
...
...
@@ -64,7 +55,7 @@ public ApiResponse DelAssess([CustomizeValidator(RuleSet = "Del"), FromBody]Asse
//获取所有科室列表
[
HttpPost
]
[
Route
(
"departmentlist"
)]
public
ApiResponse
DepartmentList
([
CustomizeValidator
(
RuleSet
=
"Use"
),
FromBody
]
AssessRequest
request
)
public
ApiResponse
DepartmentList
([
CustomizeValidator
(
RuleSet
=
"Use"
),
FromBody
]
AssessRequest
request
)
{
var
department
=
assessService
.
Department
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
department
);
...
...
@@ -73,7 +64,7 @@ public ApiResponse DepartmentList([CustomizeValidator(RuleSet = "Use"), FromBody
//设置科室考核分类
[
HttpPost
]
[
Route
(
"setassesstype"
)]
public
ApiResponse
SetAssessType
([
FromBody
]
SetAssessRequest
request
)
public
ApiResponse
SetAssessType
([
FromBody
]
SetAssessRequest
request
)
{
return
assessService
.
SetAssessType
(
request
);
}
...
...
@@ -81,7 +72,7 @@ public ApiResponse SetAssessType([FromBody]SetAssessRequest request)
//考核列头列表
[
HttpPost
]
[
Route
(
"columnlist"
)]
public
ApiResponse
ColumnList
([
CustomizeValidator
(
RuleSet
=
"List"
),
FromBody
]
AssessColumnRequest
request
)
public
ApiResponse
ColumnList
([
CustomizeValidator
(
RuleSet
=
"List"
),
FromBody
]
AssessColumnRequest
request
)
{
return
assessService
.
ColumnList
(
request
.
AssessID
);
}
...
...
@@ -89,7 +80,7 @@ public ApiResponse ColumnList([CustomizeValidator(RuleSet = "List"), FromBody]As
//新增考核项
[
HttpPost
]
[
Route
(
"addcolumn"
)]
public
ApiResponse
AddColumn
([
CustomizeValidator
(
RuleSet
=
"Add"
),
FromBody
]
AssessColumnRequest
request
)
public
ApiResponse
AddColumn
([
CustomizeValidator
(
RuleSet
=
"Add"
),
FromBody
]
AssessColumnRequest
request
)
{
return
assessService
.
AddColumn
(
request
.
AssessID
,
request
.
ParentID
,
request
.
ColumnName
,
request
.
Sort
);
}
...
...
@@ -97,7 +88,7 @@ public ApiResponse AddColumn([CustomizeValidator(RuleSet = "Add"), FromBody]Asse
//修改考核项
[
HttpPost
]
[
Route
(
"editcolumn"
)]
public
ApiResponse
EditColumn
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
AssessColumnRequest
request
)
public
ApiResponse
EditColumn
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
AssessColumnRequest
request
)
{
return
assessService
.
EditColumn
(
request
.
ColumnID
,
request
.
ColumnName
,
request
.
Sort
);
}
...
...
@@ -105,7 +96,7 @@ public ApiResponse EditColumn([CustomizeValidator(RuleSet = "Update"), FromBody]
//删除考核项
[
HttpPost
]
[
Route
(
"delcolumn"
)]
public
ApiResponse
DelColumn
([
CustomizeValidator
(
RuleSet
=
"Del"
),
FromBody
]
AssessColumnRequest
request
)
public
ApiResponse
DelColumn
([
CustomizeValidator
(
RuleSet
=
"Del"
),
FromBody
]
AssessColumnRequest
request
)
{
return
assessService
.
DelColumn
(
request
.
ColumnID
);
}
...
...
@@ -113,7 +104,7 @@ public ApiResponse DelColumn([CustomizeValidator(RuleSet = "Del"), FromBody]Asse
//考核数据列表
[
HttpPost
]
[
Route
(
"datalist"
)]
public
ApiResponse
DataList
([
CustomizeValidator
(
RuleSet
=
"List"
),
FromBody
]
AssessDataRequest
request
)
public
ApiResponse
DataList
([
CustomizeValidator
(
RuleSet
=
"List"
),
FromBody
]
AssessDataRequest
request
)
{
return
assessService
.
DataList
(
request
.
AssessID
);
}
...
...
@@ -121,7 +112,7 @@ public ApiResponse DataList([CustomizeValidator(RuleSet = "List"), FromBody]Asse
//考核数据修改
[
HttpPost
]
[
Route
(
"editassessdata"
)]
public
ApiResponse
EditAssessData
([
CustomizeValidator
(
RuleSet
=
"Edit"
),
FromBody
]
AssessDataRequest
request
)
public
ApiResponse
EditAssessData
([
CustomizeValidator
(
RuleSet
=
"Edit"
),
FromBody
]
AssessDataRequest
request
)
{
return
assessService
.
EditAssessData
(
request
.
AssessRow
);
}
...
...
@@ -137,7 +128,7 @@ public ApiResponse TempAssessList()
//模板列头列表
[
HttpPost
]
[
Route
(
"tempcolumnlist"
)]
public
ApiResponse
TempColumnList
([
CustomizeValidator
(
RuleSet
=
"List"
),
FromBody
]
AssessColumnRequest
request
)
public
ApiResponse
TempColumnList
([
CustomizeValidator
(
RuleSet
=
"List"
),
FromBody
]
AssessColumnRequest
request
)
{
return
assessService
.
TempColumnList
(
request
.
AssessID
);
}
...
...
@@ -145,9 +136,9 @@ public ApiResponse TempColumnList([CustomizeValidator(RuleSet = "List"), FromBod
//使用考核模版
[
HttpPost
]
[
Route
(
"usetemplate"
)]
public
ApiResponse
UseTemplate
([
CustomizeValidator
(
RuleSet
=
"Use"
),
FromBody
]
AssessRequest
request
)
public
ApiResponse
UseTemplate
([
CustomizeValidator
(
RuleSet
=
"Use"
),
FromBody
]
AssessRequest
request
)
{
return
assessService
.
UseTemplate
(
request
.
AllotID
,
request
.
AssessID
);
}
}
}
}
\ No newline at end of file
performance/Performance.Api/Controllers/ComputeController.cs
View file @
8b007359
...
...
@@ -296,6 +296,8 @@ public ApiResponse AllComputeByPM([FromBody] ComputerRequest request)
JobNumber
=
t
.
Key
.
JobNumber
,
PerforSumFee
=
t
.
Sum
(
s
=>
s
.
PerforSumFee
),
PerforManagementFee
=
t
.
Sum
(
s
=>
s
.
PerforManagementFee
),
Adjust
=
t
.
FirstOrDefault
()?.
Adjust
??
0
,
AdjustLaterOtherFee
=
t
.
Sum
(
s
=>
s
.
AdjustLaterOtherFee
),
ShouldGiveFee
=
t
.
Sum
(
s
=>
s
.
ShouldGiveFee
),
OthePerfor
=
t
.
Sum
(
s
=>
s
.
OthePerfor
),
NightWorkPerfor
=
t
.
Sum
(
s
=>
s
.
NightWorkPerfor
),
...
...
performance/Performance.Api/Controllers/NotFoundController.cs
View file @
8b007359
using
Microsoft.AspNetCore.Authorization
;
using
Microsoft.AspNetCore.Mvc
;
using
Performance.DtoModels
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
Performance.Api.Controllers
{
...
...
@@ -19,4 +15,4 @@ public ActionResult<ApiResponse> Get()
return
new
ApiResponse
(
ResponseType
.
NotFound
,
"not found"
);
}
}
}
}
\ No newline at end of file
performance/Performance.Api/Startup.cs
View file @
8b007359
using
AutoMapper
;
using
FluentValidation
;
using
FluentValidation.AspNetCore
;
using
Hangfire
;
using
Hangfire.MySql.Core
;
using
Microsoft.AspNetCore.Builder
;
using
Microsoft.AspNetCore.Hosting
;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.AspNetCore.Mvc.Filters
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.Extensions.Configuration
;
using
Microsoft.Extensions.DependencyInjection
;
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Options
;
using
NLog
;
using
NLog.Extensions.Logging
;
using
NLog.Web
;
using
Performance.DtoModels
;
using
Performance.DtoModels.AppSettings
;
using
Performance.DtoModels.AutoMapper
;
using
Performance.EntityModels
;
using
Performance.Infrastructure
;
using
Performance.Repository
;
using
Performance.Services
;
using
Performance.Services.Queues
;
using
Swashbuckle.AspNetCore.Swagger
;
...
...
@@ -28,12 +21,8 @@
using
System.Collections.Generic
;
using
System.Globalization
;
using
System.IO
;
using
System.Linq
;
using
System.Net.Http
;
using
System.Reflection
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
namespace
Performance.Api
{
...
...
performance/Performance.DtoModels/PerExcel/PerSheetHeader.cs
View file @
8b007359
...
...
@@ -19,17 +19,16 @@ public class PerSheetHeader
(
"绩效基数核算参考对象"
,
(
t
)
=>
t
.
FitPeople
,
1
,
1
,
false
,
false
,
false
,
"FitPeople"
),
(
"岗位系数"
,
(
t
)
=>
t
.
PostCoefficient
,
1
,
1
,
false
,
true
,
false
,
"PostCoefficient"
),
//("参加工作时间", (t) => t.WorkTime, 1, 1, false, false, false, "WorkTime"),
(
"考核得分率"
,
(
t
)
=>
Math
.
Round
(
t
.
ScoreAverageRate
.
Value
*
100
,
2
)
,
1
,
1
,
false
,
true
,
true
,
"ScoreAverageRate"
),
(
"出勤率"
,
(
t
)
=>
Math
.
Round
(
t
.
Attendance
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Attendance"
),
(
"考核得分率"
,
(
t
)
=>
Math
.
Round
(
(
t
.
ScoreAverageRate
??
1
)
*
100
,
2
)
,
1
,
1
,
false
,
true
,
true
,
"ScoreAverageRate"
),
(
"出勤率"
,
(
t
)
=>
Math
.
Round
(
(
t
.
Attendance
??
0
)
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Attendance"
),
//("核算单元医生数", (t) => t.PeopleNumber, 1, 1, false, true, false, "PeopleNumber"),
//("工作量绩效", (t) =>t.Workload, 1, 1, false, true, false, "Workload"),
//("其他绩效", (t) => t.OtherPerfor, 1, 1, false, true, false, "OtherPerfor"),
//("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"),
(
"调节系数"
,
(
t
)
=>
Math
.
Round
(
t
.
Adjust
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Adjust"
),
(
"调节系数"
,
(
t
)
=>
Math
.
Round
(
(
t
.
Adjust
??
1
)
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Adjust"
),
//("发放系数", (t) => t.Grant, 1, 1, false, true, false, "Grant"),
};
// Tuple Items: 列明, 字段名, mergeRow, mergeCell, isTotal, isNumValue, 是否含有%
public
static
List
<(
string
,
Func
<
im_employee_clinic
,
object
>,
int
,
int
,
bool
,
bool
,
bool
,
string
)>
employeeClinicHeaders
=
new
List
<(
string
,
Func
<
im_employee_clinic
,
object
>,
int
,
int
,
bool
,
bool
,
bool
,
string
)>
...
...
@@ -40,13 +39,13 @@ public class PerSheetHeader
(
"医生姓名"
,
(
t
)
=>
t
.
DoctorName
,
1
,
1
,
false
,
false
,
false
,
"DoctorName"
),
(
"职务分类"
,
(
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
.
Basics
??
1
)
*
100
,
2
),
1
,
1
,
false
,
true
,
false
,
"Basics"
),
(
"效率绩效人数"
,
(
t
)
=>
t
.
PermanentStaff
,
1
,
1
,
false
,
true
,
false
,
"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"
),
(
"考核得分率"
,
(
t
)
=>
Math
.
Round
(
t
.
ScoreAverageRate
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"ScoreAverageRate"
),
(
"出勤率"
,
(
t
)
=>
Math
.
Round
(
t
.
Attendance
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Attendance"
),
(
"效率绩效系数"
,
(
t
)
=>
Math
.
Round
(
(
t
.
Efficiency
??
0
)
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Efficiency"
),
(
"规模绩效系数"
,
(
t
)
=>
Math
.
Round
(
(
t
.
Scale
??
0
)
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Scale"
),
(
"管理绩效发放系数"
,
(
t
)
=>
Math
.
Round
(
(
t
.
Management
??
1
)
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Management"
),
(
"考核得分率"
,
(
t
)
=>
Math
.
Round
(
(
t
.
ScoreAverageRate
??
1
)
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"ScoreAverageRate"
),
(
"出勤率"
,
(
t
)
=>
Math
.
Round
(
(
t
.
Attendance
??
0
)
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Attendance"
),
(
"其他绩效"
,
(
t
)
=>
t
.
OtherPerfor
,
1
,
1
,
false
,
true
,
false
,
"OtherPerfor"
),
//("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"),
(
"调节系数"
,
(
t
)
=>
Math
.
Round
(
t
.
Adjust
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Adjust"
),
...
...
@@ -65,7 +64,7 @@ public class PerSheetHeader
(
"岗位系数"
,
(
t
)
=>
t
.
PostCoefficient
,
1
,
1
,
false
,
true
,
false
,
"PostCoefficient"
),
//("参加工作时间", (t) => t.WorkTime, 1, 1, false, false, false, "WorkTime"),
//("考核得分率", (t) => Math.Round(t.ScoreAverageRate.Value * 100, 2) , 1, 1, false, true, true, "ScoreAverageRate"),
(
"出勤率"
,
(
t
)
=>
Math
.
Round
(
t
.
Attendance
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Attendance"
),
(
"出勤率"
,
(
t
)
=>
Math
.
Round
(
(
t
.
Attendance
??
0
)
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Attendance"
),
//("核算单元医生数", (t) => t.PeopleNumber, 1, 1, false, true, false, "PeopleNumber"),
//("工作量绩效", (t) =>t.Workload, 1, 1, false, true, false, "Workload"),
(
"其他绩效"
,
(
t
)
=>
t
.
OtherPerfor
,
1
,
1
,
false
,
true
,
false
,
"OtherPerfor"
),
...
...
@@ -74,7 +73,6 @@ public class PerSheetHeader
//("发放系数", (t) => t.Grant, 1, 1, false, true, false, "Grant"),
};
// Tuple Items: 列明, 字段名, mergeRow, mergeCell, isTotal, isNumValue, 是否含有%
public
static
List
<(
string
,
Func
<
im_specialunit
,
object
>,
int
,
int
,
bool
,
bool
,
bool
,
string
)>
specialUnitHeaders
=
new
List
<(
string
,
Func
<
im_specialunit
,
object
>,
int
,
int
,
bool
,
bool
,
bool
,
string
)>
...
...
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
8b007359
...
...
@@ -200,7 +200,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
//Punishment = (extra ?? 0),
//MedicineExtra = (drugExtra ?? 0),
//MaterialsExtra = (materialsExtra ?? 0),
Punishment
=
0
,
Punishment
=
dept
?.
Extra
??
0
,
MedicineExtra
=
dept
?.
MedicineExtra
??
0
,
MaterialsExtra
=
dept
?.
MaterialsExtra
??
0
,
...
...
performance/Performance.Services/ComputeService.cs
View file @
8b007359
...
...
@@ -500,6 +500,8 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int hospitalId, i
var
types1
=
new
List
<
string
>
{
AccountUnitType
.
护士长
.
ToString
(),
AccountUnitType
.
科主任
.
ToString
()
};
var
types2
=
new
List
<
string
>
{
AccountUnitType
.
行政中层
.
ToString
(),
AccountUnitType
.
行政高层
.
ToString
()
};
var
types3
=
(
hospital
?.
IsOpenLogisticsSecondAllot
!=
1
)
?
new
List
<
string
>
{
AccountUnitType
.
行政工勤
.
ToString
()
}
:
new
List
<
string
>();
//// 业务中层人员信息
//var empolyeeList = _perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allotId);
// 一次绩效 获取特定人员绩效结果
...
...
@@ -515,7 +517,11 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int hospitalId, i
// 行政中层 行政高层 补充 夜班费
if
(
types2
.
Contains
(
t
.
AccountType
))
{
comp
.
PerforSumFee
=
t
.
GiveFee
;
comp
.
PerforManagementFee
=
0
;
comp
.
NightWorkPerfor
=
t
.
NightWorkPerfor
;
}
// 科主任/护士长
if
(
types1
.
Contains
(
t
.
AccountType
))
...
...
@@ -528,6 +534,13 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int hospitalId, i
else
comp
.
PerforSumFee
=
t
.
Avg
;
}
// 行政工勤
if
(
types3
.
Contains
(
t
.
AccountType
))
{
comp
.
PerforSumFee
=
t
.
GiveFee
;
comp
.
AdjustLaterOtherFee
=
0
;
comp
.
PerforManagementFee
=
0
;
}
return
comp
;
}).
ToList
();
...
...
performance/Performance.Services/ExtractExcelService/SheetDataWrite/SpecialUnitDataWrite.cs
View file @
8b007359
...
...
@@ -14,7 +14,6 @@ public class SpecialUnitDataWrite : ISheetDataWrite
{
public
void
WriteCollectData
(
ISheet
sheet
,
PerSheetPoint
point
,
SheetType
sheetType
,
ExcelStyle
style
,
List
<
collect_data
>
collects
)
{
}
public
void
WriteSheetData
(
ISheet
sheet
,
PerSheetPoint
point
,
SheetType
sheetType
,
ExcelStyle
style
,
object
data
,
Dictionary
<
ExDataDict
,
object
>
exdict
=
null
)
...
...
@@ -53,7 +52,6 @@ public void WriteSheetData(ISheet sheet, PerSheetPoint point, SheetType sheetTyp
}
catch
(
Exception
)
{
}
}
...
...
@@ -119,14 +117,9 @@ private void SupplyMergedRegionData(ISheet sheet, ExcelStyle style, List<Special
var
basicStyle
=
style
.
GetCellStyle
();
foreach
(
var
merged
in
mergedRegions
.
Where
(
t
=>
t
.
FirstRow
>
1
))
{
string
value
=
""
;
CellType
cellType
=
CellType
.
Unknown
;
var
valueCell
=
sheet
.
GetRow
(
merged
.
FirstRow
)?.
GetCell
(
merged
.
FirstColumn
);
if
(
valueCell
!=
null
)
{
cellType
=
valueCell
.
CellType
;
valueCell
.
SetCellType
(
CellType
.
String
);
value
=
valueCell
.
StringCellValue
;
}
string
value
=
valueCell
!=
null
?
valueCell
.
ToString
()
:
""
;
merged
.
Single
=
value
;
if
(
string
.
IsNullOrEmpty
(
value
))
continue
;
...
...
@@ -187,6 +180,7 @@ private void SupplySpecialQuantity(ISheet sheet, ExcelStyle style, List<SpecialD
if
(
special
!=
null
)
{
var
cell
=
row
.
GetOrCreate
(
quantityIndex
);
cell
.
SetCellType
(
CellType
.
Numeric
);
cell
.
SetCellValue
<
double
>(
special
.
Quantity
);
cell
.
CellStyle
=
cellStyle
;
...
...
@@ -291,7 +285,10 @@ private void WriteSpecialData(IRow row, ICellStyle style, SpecialDto special, Li
if
(
new
string
[]
{
SpecialUnitColumns
.
Department
,
SpecialUnitColumns
.
Target
}.
Contains
(
item
.
Key
))
cell
.
SetCellValue
(
item
.
Value
.
Invoke
(
special
)?.
ToString
());
else
{
cell
.
SetCellType
(
CellType
.
Numeric
);
cell
.
SetCellValue
<
double
>(
item
.
Value
.
Invoke
(
special
));
}
cell
.
CellStyle
=
style
;
}
}
...
...
@@ -326,14 +323,20 @@ private void AddMergedRegion(ISheet sheet, List<SpecialCellRange> ranges, List<s
public
void
SetCellValue
(
ICell
cell
,
string
value
)
{
switch
(
value
)
if
(
string
.
IsNullOrEmpty
(
value
))
return
;
switch
(
value
.
Trim
())
{
case
string
reg
when
Regex
.
IsMatch
(
reg
,
@"^[+-]?\d*[.]?\d*$"
):
cell
.
SetCellType
(
CellType
.
Numeric
);
cell
.
SetCellValue
(
ConvertHelper
.
To
<
double
>(
value
));
break
;
case
string
reg
when
Regex
.
IsMatch
(
reg
,
@"^[+-]?\d*$"
):
cell
.
SetCellType
(
CellType
.
Numeric
);
cell
.
SetCellValue
(
ConvertHelper
.
To
<
int
>(
value
));
break
;
default
:
cell
.
SetCellValue
(
value
);
break
;
...
...
performance/Performance.Services/PerExcelService/PerSheetService.cs
View file @
8b007359
...
...
@@ -78,6 +78,7 @@ public PerSheet Sheet(ISheet sheet, bool isnew)
/// <returns></returns>
public
SheetType
GetSheetType
(
string
sheetName
)
{
sheetName
=
sheetName
.
TrimStart
();
if
(
sheetName
.
StartsWith
(
"行政中高层"
))
return
SheetType
.
Employee
;
else
if
(
sheetName
.
StartsWith
(
"业务中层"
))
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
8b007359
...
...
@@ -401,12 +401,12 @@ private List<BodyItem> GetEmployees(List<per_employee> employees, int allotId, i
if
(!
string
.
IsNullOrEmpty
(
empName
))
employees
=
employees
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
empName
?.
Trim
()).
ToList
();
if
(!
string
.
IsNullOrEmpty
(
jobNumber
))
employees
=
employees
?.
Where
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
PersonnelNumber
)
&&
w
.
PersonnelNumber
==
jobNumber
.
Trim
()).
ToList
();
employees
=
employees
?.
Where
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
JobNumber
)
&&
w
.
JobNumber
.
Trim
()
==
jobNumber
.
Trim
()).
ToList
();
var
second
=
perforAgsecondallotRepository
.
GetEntity
(
t
=>
t
.
AllotId
==
allotId
);
var
perapramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
);
Func
<
per_employee
,
decimal
?>
getAprAmount
=
(
t
)
=>
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
?.
Trim
()
==
second
.
Department
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
t
.
Personnel
Number
?.
Trim
())
?.
Where
(
w
=>
w
.
AccountingUnit
?.
Trim
()
==
second
.
Department
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
t
.
Job
Number
?.
Trim
())
?.
Sum
(
w
=>
w
.
Amount
);
Dictionary
<(
string
,
string
),
Func
<
per_employee
,
object
>>
dict
=
new
Dictionary
<(
string
,
string
),
Func
<
per_employee
,
object
>>
...
...
@@ -1562,7 +1562,7 @@ public List<ag_othersource> OtherAutoComplete(SecondEmpRequest request, int user
if
(!
string
.
IsNullOrEmpty
(
request
.
EmployeeName
))
employees
=
employees
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
request
.
EmployeeName
?.
Trim
()).
ToList
();
if
(!
string
.
IsNullOrEmpty
(
request
.
JobNumber
))
employees
=
employees
?.
Where
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
PersonnelNumber
)
&&
w
.
PersonnelNumber
==
request
.
JobNumber
.
Trim
()).
ToList
();
employees
=
employees
?.
Where
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
JobNumber
)
&&
w
.
JobNumber
.
Trim
()
==
request
.
JobNumber
.
Trim
()).
ToList
();
List
<
ag_othersource
>
result
=
employees
.
Select
(
t
=>
new
ag_othersource
...
...
@@ -1757,16 +1757,16 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId, out
var
empDic
=
peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
allotId
);
foreach
(
var
item
in
result
)
{
var
perfor
=
((
item
.
GiveFee
??
0
)
!=
0
?
item
.
GiveFee
:
item
.
PerforSumFee
)
??
0
;
item
.
PerforSumFee
=
Math
.
Round
(
item
.
PerforSumFee
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
PerforManagementFee
=
Math
.
Round
(
item
.
PerforManagementFee
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
GiveFee
=
Math
.
Round
(
perfor
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
AdjustLaterOtherFee
=
Math
.
Round
(
item
.
AdjustLaterOtherFee
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
var
real
=
Math
.
Round
((
item
.
PerforSumFee
??
0
)
+
(
item
.
PerforManagementFee
??
0
),
0
)
*
item
.
Adjust
+
(
item
.
AdjustLaterOtherFee
??
0
);
item
.
OthePerfor
=
Math
.
Round
(
item
.
OthePerfor
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
NightWorkPerfor
=
Math
.
Round
(
item
.
NightWorkPerfor
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
ShouldGiveFee
=
Math
.
Round
((
perfor
+
item
.
AdjustLaterOtherFee
+
item
.
NightWorkPerfor
)
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
RealGiveFee
=
Math
.
Round
((
perfor
+
item
.
AdjustLaterOtherFee
+
item
.
NightWorkPerfor
)
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
ShouldGiveFee
=
Math
.
Round
((
real
??
0
)
+
(
item
.
OthePerfor
??
0
)
+
(
item
.
NightWorkPerfor
??
0
),
0
,
MidpointRounding
.
AwayFromZero
);
item
.
ReservedRatio
=
empDic
?.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
item
.
JobNumber
)?.
ReservedRatio
??
0
;
item
.
ReservedRatioFee
=
Math
.
Round
((
real
??
0
)
*
(
item
.
ReservedRatio
??
0
),
0
,
MidpointRounding
.
AwayFromZero
);
item
.
RealGiveFee
=
Math
.
Round
(
item
.
ShouldGiveFee
-
(
item
.
ReservedRatioFee
??
0
)
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
}
}
...
...
@@ -1788,43 +1788,40 @@ private List<SecondPerforResponse> GetAllotPerformance(int allotId, List<res_com
var
empolyeeList
=
imemployeeclinicRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
return
computes
.
Select
(
t
=>
{
var
comp
=
new
SecondPerforResponse
()
{
AccountingUnit
=
t
.
AccountingUnit
,
EmployeeName
=
t
.
EmployeeName
,
JobNumber
=
t
.
JobNumber
,
JobTitle
=
t
.
JobTitle
,
UnitType
=
t
.
AccountType
,
Scale
=
t
.
Scale
,
Efficiency
=
t
.
Efficiency
,
Grant
=
t
.
Grant
,
Punishment
=
t
.
Punishment
,
ShouldGiveFee
=
t
.
ShouldGiveFee
,
PerforSumFee
=
t
.
PerforSumFee
,
GiveFee
=
t
.
GiveFee
*
t
.
Adjust
,
AdjustLaterOtherFee
=
t
.
AdjustLaterOtherFee
??
0
,
OthePerfor
=
t
.
OtherPerfor
,
RealGiveFee
=
t
.
RealGiveFee
};
if
(
types1
.
Contains
(
t
.
AccountType
))
comp
.
PerforManagementFee
=
((
t
.
Efficiency
+
t
.
Scale
)
*
t
.
Grant
+
t
.
OtherManagePerfor
)
*
t
.
Attendance
*
t
.
ScoreAverageRate
;
else
comp
.
PerforManagementFee
=
t
.
RealGiveFee
;
// 行政中层 行政高层 补充 夜班费
if
(
types2
.
Contains
(
t
.
AccountType
))
comp
.
NightWorkPerfor
=
t
.
NightWorkPerfor
;
// 获取科主任系数,解决共用科主任重复计算人均问题
var
basics
=
empolyeeList
?.
FirstOrDefault
(
w
=>
w
.
AccountingUnit
==
t
.
AccountingUnit
&&
w
.
DoctorName
==
t
.
EmployeeName
&&
w
.
PersonnelNumber
==
t
.
JobNumber
)?.
Basics
;
// 仅显示管理绩效
if
(
isShowManage
==
2
)
comp
.
PerforSumFee
=
0
;
else
comp
.
PerforSumFee
=
Math
.
Round
((
t
.
Avg
*
(
basics
??
1
))
+
t
.
ShouldGiveFee
+
t
.
AssessBeforeOtherFee
??
0
);
return
comp
;
}).
ToList
();
{
var
comp
=
new
SecondPerforResponse
()
{
AccountingUnit
=
t
.
AccountingUnit
,
EmployeeName
=
t
.
EmployeeName
,
JobNumber
=
t
.
JobNumber
,
JobTitle
=
t
.
JobTitle
,
UnitType
=
t
.
AccountType
,
Adjust
=
t
.
Adjust
,
AdjustLaterOtherFee
=
t
.
AdjustLaterOtherFee
,
Scale
=
t
.
Scale
,
Efficiency
=
t
.
Efficiency
,
Grant
=
t
.
Grant
,
ShouldGiveFee
=
t
.
ShouldGiveFee
,
};
// 行政中层 行政高层 补充 夜班费
if
(
types2
.
Contains
(
t
.
AccountType
))
comp
.
NightWorkPerfor
=
t
.
NightWorkPerfor
;
// 科主任/护士长
if
(
types1
.
Contains
(
t
.
AccountType
))
{
// 等同于考核后管理绩效 AssessLaterManagementFee
comp
.
PerforManagementFee
=
Math
.
Round
(
t
.
ShouldGiveFee
*
t
.
ScoreAverageRate
*
t
.
Attendance
+
t
.
Punishment
??
0
);
// 仅显示管理绩效
if
(
isShowManage
==
2
)
comp
.
PerforSumFee
=
0
;
else
comp
.
PerforSumFee
=
t
.
Avg
;
}
return
comp
;
}).
ToList
();
}
public
List
<
SecondPerforResponse
>
AddAprAmount
(
int
allotId
,
List
<
SecondPerforResponse
>
computes
)
...
...
@@ -1849,4 +1846,4 @@ public List<SecondPerforResponse> AddAprAmount(int allotId, List<SecondPerforRes
return
computes
;
}
}
}
\ No newline at end of file
}
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