严智鑫
2024-08-19 dd337ad0b3438a4abed5cef12618a83da3022011
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package com.mes.taskcache.controller;
 
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;
 
import static com.mes.job.CacheGlassTask.engineerId;
 
/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @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) {
        //engineerId=current;
        List<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("识别操作:   破损/拿走     参数(ID,功能[200:拿走,201:破损])")
    @PostMapping("/identControls")
    @ResponseBody
    public Result identControls(@RequestBody Map<String, Object> arguments) {
        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);
    }
 
}