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