| | |
| | | //保存总税前金额(用于更新fund表里的) |
| | | BigDecimal pretaxcost = BigDecimal.valueOf(0.00); |
| | | for (ServiceFunddetail serviceFunddetail : serviceFunddetails) { |
| | | if (StringUtils.isEmpty(serviceFunddetail.getIdcardno())) { |
| | | //如果身份证号为空,就不用查了,可能是医院的记录 |
| | | if (StringUtils.isEmpty(serviceFunddetail.getServicesscopename()) || !serviceFunddetail.getServicesscopename().contains("税后")) { |
| | | serviceFunddetail.setTaxedamount(serviceFunddetail.getAmount()); |
| | | } else { |
| | | serviceFunddetail.setAmount(serviceFunddetail.getTaxedamount()); |
| | | } |
| | | this.updateById(serviceFunddetail); |
| | | } |
| | | |
| | | //获取当月的第一天 |
| | | Date firstDay = Date.from(LocalDate.now().with(TemporalAdjusters.firstDayOfMonth()).atStartOfDay(ZoneId.systemDefault()).toInstant()); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | |
| | | continue; |
| | | } |
| | | } |
| | | logger.info("taxSum入参数据:{}", taxSum); |
| | | logger.info("taxSum入参数据:{}", taxSum); |
| | | if (StringUtils.isEmpty(serviceFunddetail.getServicesscopename()) || !serviceFunddetail.getServicesscopename().contains("税后")) { |
| | | // 如何税前金额不为空,用之前的”总税前金额“,加上当前”税前金额“ |
| | | BigDecimal newAmounts = BigDecimal.valueOf(taxSum.getAmounts()).add(BigDecimal.valueOf(serviceFunddetail.getAmount())); |