From 8a7e936b92038a9e5c7de3e1314c43f1346202c1 Mon Sep 17 00:00:00 2001 From: zhoushihao <zsh19950802@163.com> Date: 星期四, 01 八月 2024 15:02:29 +0800 Subject: [PATCH] 大理片笼出片逻辑调整:1、尺寸限制 2、fixbug:玻璃重复进出,造成按照历史任务查询笼内玻璃尺寸返回多条记录sql查询异常 3、对列表在新增数据前先按照玻璃id对历史数据进行删除后新增,保证对列表数据唯一,防止大理片笼进片异常 --- hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/controller/TaskCacheController.java | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 56 insertions(+), 2 deletions(-) diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/controller/TaskCacheController.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/controller/TaskCacheController.java index cf3d9d1..6f09fea 100644 --- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/controller/TaskCacheController.java +++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/controller/TaskCacheController.java @@ -1,7 +1,17 @@ package com.mes.taskcache.controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import com.mes.edgstoragecage.service.EdgStorageCageDetailsService; +import com.mes.edgstoragecage.service.EdgStorageCageService; +import com.mes.taskcache.entity.TaskCache; +import com.mes.taskcache.service.TaskCacheService; +import com.mes.utils.Result; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; /** * <p> @@ -11,9 +21,53 @@ * @author zhoush * @since 2024-04-07 */ +@Api(description = "璇嗗埆鏄剧ず") @RestController @RequestMapping("/taskCache") public class TaskCacheController { + @Autowired + private EdgStorageCageDetailsService edgStorageCageDetailsService; + + @Autowired + private EdgStorageCageService edgStorageCageService; + @Autowired + private TaskCacheService taskCacheService; + + @ApiOperation("鏌ヨ鍒囧壊鐗堝浘淇℃伅-鏍规嵁 宸ョ▼鍙� 鍙傛暟(宸ョ▼鍙�)") + @PostMapping("/cutTerritory") + @ResponseBody + public Result cutTerritory(String current) { + List<Map<String, Object>> h = edgStorageCageDetailsService.selectCurrentCutTerritory(current); + return Result.build(200,"鎴愬姛",h); + } + @ApiOperation("璇嗗埆鏄剧ず 褰撳墠鐗堝浘 鍙傛暟()") + @PostMapping("/currentCutTerritory") + @ResponseBody + public Result currentCutTerritory() { + List<Map<String, Object>> h = edgStorageCageDetailsService.selectCutTerritory(); + return Result.build(200,"鎴愬姛",h); + } + @ApiOperation("璇嗗埆鎿嶄綔锛� 鐮存崯/鎷胯蛋 鍙傛暟锛圛D,鍔熻兘[200锛氭嬁璧帮紝201:鐮存崯]锛�") + @PostMapping("/identControls") + @ResponseBody + public Result identControls(@RequestBody Map<String, String> arguments) { + /* arguments.put("glassId","鐜荤拑ID"); + arguments.put("controlsId","鍔熻兘鍙穂200鎷胯蛋/201鐮存崯]");*/ + /*arguments.put("line","1001"); + arguments.put("machine","璇嗗埆");*/ + boolean issucess = edgStorageCageDetailsService.identWorn(arguments); + return Result.build(200,"鎴愬姛",issucess); + } + + @ApiOperation("纾ㄨ竟浠诲姟 鍙傛暟()") + @PostMapping("/selectEdgTask") + @ResponseBody + public Result selectEdgTask(@RequestBody Map<String, String> arguments) { + String line=arguments.get("line"); + List<Map<String,Object>> EdgTasks = taskCacheService.selectEdgInfo(line); + return Result.build(200,"鎴愬姛",EdgTasks); + } + } -- Gitblit v1.8.0