增加根据盘点分析报表,点击审核按钮,生成对应领用出库单
| | |
| | | { |
| | | DataSet ds; |
| | | List<object> list = new List<object>(); |
| | | List<object> list1 = new List<object>(); |
| | | List<object> list2 = new List<object>(); |
| | | List<object> list3 = new List<object>(); |
| | | List<object> list4 = new List<object>(); |
| | | List<object> list5 = new List<object>(); |
| | | List<object> list6 = new List<object>(); |
| | | List<object> list7 = new List<object>(); |
| | | List<object> list1 = new List<object>();//æ£å¸¸ |
| | | List<object> list2 = new List<object>();//è°æ¨ |
| | | List<object> list3 = new List<object>();//åºåº |
| | | List<object> list4 = new List<object>();//å
åé¢ç¨éåºåï¼ååé¢ç¨åºåºå |
| | | List<object> list5 = new List<object>();//çç |
| | | List<object> list6 = new List<object>();//çäº |
| | | List<object> list7 = new List<object>();//éåº |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql; |
| | | if (sWhere != null&&sWhere!="") |
| | | { |
| | | sql = string.Format(@"select k.HBarCode æ¡ç ,s.HName çç¹æ¹æ¡, |
| | | sql = string.Format(@"select k.HBarCode æ¡ç ,m.HNumber å¨å
·ç¼å·,s.HName çç¹æ¹æ¡, |
| | | case when k.HCorrespondentTypeID=1 then 'ä¾åºå' when k.HCorrespondentTypeID=2 then '客æ·' when k.HCorrespondentTypeID=4 then 'ä»åº' end å®é
ä½ç½®ç±»å, |
| | | case when k.HCorrespondentTypeID=1 then p.HName when k.HCorrespondentTypeID=2 then c.HName when k.HCorrespondentTypeID=4 then w.HName end å®é
ä½ç½®, |
| | | case when m.HNowSupTypeID=1 then 'ä¾åºå' when m.HNowSupTypeID=2 then '客æ·' when m.HNowSupTypeID=4 then 'ä»åº' end è´¦é¢ä½ç½®ç±»å, |
| | |
| | | } |
| | | else |
| | | { |
| | | sql = string.Format(@"select k.HBarCode æ¡ç ,s.HName çç¹æ¹æ¡, |
| | | sql = string.Format(@"select k.HBarCode æ¡ç ,m.HNumber å¨å
·ç¼å·,s.HName çç¹æ¹æ¡, |
| | | case when k.HCorrespondentTypeID=1 then 'ä¾åºå' when k.HCorrespondentTypeID=2 then '客æ·' when k.HCorrespondentTypeID=4 then 'ä»åº' end å®é
ä½ç½®ç±»å, |
| | | case when k.HCorrespondentTypeID=1 then p.HName when k.HCorrespondentTypeID=2 then c.HName when k.HCorrespondentTypeID=4 then w.HName end å®é
ä½ç½®, |
| | | case when m.HNowSupTypeID=1 then 'ä¾åºå' when m.HNowSupTypeID=2 then '客æ·' when m.HNowSupTypeID=4 then 'ä»åº' end è´¦é¢ä½ç½®ç±»å, |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region çç¹åæå®¡æ ¸ |
| | | #region è°æ¨âç´æ¥è°æ¨ |
| | | [Route("Gy_StockCheckItemBill/MakeProdMove")] |
| | | [HttpGet] |
| | | public object MakeProdMove(string HBarCode, string user, string userID) |
| | | { |
| | | try |
| | | { |
| | | string HBillNo = ""; |
| | | Int64 HInterID = 0;//æ¾ç¤ºçåæ®µ |
| | | ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain"); |
| | | DataRow dr = ds.Tables[0].Rows[0]; |
| | | HInterID = DBUtility.ClsPub.CreateBillID("3814", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | HBillNo = DBUtility.ClsPub.CreateBillCode("3814", 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('3814','3814'," + HInterID + ",'" + HBillNo + "',getdate()" + |
| | | ", '" + user + "',getdate()" + |
| | | ", " + dr["HSupID"].ToString() + ", 1," + dr["HWhID"].ToString() + ",0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",' ',0" + |
| | | |
| | | ") "; |
| | | string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID, |
| | | HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID, |
| | | HBatchNo,HQtyMust,HQty,HPrice,HMoney,HDesignLife,HLeaveLife,HUseLife,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HCorrespondentTypeID,HCorrespondentID, |
| | | HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'',0,0,'',''," + |
| | | "0,0," + dr["HInterID"].ToString() + ",0,0,0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr["HProdQty"].ToString() + ",0," + |
| | | "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr["HWHID"].ToString() + ",0," + dr["HSPID"].ToString() + ",0,0" |
| | | + ",0,0," + userID + ",0,0,'')"); |
| | | //主表 |
| | | oCn.RunProc(sql); |
| | | oCn.RunProc(sql1); |
| | | |
| | | 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; |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | #region ççâå
¶ä»å
¥åºå |
| | | [Route("Gy_StockCheckItemBill/MakeOtherIn")] |
| | | [HttpGet] |
| | | public object MakeOtherIn(string HBarCode, string user, string userID) |
| | | { |
| | | try |
| | | { |
| | | string HBillNo = ""; |
| | | Int64 HInterID = 0;//æ¾ç¤ºçåæ®µ |
| | | ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain"); |
| | | DataRow dr = ds.Tables[0].Rows[0]; |
| | | HInterID = DBUtility.ClsPub.CreateBillID("3827", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | HBillNo = DBUtility.ClsPub.CreateBillCode("3827", 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('3827','3827'," + HInterID + ",'" + HBillNo + "',getdate()" + |
| | | ", '" + user + "',getdate()" + |
| | | ", " + dr["HSupID"].ToString() + ", 1," + dr["HWhID"].ToString() + ",0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",' ',0" + |
| | | |
| | | ") "; |
| | | string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID, |
| | | HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID, |
| | | HBatchNo,HQtyMust,HQty,HPrice,HMoney,HDesignLife,HLeaveLife,HUseLife,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HCorrespondentTypeID,HCorrespondentID, |
| | | HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'',0,0,'',''," + |
| | | "0,0," + dr["HInterID"].ToString() + ",0,0,0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr["HProdQty"].ToString() + ",0," + |
| | | "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr["HWHID"].ToString() + ",0," + dr["HSPID"].ToString() + ",0,0" |
| | | + ",0,0," + userID + ",0,0,'')"); |
| | | //主表 |
| | | oCn.RunProc(sql); |
| | | oCn.RunProc(sql1); |
| | | |
| | | 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; |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | #region çäºâå¤çåºåºå |
| | | [Route("Gy_StockCheckItemBill/MakeScrapOut")] |
| | | [HttpGet] |
| | | public object MakeScrapOut(string HBarCode, string user, string userID) |
| | | { |
| | | try |
| | | { |
| | | string HBillNo = ""; |
| | | Int64 HInterID = 0;//æ¾ç¤ºçåæ®µ |
| | | ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain"); |
| | | DataRow dr = ds.Tables[0].Rows[0]; |
| | | HInterID = DBUtility.ClsPub.CreateBillID("3832", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | HBillNo = DBUtility.ClsPub.CreateBillCode("3832", 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('3832','3832'," + HInterID + ",'" + HBillNo + "',getdate()" + |
| | | ", '" + user + "',getdate()" + |
| | | ", " + dr["HSupID"].ToString() + ", 1," + dr["HWhID"].ToString() + ",0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",' ',0" + |
| | | |
| | | ") "; |
| | | string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID, |
| | | HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID, |
| | | HBatchNo,HQtyMust,HQty,HPrice,HMoney,HDesignLife,HLeaveLife,HUseLife,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HCorrespondentTypeID,HCorrespondentID, |
| | | HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'',0,0,'',''," + |
| | | "0,0," + dr["HInterID"].ToString() + ",0,0,0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr["HProdQty"].ToString() + ",0," + |
| | | "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr["HWHID"].ToString() + ",0," + dr["HSPID"].ToString() + ",0,0" |
| | | + ",0,0," + userID + ",0,0,'')"); |
| | | //主表 |
| | | oCn.RunProc(sql); |
| | | oCn.RunProc(sql1); |
| | | |
| | | 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; |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | #region åºåºâé¢ç¨åºåºå |
| | | [Route("Gy_StockCheckItemBill/MakeProdOut")] |
| | | [HttpGet] |
| | | public object MakeProdOut(string HBarCode, string user, string userID) |
| | | { |
| | | try |
| | | { |
| | | string HBillNo = ""; |
| | | Int64 HInterID = 0;//æ¾ç¤ºçåæ®µ |
| | | ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain"); |
| | | DataRow dr = ds.Tables[0].Rows[0]; |
| | | HInterID = DBUtility.ClsPub.CreateBillID("3802", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | HBillNo = DBUtility.ClsPub.CreateBillCode("3802", 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('3802','3802'," + HInterID + ",'" + HBillNo + "',getdate()" + |
| | | ", '" + user + "',getdate()" + |
| | | ", " + dr["HSupID"].ToString() + ", 1," + dr["HWhID"].ToString() + ",0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",' ',0" + |
| | | |
| | | ") "; |
| | | string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID, |
| | | HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID, |
| | | HBatchNo,HQtyMust,HQty,HPrice,HMoney,HDesignLife,HLeaveLife,HUseLife,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HCorrespondentTypeID,HCorrespondentID, |
| | | HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'',0,0,'',''," + |
| | | "0,0," + dr["HInterID"].ToString() + ",0,0,0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr["HProdQty"].ToString() + ",0," + |
| | | "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr["HWHID"].ToString() + ",0," + dr["HSPID"].ToString() + ",0,0" |
| | | + ",0,0," + userID + ",0,0,'')"); |
| | | //主表 |
| | | oCn.RunProc(sql); |
| | | oCn.RunProc(sql1); |
| | | |
| | | 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; |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | #region éåºâé¢ç¨éåºå |
| | | [Route("Gy_StockCheckItemBill/MakeProdBack")] |
| | | [HttpGet] |
| | | public object MakeProdBack(string HBarCode, string user, string userID) |
| | | { |
| | | try |
| | | { |
| | | string HBillNo = ""; |
| | | Int64 HInterID = 0;//æ¾ç¤ºçåæ®µ |
| | | ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain"); |
| | | DataRow dr = ds.Tables[0].Rows[0]; |
| | | HInterID = DBUtility.ClsPub.CreateBillID("3803", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | HBillNo = DBUtility.ClsPub.CreateBillCode("3803", 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('3803','3803'," + HInterID + ",'" + HBillNo + "',getdate()" + |
| | | ", '" + user + "',getdate()" + |
| | | ", " + dr["HSupID"].ToString() + ", 1," + dr["HWhID"].ToString() + ",0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",' ',0" + |
| | | |
| | | ") "; |
| | | string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID, |
| | | HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID, |
| | | HBatchNo,HQtyMust,HQty,HPrice,HMoney,HDesignLife,HLeaveLife,HUseLife,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HCorrespondentTypeID,HCorrespondentID, |
| | | HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'',0,0,'',''," + |
| | | "0,0," + dr["HInterID"].ToString() + ",0,0,0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr["HProdQty"].ToString() + ",0," + |
| | | "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr["HWHID"].ToString() + ",0," + dr["HSPID"].ToString() + ",0,0" |
| | | + ",0,0," + userID + ",0,0,'')"); |
| | | //主表 |
| | | oCn.RunProc(sql); |
| | | oCn.RunProc(sql1); |
| | | |
| | | 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; |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | #region å
é¢ç¨éåºåé¢ç¨åºåº |
| | | [Route("Gy_StockCheckItemBill/MakeProdOutBack")] |
| | | [HttpGet] |
| | | public object MakeProdOutBack(string HBarCode, string user, string userID) |
| | | { |
| | | try |
| | | { |
| | | string HBillNo = ""; |
| | | Int64 HInterID = 0;//æ¾ç¤ºçåæ®µ |
| | | ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain"); |
| | | DataRow dr = ds.Tables[0].Rows[0]; |
| | | //åºåº |
| | | HInterID = DBUtility.ClsPub.CreateBillID("3802", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | HBillNo = DBUtility.ClsPub.CreateBillCode("3802", 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('3802','3802'," + HInterID + ",'" + HBillNo + "',getdate()" + |
| | | ", '" + user + "',getdate()" + |
| | | ", " + dr["HSupID"].ToString() + ", 1," + dr["HWhID"].ToString() + ",0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",' ',0" + |
| | | |
| | | ") "; |
| | | string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID, |
| | | HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID, |
| | | HBatchNo,HQtyMust,HQty,HPrice,HMoney,HDesignLife,HLeaveLife,HUseLife,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HCorrespondentTypeID,HCorrespondentID, |
| | | HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'',0,0,'',''," + |
| | | "0,0," + dr["HInterID"].ToString() + ",0,0,0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr["HProdQty"].ToString() + ",0," + |
| | | "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr["HWHID"].ToString() + ",0," + dr["HSPID"].ToString() + ",0,0" |
| | | + ",0,0," + userID + ",0,0,'')"); |
| | | |
| | | //éåº |
| | | HInterID = DBUtility.ClsPub.CreateBillID("3803", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | HBillNo = DBUtility.ClsPub.CreateBillCode("3803", ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | string sql2 = "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('3803','3803'," + HInterID + ",'" + HBillNo + "',getdate()" + |
| | | ", '" + user + "',getdate()" + |
| | | ", " + dr["HSupID"].ToString() + ", 1," + dr["HWhID"].ToString() + ",0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",' ',0" + |
| | | |
| | | ") "; |
| | | string sql3 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID, |
| | | HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID, |
| | | HBatchNo,HQtyMust,HQty,HPrice,HMoney,HDesignLife,HLeaveLife,HUseLife,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HCorrespondentTypeID,HCorrespondentID, |
| | | HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'',0,0,'',''," + |
| | | "0,0," + dr["HInterID"].ToString() + ",0,0,0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr["HProdQty"].ToString() + ",0," + |
| | | "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr["HWHID"].ToString() + ",0," + dr["HSPID"].ToString() + ",0,0" |
| | | + ",0,0," + userID + ",0,0,'')"); |
| | | //主表 |
| | | oCn.RunProc(sql); |
| | | oCn.RunProc(sql1); |
| | | oCn.RunProc(sql2); |
| | | oCn.RunProc(sql3); |
| | | |
| | | 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; |
| | | |
| | | } |
| | | #endregion |
| | | #endregion |
| | | } |
| | | } |