| | |
| | | package com.mes.downglassinfo.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downglassinfo.service.DownGlassInfoService; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RequestMapping("/downGlassTask") |
| | | public class DownGlassTaskController { |
| | | |
| | | @Autowired |
| | | @Resource |
| | | DownGlassInfoService downGlassInfoService; |
| | | |
| | | @Resource |
| | | DownGlassTaskService downGlassTaskService; |
| | | |
| | | @PostMapping("/generateOutGlassTask") |
| | | @ApiOperation(value = "生成出片任务", notes = "生成出片任务") |
| | |
| | | return Result.success(downGlassInfoService.generateOutGlassTask(downStorageCageDetails.getGlassId())); |
| | | } |
| | | |
| | | @PostMapping("/updateOutGlassTask") |
| | | @ApiOperation(value = "清空玻璃", notes = "清空玻璃") |
| | | public Result<Boolean> updateOutGlassTask() { |
| | | downGlassTaskService.update( |
| | | new LambdaUpdateWrapper<DownGlassTask>() |
| | | .set(DownGlassTask::getTaskStatus, 3) |
| | | .eq(DownGlassTask::getEndCell, 7) |
| | | .eq(DownGlassTask::getTaskType, 3) |
| | | .lt(DownGlassTask::getTaskStatus, 3) |
| | | ); |
| | | return Result.build(200, "清空成功", true); |
| | | } |
| | | } |
| | | |