wu
2024-04-10 321c0a50fdfa52d7d2da52dfb4fa74adff1c0f39
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
package com.mes.controller;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.mes.common.Result;
import com.mes.entity.UpWorkstation;
import com.mes.service.LoadGlassService;
 
 
@RestController
@RequestMapping("/LoadGlass")
 
// TidyUpGlassModule 钢化模块
public class LoadGlassController {
 
    @Autowired
    private LoadGlassService loadGlassService;
 
    @PostMapping("/SelectAll") //查询现在上片机的玻璃信息
    @ResponseBody
    public Result SelectGlassInfo() {
        List<UpWorkstation> glass = loadGlassService.selectAll();
        System.out.println(glass);
        return Result.seccess(glass);
    }
 
    @PostMapping("/insertGlass") //修改一条工位信息,接收实例类字段为宽高厚膜系数量工位id
    @ResponseBody
    public void insertGlassinfo(@RequestBody UpWorkstation upwork) {
        loadGlassService.insertGlass(upwork);
      
    }
 
    @PostMapping("/deleteGlass") //修改一条工位的玻璃信息,传输工位id将玻璃信息相关字段更改为null
    @ResponseBody
    public void SelectCutTerritory(int upworkid) {
        loadGlassService.deleteGlass(upworkid);
    }
    
    @PostMapping("/selectPriority") //开始上片任务
    @ResponseBody
    public void selectPriority() {
        boolean result = loadGlassService.isCanLoadGlass();
        if(result==true){
            loadGlassService.selectPriority();
        }
    }
 
  
 
}