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
2f7c8184
Commit
2f7c8184
authored
Apr 07, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效获取详情、保存数据修改
parent
7252bb9c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
654 additions
and
8 deletions
+654
-8
performance/Performance.Api/Controllers/SecondAllotController.cs
+56
-1
performance/Performance.Api/wwwroot/Performance.Api.xml
+38
-1
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+10
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+0
-0
performance/Performance.DtoModels/Response/SecondAllotResponse.cs
+35
-0
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
+8
-0
performance/Performance.EntityModels/Entity/ag_bodysource.cs
+139
-0
performance/Performance.EntityModels/Entity/ag_headsource.cs
+104
-0
performance/Performance.EntityModels/Entity/ag_workload_source.cs
+39
-0
performance/Performance.EntityModels/Entity/ag_worktype_source.cs
+49
-0
performance/Performance.Repository/BaseRepository.cs
+7
-0
performance/Performance.Repository/Repository/PerforAgbodysourceRepository.cs
+20
-0
performance/Performance.Repository/Repository/PerforAgheadsourceRepository.cs
+20
-0
performance/Performance.Repository/Repository/PerforAgworkloadsourceRepository.cs
+20
-0
performance/Performance.Repository/Repository/PerforAgworktypesourceRepository.cs
+20
-0
performance/Performance.Services/SecondAllot/SecondAllotDetails.cs
+0
-0
performance/Performance.Services/SecondAllot/SecondAllotService.cs
+0
-0
performance/Performance.Services/SecondAllotService.cs
+89
-6
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
2f7c8184
using
FluentValidation.AspNetCore
;
using
FluentValidation.AspNetCore
;
using
Microsoft.AspNetCore.Authorization
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.AspNetCore.Mvc
;
using
Performance.DtoModels
;
using
Performance.DtoModels
;
...
@@ -22,18 +23,21 @@ public class SecondAllotController : ControllerBase
...
@@ -22,18 +23,21 @@ public class SecondAllotController : ControllerBase
private
readonly
SecondAllotService
secondAllotService
;
private
readonly
SecondAllotService
secondAllotService
;
private
readonly
ResultComputeService
resultComputeService
;
private
readonly
ResultComputeService
resultComputeService
;
private
readonly
SecondAllotDetails
secondAllotDetails
;
private
readonly
SecondAllotDetails
secondAllotDetails
;
private
readonly
Services
.
SecondAllot
.
SecondAllotService
secondAllot
;
public
SecondAllotController
(
public
SecondAllotController
(
ClaimService
claimService
,
ClaimService
claimService
,
SecondAllotService
secondAllotService
,
SecondAllotService
secondAllotService
,
ResultComputeService
resultComputeService
,
ResultComputeService
resultComputeService
,
SecondAllotDetails
secondAllotDetails
SecondAllotDetails
secondAllotDetails
,
Services
.
SecondAllot
.
SecondAllotService
secondAllot
)
)
{
{
this
.
claimService
=
claimService
;
this
.
claimService
=
claimService
;
this
.
secondAllotService
=
secondAllotService
;
this
.
secondAllotService
=
secondAllotService
;
this
.
resultComputeService
=
resultComputeService
;
this
.
resultComputeService
=
resultComputeService
;
this
.
secondAllotDetails
=
secondAllotDetails
;
this
.
secondAllotDetails
=
secondAllotDetails
;
this
.
secondAllot
=
secondAllot
;
}
}
#
region
二次绩效列表、录入数据展示,保存数据
#
region
二次绩效列表、录入数据展示,保存数据
...
@@ -464,5 +468,56 @@ public ApiResponse DeptComputeDetail(int allotId)
...
@@ -464,5 +468,56 @@ public ApiResponse DeptComputeDetail(int allotId)
var
data
=
secondAllotService
.
DeptComputeDetailList
(
userId
,
allotId
,
out
int
isShowManage
);
var
data
=
secondAllotService
.
DeptComputeDetailList
(
userId
,
allotId
,
out
int
isShowManage
);
return
new
ApiResponse
(
ResponseType
.
OK
,
new
{
isShowManage
,
data
});
return
new
ApiResponse
(
ResponseType
.
OK
,
new
{
isShowManage
,
data
});
}
}
/// <summary>
/// 获取二次绩效详情数据
/// </summary>
/// <param name="secondId"></param>
/// <param name="employeeSource"></param>
/// <returns></returns>
[
HttpPost
(
"api/second/detail/{secondId}/{employeeSource}"
)]
public
ApiResponse
GetSecondAllotDetail
([
FromRoute
]
int
secondId
,
int
employeeSource
)
{
var
detail
=
secondAllot
.
GetSecondSavedData
(
claimService
.
GetUserId
(),
secondId
,
employeeSource
);
return
new
ApiResponse
(
ResponseType
.
OK
,
detail
);
}
/// <summary>
/// 获取工作量类型
/// </summary>
/// <param name="secondId"></param>
/// <returns></returns>
[
HttpPost
(
"api/second/worktype/{secondId}"
)]
public
ApiResponse
GetWorktypeDict
([
FromRoute
]
int
secondId
)
{
var
detail
=
secondAllot
.
GetWorkTypeDict
(
secondId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
detail
);
}
/// <summary>
/// 获取工作量明细项
/// </summary>
/// <param name="secondId"></param>
/// <returns></returns>
[
HttpPost
(
"api/second/workload/{secondId}"
)]
public
ApiResponse
GetWorkloadDict
([
FromRoute
]
int
secondId
)
{
var
detail
=
secondAllot
.
GetWorkloadDict
(
secondId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
detail
);
}
/// <summary>
/// 二次绩效项目内容保存
/// </summary>
/// <param name="secondId"></param>
/// <param name="request"></param>
/// <returns></returns>
[
HttpPost
(
"api/second/savedata/{secondId}"
)]
[
AllowAnonymous
]
public
ApiResponse
SaveValue
([
FromRoute
]
int
secondId
,
[
FromBody
]
dynamic
request
)
{
secondAllot
.
SaveSecondAllotData
(
secondId
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
}
}
}
}
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
2f7c8184
...
@@ -208,7 +208,7 @@
...
@@ -208,7 +208,7 @@
<summary>
<summary>
上传文件
上传文件
</summary>
</summary>
<param
name=
"
form
"
></param>
<param
name=
"
allotId
"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.AllotController.Generate(Performance.DtoModels.AllotRequest)"
>
<member
name=
"M:Performance.Api.Controllers.AllotController.Generate(Performance.DtoModels.AllotRequest)"
>
...
@@ -218,6 +218,13 @@
...
@@ -218,6 +218,13 @@
<param
name=
"request"
></param>
<param
name=
"request"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.AllotController.GenerateReport(Performance.DtoModels.AllotRequest)"
>
<summary>
绩效生成报表
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.AllotController.Recalculation(Performance.DtoModels.RecalculationRequest)"
>
<member
name=
"M:Performance.Api.Controllers.AllotController.Recalculation(Performance.DtoModels.RecalculationRequest)"
>
<summary>
<summary>
重新计算院领导绩效
重新计算院领导绩效
...
@@ -1411,6 +1418,36 @@
...
@@ -1411,6 +1418,36 @@
</summary>
</summary>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.GetSecondAllotDetail(System.Int32,System.Int32)"
>
<summary>
获取二次绩效详情数据
</summary>
<param
name=
"secondId"
></param>
<param
name=
"employeeSource"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.GetWorktypeDict(System.Int32)"
>
<summary>
获取工作量类型
</summary>
<param
name=
"secondId"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.GetWorkloadDict(System.Int32)"
>
<summary>
获取工作量明细项
</summary>
<param
name=
"secondId"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.SaveValue(System.Int32,System.Object)"
>
<summary>
二次绩效项目内容保存
</summary>
<param
name=
"secondId"
></param>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SheetController.SheetList(Performance.DtoModels.SheetRequest)"
>
<member
name=
"M:Performance.Api.Controllers.SheetController.SheetList(Performance.DtoModels.SheetRequest)"
>
<summary>
<summary>
sheet 列表
sheet 列表
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
2f7c8184
...
@@ -3429,6 +3429,16 @@
...
@@ -3429,6 +3429,16 @@
首页地址
首页地址
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.Detail.IsArchive"
>
<summary>
是否归档
</summary>
</member>
<member
name=
"P:Performance.DtoModels.Detail.States"
>
<summary>
0 数据未上传 1 数据已上传 2 正在校验数据 3 数据验证通过
4 数据错误 5 正在生成绩效 6 下发绩效 7 绩效解析失败
8 归档 9 等待生成 10 绩效结果解析成功
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondListResponse.IsArchive"
>
<member
name=
"P:Performance.DtoModels.SecondListResponse.IsArchive"
>
<summary>
是否归档
</summary>
<summary>
是否归档
</summary>
</member>
</member>
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
2f7c8184
This diff is collapsed.
Click to expand it.
performance/Performance.DtoModels/Response/SecondAllotResponse.cs
0 → 100644
View file @
2f7c8184
using
Newtonsoft.Json.Linq
;
namespace
Performance.DtoModels
{
public
class
SecondAllotResponse
{
public
Detail
Detail
{
get
;
set
;
}
public
JObject
Head
{
get
;
set
;
}
public
JArray
Body
{
get
;
set
;
}
}
public
class
Detail
{
public
int
TempId
{
get
;
set
;
}
/// <summary> 是否归档 </summary>
public
int
IsArchive
{
get
;
set
;
}
/// <summary>
/// 0 数据未上传 1 数据已上传 2 正在校验数据 3 数据验证通过
/// 4 数据错误 5 正在生成绩效 6 下发绩效 7 绩效解析失败
/// 8 归档 9 等待生成 10 绩效结果解析成功
/// </summary>
public
int
States
{
get
;
set
;
}
public
int
Status
{
get
;
set
;
}
public
string
Department
{
get
;
set
;
}
public
string
UnitType
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
View file @
2f7c8184
...
@@ -15,6 +15,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
...
@@ -15,6 +15,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
/// <summary> 二次分配概览 </summary>
/// <summary> 二次分配概览 </summary>
public
virtual
DbSet
<
ag_againsituation
>
ag_againsituation
{
get
;
set
;
}
public
virtual
DbSet
<
ag_againsituation
>
ag_againsituation
{
get
;
set
;
}
/// <summary> 二次绩效保存数据 </summary>
public
virtual
DbSet
<
ag_bodysource
>
ag_bodysource
{
get
;
set
;
}
/// <summary> 二次绩效结果表 </summary>
/// <summary> 二次绩效结果表 </summary>
public
virtual
DbSet
<
ag_compute
>
ag_compute
{
get
;
set
;
}
public
virtual
DbSet
<
ag_compute
>
ag_compute
{
get
;
set
;
}
/// <summary> 二次分配不固定数据 </summary>
/// <summary> 二次分配不固定数据 </summary>
...
@@ -25,6 +27,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
...
@@ -25,6 +27,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
public
virtual
DbSet
<
ag_fixatitem
>
ag_fixatitem
{
get
;
set
;
}
public
virtual
DbSet
<
ag_fixatitem
>
ag_fixatitem
{
get
;
set
;
}
/// <summary> 二次分配不固定列头数据 </summary>
/// <summary> 二次分配不固定列头数据 </summary>
public
virtual
DbSet
<
ag_header
>
ag_header
{
get
;
set
;
}
public
virtual
DbSet
<
ag_header
>
ag_header
{
get
;
set
;
}
/// <summary> 二次绩效顶部数据 </summary>
public
virtual
DbSet
<
ag_headsource
>
ag_headsource
{
get
;
set
;
}
/// <summary> 科室二次绩效录入内容 </summary>
/// <summary> 科室二次绩效录入内容 </summary>
public
virtual
DbSet
<
ag_itemvalue
>
ag_itemvalue
{
get
;
set
;
}
public
virtual
DbSet
<
ag_itemvalue
>
ag_itemvalue
{
get
;
set
;
}
/// <summary> 二次绩效其他绩效来源 </summary>
/// <summary> 二次绩效其他绩效来源 </summary>
...
@@ -40,7 +44,11 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
...
@@ -40,7 +44,11 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
/// <summary> 二次绩效工作量绩效 </summary>
/// <summary> 二次绩效工作量绩效 </summary>
public
virtual
DbSet
<
ag_workload
>
ag_workload
{
get
;
set
;
}
public
virtual
DbSet
<
ag_workload
>
ag_workload
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
ag_workload_source
>
ag_workload_source
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
ag_workload_type
>
ag_workload_type
{
get
;
set
;
}
public
virtual
DbSet
<
ag_workload_type
>
ag_workload_type
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
ag_worktype_source
>
ag_worktype_source
{
get
;
set
;
}
/// <summary> 考核类别 </summary>
/// <summary> 考核类别 </summary>
public
virtual
DbSet
<
as_assess
>
as_assess
{
get
;
set
;
}
public
virtual
DbSet
<
as_assess
>
as_assess
{
get
;
set
;
}
/// <summary> 考核列头 </summary>
/// <summary> 考核列头 </summary>
...
...
performance/Performance.EntityModels/Entity/ag_bodysource.cs
0 → 100644
View file @
2f7c8184
//-----------------------------------------------------------------------
// <copyright file=" ag_bodysource.cs">
// * FileName: 二次绩效保存数据.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
/// 二次绩效保存数据
/// </summary>
[
Table
(
"ag_bodysource"
)]
public
class
ag_bodysource
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
Id
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
SecondId
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
RowNumber
{
get
;
set
;
}
/// <summary>
/// 人员工号
/// </summary>
public
string
WorkNumber
{
get
;
set
;
}
/// <summary>
/// 姓名
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 科室
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 岗位
/// </summary>
public
string
Post
{
get
;
set
;
}
/// <summary>
/// 人员系数
/// </summary>
public
Nullable
<
decimal
>
StaffCoefficient
{
get
;
set
;
}
/// <summary>
/// 出勤
/// </summary>
public
Nullable
<
decimal
>
ActualAttendance
{
get
;
set
;
}
/// <summary>
/// 职称
/// </summary>
public
string
JobTitle
{
get
;
set
;
}
/// <summary>
/// 职称系数
/// </summary>
public
Nullable
<
decimal
>
TitleCoefficient
{
get
;
set
;
}
/// <summary>
/// 职称绩效
/// </summary>
public
Nullable
<
decimal
>
TitlePerformance
{
get
;
set
;
}
/// <summary>
/// 管理津贴
/// </summary>
public
Nullable
<
decimal
>
ManagementAllowance
{
get
;
set
;
}
/// <summary>
/// 单项奖励
/// </summary>
public
Nullable
<
decimal
>
IndividualReward
{
get
;
set
;
}
/// <summary>
/// 重点专科分配
/// </summary>
public
Nullable
<
decimal
>
AllocationOfKeySpecialty
{
get
;
set
;
}
/// <summary>
/// 科室单项奖励
/// </summary>
public
Nullable
<
decimal
>
DeptReward
{
get
;
set
;
}
/// <summary>
/// 主任基础绩效
/// </summary>
public
Nullable
<
decimal
>
BasisPerformance
{
get
;
set
;
}
/// <summary>
/// 可分配绩效
/// </summary>
public
Nullable
<
decimal
>
DistPerformance
{
get
;
set
;
}
/// <summary>
/// 医院其他绩效
/// </summary>
public
Nullable
<
decimal
>
OtherPerformance
{
get
;
set
;
}
/// <summary>
/// 夜班工作量绩效
/// </summary>
public
Nullable
<
decimal
>
NightWorkPerformance
{
get
;
set
;
}
/// <summary>
/// 实发绩效工资金额
/// </summary>
public
Nullable
<
decimal
>
RealAmount
{
get
;
set
;
}
/// <summary>
/// 签字
/// </summary>
public
string
Signature
{
get
;
set
;
}
/// <summary>
/// 预留比例
/// </summary>
public
Nullable
<
decimal
>
ReservedRatio
{
get
;
set
;
}
/// <summary>
/// 预留金额
/// </summary>
public
Nullable
<
decimal
>
ReservedAmount
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/ag_headsource.cs
0 → 100644
View file @
2f7c8184
//-----------------------------------------------------------------------
// <copyright file=" ag_headsource.cs">
// * FileName: 二次绩效顶部数据.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
/// 二次绩效顶部数据
/// </summary>
[
Table
(
"ag_headsource"
)]
public
class
ag_headsource
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
Id
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
SecondId
{
get
;
set
;
}
/// <summary>
/// 可分配绩效
/// </summary>
public
Nullable
<
decimal
>
TotalPerformance
{
get
;
set
;
}
/// <summary>
/// 医院其他绩效
/// </summary>
public
Nullable
<
decimal
>
HosOtherPerformance
{
get
;
set
;
}
/// <summary>
/// 夜班绩效总和
/// </summary>
public
Nullable
<
decimal
>
NightShiftWorkPerforTotal
{
get
;
set
;
}
/// <summary>
/// 科室总绩效
/// </summary>
public
Nullable
<
decimal
>
TotalDistPerformance
{
get
;
set
;
}
/// <summary>
/// 主任基础绩效
/// </summary>
public
Nullable
<
decimal
>
DirectorBasisPerformance
{
get
;
set
;
}
/// <summary>
/// 科室单项奖励
/// </summary>
public
Nullable
<
decimal
>
TheTotalAllocationOfPerformanceResults
{
get
;
set
;
}
/// <summary>
/// 业绩分配绩效总额
/// </summary>
public
Nullable
<
decimal
>
BasisPerformance
{
get
;
set
;
}
/// <summary>
/// 年资职称绩效占比
/// </summary>
public
Nullable
<
decimal
>
SeniorityTitlesAccountedPerformance
{
get
;
set
;
}
/// <summary>
/// 年资职称绩效
/// </summary>
public
Nullable
<
decimal
>
SeniorityTitlesPerformance
{
get
;
set
;
}
/// <summary>
/// 工作量绩效占比
/// </summary>
public
Nullable
<
decimal
>
PerformanceShareTheWorkload
{
get
;
set
;
}
/// <summary>
/// 工作量分配绩效金额
/// </summary>
public
Nullable
<
decimal
>
PerformanceWorkloadDistributionAmount
{
get
;
set
;
}
/// <summary>
/// 满勤天数
/// </summary>
public
Nullable
<
decimal
>
DaysFullAttendance
{
get
;
set
;
}
/// <summary>
/// 科室人均
/// </summary>
public
Nullable
<
decimal
>
DepartmentsPerCapita
{
get
;
set
;
}
/// <summary>
/// 发放月份
/// </summary>
public
string
PaymentOfTheMonth
{
get
;
set
;
}
/// <summary>
/// 科室核算人数
/// </summary>
public
Nullable
<
decimal
>
TheNumberOfAccountingDepartment
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/ag_workload_source.cs
0 → 100644
View file @
2f7c8184
//-----------------------------------------------------------------------
// <copyright file=" ag_workload_source.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
///
/// </summary>
[
Table
(
"ag_workload_source"
)]
public
class
ag_workload_source
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
Id
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
WorkloadId
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
BodyId
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
decimal
>
Value
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/ag_worktype_source.cs
0 → 100644
View file @
2f7c8184
//-----------------------------------------------------------------------
// <copyright file=" ag_worktype_source.cs">
// * FileName: ag_worktype_source.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
///
/// </summary>
[
Table
(
"ag_worktype_source"
)]
public
class
ag_worktype_source
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
Id
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
WorkTypeId
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
SecondId
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
FieldId
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
FieldName
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
decimal
>
Value
{
get
;
set
;
}
}
}
performance/Performance.Repository/BaseRepository.cs
View file @
2f7c8184
...
@@ -111,6 +111,13 @@ public bool UpdateRange(params TEntity[] entities)
...
@@ -111,6 +111,13 @@ public bool UpdateRange(params TEntity[] entities)
return
context
.
SaveChanges
()
>
0
;
return
context
.
SaveChanges
()
>
0
;
}
}
public
bool
UpdateByState
(
TEntity
entity
)
{
var
entry
=
context
.
Entry
(
entity
);
entry
.
State
=
EntityState
.
Modified
;
return
context
.
SaveChanges
()
>
0
;
}
public
bool
Update
(
TEntity
entity
,
Action
<
TEntity
>
action
)
public
bool
Update
(
TEntity
entity
,
Action
<
TEntity
>
action
)
{
{
action
?.
Invoke
(
entity
);
action
?.
Invoke
(
entity
);
...
...
performance/Performance.Repository/Repository/PerforAgbodysourceRepository.cs
0 → 100644
View file @
2f7c8184
//-----------------------------------------------------------------------
// <copyright file=" ag_bodysource.cs">
// * FileName: ag_bodysource.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
Performance.EntityModels
;
namespace
Performance.Repository
{
/// <summary>
/// ag_bodysource Repository
/// </summary>
public
partial
class
PerforAgbodysourceRepository
:
PerforRepository
<
ag_bodysource
>
{
public
PerforAgbodysourceRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Repository/Repository/PerforAgheadsourceRepository.cs
0 → 100644
View file @
2f7c8184
//-----------------------------------------------------------------------
// <copyright file=" ag_headsource.cs">
// * FileName: ag_headsource.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
Performance.EntityModels
;
namespace
Performance.Repository
{
/// <summary>
/// ag_headsource Repository
/// </summary>
public
partial
class
PerforAgheadsourceRepository
:
PerforRepository
<
ag_headsource
>
{
public
PerforAgheadsourceRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Repository/Repository/PerforAgworkloadsourceRepository.cs
0 → 100644
View file @
2f7c8184
//-----------------------------------------------------------------------
// <copyright file=" ag_workload_source.cs">
// * FileName: ag_workload_source.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
Performance.EntityModels
;
namespace
Performance.Repository
{
/// <summary>
/// ag_workload_source Repository
/// </summary>
public
partial
class
PerforAgworkloadsourceRepository
:
PerforRepository
<
ag_workload_source
>
{
public
PerforAgworkloadsourceRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Repository/Repository/PerforAgworktypesourceRepository.cs
0 → 100644
View file @
2f7c8184
//-----------------------------------------------------------------------
// <copyright file=" ag_worktype_source.cs">
// * FileName: ag_worktype_source.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
Performance.EntityModels
;
namespace
Performance.Repository
{
/// <summary>
/// ag_worktype_source Repository
/// </summary>
public
partial
class
PerforAgworktypesourceRepository
:
PerforRepository
<
ag_worktype_source
>
{
public
PerforAgworktypesourceRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Services/
Details
/SecondAllotDetails.cs
→
performance/Performance.Services/
SecondAllot
/SecondAllotDetails.cs
View file @
2f7c8184
File moved
performance/Performance.Services/SecondAllot/SecondAllotService.cs
0 → 100644
View file @
2f7c8184
This diff is collapsed.
Click to expand it.
performance/Performance.Services/SecondAllotService.cs
View file @
2f7c8184
...
@@ -43,6 +43,7 @@ public class SecondAllotService : IAutoInjection
...
@@ -43,6 +43,7 @@ public class SecondAllotService : IAutoInjection
private
readonly
PerforRescomputeRepository
rescomputeRepository
;
private
readonly
PerforRescomputeRepository
rescomputeRepository
;
private
readonly
PerforPeremployeeRepository
peremployeeRepository
;
private
readonly
PerforPeremployeeRepository
peremployeeRepository
;
private
readonly
PerforImemployeeclinicRepository
imemployeeclinicRepository
;
private
readonly
PerforImemployeeclinicRepository
imemployeeclinicRepository
;
private
readonly
PerforAgworktypesourceRepository
worktypesourceRepository
;
private
readonly
List
<
ag_tempitem
>
tempitems
=
new
List
<
ag_tempitem
>();
private
readonly
List
<
ag_tempitem
>
tempitems
=
new
List
<
ag_tempitem
>();
public
SecondAllotService
(
IOptions
<
Application
>
application
,
public
SecondAllotService
(
IOptions
<
Application
>
application
,
...
@@ -70,7 +71,9 @@ public class SecondAllotService : IAutoInjection
...
@@ -70,7 +71,9 @@ public class SecondAllotService : IAutoInjection
ComputeService
computeService
,
ComputeService
computeService
,
PerforRescomputeRepository
rescomputeRepository
,
PerforRescomputeRepository
rescomputeRepository
,
PerforPeremployeeRepository
peremployeeRepository
,
PerforPeremployeeRepository
peremployeeRepository
,
PerforImemployeeclinicRepository
imemployeeclinicRepository
)
PerforImemployeeclinicRepository
imemployeeclinicRepository
,
PerforAgworktypesourceRepository
worktypesourceRepository
)
{
{
this
.
application
=
application
.
Value
;
this
.
application
=
application
.
Value
;
_logger
=
logger
;
_logger
=
logger
;
...
@@ -99,6 +102,7 @@ public class SecondAllotService : IAutoInjection
...
@@ -99,6 +102,7 @@ public class SecondAllotService : IAutoInjection
this
.
peremployeeRepository
=
peremployeeRepository
;
this
.
peremployeeRepository
=
peremployeeRepository
;
this
.
imemployeeclinicRepository
=
imemployeeclinicRepository
;
this
.
imemployeeclinicRepository
=
imemployeeclinicRepository
;
this
.
tempitems
=
perforAgtempitemRepository
.
GetEntities
();
this
.
tempitems
=
perforAgtempitemRepository
.
GetEntities
();
this
.
worktypesourceRepository
=
worktypesourceRepository
;
}
}
#
region
二次绩效列表与数据保存
#
region
二次绩效列表与数据保存
...
@@ -1048,7 +1052,8 @@ public bool WorkloadAdd(WorkloadRequest request)
...
@@ -1048,7 +1052,8 @@ public bool WorkloadAdd(WorkloadRequest request)
var
result
=
perforAgworkloadRepository
.
Add
(
workload
);
var
result
=
perforAgworkloadRepository
.
Add
(
workload
);
if
(
result
)
if
(
result
)
{
{
workload
.
ItemId
=
$"Feild
{
workload
.
Id
}
"
;
string
field
=
request
.
WorkTypeId
==
(
int
)
AgWorkloadType
.
SingleAwards
?
AgWorkloadType
.
SingleAwards
.
ToString
()
:
AgWorkloadType
.
Workload
.
ToString
();
workload
.
ItemId
=
$"
{
field
}
_
{
workload
.
WorkTypeId
}
_
{
workload
.
Id
}
"
;
perforAgworkloadRepository
.
Update
(
workload
);
perforAgworkloadRepository
.
Update
(
workload
);
}
}
...
@@ -1073,7 +1078,8 @@ public bool WorkloadUpdate(WorkloadRequest request)
...
@@ -1073,7 +1078,8 @@ public bool WorkloadUpdate(WorkloadRequest request)
workload
.
FactorValue
=
request
.
FactorValue
;
workload
.
FactorValue
=
request
.
FactorValue
;
workload
.
ItemName
=
request
.
ItemName
;
workload
.
ItemName
=
request
.
ItemName
;
workload
.
Sort
=
request
.
Sort
;
workload
.
Sort
=
request
.
Sort
;
workload
.
ItemId
=
$"Feild
{
workload
.
Id
}
"
;
string
field
=
request
.
WorkTypeId
==
(
int
)
AgWorkloadType
.
SingleAwards
?
AgWorkloadType
.
SingleAwards
.
ToString
()
:
AgWorkloadType
.
Workload
.
ToString
();
workload
.
ItemId
=
$"
{
field
}
_
{
request
.
WorkTypeId
}
_
{
workload
.
Id
}
"
;
workload
.
WorkTypeId
=
request
.
WorkTypeId
;
workload
.
WorkTypeId
=
request
.
WorkTypeId
;
return
perforAgworkloadRepository
.
Update
(
workload
);
return
perforAgworkloadRepository
.
Update
(
workload
);
...
@@ -1151,6 +1157,7 @@ public ag_workload_type SaveWorkType(ag_workload_type request, int userId)
...
@@ -1151,6 +1157,7 @@ public ag_workload_type SaveWorkType(ag_workload_type request, int userId)
};
};
perforAgworkloadtypeRepository
.
Add
(
entity
);
perforAgworkloadtypeRepository
.
Add
(
entity
);
}
}
AddWorkTypeDefaultHeadValue
(
request
.
HospitalId
,
entity
);
AddWorkTypeDefaultValues
(
entity
);
AddWorkTypeDefaultValues
(
entity
);
return
entity
;
return
entity
;
}
}
...
@@ -1178,7 +1185,7 @@ private void AddWorkTypeDefaultValues(ag_workload_type type)
...
@@ -1178,7 +1185,7 @@ private void AddWorkTypeDefaultValues(ag_workload_type type)
HospitalId
=
type
.
HospitalId
,
HospitalId
=
type
.
HospitalId
,
Department
=
type
.
Department
,
Department
=
type
.
Department
,
UnitType
=
type
.
UnitType
,
UnitType
=
type
.
UnitType
,
ItemId
=
t
.
Item2
+
type
.
Id
,
ItemId
=
$"
{
t
.
Item2
}
_
{
type
.
Id
}
"
,
ItemName
=
t
.
Item1
,
ItemName
=
t
.
Item1
,
FactorValue
=
null
,
FactorValue
=
null
,
Sort
=
100
+
t
.
Item3
,
Sort
=
100
+
t
.
Item3
,
...
@@ -1197,7 +1204,7 @@ private void AddWorkTypeDefaultValues(ag_workload_type type)
...
@@ -1197,7 +1204,7 @@ private void AddWorkTypeDefaultValues(ag_workload_type type)
HospitalId
=
type
.
HospitalId
,
HospitalId
=
type
.
HospitalId
,
Department
=
type
.
Department
,
Department
=
type
.
Department
,
UnitType
=
type
.
UnitType
,
UnitType
=
type
.
UnitType
,
ItemId
=
item
.
Item2
+
type
.
Id
,
ItemId
=
$"
{
item
.
Item2
}
_
{
type
.
Id
}
"
,
ItemName
=
item
.
Item1
,
ItemName
=
item
.
Item1
,
FactorValue
=
null
,
FactorValue
=
null
,
Sort
=
100
+
item
.
Item3
,
Sort
=
100
+
item
.
Item3
,
...
@@ -1206,7 +1213,76 @@ private void AddWorkTypeDefaultValues(ag_workload_type type)
...
@@ -1206,7 +1213,76 @@ private void AddWorkTypeDefaultValues(ag_workload_type type)
}
}
}
}
}
}
perforAgworkloadRepository
.
AddRange
(
insertData
.
ToArray
());
var
result
=
perforAgworkloadRepository
.
AddRange
(
insertData
.
ToArray
());
if
(
result
)
{
insertData
.
ForEach
(
t
=>
{
var
prefix
=
defaultValues
.
FirstOrDefault
(
w
=>
w
.
Item1
==
t
.
ItemName
).
Item2
;
if
(!
string
.
IsNullOrEmpty
(
prefix
))
{
t
.
ItemId
=
$"
{
prefix
}
_
{
t
.
WorkTypeId
}
_
{
t
.
Id
}
"
;
}
});
perforAgworkloadRepository
.
UpdateRange
(
insertData
.
ToArray
());
}
}
private
void
AddWorkTypeDefaultHeadValue
(
int
hospitalId
,
ag_workload_type
type
)
{
List
<
ag_worktype_source
>
insertData
=
new
List
<
ag_worktype_source
>();
var
allots
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
);
if
(
allots
==
null
||
!
allots
.
Any
())
return
;
var
seconds
=
perforAgsecondallotRepository
.
GetEntities
(
t
=>
allots
.
Select
(
w
=>
w
.
ID
).
Contains
(
t
.
AllotId
.
Value
)
&&
t
.
Department
==
type
.
Department
&&
t
.
UnitType
==
type
.
UnitType
);
if
(
seconds
==
null
||
!
seconds
.
Any
())
return
;
var
worktypeSources
=
worktypesourceRepository
.
GetEntities
(
t
=>
t
.
WorkTypeId
==
type
.
Id
);
if
(
worktypeSources
==
null
||
!
worktypeSources
.
Any
())
{
insertData
=
seconds
.
Select
(
t
=>
new
ag_worktype_source
{
WorkTypeId
=
type
.
Id
,
SecondId
=
t
.
Id
,
FieldId
=
$"
{
AgWorkloadType
.
Workload
.
ToString
()}
_Ratio_
{
type
.
Id
}
"
,
FieldName
=
type
.
TypeName
.
EndsWith
(
"占比"
)
?
type
.
TypeName
:
type
.
TypeName
+
"占比"
}).
ToList
();
}
else
{
var
existedSeconds
=
worktypeSources
.
Select
(
t
=>
t
.
SecondId
);
var
except
=
seconds
.
Select
(
t
=>
t
.
Id
).
Except
(
existedSeconds
);
if
(
except
!=
null
&&
except
.
Any
())
{
insertData
=
except
.
Select
(
t
=>
new
ag_worktype_source
{
WorkTypeId
=
type
.
Id
,
SecondId
=
t
,
FieldId
=
$"
{
AgWorkloadType
.
Workload
.
ToString
()}
_Ratio_
{
type
.
Id
}
"
,
FieldName
=
type
.
TypeName
.
EndsWith
(
"占比"
)
?
type
.
TypeName
:
type
.
TypeName
+
"占比"
}).
ToList
();
}
worktypeSources
.
ForEach
(
t
=>
{
t
.
FieldName
=
type
.
TypeName
+
t
.
FieldName
.
Substring
(
t
.
FieldName
.
Length
-
2
);
});
worktypesourceRepository
.
UpdateRange
(
worktypeSources
.
ToArray
());
}
var
amounts
=
insertData
.
Select
(
t
=>
new
ag_worktype_source
{
WorkTypeId
=
type
.
Id
,
SecondId
=
t
.
SecondId
,
FieldId
=
$"
{
AgWorkloadType
.
Workload
.
ToString
()}
_Amount_
{
type
.
Id
}
"
,
FieldName
=
t
.
FieldName
.
Substring
(
0
,
t
.
FieldName
.
Length
-
2
)
+
"金额"
}).
ToList
();
insertData
.
AddRange
(
amounts
);
var
result
=
worktypesourceRepository
.
AddRange
(
insertData
.
OrderBy
(
t
=>
t
.
SecondId
).
ThenBy
(
t
=>
t
.
FieldName
).
ToArray
());
if
(
result
)
{
insertData
.
ForEach
(
t
=>
t
.
FieldId
=
t
.
FieldId
+
"_"
+
t
.
Id
);
worktypesourceRepository
.
UpdateRange
(
insertData
.
ToArray
());
}
}
}
/// <summary>
/// <summary>
...
@@ -1219,6 +1295,13 @@ public bool DeleteWorkType(WorkloadRequest request)
...
@@ -1219,6 +1295,13 @@ public bool DeleteWorkType(WorkloadRequest request)
var
entity
=
perforAgworkloadtypeRepository
.
GetEntity
(
t
=>
t
.
Id
==
request
.
Id
);
var
entity
=
perforAgworkloadtypeRepository
.
GetEntity
(
t
=>
t
.
Id
==
request
.
Id
);
if
(
entity
!=
null
)
if
(
entity
!=
null
)
{
{
var
items
=
perforAgworkloadRepository
.
GetEntities
(
t
=>
t
.
WorkTypeId
==
request
.
Id
);
if
(
items
!=
null
&&
items
.
Any
())
perforAgworkloadRepository
.
RemoveRange
(
items
.
ToArray
());
var
sources
=
worktypesourceRepository
.
GetEntities
(
t
=>
t
.
WorkTypeId
==
request
.
Id
);
if
(
sources
!=
null
&&
sources
.
Any
())
worktypesourceRepository
.
RemoveRange
(
sources
.
ToArray
());
return
perforAgworkloadtypeRepository
.
Remove
(
entity
);
return
perforAgworkloadtypeRepository
.
Remove
(
entity
);
}
}
else
else
...
...
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