| | |
| | | public MES_CUST_SN FlowCSN { get; set; } |
| | | public List<mes_MOPickList> MoPickList { get; set; } |
| | | public BAS_ITEM_CUST CustInfo { get; set; } |
| | | public double U9Cost = 0; |
| | | #endregion Propertys & Variables |
| | | |
| | | #region Functions |
| | |
| | | } |
| | | |
| | | var wipSn = CurPosition.CurWipSNs.First(); |
| | | //判断当前条码是否在U9投产 |
| | | var begin = DateTime.Now; |
| | | if (Biz.DataSource["YadaU9C"].Client.Queryable<mes_HisBoxBarCode>().Any(q => q.BarCode == wipSn.SN)) |
| | | { |
| | | CurStep.Message = Biz.L("投料错误"); |
| | | CurStep.Status = StepStatus.Error; |
| | | action.Data.ShortMsg = new("投料错误", ShortMessage.Types.Failed); |
| | | action.IsSuccessed = false; |
| | | //action.LocaleMsg = new($"投料错误,条码[{0}]已经在U9有投产记录,不允许在MES重复投入"); |
| | | action.LocaleMsg = new("MES.WorkAction.PackageInputCheck.U9HasHistory", wipSn.SN); |
| | | //重置工序操作 |
| | | CurPosition.ResetNode(); |
| | | return action; |
| | | } |
| | | U9Cost = (DateTime.Now - begin).TotalSeconds; |
| | | |
| | | FlowCSN = Biz.Db.Queryable<MES_CUST_SN>().Where(q => q.FLOW_SN == wipSn.SN || q.CUST_SN == wipSn.SN).First(); |
| | | //找不到生产记录,认为扫描错误 |
| | | if (FlowCSN.IsNullOrEmpty()) |
| | |
| | | ACT_TYPE = NodeAct.ACT_TYPE, |
| | | ACT_SN = wipSn.SN, |
| | | ACT_RESULT = "Y", |
| | | TRACE_INFO = $"条码[{wipSn.SN}]可以在工单[{wipSn.WORK_ORDER}]投料生产", |
| | | TRACE_INFO = $"条码[{wipSn.SN}]可以在工单[{wipSn.WORK_ORDER}]投料生产,其中U9检查耗时{U9Cost:0.0000}秒", |
| | | }; |
| | | wipActs.Add(wipAct); |
| | | } |