| | |
| | | package com.mes.rawglassdetails.controller; |
| | | |
| | | |
| | | import com.mes.rawglassdetails.entity.request.RawGlassRequest; |
| | | import com.mes.rawglassdetails.service.RawGlassStorageDetailsService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author wf |
| | | * @since 2024-09-10 |
| | |
| | | @RequestMapping("/rawGlassStorageDetails") |
| | | public class RawGlassStorageDetailsController { |
| | | |
| | | @Autowired |
| | | private RawGlassStorageDetailsService rawGlassStorageDetailsService; |
| | | @ApiOperation("工位状态") |
| | | @PostMapping("/updateEnableState") |
| | | @ResponseBody |
| | | public Result<Boolean> updateStatus(@RequestBody Integer enableState) { |
| | | boolean result = rawGlassStorageDetailsService.updateRawGlassStorageDetails(String.valueOf(enableState)); |
| | | if (enableState == 1) { |
| | | return Result.build(1, "启用", result); |
| | | } else { |
| | | return Result.build(0, "禁用", result); |
| | | } |
| | | } |
| | | @Autowired private RawGlassStorageDetailsService rawGlassStorageDetailsService; |
| | | |
| | | @ApiOperation("原片入库") |
| | | @PostMapping("/patternWarehousing") |
| | | public Result<String> patternWarehousing(@Validated @RequestBody RawGlassRequest request) { |
| | | @ApiOperation("原片入库") |
| | | @PostMapping("/patternWarehousing") |
| | | public Result<String> patternWarehousing(@Validated @RequestBody RawGlassRequest request) { |
| | | |
| | | return Result.build(200, "入库已完成,等待任务执行", rawGlassStorageDetailsService.patternWarehousing(request)); |
| | | |
| | | } |
| | | |
| | | return Result.build( |
| | | 200, "入库已完成,等待任务执行", rawGlassStorageDetailsService.patternWarehousing(request)); |
| | | } |
| | | } |
| | | |