From e92159ced07a57501e0f801a6d657c5979002ca4 Mon Sep 17 00:00:00 2001
From: cwjbxqmz <1134865194@qq.com>
Date: 星期三, 27 九月 2023 09:58:18 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/基础资料/基础资料/Gy_SOPBillEditController.cs |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 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 eb1dc4a..bea0792 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"
@@ -147,6 +147,7 @@
                 List<SOPBill> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SOPBill>>(msg2);
 
                 string HBillNo = list[0].HBillNo;
+                int HInterID = list[0].HInterID;
                 DateTime HDate = list[0].HDate;
                 string HName = list[0].HName;
                 int HMaterID = list[0].HMaterID;
@@ -200,12 +201,12 @@
                  ",HYear,HPeriod,HRemark,HMaker,Hmakedate,HMaterID,HName,HMaterTypeID" +
                  ",HUnitID,HMaterNumber,HUnitNumber,HStandard" +
                  ") " +
-                  " values('" + 3305 + "'," + lID + ",'" + HBillNo + "'," + "getdate()" +
+                  " values('" + 3305 + "'," + HInterID + ",'" + HBillNo + "'," + "getdate()" +
                 "," + "datepart(yyyy,GETDATE())" + "," + "datepart(mm,getdate())" + ",'" + HRemark + "','" + HMaker + "'," + "getdate()" + "," + HMaterID.ToString() + ",'" + HName + "'," + HMaterTypeID +
                 "," + HUnitID.ToString() + ",'" + HMaterNumber + "','" + HUnitNumber + "','" + HStandard.ToString() +
                 "') ");
             
-                oCN.RunProc("update Gy_BillNumber set IDNow=IDNow+1 where BillType='" + BillType.Trim() + "'");
+                //oCN.RunProc("update Gy_BillNumber set IDNow=IDNow+1 where BillType='" + BillType.Trim() + "'");
                 //" values(" + 3305 + "','" + 12333 + "','" + "test" + "','" + HDate + "','" +
                 //2022 + "','" + 11 + "','" + HRemark + "','" + "Test" + "','" + "2022-11-04" + "','" + HMaterID.ToString() + "','" + HName + "','" + "656" +
                 //"','" + HUnitID.ToString() + "','" + HMaterNumber + "','" + HUnitNumber + "','" + HStandard.ToString() +
@@ -218,7 +219,7 @@
                 "(HInterID,HEntryID,HProcID,HProcNO" +
                 ",HWorkStationID,HCenterID,HRemark" +
                 ") values("
-                + lID + "," + 1 + "," + HProcID + "," + HProcNo +
+                + HInterID + "," + 1 + "," + HProcID + "," + HProcNo +
                 "," + HWorkStationID + "," + HCenterID + ",'" + HRemark2 + "'" +
                 ") ");
               
@@ -290,12 +291,12 @@
         {
 
             string HBillNo = HttpContext.Current.Request.Params["HBillNo"];  //鍗曟嵁鍙�
-            string HRemark = HttpContext.Current.Request.Params["HRemark"];  //澶囨敞
             string HUserName = HttpContext.Current.Request.Params["HUserName"];  //鍒涘缓浜�
-            HttpPostedFile files = HttpContext.Current.Request.Files["file"];
+            string HInterID = HttpContext.Current.Request.Params["HInterID"];  //鍒涘缓浜�
+            HttpPostedFile files = HttpContext.Current.Request.Files["file"]; //鍗曟嵁涓诲唴鐮�
             string path = HttpContext.Current.Server.MapPath("~/../Files/" + HBillNo);
             //string path = @"D:\\Files\\"+ HBillNo;
-            dynamic dyResult = UpLoadFile(files, path, HBillNo, HRemark, HUserName);
+            dynamic dyResult = UpLoadFile(files, path, HBillNo, HInterID, HUserName);
             if (dyResult != null && dyResult.result == 1)
             {
                 objJsonResult.code = "1";
@@ -315,7 +316,7 @@
 
         }
 
-        public dynamic UpLoadFile(HttpPostedFile files, string path, string HBillNo, string HRemark, string HUserName)
+        public dynamic UpLoadFile(HttpPostedFile files, string path, string HBillNo, string HInterID, string HUserName)
         {
             dynamic Result_Ob = new { result = 1, returnval = "涓婁紶鎴愬姛锛�" };
             string filePath = Path.GetFullPath(files.FileName);//鏂囦欢涓婁紶璺緞
@@ -378,7 +379,7 @@
                                ",HUpMan,HUpTime,HInterID,HEntryID,HSno,HFileID,HFileSize" +
                               ") values('"
                                + filename.ToString() + "','" + filePath.ToString() + "','" +  fileExtension.ToString() + "'" +
-                               ",'" + HUserName + "',getdate()"  + ",'" + Sno + "','" + 0 + "','" + Sno + "','" + lID + "','" + 0 +
+                               ",'" + HUserName + "',getdate()"  + ",'" + HInterID + "','" + 0 + "','" + Sno + "','" + lID + "','" + 0 +
                         "') ");
                     }
                     else
@@ -399,7 +400,7 @@
                                      ",HUpMan,HUpTime,HInterID,HEntryID,HSno,HFileID,HFileSize" +
                                     ") values('"
                                      + filename.ToString() + "','" + filePath.ToString() + "','" + fileExtension.ToString() + "'" +
-                                     ",'" + HUserName + "',getdate()" + ",'" + 111 + "','" + 222 + "','" + 333 + "','" + 444 + "','" + 555 +
+                                     ",'" + HUserName + "',getdate()" + ",'" + HInterID + "','" + 222 + "','" + 333 + "','" + 444 + "','" + 555 +
                                     "') ");
                     }
                     else

--
Gitblit v1.9.1