| | |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.dto.repair.RepairDto; |
| | | import com.java110.dto.repair.RepairUserDto; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.community.IRepairInnerServiceSMO; |
| | | import com.java110.intf.community.IRepairUserInnerServiceSMO; |
| | | import com.java110.intf.community.IRoomInnerServiceSMO; |
| | | import com.java110.intf.community.*; |
| | | import com.java110.intf.fee.*; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | | import com.java110.po.car.OwnerCarPo; |
| | |
| | | import com.java110.po.owner.RepairPoolPo; |
| | | import com.java110.po.owner.RepairUserPo; |
| | | import com.java110.utils.constant.FeeFlagTypeConstant; |
| | | import com.java110.utils.constant.FeeStateConstant; |
| | | import com.java110.utils.constant.FeeConfigConstant; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | |
| | | @Autowired |
| | | private IPayFeeV1InnerServiceSMO payFeeV1InnerServiceSMOImpl; |
| | | @Autowired |
| | | private IPayFeeDetailNewV1InnerServiceSMO payFeeDetailNewV1InnerServiceSMOImpl; |
| | | private IPayFeeDetailV1InnerServiceSMO payFeeDetailNewV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeAttrInnerServiceSMO feeAttrInnerServiceSMOImpl; |
| | |
| | | private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IRepairPoolNewV1InnerServiceSMO repairPoolNewV1InnerServiceSMOImpl; |
| | | private IRepairPoolV1InnerServiceSMO repairPoolNewV1InnerServiceSMOImpl; |
| | | @Autowired |
| | | private IRepairUserNewV1InnerServiceSMO repairUserNewV1InnerServiceSMOImpl; |
| | | private IRepairUserV1InnerServiceSMO repairUserNewV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IComputeFeeSMO computeFeeSMOImpl; |
| | |
| | | throw new IllegalArgumentException("费用项不存在"); |
| | | } |
| | | Date maxEndTime = feeDtos.get(0).getDeadlineTime(); |
| | | if (FeeDto.FEE_FLAG_CYCLE.equals(feeConfigDtos.get(0).getFeeFlag())) { |
| | | if (!FeeDto.FEE_FLAG_ONCE.equals(feeConfigDtos.get(0).getFeeFlag())) { |
| | | try { |
| | | maxEndTime = DateUtil.getDateFromString(feeConfigDtos.get(0).getEndTime(), DateUtil.DATE_FORMATE_STRING_A); |
| | | } catch (ParseException e) { |
| | | logger.error("比较费用日期失败", e); |
| | | } |
| | | Date newDate = DateUtil.stepMonth(endTime, paramInObj.getInteger("cycles") - 1); |
| | | if (newDate.getTime() > maxEndTime.getTime()) { |
| | | throw new IllegalArgumentException("缴费周期超过 缴费结束时间"); |
| | | } |
| | | } |
| | | Date newDate = DateUtil.stepMonth(endTime, paramInObj.getInteger("cycles") - 1); |
| | | if (newDate.getTime() > maxEndTime.getTime()) { |
| | | throw new IllegalArgumentException("缴费周期超过 缴费结束时间"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | cycles = new BigDecimal(Double.parseDouble(paramInJson.getString("cycles"))); |
| | | double tmpReceivableAmount = cycles.multiply(feePrice).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue(); |
| | | businessFeeDetail.put("receivableAmount", tmpReceivableAmount); |
| | | businessFeeDetail.put("payableAmount", tmpReceivableAmount); |
| | | |
| | | businessFeeDetail.put("endTime", DateUtil.getFormatTimeString(targetEndTime, DateUtil.DATE_FORMATE_STRING_A)); |
| | | paramInJson.put("feeInfo", feeDto); |
| | |
| | | maxEndTime = feeInfo.getConfigEndTime(); |
| | | } |
| | | //判断 结束时间 是否大于 费用项 结束时间,这里 容错一下,如果 费用结束时间大于 费用项结束时间 30天 走报错 属于多缴费 |
| | | if (feeInfo.getEndTime().getTime() - maxEndTime.getTime() > 30 * 24 * 60 * 60 * 1000L) { |
| | | throw new IllegalArgumentException("缴费超过了 费用项结束时间"); |
| | | if(maxEndTime != null) { |
| | | if (feeInfo.getEndTime().getTime() - maxEndTime.getTime() > 30 * 24 * 60 * 60 * 1000L) { |
| | | throw new IllegalArgumentException("缴费超过了 费用项结束时间"); |
| | | } |
| | | } |
| | | Map feeMap = BeanConvertUtil.beanCovertMap(feeInfo); |
| | | feeMap.put("startTime", DateUtil.getFormatTimeString(feeInfo.getStartTime(), DateUtil.DATE_FORMATE_STRING_A)); |
| | |
| | | calendar.add(Calendar.DAY_OF_MONTH, -5); |
| | | maxEndTime = calendar.getTime(); |
| | | if (feeInfo.getEndTime().after(maxEndTime)) { |
| | | businessFee.put("state", FeeStateConstant.END); |
| | | businessFee.put("state", FeeConfigConstant.END); |
| | | businessFee.put("endTime", maxEndTime); |
| | | } |
| | | } |