| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | |
| | | throw new CmdException("未包含费用"); |
| | | } |
| | | List<FeeDto> tmpFeeDtos = new ArrayList<>(); |
| | | |
| | | BigDecimal oweMoney = new BigDecimal("0"); |
| | | for (FeeDto tmpFeeDto : feeDtos) { |
| | | try { |
| | | computeFeeSMOImpl.computeEveryOweFee(tmpFeeDto);//计算欠费金额 |
| | |
| | | |
| | | if (tmpFeeDto.getFeeTotalPrice() != 0) { |
| | | tmpFeeDtos.add(tmpFeeDto); |
| | | oweMoney = oweMoney.add(new BigDecimal(tmpFeeDto.getFeeTotalPrice()+"")); |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error("可能费用资料有问题导致算费失败", e); |
| | |
| | | data.put("communityTel", communityDtos.get(0).getTel()); |
| | | data.put("qrCode", ownerUrl + "x"); |
| | | data.put("fees", tmpFeeDtos); |
| | | data.put("oweMoney",oweMoney.doubleValue()); |
| | | |
| | | context.setResponseEntity(ResultVo.createResponseEntity(data)); |
| | | } |