| | |
| | | |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.uppattenusage.service.GlassInfoService; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | |
| | | */ |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/downWorkstation") |
| | | @Api(description = "工位") |
| | | @RequestMapping("/downWorkStation") |
| | | public class DownWorkstationController { |
| | | |
| | | @Autowired |
| | | private DownWorkstationService downWorkstationService; |
| | | @Autowired |
| | | private GlassInfoService glassInfoService; |
| | | |
| | | @ApiOperation("获取工位信息") |
| | | @GetMapping("/getone") |
| | | public ResponseEntity<?> getOneDownWorkstations() { |
| | | try { |
| | |
| | | } |
| | | } |
| | | |
| | | @GetMapping("/gettwo") |
| | | public List<DownWorkstation> gettwoDownWorkstations() { |
| | | return downWorkstationService.getoneDownWorkstations(6,10); |
| | | } |
| | | @ApiOperation("获取流程卡号") |
| | | @GetMapping("/getflowCardId") |
| | | public ResponseEntity<Map<String, Object>> getflowCardId() { |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | |
| | | |
| | | |
| | | //绑定架子 |
| | | @ApiOperation("绑定架子") |
| | | @PostMapping("/updateFlowCardId") |
| | | public ResponseEntity<Map<String, Object>> updateFlowCardId(@RequestBody Map<String, Object> requestData) { |
| | | // 从 requestData 中获取传入的 flowCardId |
| | |
| | | return ResponseEntity.ok(responseData); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("清除工位信息") |
| | | @PostMapping("/clear") |
| | | public ResponseEntity<Map<String, Object>> clearWorkstationInfo(@RequestBody Map<String, Object> requestData) { |
| | | // 调用 DownWorkstationService 中的方法清除指定工位ID的信息 |
| | |
| | | |
| | | |
| | | |
| | | @ApiOperation("获取工位显示图") |
| | | @GetMapping("/getwo") |
| | | public ResponseEntity<Map<String, Object>> getwo() { |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | | try { |
| | | List<Map<String, Object>> data = downWorkstationService.getTotalGlassDimensionsByWorkstation(); |
| | | responseData.put("code", 200); |
| | | responseData.put("msg", "成功"); |
| | | responseData.put("data", data); |
| | | return ResponseEntity.ok(responseData); |
| | | } catch (Exception e) { |
| | | responseData.put("code", 500); |
| | | responseData.put("msg", "失败"); |
| | | responseData.put("data", null); |
| | | return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(responseData); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |