yusijie
2023-09-25 95255ca3442f07dee956391309b4f7b8001fc599
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/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