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
e4f4af82
Commit
e4f4af82
authored
Feb 24, 2020
by
zry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效审核及其他来源详情
parent
afbd0054
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
107 additions
and
32 deletions
+107
-32
performance/Performance.Api/Controllers/SecondAllotController.cs
+17
-5
performance/Performance.Api/wwwroot/Performance.Api.xml
+8
-2
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+5
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+5
-0
performance/Performance.DtoModels/Request/SubmitAuditRequest.cs
+25
-0
performance/Performance.EntityModels/Entity/ag_secondallot.cs
+5
-0
performance/Performance.Services/SecondAllotService.cs
+42
-25
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
e4f4af82
...
@@ -115,6 +115,18 @@ public ApiResponse SecondDetail([CustomizeValidator(RuleSet = "Refresh"), FromBo
...
@@ -115,6 +115,18 @@ public ApiResponse SecondDetail([CustomizeValidator(RuleSet = "Refresh"), FromBo
var
result
=
secondAllotService
.
GetSecondDetail
(
request
);
var
result
=
secondAllotService
.
GetSecondDetail
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
/// <summary>
/// 二次绩效录入页面配置信息
/// </summary>
/// <returns></returns>
[
Route
(
"api/second/otherdetail/{secondid}"
)]
[
HttpPost
]
public
ApiResponse
SecondOtherDetail
(
int
secondid
)
{
var
result
=
secondAllotService
.
GetSecondDetail
(
secondid
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
#
endregion
#
endregion
#
region
模板使用
#
region
模板使用
...
@@ -209,20 +221,20 @@ public ApiResponse WorkloadDelete([CustomizeValidator(RuleSet = "Delete"), FromB
...
@@ -209,20 +221,20 @@ public ApiResponse WorkloadDelete([CustomizeValidator(RuleSet = "Delete"), FromB
/// <summary>
/// <summary>
/// 提交审核
/// 提交审核
/// </summary>
/// </summary>
/// <param name="
secondid
">二次绩效Id</param>
/// <param name="
request
">二次绩效Id</param>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
[
Route
(
"/api/second/audit/submit
/{secondid}
"
)]
[
Route
(
"/api/second/audit/submit"
)]
public
ApiResponse
SubmitAudit
(
int
secondid
)
public
ApiResponse
SubmitAudit
(
SubmitAuditRequest
request
)
{
{
var
second
=
secondAllotService
.
GetSecondallot
(
secondi
d
);
var
second
=
secondAllotService
.
GetSecondallot
(
request
.
SecondI
d
);
if
(
second
==
null
)
if
(
second
==
null
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"二次绩效Id无效"
);
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"二次绩效Id无效"
);
if
(
second
.
Status
==
3
)
if
(
second
.
Status
==
3
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"该绩效已\"审核通过\",无需再次提交"
);
return
new
ApiResponse
(
ResponseType
.
Fail
,
"该绩效已\"审核通过\",无需再次提交"
);
var
userid
=
claimService
.
GetUserId
();
var
userid
=
claimService
.
GetUserId
();
var
result
=
secondAllotService
.
AuditSubmit
(
second
);
var
result
=
secondAllotService
.
AuditSubmit
(
second
,
request
.
Type
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"提交成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"提交失败"
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"提交成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"提交失败"
);
}
}
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
e4f4af82
...
@@ -797,6 +797,12 @@
...
@@ -797,6 +797,12 @@
</summary>
</summary>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.SecondOtherDetail(System.Int32)"
>
<summary>
二次绩效录入页面配置信息
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.Temp(Performance.DtoModels.AllotDeptRequest)"
>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.Temp(Performance.DtoModels.AllotDeptRequest)"
>
<summary>
<summary>
选择二次绩效模板
选择二次绩效模板
...
@@ -839,11 +845,11 @@
...
@@ -839,11 +845,11 @@
</summary>
</summary>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.SubmitAudit(
System.Int32
)"
>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.SubmitAudit(
Performance.DtoModels.SubmitAuditRequest
)"
>
<summary>
<summary>
提交审核
提交审核
</summary>
</summary>
<param
name=
"
secondid
"
>
二次绩效Id
</param>
<param
name=
"
request
"
>
二次绩效Id
</param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.AuditList(Performance.DtoModels.AllotDeptRequest)"
>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.AuditList(Performance.DtoModels.AllotDeptRequest)"
>
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
e4f4af82
...
@@ -1634,6 +1634,11 @@
...
@@ -1634,6 +1634,11 @@
短信验证类型 1 手机号登录 2 其他
短信验证类型 1 手机号登录 2 其他
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.SubmitAuditRequest.Type"
>
<summary>
提交类型 1 模板提交 2 其他提交
</summary>
</member>
<member
name=
"P:Performance.DtoModels.UserRequest.RealName"
>
<member
name=
"P:Performance.DtoModels.UserRequest.RealName"
>
<summary>
<summary>
真实名称
真实名称
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
e4f4af82
...
@@ -708,6 +708,11 @@
...
@@ -708,6 +708,11 @@
状态 1 未提交 2 等待审核 3 审核通过 4 驳回
状态 1 未提交 2 等待审核 3 审核通过 4 驳回
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.ag_secondallot.SubmitType"
>
<summary>
提交类型 1使用模板 2 其他类型数据
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_secondallot.SubmitTime"
>
<member
name=
"P:Performance.EntityModels.ag_secondallot.SubmitTime"
>
<summary>
<summary>
提交时间
提交时间
...
...
performance/Performance.DtoModels/Request/SubmitAuditRequest.cs
0 → 100644
View file @
e4f4af82
using
FluentValidation
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
SubmitAuditRequest
{
public
int
SecondId
{
get
;
set
;
}
/// <summary>
/// 提交类型 1 模板提交 2 其他提交
/// </summary>
public
int
Type
{
get
;
set
;
}
}
public
class
SubmitAuditRequestValidator
:
AbstractValidator
<
SubmitAuditRequest
>
{
public
SubmitAuditRequestValidator
()
{
RuleFor
(
x
=>
x
.
Type
).
InclusiveBetween
(
1
,
2
);
RuleFor
(
x
=>
x
.
SecondId
).
GreaterThan
(
0
);
}
}
}
performance/Performance.EntityModels/Entity/ag_secondallot.cs
View file @
e4f4af82
...
@@ -55,6 +55,11 @@ public class ag_secondallot
...
@@ -55,6 +55,11 @@ public class ag_secondallot
/// 状态 1 未提交 2 等待审核 3 审核通过 4 驳回
/// 状态 1 未提交 2 等待审核 3 审核通过 4 驳回
/// </summary>
/// </summary>
public
Nullable
<
int
>
Status
{
get
;
set
;
}
public
Nullable
<
int
>
Status
{
get
;
set
;
}
/// <summary>
/// 提交类型 1使用模板 2 其他类型数据
/// </summary>
public
Nullable
<
int
>
SubmitType
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 提交时间
/// 提交时间
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
e4f4af82
...
@@ -224,6 +224,15 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
...
@@ -224,6 +224,15 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
}
}
/// <summary>
/// <summary>
/// 二次绩效详情
/// </summary>
/// <returns></returns>
public
List
<
ag_othersource
>
GetSecondDetail
(
int
secondid
)
{
var
others
=
perforAgothersourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondid
);
return
others
;
}
/// <summary>
/// 二次绩效项录入保存
/// 二次绩效项录入保存
/// </summary>
/// </summary>
/// <param name="request"></param>
/// <param name="request"></param>
...
@@ -576,9 +585,10 @@ public List<ag_secondallot> AuditList(int userId, int allotId)
...
@@ -576,9 +585,10 @@ public List<ag_secondallot> AuditList(int userId, int allotId)
/// <param name="userId">用户ID</param>
/// <param name="userId">用户ID</param>
/// <param name="secondId">二次绩效ID</param>
/// <param name="secondId">二次绩效ID</param>
/// <returns></returns>
/// <returns></returns>
public
bool
AuditSubmit
(
ag_secondallot
second
)
public
bool
AuditSubmit
(
ag_secondallot
second
,
int
submittype
)
{
{
second
.
Status
=
2
;
second
.
Status
=
2
;
second
.
SubmitType
=
submittype
;
second
.
SubmitTime
=
DateTime
.
Now
;
second
.
SubmitTime
=
DateTime
.
Now
;
second
.
Remark
=
"已提交审核,等待审核中"
;
second
.
Remark
=
"已提交审核,等待审核中"
;
return
perforAgsecondallotRepository
.
Update
(
second
);
return
perforAgsecondallotRepository
.
Update
(
second
);
...
@@ -612,42 +622,49 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
...
@@ -612,42 +622,49 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
if
(
result
&&
request
.
IsPass
==
1
)
if
(
result
&&
request
.
IsPass
==
1
)
{
{
var
computes
=
new
List
<
ag_compute
>();
var
computes
=
new
List
<
ag_compute
>();
var
items
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
);
if
(
second
.
SubmitType
==
1
)
if
(
items
!=
null
&&
items
.
Any
())
{
{
var
rowNumbers
=
items
.
Select
(
t
=>
t
.
RowNumber
).
Where
(
t
=>
t
>
0
)?.
Distinct
(
);
var
items
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
);
if
(
rowNumbers
!=
null
&&
rowNumber
s
.
Any
())
if
(
items
!=
null
&&
item
s
.
Any
())
{
{
foreach
(
var
item
in
rowNumbers
)
var
rowNumbers
=
items
.
Select
(
t
=>
t
.
RowNumber
).
Where
(
t
=>
t
>
0
)?.
Distinct
();
if
(
rowNumbers
!=
null
&&
rowNumbers
.
Any
())
{
{
computes
.
Add
(
new
ag_compute
foreach
(
var
item
in
rowNumbers
)
{
{
AllotId
=
second
.
AllotId
,
computes
.
Add
(
new
ag_compute
SecondId
=
second
.
Id
,
{
Department
=
second
.
Department
,
AllotId
=
second
.
AllotId
,
WorkPost
=
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"岗位"
)?.
ItemValue
,
SecondId
=
second
.
Id
,
PersonName
=
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"姓名"
)?.
ItemValue
,
Department
=
second
.
Department
,
RealGiveFee
=
ConvertHelper
.
TryDecimal
(
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"实发绩效工资金额"
)?.
ItemValue
,
0
),
WorkPost
=
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"岗位"
)?.
ItemValue
,
});
PersonName
=
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"姓名"
)?.
ItemValue
,
RealGiveFee
=
ConvertHelper
.
TryDecimal
(
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"实发绩效工资金额"
)?.
ItemValue
,
0
),
});
}
}
}
}
}
}
}
var
others
=
perforAgothersourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
);
else
if
(
second
.
SubmitType
==
2
)
if
(
others
!=
null
&&
others
.
Any
())
{
{
foreach
(
var
item
in
others
)
var
others
=
perforAgothersourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
);
if
(
others
!=
null
&&
others
.
Any
())
{
{
computes
.
Add
(
new
ag_compute
foreach
(
var
item
in
others
)
{
{
AllotId
=
second
.
AllotId
,
computes
.
Add
(
new
ag_compute
SecondId
=
second
.
Id
,
{
Department
=
item
.
Department
,
AllotId
=
second
.
AllotId
,
WorkPost
=
item
.
WorkPost
,
SecondId
=
second
.
Id
,
PersonName
=
item
.
Name
,
Department
=
item
.
Department
,
RealGiveFee
=
item
.
Amount
,
WorkPost
=
item
.
WorkPost
,
});
PersonName
=
item
.
Name
,
RealGiveFee
=
item
.
Amount
,
});
}
}
}
}
}
perforAgcomputeRepository
.
AddRange
(
computes
.
ToArray
());
perforAgcomputeRepository
.
AddRange
(
computes
.
ToArray
());
}
}
...
...
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