From 41a1dfc3a2b29c79585f5cb6e7d79cfcdfd044a9 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期四, 24 十月 2024 14:43:50 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/基础资料/基础资料/Gy_SOPBillEditController.cs | 53 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 47 insertions(+), 6 deletions(-) diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillEditController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillEditController.cs" index 465324f..9a84f8b 100644 --- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillEditController.cs" +++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillEditController.cs" @@ -27,7 +27,9 @@ public DAL.ClsGy_SOPBill BillOld = new DAL.ClsGy_SOPBill(); public bool BillChange; // public DataGridView grdMain = new System.Windows.Forms.DataGridView(); - ClsGridViewSum oSumGrid = new ClsGridViewSum(); + ClsGridViewSum oSumGrid = new ClsGridViewSum(); + //鑾峰彇绯荤粺鍙傛暟 + Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); //瀹氫箟 public const Int16 HTagCol = 0; @@ -256,6 +258,7 @@ string msgSub = sArray[1].ToString(); //琛ㄤ綋淇℃伅 string OperationType = sArray[2].ToString(); //鎿嶄綔绫诲瀷 string user = sArray[3].ToString(); //鐢ㄦ埛 + DBUtility.ClsPub.CurUserName = user; ListModels oListModels = new ListModels(); DAL.ClsGy_SOPBill oBill = new DAL.ClsGy_SOPBill(); @@ -375,12 +378,23 @@ [HttpPost] public object UploadFile1() { - + string path=""; string HBillNo = HttpContext.Current.Request.Params["HBillNo"]; //鍗曟嵁鍙� string HUserName = HttpContext.Current.Request.Params["HUserName"]; //鍒涘缓浜� string HInterID = HttpContext.Current.Request.Params["HInterID"]; //鍗曟嵁鍐呯爜 HttpPostedFile files = HttpContext.Current.Request.Files["file"]; //鏂囦欢 - string path = HttpContext.Current.Server.MapPath("~/../Files/SOP/" + HBillNo); + string Ret = ""; + if (oSystemParameter.ShowBill(ref Ret)) + { + if (oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�") + { + path = "D:/缃戠珯鍙戝竷/MES/MES娴嬭瘯/LAYUI/Files/SOP/" + HBillNo; + } + else + { + path = HttpContext.Current.Server.MapPath("~/../Files/SOP/" + HBillNo); + } + } //string path = @"D:\\Files\\"+ HBillNo; Int64 HEntryID = Convert.ToInt64(HttpContext.Current.Request.Params["HEntryID"]); //瀛愬唴鐮� dynamic dyResult = UpLoadFile(files, path, HBillNo, HInterID, HUserName, HEntryID); @@ -456,7 +470,20 @@ { File.Delete(fileurl); //鍒犻櫎鎸囧畾鏂囦欢 files.SaveAs(fileurl); - string StrPath = "/files/SOP/" + HBillNo + "/" + filename; + string StrPath = ""; + string Ret = ""; + if (oSystemParameter.ShowBill(ref Ret)) + { + if (oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�") + { + StrPath = "D:/缃戠珯鍙戝竷/MES/MES娴嬭瘯/LAYUI/Files/SOP/" + HBillNo + "/" + filename; + } + else + { + StrPath = "/files/SOP/" + HBillNo + "/" + filename; + } + } + if (File.Exists(fileurl)) { //杩欓噷鍙互鎵ц涓�浜涘叾瀹冪殑鎿嶄綔锛屾瘮濡傛洿鏂版暟鎹簱 @@ -476,8 +503,22 @@ else { Directory.CreateDirectory(fileSavePath); //娣诲姞鏂囦欢澶� - files.SaveAs(fileurl); - string StrPath = "/files/SOP/" + HBillNo + "/" + filename; + files.SaveAs(fileurl); + string StrPath = ""; + string Ret = ""; + //if (oSystemParameter.ShowBill(ref Ret)) + //{ + // if (oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�") + // { + // StrPath = "D:/缃戠珯鍙戝竷/MES/MES娴嬭瘯/LAYUI/Files/SOP/" + HBillNo + "/" + filename; + // } + // else + // { + // StrPath = "/files/SOP/" + HBillNo + "/" + filename; + // } + //} + StrPath = "/files/SOP/" + HBillNo + "/" + filename; + if (File.Exists(fileurl)) { //杩欓噷鍙互鎵ц涓�浜涘叾瀹冪殑鎿嶄綔锛屾瘮濡傛洿鏂版暟鎹簱 -- Gitblit v1.9.1