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
25323596
Commit
25323596
authored
Jun 23, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人员字典
parent
72c8f8e3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
6 deletions
+59
-6
performance/Performance.Api/Controllers/SecondAllotController.cs
+49
-0
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+1
-1
performance/Performance.DtoModels/Enum.cs
+2
-2
performance/Performance.Services/RedistributionService.cs
+2
-2
performance/Performance.Services/SecondAllotService.cs
+5
-1
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
25323596
...
@@ -565,6 +565,10 @@ public ApiResponse RedistributionLoad([FromBody] SecondLoadDto request)
...
@@ -565,6 +565,10 @@ public ApiResponse RedistributionLoad([FromBody] SecondLoadDto request)
var
result
=
_redistributionService
.
Load
(
request
.
SecondId
,
(
ComputeMode
)
request
.
ComputeMode
,
overrideMode
);
var
result
=
_redistributionService
.
Load
(
request
.
SecondId
,
(
ComputeMode
)
request
.
ComputeMode
,
overrideMode
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
catch
(
PerformanceException
ex
)
{
throw
ex
;
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
_logger
.
LogError
(
$"二次绩效录入页面:
{
ex
}
"
);
_logger
.
LogError
(
$"二次绩效录入页面:
{
ex
}
"
);
...
@@ -609,6 +613,10 @@ public ApiResponse RedistributionCheck([FromBody] SecondComputeDto request)
...
@@ -609,6 +613,10 @@ public ApiResponse RedistributionCheck([FromBody] SecondComputeDto request)
var
result
=
_redistributionService
.
CheckData
(
second
,
request
.
Body
);
var
result
=
_redistributionService
.
CheckData
(
second
,
request
.
Body
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
catch
(
PerformanceException
ex
)
{
throw
ex
;
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
_logger
.
LogError
(
$"提交数据正确性检验:
{
ex
}
"
);
_logger
.
LogError
(
$"提交数据正确性检验:
{
ex
}
"
);
...
@@ -673,6 +681,10 @@ public ApiResponse RedistributionCompute([FromBody] SecondComputeDto request)
...
@@ -673,6 +681,10 @@ public ApiResponse RedistributionCompute([FromBody] SecondComputeDto request)
var
dic
=
_redistributionService
.
GetTableHeaderDictionary
((
ComputeMode
)
request
.
ComputeMode
,
second
,
loads
,
workloadGroups
);
var
dic
=
_redistributionService
.
GetTableHeaderDictionary
((
ComputeMode
)
request
.
ComputeMode
,
second
,
loads
,
workloadGroups
);
return
new
ApiResponse
(
ResponseType
.
OK
,
new
{
Head
=
request
.
Head
,
Body
=
cleanDatas
,
Dic
=
dic
});
return
new
ApiResponse
(
ResponseType
.
OK
,
new
{
Head
=
request
.
Head
,
Body
=
cleanDatas
,
Dic
=
dic
});
}
}
catch
(
PerformanceException
ex
)
{
throw
ex
;
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
_logger
.
LogError
(
$"二次绩效结果计算:
{
ex
}
"
);
_logger
.
LogError
(
$"二次绩效结果计算:
{
ex
}
"
);
...
@@ -710,6 +722,10 @@ public ApiResponse RedistributionSave([FromBody] SecondComputeDto request)
...
@@ -710,6 +722,10 @@ public ApiResponse RedistributionSave([FromBody] SecondComputeDto request)
var
result
=
secondAllotService
.
RedistributionSave
(
allot
,
second
,
request
.
Head
,
cleanDatas
);
var
result
=
secondAllotService
.
RedistributionSave
(
allot
,
second
,
request
.
Head
,
cleanDatas
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"保存失败"
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"保存失败"
);
}
}
catch
(
PerformanceException
ex
)
{
throw
ex
;
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
_logger
.
LogError
(
$"二次绩效保存:
{
ex
}
"
);
_logger
.
LogError
(
$"二次绩效保存:
{
ex
}
"
);
...
@@ -758,12 +774,45 @@ public ApiResponse RedistributionSubmit([FromBody] SecondComputeDto request)
...
@@ -758,12 +774,45 @@ public ApiResponse RedistributionSubmit([FromBody] SecondComputeDto request)
}
}
return
new
ApiResponse
(
ResponseType
.
Fail
,
"提交失败"
);
return
new
ApiResponse
(
ResponseType
.
Fail
,
"提交失败"
);
}
}
catch
(
PerformanceException
ex
)
{
throw
ex
;
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
_logger
.
LogError
(
$"二次绩效提交:
{
ex
}
"
);
_logger
.
LogError
(
$"二次绩效提交:
{
ex
}
"
);
return
new
ApiResponse
(
ResponseType
.
Fail
,
"提交失败"
);
return
new
ApiResponse
(
ResponseType
.
Fail
,
"提交失败"
);
}
}
}
}
/// <summary>
/// 二次分配人员字典带出
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"api/second/redistribution/employee"
)]
[
HttpPost
]
public
ApiResponse
RedistributionEmployee
([
FromBody
]
SecondComputeDto
request
)
{
// 返回信息
//rownumber: 11
//secondid: 1472
//department: "呼吸内科" nameof(ag_bodysource.Department);
//name: "付小锋" nameof(ag_bodysource.Name);
//jobtitle: "副高"
//post: "其他"
//worknumber: "197"
//workperformance: 6570.62
//titlecoefficient: 1
//actualattendance: 31
//staffcoefficient: 1
//动态
//assessmentscore_12: 100
//assessmentscore_default: 100
return
new
ApiResponse
(
ResponseType
.
Fail
,
"字典带出失败"
);
}
#
endregion
#
endregion
}
}
}
}
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
25323596
...
@@ -149,7 +149,7 @@
...
@@ -149,7 +149,7 @@
<summary>
正在生成绩效
</summary>
<summary>
正在生成绩效
</summary>
</member>
</member>
<member
name=
"F:Performance.DtoModels.AllotStates.GenerateSucceed"
>
<member
name=
"F:Performance.DtoModels.AllotStates.GenerateSucceed"
>
<summary>
绩效
结果通过审核,允许
下发
</summary>
<summary>
绩效下发
</summary>
</member>
</member>
<member
name=
"F:Performance.DtoModels.AllotStates.GenerateFail"
>
<member
name=
"F:Performance.DtoModels.AllotStates.GenerateFail"
>
<summary>
绩效解析失败
</summary>
<summary>
绩效解析失败
</summary>
...
...
performance/Performance.DtoModels/Enum.cs
View file @
25323596
...
@@ -65,8 +65,8 @@ public enum AllotStates
...
@@ -65,8 +65,8 @@ public enum AllotStates
/// <summary> 正在生成绩效 </summary>
/// <summary> 正在生成绩效 </summary>
[
Description
(
"正在生成绩效"
)]
[
Description
(
"正在生成绩效"
)]
InGenerate
=
5
,
InGenerate
=
5
,
/// <summary> 绩效
结果通过审核,允许
下发 </summary>
/// <summary> 绩效下发 </summary>
[
Description
(
"
数据验证通过
"
)]
[
Description
(
"
绩效下发
"
)]
GenerateSucceed
=
6
,
GenerateSucceed
=
6
,
/// <summary> 绩效解析失败 </summary>
/// <summary> 绩效解析失败 </summary>
[
Description
(
"绩效解析失败"
)]
[
Description
(
"绩效解析失败"
)]
...
...
performance/Performance.Services/RedistributionService.cs
View file @
25323596
...
@@ -271,8 +271,8 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
...
@@ -271,8 +271,8 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
SecondId
),
second
.
Id
);
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
SecondId
),
second
.
Id
);
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
PaymentOfTheMonth
),
$"
{
allot
.
Year
}
年
{
allot
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
)}
月"
);
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
PaymentOfTheMonth
),
$"
{
allot
.
Year
}
年
{
allot
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
)}
月"
);
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
TotalDistPerformance
),
second
.
RealGiveFee
??
0
);
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
TotalDistPerformance
),
(
allot
.
States
==
(
int
)
AllotStates
.
GenerateSucceed
)
?
(
second
.
RealGiveFee
??
0
)
:
100
0
);
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
NightShiftWorkPerforTotal
),
second
.
NightShiftWorkPerforFee
??
0
);
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
NightShiftWorkPerforTotal
),
(
allot
.
States
==
(
int
)
AllotStates
.
GenerateSucceed
)
?
(
second
.
NightShiftWorkPerforFee
??
0
)
:
0
);
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
TotalPerformance
),
(
second
.
RealGiveFee
??
0
)
-
(
second
.
NightShiftWorkPerforFee
??
0
));
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
TotalPerformance
),
(
second
.
RealGiveFee
??
0
)
-
(
second
.
NightShiftWorkPerforFee
??
0
));
// 横向 纵向 特有顶部信息
// 横向 纵向 特有顶部信息
if
(
computeMode
!=
ComputeMode
.
NotCalculate
)
if
(
computeMode
!=
ComputeMode
.
NotCalculate
)
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
25323596
...
@@ -1611,9 +1611,13 @@ bool VerifySubmissioAmount(decimal? submitDataAmount, decimal? realGiveFee)
...
@@ -1611,9 +1611,13 @@ bool VerifySubmissioAmount(decimal? submitDataAmount, decimal? realGiveFee)
if
(
data
==
null
||
!
data
.
Any
())
if
(
data
==
null
||
!
data
.
Any
())
throw
new
PerformanceException
(
"提交时未检测到数据!"
);
throw
new
PerformanceException
(
"提交时未检测到数据!"
);
var
nightShiftWorkPerforFee
=
data
.
Sum
(
w
=>
w
.
NightWorkPerformance
??
0
);
if
(!
VerifySubmissioAmount
(
nightShiftWorkPerforFee
,
second
.
NightShiftWorkPerforFee
))
throw
new
PerformanceException
(
$"夜班绩效金额不一致!夜班绩效金额:
{
second
.
NightShiftWorkPerforFee
??
0
:
0.
####
}
,提交金额:
{
nightShiftWorkPerforFee
:
0.
####
}
"
);
var
total
=
data
.
Sum
(
t
=>
(
t
.
DistPerformance
??
0
)
+
(
t
.
NightWorkPerformance
??
0
));
var
total
=
data
.
Sum
(
t
=>
(
t
.
DistPerformance
??
0
)
+
(
t
.
NightWorkPerformance
??
0
));
if
(!
VerifySubmissioAmount
(
total
,
second
.
RealGiveFee
))
if
(!
VerifySubmissioAmount
(
total
,
second
.
RealGiveFee
))
throw
new
PerformanceException
(
$"总金额与考核后金额不一致!可分配金额:
{
second
.
RealGiveFee
}
,提交金额:
{
total
}
"
);
throw
new
PerformanceException
(
$"总金额与考核后金额不一致!可分配金额:
{
second
.
RealGiveFee
:
0.
####
}
,提交金额:
{
total
:
0.
####
}
"
);
}
}
second
.
UseTempId
=
temp
.
UseTempId
;
second
.
UseTempId
=
temp
.
UseTempId
;
second
.
Status
=
2
;
second
.
Status
=
2
;
...
...
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