| | |
| | | ",'" + 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 + "'" + |
| | | ") "); |
| | | |
| | | |
| | |
| | | ",HSupNumber='" + HSupNumber + "'" + |
| | | ",HPrintQty=" + HPrintQty.ToString() + |
| | | ",HMouldStatus='" + HMouldStatus + "'" + |
| | | ",HSaveLife='"+ HSaveLife+"'"+ |
| | | ",HSaveLife='" + HSaveLife + "'" + |
| | | ",HWhID=" + HWHID.ToString() + |
| | | ",HRoutingID=" + HRoutingID.ToString() + |
| | | ",HBomID=" + HBOMID.ToString() + |
| | |
| | | ",HUseLife=" + HUseLife.ToString() + |
| | | ",HLeaveLife=" + HLeaveLife.ToString() + |
| | | ",HProdQty=" + HProdQty.ToString() + |
| | | ",HMouldOWNER='"+ HMouldOWNER+"'"+ |
| | | ",HMouldOWNER='" + HMouldOWNER + "'" + |
| | | ",HProdWeight=" + HProdWeight.ToString() + |
| | | " where HInterID=" + HInterID.ToString()); |
| | | |
| | |
| | | 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> |