From cafb014bc14dcb41204019da81e4708472e31a47 Mon Sep 17 00:00:00 2001 From: lilili Date: Fri, 24 Mar 2023 16:21:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=8A=E4=BC=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WMS-BS/NFine.Application/WMS/PickMaterialApp.cs | 2 +- .../NFine.Web/Areas/WMS/Controllers/HomeWorkController.cs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs index 4c7489d..ea140d5 100644 --- a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs +++ b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs @@ -461,7 +461,7 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'"; //left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint //left join ICSMOPickMerge e on a.ID=e.SourceID and a.WorkPoint=e.WorkPoint"; // sql += " WHERE 1=1 and a.Type='1' and e.ID is null"; - sqlString.Append($@"SELECT a.SDNCode AS CODE, + sqlString.Append($@"SELECT a.SDNCode AS Code, a.CreateDateTime AS MTIME, a.CreatePerson AS MUSER, (CASE WHEN max(e.SourceID) IS NULL THEN '未合并' ELSE '已合并' END) AS IsNew, diff --git a/WMS-BS/NFine.Web/Areas/WMS/Controllers/HomeWorkController.cs b/WMS-BS/NFine.Web/Areas/WMS/Controllers/HomeWorkController.cs index 3e695c3..3eee92e 100644 --- a/WMS-BS/NFine.Web/Areas/WMS/Controllers/HomeWorkController.cs +++ b/WMS-BS/NFine.Web/Areas/WMS/Controllers/HomeWorkController.cs @@ -50,7 +50,12 @@ namespace NFine.Web.Areas.WMS.Controllers return "只可以选择Excel(.xls .xlsx)文件";//当选择的不是Excel文件时,返回 } string filename = DateTime.Now.ToString("yyyyMMddhhmmss") + UPLoadType + IsXls; //获取Execle文件名 DateTime日期函数 - string savePath = System.Web.HttpContext.Current.Server.MapPath("~\\File\\UPLoadFile\\" + filename);//Server.MapPath 获得虚拟服务器相对路径 + var folder = System.Web.HttpContext.Current.Server.MapPath("~\\File\\UPLoadFile"); //Server.MapPath 获得虚拟服务器相对路径 + if(!Directory.Exists(folder)) + Directory.CreateDirectory(folder); + string savePath = Path.Combine(folder, filename); + + int iLen = hpFiles[0].ContentLength; if (Directory.Exists(savePath)) return "文件已存在";