From d52e6e075d9b8151fe993352575596a8380e8b92 Mon Sep 17 00:00:00 2001 From: yishiqihuasheng <1191093413@qq.com> Date: Wed, 10 May 2023 15:09:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9mapper=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ExtInvoicePoolController.java | 4 ++ .../pool/ExtInvoicePoolServiceImpl.java | 4 +- .../resources/mapper/ExtInvoicePoolMapper.xml | 61 ++++++++++++++----- 3 files changed, 51 insertions(+), 18 deletions(-) diff --git a/dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtInvoicePoolController.java b/dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtInvoicePoolController.java index 3cbd17fd..1962c364 100644 --- a/dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtInvoicePoolController.java +++ b/dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtInvoicePoolController.java @@ -242,6 +242,10 @@ public class ExtInvoicePoolController extends AbstractController { } int curr = (int)pramsMap.get("curr"); int size = (int)pramsMap.get("size"); + String companyCode = (String) pramsMap.get("companyCode"); + if (StringHelper.isNotBlank(companyCode) && "99".equals(companyCode)){ + pramsMap.put("companyCodes",getUserInfo().getCompanyCodes()); + } try { return ResponseEntity.ok(Objects .requireNonNull(R.ok().put("data", extInvoicePoolService.listSaleInvoice(pramsMap, curr, size)))); diff --git a/dxhy-extend/src/main/java/com/dxhy/extend/service/pool/ExtInvoicePoolServiceImpl.java b/dxhy-extend/src/main/java/com/dxhy/extend/service/pool/ExtInvoicePoolServiceImpl.java index 1b092c91..a4aa075b 100644 --- a/dxhy-extend/src/main/java/com/dxhy/extend/service/pool/ExtInvoicePoolServiceImpl.java +++ b/dxhy-extend/src/main/java/com/dxhy/extend/service/pool/ExtInvoicePoolServiceImpl.java @@ -310,13 +310,13 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl - and t.gf_tax_no in - - #{item} - + + + + and t.invoice_type = #{invoiceType} @@ -208,10 +208,10 @@ like CONCAT('%',#{keyWord},'%') - and t.gf_tax_no in - - #{item} - + + + + and t.invoice_type = #{invoiceType} @@ -474,10 +474,10 @@ like CONCAT('%',#{keyWord},'%') - and t.xf_tax_no in - - #{item} - + + + + and t.invoice_type = #{invoiceType} @@ -539,6 +539,20 @@ and t.bzdh = #{bzdh} + + and (t.comp_code in + + #{companyCode} + + or t.comp_code is null or t.comp_code = '' + ) + + + and t.comp_code = #{companyCode} + + + and (t.comp_code = '' or t.comp_code is null) +