From 6356d547e2058a7ab12e384330155dd95bc5928d Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期四, 18 八月 2022 09:39:05 +0800
Subject: [PATCH] 设备点检标准(关联设备查询、提交)接口开发 设备保养标准(查询、新增、编辑、删除、查看、关联设备查询、关联设备提交)接口开发
---
VueWebApi/Controllers/ImportExcelController.cs | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/VueWebApi/Controllers/ImportExcelController.cs b/VueWebApi/Controllers/ImportExcelController.cs
index 546bdaf..87c3f42 100644
--- a/VueWebApi/Controllers/ImportExcelController.cs
+++ b/VueWebApi/Controllers/ImportExcelController.cs
@@ -49,8 +49,8 @@
/// <summary>
/// Excel瀵煎叆鏂囦欢涓婁紶銆佹ā鏉块獙璇併�佹暟鎹噺銆侀獙璇�
/// </summary>
- /// <param name="files">涓婁紶鏂囦欢</param>
/// <param name="FileCode">鏂囦欢缂栫爜</param>
+ /// <param name="files">涓婁紶鏂囦欢</param>
/// <returns></returns>
[Route(template: "ExcelModelCheck")]
[HttpPost]
@@ -114,6 +114,9 @@
else if (Directory.Exists(path) == false)//濡傛灉涓嶅瓨鍦ㄥ氨鍒涘缓file鏂囦欢澶�
{
Directory.CreateDirectory(path); //娣诲姞鏂囦欢澶�
+ files.SaveAs(savePath); //灏嗛�夋嫨鐨勬枃浠朵繚瀛樺埌鎸囧畾鏂囦欢澶逛笅
+ mes.code = "200";
+ mes.Message = "鏂囦欢涓婁紶鎴愬姛锛�";
}
else if (Directory.Exists(savePath) == true) //濡傛灉瀛樺湪閲嶅悕鏂囦欢灏辨彁绀�
{
@@ -264,7 +267,8 @@
/// <param name="FileCode">鏂囦欢缂栫爜</param>
/// <param name="FileName">鏂囦欢鍚嶇О</param>
/// <returns></returns>
- [HiddenApi]
+ [Route(template: "ExcelCheckData")]
+ [HttpPost]
public HttpResponseMessage ExcelCheckData(string FileCode = null, string FileName = null)
{
string message = "";
@@ -296,7 +300,8 @@
/// <param name="FileCode">鏂囦欢缂栫爜</param>
/// <param name="FileName">鏂囦欢鍚嶇О</param>
/// <returns></returns>
- [HiddenApi]
+ [Route(template: "ExcelImportSubmit")]
+ [HttpPost]
public HttpResponseMessage ExcelImportSubmit(string FileCode = null, string FileName = null)
{
var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鐧诲綍鐢ㄦ埛鍚�
--
Gitblit v1.9.3