物料添加单个流转卡数量,批量生成流转卡优化,到货确认模块添加添康科技客户
| | |
| | | try |
| | | { |
| | | //å¾å°mainid |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (omodel.HInterID == 0 || omodel.HInterID.ToString() == null || omodel.HInterID.ToString() == "undefined") |
| | | { |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | |
| | | { |
| | | if (oSystemParameter.omodel.Sc_ProcessExchangeBill_AutoBarCode == "Y") //ç³»ç»åæ° å·¥åºæµè½¬å¡ä¿åæ¶èªå¨åæ¥æ¡ç ä¿¡æ¯è³æ¡ç æ¡£æ¡ |
| | | { |
| | | oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" + |
| | | Int64 HBarCodeInterID = DBUtility.ClsPub.CreateBillID_Prod("85", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "æ·»åº·ç§æ") |
| | | { |
| | | oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty" + |
| | | ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark" + |
| | | ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate" + |
| | | ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HGiveAwayFlag" + |
| | | ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID,HGiveAwayFlag" + |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo" + |
| | | ") values (" |
| | | + "'" + omodel.HBillNo + "','å¯ä¸æ¡ç '," + omodel.HMaterID.ToString() + "," + omodel.HUnitID.ToString() + "," + omodel.HQty.ToString() |
| | | + ",'" + omodel.HBatchNo + "'," + omodel.HSupID.ToString() + ",0,'" + omodel.HMaker + "',getdate(),0," + omodel.HQty.ToString() |
| | | + ", " + omodel.HICMOInterID.ToString() + "," + omodel.HICMOEntryID + ",'" + omodel.HICMOBillNo + "','3710',''" |
| | | + ",1,1,0,0,0,'å·¥åºæµè½¬å¡ä¿åèªå¨åæ¥'" |
| | | + ",0,'',getdate(),'',getdate()" |
| | | + ", " + omodel.HPRDORGID + "," + omodel.HPRDORGID + ",''," + HBarCodeInterID + ",1,0" |
| | | + ",'','','',0,'','')"); |
| | | } |
| | | else |
| | | { |
| | | oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty" + |
| | | ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark" + |
| | | ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate" + |
| | | ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID,HGiveAwayFlag" + |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo" + |
| | | ") values (" |
| | | + "'" + omodel.HBillNo + "','å¯ä¸æ¡ç '," + omodel.HMaterID.ToString() + "," + omodel.HUnitID.ToString() + "," + omodel.HQty.ToString() |
| | |
| | | + ", " + omodel.HInterID.ToString() + ",1,'" + omodel.HBillNo + "','3772',''" |
| | | + ",1,1,0,0,0,'å·¥åºæµè½¬å¡ä¿åèªå¨åæ¥'" |
| | | + ",0,'',getdate(),'',getdate()" |
| | | + ", " + omodel.HPRDORGID + "," + omodel.HPRDORGID + ",'',0,0" |
| | | + ", " + omodel.HPRDORGID + "," + omodel.HPRDORGID + ",''," + HBarCodeInterID + ",1,0" |
| | | + ",'','','',0,'','')"); |
| | | } |
| | | } |
| | | } |
| | | else |
| | |
| | | public double HProQty;//æµè½¬å¡æ°é |
| | | public Int64 HRoutingInterID;//å·¥èºè·¯çº¿å
ç |
| | | public DateTime HDate;//æµè½¬å¡æ¥æ |
| | | public Int64 HInterID;//æµè½¬å¡å
ç |
| | | public string HBillNo;//æµè½¬å¡å· |
| | | public string HBatchNo;//æ¹æ¬¡ |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql = string.Format(@"exec h_p_Sc_GetProcessExchangeBillSubTech "); |
| | | ds = oCN.RunProcReturn(sql + HInterID, "h_p_Sc_GetProcessExchangeBillSubTech"); |
| | | ds = oCN.RunProcReturn(sql + " '" + HInterID + "'", "h_p_Sc_GetProcessExchangeBillSubTech"); |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | |
| | | DateTime dt = DateTime.Now; |
| | | string sql = ""; |
| | | Int64 HInterID = 0; |
| | | string HBillNo = ""; |
| | | Int64 HICMOInterID = 0; |
| | | Int64 HICMOEntryID = 0; |
| | | string HICMOBillNo = ""; |
| | | double HQty = 0; |
| | | double HProQty = 0; |
| | | |
| | | foreach (Model.ClsSc_ProcessExchangeBillSub_BatchSplit oItemSub in ls) |
| | | { |
| | | HBillNo = DBUtility.ClsPub.CreateBillCode_Prod("3772", ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | //HBillNo = DBUtility.ClsPub.CreateBillCode_Prod("3772", ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | HInterID = oItemSub.HInterID; |
| | | HBillNo = oItemSub.HBillNo; |
| | | HICMOInterID = oItemSub.HICMOInterID; |
| | | HICMOEntryID = oItemSub.HICMOEntryID; |
| | | HICMOBillNo = oItemSub.HICMOBillNo; |
| | | HQty = oItemSub.HQty; |
| | | HProQty = oItemSub.HProQty; |
| | | |
| | | sql = "select * from h_v_Sc_ProcessExchangeBill_BatchSplit where hmainid = " + oItemSub.HICMOInterID + " and hentryid = " |
| | | + oItemSub.HICMOEntryID; |
| | |
| | | //主表èµå¼ |
| | | if (ds.Tables[0].Rows.Count > 0 && ds != null) |
| | | { |
| | | oBill.omodel.HInterID = HInterID; |
| | | oBill.omodel.HBillNo = HBillNo; |
| | | oBill.omodel.HBillSubType = "3772"; |
| | | oBill.omodel.HMainSourceBillSubType = "3710"; |
| | |
| | | oBill.omodel.HYear = DBUtility.ClsPub.isLong(oItemSub.HDate.Year); |
| | | oBill.omodel.HPeriod = DBUtility.ClsPub.isLong(oItemSub.HDate.Month); |
| | | oBill.omodel.HRemark = ""; |
| | | oBill.omodel.HBatchNo = ""; |
| | | oBill.omodel.HBatchNo = oItemSub.HBatchNo; |
| | | oBill.omodel.HMainMaterID = 0; |
| | | oBill.omodel.HKeyMaterID = 0; |
| | | oBill.omodel.HNo = 0; |
| | |
| | | oBill.omodel.HRemark_New = ""; |
| | | oBill.omodel.HWeight_New = 0; |
| | | oBill.omodel.HPlanOrderProcNo = ds.Tables[0].Rows[0]["HPlanOrderProcNo"].ToString(); |
| | | oBill.omodel.HMouldNum = "0"; |
| | | oBill.omodel.HMouldNum = "0"; |
| | | } |
| | | //å表èµå¼ |
| | | for(int i = 0; i < ds.Tables[0].Rows.Count; i++) |
| | |
| | | oItemSubs.HWorkerID = 0; |
| | | oItemSubs.HWorkerNumber = ""; |
| | | oItemSubs.HSourceID = 0; |
| | | oItemSubs.HQty = HQty; |
| | | oItemSubs.HQty = HProQty; |
| | | oItemSubs.HTimeUnit = ""; |
| | | oItemSubs.HPlanWorkTimes = 0; |
| | | oItemSubs.HPlanBeginDate = Convert.ToDateTime(dt.ToShortDateString().ToString()); |
| | |
| | | string sql = string.Empty; |
| | | if (FCusName.Contains("å®ç")) |
| | | sql = $"select top 1 HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID from Gy_BarCodeBill where HSourceInterID =(select distinct HSourceInterID from Cg_POInStockBillSub where HInterID ={HInterID}) and HBarCode = '{HBarcode}' and HBarCodeType ='ç®±å·å
æ¡ç '"; |
| | | else if(FCusName.Contains("æ·»åº·ç§æ")) |
| | | sql = $"select top 1 HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID,HMaterID,HBatchNo,HProduceDate,HExpiryDate from Gy_BarCodeBill where HSourceInterID = {HInterID} and HBarCode = '{HBarcode}' and HBarCodeType ='ç®±å·å
æ¡ç '"; |
| | | else |
| | | sql = $"select HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID from Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode.Split('#')[0]}' and HQty = {HBarcode.Split('#')[1]}"; |
| | | DataSet ds = oCn.RunProcReturn(sql, "H_v_SRM_POOrderBillList"); |
| | | DataSet ds = oCn.RunProcReturn(sql, "Gy_BarCodeBill"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | ",HSTDLABORPREPARETIME,HSTDMACHINEPREPARETIME,HWidth,HWeight,HColorRemark,HQCSchemeID_Fst,HQCSchemeID_Proc,HQCSchemeID_Patrol" + |
| | | ",HMaterRuleType,HColorNo,HPieceMaxQty,HCommonUseFlag,HAvgStockPrice,HFootPrice,HTaxCost,HNoTaxCost,HOnceRightRate" + |
| | | ",HHeight_M,HInches_M,HAl1Long_M,HDensity_M,HTela_M,HUnderTela_M,HSizing_M,HQtyDec,HPriceDec,HMoneyDec,HTaxRate,HProfitRate" + |
| | | ",HLotcardQty" + |
| | | ") " + |
| | | " Values('" + oModel.HNumber + "','" + oModel.HName + "','" + oModel.HHelpCode + "','" + oModel.HShortNumber + "'," + oModel.HParentID.ToString() + |
| | | ", " + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) + ",'" + oModel.HRemark + "'" + |
| | |
| | | "," + oModel.HMoneyDec + |
| | | "," + oModel.HTaxRate + |
| | | "," + oModel.HProfitRate + |
| | | "," + oModel.HLotcardQty + |
| | | ")", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | |
| | | ",HMoneyDec=" + oModel.HMoneyDec.ToString() + |
| | | ",HTaxRate=" + oModel.HTaxRate.ToString() + |
| | | ",HProfitRate=" + oModel.HProfitRate.ToString() + |
| | | ",HLotcardQty=" + oModel.HLotcardQty.ToString() + |
| | | " Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹å项ç®ä»£ç |
| | | oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | |
| | | |
| | | public double HProfitRate; // é»è®¤å©æ¶¦çï¼é»è®¤0ï¼ |
| | | public int HProjectBillMainID; //项ç®å· |
| | | |
| | | public double HLotcardQty; //å个æµè½¬å¡æ°é |
| | | } |
| | | } |