wu
2024-01-18 65bed7f78be75f0ba279885de647d76bc91d9336
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -400,8 +400,12 @@
  // 手动写入plc扫码位玻璃id
  @PostMapping("/WriteGlassID")
  public void WriteGlassID(String glassid) {
  public Result WriteGlassID(String glassid) {
    // 扫码位写入玻璃id
    spianService.outmesid(glassid, "DB103.256");
    Map<String, Object> map = new HashMap<>();
    map.put("message", "200");
    return Result.success(map);
  }
  // 清除指定位置id
@@ -447,4 +451,14 @@
        }
        return Result.success(map);
  }
  // 切换PLC获取二维码方式
  @PostMapping("/SwitchScanMethod")
  public Result SwitchScanMethod(Short scansmethod) {
    S7control.getinstance().WriteWord("DB103.255", scansmethod);
    Map<String, Object> map = new HashMap<>();
    map.put("message", "200");
    return Result.success(map);
  }
}