| | |
| | | package com.ruoyi.project.service.impl; |
| | | |
| | | import java.io.File; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | if (CollectionUtils.isEmpty(serviceFunddetails)) { |
| | | throw new BaseException("serviceFunddetails为空喽"); |
| | | } |
| | | |
| | | BigDecimal bigDecimal = new BigDecimal(0.0); |
| | | // 保存详情数据 |
| | | for (ServiceFunddetailVO serviceFunddetailVO : serviceFunddetails) { |
| | | if (StringUtils.isEmpty(serviceFunddetailVO.getIdcardno())) { |
| | | throw new BaseException("请检查身份证号,身份证号为空了,姓名:" + serviceFunddetailVO.getBeneficiaryname()); |
| | | } |
| | | if (StringUtils.isEmpty(serviceFunddetailVO.getTitle()) || ChineseUtils.isChinese(serviceFunddetailVO.getTitle())) { |
| | | throw new BaseException("请检查职称是否为空(或不是中文),姓名:" + serviceFunddetailVO.getBeneficiaryname() + " 职称:" + serviceFunddetailVO.getTitle()); |
| | | } |
| | | |
| | | if (StringUtils.isEmpty(serviceFunddetailVO.getBankcardno())) { |
| | | throw new BaseException("请检查银行卡号是否为空,姓名:" + serviceFunddetailVO.getBeneficiaryname()); |
| | | } |
| | |
| | | } else { |
| | | serviceFunddetailService.updateById(serviceFunddetail); |
| | | } |
| | | } |
| | | |
| | | bigDecimal = bigDecimal.add(BigDecimal.valueOf(serviceFunddetailVO.getAmount())); |
| | | |
| | | |
| | | } |
| | | serviceFundVO.setPretaxcost(bigDecimal.doubleValue()); |
| | | serviceFundMapper.updateById(serviceFundVO); |
| | | return id; |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public Map<String, List<ServiceFunddetailExcel>> totaltax(TotalTaxVO totalTaxVO) { |
| | | if (CollectionUtils.isEmpty(totalTaxVO.getFundids())) { |
| | | throw new BaseException("请勾选之后,再进行合计个税"); |
| | | } |
| | | Map<String, List<ServiceFunddetailExcel>> map = new HashMap<>(); |
| | | |
| | | if (totalTaxVO.getIsTaxAfter() == null) { |