| | |
| | | private int _inferFsc; // 推測出可能受損的設備種類
|
| | | private int _inferUfid; // 推測出可能受損的設備編號
|
| | | private int _parentCaseId = 0;
|
| | | private Equipment _mEquip;
|
| | | private Equipment _equip;
|
| | |
|
| | | private readonly OracleConnection _connectionTpc;
|
| | | private readonly OracleTransaction _transaction;
|
| | |
| | |
|
| | | // int Range = 360; //比事故案件還早多久時間內的案件才作合併 單位:分
|
| | |
|
| | | public JudgeCase(int mFdrId, int mFsc, int mUfid, int mCaseId, string mAcceptDate, OracleConnection connection, OracleTransaction trx, string traceConnection)
|
| | | public JudgeCase(int fdrId, int fsc, int ufid, int caseId, string acceptDate, OracleConnection connection, OracleTransaction trx, string traceConnection)
|
| | | {
|
| | | _damageFdrId = mFdrId;
|
| | | _damageFsc = mFsc;
|
| | | _damageUfid = mUfid;
|
| | | _newCaseId = mCaseId;
|
| | | _acceptDate = mAcceptDate;
|
| | | _damageFdrId = fdrId;
|
| | | _damageFsc = fsc;
|
| | | _damageUfid = ufid;
|
| | | _newCaseId = caseId;
|
| | | _acceptDate = acceptDate;
|
| | |
|
| | | _connectionTpc = connection;
|
| | | _transaction = trx;
|
| | |
| | | }
|
| | | catch (Exception e)
|
| | | {
|
| | | Logger.Error(e.Message);
|
| | | Console.WriteLine(e.StackTrace);
|
| | | Logger.Error(e, e.Message);
|
| | | Logger.Error("尋找母案件時發生錯誤.");
|
| | | throw e;
|
| | | throw ;
|
| | | }
|
| | | finally
|
| | | {
|
| | | if (command != null)
|
| | | command.Dispose();
|
| | | command?.Dispose();
|
| | |
|
| | | if (reader != null)
|
| | | reader.Close();
|
| | | reader?.Close();
|
| | | }
|
| | |
|
| | | // 若事故案件為該饋線上的第一件事故案件時,無須再作追蹤比較
|
| | |
| | | catch (Exception ex)
|
| | | {
|
| | | Logger.Error(ex.Message);
|
| | | throw ex;
|
| | | throw;
|
| | | }
|
| | | Logger.Info("不同變壓器,開始追蹤(New Version)...");
|
| | |
|
| | |
| | | _parentCaseId = Convert.ToInt32(((ArrayList)_mCase[i])[0].ToString());
|
| | | _inferFsc = ((Equipment)_newCase[j]).Fsc;
|
| | | _inferUfid = ((Equipment)_newCase[j]).Ufid;
|
| | | _mEquip = (Equipment)((ArrayList)_mCase[i])[5];
|
| | | _equip = (Equipment)((ArrayList)_mCase[i])[5];
|
| | | Logger.Info("與案件" + ((ArrayList)_mCase[i])[7] + "合併,故障點Fsc: " + _inferFsc + " Ufid: " + _inferUfid);
|
| | | return;
|
| | | }
|
| | |
| | | _parentCaseId = Convert.ToInt32(((ArrayList)_mCase[i])[0].ToString());
|
| | | _inferFsc = damageEquipment.Fsc;
|
| | | _inferUfid = damageEquipment.Ufid;
|
| | | _mEquip = (Equipment)((ArrayList)_mCase[i])[5];
|
| | | _equip = (Equipment)((ArrayList)_mCase[i])[5];
|
| | | Logger.Info("與案件" + ((ArrayList)_mCase[i])[7] + "合併,故障點Fsc: " + _inferFsc + " Ufid: " + _inferUfid);
|
| | | return;
|
| | | }
|
| | |
| | |
|
| | | public Equipment GetOldrEquipment()
|
| | | {
|
| | | return _mEquip;
|
| | | return _equip;
|
| | | }
|
| | |
|
| | | public int GetParentCaseId()
|
| | |
| | | }
|
| | | catch (Exception e)
|
| | | {
|
| | | Logger.Error("Problems occur: " + e.Message);
|
| | | Console.WriteLine(e.StackTrace);
|
| | | Logger.Error(e, "Problems occur: " + e.Message);
|
| | | }
|
| | | finally
|
| | | {
|
| | |
| | | catch (Exception e)
|
| | | {
|
| | | // CCS.GlobalVariable.ErrorLog.setErrorLog("Error in JudgeCase(RealDamageEquipment) :" + e.getMessage());
|
| | | Logger.Error("Problems occur: " + e.Message);
|
| | | Console.WriteLine(e.StackTrace);
|
| | | Logger.Error(e, "Problems occur: " + e.Message);
|
| | | }
|
| | | finally
|
| | | {
|