| | |
| | | IPage<Bookings> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<Bookings> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | Integer minute =getNearStartMinut(); |
| | | |
| | | queryWrapper.selectAll(Bookings.class); |
| | | queryWrapper.selectAs(Rooms::getName, Bookings::getRoomName); |
| | |
| | | queryWrapper.eq(pageWrap.getModel().getStatus() != null, Bookings::getStatus, pageWrap.getModel().getStatus()); |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getRealName()), SystemUser::getRealname, pageWrap.getModel().getRealName()); |
| | | queryWrapper.eq(pageWrap.getModel().getDepartmentId() != null, Company::getId, pageWrap.getModel().getDepartmentId()); |
| | | |
| | | //status 状态 0已预约 1已撤销 2已结束 |
| | | //会议状态: 1=未开始;2=进行中;3=已结束 ; 4=即将开始; 5=已撤销 |
| | | queryWrapper.apply(Objects.nonNull(pageWrap.getModel().getMeetingStatus()) |
| | | &&Constants.equalsInteger(pageWrap.getModel().getMeetingStatus(),Constants.ONE), |
| | | " ( now() < t.START_TIME and t.status = 0 ) " |
| | | " ( now() < t.START_TIME and t.status = 0 AND SUBDATE( now(), INTERVAL -"+minute+" MINUTE ) < t.START_TIME ) " |
| | | ) |
| | | .apply(Objects.nonNull(pageWrap.getModel().getMeetingStatus()) |
| | | &&Constants.equalsInteger(pageWrap.getModel().getMeetingStatus(),Constants.TWO), |
| | | " ( now() >= t.START_TIME and t.END_TIME >= now() and t.status = 0 ) " |
| | | " ( t.status = 0 and t.START_TIME_REAL is not null ) " |
| | | ) |
| | | .apply(Objects.nonNull(pageWrap.getModel().getMeetingStatus()) |
| | | &&Constants.equalsInteger(pageWrap.getModel().getMeetingStatus(),Constants.THREE), |
| | | " ( ( now() > t.END_TIME and t.`STATUS` = 0 ) or t.`STATUS` = 2 ) " |
| | | " ( t.`STATUS` = 2 ) " |
| | | //" ( ( now() > t.END_TIME and t.`STATUS` = 0 ) or t.`STATUS` = 2 ) " |
| | | ) |
| | | .apply(Objects.nonNull(pageWrap.getModel().getMeetingStatus()) |
| | | &&Constants.equalsInteger(pageWrap.getModel().getMeetingStatus(),Constants.FOUR), |
| | | " now() < t.START_TIME AND SUBDATE( t.START_TIME, INTERVAL 120 MINUTE ) < NOW() " |
| | | " (t.status = 0 AND SUBDATE( now(), INTERVAL -"+minute+" MINUTE ) > t.START_TIME and t.START_TIME_REAL is null ) " |
| | | //" now() < t.START_TIME AND SUBDATE( t.START_TIME, INTERVAL "+minute+" MINUTE ) < NOW() " |
| | | ) |
| | | .apply(Objects.nonNull(pageWrap.getModel().getMeetingStatus()) |
| | | &&Constants.equalsInteger(pageWrap.getModel().getMeetingStatus(),Constants.FIVE), |
| | |
| | | SimpleDateFormat format = new SimpleDateFormat("MM-dd HH:mm"); |
| | | SimpleDateFormat format1 = new SimpleDateFormat("HH:mm"); |
| | | IPage<Bookings> result = bookingsJoinMapper.selectJoinPage(page, Bookings.class, queryWrapper); |
| | | Integer minute =getNearStartMinut(); |
| | | result.getRecords().stream().forEach(s -> { |
| | | dealMeetingStatusByModel(s,minute); |
| | | MPJLambdaWrapper<Multifile> bookquery = new MPJLambdaWrapper<>(); |
| | |
| | | package com.doumee.dao.admin.request; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.service.business.third.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | private Integer positionId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "海康授权状态 0未授权 1已授权 ", example = "1") |
| | | private Integer authStatus; |
| | | |
| | | @ApiModelProperty(value = "erp机构主键 ") |
| | | private String erpOrgId; |
| | |
| | | @TableField(exist = false) |
| | | private Integer jobType; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "状态 0待确认 1待签到 2等待叫号 3入园等待 4已叫号 5作业中 6作业完成 7转移中 8异常挂起 9已授权离园 10已离园 11 已过号 12取消(WMS)", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer jobStatus; |
| | | |
| | | @ApiModelProperty(value = "开始作业时间起") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @TableField(exist = false) |
| | |
| | | noticesJoinMapper.selectCount(new QueryWrapper<Notices>().lambda().eq(Notices::getParam3,memberId)) |
| | | ); |
| | | //抄送我的数据 |
| | | internalHomeVO.setNoticeCopyNum( |
| | | internalHomeVO.setNoticeCopyNum( |
| | | noticesList.stream().filter(i->Constants.equalsInteger(i.getUserId(),memberId) |
| | | &&Constants.equalsInteger(i.getSendacopy(),Constants.ONE) |
| | | &&Constants.equalsInteger(i.getReaded(),Constants.ZERO) |
| | |
| | | } |
| | | if(j==0){ |
| | | //访客人员不生成此记录 |
| | | if(!(Constants.equalsInteger(noticeType,Constants.noticesObjectType.visit)&&Constants.equalsInteger(createMember.getType(),Constants.ONE))){ |
| | | if(!(Constants.equalsInteger(noticeType,Constants.noticesObjectType.visit)&&Constants.equalsInteger(applyMember.getType(),Constants.ONE))){ |
| | | //默认生成一条 申请人的数据 标记删除状态用于处理到 任务中心(我发起)使用 |
| | | Notices notices = new Notices(); |
| | | notices.setCreateDate(new Date()); |
| | |
| | | .eq(Objects.nonNull(pageWrap.getModel().getCanVisit()),Member::getCanVisit,pageWrap.getModel().getCanVisit()) |
| | | .eq(Objects.nonNull(pageWrap.getModel().getStatus()),Member::getStatus,pageWrap.getModel().getStatus()) |
| | | .eq(Objects.nonNull(pageWrap.getModel().getHkStatus()),Member::getHkStatus,pageWrap.getModel().getHkStatus()) |
| | | .eq(Objects.nonNull(pageWrap.getModel().getAuthStatus()),Member::getAuthStatus,pageWrap.getModel().getAuthStatus()) |
| | | .eq(Objects.nonNull(pageWrap.getModel().getWorkStatus()),Member::getWorkStatus,pageWrap.getModel().getWorkStatus()) |
| | | .eq(Objects.isNull(pageWrap.getModel().getIsdeleted()),Member::getIsdeleted,Constants.ZERO) |
| | | .eq(Objects.nonNull(pageWrap.getModel().getIsdeleted()),Member::getIsdeleted,pageWrap.getModel().getIsdeleted()) |
| | |
| | | .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())) |
| | | .ge(pageWrap.getModel().getArriveDateStart() != null, PlatformBooks::getArriveDate, pageWrap.getModel().getArriveDateStart()) |
| | | .le(pageWrap.getModel().getArriveDateEnd() != null, PlatformBooks::getArriveDate, pageWrap.getModel().getArriveDateEnd()) |
| | | .eq(pageWrap.getModel().getReasonId() != null, PlatformBooks::getReasonId, pageWrap.getModel().getReasonId()) |
| | | .eq(pageWrap.getModel().getJobStatus() != null, PlatformJob::getStatus, pageWrap.getModel().getJobStatus()) |
| | | .orderByDesc(PlatformBooks::getCreateDate) |
| | | ; |
| | | PageData<PlatformBooks> pageData = PageData.from(platformBooksMapper.selectJoinPage(page,PlatformBooks.class, queryWrapper)); |
| | |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(jobIdList)){ |
| | | List<PlatformJob> platformJobList = platformJobMapper.selectList(new QueryWrapper<PlatformJob>().lambda() |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .in(PlatformJob::getStatus,Constants.PlatformJobStatus.WAIT_CONFIRM,Constants.PlatformJobStatus.WART_SIGN_IN) |
| | | .in(PlatformJob::getStatus,Constants.PlatformJobStatus.WAIT_CONFIRM.getKey(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey()) |
| | | .in(PlatformJob::getId,jobIdList) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformJobList)){ |
| | |
| | | platformJobMapper.update(null,new UpdateWrapper<PlatformJob>().lambda() |
| | | .set(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey()) |
| | | .set(PlatformJob::getDoneDate,new Date()) |
| | | .in(PlatformJob::getStatus,Constants.PlatformJobStatus.WAIT_CONFIRM,Constants.PlatformJobStatus.WART_SIGN_IN) |
| | | .in(PlatformJob::getStatus,Constants.PlatformJobStatus.WAIT_CONFIRM.getKey(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey()) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .in(PlatformJob::getId,platformJobList.stream().map(i->i.getId()).collect(Collectors.toList()))); |
| | | |
| | |
| | | new UpdateWrapper<Notices>().lambda() |
| | | .set(Notices::getEditDate,new Date()) |
| | | .set(Notices::getInfo,"手动取消") |
| | | // .set(Notices::getStatus,Constants.ONE) |
| | | .set(Notices::getParam2,Constants.FOUR)//已取消 |
| | | .setSql(" param4 = user_id ") |
| | | .set(Notices::getStatus,Constants.ONE) |
| | | .set(Notices::getParam2,Constants.ONE)//标记已处理 |
| | | .eq(Notices::getStatus,Constants.ZERO) |
| | | .eq(Notices::getParam2,Constants.ZERO)//待处理 |
| | | .eq(Notices::getObjId,visits.getId()) |
| | | .eq(Notices::getObjType,Constants.equalsInteger(visits.getType(),Constants.ZERO)?Constants.noticesObjectType.visit:Constants.noticesObjectType.visitReporting) |
| | | ); |
| | | |
| | | Approve approve = new Approve(); |
| | | approve.setCreateDate(new Date()); |
| | | approve.setIsdeleted(Constants.ZERO); |
| | | approve.setRemark("手动取消"); |
| | | approve.setChekorId(visits.getEditor()); |
| | | approve.setTitle("取消预约"); |
| | | approve.setStatus(Constants.THREE); |
| | | approve.setStatusInfo("手动取消"); |
| | | approve.setObjId(visits.getId()); |
| | | approve.setLevel(9999); |
| | | approve.setApproveType(2); |
| | | approve.setDriverParam(Constants.ZERO); |
| | | approve.setAddrParam(Constants.ZERO); |
| | | approve.setObjType(visits.getType()); |
| | | approve.setType(Constants.ZERO); |
| | | approve.setCheckDate(new Date()); |
| | | approveMapper.insert(approve); |
| | | } |
| | | |
| | | visitsMapper.update(null,updateWrapper); |
| | |
| | | !Constants.equalsInteger(s.getType(),Constants.TWO)?Constants.noticesObjectType.visit:Constants.noticesObjectType.visitReporting |
| | | ); |
| | | |
| | | Approve approve = new Approve(); |
| | | approve.setCreateDate(new Date()); |
| | | approve.setIsdeleted(Constants.ZERO); |
| | | approve.setRemark("系统自动取消"); |
| | | approve.setTitle("取消预约"); |
| | | approve.setStatus(Constants.THREE); |
| | | approve.setStatusInfo("超时自动取消"); |
| | | approve.setObjId(s.getId()); |
| | | approve.setLevel(9999); |
| | | approve.setApproveType(2); |
| | | approve.setDriverParam(Constants.ZERO); |
| | | approve.setAddrParam(Constants.ZERO); |
| | | approve.setObjType(s.getType()); |
| | | approve.setType(Constants.ZERO); |
| | | approve.setCheckDate(new Date()); |
| | | approveMapper.insert(approve); |
| | | |
| | | // //更新审批中的记录为取消 |
| | | // approveMapper.update(null, |
| | |
| | | noticesJoinMapper.update(null, |
| | | new UpdateWrapper<Notices>().lambda() |
| | | .set(Notices::getEditDate,new Date()) |
| | | .set(Notices::getInfo,info) |
| | | .set(Notices::getParam2,Constants.FOUR)//已取消 |
| | | .set(Notices::getInfo,"自动取消") |
| | | .setSql(" param4 = user_id ") |
| | | .set(Notices::getStatus,Constants.ONE) |
| | | .set(Notices::getParam2,Constants.ONE)//已取消 |
| | | .eq(Notices::getStatus,Constants.ZERO) |
| | | .eq(Notices::getParam2,Constants.ZERO)//待处理 |
| | | .eq(Notices::getObjId,objId) |
| | |
| | | .select(PlatformJob::getTotalNum,PlatformJob::getTotalNum) |
| | | // .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey() |
| | | ,Constants.PlatformJobStatus.LEAVED.getKey() |
| | | ,Constants.PlatformJobStatus.AUTHED_LEAVE.getKey() |
| | | ,Constants.PlatformJobStatus.CALLED.getKey()) |
| | | .apply(" to_days(create_date) <to_days(now())")); |
| | | .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(), |
| | | Constants.PlatformJobStatus.LEAVED.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey() |
| | | ,Constants.PlatformJobStatus.CANCEL.getKey()) |
| | | .apply(" to_days(create_date) < to_days(now()) ") |
| | | ); |
| | | |
| | | //==========今天出入库完成量 |
| | | List<PlatformJob> currentDoneNum = platformJobMapper.selectJoinList(PlatformJob.class, |
| | |
| | | .select(PlatformJob::getTotalNum,PlatformJob::getTotalNum) |
| | | // .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey()) |
| | | .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.CANCEL.getKey()) |
| | | .apply(" to_days(done_date) = to_days(now())")); |
| | | //==========今天下发出入库任务---- |
| | | |
| | | //==========今天下发出入库任务 未完成的---- |
| | | List<PlatformJob> currentNum = platformJobMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAs(PlatformJob::getId,PlatformJob::getId) |
| | |
| | | .select(PlatformJob::getTotalNum,PlatformJob::getTotalNum) |
| | | // .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey()) |
| | | .apply(" to_days(create_date) = to_days(now())")); |
| | | .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.CANCEL.getKey()) |
| | | .apply(" to_days(create_date) = to_days(now()) and done_date is null ")); |
| | | |
| | | BigDecimal beforeOutNum = (getSumTotalByList(beforeJobNum,0,null));//今天之前未完成出库任务 |
| | | BigDecimal currentOutNum = (getSumTotalByList(currentNum,0,null));//今天下发出库任务 |
| | | BigDecimal beforeInNum = (getSumTotalByList(beforeJobNum,1,null));//今天之前未完成入库任务 |
| | | BigDecimal currentInNum = (getSumTotalByList(currentNum,1,null));//今天下发入库任务 |
| | | data.setCurrentInNum(beforeInNum.add(currentInNum));//当前入库总任务成量 |
| | | data.setCurrentOutNum(beforeOutNum.add(currentOutNum));//当前出库总任务成量 |
| | | data.setCurrentInDoneNum(getSumTotalByList(currentDoneNum,1,1));//今日完成量 |
| | | data.setCurrentOutDoneNum(getSumTotalByList(currentDoneNum,0,1));//今日完成量 |
| | | data.setCurrentInNum(beforeInNum.add(data.getCurrentInDoneNum()).add(currentInNum));//当前入库总任务成量 |
| | | data.setCurrentOutNum(beforeOutNum.add(data.getCurrentOutDoneNum()).add(currentOutNum));//当前出库总任务成量 |
| | | |
| | | //------------今日出入库效率---------------- |
| | | BigDecimal outHours = getTotalDoneTimes(currentDoneNum,0);// |