| | |
| | | package com.mes.bigstoragetask.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.mapper.BigStorageCageDetailsMapper; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageFeedTask; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageOutTask; |
| | | import com.mes.bigstoragetask.mapper.BigStorageCageOutTaskMapper; |
| | | import com.mes.bigstoragetask.service.BigStorageCageOutTaskService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.mapper.TemperingGlassInfoMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | @Resource |
| | | BigStorageCageDetailsMapper bigStorageCageDetailsMapper; |
| | | |
| | | @Override |
| | | public boolean saveBatch(List<BigStorageCageOutTask> list) { |
| | | return baseMapper.saveBatch(list); |
| | | } |
| | | |
| | | /** |
| | | * 查询任务信息 |
| | | */ |
| | | @Override |
| | | public List<BigStorageCageOutTask> querybigStorageCageOutTask(int taskState){ |
| | | log.info("根据传入的任务状态查询任务信息:"+taskState); |
| | | LambdaQueryWrapper<BigStorageCageOutTask> getOutTaskWrapper=new LambdaQueryWrapper<>(); |
| | | getOutTaskWrapper.eq(BigStorageCageOutTask::getTaskState,taskState); |
| | | public List<BigStorageCageOutTask> querybigStorageCageOutTask(int taskState) { |
| | | log.info("根据传入的任务状态查询任务信息:" + taskState); |
| | | LambdaQueryWrapper<BigStorageCageOutTask> getOutTaskWrapper = new LambdaQueryWrapper<>(); |
| | | getOutTaskWrapper.eq(BigStorageCageOutTask::getTaskState, taskState); |
| | | return baseMapper.selectList(getOutTaskWrapper); |
| | | } |
| | | |
| | |
| | | bigStorageCageDetailsMapper.deleteById(bigStorageCageOutTask.getId()); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void deleteTask(List<BigStorageCageOutTask> outGlassId){ |
| | | baseMapper.deleteTask(outGlassId); |
| | | } |
| | | |
| | | @Override |
| | | public List<BigStorageCageOutTask> selectBigStorageCageOutTask(BigStorageCageOutTask bigStorageCageOutTask, String startTime, String endTime){ |
| | | if (endTime != null && !endTime.isEmpty()) { |
| | | endTime = endTime + " 23:59:59"; |
| | | } |
| | | LambdaQueryWrapper<BigStorageCageOutTask> wrapper = new LambdaQueryWrapper<>(); |
| | | if (bigStorageCageOutTask.getStartSlot() != null) { |
| | | wrapper.eq(BigStorageCageOutTask::getStartSlot, bigStorageCageOutTask.getStartSlot()); |
| | | } |
| | | if (bigStorageCageOutTask.getWidth() != null) { |
| | | wrapper.eq(BigStorageCageOutTask::getWidth, bigStorageCageOutTask.getWidth()); |
| | | } |
| | | if (bigStorageCageOutTask.getHeight() != null) { |
| | | wrapper.eq(BigStorageCageOutTask::getHeight, bigStorageCageOutTask.getHeight()); |
| | | } |
| | | if (bigStorageCageOutTask.getEndSlot() != 0) { |
| | | wrapper.eq(BigStorageCageOutTask::getEndSlot, bigStorageCageOutTask.getEndSlot()); |
| | | } |
| | | if (bigStorageCageOutTask.getTaskState() != -1) { |
| | | wrapper.eq(BigStorageCageOutTask::getTaskState, bigStorageCageOutTask.getTaskState()); |
| | | } |
| | | if (startTime != null && !startTime.isEmpty()) { |
| | | wrapper.ge(BigStorageCageOutTask::getCreateTime, startTime); |
| | | } |
| | | if (endTime != null && !endTime.isEmpty()) { |
| | | wrapper.le(BigStorageCageOutTask::getCreateTime, endTime); |
| | | } |
| | | wrapper.orderByDesc(BigStorageCageOutTask::getId); |
| | | wrapper.and(item -> item.eq(BigStorageCageOutTask::getDeleted, 0) |
| | | .or() |
| | | .eq(BigStorageCageOutTask::getDeleted, 1)); |
| | | wrapper.between(BigStorageCageOutTask::getCreateTime, startTime, endTime); |
| | | return baseMapper.selectList(wrapper); |
| | | } |
| | | } |