| | |
| | | string sReturn = ""; |
| | | if (GetSingleSystemParameter("WMS_CampanyName", ref sReturn) == "杭州斯莫尔") |
| | | { |
| | | HDeptID = 389499; |
| | | HDeptID = 389505; |
| | | HPRDOrgIDs = 100199; |
| | | } |
| | | else { |
| | |
| | | |
| | | |
| | | |
| | | ds = oCN.RunProcReturn(@"select b.HProcNo,b.HProcID,a.HMaterID,a.HQty,a.HInterID,HEntryID,a.HICMOInterID,a.HICMOEntryID,a.HICMOBillNo from Sc_ProcessExchangeBillMain a WITH(NOLOCK) |
| | | ds = oCN.RunProcReturn(@"select a.HWorkShopID,b.HProcNo,b.HProcID,a.HMaterID,a.HQty,a.HInterID,HEntryID,a.HICMOInterID,a.HICMOEntryID,a.HICMOBillNo,b.HCenterID from Sc_ProcessExchangeBillMain a WITH(NOLOCK) |
| | | inner join Sc_ProcessExchangeBillSub b WITH(NOLOCK) on a.HInterID=b.HInterID |
| | | left join Gy_Process p WITH(NOLOCK) on b.HProcID=p.HItemID |
| | | where a.HBillNo='" + HProcExchBillNo + "' and p.HNumber='" + HProcNumber + "'", "Sc_ProcessExchangeBillMain"); |
| | |
| | | long HMainInterID = 0; |
| | | string BillType = "3791"; |
| | | string HBillSubType = "3791"; |
| | | |
| | | string HWorkShopID= ds.Tables[0].Rows[0]["HWorkShopID"].ToString(); |
| | | int HBillStatus = 1; |
| | | string HMaker = HEmpName;//制单人 |
| | | string HMouldNum = "";//模穴号 |
| | |
| | | double HPrice = 0; |
| | | double HMoney = 0; |
| | | double HBadCount = 0;//不良数量 |
| | | long HCenterID = 0;//工作中心ID |
| | | long HCenterID = long.Parse(ds.Tables[0].Rows[0]["HCenterID"].ToString());//工作中心ID |
| | | string HProcNo = ds.Tables[0].Rows[0]["HProcNo"].ToString();//流水号 |
| | | string HOrderProcNO = "";//订单跟踪号 |
| | | string HSourceNameList = "";//设备清单 |
| | |
| | | int HTemporaryAreaID = 0;//暂放区 |
| | | long HInterID = 0; |
| | | string HBillNo = ""; |
| | | int HShiftsID = 0; |
| | | |
| | | DataSet set= oCN.RunProcReturn("exec h_p_Gy_GetWorkShiftInfo " + HWorkShopID + "," + HCenterID, "h_p_Gy_GetWorkShiftInfo"); |
| | | if (set.Tables[0].Rows.Count > 0) { |
| | | HShiftsID = int.Parse(set.Tables[0].Rows[0]["HInterID"].ToString()); |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_SNBarcodeProcCtrl_S '" + HBadCodeSN + "'," + HProcID, "h_v_Gy_QualifiedRecordsList"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | |
| | | ",HSupID,HQty,HPrice,HMoney,HBadCount,HCenterID,HProcNo,HOrderProcNO,HSourceNameList" + |
| | | ",HMainSourceInterID,HMainSourceBillNo,HMainSourceBillType,HLastSubProc" + |
| | | ",HEmpID2,HEmpID3,HEmpID4,HEmpID5,HDSQty,HChongQty,HPriceRate,HWorkTimes,HQCCheckID,HMainInterID,HPRDOrgID" + |
| | | ",HmaterOutqty,HProcPriceRate,HTemporaryAreaID" + |
| | | ",HmaterOutqty,HProcPriceRate,HTemporaryAreaID,HShiftsID" + |
| | | ") " + |
| | | " values('" + BillType + "','" + HBillSubType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate(),'" + HMouldNum + "'" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HSourceName + "'," + HPieceQty + "," + HWasterQty + "," + HPlanPieceQty + "," + HBadPNL + |
| | |
| | | "," + HSupID + "," + HQty + "," + HPrice + "," + HMoney + "," + HBadCount + "," + HCenterID + "," + HProcNo + ",'" + HOrderProcNO + "'" + ",'" + HSourceNameList + "'" + |
| | | "," + HMainSourceInterID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + Convert.ToString(HLastSubProc ? 1 : 0) + |
| | | "," + HEmpID2 + "," + HEmpID3 + "," + HEmpID4 + "," + HEmpID5 + "," + HDSQty + "," + HChongQty + "," + HPriceRate + "," + HWorkTimes + "," + HQCCheckID + "," + HMainInterID + "," + HPRDOrgID + |
| | | "," + HmaterOutqty + "," + HProcPriceRate + "," + HTemporaryAreaID + ") "); |
| | | "," + HmaterOutqty + "," + HProcPriceRate + "," + HTemporaryAreaID + ","+ HShiftsID + ") "); |
| | | } |
| | | |
| | | if (HResult == "OK") |
| | |
| | | string sReturn = ""; |
| | | if (GetSingleSystemParameter("WMS_CampanyName", ref sReturn) == "杭州斯莫尔") |
| | | { |
| | | HDeptID = 389499; |
| | | HDeptID = 389505; |
| | | HPRDOrgIDs = 100199; |
| | | } |
| | | else |
| | |
| | | string sReturn = ""; |
| | | if (GetSingleSystemParameter("WMS_CampanyName", ref sReturn) == "杭州斯莫尔") |
| | | { |
| | | HDeptID = 389499; |
| | | HDeptID = 389505; |
| | | } |
| | | else |
| | | { |
| | |
| | | string HProcExchEntryID = "0"; |
| | | string HProcExchBillNo = ""; |
| | | long HMaterID = 0; |
| | | long HProcID = 0; |
| | | long HUnitID = 0; |
| | | long HICMOInterID = 0; |
| | | long HICMOEntryID = 0; |
| | | string HICMOBillNo = ""; |
| | | ds = oCN.RunProcReturn(@"select HMaterID,HUnitID,a.HICMOInterID,a.HICMOEntryID,a.HICMOBillNo,HBillNo,a.HInterID,b.HEntryID,a.HBillNo from Sc_ProcessExchangeBillMain a WITH(NOLOCK) |
| | | ds = oCN.RunProcReturn(@"select b.HProcID, HMaterID,HUnitID,a.HICMOInterID,a.HICMOEntryID,a.HICMOBillNo,HBillNo,a.HInterID,b.HEntryID,a.HBillNo from Sc_ProcessExchangeBillMain a WITH(NOLOCK) |
| | | inner join Sc_ProcessExchangeBillSub b WITH(NOLOCK) on a.HInterID=b.HInterID |
| | | left join Gy_Process p WITH(NOLOCK) on b.HProcID=p.HItemID |
| | | where HBillNo=(select HSourceBillNo from Gy_BarCodeBill WITH(NOLOCK) where HBarCode='" + dic["HBarCode"].ToString() + "') and p.HNumber='" + dic["HProcNumber"].ToString() + "' ", "Sc_ProcessExchangeBillMain"); |
| | |
| | | HProcExchInterID = ds.Tables[0].Rows[0]["HInterID"].ToString(); |
| | | HProcExchEntryID = ds.Tables[0].Rows[0]["HEntryID"].ToString(); |
| | | HProcExchBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString(); |
| | | HProcID = int.Parse(ds.Tables[0].Rows[0]["HProcID"].ToString()); |
| | | } |
| | | |
| | | |
| | |
| | | (HInterID,HENTRYID,HBillNo_bak,HEmpID,HBarCode,HBadReasonID,HAddr,HMaker,HMakeDate |
| | | ,HMaterID,HUnitID,HRemark,HSourceID,HICMOInterID,HICMOEntryID,HICMOBillNo,HReportType |
| | | ,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney |
| | | ,HQty,HResult,HProcExchInterID,HProcExchEntryID,HProcExchBillNo) |
| | | ,HQty,HResult,HProcExchInterID,HProcExchEntryID,HProcExchBillNo,HProcID) |
| | | values({HInterID},1,'{HBillNo}',{HEmpID},'{HBarCode}',0,'','{HMaker}','{HMakeDate}' |
| | | ,{HMaterID},{ HUnitID},'',{HSourceID},{ HICMOInterID},{ HICMOEntryID},'{HICMOBillNo}',0 |
| | | ,0,0,'','',0,0 |
| | | ,0,'{HResult}',{ HProcExchInterID},{ HProcExchEntryID},'{ HProcExchBillNo}')"); |
| | | ,1,'{HResult}',{ HProcExchInterID},{ HProcExchEntryID},'{ HProcExchBillNo}'," + HProcID + ")"); |
| | | |
| | | return true; |
| | | } |