From 5b57a9a5bc8f252e1218ba81da4410cb42cc07ec Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Fri, 23 Jan 2026 10:25:26 +0800 Subject: [PATCH 1/4] =?UTF-8?q?demand:=20=E5=8F=91=E7=A5=A8=E4=BD=9C?= =?UTF-8?q?=E5=BA=9F=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/EmisInvoiceCancellationMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emis-biz/src/main/resources/mapper/EmisInvoiceCancellationMapper.xml b/emis-biz/src/main/resources/mapper/EmisInvoiceCancellationMapper.xml index a8ffb50f8..24d121cf2 100644 --- a/emis-biz/src/main/resources/mapper/EmisInvoiceCancellationMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisInvoiceCancellationMapper.xml @@ -65,7 +65,7 @@ i.invoice_no as inv_invoice_no, i.invoice_status as inv_invoice_status, i.payment_status as inv_payment_status, GROUP_CONCAT(DISTINCT b.bill_month ORDER BY b.bill_month SEPARATOR ',') as bill_month, GROUP_CONCAT(DISTINCT b.cust_no ORDER BY b.cust_no SEPARATOR ',') as cust_no, - GROUP_CONCAT(DISTINCT b.customer_name ORDER BY b.customer_name SEPARATOR ',') as customer_name + GROUP_CONCAT(DISTINCT b.cust_name ORDER BY b.cust_name SEPARATOR ',') as customer_name from emis_invoice_cancellation c left join emis_settle_invoice_record i on c.invoice_id = i.id and i.del_flag = '0' left join emis_settle_invoice_bill_rel rel on i.apply_seq_no = rel.apply_seq_no and rel.del_flag = '0' From 3d719731aa08f2e657a890386445884f6de31d56 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Fri, 23 Jan 2026 16:55:54 +0800 Subject: [PATCH 2/4] =?UTF-8?q?demand:=20=E5=8F=91=E7=A5=A8=E4=BD=9C?= =?UTF-8?q?=E5=BA=9F=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../erp/web/emis/EmisInvoiceCancellationController.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisInvoiceCancellationController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisInvoiceCancellationController.java index 727c42023..0866e48f3 100644 --- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisInvoiceCancellationController.java +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisInvoiceCancellationController.java @@ -212,6 +212,10 @@ public class EmisInvoiceCancellationController extends EmisBaseController return AjaxResult.error("发票不存在"); } EmisSettleInvoiceRecord invoice = invoiceList.get(0); + + if ("0".equals(invoice.getInvoiceStatus())) { + return AjaxResult.error("未开票"); + } if (emisInvoiceCancellationService.existsActiveApply(invoice.getId())) { return AjaxResult.error("不可重复添加"); } From d7b4cb43237eca957ef18d24091cc304cd982495 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Fri, 23 Jan 2026 17:04:37 +0800 Subject: [PATCH 3/4] =?UTF-8?q?demand:=20=E5=8F=91=E7=A5=A8=E4=BD=9C?= =?UTF-8?q?=E5=BA=9F=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xdadan/erp/web/emis/EmisInvoiceCancellationController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisInvoiceCancellationController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisInvoiceCancellationController.java index 0866e48f3..b8556a26e 100644 --- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisInvoiceCancellationController.java +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisInvoiceCancellationController.java @@ -213,7 +213,7 @@ public class EmisInvoiceCancellationController extends EmisBaseController } EmisSettleInvoiceRecord invoice = invoiceList.get(0); - if ("0".equals(invoice.getInvoiceStatus())) { + if (!"2".equals(invoice.getInvoiceStatus())) { return AjaxResult.error("未开票"); } if (emisInvoiceCancellationService.existsActiveApply(invoice.getId())) { From 422c20509de2f05bb92d776f1a843472eb009539 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Fri, 23 Jan 2026 17:10:44 +0800 Subject: [PATCH 4/4] =?UTF-8?q?demand:=20=E5=8F=91=E7=A5=A8=E4=BD=9C?= =?UTF-8?q?=E5=BA=9F=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/EmisInvoiceCancellationMapper.xml | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/emis-biz/src/main/resources/mapper/EmisInvoiceCancellationMapper.xml b/emis-biz/src/main/resources/mapper/EmisInvoiceCancellationMapper.xml index 24d121cf2..789186a6b 100644 --- a/emis-biz/src/main/resources/mapper/EmisInvoiceCancellationMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisInvoiceCancellationMapper.xml @@ -139,8 +139,25 @@ and rel.apply_seq_no = i.apply_seq_no and b.cust_no = #{params.custNo}) - - and c.apply_site_code = #{params.privSiteCode} + + + and EXISTS( + select 1 from emis_settle_bill x2,emis_settle_invoice_bill_rel x3 + where x2.del_flag = '0' and x3.del_flag = '0' + and i.apply_seq_no=x3.apply_seq_no and x2.settle_bill_no=x3.settle_bill_no + AND ( + x2.salesmen = #{params.privEmpName} + OR x2.payee = #{params.privEmpName} + OR x2.salesmen IN ( + SELECT salesmen + FROM emis_salesmen_rel esr + where esr.del_flag='0' and esr.bl_open='1' + and now() = ]]> esr.start_date and now() esr.end_date + and esr.sales_ass = #{params.privEmpName} + ) + ) + ) + group by c.id, c.invoice_id, c.apply_seq_no, c.apply_date, c.apply_reason, c.apply_text_url,