zzr99
2021-11-15 59f7fc80accfea54b38e42a361c42f070260efa6
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -612,7 +612,7 @@
                ",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HSupID + ",'" + HSupNumber + "'" +
                "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID +
                "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "'" +
                ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER +"',"+ "','" + HSaveLife + "'," +
                ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "'" +
                ") ");
@@ -759,7 +759,7 @@
                ",HSupNumber='" + HSupNumber + "'" +
                ",HPrintQty=" + HPrintQty.ToString() +
                ",HMouldStatus='" + HMouldStatus + "'" +
                ",HSaveLife='"+ HSaveLife+"'"+
                ",HSaveLife='" + HSaveLife + "'" +
                ",HWhID=" + HWHID.ToString() +
                ",HRoutingID=" + HRoutingID.ToString() +
                ",HBomID=" + HBOMID.ToString() +
@@ -770,7 +770,7 @@
                ",HUseLife=" + HUseLife.ToString() +
                ",HLeaveLife=" + HLeaveLife.ToString() +
                ",HProdQty=" + HProdQty.ToString() +
                ",HMouldOWNER='"+ HMouldOWNER+"'"+
                ",HMouldOWNER='" + HMouldOWNER + "'" +
                ",HProdWeight=" + HProdWeight.ToString() +
                " where HInterID=" + HInterID.ToString());
@@ -880,6 +880,56 @@
            return objJsonResult;
        }
        /// <summary>
        /// 模具档案初始化按钮
        /// </summary>
        /// <param name="hmainid"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        [Route("Gy_Material/InitializeProdInBill")]
        [HttpGet]
        public object InitializeProdInBill(long hmainid, string user)
        {
            DAL.ClsGy_MouldFile oBill = new DAL.ClsGy_MouldFile();
            try
            {
                string HBillNo = "";
                Int64 HInterID = 0;//显示的字段
                ds = oCN.RunProcReturn("select * from Gy_MouldFileMain where HInterID='" + hmainid + "'", "Gy_MouldFileMain");
                DataRow dr = ds.Tables[0].Rows[0];
                HInterID = DBUtility.ClsPub.CreateBillID("3801", ref DBUtility.ClsPub.sExeReturnInfo);
                HBillNo = DBUtility.ClsPub.CreateBillCode("3801", ref DBUtility.ClsPub.sExeReturnInfo, true);
                string sql = "Insert Into Sc_MouldStockBillMain   " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                ",HMaker,HMakeDate" + /*"HYear, HPeriod,"*/
                ",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
                ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" +
                ") " +
                " values('3801','3801'," + HInterID + ",'" + HBillNo + "',' getdate()'" +
                ", '" + user + "',getdate()" +
                ", " + dr["HSupID"].ToString() + ", 1," + dr["HWhID"].ToString() + ",0,0,0,0" +
                ", 0," + dr["HDeptID"].ToString() +  ",' ',0"  +
                ") ";
                //主表
                oCN.RunProc(sql);
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "初始化成功!";
                //WebAPIController.Add_Log("送货单下推", UserName, "生成送货单");
                objJsonResult.data = 1;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "初始化失败!";
                objJsonResult.data = null;
            }
            return objJsonResult;
        }
        #region [模具档案审核、反审核]
        /// <summary>