| | |
| | | { |
| | | #region Propertys & Variables |
| | | #region 固定写法,工序中的必要信息 |
| | | public DbClient MainDB { get; set; } |
| | | public bool IsFinished { get; set; } = false; |
| | | public IWorkStep CurStep { get; set; } |
| | | public IPosition CurPosition { get; set; } |
| | |
| | | public void Init(IWorkStep curStep, IPosition position, MES_WO_NODE_ACT nodeAct, MES_WO_ACTION setting) |
| | | { |
| | | #region 固定写法,给默认变量赋值 |
| | | MainDB = position.MainDB; |
| | | CurStep = curStep; |
| | | CurPosition = position; |
| | | NodeAct = nodeAct; |
| | |
| | | #endregion |
| | | |
| | | //获取当前产品在当前客户的关系 |
| | | CustInfo = Biz.Db.Queryable<BAS_ITEM_CUST>().Where(q => q.ITEM_ID == CurPosition.WorkBatch.WO.ItemInfo.ID && q.CUST_CODE == CurPosition.WorkBatch.WO.CUST_CODE).First(); |
| | | CustInfo = MainDB.Queryable<BAS_ITEM_CUST>().Where(q => q.ITEM_ID == CurPosition.WorkBatch.WO.ItemInfo.ID && q.CUST_CODE == CurPosition.WorkBatch.WO.CUST_CODE).First(); |
| | | |
| | | CurStep.Message = Biz.L("扫描厂内条码或客户条码"); |
| | | CurStep.Status = StepStatus.Normal; |
| | |
| | | } |
| | | 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(); |
| | | FlowCSN = MainDB.Queryable<MES_CUST_SN>().Where(q => q.FLOW_SN == wipSn.SN || q.CUST_SN == wipSn.SN).First(); |
| | | //找不到生产记录,认为扫描错误 |
| | | if (FlowCSN.IsNullOrEmpty()) |
| | | { |