wu
2024-01-19 a62fc01c617ed7d6837d897a120905c2b307ad89
增加汇报写入判断限制
20个文件已修改
1个文件已添加
629 ■■■■■ 已修改文件
CanadaMes-ui/src/api/home.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/configuration/InteractionState.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/lang/locales/en-US.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/lang/locales/zh-CN.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/Electrical/InteractionState.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/Electrical/Parameter2.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/home/index.vue 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/PLCAutomaticParameterSettingReview.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/PlcInteractionState.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/PlcLayout.java 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/PlcManualonePosition.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/resources/config.properties 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/api/home.js
@@ -286,9 +286,9 @@
    })
}
export function SwitchScanMethod(scansmethod) {s
export function SwitchScanMethod(scansmethod) {
    return request({
        url: '/home/SwitchScanMethod?Scanmethod='+scanmethod,
        url: '/home/SwitchScanMethod?scansmethod='+scansmethod,
        method: 'post',
        data:""
    })
CanadaMes-ui/src/configuration/InteractionState.json
@@ -334,7 +334,7 @@
            "max":9999
          },
          {
            "name": "B01小车当前任务位",
            "name": "B01小车当前任务位置",
            "read": 22,
            "sending": 0,
            "unit": "mm",
@@ -368,7 +368,7 @@
            }, "type": "1"
          },
          {
            "name": "B02小车当前位置",
            "name": "B02小车当前任务位置",
            "read": 22,
            "sending": 0,
            "unit": "mm",
CanadaMes-ui/src/lang/locales/en-US.json
@@ -1,6 +1,6 @@
{
  "ip": "localhost",
  "Clear":"Clear",
  "ip":"localhost",
  "systemTitle": "Login System",
  "usernamePlaceholder": "Please enter username",
  "passwordPlaceholder": "Please enter password",
CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -1,5 +1,6 @@
{
  "ip": "localhost",
  "Clear":"清除",
  "ip":"localhost",
  "systemTitle": "登录系统",
  "usernamePlaceholder": "请输入用户名",
  "passwordPlaceholder": "请输入密码",
CanadaMes-ui/src/views/Electrical/InteractionState.vue
@@ -229,7 +229,7 @@
  const specialChars = /[^\w\s]/g;
  if(obj.zuhe1){
    
//console.log(obj);
console.log(obj);
 for (let i = 0; i < jsondata2.length; i++) {
  const item = jsondata2[i];
CanadaMes-ui/src/views/Electrical/Parameter2.vue
@@ -285,6 +285,9 @@
    },
    updateButtonValue(dataGroup, itemIndex) {
      console.log(dataGroup)
      console.log(itemIndex)
      if (dataGroup[itemIndex].button.value2 === 1) {
        // 如果当前按钮的值是 0,将其设为 1
        this.$set(dataGroup[itemIndex].button, "value2", 0);
CanadaMes-ui/src/views/home/index.vue
@@ -252,7 +252,7 @@
            <div style="display:flex;justify-content: space-around;width: 9zz5%;margin: 0 auto;">
                <!-- <el-input style="width:15%;" :placeholder="$t('Enter the glass barcode')" v-model="glassid1"
                    :class="ManuallyInfeedGlass == true ? 'hide' : ''"></el-input> -->
                <el-button type="primary" @click="SelectGlassByGlassIDs(2)" :disabled="ManuallyInfeedGlass"
                <el-button type="primary" @click="SelectGlassByGlassIDs()" :disabled="ManuallyInfeedGlass"
                    :class="ManuallyInfeedGlass == true ? 'hide' : ''">
                    {{ $t('Manually Infeed Glass') }}</el-button>
                <el-button type="primary" @click="showform2()" :disabled="OrderInfo"
@@ -375,37 +375,70 @@
                <div class="device" :style="'top: 262px;left: 150px;background-color: ' + ShowDeviceList(8) + ';'">D05</div>
                <div class="device" :style="'top: 339px;left: 150px;background-color: ' + ShowDeviceList(9) + ';'">D06</div>
                <div class="glass D01" style="top: 54px;left: 1055px;position: absolute;"
                    @click="ClearGlassId('DB101.9.2', 0)">{{ ShowGlassIdList(0) }}</div>
                <div class="glass D02" style="top: 132px;left: 1055px;position: absolute;"
                    @click="ClearGlassId('DB101.9.2', 1)">{{ ShowGlassIdList(1) }}</div>
                <div class="glass B01" style="top: 270px;left: 640px;position: absolute;"
                    @click="ClearGlassId('DB101.10.2', 2)">
                    B01:{{ ShowGlassIdList(2) }}</div>
                <div class="glass B02" style="top: 290px;left: 640px;position: absolute;"
                    @click="ClearGlassId('DB101.10.3', 3)">B02:{{ ShowGlassIdList(3) }}</div>
                <div class="glass A01" style="top: 270px;left: 289px;position: absolute;"
                    @click="ClearGlassId('DB101.10.0', 4)">
                    A01.1:{{ ShowGlassIdList(4) }}</div>
                <div class="glass D01" style="top: 39px;left: 1055px;position: absolute;">{{ ShowGlassIdList(0) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.2', 0)">
                        {{ $t('Clear') }}</el-button>
                </div>
                <div class="glass D02" style="top: 117px;left: 1055px;position: absolute;">{{ ShowGlassIdList(1) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.2', 1)">
                        {{ $t('Clear') }}</el-button>
                </div>
                <div class="glass B01" style="top: 270px;left: 640px;position: absolute;">
                    B01:{{ ShowGlassIdList(2) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.2', 2)">
                        {{ $t('Clear') }}</el-button>
                </div>
                <div class="glass B02" style="top: 315px;left: 640px;position: absolute;">B02:{{ ShowGlassIdList(3) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.3', 3)">
                        {{ $t('Clear') }}</el-button>
                </div>
                <div class="glass A01" style="top: 270px;left: 289px;position: absolute;">
                    A01.1:{{ ShowGlassIdList(4) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.0', 4)">
                        {{ $t('Clear') }}</el-button>
                </div>
                <div class="glass A01" style="top: 290px;left: 289px;position: absolute;"
                    @click="ClearGlassId('DB101.10.1,5')">A01.2:{{ ShowGlassIdList(5) }}</div>
                <div class="glass A01" style="top: 315px;left: 289px;position: absolute;">A01.2:{{ ShowGlassIdList(5) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.1,5', 5)">
                        {{ $t('Clear') }}</el-button>
                </div>
                <div class="glass A02" style="top: 310px;left: 289px;position: absolute;"
                    @click="ClearGlassId('DB101.10.2,6')">A02:{{ ShowGlassIdList(6) }}</div>
                <div class="glass A02" style="top: 360px;left: 289px;position: absolute;">A02:{{ ShowGlassIdList(6) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.2,6', 6)">
                        {{ $t('Clear') }}</el-button>
                </div>
                <div class="glass D03" style="top: 137px;left: 42px;position: absolute;"
                    @click="ClearGlassId('DB101.9.4', 7)">
                    {{ ShowGlassIdList(7) }}</div>
                <div class="glass D04" style="top: 213px;left: 42px;position: absolute;"
                    @click="ClearGlassId('DB101.9.5', 8)">
                    {{ ShowGlassIdList(8) }}</div>
                <div class="glass D05" style="top: 290px;left: 42px;position: absolute;"
                    @click="ClearGlassId('DB101.9.6', 9)">
                    {{ ShowGlassIdList(9) }}</div>
                <div class="glass D06" style="top: 367px;left: 42px;position: absolute;"
                    @click="ClearGlassId('DB101.9.5', 10)">
                    {{ ShowGlassIdList(10) }}</div>
                <div class="glass D03" style="top: 122px;left: 42px;position: absolute;">
                    {{ ShowGlassIdList(7) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.4', 7)">
                        {{ $t('Clear') }}</el-button>
                </div>
                <div class="glass D04" style="top: 198px;left: 42px;position: absolute;">
                    {{ ShowGlassIdList(8) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.5', 8)">
                        {{ $t('Clear') }}</el-button>
                </div>
                <div class="glass D05" style="top: 275px;left: 42px;position: absolute;">
                    {{ ShowGlassIdList(9) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.6', 9)">
                        {{ $t('Clear') }}</el-button>
                </div>
                <div class="glass D06" style="top: 352px;left: 42px;position: absolute;">
                    {{ ShowGlassIdList(10) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.5', 10)">
                        {{ $t('Clear') }}</el-button>
                </div>
            </div>
@@ -573,29 +606,29 @@
                        }}</el-button>
                    </el-form-item> -->
                    <el-form-item>
                        {{ $t('Confirm State') }}:{{ this.isConfirm == true ? $t('Not Allow') : $t('Allow') }}
                        {{ $t('Confirm State') }}:{{ this.isConfirm == true ? $t('Allow') : $t('Not Allow') }}
                        <el-button type="primary" @click="isConfirmState()">
                            {{ this.isConfirm == true ? $t('Allow') : $t('Not Allow') }}</el-button>
                            {{ this.isConfirm == true ? $t('Not Allow') : $t('Allow') }}</el-button>
                    </el-form-item>
                    <el-form-item>
                        {{ $t('Current State') }}:{{ this.Scanningmethod==true?$t('Automatic'):$t('Hand Movement')}}
                        {{ $t('Current State') }}:{{ this.Scanningmethod == false ? $t('Automatic') : $t('Hand Movement') }}
                        <el-button type="primary" @click="SwitchScanMethod()">{{ $t('Switch')
                        }}</el-button>
                    </el-form-item>
                    <el-form-item>
                        <el-input style="width:70%;" maxlength="14" :placeholder="$t('Enter the glass barcode')"
                        <el-input style="width:70%;" maxlength="13" :placeholder="$t('Enter the glass barcode')"
                            v-model="glassid1"></el-input>
                        <el-button type="primary" :disabled="Scanningmethod" @click="WriteGlassID()">{{ $t('Add')
                        <el-button type="primary" :disabled="!Scanningmethod" @click="WriteGlassID()">{{ $t('Add')
                        }}</el-button>
                    </el-form-item>
                    <el-form-item>
                        {{ $t('Barcode') }}:
                        <el-input style="width:70%;" maxlength="14" :disabled="true" v-model="glassid1"></el-input>
                        <el-input style="width:70%;" maxlength="14" :disabled="true" v-model="CurrrentGlassId"></el-input>
                    </el-form-item>
                </div>
                <div style="display: flex;justify-content: space-around;">
                    <label for="">{{ $t('Upper film position') }}</label>
                    <label for="">{{ $t('Scan Code Point') }}</label>
                </div>
                <div style="display: flex;justify-content: space-around;height: 40px;">
@@ -701,11 +734,11 @@
                        {{ $t('Confirm') }}</el-button>
                </div>
            </el-form>
            <template #footer>
            <!-- <template #footer>
                <span class="dialog-footer">
                    <el-button @click="cancel3()">{{ $t('cancel') }}</el-button>
                </span>
            </template>
            </template> -->
        </el-dialog>
        <el-dialog :visible.sync="dialogFormVisible6" :title="$t('Outing Queue')" top="5vh">
@@ -980,12 +1013,12 @@
            CurrentFrame: [],
            DeviceList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
            GlassIdList: [],
            Scanningmethod: true
            Scanningmethod: true,
            CurrrentGlassId: ""
        };
    },
    created() {
        this.load();
        this.init();
    }
    ,
@@ -1028,12 +1061,13 @@
                    this.alarm = obj.alarmmg[0];
                    //获取当前扫码方式
                    if (obj.Scanningmethod != null) {
                        if (obj.Scanningmethod == 0) {
                            this.Scanningmethod = true;
                        }
                        else {
                            this.Scanningmethod = false;
                        }
                        this.Scanningmethod = obj.Scanningmethod[0];
                    }
                    //获取当前扫码枪玻璃id
                    if (obj.CurrrentGlassId != null) {
                        const specialChars = /[^\w\s]/g;
                        this.CurrrentGlassId = obj.CurrrentGlassId[0].replace(specialChars, "");
                    }
                    //查询当前铝框信息
@@ -1120,10 +1154,13 @@
                    } else {
                        this.form3 = {};
                    }
                    if (obj.form3 != null && obj.form3 != "" && obj.state[0] == 0) {
                        this.loadglassheight1 = 70;
                        if (this.form5.glassId != obj.form3[0].glassId) {
                            this.showform3();
                        }
                        this.form5 = obj.form3[0];
                        this.showform3();
                        this.glassid1 = "";
                        if (this.D01RequestState == true) {
                            this.Sizerange(this.form5, 3);
@@ -1256,6 +1293,7 @@
        },
        //手动上片
        sbumitglassid() {
            console.log(1111111);
            if (this.form.order != "") {
                if (this.form.height < 380 || this.form.width < 390 || this.form.height > 1810 || this.form.width > 2760) {
                    this.$message.error(this.$t('The glass size is not within the range'));
@@ -1318,17 +1356,17 @@
        },
        //手动写入plc扫码位玻璃id
        WriteGlassID() {
            if (this.glassid1.length ==14) {
            if (this.glassid1.length == 14) {
                WriteGlassID(this.glassid1).then(res => {
                    console.log(res.data);
                    this.$message.success(this.$t('Successful operation'));
                });
            }else{
            } else {
                this.$message.error(this.$t('Please enter the correct glassID'));
            }
        },
        //获取扫码位和上片位数据
        SelectGlassByGlassIDs(parameter) {
        SelectGlassByGlassIDs() {
            this.showform3();
            // if (parameter == 1) {
            //     SelectGlassByGlassID(this.glassid2).then(res => {
@@ -1629,6 +1667,9 @@
                        if (res.data.message == 200) {
                            this.form5 = {};
                            this.$message.success(this.$t('Operation successful'));
                        }
                        else if (res.data.message == 400) {
                            this.$message.error(this.$t('The glass size is not within the range'));
                        } else {
                            this.$message.error(this.$t('This glass ID already exists in the sorting cage'));
                        }
@@ -2039,8 +2080,9 @@
        //清除玻璃id
        ClearGlassId(position, num) {
            if (this.ClearGlassID == false) {
                if (this.DeviceList[position] == 0) {
                    if (this.GlassIdList[num].length == 14) {
                console.log(this.DeviceList, num);
                if (this.DeviceList[num] == 0) {
                    if (this.GlassIdList[num].length <= 14) {
                        this.$confirm(this.$t('Are you sure to clear this barcode ?'), this.$t('confirm'), {
                            confirmButtonText: this.$t('Yes'),
                            cancelButtonText: this.$t('No'),
@@ -2098,14 +2140,8 @@
            });
        },
        //切换二维码获取方式
        SwitchScanMethod(){
            var Scanmethod;
            if(this.Scanningmethod == true){
                this.Scanmethod = 1;
            }else{
                this.Scanmethod = 0;
            }
            SwitchScanMethod(Scanmethod).then(res => {
        SwitchScanMethod() {
            SwitchScanMethod(!this.Scanningmethod).then(res => {
                if (res.data.message == 200) {
                    this.$message.success(this.$t('Operation successful'));
                }
springboot-vue3/src/main/java/com/example/springboot/component/PLCAutomaticParameterSettingReview.java
@@ -26,10 +26,10 @@
        this.storageCageService = storageCageService;
        this.plcParameterObject = new PlcParameterObject();
        this.plcBitObject = new PlcBitObject();
        String jsonFilePath = "JsonFile/PlcParameter.json";
        InitUtil.initword(jsonFilePath); // 初始化 PlcParameterObject
        String jsonFilePath2 = "JsonFile/PlcSign.json";
        InitUtil.initbit(jsonFilePath2); // 初始化 PlcSign
        // String jsonFilePath = "JsonFile/PlcParameter.json";
        // InitUtil.initword(jsonFilePath); // 初始化 PlcParameterObject
        // String jsonFilePath2 = "JsonFile/PlcSign.json";
        // InitUtil.initbit(jsonFilePath2); // 初始化 PlcSign
    }
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
@@ -1,5 +1,6 @@
package com.example.springboot.component;
import java.time.LocalDateTime;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import com.example.springboot.service.JdbcConnections;
@@ -24,11 +25,12 @@
    while (this != null) {
      try {
        Thread.sleep(50);
        Thread.sleep(100);
      } catch (InterruptedException e) {
        // \\ TODO Auto-generated catch block
        e.printStackTrace();
      }
      // if (S7control.getinstance().CheckConnected() == false) {
      spianService = WebSocketServer.applicationContext.getBean(SpianService.class);
      spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
@@ -41,10 +43,19 @@
      // // TODO Auto-generated catch block
      // e.printStackTrace();
      // }
      // 出片任务////////////////////////////////
      List<Short> outlist = S7control.getinstance().ReadWord("DB106.20", 1); // 出片车状态
      List<Short> outlist1 = S7control.getinstance().ReadWord("DB105.18", 1); // 出片任务是否启动
       boolean Plcadd = spianService.listbool("DB106.62"); // 出片请求字
       if(Plcadd==false){
        S7control.getinstance().WriteWord("DB105.18", (short) 1);// 出片任务发送字改为0
       }
      // StringBuilder writedstrIdOut = new StringBuilder();
      // 获取已下发的出片id
      byte[] writedglassidbytesOut = S7control.getinstance().ReadByte("DB105.30", 14);
@@ -82,6 +93,8 @@
        if (outstate == true) {// 当出片车空闲时,且出片启动为1时,任务启动改为0
          if (outstate1 == true) {
            S7control.getinstance().WriteWord("DB105.18", (short) 0);// 出片任务启动改为0
            System.out.println("关闭启动" + LocalDateTime.now());
          }
        }
      }
@@ -92,30 +105,51 @@
      List<Short> datas1ListState2 = S7control.getinstance().ReadWord("DB105.16", 1);// 获取进片车任务是否启动
      boolean B01backs = spianService.listbool("DB106.60");// b01汇报
      boolean B02backs = spianService.listbool("DB106.62");// b02汇报
      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
      // 当进片小车完成任务时
      if (B01backs == true) {
        // 当B01小车汇报完成时更改玻璃状态 为1
        // spianService.overtask(B01glassid.toString());// 完成任务
        // S7control.getinstance().WriteWord("DB106.60", (short) 0);// 恢复B01小车应答改为0
        boolean yingda = spianService.listbool("DB106.60");// b01汇报
        System.out.println("汇报时B01|第" + aaa + "次" + B01glassid + "应答" + yingda);
        aaa += 1;
        // 判断是否汇报正确的id
        int HB = spianMapper.SelectHB(B01glassid.toString());
        if (HB > 0) {
          // 当B01小车汇报完成时更改玻璃状态 为1
          S7control.getinstance().WriteWord("DB106.60", (short) 0);// 恢复B01小车应答改为0
          boolean yingda = spianService.listbool("DB106.60");// b01汇报
          if (yingda == false) {
            spianService.overtask(B01glassid.toString());// 完成任务
          }
          System.out.println("汇报时B01|第" + aaa + "次" + B01glassid + "应答" + yingda);
          aaa += 1;
        }
      }
      // 当出片小车完成任务时
      if (B02backs == true) {
        // 当B02小车汇报完成时更改玻璃状态为0
        // spianService.overtask(B02glassid.toString());// 完成任务
        // S7control.getinstance().WriteWord("DB106.62", (short) 0);// 恢复B02小车应答改为0
        // 判断是否汇报正确的id
        int HB = spianMapper.SelectHB(B02glassid.toString());
        System.out.println("汇报时B02|" + B02glassid);
        boolean yingda1 = spianService.listbool("DB106.62");// b02汇报
        System.out.println("汇报时B02|第" + aaa + "次" + B02glassid + "应答" + yingda1);
        if (HB > 0) {
          // 当B02小车汇报完成时更改玻璃状态为0
          S7control.getinstance().WriteWord("DB106.62", (short) 0);// 恢复B02小车应答改为0
          System.out.println("汇报时B02|" + B02glassid);
          boolean yingda = spianService.listbool("DB106.62");// b02汇报
          if (yingda == false) {
            spianService.overtask(B02glassid.toString());// 完成任务
          }
          System.out.println("汇报时B02|第" + aaa + "次" + B02glassid + "应答" + yingda);
        }
      }
      boolean Plcout = spianService.listbool("DB106.62"); // 进片请求字
        if(Plcout==false){
        S7control.getinstance().WriteWord("DB105.18", (short) 0);// 进片任务发送字改为0
       }
      // 获取DO1数据
@@ -140,6 +174,7 @@
        }
      }
      if (queueid2 != null) {
        // 写入D02的数据到上片队列表
        if (glass2 == null) {
@@ -154,14 +189,7 @@
      }
      // if (outstate == true) { // 出片车状态空闲时
      // Integer state = spianMapper.Selectoutstate();
      // String orderid = spianMapper.SelectOrderout();
      // if (orderid != null && state == 0) {
      // spianService.selectout(orderid);
      // }
      // }
      // 查询数据库
      // 推送到前端
springboot-vue3/src/main/java/com/example/springboot/component/PlcInteractionState.java
@@ -59,6 +59,9 @@
            List<String> addresses5 = Arrays.asList(config.getProperty("PlcInteractionState.MEStaskinformation").split(","));
            List<String> arraylist5 = S7control.getinstance().readStringsandword(addresses5);
            List<String> addresses6 = Arrays.asList(config.getProperty("PlcInteractionState.MEStaskinformation2").split(","));
            List<String> arraylist6 = S7control.getinstance().readStringsandword(addresses6);
//            String[] values = { ".x11","x21 ","x21 ","x21 ","x21 ","x21"};
//   List<String> arraylist = new ArrayList<>(Arrays.asList(values));
@@ -68,8 +71,12 @@
//            List<String> arraylist3 = new ArrayList<>(Arrays.asList(values3));
//            String[] values4 = { ".x11 ","x21 ","x21 ","x21 "};
//            List<String> arraylist4 = new ArrayList<>(Arrays.asList(values4));
//            String[] values5 = { ".x11 ","x21 ","x21 ","x21 ","x21 ","x21 ","x21 ","x21 ","x21 ","x21 "};
//            String[] values5 = { ".x11 ","x21 ","x21 ","b02","x21 ","x21 "};
//            List<String> arraylist5 = new ArrayList<>(Arrays.asList(values5));
//
//            String[] values6 = { "x21 ","x21 ","x21 ","x21 ","x21 ","x21 ","x21 "};
//            List<String> arraylist6 = new ArrayList<>(Arrays.asList(values6));
            JSONObject jsonObject = new JSONObject();
@@ -80,6 +87,7 @@
            jsonArray.put(arraylist3);
            jsonArray.put(arraylist4);
            jsonArray.put(arraylist5);
            jsonArray.put(arraylist6);
            jsonObject.put("zuhe1", jsonArray);
springboot-vue3/src/main/java/com/example/springboot/component/PlcLayout.java
New file
@@ -0,0 +1,116 @@
package com.example.springboot.component;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.example.springboot.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import com.example.springboot.entity.Out_slice;
import com.example.springboot.entity.Queue;
import com.example.springboot.entity.StorageCage;
import com.example.springboot.entity.alarmmg;
import com.example.springboot.entity.north_glass_buffer1;
import com.example.springboot.mapper.HomeMapper;
import com.example.springboot.mapper.SpianMapper;
public class PlcLayout extends Thread {
    @Autowired
    private HomeMapper homeMapper;
    @Autowired
    // 出片队列是否允许出片
    public static Boolean isAllowQueue = true;
    public static Boolean isAllowReordering = true;
    // 出片队列警告
    public static Boolean isQueueWarning = false;
    // 铝框id
    public static String FrameNo = "";
    // 是否需要手动确认玻璃
    public static Boolean isConfirm = false;
    // 待确认的出片队列
    public static List<north_glass_buffer1> AluminumFrame;
    // private Configuration config;
    private StorageCageService storageCageService;
    // public Plchome() throws IOException {
    // config = new Configuration("config.properties");
    // }
    // public static Map b=new HashMap<>();
    // b.put()
    @Override
    public void run() {
        while (this != null) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            JSONObject jsonObject = new JSONObject();
            // 注入mapper
            homeMapper = WebSocketServer.applicationContext.getBean(HomeMapper.class);
            if (S7control.getinstance().CheckConnected() == true) {
                // 查询报警信息
            List<alarmmg> alarmmg = homeMapper.SelectAlarmmgInfo();
            jsonObject.append("alarmmg", alarmmg);
                // 复位倒计时
                // 地址104.9.6
                List<Boolean> countdown = S7control.getinstance().ReadBits("DB104.9.6", 1);
                for (Boolean countdowns : countdown) {
                    jsonObject.append("countdown", countdowns);
                }
                // jsonObject.append("countdown", true);
                // 复位完成信号ss
                List<Boolean> resetss = S7control.getinstance().ReadBits("DB103.284", 1);
                for (Boolean reset : resetss) {
                    jsonObject.append("reset", reset);
                }
                // 是否急停
                List<Boolean> emergencystops = S7control.getinstance().ReadBits("DB104.5.1", 1);
                for (Boolean emergencystop : emergencystops) {
                    jsonObject.append("emergencystop", emergencystop);
                }
            }
            // jsonObject.append("params", new short[] { 30, 40, });
            ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("Layout");
            if (sendwServer != null) {
                for (WebSocketServer webserver : sendwServer) {
                    webserver.sendMessage(jsonObject.toString());
                    if (webserver != null) {
                        List<String> messages = webserver.getMessages();
                        if (!messages.isEmpty()) {
                            // // 将最后一个消息转换为整数类型的列表
                            webserver.clearMessages();
                        }
                    }
                }
            }
        }
    }
}
springboot-vue3/src/main/java/com/example/springboot/component/PlcManualonePosition.java
@@ -108,6 +108,20 @@
            List<String> B02start = Arrays.asList(config.getProperty("mlp.B02start"));
            // 故障地址
            List<String> waddresses5 = Arrays.asList(config.getProperty("PlcManualonePosition.fault2").split(","));
            // 复位地址
            List<String> waddresses6 = Arrays.asList(config.getProperty("PlcManualonePosition.Reset").split(","));
            List<Boolean> readreast = S7control.getinstance().readBits(waddresses6);
            short[] reast6 = PLCBooleanConverter.convertListsToBinaryShortArray(readreast);
            // 回零地址
            List<String> waddresses7 = Arrays.asList(config.getProperty("PlcManualonePosition.Zero").split(","));
            List<Boolean> readhuiling = S7control.getinstance().readBits(waddresses7);
            short[] huiling7 = PLCBooleanConverter.convertListsToBinaryShortArray(readhuiling);
            List<Boolean> A01readstart = S7control.getinstance().readBits(A01start);
            List<Boolean> A02readstart = S7control.getinstance().readBits(A02start);
            List<Boolean> B01readstart = S7control.getinstance().readBits(B01start);
@@ -163,6 +177,8 @@
            jsonObject.append("guzhang", params2);
            jsonObject.append("weihuiling", params3);
            jsonObject.append("qidong", combinedBinaryShortArray);
            jsonObject.append("fuwei", reast6);
            jsonObject.append("huiling", huiling7);
//      WebSocketServer sendwServer = WebSocketServer.sessionMap.get("ManualonePosition");
//      if (sendwServer != null) {
@@ -179,16 +195,6 @@
                        List<String> messages = webserver.getMessages();
                        // 故障地址
                        List<String> waddresses5 = Arrays.asList(config.getProperty("PlcManualonePosition.fault2").split(","));
                        // 复位地址
                        List<String> waddresses6 = Arrays.asList(config.getProperty("PlcManualonePosition.Reset").split(","));
                        // 回零地址
                        List<String> waddresses7 = Arrays.asList(config.getProperty("PlcManualonePosition.Zero").split(","));
springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
@@ -28,7 +28,7 @@
    FileInputStream fileInputStream;
    try {
      // 从文件中读取字节数据存入 fileInputStream
      fileInputStream = new FileInputStream("D:/canadames/Alarm.json");
      fileInputStream = new FileInputStream("D:/code/canadames/Alarm.json");
      // 读取 fileInputStream 中字节并将其解码为字符
      InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "utf-8");
      // 提高读取效率,在 BufferedReader 内包装 InputStreamReader
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -121,48 +121,57 @@
            // List<Short> listd17 = S7control.getinstance().ReadWord("DB17.0",10);
            // String id=spianService.queGlassid("DB17.10", 14).toString();
            //
            //
            // // 铝框线交互
            // try {
            //     if (CurrentFrame != null) {
            //         spianService.outmesid(CurrentFrame.getBarCode(), "DB17.0");
            //     }
            //     List<Short> framerequests = S7control.getinstance().ReadWord("铝框id请求字地址", 1);
            //     for (Short framerequest : framerequests) {
            //         if (framerequest == 1) {
            //             // 铝框id
            //             String franmeno = spianService.queGlassid("DB17.10", 14).toString();
            //             String position;
            //             try {
            //                 position = dbserve.SelectPositionByFrameBarcode(franmeno);
            //             } catch (SQLException e) {
            //                 // TODO Auto-generated catch block
            //                 position = "0";
            //                 e.printStackTrace();
            //             }
            //             Short send;
            //             if (position == "0") {
            //                 send = 0;
            //             } else {
            //                 send = 1;
            //             }
            //             S7control.getinstance().WriteWord("铝框翻转发送地址", (short) send);
            //         }
            //     }
            // if (CurrentFrame != null) {
            // spianService.outmesid(CurrentFrame.getBarCode(), "DB17.0");
            // }
            // List<Short> framerequests = S7control.getinstance().ReadWord("铝框id请求字地址", 1);
            // for (Short framerequest : framerequests) {
            // if (framerequest == 1) {
            // // 铝框id
            // String franmeno = spianService.queGlassid("DB17.10", 14).toString();
            // String position;
            // try {
            // position = dbserve.SelectPositionByFrameBarcode(franmeno);
            // } catch (SQLException e) {
            // // TODO Auto-generated catch block
            // position = "0";
            // e.printStackTrace();
            // }
            // Short send;
            // if (position == "0") {
            // send = 0;
            // } else {
            // send = 1;
            // }
            // S7control.getinstance().WriteWord("铝框翻转发送地址", (short) send);
            // }
            // }
            // } catch (Exception e) {
            //     // TODO: handle exception
            // // TODO: handle exception
            // }
            if (S7control.getinstance().CheckConnected() == true) {
            // if (S7control.getinstance().CheckConnected() == true) {
                // 获取当前扫码方式
                List<Short> Scanningmethod = S7control.getinstance().ReadWord("DB103.255", 1);
                jsonObject.append("Scanningmethod", Scanningmethod);
                List<Boolean> Scanningmethods = S7control.getinstance().ReadBits("DB101.11.4", 1);
                if (Scanningmethods != null) {
                    for (Boolean Scanningmethod : Scanningmethods) {
                        jsonObject.append("Scanningmethod", Scanningmethod);
                    }
                }
                String CurrrentGlassId = spianService.queGlassid("DB103.256", 14).toString();
                jsonObject.append("CurrrentGlassId", CurrrentGlassId);
                // 获取D01-D06,A01,A02,B01,B02状态
                List<Short> DeviceList = S7control.getinstance().ReadWord("DB103.0", 10);
                jsonObject.append("DeviceList", DeviceList);
                // 获取D01-D06,A01,A02,B01,B02玻璃id
                List<String> GlassIdList = new ArrayList<String>();
                GlassIdList.add(spianService.queGlassid("DB103.40", 14).toString());
                GlassIdList.add(spianService.queGlassid("DB103.44", 14).toString());
                GlassIdList.add(spianService.queGlassid("DB103.58", 14).toString());
                GlassIdList.add(spianService.queGlassid("DB103.184", 14).toString());
@@ -285,7 +294,7 @@
                // }
                // }
            }
            // }
            storageCageService = WebSocketServer.applicationContext.getBean(StorageCageService.class);
            dbserve = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
@@ -17,30 +17,29 @@
        //
        System.out.println("启动完成");
        new PlcHold().start();
         new PlcHold().start();
        new Plchome().start();
        new PlcLayout().start();
        new Plcalarm().start();
        new Plcsign().start();
        new Plcstate().start();
        new PlcPositioning1().start();
        new PlcParameter2().start();
        new PLCAutomaticParameterSetting().start();
        new PlcManualonePosition().start();
        new PlcManualonePosition2().start();
        new PlcServoManualone().start();
        new PLCManualJog().start();
        new Plclog().start();
    //     new Plchome().start();
    //     new Plcalarm().start();
    //     new Plcsign().start();
    //     new Plcstate().start();
    //     new PlcPositioning1().start();
    //     new PlcParameter2().start();
    //     new PLCAutomaticParameterSetting().start();
    //     new PlcManualonePosition().start();
    //     new PlcManualonePosition2().start();
    //     new PlcServoManualone().start();
    //     new PLCManualJog().start();
    //     //new Plclog().start();
    //     new PlcInteractionState().start();
    //     new PlcParameter1Review().start();
    //    new PLCAutomaticParameterSettingReview().start();
        new PlcInteractionState().start();
        //new PlcParameter1Review().start();
       // new PLCAutomaticParameterSettingReview().start();
    }
}
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -275,16 +275,21 @@
  @PostMapping("/InsertQueueGlassId")
  public Result InsertQueueGlassId(Short id, @RequestBody Queue queue) {
    Map<String, Object> map = new HashMap<>();
    Short zhi=200;
    short result = homeMapper.SelectStorageByGlassId(queue.getglassId());
    if (result > 0) {
      map.put("message", "300");
    } else {
      homeMapper.InsertQueueGlassId(queue, id);
      if (id == 1) {
        // 调用伍存储过程
        spianService.selectAll(queue.getglassId());
        zhi=spianService.selectAll(queue.getglassId());
        if(zhi==200){
          homeMapper.InsertQueueGlassId(queue, id);
        }
      }
      map.put("message", "200");
      map.put("message",zhi);
    }
    return Result.success(map);
  }
@@ -402,7 +407,7 @@
  @PostMapping("/WriteGlassID")
  public Result WriteGlassID(String glassid) {
    // 扫码位写入玻璃id
    spianService.outmesid(glassid, "DB103.256");
    spianService.outmesid(glassid, "DB103.286");
    Map<String, Object> map = new HashMap<>();
    map.put("message", "200");
    return Result.success(map);
@@ -454,8 +459,8 @@
  // 切换PLC获取二维码方式
  @PostMapping("/SwitchScanMethod")
  public Result SwitchScanMethod(Short scansmethod) {
    S7control.getinstance().WriteWord("DB103.255", scansmethod);
  public Result SwitchScanMethod(Boolean scansmethod) {
    S7control.getinstance().WriteBit("DB101.11.4", scansmethod);
    Map<String, Object> map = new HashMap<>();
    map.put("message", "200");
    return Result.success(map);
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
@@ -58,7 +58,7 @@
  short SelectInTask();
  // 手动完成任务
  @Update("update storage_task set task_state=2 where task_type=#{task_type} and glass_id=#{glassid}")
  @Update("update storage_task set task_state=1 where task_type=#{task_type} and glass_id=#{glassid}")
  void UpdateTask(@Param("task_type") Integer task_type,String glassid);
  // 手动完成进片任务修改笼子数据
@@ -204,7 +204,7 @@
  void UpdateOutSliceGlass(String glassid);
  //查询未完成的任务
  @Select("select * from storage_task where task_state!=2 and task_type=#{task_type}")
  @Select("select * from storage_task where task_state=0 and task_type=#{task_type}")
  List<StorageTask> SelectTaskByState(int task_type);
  //修改出片队列铝框状态
springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
@@ -78,7 +78,7 @@
    @Update("update storage_cage set state=#{state},glass_id=#{glassid},order_id=#{orderid},glasswidth=#{width} where id=#{id};")
    void UpdataAddCage(String orderid, String glassid, double width, int cage, int cell, int id, int state);
    @Update("update storage_cage set state=#{state},glass_id=#{glassid},order_id=#{glass.ordernumber},glasswidth=#{glass.glasslengthmm},glassheight=#{glass.glassheightmm},glasswidthmm=#{glass.glasslength},glassheightmm=#{glass.glassheight},listid=#{glass.listnumber},boxid=#{glass.boxnumber},FrameBarcode=#{glass.FrameBarcode} where id=#{id};")
    @Update("update storage_cage set state=#{state},glass_id=#{glassid},order_id=#{glass.ordernumber},glasswidth=#{glass.glasslengthmm},glassheight=#{glass.glassheightmm},glasswidthmm=#{glass.glasslength},glassheightmm=#{glass.glassheight},listid=#{glass.listnumber},boxid=#{glass.boxnumber},FrameBarcode=#{glass.frameBarcode} where id=#{id};")
    void UpdataAddCage2(String orderid, String glassid, north_glass_buffer1 glass, int cage, int cell, int id,int state);
    // 修改笼子信息(多片进片)
@@ -232,4 +232,7 @@
    //判断玻璃是否禁用
    @Select(" select disabled from storage_cage where glass_id=#{glassid} limit 1;")
    int SelectCageGlassState(String glassid);
    //判断汇报的id是否正确
    @Select("SELECT count(*) FROM `storage_cage` where state!=0 and state!=1 and glass_id=#{glassid}")
    int SelectHB(String glassid);
}
springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
@@ -1,5 +1,11 @@
package com.example.springboot.service;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
@@ -11,6 +17,9 @@
import com.example.springboot.mapper.SpianMapper;
import com.google.common.primitives.Bytes;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
@Service
public class SpianService {
    @Autowired
@@ -19,7 +28,7 @@
    // @GetMapping("/all")
    public Short selectAll(String glassid) {
        int cage1=0;
        int cage1 = 0;
        int cells;
        int ids;
        int prcid;
@@ -29,11 +38,11 @@
        double minwidth = 0;
        north_glass_buffer1 glasslist = spianMapper.selectGlass(glassid); // 获取玻璃参数
        //如果没有此id时
        // 如果没有此id时
        if (glasslist == null) {
            return (300);
        }
        double widths = glasslist.getglasslengthmm();
        String orderids = glasslist.getordernumber();
        String FrameBarcode = glasslist.getFrameBarcode();
@@ -49,10 +58,9 @@
        // String orderid="A001";
        // 获取订单相关度最高的笼子排序
        List<StorageCage> storageCage = spianMapper.selectAllFbarcode(FrameBarcode,widths,400);
        //判断铝框指定空格是否需要间隔空间
        List<StorageCage> storageCage = spianMapper.selectAllFbarcode(FrameBarcode, widths, 400);
        // 判断铝框指定空格是否需要间隔空间
        if (storageCage.size() == 0) {
            storageCage = spianMapper.selectAll(orderids, FrameBarcode);
        }
@@ -105,6 +113,8 @@
                    spianMapper.UpdataAddCage1(widths, cage1, cells);// 减少格子宽度
                    spianMapper.Inserttask(0, 0, 1000, ids, glassid.toString(), prctier);// 新增任务
                    S7control.getinstance().WriteWord(adddresslist, datas);
                    S7control.getinstance().WriteWord("DB105.18", (short) 1);// 进片任务发送字改为1
                    System.out.println("进片任务|" + datas);
                } else {
@@ -114,6 +124,7 @@
                    spianMapper.UpdataAddCage1(widths, cage1, cells);// 减少格子宽度
                    spianMapper.Inserttask(0, 0, 1000, ids, glassid.toString(), prctier);// 新增任务
                    S7control.getinstance().WriteWord(adddresslist, datas);
                    S7control.getinstance().WriteWord("DB105.18", (short) 1);// 进片任务发送字改为1
                    System.out.println("进片任务|" + datas);
                    // S7control.getinstance().WriteByte("DB105.16",glassid);
@@ -169,12 +180,13 @@
            spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid, state);// 新增任务
            // int state = spianMapper.selectGlassState(cage, cell);//获取格子数量
            if (state == 2) {
                spianMapper.UpdateDBCage1(cage, cell);// 将内片数据更新到外片里
                spianMapper.UpdateDBCage2(cage, cell);// 清除内片数据
            }
            // if (state == 2) {
            // spianMapper.UpdateDBCage1(cage, cell);// 将内片数据更新到外片里
            // spianMapper.UpdateDBCage2(cage, cell);// 清除内片数据
            // }
            System.out.println("出片任务|" + datas);
            S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务
            S7control.getinstance().WriteWord("DB105.18", (short) 1);// 出片任务发送字改为1
            outmesid(glassid, "DB105.34");// 派发出片ID
            return (200);// 结束
@@ -196,6 +208,7 @@
                System.out.println("出片任务|" + datas);
                outmesid(glassid, "DB105.34");// 派发出片ID
                S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务
                S7control.getinstance().WriteWord("DB105.18", (short) 1);// 出片任务发送字改为1
                return (200);// 结束
@@ -227,7 +240,7 @@
                    // 传输mes数据,坐标,数据
                    System.out.println("出片任务|" + datas);
                    S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务
                    S7control.getinstance().WriteWord("DB105.18", (short) 1);// 出片任务发送字改为1
                    outmesid(glassids, "DB105.34");// 派发调拨玻璃ID
                    return (200); // 结束
@@ -256,7 +269,7 @@
                    // 传输mes数据,坐标,数据
                    System.out.println("出片任务|" + datas);
                    S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务
                    S7control.getinstance().WriteWord("DB105.18", (short) 1);// 出片任务发送字改为1
                    outmesid(glassids, "DB105.34");// 派发调拨玻璃ID
                    return (200);// 结束
@@ -277,6 +290,7 @@
        byte[] bytes = Bytes.toArray(glassidlist);
        System.out.println("outmesidbytes:" + bytes.length);
        S7control.getinstance().WriteByte(address, bytes);// 派发出片id
    }
    // 获取地址内的玻璃id转字符串
@@ -329,4 +343,6 @@
        // }
    }
}
springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java
@@ -30,54 +30,57 @@
        String A01glassid2 = spianService.queGlassid("DB103.142", 14).toString();
        String A02glassid1 = spianService.queGlassid("DB103.156", 14).toString();
        String B01glassid = spianService.queGlassid("DB103.184", 14).toString();
        String B02glassid = spianService.queGlassid("DB103.198", 14).toString();
        String B02glassid = spianService.queGlassid("DB103.212", 14).toString();
        List<Short> DeviceList = S7control.getinstance().ReadWord("DB103.0", 10);
        if (types == 0) {// 终止进片任务
            List<StorageTask> cageList = homeMapper.SelectTaskByState(types);
            for (StorageTask storageTask : cageList) {
                // 判断出片任务位置并清除对应玻璃id
                if ((storageTask.getGlassId() == A01glassid1 || storageTask.getGlassId() == A01glassid2)&&DeviceList.get(4)==0) {
                if ((storageTask.getGlassId().equals(A01glassid1)|| storageTask.getGlassId().equals(A01glassid2))&&DeviceList.get(4)==0) {
                    outSliceServive.StopTask(storageTask.getGlassId(), types);
                    ClearGlassId("DB101.10.0");
                } else if (storageTask.getGlassId() == B01glassid&&DeviceList.get(2)==0) {
                }
                if (storageTask.getGlassId().equals(B01glassid)&&DeviceList.get(2)==0) {
                    outSliceServive.StopTask(storageTask.getGlassId(), types);
                    ClearGlassId("DB101.10.2");
                } else if (storageTask.getGlassId() == B02glassid&&DeviceList.get(3)==0) {
                }
                if (storageTask.getGlassId().equals(B02glassid)&&DeviceList.get(3)==0) {
                    ClearGlassId("DB101.10.3");
                    outSliceServive.StopTask(storageTask.getGlassId(), types);
                }\
                }
            }
            // 发送终止进片任务信号
        } else {// 终止出片任务
            List<StorageTask> cageLists = homeMapper.SelectTaskByState(types);
            List<StorageTask> cageList2 = homeMapper.SelectTaskByState(2);
            if (cageList2!=null) {
            if (cageList2.size()>0) {
                cageLists.add(cageList2.get(0));
            }
            for (StorageTask cageList : cageLists) {
                if (cageList.getTaskType().equals("1")) {
                    if(cageList.getGlassId() ==A02glassid1&&DeviceList.get(5)==0){
                    System.out.println(DeviceList.get(5));
                    if(cageList.getGlassId().equals(A02glassid1)&&DeviceList.get(5)==0){
                        outSliceServive.StopTask(cageList.getGlassId(), types);
                        ClearGlassId("DB101.10.1");
                    }
                    else if(cageList.getGlassId() ==B01glassid&&DeviceList.get(2)==0){
                    if(cageList.getGlassId().equals(B01glassid)&&DeviceList.get(2)==0){
                        outSliceServive.StopTask(cageList.getGlassId(), types);
                        ClearGlassId("DB101.10.2");
                    }
                    else if(cageList.getGlassId() ==B02glassid&&DeviceList.get(3)==0){
                    if(cageList.getGlassId().equals(B02glassid)&&DeviceList.get(3)==0){
                        outSliceServive.StopTask(cageList.getGlassId(), types);
                        ClearGlassId("DB101.10.3");
                    }
                }else if (cageList.getTaskType().equals("2")) {
                    if(cageList.getGlassId() ==A02glassid1&&DeviceList.get(5)==0){
                    if(cageList.getGlassId().equals(A02glassid1)&&DeviceList.get(5)==0){
                        outSliceServive.StopTask(cageList.getGlassId(), 2);
                        ClearGlassId("DB101.10.1");
                    }
                    else if(cageList.getGlassId() ==B01glassid&&DeviceList.get(2)==0){
                    if(cageList.getGlassId().equals(B01glassid)&&DeviceList.get(2)==0){
                        outSliceServive.StopTask(cageList.getGlassId(), 2);
                        ClearGlassId("DB101.10.2");
                    }
                    else if(cageList.getGlassId() ==B02glassid&&DeviceList.get(3)==0){
                    if(cageList.getGlassId().equals(B02glassid)&&DeviceList.get(3)==0){
                        outSliceServive.StopTask(cageList.getGlassId(), 2);
                        ClearGlassId("DB101.10.3");
                    }
springboot-vue3/src/main/resources/config.properties
@@ -218,10 +218,10 @@
PlcInteractionState.PLCProductiontask=DB106.20,DB106.16,DB106.18,DB103.156-169
#任务信息
PlcInteractionState.MEStaskinformation=DB105.48,DB105.50,DB105.48,DB105.50,DB106.42,DB106.48,DB106.50,DB106.58,DB103.128-141,DB103.142-155,DB103.156-169,DB103.184-197,DB103.212-225
PlcInteractionState.MEStaskinformation=DB105.48,DB105.50,DB105.48,DB105.50,DB106.42,DB106.48
#任务信息2
PlcInteractionState.MEStaskinformation2=DB106.52,DB106.58,DB103.128-141,DB103.142-155,DB103.156-169,DB103.184-197,DB103.212-225