llj
23 小时以前 a91fdba94705dd25cecccc7a4a5dcc2b3f2c09a6
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -2070,7 +2070,6 @@
                    return objJsonResult;
                }
                sWhere = sWhere.Replace("'", "''");
                if (sWhere == null || sWhere.Equals(""))
                {
@@ -2078,6 +2077,7 @@
                }
                else
                {
                    sWhere = sWhere.Replace("'", "''");
                    ds = oCN.RunProcReturn("exec h_p_IF_SellOutBillList " + page + "," + size + ",'" + Organization + "','" + sWhere + "'", "h_p_IF_SellOutBillList");
                }
@@ -2089,12 +2089,24 @@
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
                objJsonResult.Message = "Sucess!";
                objJsonResult.list = columnNameList;
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
                if(ds.Tables[0].Rows.Count > 0)
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.list = columnNameList;
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.list = columnNameList;
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception ex)
            {
@@ -15641,12 +15653,23 @@
        [HttpPost]
        public object UploadFile_Gy_QCVerification()
        {
            string path = "";
            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 path = HttpContext.Current.Server.MapPath("~/../Files/Gy_QCVerification/" + HBillNo);
            HttpPostedFile files = HttpContext.Current.Request.Files["file"];
            string Ret = "";
            if (oSystemParameter.ShowBill(ref Ret))
            {
                if (oSystemParameter.omodel.WMS_CampanyName == "凯贝奈特")
                {
                    path = "D:/网站发布/LAYUI/Files/Gy_QCVerification/" + HBillNo;
                }
                else
                {
                    path = HttpContext.Current.Server.MapPath("~/../Files/Gy_QCVerification/" + HBillNo);
                }
            }
            dynamic dyResult = UploadFile_Gy_QCVerification(files, path, HBillNo, HRemark, HUserName);
            if (dyResult != null && dyResult.result == 1)
            {
@@ -15701,7 +15724,20 @@
                {
                    File.Delete(fileurl);      //删除指定文件
                    files.SaveAs(fileurl);
                    string StrPath = "/files/Gy_QCVerification/" + HBillNo + "/" + filename;
                    string StrPath = "";
                    string Ret = "";
                    if (oSystemParameter.ShowBill(ref Ret))
                    {
                        if (oSystemParameter.omodel.WMS_CampanyName == "凯贝奈特")
                        {
                            StrPath = "D:/网站发布/LAYUI/Files/Gy_QCVerification/" + HBillNo + "/" + filename;
                        }
                        else
                        {
                            StrPath = "/files/Gy_QCVerification/" + HBillNo + "/" + filename;
                        }
                    }
                    if (File.Exists(fileurl))
                    {
                        //这里可以执行一些其它的操作,比如更新数据库
@@ -15761,8 +15797,19 @@
        [HttpGet]
        public object Gy_QCVerification_Filelist(string HBillNo)
        {
            var url = fileip + "/Files/Gy_QCVerification/" + HBillNo + "/";
            string Ret = "";
            var url = "";
            if (oSystemParameter.ShowBill(ref Ret))
            {
                if (oSystemParameter.omodel.WMS_CampanyName == "凯贝奈特")
                {
                    url = "D:/网站发布/LAYUI/Files/Gy_QCVerification/" + HBillNo + "/";
                }
                else
                {
                    url = fileip + "/Files/Gy_QCVerification/" + HBillNo + "/";
                }
            }
            try
            {
                ds = oCN.RunProcReturn("select *,'" + url + "'+CAST(HFileName as varchar(200))as url  from MES_AccessoriesList where HSourceBillNo='" + HBillNo + "'", "MES_AccessoriesList");
@@ -15814,6 +15861,8 @@
            }
        }
        #endregion
        #endregion