예제 #1
0
 public override void Encode()
 {
     encodeBuf.Clear();
     encodeBuf.AddRange(AddString(DeviceId, 8));
     encodeBuf.AddRange(AddString(StationId, 4));
     encodeBuf.AddRange(AddString(TxnType, 2));
     encodeBuf.AddRange(AddString(TicketRemainAmt.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(Spare.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString("\t", 1));
     encodeBuf.AddRange(AddString(TerminalId, 16));
     encodeBuf.AddRange(AddString("\t", 1));
     encodeBuf.AddRange(AddString(TerminalFlag, 1));
     encodeBuf.AddRange(AddString("\t", 1));
     encodeBuf.AddRange(AddString(LockTime, 14));
     encodeBuf.AddRange(AddString("\t", 1));
     encodeBuf.AddRange(AddString(TicketLogicalId, 16));
     encodeBuf.AddRange(AddString("\t", 1));
     encodeBuf.AddRange(AddString(TicketPhysicalId, 8));
     encodeBuf.AddRange(AddString("\t", 1));
     encodeBuf.AddRange(AddString(TicketMainType, 2));
     encodeBuf.AddRange(AddString("\t", 1));
     encodeBuf.AddRange(AddString(TicketSubType, 2));
     encodeBuf.AddRange(AddString("\t", 1));
     encodeBuf.AddRange(AddString(Spare2.PadLeft(16, '0'), 16));
 }
예제 #2
0
 public override void Encode()
 {
     encodeBuf.Clear();
     encodeBuf.AddRange(AddString(DeviceId, 8));
     encodeBuf.AddRange(AddString(TxnGroupNumber.PadLeft(2, '0'), 2));
     encodeBuf.AddRange(AddString(SerialNumber.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(StationId, 4));
     encodeBuf.AddRange(AddString(TxnType, 2));
     encodeBuf.AddRange(AddString(TicketMainType, 2));
     encodeBuf.AddRange(AddString(TicketSubType, 2));
     encodeBuf.AddRange(AddString(TicketPriceCode, 2));
     encodeBuf.AddRange(AddString(SamCardNumber, 8));
     encodeBuf.AddRange(AddString(TicketLogicalId, 16));
     encodeBuf.AddRange(AddString(TicketWriteCouter.PadLeft(6, '0'), 6));
     encodeBuf.AddRange(AddString(ThisTicketOperateAmt.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(TicketRemainAmt.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(TxnTime, 14));
     encodeBuf.AddRange(AddString(LastTxnDeviceId, 8));
     encodeBuf.AddRange(AddString(LastTxnSerialNumber.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(LastTxnAmt.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(LastTxnTime, 14));
     encodeBuf.AddRange(AddString(TACCode, 8));
     encodeBuf.AddRange(AddString(DegradeMode, 4));
     encodeBuf.AddRange(AddString(EntryStationId, 4));
     encodeBuf.AddRange(AddString(EntryDeviceId, 4));
     encodeBuf.AddRange(AddString(EntryTime, 14));
     encodeBuf.AddRange(AddString(Spare.PadLeft(18, '0'), 18));
 }
예제 #3
0
 public override void Encode()
 {
     encodeBuf.Clear();
     encodeBuf.AddRange(AddString(DeviceId, 8));
     encodeBuf.AddRange(AddString(TxnGroupNumber.PadLeft(2, '0'), 2));
     encodeBuf.AddRange(AddString(SerialNumber.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(StationId, 4));
     encodeBuf.AddRange(AddString(TxnType, 2));
     encodeBuf.AddRange(AddString(TicketMainType, 2));
     encodeBuf.AddRange(AddString(TicketSubType, 2));
     encodeBuf.AddRange(AddString(TicketPriceCode, 2));
     encodeBuf.AddRange(AddString(SamCardNumber, 8));
     encodeBuf.AddRange(AddString(TicketLogicalId.PadLeft(16, '0'), 16));
     encodeBuf.AddRange(AddString(TicketWriteCouter.PadLeft(6, '0'), 6));
     encodeBuf.AddRange(AddString(ThisTicketOperateAmt.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(TicketRemainAmt.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(TxnTime, 14));
     encodeBuf.AddRange(AddString(LastTxnDeviceId, 8));
     encodeBuf.AddRange(AddString(LastTxnSerialNumber.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(LastTxnAmt.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(LastTxnTime, 14));
     encodeBuf.AddRange(AddString(TACCode, 8));
     encodeBuf.AddRange(AddString(PaymentType, 1));
     encodeBuf.AddRange(AddString(PaymentCardId, 16));
     encodeBuf.AddRange(AddString(DestinationStationId, 4));
     encodeBuf.AddRange(AddString(TxReasonCode, 3));
     encodeBuf.AddRange(AddString(DegradeMode, 4));
     encodeBuf.AddRange(AddString(TxTotalaAmt.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(TicketDeposite.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(TxProcessingFee.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(TicketValidDate.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(LastTicketValidDate.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(OperatorId, 6));
     encodeBuf.AddRange(AddString(ShiftId.PadLeft(10, '0'), 10));
     encodeBuf.AddRange(AddString(Spare.PadLeft(20, '0'), 20));
 }