| | |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .table-pagination { |
| | | padding: 16px 0; |
| | | text-align: left; |
| | | display: block; |
| | | z-index: 100; |
| | | width: -webkit-fill-available; |
| | | /* width: 80%; */ |
| | | position: fixed; |
| | | bottom: 30px; |
| | | background-color: white; |
| | | margin-right: 50px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="main_app"> |
| | | <div class="main_app" style="padding-bottom: 60px"> |
| | | <QueryForm |
| | | v-model="filters" |
| | | :query-form-config="queryFormConfig" |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .table-pagination { |
| | | padding: 16px 0; |
| | | text-align: left; |
| | | display: block; |
| | | z-index: 100; |
| | | width: -webkit-fill-available; |
| | | /* width: 80%; */ |
| | | position: fixed; |
| | | bottom: 30px; |
| | | background-color: white; |
| | | margin-right: 50px; |
| | | } |
| | | </style> |
| | |
| | | public Integer create(Bookings bookings) { |
| | | LoginUserInfo user = bookings.getLoginUserInfo(); |
| | | Rooms rooms = roomsMapper.selectById(bookings.getRoomId()); |
| | | if(rooms==null ){ |
| | | if(rooms==null||Constants.equalsInteger(rooms.getIsdeleted(),Constants.ONE) ){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,该会议室暂时无法预约"); |
| | | } |
| | | bookings.setRoomName(rooms.getName()); |
| | |
| | | for (int i = 0; i < bookings.getBookingTimeList().size(); i++) { |
| | | BookingTime s = bookings.getBookingTimeList().get(i); |
| | | RoomTime roomTime = roomTimeJoinMapper.selectById(s.getTimeId()); |
| | | if(Objects.isNull(roomTime)){ |
| | | if(Objects.isNull(roomTime) ||Constants.equalsInteger(roomTime.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"存在未查询到的配置日期,请刷新重试"); |
| | | } |
| | | String endRoomTime = gsDate + " " + roomTime.getEndTime()+":00"; |
| | |
| | | Integer s=ids.get(i); |
| | | |
| | | Bookings bkjs = bookingsMapper.selectById(s); |
| | | if (Objects.isNull(bkjs)) { |
| | | if (Objects.isNull(bkjs)||Constants.equalsInteger(bkjs.getIsdeleted(),Constants.ONE)) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(), "未查询到预约记录"); |
| | | } |
| | | |
| | |
| | | @Transactional(rollbackFor = {BusinessException.class, Exception.class}) |
| | | public void updateById(Bookings bookings) { |
| | | Bookings dbBookings = bookingsMapper.selectById(bookings.getId()); |
| | | if(dbBookings==null ||Constants.equalsInteger(dbBookings.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(dbBookings.getStatus().equals(MeetConstants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "本次操作失败,预约状态已流转"); |
| | | } |
| | | Rooms rooms = roomsMapper.selectById(dbBookings.getRoomId()); |
| | | if(rooms==null ){ |
| | | if(rooms==null||Constants.equalsInteger(rooms.getIsdeleted(),Constants.ONE) ){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,该会议室暂时无法预约"); |
| | | } |
| | | bookings.setRoomName(rooms.getName()); |
| | |
| | | bookingsMapper.updateById(bookings);*/ |
| | | |
| | | Bookings bookings = bookingsMapper.selectById(bs.getId()); |
| | | if (Objects.isNull(bookings)) { |
| | | if (Objects.isNull(bookings)||Constants.equalsInteger(bookings.getIsdeleted(),Constants.ONE)) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(), "未查询到预约记录"); |
| | | } |
| | | |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | Bookings bookings = bookingsMapper.selectOne(new QueryWrapper<Bookings>().lambda() |
| | | .eq(Bookings::getIsdeleted,Constants.ZERO) |
| | | .eq(Bookings::getRoomId,bean.getRoomId()) |
| | | .ge(Bookings::getEndTime,DateUtil.getPlusTime(bean.getEndTime())) |
| | | .le(Bookings::getStartTime,DateUtil.getPlusTime(bean.getStartTime())) |
| | |
| | | //预约人 |
| | | meetingDetailResponse.setBookingUser(systemUserService.findById(meetingDetailResponse.getBookingUserId())); |
| | | //时间段列表 |
| | | meetingDetailResponse.setBookingTimeList(bookingTimeMapper.selectList(new QueryWrapper<BookingTime>() |
| | | .eq("BOOKING_ID", id) |
| | | .eq("ISDELETED", MeetConstants.ZERO) |
| | | meetingDetailResponse.setBookingTimeList(bookingTimeMapper.selectList(new QueryWrapper<BookingTime>().lambda() |
| | | .eq(BookingTime::getBookingId, id) |
| | | .eq(BookingTime::getIsdeleted, MeetConstants.ZERO) |
| | | )); |
| | | //参会人员列表 |
| | | List<UserResponse> userResponseList = systemUserService.getUserList(id); |
| | |
| | | i.setPrefixUrl(projectsPath); |
| | | }); |
| | | meetingDetailResponse.setProjectsResponseList(projectsResponseList); |
| | | List<Multifile> multiFileList = multifileMapper.selectList(new QueryWrapper<Multifile>() |
| | | .eq("OBJ_ID", id) |
| | | .eq("OBJ_TYPE", MeetConstants.ZERO) |
| | | List<Multifile> multiFileList = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() |
| | | .eq(Multifile::getObjId, id) |
| | | .eq(Multifile::getObjType, Constants.MultiFile.MEETING_BOOKS.getKey()) |
| | | .eq(Multifile::getIsdeleted, MeetConstants.ZERO) |
| | | ); |
| | | multiFileList.forEach(i -> { |
| | | i.setFileurlFull(projectsPath); |
| | |
| | | //附件信息 |
| | | meetingDetailResponse.setMultiFileList(multiFileList); |
| | | //会议室管理人员 |
| | | List<UserRel> userRelList = userRelMapper.selectList(new QueryWrapper<UserRel>() |
| | | .eq("ISDELETED",MeetConstants.ZERO) |
| | | .eq("OBJ_ID", meetingDetailResponse.getRoomId()) |
| | | .eq("OBJ_TYPE",MeetConstants.ZERO) |
| | | List<UserRel> userRelList = userRelMapper.selectList(new QueryWrapper<UserRel>().lambda() |
| | | .eq(UserRel::getIsdeleted,MeetConstants.ZERO) |
| | | .eq(UserRel::getObjId, meetingDetailResponse.getRoomId()) |
| | | .eq(UserRel::getObjType,MeetConstants.ZERO) |
| | | ); |
| | | if(Constants.equalsInteger(sysUserId,meetingDetailResponse.getBookingUserId())){ |
| | | meetingDetailResponse.setIsAdmin(Constants.ONE); |
| | |
| | | //查询是否处于会议中 |
| | | page.getRecords().forEach(j->{ |
| | | j.setPrefixUrl(path); |
| | | if(bookingsMapper.selectCount(new QueryWrapper<Bookings>() |
| | | if(bookingsMapper.selectCount(new QueryWrapper<Bookings>() .lambda() |
| | | .eq(Bookings::getIsdeleted,Constants.ZERO) |
| | | .exists(" select 1 from meeting_user_rel u where u.OBJ_ID = meeting_book.id and u.USER_ID = '"+j.getId()+"' and u.OBJ_TYPE = 1 ") |
| | | .and(i -> i.between("START_TIME", pageWrap.getModel().getStartTime()+":00",pageWrap.getModel().getEndTime()+":00") |
| | | .or().between("END_TIME", pageWrap.getModel().getStartTime()+":00",pageWrap.getModel().getEndTime()+":00") |
| | | .and(i -> i.between(Bookings::getStartTime, pageWrap.getModel().getStartTime()+":00",pageWrap.getModel().getEndTime()+":00") |
| | | .or().between(Bookings::getEndTime, pageWrap.getModel().getStartTime()+":00",pageWrap.getModel().getEndTime()+":00") |
| | | ) |
| | | )>Constants.ZERO){ |
| | | j.setStatus(Constants.ONE); |
| | |
| | | # 删除7天前的备份数据 |
| | | find /usr/local/jars/dbbackup -name "antaiwuliu_*.sql" -type f -mtime +7 -exec rm {} \; > /dev/null 2>&1 |
| | | |
| | | |
| | | |
| | | |
| | | /usr/local/mysql/bin/mysqldump -h127.0.0.1 -uroot -pAtwl@2024 antaiwuliu > /usr/local/jars/dbbackup/antaiwuliu_0228JP.sql |
| | | |
| | | |
| | | |
| | | delete from platform_books where id not int (298,297,296,294,290,293) |
| | | |
| | | delete from platform_job a where not exist(select b.id from platform_books b where b.job_id=a.id and b.id in (298,297,296,294,290,293)) |
| | |
| | | public enum ResponseStatus { |
| | | // 400开头表示参数错误 |
| | | BAD_REQUEST(4000, "参数错误"), |
| | | DATA_EMPTY(4001, "找不到目标数据"), |
| | | DATA_EMPTY(4001, "找不到目标数据,该记录不存在或已被删除"), |
| | | DATA_EXISTS(4002, "记录已存在"), |
| | | PWD_INCORRECT(4003, "密码不正确"), |
| | | VERIFICATION_CODE_INCORRECT(4004, "验证码不正确或已过期"), |
| | |
| | | HIDDEN_DANGER_SUBMIT(0, "隐患随手拍提报", "隐患随手拍提报"), |
| | | HIDDEN_DANGER_DEAL_BEFORE(1, "隐患随手拍处理前", "隐患随手拍处理前"), |
| | | HIDDEN_DANGER_DEAL_AFTER(2, "隐患随手拍处理后 ", "隐患随手拍处理后 "), |
| | | MEETING_BOOKS(4, "会议文件 ", "会议文件 "), |
| | | ; |
| | | // 成员变量 |
| | | private String name; |
| | |
| | | @ExcelColumn(name="审批备注") |
| | | private String checkInfo; |
| | | |
| | | @ApiModelProperty(value = "审批人") |
| | | @ExcelColumn(name="审批人") |
| | | @ApiModelProperty(value = "实际审批人") |
| | | @ExcelColumn(name="实际审批人") |
| | | private String cheorId; |
| | | |
| | | @ApiModelProperty(value = "审批时间") |
| | |
| | | @ApiModelProperty(value = "审批信息数据") |
| | | @TableField(exist = false) |
| | | private ApproveDataVO approveDateVO; |
| | | |
| | | @ApiModelProperty(value = "是否具有操作权限(撤回)") |
| | | @TableField(exist = false) |
| | | private Integer hasRole ; |
| | | |
| | | } |
| | |
| | | import com.doumee.service.business.third.EmayService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.checkerframework.checker.units.qual.C; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | queryWrapper.select("t1.name",CarUseBook::getMemberName); |
| | | queryWrapper.leftJoin(Member.class,Member::getId,CarUseBook::getMemberId) |
| | | .eq(CarUseBook::getId,id) |
| | | .eq(CarUseBook::getIsdeleted,Constants.ZERO) |
| | | .last("limit 1" ); |
| | | CarUseBook model = carUseBookMapper.selectJoinOne(CarUseBook.class,queryWrapper); |
| | | if(model==null ||Constants.equalsInteger(Constants.ONE,model.getIsdeleted())){ |
| | |
| | | .leftJoin(Member.class,Member::getId,CarUseBook::getDriverId) |
| | | .leftJoin("company t4 on t1.company_id=t4.id") |
| | | .eq(CarUseBook::getId,id) |
| | | .eq(CarUseBook::getIsdeleted,Constants.ZERO) |
| | | .last("limit 1" ); |
| | | CarUseBook model = carUseBookMapper.selectJoinOne(CarUseBook.class,queryWrapper); |
| | | if(Objects.isNull(model)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | ApproveDataVO approveDataVO = approveService.arrangeApprovedData(id, |
| | | Constants.equalsInteger(model.getType(),Constants.ZERO)?3:4, |
| | | memberId); |
| | | List<Approve> approveList = approveDataVO.getApproveList(); |
| | | model.setApproveDateVO(getApproveDataVO(memberId,model)); |
| | | List<Approve> approveList = model.getApproveDateVO().getApproveList(); |
| | | if(Constants.equalsInteger(model.getStatus(),Constants.FOUR)){ |
| | | String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode(); |
| | |
| | | approve.setCheckDate(model.getCancelTime()); |
| | | approveList.add(approve); |
| | | } |
| | | model.setApproveDateVO(approveDataVO); |
| | | |
| | | Notices notices = noticesJoinMapper.selectOne(new QueryWrapper<Notices>().lambda() |
| | | .eq(Notices::getObjId,id) |
| | |
| | | |
| | | |
| | | return model; |
| | | } |
| | | |
| | | private ApproveDataVO getApproveDataVO( Integer memberId,CarUseBook model) { |
| | | ApproveDataVO approveDataVO = approveService.arrangeApprovedData(model.getId(), |
| | | Constants.equalsInteger(model.getType(),Constants.ZERO)?3:4, |
| | | memberId); |
| | | return approveDataVO; |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | .and(StringUtils.isNotBlank(pageWrap.getModel().getMemberName()), ms->ms.like(Member::getName,pageWrap.getModel().getMemberName()) |
| | | .or().like(Member::getPhone,pageWrap.getModel().getMemberName())) |
| | | .ge(Objects.nonNull(pageWrap.getModel().getQueryStartTime()), CarUseBook::getPlanUseDate,pageWrap.getModel().getQueryStartTime()) |
| | | .le(Objects.nonNull(pageWrap.getModel().getQueryEndTime()),CarUseBook::getPlanUseDate,pageWrap.getModel().getQueryEndTime()) |
| | | .ge(Objects.nonNull(pageWrap.getModel().getQueryStartTime()), CarUseBook::getCreateDate,pageWrap.getModel().getQueryStartTime()) |
| | | .le(Objects.nonNull(pageWrap.getModel().getQueryEndTime()),CarUseBook::getCreateDate,pageWrap.getModel().getQueryEndTime()) |
| | | .orderByDesc(Visits::getCreateDate) |
| | | ; |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(carUseBookMapper.selectJoinPage(page, CarUseBook.class, queryWrapper)); |
| | | PageData<CarUseBook> result =PageData.from(carUseBookMapper.selectJoinPage(page, CarUseBook.class, queryWrapper)); |
| | | if(result!=null && result.getRecords()!=null){ |
| | | for(CarUseBook carUseBook:result.getRecords()){ |
| | | carUseBook.setHasRole(getHasBackRoleBiz(carUseBook,pageWrap.getModel().getLoginUserInfo())); |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | |
| | | .selectAs(Member::getName,CarUseBook::getMemberName) |
| | | .selectAs(Member::getPhone,CarUseBook::getMemberMobile) |
| | | .leftJoin(Member.class,Member::getId,CarUseBook::getMemberId) |
| | | .eq(CarUseBook::getIsdeleted,Constants.ZERO) |
| | | .eq(CarUseBook::getCarId,carUseBook.getCarId()) |
| | | .in(CarUseBook::getStatus,0,1,2) |
| | | .apply(" ( " + |
| | |
| | | @Override |
| | | public void revoke(Integer id, String info, LoginUserInfo loginUserInfo){ |
| | | CarUseBook carUseBook = carUseBookMapper.selectById(id); |
| | | if(Objects.isNull(carUseBook)){ |
| | | if(Objects.isNull(carUseBook) || Constants.equalsInteger(carUseBook.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到用车申请信息"); |
| | | } |
| | | if(getHasBackRoleBiz(carUseBook,loginUserInfo) == Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,无权限行撤销操作!"); |
| | | } |
| | | carUseBook.setCancelInfo(info); |
| | | carUseBook.setCancelTime(new Date()); |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询当前登陆用户是否具有退回申请的权限 |
| | | * 申请人只能在待审核之前撤销,派车员可以在待审核、审核中、审批通过进行撤销 |
| | | * @param carUseBook |
| | | * @param loginUserInfo |
| | | * @return |
| | | */ |
| | | private int getHasBackRoleBiz(CarUseBook carUseBook, LoginUserInfo loginUserInfo) { |
| | | if(Constants.equalsInteger(carUseBook.getCreator(),loginUserInfo.getId()) |
| | | && Constants.equalsInteger(carUseBook.getStatus(),Constants.ZERO)){ |
| | | //申请人可以撤销自己申请中的申请记录 |
| | | return Constants.ONE; |
| | | } |
| | | if(Constants.equalsInteger(carUseBook.getStatus(),Constants.TWO) && carUseBook.getStartTime()!=null |
| | | && System.currentTimeMillis() >= carUseBook.getStartTime().getTime()){ |
| | | //审批通过,但是 已到发车时间,不可以撤销 |
| | | return Constants.ZERO; |
| | | } |
| | | if(!(Constants.equalsInteger(carUseBook.getStatus(),Constants.ZERO)) |
| | | ||Constants.equalsInteger(carUseBook.getStatus(),Constants.ONE) |
| | | ||Constants.equalsInteger(carUseBook.getStatus(),Constants.TWO)){ |
| | | //审批人可以撤销 自己审批的申请记录 |
| | | Approve approve = approveJoinMapper.selectOne(new QueryWrapper<Approve>().lambda() |
| | | .eq(Approve::getIsdeleted,Constants.ZERO) |
| | | .ge(Approve::getLevel,Constants.ZERO) |
| | | .eq(Approve::getChekorId,loginUserInfo.getId()) |
| | | .eq(Approve::getObjId,carUseBook.getId()) |
| | | .eq(Approve::getObjType,carUseBook.getType()==0?3:4) |
| | | .last("limit 1")); |
| | | if(approve!=null){ |
| | | return Constants.ONE; |
| | | } |
| | | } |
| | | return Constants.ZERO; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | .leftJoin("company t4 on t1.company_id=t4.id") |
| | | .leftJoin("company t5 on t2.company_id=t5.id"); |
| | | queryWrapper |
| | | .eq(HiddenDanger::getId, id).last("limit 1"); |
| | | .eq(HiddenDanger::getId, id) |
| | | .eq(HiddenDanger::getIsdeleted, Constants.ZERO) |
| | | .last("limit 1"); |
| | | |
| | | HiddenDanger model = hiddenDangerMapper.selectJoinOne(HiddenDanger.class,queryWrapper); |
| | | if(model ==null || Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)){ |
| | |
| | | hiddenDanger.setCheckDate(hiddenDanger.getEditDate()); |
| | | hiddenDangerMapper.updateById(hiddenDanger); |
| | | HiddenDanger model = hiddenDangerMapper.selectById(hiddenDanger.getId()); |
| | | if(Objects.isNull(model) ||Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY ); |
| | | } |
| | | HiddenDangerParam hiddenDangerCate = hiddenDangerParamMapper.selectById(model.getCateId()); |
| | | if(Objects.isNull(hiddenDangerCate)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到隐患类型"); |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | HiddenDanger model = hiddenDangerMapper.selectById(hiddenDanger.getId()); |
| | | if(Objects.isNull(model)){ |
| | | if(Objects.isNull(model) ||Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到隐患数据"); |
| | | } |
| | | if (!model.getStatus().equals(Constants.ZERO)) { |
| | |
| | | .selectAll(HiddenDanger.class) |
| | | .selectAs(Member::getName,HiddenDanger::getCheckorName) |
| | | .leftJoin(Member.class,Member::getId,HiddenDanger::getCheckUserId) |
| | | .eq(HiddenDanger::getId,hiddenDanger.getId())); |
| | | if(Objects.isNull(model)){ |
| | | .eq(HiddenDanger::getId,hiddenDanger.getId()) |
| | | ); |
| | | if(Objects.isNull(model) ||Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到隐患数据"); |
| | | } |
| | | if (!Constants.equalsInteger(model.getStatus(),Constants.ZERO)) { |
| | |
| | | String[] params = new String[3]; |
| | | params[0] = user.getRealname(); |
| | | params[1]=DateUtil.getPlusTime2(date); |
| | | params[2]=model.getContractNum()+"-【司机:"+model.getDriverName()+" "+model.getDriverPhone()+"】-【车牌好: "+model.getPlateNum()+"】"; |
| | | params[2]="【合同号:"+model.getContractNum()+"】-【司机:"+model.getDriverName()+" "+model.getDriverPhone()+"】-【车牌好: "+model.getPlateNum()+"】"; |
| | | //记录删除日志 |
| | | UserActionServiceImpl.saveUserActionBiz(user,id,Constants.UserActionType.PLATFROM_BOOK_DEL,userActionMapper,date,params, JSONObject.toJSONString(model)); |
| | | } |
| | |
| | | public PageData<PlatformBooks> findPage(PageWrap<PlatformBooks> pageWrap) { |
| | | IPage<PlatformBooks> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<PlatformBooks> queryWrapper = new QueryWrapper<>(); |
| | | pageWrap.getModel().setIsdeleted(Constants.ZERO); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | queryWrapper.lambda() |
| | | .eq(pageWrap.getModel().getId() != null, PlatformBooks::getId, pageWrap.getModel().getId()) |
| | |
| | | List<PlatformBooks> platformBooksList = platformBooksMapper.selectList(new QueryWrapper<PlatformBooks>().lambda() |
| | | .eq(PlatformBooks::getReasonId,platformBooksCheckNumDTO.getReasonId()) |
| | | .ne(PlatformBooks::getStatus,Constants.THREE) |
| | | .eq(PlatformBooks::getIsdeleted,Constants.ZERO) |
| | | .like(PlatformBooks::getCreateDate, DateUtil.getDate(platformBooksCheckNumDTO.getArriveDate(),"yyyy-MM-dd")) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformBooksList)){ |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"["+platformBooksApplyDTO.getCarCodeFront()+"]属于内部车辆,无法预约"); |
| | | }; |
| | | PlatformBooks platformBooks = platformBooksMapper.selectById(platformBooksApplyDTO.getId()); |
| | | if(Objects.isNull(platformBooks)){ |
| | | if(Objects.isNull(platformBooks)||Constants.equalsInteger(platformBooks.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(platformBooks.getStatus(),Constants.ZERO)){ |
| | |
| | | @Override |
| | | public PlatformBooks getDetail(Integer id,Integer memberId){ |
| | | PlatformBooks model = platformBooksMapper.selectById(id); |
| | | if(Objects.isNull(model)){ |
| | | if(Objects.isNull(model)||Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到预约记录"); |
| | | } |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() + |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformBooks model = platformBooksMapper.selectById(revokeDTO.getId()); |
| | | if(Objects.isNull(model)){ |
| | | if(Objects.isNull(model)||Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到预约记录"); |
| | | } |
| | | if(!(Constants.equalsInteger(model.getStatus(),Constants.ZERO)||Constants.equalsInteger(model.getStatus(),Constants.ONE))){ |
| | |
| | | String[] params = new String[3]; |
| | | params[0] = user.getRealname(); |
| | | params[1]=DateUtil.getPlusTime2(date); |
| | | params[2]=job.getBillCode()+"-【司机:"+job.getDriverName()+" "+job.getDrivierPhone()+"】-【车牌号:"+job.getCarCodeFront()+"】"; |
| | | params[2]="【运单号:"+job.getBillCode()+"】-【司机:"+job.getDriverName()+" "+job.getDrivierPhone()+"】-【车牌号:"+job.getCarCodeFront()+"】"; |
| | | //记录删除日志 |
| | | UserActionServiceImpl.saveUserActionBiz(user,id,Constants.UserActionType.PLATFROM_JOB_DEL,userActionMapper,date,params,JSONObject.toJSONString(job)); |
| | | } |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(confirmTaskDTO.getId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.ZERO)){ |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(signInDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | |
| | |
| | | } |
| | | //查询今日最大的签到数 |
| | | List<PlatformJob> signList = platformJobMapper.selectList(new QueryWrapper<PlatformJob>().lambda() |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .apply(" DATE(SIGN_DATE) = DATE(NOW()) and sign_date is not null ")); |
| | | if(CollectionUtils.isEmpty(signList)){ |
| | | platformJob.setSignNum(Constants.ONE); |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobDetailDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())){ |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey())){ |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey()) |
| | |
| | | //查询月台任务等待作业数量 |
| | | if(platformJobMapper.selectCount(new QueryWrapper<PlatformJob>().lambda() |
| | | .eq(PlatformJob::getPlatformId,platform.getId()) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .in(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey(),Constants.PlatformJobStatus.WORKING.getKey()) |
| | | )>=platform.getWorkingNum()){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"超出月台可同时作业数量["+platform.getWorkingNum()+"辆]"); |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if( !( Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey()) |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())){ |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.CALLED.getKey())){ |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(! (Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey()) |
| | |
| | | if(jobIds.size()>0){ |
| | | List<PlatformJob> list = platformJobMapper.selectJoinList(PlatformJob.class,new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAll(PlatformJob.class) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey()) |
| | | .in(PlatformJob::getId,jobIds) |
| | | ); |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.DONE.getKey())){ |
| | |
| | | PlatformJob platformJob = platformJobMapper.selectOne(new QueryWrapper<PlatformJob>().lambda() |
| | | .eq(PlatformJob::getPlatformId,platformDevice.getPlatformId()) |
| | | .eq(PlatformJob::getCarCodeBack,jobOperateDTO.getCarCodeBack()) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey()) |
| | | .last(" limit 1 ") |
| | | ); |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"审批记录已处理!"); |
| | | } |
| | | Visits visits = visitsMapper.selectById(approve.getObjId()); |
| | | if(Objects.isNull(visits)){ |
| | | if(Objects.isNull(visits)||Constants.equalsInteger(visits.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!auditApproveDTO.getMemberId().equals(approve.getChekorId())){ |
| | |
| | | } |
| | | //根据手机号和身份证号码查询 当前预约的时间是否与其他预约记录有冲突 |
| | | if (visitsMapper.selectCount(new QueryWrapper<Visits>().lambda() |
| | | .eq(Visits::getIsdeleted,Constants.ZERO) |
| | | .notIn(Visits::getStatus,Constants.VisitStatus.cancel |
| | | ,Constants.VisitStatus.noPass |
| | | ,Constants.VisitStatus.xfFail |
| | |
| | | */ |
| | | private void isExsitNoOutVisisRecord(Member member) { |
| | | Visits v = visitsMapper.selectOne(new QueryWrapper<Visits>().lambda() |
| | | .eq(Visits::getIsdeleted,Constants.ZERO) |
| | | .eq(Visits::getPhone, member.getPhone()) |
| | | .eq(Visits::getStatus,Constants.VisitStatus.xfSuccess) |
| | | .last(" limit 1" ) |
| | |
| | | params[0] = user.getRealname(); |
| | | params[1]=DateUtil.getPlusTime2(date); |
| | | if(Constants.equalsInteger(model.getType(),Constants.TWO)){ |
| | | params[2]=model.getCarNos()+"-【单位:"+model.getCompanyName()+" "+model.getName()+" "+model.getPhone()+"】-【时间:"+DateUtil.getPlusTime2(model.getStarttime())+"-"+DateUtil.getPlusTime2(model.getEndtime())+"】"; |
| | | params[2]="【车牌号:"+model.getCarNos()+"】-【单位:"+model.getCompanyName()+" "+model.getName()+" "+model.getPhone()+"】-【时间:"+DateUtil.getPlusTime2(model.getStarttime())+"-"+DateUtil.getPlusTime2(model.getEndtime())+"】"; |
| | | //记录删除访客报备日志 |
| | | UserActionServiceImpl.saveUserActionBiz(user,id,Constants.UserActionType.VISIT_DEL,userActionMapper,date,params, JSONObject.toJSONString(model)); |
| | | UserActionServiceImpl.saveUserActionBiz(user,id,Constants.UserActionType.VISIT_CAR_DEL,userActionMapper,date,params, JSONObject.toJSONString(model)); |
| | | }else{ |
| | | params[2]=model.getCompanyName()+"-【访客:"+model.getName()+" "+model.getPhone()+"】-【时间:"+DateUtil.getPlusTime2(model.getStarttime())+"-"+DateUtil.getPlusTime2(model.getEndtime())+"】"; |
| | | params[2]="【单位:"+model.getCompanyName()+"】-【访客:"+model.getName()+" "+model.getPhone()+"】-【时间:"+DateUtil.getPlusTime2(model.getStarttime())+"-"+DateUtil.getPlusTime2(model.getEndtime())+"】"; |
| | | //记录删除访客申请日志 |
| | | UserActionServiceImpl.saveUserActionBiz(user,id,Constants.UserActionType.VISIT_DEL,userActionMapper,date,params, JSONObject.toJSONString(model)); |
| | | } |