zhoushihao
2024-04-18 29ea56cf0546726a83da815ee6721090311f5567
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
72
73
74
75
76
77
78
79
80
package com.mes.taskcache.controller;
 
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;
 
/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author zhoush
 * @since 2024-04-07
 */
@RestController
@RequestMapping("/taskCache")
public class TaskCacheController {
 
    @Autowired
    private PpService ppService;
 
    @Autowired
    private HangzhoumesService hangzhoumesService;
 
//    @GetMapping("/SelectTerritoryInfo") // 查询钢化版图信息-根据 工程号
//    @ResponseBody
//    public Result SelectTerritoryInfo(@RequestParam(name = "ProcessId", required = false) String ProcessId) {
//        List<Tempered> h = ppService.selectTemperedTerritory(ProcessId);
//        return Result.seccess(h);
//    }
 
    @GetMapping("/CutTerritory") // 查询切割版图信息-根据 工程号
    @ResponseBody
    public Result CutTerritory(String ProcessId) {
        List<Map> h = ppService.selectCutTerritory(ProcessId);
        return Result.build(200, "成功", h);
    }
 
    @GetMapping("/CurrentCutTerritory") // 识别显示  当前版图
    @ResponseBody
    public Result CurrentCutTerritory() {
        List<Map> h = ppService.selectCutTerritory();
        System.out.println(h);
        return Result.build(200, "成功", h);
    }
 
    @GetMapping("/SelectCutTerritory") // 识别显示  特定版图
    @ResponseBody
    public Result SelectCutTerritory(String TerritoryId) {
        List<Map> h = ppService.selectCutTerritory(TerritoryId);
        return Result.build(200, "成功", h);
    }
 
    @GetMapping("/IdentControls") //   识别操作:   破损/拿走     参数(ID,功能[0:破损,1:拿走])
    @ResponseBody
    public Result Ident(@RequestParam(name = "IdentId", required = false) String ProcessId, @RequestParam(name = "ControlsId", required = false) String ControlsId) {
        List<Map> h = ppService.selectCutTerritory("P24032508");
        return Result.build(200, "成功", h);
    }
 
    @GetMapping("/SelectCageInfo") // 查询笼内信息
    @ResponseBody
    public Result SelectCageInfo(String ProcessId) {
        List<Map> h = hangzhoumesService.SelectCageInfo();
        return Result.build(200, "成功", h);
    }
 
    @GetMapping("/SelectEdgTask") //磨边任务
    @ResponseBody
    public Result SelectEdgTask(String ProcessId) {
        List<Map> EdgTasks = hangzhoumesService.SelectEdgInfo("1");
        return Result.build(200, "成功", EdgTasks);
    }
 
}