| | |
| | | { |
| | | try |
| | | { |
| | | //string sql = string.Format(@"select a.HInterID,a.HBillNo,b.HEntryID,b.HMaterID,m.HNumber HMaterNumber,m.HName HMaterName, b.HUnitID,u.HName HUnitName,b.HQty HPlanQty, |
| | | //string sql = string.Format(@"select a.HInterID,a.HBillNo,b.HEntryID,b.HMaterID,m.HNumber HMaterNumber,m.HName HMaterName, b.HUnitID,u.HName HUnitName,b.HQty HPlanQty,b.HQty HSPlanQty, |
| | | // a.HCusID, c.HName HCusName,a.HEmpID,e.HName HEmpName,b.HDeptID,d.HName HDeptName,a.HPlanEndDate,0 HMinQty,0 HTotalQty,0 HSpsQty,a.HSeOrderBillNo,a.HRemark |
| | | // from Sc_ICMOBillMain a |
| | | // left join Sc_ICMOBillSub b on a.HInterID=b.HInterID |
| | |
| | | // left join Gy_Employee e on a.HEmpID=e.HItemID |
| | | // left join Gy_Department d on a.HDeptID=d.HItemID |
| | | // where b.HInterID=(select HICMOInterID from Sc_PPBomBillMain where HBillNo='" + HBillNo + "')"); |
| | | string sql = string.Format(@"select a.HInterID,a.HBillNo,b.HMaterID,b.HEntryID, m.HNumber HMaterNumber, m.HName HMaterName, b.HUnitID,u.HName HUnitName,b.HQty HPlanQty,a.HCusID, c.HName HCusName, |
| | | string sql = string.Format(@"select a.HInterID,a.HBillNo,b.HMaterID,b.HEntryID, m.HNumber HMaterNumber, m.HName HMaterName, b.HUnitID,u.HName HUnitName,b.HQty HPlanQty,b.HQty HSPlanQty,a.HCusID, c.HName HCusName, |
| | | a.HEmpID,e.HName HEmpName,b.HDeptID,d.HName HDeptName,a.HPlanEndDate,0 HMinQty,0 HTotalQty,0 HSpsQty,a.HSeOrderBillNo,a.HRemark, |
| | | fo.FBILLNO FBillNo,fo.F_ZZZZ_TEXT7 FLXName,fo.FRECEIVEADDRESS FInAddress,fmn.FNAME FMaterName,fo.F_ZZZZ_TEXT FBZFS,fu.FDATAVALUE FHX, |
| | | fu1.FDATAVALUE FQK,fo.F_ZZZZ_WBBZ FWBBZ |
| | | fo.FBILLNO FBillNo,fo.F_ZZZZ_TEXT7 FLXName,fo.FRECEIVEADDRESS FInAddress,fmn.FNAME FMaterName,fo1.F_ZZZZ_TEXT FBZFS,fu.FDATAVALUE FHX, |
| | | fu1.FDATAVALUE FQK,fo1.F_ZZZZ_WBBZ1 FWBBZ |
| | | from Sc_ICMOBillMain a |
| | | left join Sc_ICMOBillSub b on a.HInterID=b.HInterID |
| | | left join Gy_Material m on b.HMaterID=m.HItemID |
| | |
| | | /// <summary> |
| | | /// å¢åè£
ç®±å表-å é¤ |
| | | /// </summary> |
| | | /// <param name="HInterID">æ¡ç æ¡£æ¡ä¸»è¡¨ä¸»IDï¼å¯ä¸ï¼</param> |
| | | /// <param name="Flag">æ è¯</param> |
| | | /// <returns></returns> |
| | | [Route("Sc_ICMOBillController/DeleteQK_GetPackingBillList")] |
| | | [HttpGet] |
| | |
| | | ds = oCN.RunProcReturn("select * from Gy_BarCodeBill where HItemID=" + HInterID, "Gy_BarCodeBill"); |
| | | DataRow dr = ds.Tables[0].Rows[0]; |
| | | string sql = string.Format(@"delete from Gy_BarCodeBill where HItemID=" + HInterID); |
| | | string sql1 = string.Format(@"update Sc_ICMOBillSub set HQty=HPlanQty+" + dr["HQty"] + " where HInterID=(select HSourceInterID from Gy_BarCodeBill where HItemID=" + HInterID + ")"); |
| | | oCN.RunProc(sql); |
| | | string sql1 = string.Format(@"update Sc_ICMOBillSub set HQty=HQty+" + dr["HQty"] + " where HEntryID=(select HSourceEntryID from Gy_BarCodeBill where HItemID=" + HInterID + ")"); |
| | | oCN.RunProc(sql1); |
| | | oCN.RunProc(sql); |
| | | } |
| | | else |
| | | { |
| | | //éè¿æ¡ç idæ¾å°ææ¡ç ï¼éè¿ææ¡ç æ¾å°ç»æåå表ä¸çå¯ä¸ç |
| | | string sql2 = "select HBarCode from Sc_PackUnionBillSub where HInterID=(select HBarcodeNo from Gy_BarCodeBill where HItemID=" + HInterID; |
| | | string sql2 = "select HBarCode from Sc_PackUnionBillSub where HInterID=(select HBarcodeNo from Gy_BarCodeBill where HItemID=" + HInterID+")"; |
| | | //string sql2 = "select HBarCode from Sc_PackUnionBillSub where HInterID=(select HBarcodeNo from Gy_BarCodeBill where HItemID=3250)"; |
| | | DataSet ds1 = oCN.RunProcReturn(sql2, "Sc_PackUnionBillSub"); |
| | | DataTable dt = ds1.Tables[0]; |
| | |
| | | DataRow dr1 = ds.Tables[0].Rows[0]; |
| | | |
| | | string sql = string.Format(@"delete from Gy_BarCodeBill where HBarCode='" + dr["HBarCode"].ToString() + "'"); |
| | | string sql1 = string.Format(@"update Sc_ICMOBillSub set HQty=HPlanQty+" + dr1["HQty"] + " where HInterID=(select HSourceInterID from Gy_BarCodeBill where HBarCode='" + dr["HBarCode"].ToString() + "')"); |
| | | string sql1 = string.Format(@"update Sc_ICMOBillSub set HQty=HQty+" + dr1["HQty"] + " where HEntryID=(select HSourceEntryID from Gy_BarCodeBill where HBarCode='" + dr["HBarCode"].ToString() + "')"); |
| | | oCN.RunProc(sql1); |
| | | oCN.RunProc(sql); |
| | | oCN.RunProc(sql1); |
| | | } |
| | | } |
| | | |