From 8ba07e02d1c08cb585efa9559770a69110796f29 Mon Sep 17 00:00:00 2001 From: jishenghua <752718920@qq.com> Date: Wed, 12 Jun 2024 00:22:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=BC=80=E5=90=AF=E5=BC=BA?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E4=B9=8B=E5=90=8E=E8=B4=A6=E6=88=B7=E6=B5=81?= =?UTF-8?q?=E6=B0=B4=E8=AE=A1=E7=AE=97=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsh/erp/controller/AccountController.java | 6 +-- .../datasource/mappers/AccountMapperEx.java | 4 +- .../erp/service/account/AccountService.java | 8 ++-- .../resources/mapper_xml/AccountMapperEx.xml | 44 +++++++++++++++++-- 4 files changed, 50 insertions(+), 12 deletions(-) diff --git a/jshERP-boot/src/main/java/com/jsh/erp/controller/AccountController.java b/jshERP-boot/src/main/java/com/jsh/erp/controller/AccountController.java index bd5566d9..f9433e86 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/controller/AccountController.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/controller/AccountController.java @@ -115,15 +115,15 @@ public class AccountController { BaseResponseInfo res = new BaseResponseInfo(); Map map = new HashMap(); try { + Boolean forceFlag = systemConfigService.getForceApprovalFlag(); List dataList = accountService.findAccountInOutList(accountId, StringUtil.toNull(number), - beginTime, endTime, (currentPage-1)*pageSize, pageSize); + beginTime, endTime, forceFlag, (currentPage-1)*pageSize, pageSize); int total = accountService.findAccountInOutListCount(accountId, StringUtil.toNull(number), - beginTime, endTime); + beginTime, endTime, forceFlag); map.put("total", total); //存放数据json数组 JSONArray dataArray = new JSONArray(); if (null != dataList) { - Boolean forceFlag = systemConfigService.getForceApprovalFlag(); for (AccountVo4InOutList aEx : dataList) { String type = aEx.getType().replace("其它", ""); aEx.setType(type); diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/AccountMapperEx.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/AccountMapperEx.java index a21aeb19..55ffe7b8 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/AccountMapperEx.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/AccountMapperEx.java @@ -72,6 +72,7 @@ public interface AccountMapperEx { @Param("number") String number, @Param("beginTime") String beginTime, @Param("endTime") String endTime, + @Param("forceFlag") Boolean forceFlag, @Param("offset") Integer offset, @Param("rows") Integer rows); @@ -79,7 +80,8 @@ public interface AccountMapperEx { @Param("accountId") Long accountId, @Param("number") String number, @Param("beginTime") String beginTime, - @Param("endTime") String endTime); + @Param("endTime") String endTime, + @Param("forceFlag") Boolean forceFlag); int batchDeleteAccountByIds(@Param("updateTime") Date updateTime, @Param("updater") Long updater, @Param("ids") String ids[]); diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/account/AccountService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/account/AccountService.java index adb0c518..c98ca5d8 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/account/AccountService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/account/AccountService.java @@ -378,20 +378,20 @@ public class AccountService { } public List findAccountInOutList(Long accountId, String number, String beginTime, String endTime, - Integer offset, Integer rows) throws Exception{ + Boolean forceFlag, Integer offset, Integer rows) throws Exception{ List list=null; try{ - list = accountMapperEx.findAccountInOutList(accountId, number, beginTime, endTime, offset, rows); + list = accountMapperEx.findAccountInOutList(accountId, number, beginTime, endTime, forceFlag, offset, rows); }catch(Exception e){ JshException.readFail(logger, e); } return list; } - public int findAccountInOutListCount(Long accountId, String number, String beginTime, String endTime) throws Exception{ + public int findAccountInOutListCount(Long accountId, String number, String beginTime, String endTime, Boolean forceFlag) throws Exception{ int result=0; try{ - result = accountMapperEx.findAccountInOutListCount(accountId, number, beginTime, endTime); + result = accountMapperEx.findAccountInOutListCount(accountId, number, beginTime, endTime, forceFlag); }catch(Exception e){ JshException.readFail(logger, e); } diff --git a/jshERP-boot/src/main/resources/mapper_xml/AccountMapperEx.xml b/jshERP-boot/src/main/resources/mapper_xml/AccountMapperEx.xml index 613eaac8..b5ba9bba 100644 --- a/jshERP-boot/src/main/resources/mapper_xml/AccountMapperEx.xml +++ b/jshERP-boot/src/main/resources/mapper_xml/AccountMapperEx.xml @@ -87,7 +87,7 @@ and dh.oper_time <= #{endTime} - and dh.status = '1' + and (dh.status = '1' or dh.status = '2' or dh.status = '3') and ifnull(dh.delete_flag,'0') !='1' @@ -143,7 +143,7 @@ and dh.oper_time <= #{endTime} - and dh.status = '1' + and (dh.status = '1' or dh.status = '2' or dh.status = '3') and ifnull(dh.delete_flag,'0') !='1' @@ -160,7 +160,7 @@ and dh.oper_time <= #{endTime} - and dh.status = '1' + and (dh.status = '1' or dh.status = '2' or dh.status = '3') and ifnull(dh.delete_flag,'0') !='1') accountSum, (select ifnull(sum(ah.change_amount),0) from jsh_account_head ah @@ -217,7 +217,7 @@ and dh.oper_time <= #{endTime} - and dh.status = '1' + and (dh.status = '1' or dh.status = '2' or dh.status = '3') and ifnull(dh.delete_flag,'0') !='1' @@ -240,6 +240,9 @@ and dh.oper_time <= #{endTime} + + and (dh.status = '1' or dh.status = '2' or dh.status = '3') + and ifnull(dh.change_amount, 0)!=0 and ifnull(dh.delete_flag,'0') !='1' @@ -260,6 +263,9 @@ and ah.bill_time <= #{endTime} + + and ah.status = '1' + and ifnull(ah.change_amount, 0)!=0 and ifnull(ah.delete_flag,'0') !='1' @@ -281,6 +287,9 @@ and ah.bill_time <= #{endTime} + + and ah.status = '1' + and ifnull(ai.each_amount, 0)!=0 and ifnull(ah.delete_flag,'0') !='1' @@ -301,6 +310,9 @@ and ah.bill_time <= #{endTime} + + and ah.status = '1' + and ifnull(ah.change_amount, 0)!=0 and ifnull(ah.delete_flag,'0') !='1' @@ -321,6 +333,9 @@ and ah.bill_time <= #{endTime} + + and ah.status = '1' + and ifnull(ai.each_amount, 0)!=0 and ifnull(ah.delete_flag,'0') !='1' @@ -343,6 +358,9 @@ and dh.oper_time <= #{endTime} + + and (dh.status = '1' or dh.status = '2' or dh.status = '3') + and ifnull(dh.change_amount, 0)!=0 and ifnull(dh.delete_flag,'0') !='1' ORDER BY oTime desc @@ -371,6 +389,9 @@ and dh.oper_time <= #{endTime} + + and (dh.status = '1' or dh.status = '2' or dh.status = '3') + and ifnull(dh.change_amount, 0)!=0 and ifnull(dh.delete_flag,'0') !='1' @@ -391,6 +412,9 @@ and ah.bill_time <= #{endTime} + + and ah.status = '1' + and ifnull(ah.change_amount, 0)!=0 and ifnull(ah.delete_flag,'0') !='1' @@ -412,6 +436,9 @@ and ah.bill_time <= #{endTime} + + and ah.status = '1' + and ifnull(ai.each_amount, 0)!=0 and ifnull(ah.delete_flag,'0') !='1' @@ -432,6 +459,9 @@ and ah.bill_time <= #{endTime} + + and ah.status = '1' + and ifnull(ah.change_amount, 0)!=0 and ifnull(ah.delete_flag,'0') !='1' @@ -452,6 +482,9 @@ and ah.bill_time <= #{endTime} + + and ah.status = '1' + and ifnull(ai.each_amount, 0)!=0 and ifnull(ah.delete_flag,'0') !='1' @@ -473,6 +506,9 @@ and dh.oper_time <= #{endTime} + + and (dh.status = '1' or dh.status = '2' or dh.status = '3') + and ifnull(dh.change_amount, 0)!=0 and ifnull(dh.delete_flag,'0') !='1' ) cc