From 30d657de5289e7f696b7638b2087b7e7000598c7 Mon Sep 17 00:00:00 2001
From: yishiqihuasheng <1191093413@qq.com>
Date: Mon, 5 Jun 2023 10:17:41 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E7=BB=BC=E5=90=88=E6=9F=A5?=
=?UTF-8?q?=E8=AF=A2=E6=B7=BB=E5=8A=A0=E6=8C=89=E7=85=A7=E7=BB=84=E7=BB=87?=
=?UTF-8?q?=E7=BC=96=E7=A0=81=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/ExtFpzhcxController.java | 12 +++++
.../main/resources/mapper/ExtBbfpzhMapper.xml | 53 ++++++++++++++++---
2 files changed, 57 insertions(+), 8 deletions(-)
diff --git a/dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtFpzhcxController.java b/dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtFpzhcxController.java
index d9456436..3746f625 100644
--- a/dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtFpzhcxController.java
+++ b/dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtFpzhcxController.java
@@ -3,6 +3,7 @@ package com.dxhy.extend.controller;
import com.dxhy.common.aspect.SysLog;
import com.dxhy.common.constant.CommonConstants;
import com.dxhy.common.controller.AbstractController;
+import com.dxhy.common.util.StringHelper;
import com.dxhy.common.util.UserInfoUtil;
import com.dxhy.common.utils.DateUtils;
import com.dxhy.common.utils.R;
@@ -115,6 +116,17 @@ public class ExtFpzhcxController extends AbstractController {
}
pramsMap.put("gfsh", gfshList);
+ String companyCode = (String) pramsMap.get("companyCode");
+ if (org.apache.commons.lang3.StringUtils.isNotBlank(companyCode) && "99".equals(companyCode)){
+ pramsMap.put("companyCodes",getUserInfo().getCompanyCodes());
+ log.info("组织机构====>{}",pramsMap.get("companyCodes"));
+ }
+ if (StringUtils.isNotBlank(companyCode)){
+ pramsMap.put("companyCode",companyCode);
+ }else {
+ return ResponseEntity.ok(R.error("所属组织不能为空"));
+ }
+
if (pramsMap.get("kpksrq") != null && !"".equals(pramsMap.get("kpksrq"))) {
pramsMap.put("kpksrq", DateUtils.getMorning(DateUtils.strToDate(pramsMap.get("kpksrq").toString())));
}
diff --git a/dxhy-extend/src/main/resources/mapper/ExtBbfpzhMapper.xml b/dxhy-extend/src/main/resources/mapper/ExtBbfpzhMapper.xml
index a565392a..10146aa9 100644
--- a/dxhy-extend/src/main/resources/mapper/ExtBbfpzhMapper.xml
+++ b/dxhy-extend/src/main/resources/mapper/ExtBbfpzhMapper.xml
@@ -70,10 +70,28 @@
t.settlement_status,t.voucher_number,t.total_amount,t.sn_voucher_number,t.posting_time,t.image_id,t.account_period
from t_dx_record_invoice t
WHERE t.company = #{company} and t.invoice_date between #{kpksrq} and #{kpjsrq}
- and t.gf_tax_no in
-
- #{item}
-
+
+
+ and t.gf_tax_no in
+
+ #{item}
+
+
+
+
+ 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)
+
and t.bzdh = #{bzdh}
@@ -331,10 +349,29 @@
select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse
from t_dx_record_invoice t
where t.invoice_date between #{kpksrq} and #{kpjsrq}
- and t.company = #{company} and t.gf_tax_no in
-
- #{item}
-
+ and t.company = #{company}
+
+
+ and t.gf_tax_no in
+
+ #{item}
+
+
+
+
+ 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)
+
and t.invoice_status = #{invoiceStatus}