/// <summary> /// 查询步号 /// </summary> /// <param name="TrayNO"></param> /// <param name="step"></param> /// <param name="reStr"></param> /// <returns></returns> public bool GetStep(string TrayNO, out int step, ref string reStr) { step = 0; try { if (SysCfg.SysCfgModel.MesOnlineMode) { //从MES查询 throw new NotImplementedException(); } else { //本地查询 palletModel pallet = palletDbBll.GetModel(TrayNO); if (pallet == null) { pallet = new palletModel(); pallet.stepNO = 0; pallet.palletID = TrayNO; pallet.bind = true; pallet.batchName = "空"; palletDbBll.Add(pallet); } step = pallet.stepNO; } return(true); } catch (Exception ex) { reStr = ex.ToString(); return(false); } }
public void GetPalletInfo(Pallet pallet) { palletModel model = bllPallet.GetModel(pallet.PalletID); if (model == null) { this.View.ShowMessage("未找到该编号的托盘", "信息提示"); return; } this.View.ShowPalletInfo(model); }
public bool GetStep(string TrayNO, out int step, ref string reStr) { step = 0; if (CheckPalletNum(TrayNO, ref reStr) == false) { return(false); } palletModel pallet = bllPallet.GetModel(TrayNO); if (pallet == null) { reStr = "不存在此托盘信息!"; return(false); } step = pallet.stepNO; reStr = "获取工步号成功!"; return(true); }
private bool RecordPalletInfo(string palletID, ref string strCataName, ref string reStr) { string strCata = palletID.Substring(10, 1).ToUpper(); int productCata = 0; int step = 0; strCataName = "正极材料"; if (strCata == "C") { strCataName = "正极材料"; productCata = 1; step = 1; } else if (strCata == "A") { strCataName = "负极材料"; productCata = 3; step = 2; } else if (strCata == "S") { strCataName = "隔膜材料"; productCata = 2; step = 0; } else { if (this.db1ValsToSnd[0] != barcodeFailedStat) { logRecorder.AddDebugLog(nodeName, "不可识别的条码类别:" + this.rfidUID); } return(false); } palletBll palletDBll = new palletBll(); palletModel pallet = palletDBll.GetModel(this.rfidUID); if (pallet == null) { pallet = new palletModel(); pallet.stepNO = step; pallet.bind = true; pallet.palletID = this.rfidUID; pallet.palletCata = productCata.ToString(); if (!palletDBll.Add(pallet)) { logRecorder.AddDebugLog(nodeName, string.Format("物料{0}数据记录到数据库发生错误", this.rfidUID)); return(false); } } else { pallet.bind = true; pallet.palletCata = productCata.ToString(); pallet.stepNO = step; if (!palletDBll.Update(pallet)) { logRecorder.AddDebugLog(nodeName, string.Format("物料{0}数据记录到数据库发生错误", this.rfidUID)); return(false); } } return(true); }