|  |  | 
 |  |  | import com.doumee.dao.business.join.ApproveJoinMapper; | 
 |  |  | import com.doumee.dao.business.model.*; | 
 |  |  | import com.doumee.dao.business.vo.ApproveDataVO; | 
 |  |  | import com.doumee.dao.system.join.NoticesJoinMapper; | 
 |  |  | import com.doumee.dao.web.reqeust.ConfirmTaskDTO; | 
 |  |  | import com.doumee.dao.web.reqeust.PlatformBooksApplyDTO; | 
 |  |  | import com.doumee.dao.web.reqeust.PlatformBooksCheckNumDTO; | 
 |  |  | import com.doumee.dao.web.reqeust.RevokeDTO; | 
 |  |  | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private PlatformBooksMapper platformBooksMapper; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private NoticesJoinMapper noticesJoinMapper; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private ApproveTemplMapper approveTemplMapper; | 
 |  |  | 
 |  |  |                 .eq(pageWrap.getModel().getPlateNum() != null, PlatformBooks::getPlateNum, pageWrap.getModel().getPlateNum()) | 
 |  |  |                 .eq(pageWrap.getModel().getDriverPhone() != null, PlatformBooks::getDriverPhone, pageWrap.getModel().getDriverPhone()) | 
 |  |  |                 .ge(pageWrap.getModel().getQueryDate() != null, PlatformBooks::getCreateDate, pageWrap.getModel().getQueryDate()) | 
 |  |  |                 .ge(pageWrap.getModel().getArriveDateStart() != null, PlatformBooks::getArriveDate, Utils.Date.getStart(pageWrap.getModel().getArriveDateStart())) | 
 |  |  |                 .le(pageWrap.getModel().getArriveDateEnd() != null, PlatformBooks::getArriveDate, Utils.Date.getEnd(pageWrap.getModel().getArriveDateEnd())) | 
 |  |  |                 .orderByDesc(PlatformBooks::getCreateDate) | 
 |  |  |         ; | 
 |  |  |         for(PageWrap.SortData sortData: pageWrap.getSorts()) { | 
 |  |  |             if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { | 
 |  |  |                 queryWrapper.orderByDesc(sortData.getProperty()); | 
 |  |  |             } else { | 
 |  |  |                 queryWrapper.orderByAsc(sortData.getProperty()); | 
 |  |  |         PageData<PlatformBooks> pageData = PageData.from(platformBooksMapper.selectPage(page, queryWrapper)); | 
 |  |  |         for (PlatformBooks platformBooks:pageData.getRecords()) { | 
 |  |  |             if(Constants.equalsInteger(platformBooks.getStatus(),Constants.ONE)||Constants.equalsInteger(platformBooks.getStatus(),Constants.ZERO)){ | 
 |  |  |                 String auditName = approveService.getApproveUserName(platformBooks.getId(),Constants.approveObjectType.reason); | 
 |  |  |                 platformBooks.setAuditName(auditName); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         return PageData.from(platformBooksMapper.selectPage(page, queryWrapper)); | 
 |  |  |  | 
 |  |  |         return pageData; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public long count(PlatformBooks platformBooks) { | 
 |  |  | 
 |  |  |         platformBooks.setIsdeleted(Constants.ZERO); | 
 |  |  |         platformBooks.setStatus(Constants.ZERO); | 
 |  |  |         platformBooks.setDriverId(platformBooksApplyDTO.getUserId()); | 
 |  |  |         platformBooks.setEditDate(new Date()); | 
 |  |  |         platformBooksMapper.insert(platformBooks); | 
 |  |  |  | 
 |  |  |         //创建审批流信息 | 
 |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | //    @Override | 
 |  |  |     @Override | 
 |  |  |     @Transactional(rollbackFor = {BusinessException.class,Exception.class}) | 
 |  |  |     public Integer edit(PlatformBooksApplyDTO platformBooksApplyDTO){ | 
 |  |  |         if(Objects.isNull(platformBooksApplyDTO) | 
 |  |  | 
 |  |  |                 || 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); | 
 |  |  |         } | 
 |  |  | 
 |  |  |         } | 
 |  |  |         BeanUtils.copyProperties(platformBooksApplyDTO,platformBooks); | 
 |  |  |         platformBooks.setEditDate(new Date()); | 
 |  |  |         platformBooksMapper.insert(platformBooks); | 
 |  |  |         platformBooks.setReasonId(null); | 
 |  |  |         platformBooks.setInReason(null); | 
 |  |  |         platformBooksMapper.updateById(platformBooks); | 
 |  |  |         return platformBooks.getId(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |                 .eq(Approve::getObjId,revokeDTO.getId()) | 
 |  |  |         ); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | } |