ZengTao
2024-03-31 01bfed8b9977f82d4e13afd9ce95869d34044d2b
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -1,6 +1,7 @@
package com.example.springboot.controller;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -16,11 +17,17 @@
import com.example.springboot.service.OutSliceServive;
import com.example.springboot.service.SpianService;
import com.example.springboot.service.StorageCageService;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import cn.hutool.core.lang.Console;
import com.example.springboot.common.Result;
import com.example.springboot.component.Plchome;
import com.example.springboot.component.S7control;
import com.example.springboot.entity.CarPosition;
import com.example.springboot.entity.GlassInfo;
import com.example.springboot.entity.StorageCage;
import com.example.springboot.entity.alarmmg;
import com.example.springboot.entity.north_glass_buffer1;
@@ -446,4 +453,60 @@
    return Result.success(map);
  }
  // 切换PLC获取二维码方式
  @PostMapping("/UpdateStroageCageByCell")
  public Result UpdateStroageCageByCell(Integer cell,Integer num) {
    return storageCageService.UpdateStroageCageByCell(cell,num);
  }
  //手动完成任务
  @PostMapping("/FinishTask")
  public Result FinishTask(Integer id) {
    return storageCageService.FinishTask(id);
  }
  //查询玻璃信息
  @PostMapping("/SelectGlassInfo")
  public Result SelectGlassInfo(String width,String height,String thickness,String films) {
    return storageCageService.SelectGlassInfo(width,height,thickness,films);
  }
  //添加玻璃信息到笼子
  @PostMapping("/StorageCageAddGlass")
  public Result StorageCageAddGlass(String cell,@RequestBody GlassInfo glassInfo) {
    return storageCageService.StorageCageAddGlass(cell,glassInfo);
  }
  //领取/暂停任务
  @PostMapping("/ClaimTasks")
  public Result ClaimTasks(String flowcard,Integer state, Integer line) {
    return storageCageService.ClaimTasks(flowcard,state,line);
  }
  //修改出片方式
  @PostMapping("/ModeChange")
  public Result ModeChange(String flowcard,Integer method) {
    return storageCageService.ModeChange(flowcard,method);
  }
   //添加玻璃信息到测量信息
   @PostMapping("/UpdateQueue")
   public Result UpdateQueue(@RequestBody GlassInfo glassInfo) {
     return storageCageService.UpdateQueue(glassInfo);
   }
    //人工拿走
    @PostMapping("/ManualTake")
    public Result ManualTake(@RequestBody String glassInfo) {
      return storageCageService.ManualTake(glassInfo);
    }
    //重新测量
    @PostMapping("/AnewMeasure")
    public Result AnewMeasure(@RequestBody String glassInfo) {
      return storageCageService.AnewMeasure(glassInfo);
    }
   //导入数据 :添加玻璃信息
   @PostMapping("/importData")
   public Result importData(@RequestBody List<Map> IportDataStr) {
     return storageCageService.AddGlassinfo(IportDataStr);
   }
}