public static void PackPassStation(MESPubLab.MESStation.MESStationBase Station, MESPubLab.MESStation.MESStationInput Input, List <MESDataObject.Module.R_Station_Action_Para> Paras) { MESStationSession packSesseion = Station.StationSession.Find(t => t.MESDataType == Paras[0].SESSION_TYPE && t.SessionKey == "1"); T_R_SN tRSn = new T_R_SN(Station.SFCDB, Station.DBType); List <R_SN> rSnList = new List <R_SN>(); rSnList = tRSn.GetSnListByPack(packSesseion.Value.ToString(), Station.SFCDB); if (rSnList.Count == 0) { throw new Exception(MESReturnMessage.GetMESReturnMessage("MSGCODE20180602102010", new string[] { packSesseion.Value.ToString() })); } tRSn.LotsPassStation(rSnList, Station.Line, rSnList[0].NEXT_STATION, rSnList[0].NEXT_STATION, Station.BU, "PASS", Station.LoginUser.EMP_NO, Station.SFCDB); // 過站 //記錄通過數 ,UPH foreach (var snobj in rSnList) { tRSn.RecordUPH(snobj.WORKORDERNO, 1, snobj.SN, "PASS", Station.Line, snobj.NEXT_STATION, Station.LoginUser.EMP_NO, Station.BU, Station.SFCDB); } Station.StationMessages.Add(new StationMessage() { Message = MESReturnMessage.GetMESReturnMessage("MSGCODE20180602102159", new string[] { rSnList[0].SKUNO, packSesseion.Value.ToString(), rSnList.Count.ToString(), rSnList[0].NEXT_STATION }), State = StationMessageState.Pass }); }