Commit 51c87ad8 by 纪旭 韦

手工录入删除多余实体类

parent 2569411f
...@@ -1052,22 +1052,22 @@ public ApiResponse AuditGather([FromBody] List<Gather> gather) ...@@ -1052,22 +1052,22 @@ public ApiResponse AuditGather([FromBody] List<Gather> gather)
/// <summary> /// <summary>
/// 上传手工录入文件 /// 上传手工录入文件
/// </summary> /// </summary>
/// <param name="gatherGroup"></param> /// <param name="gather"></param>
/// <param name="file"></param> /// <param name="file"></param>
/// <returns></returns> /// <returns></returns>
[Route("uploadgatherfile")] [Route("uploadgatherfile")]
[HttpPost] [HttpPost]
public ApiResponse UploadGatherFile([FromForm] GatherGroup gatherGroup, [FromForm] IFormFile file) public ApiResponse UploadGatherFile([FromForm] Gather gather, [FromForm] IFormFile file)
{ {
if (!file.FileName.EndsWith(".xlsx")) if (!file.FileName.EndsWith(".xlsx"))
return new ApiResponse(ResponseType.Fail, "请上传xlsx文件"); return new ApiResponse(ResponseType.Fail, "请上传xlsx文件");
var dpath = Path.Combine(evn.ContentRootPath, "Files", "GatherFile"); var dpath = Path.Combine(evn.ContentRootPath, "Files", "GatherFile");
FileHelper.CreateDirectory(dpath); FileHelper.CreateDirectory(dpath);
var fileName = string.Concat(gatherGroup.source, gatherGroup.category, gatherGroup.department, Path.GetFileName(file.FileName)); var fileName = string.Concat(gather.Source, gather.Category, gather.Department, Path.GetFileName(file.FileName));
string path = Path.Combine(dpath, fileName); string path = Path.Combine(dpath, fileName);
var result = employeeService.UploadGatherFile(path, gatherGroup); var result = employeeService.UploadGatherFile(path, gather);
if (!string.IsNullOrEmpty(result)) if (!string.IsNullOrEmpty(result))
return new ApiResponse(ResponseType.Fail, result); return new ApiResponse(ResponseType.Fail, result);
......
...@@ -1402,11 +1402,11 @@ ...@@ -1402,11 +1402,11 @@
<param name="gather"></param> <param name="gather"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.EmployeeController.UploadGatherFile(Performance.DtoModels.GatherGroup,Microsoft.AspNetCore.Http.IFormFile)"> <member name="M:Performance.Api.Controllers.EmployeeController.UploadGatherFile(Performance.DtoModels.Gather,Microsoft.AspNetCore.Http.IFormFile)">
<summary> <summary>
上传手工录入文件 上传手工录入文件
</summary> </summary>
<param name="gatherGroup"></param> <param name="gather"></param>
<param name="file"></param> <param name="file"></param>
<returns></returns> <returns></returns>
</member> </member>
......
...@@ -94,13 +94,4 @@ public class GatherInfoFee ...@@ -94,13 +94,4 @@ public class GatherInfoFee
public decimal? Fee { get; set; } 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; }
}
} }
...@@ -1571,9 +1571,9 @@ public GatherResponse GetGatherTotal(Gather gather) ...@@ -1571,9 +1571,9 @@ public GatherResponse GetGatherTotal(Gather gather)
return gatherResponse; return gatherResponse;
} }
public string UploadGatherFile(string path, GatherGroup gatherGroup) public string UploadGatherFile(string path, Gather gather)
{ {
var datas = exresultgatherRepository.GetEntities(w => w.AllotId == gatherGroup.allotid && w.Department == gatherGroup.department && w.Source == gatherGroup.source && w.Category == gatherGroup.category); var datas = exresultgatherRepository.GetEntities(w => w.AllotId == gather.AllotId && w.Department == gather.Department && w.Source == gather.Source && w.Category == gather.Category);
if (datas?.Any() != true) if (datas?.Any() != true)
return "未找到核算项目信息"; return "未找到核算项目信息";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment