修复开票时的发票使用校验
parent
d3a1b6834c
commit
81f60e05be
|
|
@ -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 = ?",
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue