| | |
| | | import com.java110.dto.contract.ContractDto; |
| | | import com.java110.dto.contractRoom.ContractRoomDto; |
| | | import com.java110.dto.fee.*; |
| | | import com.java110.dto.machine.CarInoutDetailDto; |
| | | import com.java110.dto.machine.CarInoutDto; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.owner.OwnerDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.community.IRoomInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeInnerServiceSMO; |
| | | import com.java110.intf.fee.ITempCarFeeConfigAttrInnerServiceSMO; |
| | | import com.java110.intf.fee.ITempCarFeeConfigInnerServiceSMO; |
| | | import com.java110.intf.store.IContractInnerServiceSMO; |
| | | import com.java110.intf.store.IContractRoomInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | |
| | | @Autowired(required = false) |
| | | private IContractInnerServiceSMO contractInnerServiceSMOImpl; |
| | | |
| | | @Autowired(required = false) |
| | | private ITempCarFeeConfigInnerServiceSMO tempCarFeeConfigInnerServiceSMOImpl; |
| | | |
| | | @Autowired(required = false) |
| | | private ITempCarFeeConfigAttrInnerServiceSMO tempCarFeeConfigAttrInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public Date getFeeEndTime() { |
| | | return null; |
| | |
| | | public void computeEveryOweFee(FeeDto tmpFeeDto, RoomDto roomDto) { |
| | | computeFeePrice(tmpFeeDto, roomDto); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 计算欠费金额 |
| | |
| | | return resMonth; |
| | | } |
| | | |
| | | /** |
| | | * *字符串的日期格式的计算 |
| | | */ |
| | | public long daysBetween(Date smdate, Date bdate) { |
| | | long between_days = 0; |
| | | Calendar cal = Calendar.getInstance(); |
| | | cal.setTime(smdate); |
| | | long time1 = cal.getTimeInMillis(); |
| | | cal.setTime(bdate); |
| | | long time2 = cal.getTimeInMillis(); |
| | | between_days = (time2 - time1) / (1000 * 3600 * 24); |
| | | |
| | | return between_days; |
| | | } |
| | | |
| | | @Override |
| | | public Date getTargetEndTime(double month, Date startDate) { |
| | | Calendar endDate = Calendar.getInstance(); |
| | |
| | | return endDate.getTime(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<CarInoutDto> computeTempCarStopTimeAndFee(List<CarInoutDto> carInoutDtos) { |
| | | |
| | | if (carInoutDtos == null || carInoutDtos.size() < 1) { |
| | | return null; |
| | | } |
| | | |
| | | |
| | | carInoutDtos = tempCarFeeConfigInnerServiceSMOImpl.computeTempCarFee(carInoutDtos); |
| | | |
| | | return carInoutDtos; |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<CarInoutDetailDto> computeTempCarInoutDetailStopTimeAndFee(List<CarInoutDetailDto> carInoutDtos) { |
| | | if (carInoutDtos == null || carInoutDtos.size() < 1) { |
| | | return null; |
| | | } |
| | | |
| | | |
| | | carInoutDtos = tempCarFeeConfigInnerServiceSMOImpl.computeTempCarInoutDetailFee(carInoutDtos); |
| | | |
| | | return carInoutDtos; |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | ComputeFeeSMOImpl computeFeeSMO = new ComputeFeeSMOImpl(); |
| | | try { |
| | | double month = computeFeeSMO.dayCompare( |
| | | DateUtil.getDateFromString("2021-6-1 00:00:00", DateUtil.DATE_FORMATE_STRING_A), |
| | | DateUtil.getDateFromString("2021-8-5 18:00:00", DateUtil.DATE_FORMATE_STRING_A) |
| | | DateUtil.getDateFromString("2021-09-30 14:20:02", DateUtil.DATE_FORMATE_STRING_A), |
| | | DateUtil.getDateFromString("2021-11-03 14:20:02", DateUtil.DATE_FORMATE_STRING_A) |
| | | ); |
| | | System.out.println(month); |
| | | System.out.println(Math.ceil(month)); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |