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
51c87ad8
Commit
51c87ad8
authored
Sep 06, 2022
by
纪旭 韦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
手工录入删除多余实体类
parent
2569411f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
17 deletions
+8
-17
performance/Performance.Api/Controllers/EmployeeController.cs
+4
-4
performance/Performance.Api/wwwroot/Performance.Api.xml
+2
-2
performance/Performance.DtoModels/Response/GatherResponse.cs
+0
-9
performance/Performance.Services/EmployeeService.cs
+2
-2
No files found.
performance/Performance.Api/Controllers/EmployeeController.cs
View file @
51c87ad8
...
...
@@ -1052,22 +1052,22 @@ public ApiResponse AuditGather([FromBody] List<Gather> gather)
/// <summary>
/// 上传手工录入文件
/// </summary>
/// <param name="gather
Group
"></param>
/// <param name="gather"></param>
/// <param name="file"></param>
/// <returns></returns>
[
Route
(
"uploadgatherfile"
)]
[
HttpPost
]
public
ApiResponse
UploadGatherFile
([
FromForm
]
Gather
Group
gatherGroup
,
[
FromForm
]
IFormFile
file
)
public
ApiResponse
UploadGatherFile
([
FromForm
]
Gather
gather
,
[
FromForm
]
IFormFile
file
)
{
if
(!
file
.
FileName
.
EndsWith
(
".xlsx"
))
return
new
ApiResponse
(
ResponseType
.
Fail
,
"请上传xlsx文件"
);
var
dpath
=
Path
.
Combine
(
evn
.
ContentRootPath
,
"Files"
,
"GatherFile"
);
FileHelper
.
CreateDirectory
(
dpath
);
var
fileName
=
string
.
Concat
(
gather
Group
.
source
,
gatherGroup
.
category
,
gatherGroup
.
d
epartment
,
Path
.
GetFileName
(
file
.
FileName
));
var
fileName
=
string
.
Concat
(
gather
.
Source
,
gather
.
Category
,
gather
.
D
epartment
,
Path
.
GetFileName
(
file
.
FileName
));
string
path
=
Path
.
Combine
(
dpath
,
fileName
);
var
result
=
employeeService
.
UploadGatherFile
(
path
,
gather
Group
);
var
result
=
employeeService
.
UploadGatherFile
(
path
,
gather
);
if
(!
string
.
IsNullOrEmpty
(
result
))
return
new
ApiResponse
(
ResponseType
.
Fail
,
result
);
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
51c87ad8
...
...
@@ -1402,11 +1402,11 @@
<param
name=
"gather"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.UploadGatherFile(Performance.DtoModels.Gather
Group
,Microsoft.AspNetCore.Http.IFormFile)"
>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.UploadGatherFile(Performance.DtoModels.Gather,Microsoft.AspNetCore.Http.IFormFile)"
>
<summary>
上传手工录入文件
</summary>
<param
name=
"gather
Group
"
></param>
<param
name=
"gather"
></param>
<param
name=
"file"
></param>
<returns></returns>
</member>
...
...
performance/Performance.DtoModels/Response/GatherResponse.cs
View file @
51c87ad8
...
...
@@ -94,13 +94,4 @@ public class GatherInfoFee
public
decimal
?
Fee
{
get
;
set
;
}
}
public
class
GatherGroup
{
public
int
allotid
{
get
;
set
;
}
public
string
department
{
get
;
set
;
}
public
string
source
{
get
;
set
;
}
public
string
category
{
get
;
set
;
}
}
}
performance/Performance.Services/EmployeeService.cs
View file @
51c87ad8
...
...
@@ -1571,9 +1571,9 @@ public GatherResponse GetGatherTotal(Gather gather)
return
gatherResponse
;
}
public
string
UploadGatherFile
(
string
path
,
Gather
Group
gatherGroup
)
public
string
UploadGatherFile
(
string
path
,
Gather
gather
)
{
var
datas
=
exresultgatherRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
gather
Group
.
allotid
&&
w
.
Department
==
gatherGroup
.
department
&&
w
.
Source
==
gatherGroup
.
source
&&
w
.
Category
==
gatherGroup
.
c
ategory
);
var
datas
=
exresultgatherRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
gather
.
AllotId
&&
w
.
Department
==
gather
.
Department
&&
w
.
Source
==
gather
.
Source
&&
w
.
Category
==
gather
.
C
ategory
);
if
(
datas
?.
Any
()
!=
true
)
return
"未找到核算项目信息"
;
...
...
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