From 2e20e85173b764e43a6e4022072bc8fb0cc61330 Mon Sep 17 00:00:00 2001 From: zhoushihao <zsh19950802@163.com> Date: 星期一, 30 十二月 2024 19:45:35 +0800 Subject: [PATCH] 1、李赛克生成trf文件模板初始化 --- hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassOutRelationInfoController.java | 62 ++++++++++++++++++++++++++++-- 1 files changed, 57 insertions(+), 5 deletions(-) diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassOutRelationInfoController.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassOutRelationInfoController.java index 17a3fd3..4bea64d 100644 --- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassOutRelationInfoController.java +++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassOutRelationInfoController.java @@ -2,14 +2,18 @@ import com.mes.hollow.entity.HollowGlassOutRelationInfo; +import com.mes.hollow.entity.request.HollowTaskRequest; import com.mes.hollow.service.HollowGlassOutRelationInfoService; +import com.mes.hollowqueue.entity.HollowGlassQueueInfo; import com.mes.utils.Result; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; +import java.util.List; /** * (HollowGlassOutRelationInfo)琛ㄦ帶鍒跺眰 @@ -17,6 +21,7 @@ * @author makejava * @since 2024-11-30 13:57:28 */ +@Api(tags = "涓┖浠诲姟鍏崇郴") @RestController @RequestMapping("hollowGlassOutRelationInfo") public class HollowGlassOutRelationInfoController { @@ -26,19 +31,66 @@ @ApiOperation("棰嗗彇浠诲姟") @PostMapping("/receiveTask") - public Result<HollowGlassOutRelationInfo> receiveTask(String flowCardId, int cell, int totalPairQuantity) { - return Result.success(hollowGlassOutRelationInfoService.receiveTask(flowCardId, cell, totalPairQuantity)); + public Result<HollowGlassOutRelationInfo> receiveTask(HollowTaskRequest request) { + HollowGlassOutRelationInfo hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService.receiveTask(request); + if (null == hollowGlassOutRelationInfo) { + return Result.error(500, "褰撳墠娴佺▼鍗℃湁鏈畬鎴愮殑浠诲姟锛岃鍏堢‘淇濅换鍔″畬鎴愬悗锛屽啀娆¢鍙栦换鍔�"); + } else { + return Result.success(hollowGlassOutRelationInfo); + } } + @ApiOperation("寮哄埗鍑虹墖") @PostMapping("/forceOutGlass") - public Result<HollowGlassOutRelationInfo> forceOutGlass(String flowCardId, int cell, int totalPairQuantity) { - return Result.success(hollowGlassOutRelationInfoService.forceOutGlass(flowCardId, cell, totalPairQuantity)); + public Result<HollowGlassOutRelationInfo> forceOutGlass(HollowTaskRequest request) { + HollowGlassOutRelationInfo hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService.forceOutGlass(request); + if (null == hollowGlassOutRelationInfo) { + return Result.error(500, "褰撳墠娴佺▼鍗℃湁鏈畬鎴愮殑浠诲姟锛岃鍏堢‘淇濅换鍔″畬鎴愬悗锛屽啀娆″己鍒舵墽琛屼换鍔�"); + } else { + return Result.success(hollowGlassOutRelationInfo); + } + } + + @ApiOperation("娴佺▼鍗′换鍔″垪琛�") + @PostMapping("/hollowTaskList") + public Result<List<String>> hollowTaskList(int cell) { + return Result.build(200, "娴佺▼鍗′换鍔″垪琛ㄦ煡璇㈡垚鍔�", hollowGlassOutRelationInfoService.hollowTaskList(cell)); + } + + @ApiOperation("棰勮鎸囧畾浠诲姟淇℃伅") + @PostMapping("/appointHollowTaskDetails") + public Result<List<HollowGlassQueueInfo>> appointHollowTaskDetails(String flowCardId, int cell) { + return Result.build(200, "棰勮鎸囧畾浠诲姟淇℃伅鎴愬姛", hollowGlassOutRelationInfoService.appointHollowTaskDetails(flowCardId, cell)); + } + + @ApiOperation("鍒犻櫎鎸囧畾浠诲姟淇℃伅") + @PostMapping("/deleteHollowTaskDetails") + public Result<Boolean> deleteHollowTaskDetails(String flowCardId, int cell) { + return Result.build(200, "棰勮鎸囧畾浠诲姟淇℃伅鎴愬姛", hollowGlassOutRelationInfoService.deleteHollowTaskDetails(flowCardId, cell)); + } + + @ApiOperation("寮�濮嬩换鍔�") + @PostMapping("/startTask") + public Result<Boolean> startTask(String flowCardId, int cell) { + return Result.build(200, "寮�濮嬩换鍔℃垚鍔�", hollowGlassOutRelationInfoService.startTask(flowCardId, cell)); + } + + @ApiOperation("鏆傚仠浠诲姟") + @PostMapping("/pauseTask") + public Result<Boolean> pauseTask(String flowCardId, int cell) { + return Result.build(200, "鏆傚仠浠诲姟鎴愬姛", hollowGlassOutRelationInfoService.pauseTask(flowCardId, cell)); + } + + @ApiOperation("缁撴潫浠诲姟") + @PostMapping("/finishTask") + public Result<Boolean> finishTask(String flowCardId, int cell) { + return Result.build(200, "缁撴潫浠诲姟鎴愬姛", hollowGlassOutRelationInfoService.finishTask(flowCardId, cell)); } @ApiOperation("鏄惁璋冨害寮�鍏�") @PostMapping("/dispatchHollowSwitch") public Result<Boolean> dispatchHollowSwitch(Boolean flag) { - return Result.build(200, "淇敼鎴愬姛",hollowGlassOutRelationInfoService.dispatchHollowSwitch(flag)); + return Result.build(200, "淇敼鎴愬姛", hollowGlassOutRelationInfoService.dispatchHollowSwitch(flag)); } } -- Gitblit v1.8.0