| | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | super.validatePageInfo(reqJson); |
| | | Assert.hasKeyAndValue(reqJson, "boxId", "未包含岗亭信息"); |
| | | if(reqJson.containsKey("boxId")) { |
| | | Assert.hasKeyAndValue(reqJson, "boxId", "未包含岗亭信息"); |
| | | }else{ |
| | | Assert.hasKeyAndValue(reqJson, "paId", "未包含停车场"); |
| | | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | CarInoutPaymentDto carInoutPaymentDto = BeanConvertUtil.covertBean(reqJson, CarInoutPaymentDto.class); |
| | | carInoutPaymentDto.setBoxId(reqJson.getString("boxId")); |
| | | carInoutPaymentDto.setPaId(reqJson.getString("paId")); |
| | | |
| | | if(StringUtil.isEmpty(carInoutPaymentDto.getStartTime())){ |
| | | Calendar calendar = Calendar.getInstance(); |
| | |
| | | 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) + " 23:59:59"); |
| | | carInoutPaymentDto.setEndTime(DateUtil.getAddDayStringB(new Date(),1)); |
| | | }else{ |
| | | Date endTime = DateUtil.getDateFromStringB(carInoutPaymentDto.getEndTime()); |
| | | carInoutPaymentDto.setEndTime(DateUtil.getAddDayStringB(endTime,1)); |