ZengTao
2023-12-15 dbe1a260848e2314b2ac36691df9cb6f2f5b9062
修改理片程序
6个文件已修改
37 ■■■■ 已修改文件
CanadaMes-ui/src/views/home/index.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/service/OutSliceServive.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/home/index.vue
@@ -837,7 +837,6 @@
    },
    created() {
        this.load();
        this.init();
    }
    ,
@@ -885,13 +884,13 @@
                    }
                    //是否急停
                    this.EmergencyStop = obj.emergencystop[0];
                    console.log(this.EmergencyStop);
                    //复位倒计时
                    if ((obj.countdown[0] == true && this.CountDowns == 0) || this.EmergencyStop == true) {
                        this.CountDown();
                    }
                    //是否有进片请求
                    console.log(obj.D01RequestState[0]);
                    this.D01RequestState = obj.D01RequestState[0];
                    //是否允许出片
@@ -947,8 +946,6 @@
                            this.cageinfo = res.data.cageinfo;
                        });
                    }
                    this.$forceUpdate();
                }.bind(this);
@@ -983,6 +980,10 @@
                });
            });
            //加载小车位置信息
            Loadcarlist().then(res => {
                this.carlist = res.data.carlist;
            });
            //加载笼子使用情况数据
            home().then(res => {
                this.tableData = res.data.list;
@@ -1011,10 +1012,7 @@
            SelectAlarmmgInfo().then(res => {
                this.alarm = res.data.alarmmg;
            });
            //加载小车位置信息
            Loadcarlist().then(res => {
                this.carlist = res.data.carlist;
            });
            //加载确认密码
            SelectPassword().then(res => {
                this.password = res.data.password;
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
@@ -16,7 +16,7 @@
  private JdbcConnections jdbcConnections;
  private SpianMapper spianMapper;
  private SpianService spianService;
  int aaa;
  @Override
  public void run() {
    boolean inglassbegin = false;
@@ -48,7 +48,7 @@
      boolean B02backs = spianService.listbool("DB106.62");// b02汇报
      StringBuilder B01glassid = spianService.queGlassid("DB103.184", 14);// BO1的玻璃id
      StringBuilder B02glassid = spianService.queGlassid("DB103.212", 14);// B02的玻璃id
      int aaa=1;
      // 当进片小车完成任务时
      if (B01backs == true) {
        // 当B01小车汇报完成时更改玻璃状态 为1
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -147,7 +147,7 @@
      // S7control.getinstance().WriteWord("DB105.16", (short) 0);
    } else {
      spianMapper.UpdataOutCage1(glass.getGlassWidth(), glass.getCage(), glass.getCell());
      homeMapper.UpdateCageTask2(glassid);
      homeMapper.DeleteByGlassID(glassid);
      // S7control.getinstance().WriteWord("DB105.18", (short) 0);
    }
    map.put("message3", "200");
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
@@ -62,10 +62,6 @@
  @Update("update storage_cage set state=1 where glass_id=#{glassid} and state=2")
  void UpdateCageTask1(@Param("glassid") String glassid);
  // 手动完成出片任务修改笼子数据
  @Update("update storage_cage set state=0,glass_id=null,order_id=null,glasswidth=null,glassheight=null where glass_id=#{glassid} and state=3")
  void UpdateCageTask2(@Param("glassid") String glassid);
  //获取报警信息
  @Select("select id,content,timeon as timeons,endTime from alarmmg where endTime is null")
  List<alarmmg> SelectAlarmmgInfo();
@@ -74,6 +70,7 @@
  @Select("select * from storage_cage where position(#{cage} in ifnull(glass_id,\"\"))")
  List<StorageCage> SelectCageInfo(String cage);
  // 手动完成出片任务修改笼子数据
  @Update("update storage_cage set state=0,glass_id=null,order_id=null,glasswidth=null,glassheight=null,glasswidthmm=null,glassheightmm=null,listid=null,boxid=null where glass_id=#{glassid}")
  void DeleteByGlassID(String glassid);
springboot-vue3/src/main/java/com/example/springboot/service/OutSliceServive.java
@@ -60,7 +60,7 @@
    if(storageCage!=null){
      spianMapper.UpdataOutCage1(storageCage.getGlassWidth(), storageCage.getCage(), storageCage.getCell());
    }
    homeMapper.UpdateCageTask2(glassid);
    homeMapper.DeleteByGlassID(glassid);
    S7control.getinstance().WriteWord("DB105.12", (short) 0);
    Map<String, Object> map = new HashMap<>();
    map.put("message", "200");
springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
@@ -176,7 +176,7 @@
                spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid, 1);// 新增任务
                spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度
                spianMapper.UpdataGlassCageState(glassid, 3);// 更改笼子表的玻璃状态
                spianMapper.OverOutSlice(glassid, 2);// 完成出片队列任务
                spianMapper.OverOutSlice(glassid, 1);// 更新出片队列任务
                System.out.println("出片任务|" + datas);
                outmesid(glassid, "DB105.34");// 派发出片ID
                S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务
@@ -202,6 +202,7 @@
                    datas.add((short) 2);
                    datas.add((short) 1);
                    // 更换玻璃的笼子
                    spianMapper.UpdataGlassCageState(glassid, 3);// 更改笼子表的玻璃状态
                    String glassids = spianMapper.SelectGlassid(cage, cell); // 获取被调拨的玻璃id
                    spianMapper.UpdateDBCage(ids, cage, cell, 2);// 将原格子数据更新到新格子里
                    spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度
@@ -232,12 +233,12 @@
                    datas.add((short) 2);
                    datas.add((short) 1);
                    String glassids = spianMapper.SelectGlassid(cage, cell); // 获取被调拨的玻璃id
                    spianMapper.UpdataGlassCageState(glassid, 3);// 更改笼子表的玻璃状态
                    spianMapper.Inserttask(2, 0, cageout.getId() + 1, ids, glassid, 2);// 新增调度任务
                    // spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid);// 新增出片任务
                    spianMapper.UpdateDBCage(ids, cage, cell, 2);// 将原格子数据更新到新格子里
                    spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度
                    spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度
                    //spianMapper.UpdataGlassCageState(glassids, 3);// 更改笼子表的玻璃状态
                    spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度
                    // 传输mes数据,坐标,数据
                    System.out.println("出片任务|" + datas);
                    S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务
@@ -298,10 +299,11 @@
    // 根据玻璃id完成在进行中的任务
    public void overtask(String glassid) {
        spianMapper.UpdateCageOver(glassid, 0);// 更改笼子表出片状态
        spianMapper.UpdatetaskOut(glassid); // 完成上一次出片或者进片任务
        spianMapper.OverOutSlice(glassid, 2);// 完成出片队列任务
        spianMapper.UpdataGlassCage(glassid, 0);// 清除出片格子玻璃信息
        spianMapper.UpdateCageOver(glassid, 0);// 更改笼子表出片状态
        spianMapper.UpdateCageadd(glassid,1);
        String barcode = spianMapper.SelectBarcode(glassid);// 获取该玻璃的铝框id
        spianMapper.UpdateAddQueue(glassid);// 把进片的玻璃更新到出片队列中