| | |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.*; |
| | | import com.java110.vo.ResultVo; |
| | | import com.java110.vo.api.fee.ApiFeeDataVo; |
| | | import com.java110.vo.api.fee.ApiFeeVo; |
| | | import com.java110.vo.api.feeConfig.ApiFeeConfigDataVo; |
| | | import org.slf4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | |
| | | |
| | | //查询费用信息arrearsEndTime |
| | | // todo 这里考虑预付期的费用 所以查询全量再用费用 |
| | | //feeDto.setArrearsEndTime(DateUtil.getCurrentDate()); |
| | | feeDto.setState(FeeDto.STATE_DOING); |
| | | List<FeeDto> feeDtos = feeInnerServiceSMOImpl.queryFees(feeDto); |
| | | |
| | |
| | | List<FeeDto> tmpFeeDtos = new ArrayList<>(); |
| | | for (FeeDto tmpFeeDto : feeDtos) { |
| | | try { |
| | | if (!StringUtil.isEmpty(tmpFeeDto.getAdditionalAmount())) { |
| | | tmpFeeDto.setAdditionalAmount(Double.parseDouble(tmpFeeDto.getAdditionalAmount()) + ""); |
| | | } |
| | | if (!StringUtil.isEmpty(tmpFeeDto.getSquarePrice())) { |
| | | tmpFeeDto.setSquarePrice(Double.parseDouble(tmpFeeDto.getSquarePrice()) + ""); |
| | | } |
| | | |
| | | //todo 有目标结束时间,并且不是一次性费用 |
| | | if (!StringUtil.isEmpty(feeDto.getTargetEndTime()) |
| | | && !FeeDto.FEE_FLAG_ONCE.equals(tmpFeeDto.getFeeFlag()) |
| | |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "未查到房屋信息,查询多条数据"); |
| | | } |
| | | roomDto = roomDtos.get(0); |
| | | feeDto.setPayerObjName(roomDto.getFloorNum() + "-" + roomDto.getUnitNum() + "-" + roomDto.getRoomNum() ); |
| | | feeDto.setPayerObjName(roomDto.getFloorNum() + "-" + roomDto.getUnitNum() + "-" + roomDto.getRoomNum()); |
| | | feeDto.setBuiltUpArea(roomDto.getBuiltUpArea()); |
| | | |
| | | } else if (FeeDto.PAYER_OBJ_TYPE_CAR.equals(feeDto.getPayerObjType())) {//车位相关 |
| | |
| | | //去掉多余0 |
| | | feeDto.setSquarePrice(Double.parseDouble(feeDto.getSquarePrice()) + ""); |
| | | feeDto.setAdditionalAmount(Double.parseDouble(feeDto.getAdditionalAmount()) + ""); |
| | | return ResultVo.createResponseEntity(feeDto); |
| | | ApiFeeDataVo apiFeeDataVo = BeanConvertUtil.covertBeanList(feeDtos, ApiFeeDataVo.class).get(0); |
| | | apiFeeDataVo.setStartTime(apiFeeDataVo.getStartTime() == null ? null : apiFeeDataVo.getStartTime().split(" ")[0]); |
| | | apiFeeDataVo.setEndTime(apiFeeDataVo.getEndTime() == null ? null : apiFeeDataVo.getEndTime().split(" ")[0]); |
| | | apiFeeDataVo.setMaxEndTime(apiFeeDataVo.getMaxEndTime() == null ? null : apiFeeDataVo.getMaxEndTime().split(" ")[0]); |
| | | apiFeeDataVo.setDeadlineTime(apiFeeDataVo.getDeadlineTime() == null ? null : apiFeeDataVo.getDeadlineTime().split(" ")[0]); |
| | | return ResultVo.createResponseEntity(apiFeeDataVo); |
| | | } |
| | | |
| | | @Override |