From fb9b2633816f3080112700d2a36fdcbec8bbee26 Mon Sep 17 00:00:00 2001 From: Vitaly Kravtsov Date: Wed, 20 Oct 2021 23:29:36 +0300 Subject: [PATCH] [-] Fixed android version --- .../src/com/shtrih/util/ServiceVersion.java | 2 +- .../shtrih/tinyjavapostester/FFD105Documents.java | 12 ++++++------ .../com/shtrih/tinyjavapostester/MainActivity.java | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/FiscalPrinterService/src/com/shtrih/util/ServiceVersion.java b/Source/FiscalPrinterService/src/com/shtrih/util/ServiceVersion.java index 4f6e853d..c2ef01cc 100644 --- a/Source/FiscalPrinterService/src/com/shtrih/util/ServiceVersion.java +++ b/Source/FiscalPrinterService/src/com/shtrih/util/ServiceVersion.java @@ -1,5 +1,5 @@ package com.shtrih.util; public class ServiceVersion { - public static final String VERSION = "633-2-ga2e40fe"; + public static final String VERSION = "634"; } \ No newline at end of file diff --git a/Source/android/tinyJavaPosTester/src/com/shtrih/tinyjavapostester/FFD105Documents.java b/Source/android/tinyJavaPosTester/src/com/shtrih/tinyjavapostester/FFD105Documents.java index da83ff02..bf6a6260 100644 --- a/Source/android/tinyJavaPosTester/src/com/shtrih/tinyjavapostester/FFD105Documents.java +++ b/Source/android/tinyJavaPosTester/src/com/shtrih/tinyjavapostester/FFD105Documents.java @@ -3,7 +3,7 @@ import com.shtrih.barcode.PrinterBarcode; import com.shtrih.fiscalprinter.GCNGenerator; import com.shtrih.fiscalprinter.ShtrihFiscalPrinter; -import com.shtrih.fiscalprinter.SmFiscalPrinterException; +import com.shtrih.fiscalprinter.DeviceException; import com.shtrih.fiscalprinter.TLVWriter; import com.shtrih.fiscalprinter.command.DeviceMetrics; import com.shtrih.fiscalprinter.command.FSDocType; @@ -44,7 +44,7 @@ public void openShift(ShtrihFiscalPrinter printer, InputParameters inputParamete if (printerStatus.getPrinterMode().isDayOpened()) { throw JposExceptionHandler.getJposException( - new SmFiscalPrinterException(2, "Открытая смена, операция невозможна")); + new DeviceException(2, "Открытая смена, операция невозможна")); } // 1021, кассир @@ -74,7 +74,7 @@ public void closeShift(ShtrihFiscalPrinter printer, InputParameters inputParamet if (printerStatus.getPrinterMode().isDayClosed()) { throw JposExceptionHandler.getJposException( - new SmFiscalPrinterException(2, "Закрытая смена, операция невозможна")); + new DeviceException(2, "Закрытая смена, операция невозможна")); } // 1021, кассир @@ -120,7 +120,7 @@ public void processCorrectionCheck(ShtrihFiscalPrinter printer, CheckCorrectionP if (printerStatus.getPrinterMode().isDayClosed()) { throw JposExceptionHandler.getJposException( - new SmFiscalPrinterException(2, "Закрытая смена, операция невозможна")); + new DeviceException(2, "Закрытая смена, операция невозможна")); } printer.fsStartCorrectionReceipt(); @@ -183,7 +183,7 @@ public void processCheck(ShtrihFiscalPrinter printer, CheckPackage params, boole // в открытие смены не будет передан ИНН кассира if (printerStatus.getPrinterMode().isDayClosed()) { throw JposExceptionHandler.getJposException( - new SmFiscalPrinterException(2, "Закрытая смена, операция невозможна")); + new DeviceException(2, "Закрытая смена, операция невозможна")); } if (isCashCore(printer)) { @@ -492,7 +492,7 @@ private void prepare(ShtrihFiscalPrinter printer) throws JposException { if (status.getSubmode() == 1 || status.getSubmode() == 2) { final int errorCodeNoPaper = 107; throw JposExceptionHandler.getJposException( - new SmFiscalPrinterException(errorCodeNoPaper, "Отсутствует бумага")); + new DeviceException(errorCodeNoPaper, "Отсутствует бумага")); } // проверяем, есть ли открытый документ в ФН diff --git a/Source/android/tinyJavaPosTester/src/com/shtrih/tinyjavapostester/MainActivity.java b/Source/android/tinyJavaPosTester/src/com/shtrih/tinyjavapostester/MainActivity.java index 1fbc91b5..33912df9 100644 --- a/Source/android/tinyJavaPosTester/src/com/shtrih/tinyjavapostester/MainActivity.java +++ b/Source/android/tinyJavaPosTester/src/com/shtrih/tinyjavapostester/MainActivity.java @@ -41,7 +41,7 @@ import com.shtrih.barcode.PrinterBarcode; import com.shtrih.fiscalprinter.FontNumber; import com.shtrih.fiscalprinter.ShtrihFiscalPrinter; -import com.shtrih.fiscalprinter.SmFiscalPrinterException; +import com.shtrih.fiscalprinter.DeviceException; import com.shtrih.fiscalprinter.TLVTag; import com.shtrih.fiscalprinter.TLVItem; import com.shtrih.fiscalprinter.TLVItems; @@ -2376,8 +2376,8 @@ protected String doInBackground(Void... params) { } catch (JposException e) { Throwable cause = e.getCause(); - if (cause instanceof SmFiscalPrinterException) { - if (((SmFiscalPrinterException) cause).getCode() == SMFP_EFPTR_INVALID_TABLE) { + if (cause instanceof DeviceException) { + if (((DeviceException) cause).getErrorCode() == SMFP_EFPTR_INVALID_TABLE) { break; } else { log.error("Table " + i + " info reading failed", e);