| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619 |
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Configuration;
- using System.IO.Ports;
- using System.Linq;
- using System.Text;
- using System.Threading;
- using log4net;
- using Timer = System.Timers.Timer;
- using Common;
- using System.Collections;
- using HengShan_Pump_NonIC.MessageEntity;
- using DeviceProcessor;
- using Wayne.FDCPOSLibrary;
- using Common.Config;
- using System.Xml;
- namespace HengShan_Pump_NonIC
- {
- public class PumpHandler : IFdcPumpController, IHandler<byte[], NonICMessageTemplateBase>
- {
- private object syncObject = new object();
- private System.Timers.Timer polling;
- //static ILog fdcLogger = log4net.LogManager.GetLogger("FdcServer");
- static ILog logger = log4net.LogManager.GetLogger("PumpHandler");
- protected IContext<byte[], NonICMessageTemplateBase> context;
- public event EventHandler<FdcPumpControllerOnStateChangeEventArg> OnStateChange;
- /// <summary>
- /// fired on fueling process is on going, the fuel amount should keep changing.
- /// </summary>
- public event EventHandler<FdcTransactionDoneEventArg> OnCurrentFuellingStatusChange;
- protected LogicalDeviceState lastLogicalDeviceState = LogicalDeviceState.FDC_CLOSED;
- protected DateTime lastLogicalDeviceStateReceivedTime;
- // by seconds
- public const int lastLogicalDeviceStateExpiredTime = 6;
- private AutoResetEvent waitResponseBlocker = new AutoResetEvent(false);
- private int waitResponseBlockerTime = 11 * 1000;
- private StartResponse lastStartResponse;
- private SetFuelPriceResponse lastSetFuelPriceResponse;
- private GetAccumulateResponse lastGetAccumulateResponse;
- private AuthPumpWithAmountResponse lastAuthPumpWithAmountResponse;
- private AuthPumpWithGallonResponse lastAuthPumpWithGallonResponse;
- private AuthPumpWithKiloResponse lastAuthPumpWithKiloResponse;
- private RoundUpByAmountResponse lastRoundUpByAmountResponse;
- private Guid uniqueId = Guid.NewGuid();
- private int pumpId = -1;
- protected int pollingInterval = 600;
- protected List<LogicalNozzle> nozzles = new List<LogicalNozzle>();
- /// <summary>
- /// this type of pump state change is detected by FC actively polling, then state is always delay reported, so there's a corner case that in a fueling process,
- /// the attendants put back and pull out nozzle very quickly and it happened exactly in the middle of a polling, meanwhile,
- /// an auth request was done to auth the pump again(most likely the autoAuthCallingPump set with True),
- /// then the pump state returned from physical pump will still be read as a fueling state, but actually the
- /// 2nd fueling process is started, so detect the pump state is not enough, need detect if the fueling seq number reset to null(if place back nozzle detected) or not.
- /// </summary>
- protected GetNozzleStatusResponse previousUnfinishedFuelingNozzleStatus;
- public IEnumerable<LogicalNozzle> Nozzles => this.nozzles;
- protected void FireOnStateChangeEvent(LogicalDeviceState state)
- {
- var safe = this.OnStateChange;
- safe?.Invoke(this, new FdcPumpControllerOnStateChangeEventArg(state, this.nozzles.First()));
- }
- protected void FireOnCurrentFuellingStatusChangeEvent(FdcTransaction trx)
- {
- var safe = this.OnCurrentFuellingStatusChange;
- safe?.Invoke(this, new FdcTransactionDoneEventArg(trx));
- }
- /// <summary>
- /// 恒山非IC油机
- /// </summary>
- /// <param name="pumpId"></param>
- /// <param name="nozzlesXmlConfiguration"></param>
- public PumpHandler(int pumpId, string nozzlesXmlConfiguration)
- {
- this.pumpId = pumpId;
- // real nozzle Id put hardcode 1 here since HengShan_pump_nonIC only have 1 nozzle per pump.
- // price is not dectected yet, put Null.
- this.nozzles.Add(new LogicalNozzle(pumpId, 1, 1, null));
- }
- private void ResetAllCachedResponse()
- {
- this.lastStartResponse = null;
- this.lastSetFuelPriceResponse = null;
- this.lastGetAccumulateResponse = null;
- this.lastAuthPumpWithAmountResponse = null;
- this.lastAuthPumpWithGallonResponse = null;
- this.lastAuthPumpWithKiloResponse = null;
- this.lastRoundUpByAmountResponse = null;
- }
- protected bool isSafeForSend = false;
- public void Init(IContext<byte[], NonICMessageTemplateBase> context)
- {
- this.context = context;
- this.polling = new Timer(this.pollingInterval);
- this.polling.Elapsed += (_, __) =>
- {
- lock (this.syncObject)
- {
- this.isSafeForSend = false;
- context.Outgoing.Write(new GetNozzleStatusRequest());
- }
- };
- this.polling.Start();
- }
- public virtual void Process(IContext<byte[], NonICMessageTemplateBase> context)
- {
- this.context = context;
- this.ResetAllCachedResponse();
- if (context.Incoming.Message is GetNozzleStatusResponse getNozzleStatusResponse)
- {
- this.isSafeForSend = true;
- this.lastLogicalDeviceStateReceivedTime = DateTime.Now;
- // put the price by reading the real price.
- this.nozzles.First().RealPriceOnPhysicalPump = getNozzleStatusResponse.单价;
- var latestStatus = getNozzleStatusResponse.GetPumpStatus();
- if (latestStatus.Any(f => f == GetNozzleStatusResponse.PumpStatus.油枪打开)
- && latestStatus.Any(f => f == GetNozzleStatusResponse.PumpStatus.加油结束)
- && latestStatus.Any(f => f == GetNozzleStatusResponse.PumpStatus.不允许加油)
- && latestStatus.Any(f => f == GetNozzleStatusResponse.PumpStatus.电机关)
- && !latestStatus.Any(f => f == GetNozzleStatusResponse.PumpStatus.加油过程))
- {
- logger.Debug("非加油状态下的提枪");
- /* 非加油状态下的提枪 */
- if (this.lastLogicalDeviceState == LogicalDeviceState.FDC_AUTHORISED)
- {
- //说明是未提枪时就已经auth成功了,所以还是保持发送 FDC_AUTHORISED 的状态给FdcClient。
- logger.Debug(" 未提枪时就已经auth成功了");
- }
- else
- {
- if (this.previousUnfinishedFuelingNozzleStatus != null)
- {
- // no data loss since getNozzleStatusResponse will still carry last trx data until an auth.
- logger.Info("Detected a fast put back and pull out nozzle case(action time < polling time cause nozzle place back not detected)," +
- "\r\n will fire the trx done event for earlier trx(no data loss)->\r\n "
- + "seqNo: " + getNozzleStatusResponse.流水号
- + ", amount: " + getNozzleStatusResponse.加油金额
- + ", volume: " + getNozzleStatusResponse.加油金额
- + ", price: " + getNozzleStatusResponse.单价);
- logger.Info(" State switched to FDC_READY(simulate)");
- this.lastLogicalDeviceState = LogicalDeviceState.FDC_READY;
- this.FireOnStateChangeEvent(LogicalDeviceState.FDC_READY);
- this.FireOnCurrentFuellingStatusChangeEvent(new FdcTransaction()
- {
- // 恒山油机只有一把枪
- Nozzle = this.nozzles.First(),
- Amount = getNozzleStatusResponse.加油金额,
- Volumn = getNozzleStatusResponse.加油量,
- Price = getNozzleStatusResponse.单价,
- SequenceNumberGeneratedOnPhysicalPump = getNozzleStatusResponse.流水号,
- Finished = true,
- });
- }
- if (this.lastLogicalDeviceState != LogicalDeviceState.FDC_CALLING)
- {
- logger.Debug(" State switched to FDC_CALLING");
- //直接提枪了
- this.lastLogicalDeviceState = LogicalDeviceState.FDC_CALLING;
- var safe = this.OnStateChange;
- safe?.Invoke(this, new FdcPumpControllerOnStateChangeEventArg(LogicalDeviceState.FDC_CALLING, this.nozzles.First()));
- }
- }
- }
- else if (latestStatus.Any(f => f == GetNozzleStatusResponse.PumpStatus.允许加油)
- && latestStatus.Any(f => f == GetNozzleStatusResponse.PumpStatus.油枪打开)
- && (latestStatus.Any(f => f == GetNozzleStatusResponse.PumpStatus.加油过程)
- || latestStatus.Any(f => f == GetNozzleStatusResponse.PumpStatus.电机打开)))
- {
- //status code: B1
- logger.Debug("正处于加油状态下");
- /* 正处于加油状态下 */
- this.previousUnfinishedFuelingNozzleStatus = getNozzleStatusResponse;
- if (this.lastLogicalDeviceState != LogicalDeviceState.FDC_FUELLING)
- {
- logger.Debug(" State switched to FDC_FUELLING");
- this.lastLogicalDeviceState = LogicalDeviceState.FDC_FUELLING;
- var safe0 = this.OnStateChange;
- safe0?.Invoke(this, new FdcPumpControllerOnStateChangeEventArg(LogicalDeviceState.FDC_FUELLING, this.nozzles.First()));
- }
- //fire fuelling progress.
- var safe1 = this.OnCurrentFuellingStatusChange;
- safe1?.Invoke(this, new FdcTransactionDoneEventArg(new FdcTransaction()
- {
- // 恒山油机只有一把枪
- Nozzle = this.nozzles.First(),
- Amount = getNozzleStatusResponse.加油金额,
- Volumn = getNozzleStatusResponse.加油量,
- Price = getNozzleStatusResponse.单价,
- SequenceNumberGeneratedOnPhysicalPump = getNozzleStatusResponse.流水号,
- Finished = false,
- }));
- }
- else if (latestStatus.Any(f => f == GetNozzleStatusResponse.PumpStatus.加油结束))
- {
- /* 油机首次上电也会进入此处,并不断发送上一次的加油记录,这种情况下的交易记录并无法判断其之前是否已经发送至系统(并存入数据库),
- 所以继续往系统里送入,由系统判断重复情况。 而其它正常加油过程中的交易记录仅在油机状态变化时才送入系统。*/
- // status code: 40
- logger.Debug("收到状态: 加油结束");
- this.previousUnfinishedFuelingNozzleStatus = null;
- if (this.lastLogicalDeviceState != LogicalDeviceState.FDC_READY)
- {
- logger.Debug(" State switched to FDC_READY");
- lastLogicalDeviceState = LogicalDeviceState.FDC_READY;
- var safe0 = this.OnStateChange;
- safe0?.Invoke(this, new FdcPumpControllerOnStateChangeEventArg(LogicalDeviceState.FDC_READY, null));
- if (getNozzleStatusResponse.加油量 != 0 || getNozzleStatusResponse.加油金额 != 0)
- {
- var safe1 = this.OnCurrentFuellingStatusChange;
- safe1?.Invoke(this, new FdcTransactionDoneEventArg(new FdcTransaction()
- {
- // 恒山油机 一个加油点只有一把枪
- Nozzle = this.nozzles.First(),
- Amount = getNozzleStatusResponse.加油金额,
- Volumn = getNozzleStatusResponse.加油量,
- Price = getNozzleStatusResponse.单价,
- SequenceNumberGeneratedOnPhysicalPump = getNozzleStatusResponse.流水号,
- Finished = true,
- }));
- }
- }
- }
- }
- else if (context.Incoming.Message is GetAccumulateResponse)
- {
- logger.Info(" incoming GetAccumulateResponse, will Set() a signal");
- var _ = context.Incoming.Message as GetAccumulateResponse;
- this.lastGetAccumulateResponse = _;
- this.waitResponseBlocker.Set();
- }
- else if (context.Incoming.Message is SetFuelPriceResponse)
- {
- logger.Info(" incoming SetFuelPriceResponse, will Set() a signal");
- var _ = context.Incoming.Message as SetFuelPriceResponse;
- this.lastSetFuelPriceResponse = _;
- this.waitResponseBlocker.Set();
- }
- else if (context.Incoming.Message is StartResponse)
- {
- logger.Info(" incoming StartResponse, will Set() a signal");
- var _ = context.Incoming.Message as StartResponse;
- this.lastStartResponse = _;
- this.waitResponseBlocker.Set();
- //if (this.lastLogicalDeviceState != LogicalDeviceState.FDC_AUTHORISED)
- //{
- // // switch state
- // this.lastLogicalDeviceState = LogicalDeviceState.FDC_AUTHORISED;
- // var safe = this.OnStateChange;
- // safe?.Invoke(this, new FdcPumpControllerOnStateChangeEventArg(LogicalDeviceState.FDC_AUTHORISED));
- //}
- }
- else if (context.Incoming.Message is AuthPumpWithAmountResponse)
- {
- logger.Info(" incoming AuthPumpWithAmountResponse, will Set() a signal");
- var _ = context.Incoming.Message as AuthPumpWithAmountResponse;
- this.lastAuthPumpWithAmountResponse = _;
- this.waitResponseBlocker.Set();
- }
- else if (context.Incoming.Message is AuthPumpWithGallonResponse)
- {
- logger.Info(" incoming AuthPumpWithGallonResponse, will Set() a signal");
- var _ = context.Incoming.Message as AuthPumpWithGallonResponse;
- this.lastAuthPumpWithGallonResponse = _;
- this.waitResponseBlocker.Set();
- }
- else if (context.Incoming.Message is AuthPumpWithKiloResponse)
- {
- logger.Info(" incoming AuthPumpWithKiloResponse, will Set() a signal");
- var _ = context.Incoming.Message as AuthPumpWithKiloResponse;
- this.lastAuthPumpWithKiloResponse = _;
- this.waitResponseBlocker.Set();
- }
- else if (context.Incoming.Message is RoundUpByAmountResponse)
- {
- logger.Info(" incoming RoundUpByAmountResponse, will Set() a signal");
- var _ = context.Incoming.Message as RoundUpByAmountResponse;
- this.lastRoundUpByAmountResponse = _;
- this.waitResponseBlocker.Set();
- }
- }
- public void Dispose()
- {
- this.polling.Stop();
- }
- public string Name => this.GetType().FullName;
- public Guid Id => this.uniqueId;
- /// <summary>
- /// Gets the Identification of the pump for the system. Is the logical number of the pump
- /// </summary>
- public int PumpId => this.pumpId;
- /// <summary>
- /// this pump have no way to share same comport since this HengShan protocol content does not contains
- /// any id info, so always static 0 here.
- /// 地址面地址
- /// </summary>
- public int PumpPhysicalId => 0;
- public int AmountDecimalDigits => 2;
- public int VolumeDecimalDigits => 2;
- public int PriceDecimalDigits => 2;
- public int VolumeTotalizerDecimalDigits => 2;
- public virtual LogicalDeviceState QueryStatus()
- {
- // if last state is expired, we return a OFFLINE here to FdcClient.
- if (DateTime.Now.Subtract(this.lastLogicalDeviceStateReceivedTime).TotalSeconds > lastLogicalDeviceStateExpiredTime)
- {
- if (this.lastLogicalDeviceState != LogicalDeviceState.FDC_OFFLINE)
- {
- this.lastLogicalDeviceState = LogicalDeviceState.FDC_OFFLINE;
- logger.Info(" State switched to FDC_OFFLINE due to cached state expired");
- var safe0 = this.OnStateChange;
- safe0?.Invoke(this, new FdcPumpControllerOnStateChangeEventArg(LogicalDeviceState.FDC_OFFLINE, null));
- }
- return LogicalDeviceState.FDC_OFFLINE;
- }
- return this.lastLogicalDeviceState;
- }
- private const int safeWaitMaxWaitTimes = 10;
- protected bool SafeWait()
- {
- int waitedTimes = 0;
- while (!this.isSafeForSend)
- {
- waitedTimes++;
- if (waitedTimes >= safeWaitMaxWaitTimes)
- {
- logger.Info("safe wait failed!");
- return false;
- }
- Thread.Sleep(300);
- }
- return true;
- }
- /// <summary>
- ///
- /// </summary>
- /// <returns>MoneyTotalizer:VolumnTotalizer</returns>
- public Tuple<int, int> QueryTotalizer(byte logicalNozzleId)
- {
- lock (this.syncObject)
- {
- if (this.lastLogicalDeviceState == LogicalDeviceState.FDC_CLOSED
- || this.lastLogicalDeviceState == LogicalDeviceState.FDC_OFFLINE)
- return new Tuple<int, int>(-1, -1);
- if (!this.SafeWait()) return new Tuple<int, int>(-2, -2);
- this.context.Outgoing.Write(new GetAccumulateRequest());
- logger.Info(" QueryTotalizer waitOne");
- var got = this.waitResponseBlocker.WaitOne(this.waitResponseBlockerTime);
- if (got)
- {
- if (this.lastGetAccumulateResponse == null)
- {
- logger.Info("lastGetAccumulateResponse is Null");
- return new Tuple<int, int>(-1, -1);
- }
- else
- return new Tuple<int, int>(this.lastGetAccumulateResponse.金额累计, this.lastGetAccumulateResponse.升累计);
- }
- logger.Info("QueryTotalizer timed out");
- return new Tuple<int, int>(-1, -1);
- }
- }
- public virtual bool ChangeFuelPrice(int newPriceWithoutDecimalPoint, byte logicalNozzleId)
- {
- //fdcLogger.Info(this.GetType().Name + "with id: " + this.pumpId + " is trying to change fuel price to: " + newPrice);
- /* this type of pump only have 1 nozzle, so logicalNozzleId is meaningless */
- lock (this.syncObject)
- {
- if (this.lastLogicalDeviceState == LogicalDeviceState.FDC_CLOSED
- || this.lastLogicalDeviceState == LogicalDeviceState.FDC_OFFLINE)
- return false;
- if (!this.SafeWait()) return false;
- this.context.Outgoing.Write(new SetFuelPriceRequest() { FuelPrice = newPriceWithoutDecimalPoint });
- logger.Info(" ChangeFuelPrice waitOne");
- var got = this.waitResponseBlocker.WaitOne(this.waitResponseBlockerTime);
- if (got)
- {
- if (this.lastSetFuelPriceResponse == null)
- {
- logger.Info("lastSetFuelPriceResponse is Null");
- return false;
- }
- else if (this.lastSetFuelPriceResponse.EnumResult != NonICMessageTemplateBase.Result.成功)
- {
- logger.Info("lastSetFuelPriceResponse is 失败");
- return false;
- }
- return true;
- }
- return false;
- }
- }
- /// <summary>
- ///
- /// </summary>
- /// <param name="logicalNozzleId">useless for this type of pump, it always one pump one nozzle</param>
- /// <returns></returns>
- public virtual bool Authorize(byte logicalNozzleId)
- {
- lock (this.syncObject)
- {
- if (!this.SafeWait()) return false;
- this.context.Outgoing.Write(new StartRequest());
- logger.Info(" Authorize waitOne");
- var got = this.waitResponseBlocker.WaitOne(this.waitResponseBlockerTime);
- if (got)
- {
- if (this.lastStartResponse == null)
- {
- logger.Info("lastStartResponse is Null");
- return false;
- }
- else if (this.lastStartResponse.EnumResult != NonICMessageTemplateBase.Result.成功)
- {
- logger.Info("lastStartResponse is 失败");
- return false;
- }
- else
- {
- if (this.lastLogicalDeviceState != LogicalDeviceState.FDC_AUTHORISED)
- {
- this.lastLogicalDeviceState = LogicalDeviceState.FDC_AUTHORISED;
- var safe = this.OnStateChange;
- safe?.Invoke(this, new FdcPumpControllerOnStateChangeEventArg(LogicalDeviceState.FDC_AUTHORISED, this.nozzles.First()));
- }
- return true;
- }
- }
- return false;
- }
- }
- /// <summary>
- ///
- /// </summary>
- /// <param name="moneyAmount"></param>
- /// <param name="logicalNozzleId">useless for this type of pump, it always one pump one nozzle</param>
- /// <returns></returns>
- public virtual bool AuthorizeWithAmount(int moneyAmountWithoutDecimalPoint, byte logicalNozzleId)
- {
- lock (this.syncObject)
- {
- if (!this.SafeWait()) return false;
- this.context.Outgoing.Write(new AuthPumpWithAmountRequest() { Amount = moneyAmountWithoutDecimalPoint });
- logger.Info(" Authorize(amount) waitOne");
- var got = this.waitResponseBlocker.WaitOne(this.waitResponseBlockerTime);
- if (got)
- {
- if (this.lastAuthPumpWithAmountResponse == null)
- { logger.Info("lastAuthPumpWithAmountResponse is Null"); return false; }
- else if (this.lastAuthPumpWithAmountResponse.EnumResult != NonICMessageTemplateBase.Result.成功)
- { logger.Info("lastAuthPumpWithAmountResponse is 失败"); return false; }
- else
- {
- if (this.lastLogicalDeviceState != LogicalDeviceState.FDC_AUTHORISED)
- {
- lastLogicalDeviceState = LogicalDeviceState.FDC_AUTHORISED;
- var safe = this.OnStateChange;
- safe?.Invoke(this, new FdcPumpControllerOnStateChangeEventArg(LogicalDeviceState.FDC_AUTHORISED, this.nozzles.First()));
- }
- Thread.Sleep(500);
- return this.Authorize(logicalNozzleId);
- };
- }
- else
- return false;
- }
- }
- /// <summary>
- ///
- /// </summary>
- /// <param name="volumn"></param>
- /// <param name="logicalNozzleId">useless for this type of pump, it always one pump one nozzle</param>
- /// <returns></returns>
- public virtual bool AuthorizeWithVolumn(int volumnWithoutDecimalPoint, byte logicalNozzleId)
- {
- lock (this.syncObject)
- {
- if (!this.SafeWait()) return false;
- this.context.Outgoing.Write(new AuthPumpWithGallonRequest() { Gallon = volumnWithoutDecimalPoint });
- logger.Info(" Authorize(vol) waitOne");
- var got = this.waitResponseBlocker.WaitOne(this.waitResponseBlockerTime);
- if (got)
- {
- if (this.lastAuthPumpWithGallonResponse == null)
- {
- logger.Info("lastAuthPumpWithGallonResponse is Null");
- return false;
- }
- else if (this.lastAuthPumpWithGallonResponse.EnumResult != NonICMessageTemplateBase.Result.成功)
- {
- logger.Info("lastAuthPumpWithGallonResponse is 失败");
- return false;
- }
- else
- {
- if (this.lastLogicalDeviceState != LogicalDeviceState.FDC_AUTHORISED)
- {
- lastLogicalDeviceState = LogicalDeviceState.FDC_AUTHORISED;
- var safe = this.OnStateChange;
- safe?.Invoke(this, new FdcPumpControllerOnStateChangeEventArg(LogicalDeviceState.FDC_AUTHORISED, this.nozzles.First()));
- }
- Thread.Sleep(500);
- return this.Authorize(logicalNozzleId);
- }
- }
- return false;
- }
- }
- public virtual bool FuelingRoundUpByAmount()
- {
- lock (this.syncObject)
- {
- if (!this.SafeWait()) return false;
- this.context.Outgoing.Write(new RoundUpByAmountRequest());
- logger.Info(" FuelingRoundUpByAmount(vol) waitOne");
- var got = this.waitResponseBlocker.WaitOne(this.waitResponseBlockerTime);
- if (got)
- {
- if (this.lastRoundUpByAmountResponse == null)
- {
- logger.Info("lastRoundUpByAmountResponse is Null");
- return false;
- }
- else if (this.lastRoundUpByAmountResponse.EnumResult != NonICMessageTemplateBase.Result.成功)
- {
- logger.Info("lastRoundUpByAmountResponse is 失败");
- return false;
- }
- return true;
- }
- return false;
- }
- }
- #region not implemented
- public bool TerminateFuelling()
- {
- throw new NotImplementedException();
- }
- public bool SuspendFuelling()
- {
- throw new NotImplementedException();
- }
- public bool ResumeFuelling()
- {
- throw new NotImplementedException();
- }
- public bool FuelingRoundUpByVolumn()
- { throw new NotImplementedException(); }
- public void OnFdcServerInit(Dictionary<string, object> parameters)
- {
- //throw new NotImplementedException();
- }
- #endregion
- }
- }
|