WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -4016,7 +4016,7 @@
        #region [模具档案批量生成]
        [Route("Gy_Mould/SaveBatchGen_MouldFile")]
        [HttpGet]
        public object SaveBatchGen_MouldFile(long HInterID, string StarNum, string EndNum)
        public object SaveBatchGen_MouldFile(long HInterID, string StarNum, string EndNum,string user)
        {
            int StarNum1 = int.Parse(StarNum);
            int EndNum1 = int.Parse(EndNum);
@@ -4069,10 +4069,10 @@
                        ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID" +
                        ") " +
                        " values('3899','3899'," + HItemID + ",'" + Num1 + j + "',getdate()" +
                        "," + dr["HYear"] + "," + dr["HPeriod"] + ",'" + dr["HRemark"] + "','" + dr["HMaker"] + "',getdate(),'" + Num1 + j +
                        "," + dr["HYear"] + "," + dr["HPeriod"] + ",'" + dr["HRemark"] + "','" + user + "',getdate(),'" + Num1 + j +
                        "','" + Num1 + j + "','" + dr["HName"] + "','" + dr["HModel"] + "','" + dr["HModel2"] + "','" + dr["HDiameter"] + "'" +
                        ",'" + dr["HSubjoin"] + "','" + dr["HSubjoin2"] + "','" + dr["HPICNo"] + "','" + dr["HWorkMaterModel"] + "'" +
                        "," + dr["HMaterID"] + ",'" + dr["HMaterNumber"] + "',0," + dr["HUnitID"] +
                        "," + dr["HMaterID"] + ",'" + dr["HMaterNumber"] + "',"+dr["HMouldType"]+"," + dr["HUnitID"] +
                        ",'" + dr["HOutComDate"] + "','" + dr["HOutComNo"] + "'," + dr["HDeptID"] + "," + dr["HSupID"] + ",'" + dr["HSupNumber"] + "'" +
                        "," + dr["HPrintQty"] + ",'" + dr["HMouldStatus"] + "'," + dr["HWHID"] + "," + dr["HRoutingID"] + ",'" + dr["HCaveQty"] +
                        "'," + dr["HBOMID"] + ",'" + dr["HVersion"] + "'," + dr["HSPGroupID"] + "," + dr["HSPID"] + ",'" + dr["HDesignLife"] + "','" + dr["HNowSupID"] + "','" + dr["HNowSupTypeID"] + "'" +
@@ -4922,11 +4922,23 @@
        public object UploadFile_Gy_MouldFilen()
        {
            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_MouldFilen/" + HBillNo);
            string Ret = "";
            if (oSystemParameter.ShowBill(ref Ret))
            {
                if (oSystemParameter.omodel.WMS_CampanyName == "凯贝奈特")
                {
                    path = "D:/网站发布/LAYUI/Files/Gy_MouldFilen/" + HBillNo;
                }
                else
                {
                    path = HttpContext.Current.Server.MapPath("~/../Files/Gy_MouldFilen/" + HBillNo);
                }
            }
            dynamic dyResult = UploadFile_Gy_MouldFilen(files, path, HBillNo, HRemark, HUserName);
            if (dyResult != null && dyResult.result == 1)
            {
@@ -4981,7 +4993,20 @@
                {
                    File.Delete(fileurl);      //删除指定文件
                    files.SaveAs(fileurl);
                    string StrPath = "/files/Gy_MouldFilen/" + HBillNo + "/" + filename;
                    string StrPath = "";
                    string Ret = "";
                    if (oSystemParameter.ShowBill(ref Ret))
                    {
                        if (oSystemParameter.omodel.WMS_CampanyName == "凯贝奈特")
                        {
                            StrPath = "D:/网站发布/LAYUI/Files/Gy_MouldFilen/" + HBillNo + "/" + filename;
                        }
                        else
                        {
                            StrPath = "/files/Gy_MouldFilen/" + HBillNo + "/" + filename;
                        }
                    }
                    if (File.Exists(fileurl))
                    {
                        //这里可以执行一些其它的操作,比如更新数据库
@@ -5041,7 +5066,19 @@
        [HttpGet]
        public object Gy_MouldFilen_Filelist(string HBillNo)
        {
            var url = fileip + "/Files/Gy_MouldFilen/" + HBillNo + "/";
            string Ret = "";
            var url = "";
            if (oSystemParameter.ShowBill(ref Ret))
            {
                if (oSystemParameter.omodel.WMS_CampanyName == "凯贝奈特")
                {
                    url = "D:/网站发布/LAYUI/Files/Gy_MouldFilen/" + HBillNo + "/";
                }
                else
                {
                    url = fileip + "/Files/Gy_MouldFilen/" + HBillNo + "/";
                }
            }
            try
            {
@@ -5075,9 +5112,7 @@
            try
            {
                oCN.RunProc("delete from MES_AccessoriesList where HItemID =" + HItemID);
                string fileurl = Path.Combine(HttpContext.Current.Server.MapPath("~/../Files/Gy_MouldFilen/" + HSourceBillNo), HFileName);
                File.Delete(fileurl);      //删除指定文件
                oCN.RunProc("delete from MES_AccessoriesList where HItemID =" + HItemID);
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "删除成功!";