diff --git a/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/log/InvoiceLogService.java b/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/log/InvoiceLogService.java index 4a289c3..36f8b0b 100644 --- a/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/log/InvoiceLogService.java +++ b/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/log/InvoiceLogService.java @@ -26,6 +26,14 @@ import java.util.List; public class InvoiceLogService extends BaseService { public static final InvoiceLogService me = new InvoiceLogService(); + public InvoiceLog checkUseInvoiceLog(String invoice_number, String invoice_code) { + return InvoiceLog.dao.findFirst( + "select * from invoice_log t where t.invoice_number = ? and t.code = ? ", + invoice_number, + invoice_code + ); + } + public InvoiceLog checkInvalidInvoiceLog(String invoice_number, String invoice_code) { return InvoiceLog.dao.findFirst( "select * from invoice_log t where t.state = ? and t.invoice_number = ? and t.code = ?", diff --git a/ssjygl-xsx-local/src/main/java/com/cowr/local/ssjygl/main/Config.java b/ssjygl-xsx-local/src/main/java/com/cowr/local/ssjygl/main/Config.java index fcbcd98..61ac2f5 100644 --- a/ssjygl-xsx-local/src/main/java/com/cowr/local/ssjygl/main/Config.java +++ b/ssjygl-xsx-local/src/main/java/com/cowr/local/ssjygl/main/Config.java @@ -95,7 +95,7 @@ public class Config extends JFinalConfig { public static DeviceThread deviceThread = new DeviceThread(); public static SocketIOService socketio = null; private static boolean client_run = true; - public static final String CLINET_VERSION = "20210308"; + public static final String CLINET_VERSION = "20210311"; public static String getRootPath() { return PathKit.getWebRootPath() diff --git a/ssjygl-xsx-local/src/main/java/com/cowr/local/ssjygl/order/ordertemp/OrderTempSyncService.java b/ssjygl-xsx-local/src/main/java/com/cowr/local/ssjygl/order/ordertemp/OrderTempSyncService.java index 2b9f272..e668cec 100644 --- a/ssjygl-xsx-local/src/main/java/com/cowr/local/ssjygl/order/ordertemp/OrderTempSyncService.java +++ b/ssjygl-xsx-local/src/main/java/com/cowr/local/ssjygl/order/ordertemp/OrderTempSyncService.java @@ -60,9 +60,9 @@ public class OrderTempSyncService { return Result.failed("没有有效的发票领用记录,或者发票已经被使用"); } - InvoiceLog invoiceLog = InvoiceLogService.me.checkInvalidInvoiceLog(invoice_number, invoice_code); + InvoiceLog invoiceLog = InvoiceLogService.me.checkUseInvoiceLog(invoice_number, invoice_code); if (invoiceLog != null) { - return Result.failedstr("发票 %s|%s 已作废", invoice_number, invoice_code); + return Result.failedstr("发票 %s|%s 已使用!重新打开结算界面,获取新的发票信息。", invoice_number, invoice_code); } Product product = Product.dao.findById(product_id); @@ -321,9 +321,9 @@ public class OrderTempSyncService { return Result.failed("没有有效的发票领用记录,或者发票已经被使用"); } - InvoiceLog invoiceLog = InvoiceLogService.me.checkInvalidInvoiceLog(invoice_number, invoice_code); + InvoiceLog invoiceLog = InvoiceLogService.me.checkUseInvoiceLog(invoice_number, invoice_code); if (invoiceLog != null) { - return Result.failedstr("发票 %s|%s 已作废", invoice_number, invoice_code); + return Result.failedstr("发票 %s|%s 已使用!重新打开结算界面,获取新的发票信息。", invoice_number, invoice_code); } order.setInvoiceCode(invoice_code); @@ -642,9 +642,9 @@ public class OrderTempSyncService { return Result.failed("没有有效的发票领用记录,或者发票已经被使用"); } - InvoiceLog invoiceLog = InvoiceLogService.me.checkInvalidInvoiceLog(invoice_number, invoice_code); + InvoiceLog invoiceLog = InvoiceLogService.me.checkUseInvoiceLog(invoice_number, invoice_code); if (invoiceLog != null) { - return Result.failedstr("发票 %s|%s 已作废", invoice_number, invoice_code); + return Result.failedstr("发票 %s|%s 已使用!重新打开结算界面,获取新的发票信息。", invoice_number, invoice_code); } // 不满足开专票的条件的,就必须开具冠名发票 @@ -891,9 +891,9 @@ public class OrderTempSyncService { return Result.failed("没有有效的发票领用记录,或者发票已经被使用"); } - InvoiceLog invoiceLog = InvoiceLogService.me.checkInvalidInvoiceLog(invoice_number, invoice_code); + InvoiceLog invoiceLog = InvoiceLogService.me.checkUseInvoiceLog(invoice_number, invoice_code); if (invoiceLog != null) { - return Result.failedstr("发票 %s|%s 已作废", invoice_number, invoice_code); + return Result.failedstr("发票 %s|%s 已使用!重新打开结算界面,获取新的发票信息。", invoice_number, invoice_code); } order.setInvoiceCode(invoice_code);