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 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(); } } }