| | |
| | | return sf.format(c.getTime()); |
| | | } |
| | | |
| | | public static String getAddDayStringB(Date date,int days) { |
| | | SimpleDateFormat sf = new SimpleDateFormat(DATE_FORMATE_STRING_B); |
| | | Calendar c = Calendar.getInstance(); |
| | | c.setTime(date); |
| | | c.add(Calendar.DAY_OF_MONTH, days); |
| | | return sf.format(c.getTime()); |
| | | } |
| | | |
| | | /** |
| | | * 在给定的日期加上或减去指定月份后的日期 |
| | | * |
| | |
| | | carInoutPaymentDto.setStartTime(DateUtil.getFormatTimeString(calendar.getTime(),DateUtil.DATE_FORMATE_STRING_B)); |
| | | } |
| | | if(StringUtil.isEmpty(carInoutPaymentDto.getEndTime())){ |
| | | carInoutPaymentDto.setEndTime(DateUtil.getFormatTimeString(new Date(),DateUtil.DATE_FORMATE_STRING_B)); |
| | | carInoutPaymentDto.setEndTime(DateUtil.getFormatTimeString(new Date(),DateUtil.DATE_FORMATE_STRING_B) + " 23:59:59"); |
| | | }else{ |
| | | Date endTime = DateUtil.getDateFromStringB(carInoutPaymentDto.getEndTime()); |
| | | carInoutPaymentDto.setEndTime(DateUtil.getAddDayStringB(endTime,1)); |
| | | } |
| | | List<CarInoutPaymentDto> carInoutPaymentDtos = carInoutPaymentV1InnerServiceSMOImpl.queryCarInoutPaymentSummary(carInoutPaymentDto); |
| | | |