| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString();// |
| | | string msg3 = sArray[1].ToString();// |
| | | string UserName = ""; |
| | | string UserName = sArray[2].ToString(); |
| | | string OrganizationID = sArray[3].ToString(); |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | | lsmain = oListModels.getObjectByJson_MaterialHanding(msg2); |
| | | int get_BarCodecount = 0; |
| | | |
| | | foreach (Model.Cls_MaterialHandingModel oItem in lsmain) |
| | | { |
| | | get_BarCodecount++; |
| | | UserName = oItem.HMaker; |
| | | //UserName = oItem.HMaker; |
| | | } |
| | | DAL.ClsWeb_BarCodeBill oBill = new DAL.ClsWeb_BarCodeBill(); |
| | | msg3 = msg3.Substring(1, msg3.Length - 2); |
| | |
| | | |
| | | ls = oListModels.getObjectByJson_BarCodeBill(msg3);//列表数据model |
| | | |
| | | if (ls.Count > 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "每次只允许选择一个物料生成条码,请退出重新选择一行物料,不允许选择多行物料!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | #region 数据准备 |
| | | long linterid = Pub_Class.ClsPub.CreateBillID_SRMProd("8888", ref DBUtility.ClsPub.sExeReturnInfo); |
| | |
| | | : HMinQty; |
| | | ///供应商名称+@+物料代码+@+物料简称+@+数量+@条码数+@+日期+@+流水号 |
| | | LSH += 1; |
| | | TM = $"{oItemSub.HSupName}@{oItemSub.HMaterID}@{oItemSub.HMaterName}@{currentQty}@{HBarCodeDate_1}@{LSH}"; |
| | | TM = $"{oItemSub.HSupName}@{oItemSub.HMaterNumber}@{oItemSub.HSubjoin}@{currentQty}@{HBarCodeDate_1}@{LSH.ToString("D7")}"; |
| | | //TM = $"{oItemSub.HSupName}@{oItemSub.HMaterID}@{oItemSub.HMaterName}@{oItemSub.biaoqianzhangshu}@{HKFDate_1}@{LSH}"; |
| | | // 添加到生成的条码列表 |
| | | generatedBarcodes.Add(TM); |
| | |
| | | // + HKFDate + "','" + HKFDQDate + "'," + HISKFPERIOD + ")"; |
| | | sql = "INSERT INTO Gy_BarCodeBill (HInterID, HBarCode, HBarCodeType, HMaterID, HUnitID, HQty, HKFDate, HKFPeriod, HKFDQDate, " + |
| | | "HBatchNo, HBarcodeQtys, HBarcodeNo, HSupID, HGroupID, HMaker, HMakeDate, HPrintQty, HEndQty, HSupflag, " + |
| | | "HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType, HMTONO, HProduceDate, HExpiryDate, HISKFPERIOD,HStatusMan,HBarCodeDate,HinitQty) " + |
| | | "HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType, HMTONO, HProduceDate, HExpiryDate, HISKFPERIOD,HStatusMan,HBarCodeDate,HinitQty,HSTOCKORGID,HOWNERID) " + |
| | | "VALUES (" + |
| | | linterid.ToString() + ", '" + TM + "', '" + HBarCodeType + "', " + HMaterID + ", " + "0" + ", " + currentQty + ", '" + HKFDate + "', " + HKFPeriod + ", '" + HKFDQDate + "', " + |
| | | "'" + HBatchNo + "', " + get_BarCodecount + ", '" + virtualCount + "', " + HSupID + ", " + "0" + ", '" + ClsPub.CurUserName + "', '" + DateTime.Today.ToString("yyyy-MM-dd") + "', " + "1" + ", " + "0" + ", 1, " + |
| | | "1, 1, '1', '" + HSourceBillType + "', '1', '" + |
| | | HKFDate + "', '" + HKFDQDate + "', " + HISKFPERIOD + ",'" + HStatusMan + "','" + HBarCodeDate + "','" + currentQty + "'" + ")"; |
| | | linterid.ToString() + ", '" + TM + "', '" + HBarCodeType + "', " + HMaterID + ", " + "0" + ", " + currentQty + ", '" + null + "', " + HKFPeriod + ", '" + null + "', " + |
| | | "'" + HBatchNo + "', " + get_BarCodecount + ", '" + virtualCount + "', " + HSupID + ", " + "0" + ", '" + UserName + "',getdate()" + "," + "0" + ", " + "0" + ", 1, " + |
| | | "0, 0, '', '" + HSourceBillType + "', '', '" + |
| | | null + "', '" + null + "', " + HISKFPERIOD + ",'" + HStatusMan + "','" + HBarCodeDate + "','" + currentQty + "'," + OrganizationID + "," + OrganizationID + "," + null + ")"; |
| | | LogService.Write("生成条码: " + sql); |
| | | oCn.RunProc(sql); |
| | | oCn.RunProc("exec h_p_WMS_SetMaxNo '" + HSupID + "_" + HMaterID + "_" + HBarCodeDate + "'"); |