| | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.ruoyi.common.tax.TaxtUtils; |
| | | import com.ruoyi.project.domain.*; |
| | | import com.ruoyi.project.domain.vo.TaxMoneyVO; |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Double getTaxBeforeByBeneFiciaryNo(TaxMoneyVO taxMoneyVo) { |
| | | public Double getTaxByBeneFiciaryNo(TaxMoneyVO taxMoneyVo) { |
| | | Double sum = 0.00; |
| | | Double totalScore = 0.00; |
| | | List<ServiceFunddetail> taxationByBeneFiciaryNo = serviceFunddetailMapper.getTaxBeforeByBeneFiciaryNo(taxMoneyVo); |
| | |
| | | /** |
| | | * 根据税后工资,算出税前工资 |
| | | * |
| | | * @param money |
| | | * @param taxMoneyVo |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | totalScore = taxationByBeneFiciaryNo.stream().mapToDouble(ServiceFunddetail::getTaxamount).sum(); |
| | | } |
| | | //计算出总的税后薪酬(包含本次) |
| | | sum = sum + taxMoneyVo.getMoney(); |
| | | sum = sum + Double.valueOf(taxMoneyVo.getMoney()); |
| | | //税前总金额 |
| | | String taxationBefore = TaxtUtils.getTaxationBefore(new BigDecimal(sum)); |
| | | //总个税 |
| | |
| | | ServiceFunddetail serviceFunddetail = serviceFunddetailMapper.selectById(id); |
| | | Long fundid = serviceFunddetail.getFundid(); |
| | | ServiceFund serviceFund = serviceFundMapper.selectById(fundid); |
| | | if (ObjectUtils.isNotEmpty(serviceFund)) { |
| | | Double pretax = serviceFund.getPretaxcost(); |
| | | Double aftertax = serviceFund.getTaxedcost(); |
| | | pretax = pretax - serviceFunddetail.getAmount(); |
| | | aftertax = aftertax - serviceFunddetail.getTaxedamount(); |
| | | Double amount = pretax + aftertax; |
| | | |
| | | Double pretax = serviceFund.getPretaxcost(); |
| | | Double aftertax = serviceFund.getTaxedcost(); |
| | | pretax = pretax - serviceFunddetail.getAmount(); |
| | | aftertax = aftertax - serviceFunddetail.getTaxedamount(); |
| | | Double amount = pretax + aftertax; |
| | | |
| | | serviceFund.setPretaxcost(pretax); |
| | | serviceFund.setTaxedcost(aftertax); |
| | | serviceFund.setAmountrequested(amount); |
| | | int updateAmount = serviceFundMapper.updateById(serviceFund); |
| | | |
| | | serviceFund.setPretaxcost(pretax); |
| | | serviceFund.setTaxedcost(aftertax); |
| | | serviceFund.setAmountrequested(amount); |
| | | int updateAmount = serviceFundMapper.updateById(serviceFund); |
| | | } |
| | | return serviceFunddetailMapper.deleteById(id); |
| | | } |
| | | |