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
84c9441d
Commit
84c9441d
authored
Jul 27, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加审核驳回接口
parent
0d6c172a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
0 deletions
+48
-0
performance/Performance.Api/Controllers/CollectController.cs
+15
-0
performance/Performance.DtoModels/Request/CollectAuditRequest.cs
+14
-0
performance/Performance.Services/CollectService.cs
+19
-0
No files found.
performance/Performance.Api/Controllers/CollectController.cs
View file @
84c9441d
...
...
@@ -169,5 +169,20 @@ public ApiResponse DepartmentList(int allotId, [FromQuery] int userId)
var
data
=
collectService
.
DepartmentList
(
allotId
,
userId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
data
);
}
/// <summary>
/// 提交数据审核
/// </summary>
[
HttpPost
]
[
Route
(
"collectdataaudit"
)]
public
ApiResponse
CollectDataAudit
([
FromBody
]
CollectAuditRequest
request
)
{
if
(
request
==
null
||
request
.
AllotId
<=
0
||
request
.
UserId
<=
0
||
new
int
[]
{
3
,
4
}.
Contains
(
request
.
Status
))
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数无效"
);
var
result
=
collectService
.
CollectDataAudit
(
request
.
AllotId
,
request
.
Status
,
request
.
Status
);
string
remark
=
request
.
Status
==
3
?
"审核通过"
:
"驳回成功"
;
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
remark
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"操作失败"
);
}
}
}
performance/Performance.DtoModels/Request/CollectAuditRequest.cs
0 → 100644
View file @
84c9441d
namespace
Performance.DtoModels
{
public
class
CollectAuditRequest
{
public
int
AllotId
{
get
;
set
;
}
public
int
UserId
{
get
;
set
;
}
/// <summary>
/// 3 审核通过 4 驳回
/// </summary>
public
int
Status
{
get
;
set
;
}
}
}
performance/Performance.Services/CollectService.cs
View file @
84c9441d
...
...
@@ -955,6 +955,25 @@ public HandsonTableBase DepartmentList(int allotId, int userId)
return
table
;
}
/// <summary>
/// 提交数据审核
/// </summary>
/// <param name="allotId"></param>
/// <param name="userId"></param>
/// <param name="status"></param>
public
bool
CollectDataAudit
(
int
allotId
,
int
userId
,
int
status
)
{
var
data
=
perforcollectdataRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
t
.
SubmitUser
==
userId
);
if
(
data
==
null
||
!
data
.
Any
())
return
true
;
data
.
ForEach
(
t
=>
{
t
.
Status
=
status
;
});
return
perforcollectdataRepository
.
UpdateRange
(
data
.
ToArray
());
}
}
public
class
CollectDataConfig
...
...
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