private static void Dowork(string dqsj) { int crewID; int shiftID; CrewShifter.CrewShif(out crewID, out shiftID); BaseData bd = new BaseData(opc.opcItem, opc.ItemValue, db_Conn, crewID, shiftID, dqsj); try { TemperingFurnace tf = new TemperingFurnace(bd); PlateData pd = new PlateData(bd); //取消计划 pd.CanclePlateData(); //Logger.logwrite("EnterFurnace"); // 钢板装炉完成 tf.EnterFurnace(); // 炉内各区段的信号响应(预热、加热、均热) tf.OnSection(); //Logger.logwrite("OutFurnaceFinish"); // 钢板出炉完成 tf.OutFurnaceFinish(); // 炉前剔除 //tf.OnReject(); // 关联计划信息 pd.AddPlateData(); } catch (Exception ex2) { string errtxt = "处理出错!+++++" + ex2.Message; Logger.logwrite(errtxt); } }
private static void DoMonitorwork(Dictionary <string, string> values, string dqsj) { int crewID; int shiftID; CrewShifter.CrewShif(out crewID, out shiftID); MonitorBaseData mbd = new MonitorBaseData(opc.ItemValueMonitor, db_Conn, crewID, shiftID, dqsj); try { MonitorWorker mw = new MonitorWorker(mbd); mw.SaveTemp(); mw.SaveMeas(); mw.Consume(); // 煤气消耗 //mw.SaveTrack(); //mw.DealRepeateCancle(); } catch (Exception ex2) { string errtxt = "数据库连接出错!" + ex2.Message; Logger.Errlogwrite(errtxt); } }