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
352a09da
Commit
352a09da
authored
Jun 05, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绩效生成方式修改、原始数据修改
parent
a46c75de
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
142 additions
and
59 deletions
+142
-59
performance/Performance.Api/Controllers/AllotController.cs
+13
-12
performance/Performance.Api/Controllers/OriginalController.cs
+4
-1
performance/Performance.Api/Controllers/SecondAllotController.cs
+19
-19
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+10
-0
performance/Performance.EntityModels/Entity/ag_workload_type.cs
+11
-1
performance/Performance.Repository/PerforPerAllotRepository.cs
+2
-4
performance/Performance.Services/AllotService.cs
+6
-4
performance/Performance.Services/EmployeeService.cs
+1
-1
performance/Performance.Services/OriginalService.cs
+45
-7
performance/Performance.Services/SecondAllotService.cs
+31
-10
No files found.
performance/Performance.Api/Controllers/AllotController.cs
View file @
352a09da
...
...
@@ -52,7 +52,7 @@ public class AllotController : Controller
/// <returns></returns>
[
Route
(
"list"
)]
[
HttpPost
]
public
ApiResponse
List
([
FromBody
]
AllotRequest
request
)
public
ApiResponse
List
([
FromBody
]
AllotRequest
request
)
{
List
<
AllotResponse
>
allots
=
_allotService
.
GetAllotList
(
request
.
HospitalId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
allots
);
...
...
@@ -65,7 +65,7 @@ public ApiResponse List([FromBody]AllotRequest request)
/// <returns></returns>
[
Route
(
"list/success"
)]
[
HttpPost
]
public
ApiResponse
Success
([
FromBody
]
AllotRequest
request
)
public
ApiResponse
Success
([
FromBody
]
AllotRequest
request
)
{
List
<
AllotResponse
>
allots
=
_allotService
.
GetSuccAllotList
(
request
.
HospitalId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
allots
);
...
...
@@ -78,7 +78,7 @@ public ApiResponse Success([FromBody]AllotRequest request)
/// <returns></returns>
[
Route
(
"insert"
)]
[
HttpPost
]
public
ApiResponse
Insert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
AllotRequest
request
)
public
ApiResponse
Insert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
AllotRequest
request
)
{
var
userId
=
_claim
.
GetUserId
();
var
result
=
_allotService
.
InsertAllot
(
request
,
userId
);
...
...
@@ -93,7 +93,7 @@ public ApiResponse Insert([CustomizeValidator(RuleSet = "Insert"), FromBody]Allo
/// <returns></returns>
[
Route
(
"update"
)]
[
HttpPost
]
public
ApiResponse
<
AllotResponse
>
Update
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
AllotRequest
request
)
public
ApiResponse
<
AllotResponse
>
Update
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
AllotRequest
request
)
{
var
result
=
_allotService
.
UpdateAllot
(
request
);
return
new
ApiResponse
<
AllotResponse
>(
ResponseType
.
OK
,
result
);
...
...
@@ -106,7 +106,7 @@ public ApiResponse<AllotResponse> Update([CustomizeValidator(RuleSet = "Update")
/// <returns></returns>
[
Route
(
"delete"
)]
[
HttpPost
]
public
ApiResponse
Delete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
AllotRequest
request
)
public
ApiResponse
Delete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
AllotRequest
request
)
{
bool
result
=
_allotService
.
DeleteAllot
(
request
.
ID
);
return
new
ApiResponse
(
ResponseType
.
OK
);
...
...
@@ -150,6 +150,7 @@ public ApiResponse Import([FromForm] IFormCollection form)
allot
.
States
=
(
int
)
AllotStates
.
FileUploaded
;
allot
.
Remark
=
EnumHelper
.
GetDescription
(
AllotStates
.
FileUploaded
);
allot
.
UploadDate
=
DateTime
.
Now
;
allot
.
Generate
=
(
int
)
AllotGenerate
.
Init
;
if
(!
_allotService
.
Update
(
allot
))
return
new
ApiResponse
(
ResponseType
.
Fail
,
$"
{
file
.
FileName
}
上传成功,修改状态失败"
);
_configService
.
Clear
(
allot
.
ID
);
...
...
@@ -165,7 +166,7 @@ public ApiResponse Import([FromForm] IFormCollection form)
/// <returns></returns>
[
Route
(
"generate"
)]
[
HttpPost
]
public
ApiResponse
Generate
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
AllotRequest
request
)
public
ApiResponse
Generate
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
AllotRequest
request
)
{
var
allot
=
_allotService
.
GetAllot
(
request
.
ID
);
if
(
null
==
allot
||
string
.
IsNullOrEmpty
(
allot
.
Path
))
...
...
@@ -193,7 +194,7 @@ public ApiResponse Generate([CustomizeValidator(RuleSet = "Delete"), FromBody]Al
/// <returns></returns>
[
Route
(
"pigeonhole"
)]
[
HttpPost
]
public
ApiResponse
Pigeonhole
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
AllotRequest
request
)
public
ApiResponse
Pigeonhole
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
AllotRequest
request
)
{
var
allot
=
_allotService
.
GetAllot
(
request
.
ID
);
if
(
null
==
allot
)
...
...
@@ -209,7 +210,7 @@ public ApiResponse Pigeonhole([CustomizeValidator(RuleSet = "Delete"), FromBody]
/// <returns></returns>
[
Route
(
"checkrecord"
)]
[
HttpPost
]
public
ApiResponse
CheckRecord
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
AllotRequest
request
)
public
ApiResponse
CheckRecord
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
AllotRequest
request
)
{
var
allot
=
_allotService
.
GetAllot
(
request
.
ID
);
if
(
null
==
allot
)
...
...
@@ -226,7 +227,7 @@ public ApiResponse CheckRecord([CustomizeValidator(RuleSet = "Delete"), FromBody
/// <returns></returns>
[
Route
(
"allotcheckresult"
)]
[
HttpPost
]
public
ApiResponse
AllotCheckResult
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
AllotRequest
request
)
public
ApiResponse
AllotCheckResult
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
AllotRequest
request
)
{
var
allot
=
_allotService
.
GetAllot
(
request
.
ID
);
if
(
null
==
allot
)
...
...
@@ -242,7 +243,7 @@ public ApiResponse AllotCheckResult([CustomizeValidator(RuleSet = "Delete"), Fro
/// <returns></returns>
[
Route
(
"allotlog"
)]
[
HttpPost
]
public
ApiResponse
AllotLog
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
AllotRequest
request
)
public
ApiResponse
AllotLog
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
AllotRequest
request
)
{
var
allot
=
_allotService
.
GetAllot
(
request
.
ID
);
if
(
null
==
allot
)
...
...
@@ -258,7 +259,7 @@ public ApiResponse AllotLog([CustomizeValidator(RuleSet = "Delete"), FromBody]Al
/// <returns></returns>
[
Route
(
"issued"
)]
[
HttpPost
]
public
ApiResponse
Issued
([
FromBody
]
AllotRequest
request
)
public
ApiResponse
Issued
([
FromBody
]
AllotRequest
request
)
{
var
allot
=
_allotService
.
GetAllot
(
request
.
ID
);
if
(
null
==
allot
)
...
...
@@ -274,7 +275,7 @@ public ApiResponse Issued([FromBody]AllotRequest request)
/// <returns></returns>
[
Route
(
"update/showformula"
)]
[
HttpPost
]
public
ApiResponse
UpdateAllotShowFormula
([
FromBody
]
AllotRequest
request
)
public
ApiResponse
UpdateAllotShowFormula
([
FromBody
]
AllotRequest
request
)
{
if
(
request
.
ID
<
1
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"绩效信息无效"
);
...
...
performance/Performance.Api/Controllers/OriginalController.cs
View file @
352a09da
...
...
@@ -17,12 +17,15 @@ public class OriginalController : Controller
{
private
readonly
ClaimService
claim
;
private
readonly
OriginalService
originalService
;
private
readonly
AllotService
allotService
;
public
OriginalController
(
ClaimService
claim
,
OriginalService
originalService
)
OriginalService
originalService
,
AllotService
allotService
)
{
this
.
claim
=
claim
;
this
.
originalService
=
originalService
;
this
.
allotService
=
allotService
;
}
/// <summary>
...
...
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
352a09da
...
...
@@ -47,7 +47,7 @@ public ApiResponse List()
/// <returns></returns>
[
Route
(
"api/second/savevalue/{secondid}"
)]
[
HttpPost
]
public
ApiResponse
SaveValue
(
int
secondid
,
[
FromBody
]
List
<
ag_fixatitem
>
request
)
public
ApiResponse
SaveValue
(
int
secondid
,
[
FromBody
]
List
<
ag_fixatitem
>
request
)
{
if
(
secondid
!=
0
&&
(
request
==
null
||
request
.
Count
==
0
))
secondAllotService
.
DelValue
(
secondid
,
request
);
...
...
@@ -82,7 +82,7 @@ public ApiResponse SaveValue(int secondid, [FromBody]List<ag_fixatitem> request)
/// <returns></returns>
[
Route
(
"api/second/savecompute"
)]
[
HttpPost
]
public
ApiResponse
SaveCompute
([
FromBody
]
List
<
ag_compute
>
request
)
public
ApiResponse
SaveCompute
([
FromBody
]
List
<
ag_compute
>
request
)
{
var
allotCount
=
request
.
Where
(
t
=>
t
.
AllotId
>
0
).
Select
(
t
=>
t
.
AllotId
).
Distinct
().
Count
();
if
(
allotCount
!=
1
||
request
.
Any
(
t
=>
t
.
AllotId
==
0
))
...
...
@@ -110,7 +110,7 @@ public ApiResponse SaveCompute([FromBody]List<ag_compute> request)
/// <returns></returns>
[
Route
(
"api/second/detail"
)]
[
HttpPost
]
public
ApiResponse
SecondDetail
([
CustomizeValidator
(
RuleSet
=
"Refresh"
),
FromBody
]
UseTempRequest
request
)
public
ApiResponse
SecondDetail
([
CustomizeValidator
(
RuleSet
=
"Refresh"
),
FromBody
]
UseTempRequest
request
)
{
var
result
=
secondAllotService
.
GetSecondDetail
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
...
...
@@ -136,7 +136,7 @@ public ApiResponse SecondDetail([CustomizeValidator(RuleSet = "Refresh"), FromBo
/// <returns></returns>
[
HttpPost
]
[
Route
(
"api/temp/list"
)]
public
ApiResponse
<
List
<
SecondTempResponse
>>
Temp
([
FromBody
]
AllotDeptRequest
request
)
public
ApiResponse
<
List
<
SecondTempResponse
>>
Temp
([
FromBody
]
AllotDeptRequest
request
)
{
var
userId
=
claimService
.
GetUserId
();
var
result
=
secondAllotService
.
GetTemp
(
request
.
HospitalId
,
request
.
Department
,
userId
);
...
...
@@ -149,7 +149,7 @@ public ApiResponse<List<SecondTempResponse>> Temp([FromBody]AllotDeptRequest req
/// <returns></returns>
[
Route
(
"api/temp/usetemp"
)]
[
HttpPost
]
public
ApiResponse
UseTemp
([
CustomizeValidator
(
RuleSet
=
"Use"
),
FromBody
]
UseTempRequest
request
)
public
ApiResponse
UseTemp
([
CustomizeValidator
(
RuleSet
=
"Use"
),
FromBody
]
UseTempRequest
request
)
{
var
result
=
secondAllotService
.
UseTemp
(
request
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"选择成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"选择失败"
);
...
...
@@ -161,7 +161,7 @@ public ApiResponse UseTemp([CustomizeValidator(RuleSet = "Use"), FromBody]UseTem
/// <returns></returns>
[
Route
(
"api/second/refreshtemp"
)]
[
HttpPost
]
public
ApiResponse
RefreshTemp
([
CustomizeValidator
(
RuleSet
=
"Refresh"
),
FromBody
]
UseTempRequest
request
)
public
ApiResponse
RefreshTemp
([
CustomizeValidator
(
RuleSet
=
"Refresh"
),
FromBody
]
UseTempRequest
request
)
{
secondAllotService
.
RefreshTemp
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
);
...
...
@@ -175,7 +175,7 @@ public ApiResponse RefreshTemp([CustomizeValidator(RuleSet = "Refresh"), FromBod
/// <returns></returns>
[
Route
(
"api/second/workload/list"
)]
[
HttpPost
]
public
ApiResponse
WorkloadList
([
CustomizeValidator
(
RuleSet
=
"Query"
),
FromBody
]
WorkloadRequest
request
)
public
ApiResponse
WorkloadList
([
CustomizeValidator
(
RuleSet
=
"Query"
),
FromBody
]
WorkloadRequest
request
)
{
var
result
=
secondAllotService
.
GetWorkloadList
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
...
...
@@ -187,7 +187,7 @@ public ApiResponse WorkloadList([CustomizeValidator(RuleSet = "Query"), FromBody
/// <returns></returns>
[
Route
(
"api/second/workload/add"
)]
[
HttpPost
]
public
ApiResponse
WorkloadAdd
([
CustomizeValidator
(
RuleSet
=
"Add"
),
FromBody
]
WorkloadRequest
request
)
public
ApiResponse
WorkloadAdd
([
CustomizeValidator
(
RuleSet
=
"Add"
),
FromBody
]
WorkloadRequest
request
)
{
var
result
=
secondAllotService
.
WorkloadAdd
(
request
);
return
new
ApiResponse
(
result
?
ResponseType
.
OK
:
ResponseType
.
Fail
);
...
...
@@ -199,7 +199,7 @@ public ApiResponse WorkloadAdd([CustomizeValidator(RuleSet = "Add"), FromBody]Wo
/// <returns></returns>
[
Route
(
"api/second/workload/update"
)]
[
HttpPost
]
public
ApiResponse
WorkloadUpdate
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
WorkloadRequest
request
)
public
ApiResponse
WorkloadUpdate
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
WorkloadRequest
request
)
{
var
result
=
secondAllotService
.
WorkloadUpdate
(
request
);
return
new
ApiResponse
(
result
?
ResponseType
.
OK
:
ResponseType
.
Fail
);
...
...
@@ -211,7 +211,7 @@ public ApiResponse WorkloadUpdate([CustomizeValidator(RuleSet = "Update"), FromB
/// <returns></returns>
[
Route
(
"api/second/workload/delete"
)]
[
HttpPost
]
public
ApiResponse
WorkloadDelete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
WorkloadRequest
request
)
public
ApiResponse
WorkloadDelete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
WorkloadRequest
request
)
{
var
result
=
secondAllotService
.
WorkloadDelete
(
request
.
Id
);
return
new
ApiResponse
(
result
?
ResponseType
.
OK
:
ResponseType
.
Fail
);
...
...
@@ -223,7 +223,7 @@ public ApiResponse WorkloadDelete([CustomizeValidator(RuleSet = "Delete"), FromB
/// <returns></returns>
[
Route
(
"api/second/single/list"
)]
[
HttpPost
]
public
ApiResponse
SingleAwards
([
FromBody
]
WorkloadRequest
request
)
public
ApiResponse
SingleAwards
([
FromBody
]
WorkloadRequest
request
)
{
var
result
=
secondAllotService
.
GetSingleList
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
...
...
@@ -235,9 +235,9 @@ public ApiResponse SingleAwards([FromBody]WorkloadRequest request)
/// <returns></returns>
[
Route
(
"api/second/worktype/list"
)]
[
HttpPost
]
public
ApiResponse
WorkTypeList
([
FromBody
]
WorkloadRequest
request
)
public
ApiResponse
WorkTypeList
([
FromBody
]
WorkloadRequest
request
)
{
var
result
=
secondAllotService
.
WorkTypeList
(
request
);
var
result
=
secondAllotService
.
WorkTypeList
(
request
,
claimService
.
GetUserId
()
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
...
...
@@ -247,14 +247,14 @@ public ApiResponse WorkTypeList([FromBody]WorkloadRequest request)
/// <returns></returns>
[
Route
(
"api/second/worktype/save"
)]
[
HttpPost
]
public
ApiResponse
SingleSave
([
FromBody
]
ag_workload_type
request
)
public
ApiResponse
SingleSave
([
FromBody
]
ag_workload_type
request
)
{
if
(
request
.
HospitalId
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"医院信息无效"
);
if
(
string
.
IsNullOrEmpty
(
request
.
TypeName
))
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"填写参数无效"
);
var
result
=
secondAllotService
.
SaveWorkType
(
request
);
var
result
=
secondAllotService
.
SaveWorkType
(
request
,
claimService
.
GetUserId
()
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
...
...
@@ -264,7 +264,7 @@ public ApiResponse SingleSave([FromBody]ag_workload_type request)
/// <returns></returns>
[
Route
(
"api/second/worktype/delete"
)]
[
HttpPost
]
public
ApiResponse
SingleDelete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
WorkloadRequest
request
)
public
ApiResponse
SingleDelete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
WorkloadRequest
request
)
{
var
result
=
secondAllotService
.
DeleteWorkType
(
request
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"删除成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"删除失败"
);
...
...
@@ -298,7 +298,7 @@ public ApiResponse SubmitAudit(SubmitAuditRequest request)
/// <returns></returns>
[
HttpPost
]
[
Route
(
"/api/second/audit/list"
)]
public
ApiResponse
<
List
<
ag_secondallot
>>
AuditList
([
FromBody
]
AllotDeptRequest
request
)
public
ApiResponse
<
List
<
ag_secondallot
>>
AuditList
([
FromBody
]
AllotDeptRequest
request
)
{
var
userid
=
claimService
.
GetUserId
();
var
list
=
secondAllotService
.
AuditList
(
userid
,
request
.
AllotId
);
...
...
@@ -326,7 +326,7 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request)
/// <returns></returns>
[
Route
(
"api/second/other/list"
)]
[
HttpPost
]
public
ApiResponse
OtherList
([
FromBody
]
AgOtherRequest
request
)
public
ApiResponse
OtherList
([
FromBody
]
AgOtherRequest
request
)
{
var
result
=
secondAllotService
.
OtherList
(
request
.
SecondId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
...
...
@@ -338,7 +338,7 @@ public ApiResponse OtherList([FromBody]AgOtherRequest request)
/// <returns></returns>
[
Route
(
"api/second/other/save"
)]
[
HttpPost
]
public
ApiResponse
OtherSave
([
FromBody
]
AgOtherRequest
request
)
public
ApiResponse
OtherSave
([
FromBody
]
AgOtherRequest
request
)
{
var
result
=
secondAllotService
.
OtherSave
(
request
.
SecondId
,
request
.
Othersources
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
352a09da
...
...
@@ -948,6 +948,16 @@
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_workload_type.Department"
>
<summary>
科室
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_workload_type.UnitType"
>
<summary>
科室类型
</summary>
</member>
<member
name=
"T:Performance.EntityModels.as_assess"
>
<summary>
考核类别
...
...
performance/Performance.EntityModels/Entity/ag_workload_type.cs
View file @
352a09da
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// <copyright file=" ag_workload_type.cs">
// * FileName: .cs
// </copyright>
...
...
@@ -30,5 +30,15 @@ public class ag_workload_type
///
/// </summary>
public
string
TypeName
{
get
;
set
;
}
/// <summary>
/// 科室
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 科室类型
/// </summary>
public
string
UnitType
{
get
;
set
;
}
}
}
performance/Performance.Repository/PerforPerAllotRepository.cs
View file @
352a09da
...
...
@@ -20,14 +20,12 @@ namespace Performance.Repository
/// </summary>
public
partial
class
PerforPerallotRepository
:
PerforRepository
<
per_allot
>
{
public
bool
UpdateAllotStates
(
int
allotId
,
int
states
,
string
remark
,
bool
success
)
public
bool
UpdateAllotStates
(
int
allotId
,
int
states
,
string
remark
,
int
generate
)
{
var
allot
=
GetEntity
(
t
=>
t
.
ID
==
allotId
);
allot
.
States
=
states
;
allot
.
Remark
=
remark
;
if
(
success
&&
allot
.
Generate
==
1
)
allot
.
Generate
=
2
;
allot
.
Generate
=
generate
;
return
Update
(
allot
);
}
...
...
performance/Performance.Services/AllotService.cs
View file @
352a09da
...
...
@@ -243,9 +243,9 @@ public bool Update(per_allot allot)
}
#
endregion
public
void
UpdateAllotStates
(
int
allotId
,
int
states
,
string
remark
,
bool
success
=
false
)
public
void
UpdateAllotStates
(
int
allotId
,
int
states
,
string
remark
,
int
generate
=
0
)
{
_allotRepository
.
UpdateAllotStates
(
allotId
,
states
,
remark
,
success
);
_allotRepository
.
UpdateAllotStates
(
allotId
,
states
,
remark
,
generate
);
}
public
per_allot
UpdateAllotShowFormula
(
int
allotId
)
...
...
@@ -271,8 +271,10 @@ public void Generate(per_allot allot, string mail)
logManageService
.
WriteMsg
(
"绩效开始执行"
,
$"正在生成
{
allot
.
Year
}
-
{
allot
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
)}
月份绩效!"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
excel
=
new
PerExcel
();
if
(
allot
.
Generate
==
1
)
int
generate
=
allot
.
Generate
;
if
(
new
int
[]
{
(
int
)
AllotGenerate
.
OriginalDataEdited
,
(
int
)
AllotGenerate
.
PersonnelOffice
}.
Contains
(
allot
.
Generate
))
{
generate
=
(
int
)
AllotGenerate
.
Success
;
configService
.
ClearResData
(
allot
.
ID
);
excel
=
queryDataService
.
QueryDataAndHeader
(
allot
);
}
...
...
@@ -351,7 +353,7 @@ public void Generate(per_allot allot, string mail)
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存绩效人均参考标准"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
perforResbaiscnormRepository
.
AddRange
(
baiscnormList
.
ToArray
());
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateAccomplish
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateAccomplish
),
tru
e
);
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateAccomplish
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateAccomplish
),
generat
e
);
perforCofdirectorRepository
.
SupplementaryData
(
allot
.
ID
);
logManageService
.
WriteMsg
(
"正在生成报表数据"
,
"正在生成报表数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
...
...
performance/Performance.Services/EmployeeService.cs
View file @
352a09da
...
...
@@ -257,7 +257,7 @@ public bool Audit(int allotId)
if
(
allot
==
null
||
!
new
List
<
int
>
{
(
int
)
AllotStates
.
GenerateSucceed
,
(
int
)
AllotStates
.
Archive
}.
Contains
(
allot
.
States
))
throw
new
PerformanceException
(
"绩效信息错误"
);
allot
.
Generate
=
1
;
allot
.
Generate
=
(
int
)
AllotGenerate
.
PersonnelOffice
;
return
perforPerallotRepository
.
Update
(
allot
);
}
}
...
...
performance/Performance.Services/OriginalService.cs
View file @
352a09da
...
...
@@ -17,6 +17,7 @@ namespace Performance.Services
public
class
OriginalService
:
IAutoInjection
{
private
readonly
PerforPersheetRepository
persheetRepository
;
private
readonly
PerforPerallotRepository
perallotRepository
;
private
readonly
PerforImheaderRepository
imheaderRepository
;
private
readonly
PerforImemployeeRepository
imemployeeRepository
;
private
readonly
PerforImemployeeclinicRepository
imemployeeclinicRepository
;
...
...
@@ -24,6 +25,7 @@ public class OriginalService : IAutoInjection
private
readonly
PerforImspecialunitRepository
imspecialunitRepository
;
public
OriginalService
(
PerforPersheetRepository
persheetRepository
,
PerforPerallotRepository
perallotRepository
,
PerforImheaderRepository
imheaderRepository
,
PerforImemployeeRepository
imemployeeRepository
,
PerforImemployeeclinicRepository
imemployeeclinicRepository
,
...
...
@@ -31,6 +33,7 @@ public class OriginalService : IAutoInjection
PerforImspecialunitRepository
imspecialunitRepository
)
{
this
.
persheetRepository
=
persheetRepository
;
this
.
perallotRepository
=
perallotRepository
;
this
.
imheaderRepository
=
imheaderRepository
;
this
.
imemployeeRepository
=
imemployeeRepository
;
this
.
imemployeeclinicRepository
=
imemployeeclinicRepository
;
...
...
@@ -77,24 +80,46 @@ public bool EditSheetData(int userId, OriginalRequest request)
{
var
sheet
=
persheetRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
SheetId
);
if
(
sheet
==
null
)
throw
new
PerformanceException
(
"参数sheetid无效"
);
throw
new
PerformanceException
(
"提交数据无效"
);
var
allot
=
perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
sheet
.
AllotID
);
if
(
allot
==
null
)
throw
new
PerformanceException
(
"绩效信息错误"
);
var
result
=
false
;
try
{
switch
(
sheet
.
SheetType
)
{
case
(
int
)
SheetType
.
Employee
:
return
EditEmployee
(
userId
,
request
);
result
=
EditEmployee
(
userId
,
request
);
break
;
case
(
int
)
SheetType
.
ClinicEmployee
:
return
EditEmployeeClinic
(
userId
,
request
);
result
=
EditEmployeeClinic
(
userId
,
request
);
break
;
case
(
int
)
SheetType
.
SpecialUnit
:
return
EditSpecialUnit
(
userId
,
request
);
result
=
EditSpecialUnit
(
userId
,
request
);
break
;
case
(
int
)
SheetType
.
OtherIncome
:
case
(
int
)
SheetType
.
Income
:
case
(
int
)
SheetType
.
Expend
:
case
(
int
)
SheetType
.
Workload
:
case
(
int
)
SheetType
.
AccountBasic
:
return
EditFeeData
(
userId
,
request
);
result
=
EditFeeData
(
userId
,
request
);
break
;
}
return
false
;
}
catch
(
ArgumentException
ex
)
{
throw
new
PerformanceException
(
"提交参数不合规范"
);
}
if
(
result
&&
new
int
[]
{
(
int
)
AllotGenerate
.
Init
,
(
int
)
AllotGenerate
.
Success
}.
Contains
(
allot
.
Generate
))
{
allot
.
Generate
=
(
int
)
AllotGenerate
.
OriginalDataEdited
;
perallotRepository
.
Update
(
allot
);
}
return
result
;
}
#
region
employee
specialunit
...
...
@@ -137,7 +162,10 @@ private bool EditSpecialUnit(int userId, OriginalRequest request)
private
void
SetValue
<
TEntity
>(
TEntity
entity
,
Cell
cell
)
{
typeof
(
TEntity
).
GetProperty
(
cell
.
FieldName
).
SetValue
(
entity
,
cell
.
CellValue
);
var
value
=
cell
.
CellValue
;
if
(
value
.
ToString
().
IndexOf
(
"%"
)
>
-
1
)
value
=
ConvertHelper
.
To
<
decimal
>(
value
.
ToString
().
Replace
(
"%"
,
""
))
/
100
;
typeof
(
TEntity
).
GetProperty
(
cell
.
FieldName
).
SetValue
(
entity
,
value
);
}
#
endregion
...
...
@@ -171,6 +199,8 @@ private bool EditFeeData(int userId, OriginalRequest request)
entity
.
UpdateUser
=
userId
;
result
=
imdataRepository
.
Update
(
entity
);
}
else
throw
new
ArgumentException
(
"提交参数不合规范"
);
}
else
result
=
ImDataInsert
(
userId
,
request
,
header
);
...
...
@@ -261,4 +291,12 @@ private bool ImDataInsert(int userId, OriginalRequest request, im_header header)
#
endregion
}
public
enum
AllotGenerate
{
Init
=
0
,
PersonnelOffice
=
1
,
Success
=
2
,
OriginalDataEdited
=
3
,
}
}
performance/Performance.Services/SecondAllotService.cs
View file @
352a09da
...
...
@@ -308,7 +308,7 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
//检验 二次绩效配置 数据是否 有值,无则补充带出
FillData
(
second
,
result
.
BodyItems
);
SupplyHeaderByWorkItem
(
request
,
result
);
SupplyHeaderByWorkItem
(
request
,
result
,
second
);
return
new
SecondResponse
{
...
...
@@ -433,7 +433,7 @@ private void FillData(ag_secondallot second, List<BodyItem> bodyItems)
/// </summary>
/// <param name="request"></param>
/// <param name="result"></param>
private
void
SupplyHeaderByWorkItem
(
UseTempRequest
request
,
SecondResponse
result
)
private
void
SupplyHeaderByWorkItem
(
UseTempRequest
request
,
SecondResponse
result
,
ag_secondallot
second
)
{
var
workitem
=
perforAgworkloadRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
Department
==
request
.
Department
&&
t
.
UnitType
==
request
.
UnitType
&&
!
EnumHelper
.
GetItems
<
AgWorkloadType
>().
Select
(
type
=>
type
.
Value
).
Contains
(
t
.
WorkTypeId
));
...
...
@@ -441,7 +441,8 @@ private void SupplyHeaderByWorkItem(UseTempRequest request, SecondResponse resul
if
(
workitem
==
null
||
!
workitem
.
Any
(
t
=>
t
.
Id
>
0
))
return
;
var
deptHeader
=
perforAgworkloadtypeRepository
.
GetEntities
(
t
=>
new
List
<
int
>
{
request
.
HospitalId
,
0
}.
Contains
(
t
.
HospitalId
));
var
unit
=
second
.
UnitType
==
UnitType
.
医技组
.
ToString
()
?
UnitType
.
医生组
.
ToString
()
:
second
.
UnitType
;
var
deptHeader
=
perforAgworkloadtypeRepository
.
GetEntities
(
t
=>
request
.
HospitalId
==
t
.
HospitalId
&&
t
.
Department
==
second
.
Department
&&
t
.
UnitType
==
unit
);
if
(
deptHeader
==
null
||
!
deptHeader
.
Any
())
return
;
...
...
@@ -488,9 +489,11 @@ private void SupplyHeaderByWorkItem(UseTempRequest request, SecondResponse resul
sortindex
++;
}
}
var
defauleHeader
=
deptHeader
.
Where
(
t
=>
t
.
HospitalId
==
0
).
ToList
();
defauleHeader
.
Add
(
new
ag_workload_type
{
Id
=
2
,
TypeName
=
"工作量分配绩效金额"
});
var
defauleHeader
=
new
List
<
ag_workload_type
>
{
new
ag_workload_type
{
Id
=
2
,
TypeName
=
"工作量绩效占比"
},
new
ag_workload_type
{
Id
=
2
,
TypeName
=
"工作量分配绩效金额"
},
};
foreach
(
var
item
in
defauleHeader
)
{
result
.
HeadItems
.
Where
(
t
=>
t
.
FiledName
==
item
.
TypeName
).
ToList
()?.
ForEach
(
t
=>
t
.
WorkType
=
item
.
Id
);
...
...
@@ -867,9 +870,10 @@ public List<ag_workload> GetSingleList(WorkloadRequest request)
/// </summary>
/// <param name="secondId"></param>
/// <returns></returns>
public
List
<
TitleValue
<
int
>>
WorkTypeList
(
WorkloadRequest
request
)
public
List
<
TitleValue
<
int
>>
WorkTypeList
(
WorkloadRequest
request
,
int
userId
)
{
var
worktypes
=
perforAgworkloadtypeRepository
.
GetEntities
(
t
=>
new
List
<
int
>
{
0
,
request
.
HospitalId
.
Value
}.
Contains
(
t
.
HospitalId
));
var
(
unit
,
dept
)
=
GetDeptAndUnit
(
userId
);
var
worktypes
=
perforAgworkloadtypeRepository
.
GetEntities
(
t
=>
request
.
HospitalId
.
Value
==
t
.
HospitalId
&&
t
.
Department
==
dept
&&
t
.
UnitType
==
unit
);
if
(
worktypes
!=
null
&&
worktypes
.
Any
())
{
return
worktypes
.
Select
(
t
=>
new
TitleValue
<
int
>
...
...
@@ -886,9 +890,10 @@ public List<TitleValue<int>> WorkTypeList(WorkloadRequest request)
/// </summary>
/// <param name="secondId"></param>
/// <returns></returns>
public
ag_workload_type
SaveWorkType
(
ag_workload_type
request
)
public
ag_workload_type
SaveWorkType
(
ag_workload_type
request
,
int
userId
)
{
var
entity
=
perforAgworkloadtypeRepository
.
GetEntity
(
t
=>
new
List
<
int
>
{
0
,
request
.
HospitalId
}.
Contains
(
t
.
HospitalId
)
&&
t
.
TypeName
==
request
.
TypeName
);
var
(
unit
,
dept
)
=
GetDeptAndUnit
(
userId
);
var
entity
=
perforAgworkloadtypeRepository
.
GetEntity
(
t
=>
request
.
HospitalId
==
t
.
HospitalId
&&
t
.
Department
==
dept
&&
t
.
UnitType
==
unit
&&
t
.
TypeName
==
request
.
TypeName
);
if
(
entity
==
null
)
{
if
(
request
.
Id
>
0
)
...
...
@@ -905,6 +910,8 @@ public ag_workload_type SaveWorkType(ag_workload_type request)
{
HospitalId
=
request
.
HospitalId
,
TypeName
=
request
.
TypeName
,
Department
=
dept
,
UnitType
=
unit
,
};
perforAgworkloadtypeRepository
.
Add
(
entity
);
}
...
...
@@ -931,6 +938,20 @@ public bool DeleteWorkType(WorkloadRequest request)
else
return
false
;
}
public
(
string
,
string
)
GetDeptAndUnit
(
int
userId
)
{
var
user
=
perforUserRepository
.
GetEntity
(
t
=>
t
.
ID
==
userId
);
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
var
role
=
roleRepository
.
GetEntity
(
t
=>
t
.
ID
==
userrole
.
RoleID
);
if
(
role
.
Type
==
application
.
DirectorRole
)
return
(
UnitType
.
医生组
.
ToString
(),
user
.
Department
);
else
if
(
role
.
Type
==
application
.
NurseRole
)
return
(
UnitType
.
护理组
.
ToString
(),
user
.
Department
);
else
return
(
""
,
user
.
Department
);
}
#
endregion
#
region
二次绩效考核
...
...
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