ZengTao
2023-12-20 3eb2e3a7f3f40f48c8a44bf32e7b0baeee065921
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -141,14 +141,16 @@
  public Result UpdateTask(Integer types, Integer shelfrack, String glassid) {
    Map<String, Object> map = new HashMap<>();
    homeMapper.UpdateTask(types, glassid);
    StorageCage glass = homeMapper.SelectGlassInfo(glassid);
    if (types == 0) {
      homeMapper.UpdateCageTask1(glassid);
      S7control.getinstance().WriteWord("DB105.14", (short) 0);
    } else {
    } else if(types==1) {
      homeMapper.DeleteByGlassID(glassid);
    }else{
      StorageCage glass = homeMapper.SelectGlassInfo(glassid);
      spianMapper.UpdataOutCage1(glass.getGlassWidth(), glass.getCage(), glass.getCell());
      homeMapper.UpdateCageTask2(glassid);
      S7control.getinstance().WriteWord("DB105.12", (short) 0);
      homeMapper.DeleteByGlassID(glassid);
      //发送终止任务信号
      // S7control.getinstance().WriteWord("DB105.18", (short) 0);
    }
    map.put("message3", "200");
    return Result.success(map);
@@ -202,7 +204,6 @@
        } else {
          map.put("message2", "300");
        }
      } else {
        map.put("message2", "400");
      }