package com.mes.taskcache.controller; import com.mes.edgstoragecage.service.impl.EdgStorageCageDetailsServiceImpl; import com.mes.edgstoragecage.service.impl.EdgStorageCageServiceImpl; import com.mes.taskcache.service.HangzhoumesService; import com.mes.taskcache.service.PpService; import com.mes.utils.Result; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; /** *

* 前端控制器 *

* * @author zhoush * @since 2024-04-07 */ @RestController @RequestMapping("/taskCache") public class TaskCacheController { @Autowired private EdgStorageCageServiceImpl edgStorageCageServiceImpl; @Autowired private EdgStorageCageDetailsServiceImpl edgStorageCageDetailsServiceImpl; @Autowired private HangzhoumesService hangzhoumesService; @PostMapping("/cutTerritory") // 查询切割版图信息-根据 工程号 @ResponseBody public Result cutTerritory(String current) { List h = edgStorageCageDetailsServiceImpl.selectCurrentCutTerritory(current); return Result.build(200,"成功",h); } @PostMapping("/currentCutTerritory") // 识别显示 当前版图 @ResponseBody public Result currentCutTerritory() { List h = edgStorageCageDetailsServiceImpl.selectCutTerritory(); return Result.build(200,"成功",h); } @PostMapping("/selectCutTerritory") // 识别显示 特定版图 @ResponseBody public Result selectCutTerritory(String TerritoryId) { List h = edgStorageCageDetailsServiceImpl.selectCutTerritory(); return Result.build(200,"成功",h); } @PostMapping("/identControls") // 识别操作: 破损/拿走 参数(ID,功能[0:破损,1:拿走]) @ResponseBody public Result identControls(@RequestParam(name = "identId", required = false) String identId,@RequestParam(name = "controlsId", required = false) int controlsId) { boolean issucess = edgStorageCageDetailsServiceImpl.identWorn(identId,controlsId); return Result.build(200,"成功",issucess); } @PostMapping("/selectCageInfo") // 查询笼内信息 @ResponseBody public Result selectCageInfo(String ProcessId) { List h = hangzhoumesService.SelectCageInfo(); return Result.build(200,"成功",h); } @PostMapping("/selectEdgTask") //磨边任务 @ResponseBody public Result selectEdgTask(String ProcessId) { List EdgTasks = hangzhoumesService.SelectEdgInfo("1"); return Result.build(200,"成功",EdgTasks); } }