From 08394a65cb0c63068ea93e3ba1a15d23ed25e435 Mon Sep 17 00:00:00 2001
From: zgq <519541279@qq.com>
Date: 星期五, 18 六月 2021 13:38:21 +0800
Subject: [PATCH] nothing

---
 WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs |   29 ++++++++++++++++-------------
 1 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
index 38726d4..cc304cb 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -22,13 +22,13 @@
         DataSet ds;
         DataSet ds1;
         string fileip = System.Configuration.ConfigurationManager.AppSettings["FileIP"];
-      
-    /// <summary>
-    /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
-    ///鍙傛暟锛歴tring sql銆�
-    ///杩斿洖鍊硷細object銆�
-    /// </summary>
-    [Route("Cj_StationOutBill/AddBill")]
+
+        /// <summary>
+        /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Cj_StationOutBill/AddBill")]
         [HttpPost]
         public object AddBill([FromBody] JObject oMain)
         {
@@ -484,7 +484,10 @@
             string HRemark = HttpContext.Current.Request.Params["HRemark"];  //澶囨敞
             string HUserName = HttpContext.Current.Request.Params["HUserName"];  //鍒涘缓浜�
             HttpPostedFile files = HttpContext.Current.Request.Files["file"];
-            string path = HttpContext.Current.Server.MapPath("~/Files/" + HBillNo);
+            string path = HttpContext.Current.Server.MapPath("~/../Files/" + HBillNo);
+            //string path = @"C:\\files\\" + HBillNo;
+            //string path = HttpContext.Current.Server.MapPath(filePath + HBillNo);
+            //filePath
             dynamic dyResult = UpLoadFile(files, path, HBillNo, HRemark, HUserName);
             if (dyResult != null && dyResult.result == 1)
             {
@@ -539,7 +542,7 @@
                 {
                     File.Delete(fileurl);      //鍒犻櫎鎸囧畾鏂囦欢
                     files.SaveAs(fileurl);
-                    string StrPath = "/Files/"+ HBillNo+"/"+ filename;
+                    string StrPath = "/files/"+ HBillNo+"/"+ filename;
                     if (File.Exists(fileurl)) 
                     {
                         //杩欓噷鍙互鎵ц涓�浜涘叾瀹冪殑鎿嶄綔锛屾瘮濡傛洿鏂版暟鎹簱
@@ -562,7 +565,7 @@
                 {
                     Directory.CreateDirectory(fileSavePath); //娣诲姞鏂囦欢澶�
                     files.SaveAs(fileurl);
-                    string StrPath = "/Files/" + HBillNo + "/" + filename;
+                    string StrPath = "/files/" + HBillNo + "/" + filename;
                     if (File.Exists(fileurl))
                     {
                         //杩欓噷鍙互鎵ц涓�浜涘叾瀹冪殑鎿嶄綔锛屾瘮濡傛洿鏂版暟鎹簱
@@ -612,10 +615,11 @@
         [HttpGet]
         public object Filelist(string HBillNo)
         {
-            var url = fileip + "/Files/" + HBillNo+"/";
+            var url = fileip + "/files/" + HBillNo+"/";
+            //@"C:\\files\\"
             try
             {
-                ds = oCN.RunProcReturn("select *,'" + url + "'+CAST(HFileName as varchar(200))as url  from MES_AccessoriesList where HSourceBillNo=" + HBillNo, "MES_AccessoriesList");
+                ds = oCN.RunProcReturn("select *,'" + url + "'+CAST(HFileName as varchar(200))as url  from MES_AccessoriesList where HSourceBillNo='" + HBillNo+"'", "MES_AccessoriesList");
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
                 objJsonResult.Message = "Sucess锛�";
@@ -653,7 +657,6 @@
                 objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
                 objJsonResult.data = null;
                 return objJsonResult;
-
             }
             catch (Exception e)
             {

--
Gitblit v1.9.1