下载模板文件

parent e944b8f7
......@@ -58,7 +58,7 @@ public class TemplateController : Controller
}
/// <summary>
/// 从WebAPI下载模板
/// 从WebAPI下载模板 1、医院绩效模板 2、医院二次分配绩效模板 3、医院绩效模板(无执行科室)
/// </summary>
/// <returns></returns>
[Route("downtemplate")]
......@@ -66,9 +66,19 @@ public class TemplateController : Controller
[AllowAnonymous]
public IActionResult DownFile(int type = 1)
{
string path = (type == 1)
? Path.Combine(env.ContentRootPath, "Template", "医院绩效模板.xlsx")
: Path.Combine(env.ContentRootPath, "Template", "医院二次分配绩效模板.xlsx");
string path = "";
switch (type)
{
case 1:
path = Path.Combine(env.ContentRootPath, "Template", "医院绩效模板.xlsx");
break;
case 2:
path = Path.Combine(env.ContentRootPath, "Template", "医院二次分配绩效模板.xlsx");
break;
case 3:
path = Path.Combine(env.ContentRootPath, "Template", "医院绩效模板(无执行科室).xlsx");
break;
}
var memoryStream = new MemoryStream();
using (var stream = new FileStream(path, FileMode.Open))
......@@ -343,7 +353,7 @@ public ApiResponse SaveFile([FromForm] IFormCollection form, int allotId, int ho
{
logger.LogInformation($"保存提取文件异常{ex.ToString()}");
LogHelper.Error($"保存失败:" + ex.ToString(), "保存提取文件");
return new ApiResponse(ResponseType.Error,ex.Message);
return new ApiResponse(ResponseType.Error, ex.Message);
}
}
}
......
......@@ -27,6 +27,10 @@
</ItemGroup>
<ItemGroup>
<None Remove="Template\~%24医院绩效模板.xlsx" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="8.0.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="6.0.0" />
<PackageReference Include="CSRedisCore" Version="3.0.45" />
......
......@@ -690,7 +690,7 @@
</member>
<member name="M:Performance.Api.Controllers.TemplateController.DownFile(System.Int32)">
<summary>
从WebAPI下载模板
从WebAPI下载模板 1、医院绩效模板 2、医院二次分配绩效模板 3、医院绩效模板(无执行科室)
</summary>
<returns></returns>
</member>
......
......@@ -98,7 +98,7 @@ private PerExcel Import(per_allot allot)
}
else
{
if (sheet.SheetName.Contains("开单医院"))
if (sheet.SheetName.Contains("无执行科室"))
isnew = true;
}
}
......
......@@ -9,7 +9,7 @@
namespace Performance.Services
{
/// <summary>
/// 开单医院收入
/// 无执行科室医院收入
/// </summary>
public class PerSheetDataReadBillIncome : IPerSheetDataRead
{
......
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