|  |  | 
 |  |  |         } | 
 |  |  |         //查询每日配置的总预约量 | 
 |  |  |         PlatformReason platformReason = platformReasonMapper.selectById(platformBooksCheckNumDTO.getReasonId()); | 
 |  |  |         if(Objects.isNull(platformReason)|| Constants.equalsInteger(platformReason.getIsdeleted(),Constants.ZERO)){ | 
 |  |  |         if(Objects.isNull(platformReason)|| !Constants.equalsInteger(platformReason.getIsdeleted(),Constants.ZERO)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"入园原因信息异常,请刷新重试"); | 
 |  |  |         } | 
 |  |  |         List<PlatformBooks> platformBooksList = platformBooksMapper.selectList(new QueryWrapper<PlatformBooks>().lambda() | 
 |  |  | 
 |  |  |             throw new BusinessException(ResponseStatus.BAD_REQUEST); | 
 |  |  |         } | 
 |  |  |         PlatformReason platformReason = platformReasonMapper.selectById(platformBooksApplyDTO.getReasonId()); | 
 |  |  |         if(Objects.isNull(platformReason)|| Constants.equalsInteger(platformReason.getIsdeleted(),Constants.ZERO)){ | 
 |  |  |         if(Objects.isNull(platformReason)|| !Constants.equalsInteger(platformReason.getIsdeleted(),Constants.ZERO)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"入园原因信息异常,请刷新重试"); | 
 |  |  |         } | 
 |  |  |         ApproveTempl approveTempl = approveTemplMapper.selectOne(new QueryWrapper<ApproveTempl>().lambda() | 
 |  |  |                 .eq(ApproveTempl::getIsdeleted,Constants.ZERO) | 
 |  |  |                 .eq(ApproveTempl::getObjId,platformReason.getId()) | 
 |  |  |                 .last(" limit 1") | 
 |  |  |         ); | 
 |  |  |         ApproveTempl approveTempl = approveTemplMapper.selectById(platformReason.getId()); | 
 |  |  |         if(Objects.isNull(approveTempl)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"未配置审批流,请联系管理员"); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         if(Constants.equalsInteger(platformBooksApplyDTO.getUserId(),platformBooksApplyDTO.getDriverId())){ | 
 |  |  |             throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"人员信息匹配错误"); | 
 |  |  |         } | 
 |  |  |         if(Objects.nonNull(platformReason.getLimitNum())&&platformReason.getLimitNum().compareTo(platformBooksApplyDTO.getTotalNum())>0){ | 
 |  |  |             throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"超出入园申请线质量"); | 
 |  |  |         if(!Constants.equalsInteger(approveTempl.getIsdeleted(),Constants.ZERO)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"审批流已停用,请联系管理员"); | 
 |  |  |         } | 
 |  |  |         PlatformBooks platformBooks = new PlatformBooks(); | 
 |  |  |         BeanUtils.copyProperties(platformBooksApplyDTO,platformBooks); | 
 |  |  | 
 |  |  |         platformBooksMapper.insert(platformBooks); | 
 |  |  |  | 
 |  |  |         //创建审批流信息 | 
 |  |  |         approveService.createApproveFlow(5,platformBooks.getId(),platformBooks.getDriverId()); | 
 |  |  |         approveService.createApproveForPlatfrom(platformReason.getApproveTemplId(),platformBooks.getId(),platformBooks.getDriverId()); | 
 |  |  |         return platformBooks.getId(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | //    @Override | 
 |  |  |     @Transactional(rollbackFor = {BusinessException.class,Exception.class}) | 
 |  |  |     public Integer edit(PlatformBooksApplyDTO platformBooksApplyDTO){ | 
 |  |  |         if(Objects.isNull(platformBooksApplyDTO) | 
 |  |  |                 || Objects.isNull(platformBooksApplyDTO.getId()) | 
 |  |  |                 || StringUtils.isBlank(platformBooksApplyDTO.getContractNum()) | 
 |  |  |                 || Objects.isNull(platformBooksApplyDTO.getArriveDate()) | 
 |  |  |                 || Objects.isNull(platformBooksApplyDTO.getInType()) | 
 |  |  |                 || Objects.isNull(platformBooksApplyDTO.getTotalNum()) | 
 |  |  |                 || StringUtils.isBlank(platformBooksApplyDTO.getCarCodeFront()) | 
 |  |  |                 || StringUtils.isBlank(platformBooksApplyDTO.getCarCodeBack()) | 
 |  |  |                 || Objects.isNull(platformBooksApplyDTO.getDriverId()) | 
 |  |  |                 || StringUtils.isBlank(platformBooksApplyDTO.getDriverPhone()) | 
 |  |  |                 || StringUtils.isBlank(platformBooksApplyDTO.getDriverName()) | 
 |  |  |                 || StringUtils.isBlank(platformBooksApplyDTO.getTransportImg()) | 
 |  |  |                 || Objects.isNull(platformBooksApplyDTO.getReasonId()) | 
 |  |  |                 || StringUtils.isBlank(platformBooksApplyDTO.getInReason()) | 
 |  |  |         ){ | 
 |  |  |             throw new BusinessException(ResponseStatus.BAD_REQUEST); | 
 |  |  |         } | 
 |  |  |         PlatformBooks platformBooks = platformBooksMapper.selectById(platformBooksApplyDTO.getId()); | 
 |  |  |         if(Objects.isNull(platformBooks)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.DATA_EMPTY); | 
 |  |  |         } | 
 |  |  |         if(!Constants.equalsInteger(platformBooks.getStatus(),Constants.ZERO)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"业务状态已流转"); | 
 |  |  |         } | 
 |  |  |         BeanUtils.copyProperties(platformBooksApplyDTO,platformBooks); | 
 |  |  |         platformBooks.setEditDate(new Date()); | 
 |  |  |         platformBooksMapper.insert(platformBooks); | 
 |  |  |         return platformBooks.getId(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  | 
 |  |  |         if(Objects.isNull(model)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到预约记录"); | 
 |  |  |         } | 
 |  |  |         String prefixUrl = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() + | 
 |  |  |                 systemDictDataBiz.queryByCode(Constants.FTP,Constants.PLATFORM).getCode(); | 
 |  |  |         model.setPrefixUrl(prefixUrl); | 
 |  |  |  | 
 |  |  |         ApproveDataVO approveDataVO = approveService.arrangeApprovedData(id, | 
 |  |  |                5, | 
 |  |  |                6, | 
 |  |  |                 memberId); | 
 |  |  |         model.setApproveDateVO(approveDataVO); | 
 |  |  |         List<Approve> approveList = approveDataVO.getApproveList(); |