| | |
| | | package com.mes.userinfo.controller; |
| | | package com.mes.bigstoragetask.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageFeedTask; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageOutTask; |
| | | import com.mes.bigstoragetask.service.BigStorageCageOutTaskService; |
| | | import io.swagger.annotations.ApiModel; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.tomcat.util.bcel.Const; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @ApiModel("出片任务信息") |
| | | @Api(description = "出片任务信息") |
| | | @RestController |
| | | @RequestMapping("/userinfo/big-storage-cage-out-task") |
| | | @RequestMapping("/bigStorageCageOutTask") |
| | | public class BigStorageCageOutTaskController { |
| | | |
| | | @Autowired |
| | | private BigStorageCageOutTaskService bigStorageCageOutTaskService; |
| | | @ApiOperation("进片任务信息") |
| | | @GetMapping("/querybigStorageCageTask") |
| | | public List<BigStorageCageOutTask> querybigStorageCageOutTask(int taskState) { |
| | | return bigStorageCageOutTaskService.querybigStorageCageOutTask(taskState); |
| | | @Autowired |
| | | private TemperingGlassInfoService temperingGlassInfoService; |
| | | |
| | | @ApiOperation("出片任务修改") |
| | | @PostMapping("/updatebigStorageCageOutTask") |
| | | public Result deleteBigStorageCageDetails(@RequestBody BigStorageCageOutTask bigStorageCageOutTask) { |
| | | if (bigStorageCageOutTask.getTaskState() > 3) { |
| | | temperingGlassInfoService.remove( |
| | | new LambdaUpdateWrapper<TemperingGlassInfo>() |
| | | .in(TemperingGlassInfo::getGlassId, bigStorageCageOutTask.getGlassId()) |
| | | ); |
| | | } else { |
| | | temperingGlassInfoService.update( |
| | | new LambdaUpdateWrapper<TemperingGlassInfo>() |
| | | .in(TemperingGlassInfo::getGlassId, bigStorageCageOutTask.getGlassId()) |
| | | .set(TemperingGlassInfo::getState, 0) |
| | | ); |
| | | } |
| | | bigStorageCageOutTaskService.updateById(bigStorageCageOutTask); |
| | | return Result.build(200, "修改成功", 1); |
| | | } |
| | | |
| | | @ApiOperation("出片任务报表") |
| | | @PostMapping("/selectBigStorageCageOutTask") |
| | | public Result selectBigStorageCageOutTask(@RequestBody BigStorageCageOutTask bigStorageCageOutTask, |
| | | @RequestParam(required = false) String startTime, |
| | | @RequestParam(required = false) String endTime) { |
| | | return Result.build(200, "查询成功", bigStorageCageOutTaskService.selectBigStorageCageOutTask(bigStorageCageOutTask, startTime, endTime)); |
| | | } |
| | | } |
| | | |