| | |
| | | ")", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCn.RunProc("Update Gy_StockCheckItem set HEndflag=0 where HItemID=" + oBill.HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region çç¹åæåè¡¨å¤æå½åéæ©ççç¹æ¹æ¡æ¯å¦çæè¿åæ® |
| | | [Route("Gy_StockCheckItemBill/StockItemSubIsExistence")] |
| | | [HttpGet] |
| | | public object StockItemSubIsExistence(string sID) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql; |
| | | sql = string.Format(@"select * from Gy_StockCheckItemSub where HInterID=" + sID); |
| | | ds = oCN.RunProcReturn(sql, "Gy_StockCheckItemSub"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ææªçæ"; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å·²çæ"; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢æ°æ®å¼å¸¸ï¼è¯·ä¸ç®¡çåèç³»ï¼" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region çç¹åæå表 |
| | | [Route("Gy_StockCheckItemBill/Get_InventoryAnalysisList")] |
| | | [HttpGet] |
| | |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sID == null || sID == "") |
| | | //夿æ¯å¦éæ©çç¹æ¹æ¡ï¼æ¯=>ï¼ç¨çç¹æ¹æ¡å表å对æ¯ï¼ï¼å¦=>ï¼ç¨å¨å
·æ¡£æ¡å对æ¯ï¼ |
| | | if (sID==null|| sID == "") |
| | | { |
| | | sql = string.Format(@"select * from h_v_Sc_MouldInventoryAnalysisList where " + sWhere + " order by HItemID desc "); |
| | | if (sWhere=="pk") |
| | | { |
| | | sql = string.Format(@"select * from h_v_Sc_MouldInventoryAnalysisPK"); |
| | | } |
| | | else |
| | | { |
| | | sql = string.Format($"exec h_p_Sc_MouldInventoryAnalysisList2 '{sWhere}'"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sql = string.Format(@"select * from h_v_Sc_MouldInventoryAnalysisList where " + sWhere + " and HSourceInterID=(select HItemID from Gy_StockCheckItem where HItemID=" + sID + ") and HMakeDate<=(select HEndDate from Gy_StockCheckItem where HItemID=" + sID + ") order by HItemID desc "); |
| | | if (sWhere == "pk") |
| | | { |
| | | sql = string.Format(@"select * from h_v_Sc_MouldInventoryAnalysisPK2 WHERE HInterID="+ sID); |
| | | } |
| | | else |
| | | { |
| | | sql = string.Format($"exec h_p_Sc_MouldInventoryAnalysisList '{sID}','{sWhere}'"); |
| | | } |
| | | } |
| | | ds = oCN.RunProcReturn(sql, "Sc_MouldStockBillMain_Temp"); |
| | | ds = oCN.RunProcReturn(sql, "h_p_Sc_MouldInventoryAnalysisList"); |
| | | list.Add(ds.Tables[0]); |
| | | |
| | | objJsonResult.code = "1"; |
| | |
| | | { |
| | | var HBarCode = item.HBarCode; |
| | | var HItemID = item.HItemID; |
| | | string HDate = item.HMakeDate; |
| | | string HBillNo = ""; |
| | | Int64 HInterID = 0;//æ¾ç¤ºçåæ®µ |
| | | DataSet ds1 = new DataSet(); |
| | |
| | | ",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('3814','3814'," + HInterID + ",'" + HBillNo + "','2022-01-02'" + |
| | | " values('3814','3814'," + HInterID + ",'" + HBillNo + "','" + HDate+"'"+ |
| | | ", '" + user + "',getdate()" + |
| | | ", " + dr["HSupID"].ToString() + ", 1," + dr["HNowSupID"].ToString() + ",0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",' ',0" + |
| | |
| | | var HBarCode = item.HBarCode; |
| | | var HItemID = item.HItemID; |
| | | string HBillNo = ""; |
| | | string HDate = item.HMakeDate; |
| | | Int64 HInterID = 0;//æ¾ç¤ºçåæ®µ |
| | | DataSet ds1 = new DataSet(); |
| | | ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='W11201609050013'", "Gy_MouldFileMain"); |
| | | ds1 = oCn.RunProcReturn("select top 1 * from Sc_MouldStockBillMain_Temp where HBarCode='W11201609050013' and HItemID='38'", "Sc_MouldStockBillMain_Temp"); |
| | | ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain"); |
| | | ds1 = oCn.RunProcReturn("select top 1 * from Sc_MouldStockBillMain_Temp where HBarCode='" + HBarCode + "' and HItemID='" + HItemID + "'", "Sc_MouldStockBillMain_Temp"); |
| | | DataRow dr = ds.Tables[0].Rows[0]; |
| | | DataRow dr1 = ds1.Tables[0].Rows[0]; |
| | | HInterID = DBUtility.ClsPub.CreateBillID("3827", ref DBUtility.ClsPub.sExeReturnInfo); |
| | |
| | | ",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('3827','3827'," + HInterID + ",'" + HBillNo + "','2022-01-02'" + |
| | | " values('3827','3827'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | ", '" + user + "',getdate()" + |
| | | ", " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + ",isnull('" + dr["HNowSupID"].ToString() + "',0),0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",'',0" + |
| | |
| | | var HBarCode = item.HBarCode; |
| | | var HItemID = item.HItemID; |
| | | string HBillNo = ""; |
| | | string HDate = item.HMakeDate; |
| | | Int64 HInterID = 0;//æ¾ç¤ºçåæ®µ |
| | | DataSet ds1 = new DataSet(); |
| | | ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain"); |
| | |
| | | ",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('3832','3832'," + HInterID + ",'" + HBillNo + "','2022-01-02'" + |
| | | " values('3832','3832'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | ", '" + user + "',getdate()" + |
| | | ", " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",' ',0" + |
| | |
| | | var HBarCode = item.HBarCode; |
| | | var HItemID = item.HItemID; |
| | | string HBillNo = ""; |
| | | string HDate = item.HMakeDate; |
| | | Int64 HInterID = 0;//æ¾ç¤ºçåæ®µ |
| | | DataSet ds1 = new DataSet(); |
| | | ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain"); |
| | |
| | | ",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('3802','3802'," + HInterID + ",'" + HBillNo + "','2022-01-02'" + |
| | | " values('3802','3802'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | ", '" + user + "',getdate()" + |
| | | ", " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",' ',0" + |
| | |
| | | var HBarCode = item.HBarCode; |
| | | var HItemID = item.HItemID; |
| | | string HBillNo = ""; |
| | | string HDate = item.HMakeDate; |
| | | Int64 HInterID = 0;//æ¾ç¤ºçåæ®µ |
| | | DataSet ds1 = new DataSet(); |
| | | ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain"); |
| | |
| | | ",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('3803','3803'," + HInterID + ",'" + HBillNo + "','2022-01-02'" + |
| | | " values('3803','3803'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | ", '" + user + "',getdate()" + |
| | | ", " + dr["HNowSupID"].ToString() + "," + dr["HNowSupTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",' ',0" + |