| | |
| | | string HMaterShortNumber = ls[0].HMaterShortNumber; |
| | | string HMaterName = ls[0].HMaterName; |
| | | //供应商 |
| | | long HSupID= ls[0].HSupID; |
| | | string HSupName= ls[0].HSupName; |
| | | long HSupID = lsmain[0].HSupID; |
| | | string HMaker= ls[0].HMaker; |
| | | DateTime HMakeDate= ls[0].HMakeDate; |
| | | double HQty= ls[0].HQty; //本次生成条码数量 |
| | |
| | | DataSet Ds; |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | oCn.BeginTran(); |
| | | Ds = oCn.RunProcReturn("exec GetLSH '" + DateTime.Today + "'", "GetLSH"); |
| | | //Ds = oCn.RunProcReturn("exec GetLSH '" + DateTime.Today + "'", "GetLSH"); |
| | | Ds = oCn.RunProcReturn("exec GetLSH '" + HSupID+"_"+ HMaterID+"_" + DateTime.Today+ "'", "GetLSH"); |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | #endregion |
| | | |
| | |
| | | "HBatchNo, HBarcodeQtys, HBarcodeNo, HSupID, HGroupID, HMaker, HMakeDate, HPrintQty, HEndQty, HSupflag, " + |
| | | "HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType, HMTONO, HProduceDate, HExpiryDate, HISKFPERIOD) " + |
| | | "VALUES (" + |
| | | linterid.ToString() + ", '" + TM + "', '" + HBarCodeType + "', " + HMaterID + ", " + "0" + ", " + HQty + ", '" + HKFDate + "', " + HKFPeriod + ", '" + HKFDQDate + "', " + |
| | | 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 + ")"; |
| | | LogService.Write("生成条码: " + sql); |
| | | oCn.RunProc(sql); |
| | | oCn.RunProc("exec setLSH '" + DateTime.Today + "'"); |
| | | oCn.RunProc(sql); |
| | | oCn.RunProc("exec setLSH '" + HSupID + "_" + HMaterID + "_" + DateTime.Today + "'"); |
| | | virtualCount++; |
| | | } |
| | | |
| | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "生成条码成功!"; |
| | | objJsonResult.data = generatedBarcodes; // 返回生成的条码列表 |
| | | objJsonResult.data =string.Join("~", generatedBarcodes); // 返回生成的条码列表 |
| | | WebAPIController.Add_Log("条码下推", UserName, "生成条码"); |
| | | return objJsonResult; |
| | | } |
| | |
| | | } |
| | | |
| | | // 将逗号分隔的条码转换为SQL IN查询条件 |
| | | var barcodeList = barcodes.Split(','); |
| | | var barcodeList = barcodes.Split('~'); |
| | | |
| | | // 构建IN子句,为每个条码添加单引号 |
| | | var inValues = new List<string>(); |