From 0e492682cf0d1f8337114ec9eed46c9f379e0885 Mon Sep 17 00:00:00 2001 From: yishiqihuasheng <1191093413@qq.com> Date: Tue, 9 May 2023 12:13:11 +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/BaseInvoiceController.java | 17 ++++++----- .../main/resources/mapper/BaseFpZhMapper.xml | 6 ++-- .../resources/mapper/BaseSggxcxMapper.xml | 28 +++++++++++++------ 3 files changed, 34 insertions(+), 17 deletions(-) diff --git a/dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java b/dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java index e1fedf1f..9a051aac 100644 --- a/dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java +++ b/dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java @@ -535,15 +535,18 @@ public class BaseInvoiceController extends AbstractController { pramsMap.put("gfsh", gfshList); //所属组织 - List companyCodeList = new ArrayList<>(); - if (StringUtils.isNotBlank(companyCode) && !"99".equals(companyCode)){ - companyCodeList.add(companyCode); - }else { - companyCodeList = getUserInfo().getCompanyCodes(); - log.info("获取到的组织信息{}",companyCodeList); +// List companyCodeList = new ArrayList<>(); +// if (StringUtils.isNotBlank(companyCode) && !"99".equals(companyCode)){ +// companyCodeList.add(companyCode); +// }else { +// companyCodeList = getUserInfo().getCompanyCodes(); +// log.info("获取到的组织信息{}",companyCodeList); +// } + if (StringUtils.isNotBlank(companyCode)){ + pramsMap.put("companyCodes",companyCode); } - pramsMap.put("companyCodes",companyCodeList); + if (!StringUtils.isBlank(invoiceType)) { if (!"99".equals(invoiceType)) { diff --git a/dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml b/dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml index 3f34f81e..df9a5235 100644 --- a/dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml +++ b/dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml @@ -82,12 +82,14 @@ #{item} - + + and t.comp_code = #{companyCodes} and (t.comp_code = '' or t.comp_code is null) + and t.invoice_status = #{invoiceStatus} @@ -341,7 +343,7 @@ #{item} - + and t.comp_code = #{companyCodes} diff --git a/dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml b/dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml index 775a2001..fab87e48 100644 --- a/dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml +++ b/dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml @@ -93,10 +93,16 @@ #{item} - and t.comp_code in - - #{companyCode} - + + + + + + and t.comp_code = #{companyCodes} + + + and (t.comp_code = '' or t.comp_code is null) + and t.qs_status = #{qszt} @@ -388,10 +394,16 @@ #{item} - and t.comp_code in - - #{companyCode} - + + + + + + and t.comp_code = #{companyCodes} + + + and (t.comp_code = '' or t.comp_code is null) + and t.qs_status = #{qszt}