wu
2023-11-30 0ece3ba8c92df0438af52b8de6b9225d8ada4103
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -13,6 +13,7 @@
import com.example.springboot.service.JdbcConnections;
import com.example.springboot.service.SpianService;
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.StorageCage;
@@ -151,21 +152,17 @@
  // 根据玻璃id手动出片
  @GetMapping("/OutByGlassID")
  public Result OutByGlassID(String glassid) {
  public Result OutByGlassID(String glassid) throws SQLException {
    Map<String, Object> map = new HashMap<>();
    // 调用伍上片函数
    short result = homeMapper.SelectStorageByGlassId(glassid);
    if (result > 0) {
      Short results = spianService.selectout2(glassid);
      if (results == 200) {
    Out_slice result = homeMapper.SelectQueueByglassid(glassid);
    if(result==null) {
      north_glass_buffer1 north_glass_buffer1=jdbcConnections.SelectGlassByGlassIdOrderIdFrameId(glassid, "", "");
      String flip=jdbcConnections.SelectFlipByFrameBarcode(north_glass_buffer1.getFrameBarcode());
      homeMapper.AddOutSliceS(glassid, flip, north_glass_buffer1.getFrameBarcode(), north_glass_buffer1.getglasslengthmm().toString(), north_glass_buffer1.getglassheightmm().toString());
        map.put("message2", "200");
      } else if (results == 300) {
        map.put("message2", "300");
      }
    } else {
      map.put("message2", "500");
    }
    return Result.success(map);
  }
@@ -277,10 +274,8 @@
  // 根据铝框id获取对应玻璃信息
  @PostMapping("/SelectAluminumFrameInfoById")
  public Result SelectAluminumFrameInfoById(String FrameBarcode) throws SQLException {
    // List<north_glass_buffer1> listAluminumFrame = homeMapper.SelectAluminumFrameInfoById(FrameBarcode);
    List<north_glass_buffer1> listAluminumFrame = jdbcConnections.SelectGlassByGlassIdOrderIdFrameIds("","",FrameBarcode);
    String flip=homeMapper.SelectFlipByFrameBarcode(FrameBarcode);
    String flip=jdbcConnections.SelectFlipByFrameBarcode(FrameBarcode);
    for (north_glass_buffer1 north_glass_buffer1 : listAluminumFrame) {
      north_glass_buffer1.setstorageCage(homeMapper.SelectStorageGlassById(north_glass_buffer1.getbarcode()));
      north_glass_buffer1.setOut_slice(homeMapper.SelectQueueByglassid(north_glass_buffer1.getbarcode()));
@@ -290,8 +285,6 @@
    map.put("flip", flip);
    return Result.success(map);
  }
  // 查询出片队列数据
  @PostMapping("/SelectProductionqueue")
@@ -303,7 +296,9 @@
    }
    Map<String, Object> maps = new HashMap<>();
    maps.put("listoutslice", listoutslice);
    // Plchome.isAllowQueue=false;
    return Result.success(maps);
  }
  // 根据玻璃id删除出片队列玻璃
@@ -315,7 +310,7 @@
    return Result.success(map);
  }
  //
  //添加出片
  @PostMapping("/AddOutSliceS")
  public Result AddOutSliceS(@RequestBody String[][] AluminumFrames ) {
    for (String[] item : AluminumFrames) {
@@ -323,7 +318,15 @@
        homeMapper.AddOutSliceS(item[0],item[2],item[3],item[4],item[5]);
      }
    }
    System.out.println(AluminumFrames);
    Map<String, Object> map = new HashMap<>();
    map.put("message", "200");
    return Result.success(map);
  }
  //修改出片队列状态
  @PostMapping("/isAllowQueues")
  public Result isAllowQueues(Boolean isAllowQueue) {
    Plchome.isAllowQueue=isAllowQueue;
    Map<String, Object> map = new HashMap<>();
    map.put("message", "200");
    return Result.success(map);