严智鑫
2024-03-12 8603212f565621710b9782d2d798e66334e7733b
Merge branch 'master' of http://10.153.19.25:10101/r/Albania_Mes

# Conflicts:
# springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
# springboot-vue3/src/main/java/com/example/springboot/entity/GlassInfo.java
15个文件已修改
4个文件已添加
1个文件已删除
1820 ■■■■ 已修改文件
Albania_Mes-ui/src/lang/locales/en-US.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Albania_Mes-ui/src/lang/locales/zh-CN.json 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Albania_Mes-ui/src/views/home/index.vue 170 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/PLCAutoMes.java 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java 196 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java 202 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/FlowCard.java 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/GlassInfo.java 74 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java 256 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/alarmmg.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcParameterInfo.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/flowcard.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/glassinfo.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/mapper/AlbaniaMapper.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/service/SpianServiceNew.java 290 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/resources/JsonFile/PlcAlbania.json 424 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Albania_Mes-ui/src/lang/locales/en-US.json
@@ -1,4 +1,10 @@
{
  "Import order":"Importorder",
  "Measure":"Measure",
  "StorageCage":"StorageCage",
  "Task queue":"Task queue",
  "Height":"Height",
  "Thickness":"Thickness",
  "Clear":"Clear",
  "ip":"localhost",
  "systemTitle": "Login System",
Albania_Mes-ui/src/lang/locales/zh-CN.json
@@ -1,8 +1,12 @@
{
  "Importorder":"导入订单",
  "Import order":"导入订单",
  "Measure":"测量",
  "StorageCage":"理片笼",
  "Taskqueue":"任务队列",
  "Task queue":"任务队列",
  "Height":"高",
  "Thickness":"厚度",
  "Clear":"清除",
  "ip":"localhost",
  "systemTitle": "登录系统",
Albania_Mes-ui/src/views/home/index.vue
@@ -319,150 +319,52 @@
                </div>
            </div>
        </el-main>
        <el-dialog :visible.sync="Importorder" :title="$t('Importorder')"
        <el-dialog :visible.sync="Importorder" :title="$t('Import order')"
            top="5vh">
        </el-dialog>
        <el-dialog :visible.sync="Measure" :title="$t('Measure')"
            top="5vh">
        </el-dialog>
        <el-dialog :visible.sync="StorageCage" :title="$t('StorageCage')"
            top="5vh">
            <el-table :data="this.StorageCageInfo" :height="700" border style="width: 100%;overflow: auto;">
                <el-table-column :min-width="50" prop="cage" :label="$t('Cage No')"></el-table-column>
                <el-table-column :min-width="50" prop="cell" :label="$t('Slot No')"></el-table-column>
                <el-table-column :min-width="145" prop="glassId" :label="$t('Barcode')"></el-table-column>
                <el-table-column :min-width="80" prop="width" :label="$t('Width')"></el-table-column>
                <el-table-column :min-width="80" prop="height" :label="$t('Height')"></el-table-column>
                <el-table-column :min-width="80" prop="thickness" :label="$t('Thickness')"></el-table-column>
                <el-table-column :min-width="250" :label="$t('Operate')">
                    <template slot-scope='scope'>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            :disabled="scope.row.state == 1 ? false : true"
                            @click="deleteglass(scope.row.glassId, scope.row.state)">{{ $t('Delete') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            @click="UpdateDisabled(scope.row.cage, scope.row.cell, scope.row.disabled == 0 ? 1 : 0)">
                            {{ scope.row.disabled == 0 ? $t('Disable') : $t('Enable') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            :disabled="scope.row.glassId != null ? true : false"
                            @click="insertglass(scope.row.cage, scope.row.cell, scope.row.tier)">{{ $t('Add')
                            }}</el-button>
                    </template>
                </el-table-column>
            </el-table>
        </el-dialog>
        <el-dialog :visible.sync="Taskqueue" :title="$t('Taskqueue')"
        <el-dialog :visible.sync="Taskqueue" :title="$t('Task queue')"
            top="5vh">
        </el-dialog>
        <!-- <el-footer>
            <div class="blocks" style="position: relative;">
                <div style="display:flex;position: absolute;float:left;z-index: 999;top:102px;left:237px;">
                    <div :class="getStatusClass(item.state)" v-for="(item, index) in cagelist1" :key="item['date']"
                        :style="{ height: 35 * item['glassWidth'] + 'px', left: 3.07 * index + Math.abs(item['cage'] - 10) * 6.8 + 'px' }"
                        @click="showcageinfo(item['cage'])"></div>
                </div>
                <div style="display:flex;position: absolute;float:left;z-index: 999;top:102px;left:640px;">
                    <div :class="getStatusClass(item.state)" v-for="(item, index) in cagelist2" :key="item['date']"
                        :style="{ height: 35 * item['glassWidth'] + 'px', left: 3.07 * index + Math.abs(item['cage'] - 5) * 6.8 + 'px' }"
                        @click="showcageinfo(item['cage'])"></div>
                </div>
                <div style="display:flex;position: absolute;float:left;z-index: 999;top:139px;left:237px;">
                    <div :class="getStatusClass(item.state)" v-for="(item, index) in cagelist3" :key="item['date']"
                        :style="{ height: 35 * item['glassWidth'] + 'px', top: item['width'] * 35 - 35 + 'px', left: 3.07 * index + Math.abs(item['cage'] - 10) * 6.8 + 'px' }"
                        @click="showcageinfo(item['cage'])">
                    </div>
                </div>
                <div style="display:flex;position: absolute;float:left;z-index: 999;top:139px;left:640px;">
                    <div :class="getStatusClass(item.state)" v-for="(item, index) in cagelist4" :key="item['date']"
                        :style="{ height: 35 * item['glassWidth'] + 'px', top: item['width'] * 35 - 35 + 'px', left: 3.07 * index + Math.abs(item['cage'] - 5) * 6.8 + 'px' }"
                        @click="showcageinfo(item['cage'])"></div>
                </div>
                <div class="blue gezi"
                    :style="{ display: 'flex', position: 'absolute', float: 'left', top: 28 + 'px', left: 1050 + 'px', height: loadglassheight1 + 'px', width: 4 + 'px' }">
                </div>
                <div class="blue gezi"
                    :style="{ display: 'flex', position: 'absolute', float: 'left', top: 105 + 'px', left: 1050 + 'px', height: loadglassheight2 + 'px', width: 4 + 'px' }">
                </div>
                <div class="blocks-img2"></div>
                <div class="blocks-img3"></div>
                <div class="device" :style="'top: 25px;left: 1027px;background-color: ' + ShowDeviceList(0) + ';'">D01</div>
                <div class="device" :style="'top: 105px;left: 1027px;background-color: ' + ShowDeviceList(1) + ';'">D02
                </div>
                <div class="device" :style="'top: 102px;left: 605px;background-color: ' + ShowDeviceList(2) + ';'">B01</div>
                <div class="device" :style="'top: 102px;left: 197px;background-color: ' + ShowDeviceList(3) + ';'">B02</div>
                <div class="blocks-img" :style="'left:' + car2 + 'px;top:175px;background-color:' + ShowDeviceList(4) + ''">
                    A01</div>
                <div class="blocks-img" :style="'left:' + car1 + 'px;top:16px;background-color:' + ShowDeviceList(5) + ''">
                    A02</div>
                <div class="device" :style="'top: 108px;left: 150px;background-color: ' + ShowDeviceList(6) + ';'">D03</div>
                <div class="device" :style="'top: 185px;left: 150px;background-color: ' + ShowDeviceList(7) + ';'">D04</div>
                <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="device" :style="'top: 395px;left: 90px;background-color: ;'">E01</div>
                <div class="device" :style="'top: 395px;left: 243px;background-color: ;'">E02</div>
                <div class="device" :style="'top: 395px;left: 395px;background-color: ;'">E03</div>
                <div class="device" :style="'top: 345px;left: 655px;background-color: ;'">E04</div>
                <div class="device" :style="'top: 345px;left: 810px;background-color: ;'">E05</div>
                <div class="device" :style="'top: 345px;left: 960px;background-color: ;'">E06</div>
                <div class="device" :style="'top: 345px;left: 525px;background-color: ;'">J01</div>
                <div class="device" :style="'top: 345px;left: 1100px;background-color: ;'">F01</div>
                <div class="device" :style="'top: 275px;left: 1100px;background-color: ;'">G01</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: 315px;left: 289px;position: absolute;">A01.2:{{ ShowGlassIdList(5) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.0', 5)">
                        {{ $t('Clear') }}</el-button>
                </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.1', 6)">
                        {{ $t('Clear') }}</el-button>
                </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>
        </el-footer> -->
    </el-container>
</template>
<script>
import {
    home, home2,  UpdateTask, SelectCageInfo, DeleteByGlassID, 
    SelectPassword,  Disabled,  AddOutSliceS,  SelectPermissionByUserName, currentUsername, CompleteQueue,
    isAllowReorderings,  WriteGlassID, ClearGlassId, CloseForm7,  SoftEmergencyStop, SwitchScanMethod
    SelectPassword,  Disabled,  SelectPermissionByUserName, currentUsername, CompleteQueue,
    isAllowReorderings
} from "../../api/home";
@@ -486,12 +388,8 @@
            Measure:false,
            StorageCage:false,
            Taskqueue:false,
            form: {
                orderId: "",
                glassId: "",
                height: "",
                width: ""
            },
            StorageCageInfo:[],
            TaskqueueInfo:[],
            form1: {},
            form2: {},
            form3: {},
@@ -640,6 +538,10 @@
                            this.cageinfo = res.data.cageinfo;
                        });
                    }
                    if(obj.StorageCageInfo!=null){
                        this.StorageCageInfo=obj.StorageCageInfo[0];
                        console.log(this.StorageCageInfo);
                    }
                    this.$forceUpdate();
                }.bind(this);
springboot-vue3/src/main/java/com/example/springboot/component/PLCAutoMes.java
@@ -24,29 +24,30 @@
    // 单例实例
    private static PLCAutoMes instance;
    private static String PlcMes = PLCAutoMes.class.getResource("/JsonFile/PlcMes.json").getPath();
    private static String PlcRead = PLCAutoMes.class.getResource("/JsonFile/PlcRead.json").getPath();
    private static String Plcframe = PLCAutoMes.class.getResource("/JsonFile/Plcframe.json").getPath();
    private static String PlcParameter = PLCAutomaticParameterSettingReview2.class
            .getResource("/JsonFile/PlcParameter.json").getPath();
    private static String PlcSign = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcSign.json")
            .getPath();
    private static String PlcState = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcState.json")
            .getPath();
    private static String PlcAlarm = PLCAutoMes.class.getResource("/JsonFile/PlcAlarm.json").getPath();
    private static String PlcTest = PLCAutoMes.class.getResource("/JsonFile/PlcTest.json").getPath();
    // private static String PlcMes = PLCAutoMes.class.getResource("/JsonFile/PlcMes.json").getPath();
    private static String PlcAlbania = PLCAutoMes.class.getResource("/JsonFile/PlcAlbania.json").getPath();
    // private static String PlcRead = PLCAutoMes.class.getResource("/JsonFile/PlcRead.json").getPath();
    // private static String Plcframe = PLCAutoMes.class.getResource("/JsonFile/Plcframe.json").getPath();
    // private static String PlcParameter = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcParameter.json").getPath();
    // private static String PlcSign = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcSign.json").getPath();
    // private static String PlcState = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcState.json").getPath();
    // private static String PlcAlarm = PLCAutoMes.class.getResource("/JsonFile/PlcAlarm.json").getPath();
    // private static String PlcTest = PLCAutoMes.class.getResource("/JsonFile/PlcTest.json").getPath();
    // 调用initword方法
    public static PlcParameterObject plcParameterObject = initUtil.initword(PlcParameter);
    public static PlcBitObject plcPlcTest = initUtil.initbit(PlcTest);
    public static PlcBitObject  plcBitObject = initUtil.initbit(PlcSign);
    public static PlcParameterObject  plcStateObject= initUtil.initword(PlcState);
    public static PlcBitObject plcPlcAlarm = initUtil.initbit(PlcAlarm);
    public static PlcParameterObject PlcMesObject = initUtil.initword(PlcMes);
    public static PlcParameterObject PlcReadObject = initUtil.initword(PlcRead);
    public static PlcParameterObject PlcframeObject = initUtil.initword(Plcframe);
    // public static PlcParameterObject plcParameterObject = initUtil.initword(PlcParameter);
    // public static PlcBitObject plcPlcTest = initUtil.initbit(PlcTest);
    // public static PlcBitObject  plcBitObject = initUtil.initbit(PlcSign);
    // public static PlcParameterObject  plcStateObject= initUtil.initword(PlcState);
    // public static PlcBitObject plcPlcAlarm = initUtil.initbit(PlcAlarm);
    public static PlcParameterObject PlcMesObject = initUtil.initword(PlcAlbania);
    // public static PlcParameterObject PlcReadObject = initUtil.initword(PlcRead);
    // public static PlcParameterObject PlcframeObject = initUtil.initword(Plcframe);
    // 私有构造函数
    public PLCAutoMes() throws IOException {
        config = new Configuration("config.properties");
@@ -73,9 +74,9 @@
            // System.out.println(jsonFilePath);
            readAndUpdateWordValues(PlcReadObject);
            //readAndUpdateWordValues(PlcReadObject);
            readAndUpdateWordValues(PlcMesObject);
            readAndUpdateWordValues(PlcframeObject);
            //readAndUpdateWordValues(PlcframeObject);
            // readAndUpdateWordValues(PlcframeObject);
            // readAndUpdateWordValues(plcStateObject);
@@ -92,7 +93,7 @@
            addresses2.add("FeedID");
            addresses2.add("FeedCarStatus");
            System.out.println(PlcReadObject.getPlcParameterValues(addresses2));
            //System.out.println(PlcReadObject.getPlcParameterValues(addresses2));
        }
    }
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
File was deleted
springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java
@@ -5,10 +5,11 @@
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import com.example.springboot.service.JdbcConnections;
import com.example.springboot.service.SpianService;
import com.example.springboot.service.SpianServiceNew;
import com.example.springboot.entity.north_glass_buffer1;
import com.example.springboot.entity.device.PlcParameterObject;
import com.example.springboot.mapper.AlarmMapper;
import com.example.springboot.mapper.AlbaniaMapper;
import com.example.springboot.mapper.SpianMapper;
public class PlcHoldNew extends Thread {
@@ -17,8 +18,8 @@
  @Autowired
  private JdbcConnections jdbcConnections;
  private SpianMapper spianMapper;
  private SpianService spianService;
  private AlbaniaMapper albaniaMapper;
  private SpianServiceNew spianService;
  int aaa;
  @Override
@@ -34,137 +35,116 @@
      }
      // if (S7control.getinstance().CheckConnected() == false) {
      spianService = WebSocketServer.applicationContext.getBean(SpianService.class);
      spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
      jdbcConnections = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
      spianService = WebSocketServer.applicationContext.getBean(SpianServiceNew.class);
      albaniaMapper = WebSocketServer.applicationContext.getBean(AlbaniaMapper.class);
      //读取DB105区文件
      PlcParameterObject plcmes=PLCAutoMes.PlcMesObject;
      //读106
      PlcParameterObject plcread=PLCAutoMes.PlcReadObject;
      //PlcParameterObject plcread=PLCAutoMes.PlcReadObject;
      //读103
      PlcParameterObject plcstate=PLCAutoMes.plcStateObject;
      String OutRequest=plcread.getPlcParameter("OutRequest").getValue();//出片请求
      String OutActivate=plcmes.getPlcParameter("OutActivate").getValue();//出片启动
      
      S7control.getinstance().WriteWord( plcmes.getPlcParameter("1231").getAddress(plcmes.getPlcParameter("1231").getAddressIndex()), (short) 0);
      // 出片任务
      String OutRequest=plcmes.getPlcParameter("OutRequest").getValue();//出片请求一线
      String OutActivate=plcmes.getPlcParameter("OutActivate").getValue();//出片请求二线
      String AddRequest=plcmes.getPlcParameter("AddRequest").getValue();//进片请求
      String CarRequest=plcmes.getPlcParameter("CatReque").getValue();//运送车请求
      String Tastoverid=plcmes.getPlcParameter("Tastoverid").getValue();//任务完成
      String glassid=plcmes.getPlcParameter("glassid").getValue();//玻璃id
      
      if (OutActivate.equals("1") == false&&OutRequest.equals("1")==true) {
        S7control.getinstance().WriteWord("DB105.18", (short) 0);// 出片任务启动改为0
      //调用出片任务
      if (OutActivate.equals("1") == false&&CarRequest.equals("0")==true) {
        //将运输车状态改为忙碌
        S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(plcmes.getPlcParameter("B01report").getAddressIndex()), (short) 1);
        spianService.selectout(glassid);
      }
      String FeedRequest=plcread.getPlcParameter("FeedRequest").getValue();// 进片请求字
      String AddActivate=plcmes.getPlcParameter("AddActivate").getValue();// 进片启动
      if (FeedRequest.equals("1") == false&&AddActivate.equals("1")==true) {
        S7control.getinstance().WriteWord("DB105.16", (short) 0);//进片任务启动改为0
      }
      if (OutActivate.equals("1") == true) {
        // 判断当前是否有未执行的任务
        int outnum = spianMapper.SelectOutSliceshu();//是否有正在出片的任务
        int cageoutsum = spianMapper.Selectcageout(3);//笼子内是否还有在出片的玻璃
        // 当没有任务执行并且出片车空闲时
        if (outnum == 0 &&  Plchome.isAllowQueue == true && cageoutsum == 0) {
          // 判断铝框出片队列表是否有待出片的玻璃
          String outglassid = spianMapper.SelectOutSlice();
          // 当有待出片的玻璃时
          if (outglassid != null) {
            // 获取该玻璃是否被禁用
            int glassdisabled = spianMapper.SelectCageGlassState(outglassid);
            // 未禁用下发任务
            if (glassdisabled == 0) {
              spianService.selectout2(outglassid);
              Plchome.isQueueWarning = false;
            } else { // 禁用更改状态弹出提示
              Plchome.isQueueWarning = true;
            }
          }
        }
      //调用进片任务
      if(AddRequest.equals("1")==true&&CarRequest.equals("0")==true){
        //将运输车状态改为忙碌
        S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(plcmes.getPlcParameter("B01report").getAddressIndex()), (short) 1);
        spianService.selectAll(albaniaMapper.SelectGlass());
      }
      ///////////// 进片任务      
      String B01backs = plcread.getPlcParameter("B01CompleteTheReport").getValue();// b01汇报
      String B02backs = plcread.getPlcParameter("B02CompleteTheReport").getValue();// b02汇报
      // String B01backs = plcread.getPlcParameter("B01CompleteTheReport").getValue();// b01汇报
      // String B02backs = plcread.getPlcParameter("B02CompleteTheReport").getValue();// b02汇报
      
      String B01glassid = plcstate.getPlcParameter("B01ID1").getValue();// BO1的玻璃id
      String B02glassid = plcstate.getPlcParameter("B02ID1").getValue();// B02的玻璃id
      // String B01glassid = plcstate.getPlcParameter("B01ID1").getValue();// BO1的玻璃id
      // String B02glassid = plcstate.getPlcParameter("B02ID1").getValue();// B02的玻璃id
      // 当进片小车完成任务时
      if (B01backs.equals("1") == true) {
        // 判断是否汇报正确的id
        int HB = spianMapper.SelectHB(B01glassid.toString());
        if (HB > 0) {
          // 恢复B01小车应答改为1
          S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(plcmes.getPlcParameter("B01report").getAddressIndex()), (short) 1);
          String yingda =plcmes.getPlcParameter("B01report").getValue();// b01汇报
          if (yingda.equals("1")) {
            spianService.overtask(B01glassid.toString());// 完成任务
          }
        }
      // // 当进片小车完成任务时
      // if (B01backs.equals("1") == true) {
      //   // 判断是否汇报正确的id
      //   int HB = spianMapper.SelectHB(B01glassid.toString());
      //   if (HB > 0) {
      //     // 恢复B01小车应答改为1
      //     S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(plcmes.getPlcParameter("B01report").getAddressIndex()), (short) 1);
      //     String yingda =plcmes.getPlcParameter("B01report").getValue();// b01汇报
      //     if (yingda.equals("1")) {
      //       spianService.overtask(B01glassid.toString());// 完成任务
      //     }
      //   }
      }else{
        // 恢复B01小车应答改为0
        S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(plcmes.getPlcParameter("B01report").getAddressIndex()), (short) 0);
      }
      // }else{
      //   // 恢复B01小车应答改为0
      //   S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(plcmes.getPlcParameter("B01report").getAddressIndex()), (short) 0);
      // }
      // 当出片小车完成任务时
      if (B02backs.equals("1") == true) {
        // 判断是否汇报正确的id
        int HB = spianMapper.SelectHB(B02glassid);
        if (HB > 0) {
          // 恢复B02小车应答改为1
          S7control.getinstance().WriteWord(plcmes.getPlcParameter("B02report").getAddress(plcmes.getPlcParameter("B02report").getAddressIndex()), (short) 1);
          String yingda =plcmes.getPlcParameter("B01report").getValue();// b02应答
          if (yingda.equals("1") == true) {
            spianService.overtask(B02glassid);// 完成任务
          }
        }
      }else{
        S7control.getinstance().WriteWord(plcmes.getPlcParameter("B02report").getAddress(plcmes.getPlcParameter("B02report").getAddressIndex()), (short) 0);
      }
      // // 当出片小车完成任务时
      // if (B02backs.equals("1") == true) {
      //   // 判断是否汇报正确的id
      //   int HB = spianMapper.SelectHB(B02glassid);
      //   if (HB > 0) {
      //     // 恢复B02小车应答改为1
      //     S7control.getinstance().WriteWord(plcmes.getPlcParameter("B02report").getAddress(plcmes.getPlcParameter("B02report").getAddressIndex()), (short) 1);
      //     String yingda =plcmes.getPlcParameter("B01report").getValue();// b02应答
      //     if (yingda.equals("1") == true) {
      //       spianService.overtask(B02glassid);// 完成任务
      //     }
      //   }
      // }else{
      //   S7control.getinstance().WriteWord(plcmes.getPlcParameter("B02report").getAddress(plcmes.getPlcParameter("B02report").getAddressIndex()), (short) 0);
      // }
      // 获取DO1数据
      String Do1ID=plcread.getPlcParameter("FeedID").getValue();// 获取请求的id跟DO1同时清
      // 获取DO2数据
      String Do2ID=plcread.getPlcParameter("FeedID").getValue();// 获取请求的id跟DO1同时清
      // // 获取DO1数据
      // String Do1ID=plcread.getPlcParameter("FeedID").getValue();// 获取请求的id跟DO1同时清
      // // 获取DO2数据
      // String Do2ID=plcread.getPlcParameter("FeedID").getValue();// 获取请求的id跟DO1同时清
      int questate = spianMapper.Selectquecount(Do1ID.toString());// 判断扫码位是否有玻璃已确认
      // queueid1.toString().isEmpty()
      north_glass_buffer1 glass1 = spianMapper.selectGlass(Do1ID);// D01的玻璃信息
      north_glass_buffer1 glass2 = spianMapper.selectGlass(Do2ID);// D02玻璃信息
      // 当扫码位玻璃id为空时 宽度为0
      if (Do1ID != null && questate == 0) {
        // 写入D01的数据到上片队列表
        if (glass1 == null) { // 当没有值时传空
          spianMapper.Updatequeue(null, null, null, null, 0, null, null, null, null, 1);
        } else {
          spianMapper.Updatequeue(Do1ID.toString(), glass1.getordernumber(), glass1.getlistnumber(),
          glass1.getboxnumber(), 0, glass1.getglasslengthmm().toString(), glass1.getglassheightmm().toString(),
          glass1.getglasslength().toString(), glass1.getglassheight().toString(), 1);
        }
      // int questate = spianMapper.Selectquecount(Do1ID.toString());// 判断扫码位是否有玻璃已确认
      // // queueid1.toString().isEmpty()
      // north_glass_buffer1 glass1 = spianMapper.selectGlass(Do1ID);// D01的玻璃信息
      // north_glass_buffer1 glass2 = spianMapper.selectGlass(Do2ID);// D02玻璃信息
      // // 当扫码位玻璃id为空时 宽度为0
      // if (Do1ID != null && questate == 0) {
      //   // 写入D01的数据到上片队列表
      //   if (glass1 == null) { // 当没有值时传空
      //     spianMapper.Updatequeue(null, null, null, null, 0, null, null, null, null, 1);
      //   } else {
      //     spianMapper.Updatequeue(Do1ID.toString(), glass1.getordernumber(), glass1.getlistnumber(),
      //     glass1.getboxnumber(), 0, glass1.getglasslengthmm().toString(), glass1.getglassheightmm().toString(),
      //     glass1.getglasslength().toString(), glass1.getglassheight().toString(), 1);
      //   }
      }
      // }
      if (Do2ID != null) {
        // 写入D02的数据到上片队列表
        if (glass2 == null) {
          spianMapper.Updatequeue(null, null, null, null, 0, null, null, null, null, 2);
        } else {
          spianMapper.Updatequeue(Do2ID.toString(), glass2.getordernumber(), glass2.getlistnumber(),
          glass2.getboxnumber(), 0, glass2.getglasslengthmm().toString(), glass2.getglassheightmm().toString(),
          glass2.getglasslength().toString(), glass2.getglassheight().toString(), 2);
          spianMapper.overqueue2(Do2ID.toString(), 0, 1);// 更改扫码位任务表的状态为0
          S7control.getinstance().WriteWord("DB105.16", (short) 0);// 关闭任务启动
        }
      // if (Do2ID != null) {
      //   // 写入D02的数据到上片队列表
      //   if (glass2 == null) {
      //     spianMapper.Updatequeue(null, null, null, null, 0, null, null, null, null, 2);
      //   } else {
      //     spianMapper.Updatequeue(Do2ID.toString(), glass2.getordernumber(), glass2.getlistnumber(),
      //     glass2.getboxnumber(), 0, glass2.getglasslengthmm().toString(), glass2.getglassheightmm().toString(),
      //     glass2.getglasslength().toString(), glass2.getglassheight().toString(), 2);
      //     spianMapper.overqueue2(Do2ID.toString(), 0, 1);// 更改扫码位任务表的状态为0
      //     S7control.getinstance().WriteWord("DB105.16", (short) 0);// 关闭任务启动
      //   }
      }
      // }
      // 查询数据库
      // 推送到前端
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -13,6 +13,7 @@
import com.example.springboot.entity.StorageCage;
import com.example.springboot.entity.alarmmg;
import com.example.springboot.entity.north_glass_buffer1;
import com.example.springboot.entity.device.PlcParameterObject;
import com.example.springboot.mapper.HomeMapper;
import com.example.springboot.mapper.GlassInfoMapper;
import com.example.springboot.mapper.MeasureSettingMapper;
@@ -121,7 +122,12 @@
                Out_slice CurrentFrame = outSliceServive.SelectCurrentFrame();
                jsonObject.append("CurrentFrame", CurrentFrame);
              
                //读取DB105区文件
                PlcParameterObject plcmes=PLCAutoMes.PlcMesObject;
                //String PlcRequest=plcmes.getPlcParameter("GaToMES").getValue();//出片请求一线
                //double width=plcmes.getPlcParameter("Height").getValue();//出片请求一线
                //double height=plcmes.getPlcParameter("width").getValue();//出片请求一线
                // 获取测量的长,宽
                String PlcRequest = "1";
                double width = 402;
@@ -135,6 +141,7 @@
                        GlassInfo GlassInfo=Result.get(0);
                        QueueMapper.insert(GlassInfo.getGlassid(),width,height,1);
                        System.out.println("匹配成功");
                        //S7control.getinstance().WriteWord(plcmes.getPlcParameter("GaToMES").getAddress(), (short) 1);
                        System.out.println(GlassInfo.getGlassid());
                    }else if(Result.size()>1){
                        //匹配失败 匹配到多条符合的数据  添加数据
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
@@ -18,9 +18,10 @@
        System.out.println("启动完成");
        //  new PlcHold().start();
        new PlcHoldNew().start();
        // new PLCAutoMes().start();
        new Plchome().start();
        //new Plchome().start();
        //  new PlcLayout().start();
        //  new Plcalarm().start();
springboot-vue3/src/main/java/com/example/springboot/entity/FlowCard.java
@@ -1,43 +1,19 @@
package com.example.springboot.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
 * 流程卡表
 */
@Data
@TableName("flowcard")
@TableName("`flowcard`")
public class FlowCard {
    /**
     * 主键,自动生成
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 流程卡
     */
    private String flowcard;
    /**
     * 总层数
     */
    private Integer totaltier;
    /**
     * 玻璃数量
     */
    private Integer number;
    /**
     * 任务线路
     */
    private Integer line;
    /**
     * 状态
     */
    private Integer state;
  private Integer id;// 自增id
  private String flowcard;// 流程卡id
  private Integer number;// 玻璃数量
  private Integer line;// 任务路线
  private Integer state;// 状态
}
springboot-vue3/src/main/java/com/example/springboot/entity/GlassInfo.java
@@ -1,69 +1,25 @@
package com.example.springboot.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
 * 玻璃表
 */
@Data
@TableName("glassinfo")
@TableName("`glassinfo`")
public class GlassInfo {
    /**
     * 主键,自动生成
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 流程卡id
     */
    private String flowcard;
    /**
     * 玻璃类型
     */
    private Integer glasstype;
    /**
     * 配片id
     */
    private Integer mateid;
    /**
     * 玻璃id
     */
    private String glassid;
    /**
     * 层
     */
    private Integer tier;
    /**
     * 膜系
     */
    private String films;
    /**
     * 宽
     */
    private Double width;
    /**
     * 高
     */
    private Double height;
    /**
     * 厚度
     */
    private Double thickness;
    /**
     * 数量
     */
    private Integer number;
    /**
     * 完成数量
     */
    private Integer finishnumber;
  private Integer id;// 自增id
  private String flowcard;// 流程卡id
  private Integer glasstype;// 玻璃类型
  private Integer mateid;// 配片id
  private String glassid;// 玻璃id
  private Integer tier;// 层
  private String films;// 膜系
  private Double width;// 宽
  private Double height;// 高
  private Double thickness;// 厚
  private Integer number;// 数量
  private Integer finishnumber;// 完成数量
}
springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java
@@ -1,182 +1,88 @@
package com.example.springboot.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
//理片笼表
/**
 * 存储笼子表
 */
@Data
@TableName("storage_cage")
public class StorageCage {
    private Integer id; //自序id
    private Integer prcId;//plcid
    private String glassId;//玻璃id
    private Integer cage;//笼子号
    private Integer cell;//格子号
    private Double width;//格子宽
    private Double glasswidth;//玻璃宽
    private Double glassheight;//玻璃高
    private Double glasswidthmm;//英寸玻璃宽
    private Double glassheightmm;//英寸玻璃高
    private String state;//状态
    private Integer tier;//内外片
    private String orderId;//订单id
    private Integer disabled;//停用
    private String listId;//集合id
    private String boxId;//箱子id
    private String FrameBarcode;//铝框id;
    private north_glass_buffer1 north_glass_buffer1s;
    /**
     * 主键,自动生成
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    public void setnorth_glass_buffer1s(north_glass_buffer1 north_glass_buffer1s) {
        this.north_glass_buffer1s = north_glass_buffer1s;
    }
    public north_glass_buffer1 getnorth_glass_buffer1s() {
        return north_glass_buffer1s;
    }
    private Out_slice outSlice;
    public void setout_slice(Out_slice outSlice) {
        this.outSlice = outSlice;
    }
    public Out_slice getout_slice() {
        return outSlice;
    }
    public Integer id() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    public Integer getId() {
        return id;
    }
    public Integer getPrcId() {
        return prcId;
    }
    public void setPrcId(Integer prcId) {
        this.prcId = prcId;
    }
    public String getGlassId() {
        return glassId;
    }
    public void setGlassId(String glassId) {
        this.glassId = glassId;
    }
    public String getOrderId() {
        return orderId;
    }
    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
    public Integer getCage() {
        return cage;
    }
    public void setGage(Integer cage) {
        this.cage = cage;
    }
    public void setCell(Integer cell) {
        this.cell = cell;
    }
    public Integer getCell() {
        return cell;
    }
    public Double getWidth() {
        return width;
    }
    public void setWidth(Double width) {
        this.width = width;
    }
    public String getState() {
        return state;
    }
    public void setState(String state) {
        this.state = state;
    }
    public Integer getTier() {
        return tier;
    }
    public void setTier(Integer tier) {
        this.tier = tier;
    }
    public Double getGlassWidth() {
        return glasswidth;
    }
    public void setGlassWidth(Double glasswidth) {
        this.glasswidth = glasswidth;
    }
    public Double getGlassHeight() {
        return glassheight;
    }
    public void setGlassHeight(Double glassheight) {
        this.glassheight = glassheight;
    }
    public Double getGlassWidthMm() {
        return glasswidthmm;
    }
    public void setGlassWidthMm(Double glasswidthmm) {
        this.glasswidthmm = glasswidthmm;
    }
    public Double getGlassHeightMm() {
        return glassheightmm;
    }
    public void setGlassHeightMm(Double glassheightmm) {
        this.glassheightmm = glassheightmm;
    }
    public Integer getDisabled() {
        return disabled;
    }
    public void setDisabled(Integer disabled) {
        this.disabled = disabled;
    }
    public String getListId() {
        return listId;
    }
    public void setListno(String listId) {
        this.listId = listId;
    }
    public String getBoxId() {
        return boxId;
    }
    public void setBoxno(String boxId) {
        this.boxId = boxId;
    }
    public String getFrameBarcode() {
        return FrameBarcode;
    }
    public void setFrameBarcode(String FrameBarcode) {
        this.FrameBarcode = FrameBarcode;
    }
    /**
     * 玻璃id
     */
    private String glassId;
    /**
     * 流程卡
     */
    private String flowcard;
    /**
     * 笼子id
     */
    private Integer cage;
    /**
     * 格子id
     */
    private Integer cell;
    /**
     * 格子层id
     */
    private Integer tier;
    /**
     * 格子宽
     */
    private Double width;
    /**
     * 玻璃宽
     */
    private Double glassWidth;
    /**
     * 玻璃高
     */
    private Double glassHeight;
    /**
     * 测量宽
     */
    private Double glassWidthMm;
    /**
     * 测量高
     */
    private Double glassHeightMm;
    /**
     * 编号
     */
    private String thickness;
    /**
     * 箱子号
     */
    private String films;
    /**
     * 状态(0:无玻璃,1:有玻璃,2:进片中,3:出片中,4:调度中)
     */
    private Integer state;
    /**
     * 格子状态(0:启用,1:禁用)
     */
    private Integer disabled;
    /**
     * 玻璃类型
     */
    private String glasstype;
    /**
     * 玻璃数量
     */
    private Integer number;
}
springboot-vue3/src/main/java/com/example/springboot/entity/alarmmg.java
@@ -1,6 +1,7 @@
package com.example.springboot.entity;
import java.util.Date;
//报警信息表
public class alarmmg {
  private Integer id;//自增id
springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcParameterInfo.java
@@ -91,6 +91,7 @@
        public void setRatio(int ratio) {
            this.ratio = ratio;
        }
           /**
     * 获取地址
@@ -121,4 +122,7 @@
        return addressIndex;
    }
    public String getAddress() {
       return getAddress(this.addressIndex);
    }
}
springboot-vue3/src/main/java/com/example/springboot/entity/flowcard.java
New file
@@ -0,0 +1,19 @@
package com.example.springboot.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@TableName("`flowcard`")
public class FlowCard {
  private Integer id;// 自增id
  private String flowcard;// 流程卡id
  private Integer number;// 玻璃数量
  private Integer line;// 任务路线
  private Integer state;// 状态
}
springboot-vue3/src/main/java/com/example/springboot/entity/glassinfo.java
New file
@@ -0,0 +1,25 @@
package com.example.springboot.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@TableName("`glassinfo`")
public class GlassInfo {
  private Integer id;// 自增id
  private String flowcard;// 流程卡id
  private Integer glasstype;// 玻璃类型
  private Integer mateid;// 配片id
  private String glassid;// 玻璃id
  private Integer tier;// 层
  private String films;// 膜系
  private Double width;// 宽
  private Double height;// 高
  private Double thickness;// 厚
  private Integer number;// 数量
  private Integer finishnumber;// 完成数量
}
springboot-vue3/src/main/java/com/example/springboot/mapper/AlbaniaMapper.java
New file
@@ -0,0 +1,35 @@
package com.example.springboot.mapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import com.example.springboot.entity.GlassInfo;
@Mapper
@Repository
public interface AlbaniaMapper  {
    //判断笼内是否有合适的类型空格
    @Select("select id from storage_cage where glasstype=#{glasstype} and width>=#{width}+#{widths}  order by id limit 1")
    int SelectCage(int glasstype,Double width,int widths);
    //判断笼内没有玻璃的空格
    @Select("select id from storage_cage where number=0 and cage>#{cage} and cage<#{cage2} order by id limit 1")
    int SelectNewCell(int cage,int cage2);
    //增加玻璃数
    @Update("update storage_cage set number=number+1,width=width-glasswidth where id=#{id}")
    void UpdateCageNumberAdd(int id);
    //减少玻璃数
    @Update("update storage_cage set number=number-1,width=width+glasswidth where id=#{id}")
    void UpdateCageNumberOut(int id);
    //增加任务记录
    @Insert("INSERT INTO `canadames`.`storage_task`(`task_type`, `task_state`, `shelf_rack`, `load_rack`,start_time,glass_id,count,finsh_time) VALUES (#{tasktype},#{taskstate},#{shelfrack},#{loadrack},now(),#{glassid},#{count},#{qidong});")
    void Inserttask(int tasktype, int taskstate, int shelfrack, int loadrack, String glassid, int count,int qidong);
    //新增一条笼子数据
    @Update("UPDATE `albania`.`storage_cage` SET `glass_id` =#{glassid}, `width` =width-#{glasswidth}, `glasswidth` =#{glasswidth}, `glassheight` =#{glassheight}, `glasswidthmm` =#{glasswidthmm}, `glassheightmm` = #{glassheightmm},  `state` = #{state}, `glasstype` = #{glasstype}, `number` = #{number} WHERE `id` =#{id};")
    void AddCage(int id,String glassid,Double glasswidth,Double glassheight,Double glasswidthmm,Double glassheightmm,int state,int glasstype,int number);
    //获取进片数据
    @Select("select glassid,flowcard,glasswidth as width,glassheight as height,glasswidthmm,glassheightmm,glasstype from queue where glasstype=1")
    GlassInfo SelectGlass();
}
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
@@ -226,6 +226,11 @@
  //获取铝框有没有正在出片的玻璃
  @Select("select count(*) from out_slice where barcode=#{frameNo} and state=1")
  Short SelectOutingQueueCount(String frameNo);
  //查询理片笼内信息
  @Select("select * from storage_cage")
  List<StorageCage> SelectStorageCageInfo();
  
}
springboot-vue3/src/main/java/com/example/springboot/service/SpianServiceNew.java
@@ -1,260 +1,68 @@
package com.example.springboot.service;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.example.springboot.component.PLCAutoMes;
import com.example.springboot.component.S7control;
import com.example.springboot.entity.StorageCage;
import com.example.springboot.entity.north_glass_buffer1;
import com.example.springboot.entity.GlassInfo;
import com.example.springboot.entity.device.PlcParameterObject;
import com.example.springboot.mapper.SpianMapper;
import com.example.springboot.mapper.AlbaniaMapper;
import com.google.common.primitives.Bytes;
@Service
public class SpianServiceNew {
    @Autowired
    private SpianMapper spianMapper;
    // @GetMapping("/all")
    public Short selectAll(String glassid) {
 //读取DB105区文件
 PlcParameterObject plcmes=PLCAutoMes.PlcMesObject;
 //读106
 PlcParameterObject plcread=PLCAutoMes.PlcReadObject;
        int cage1 = 0;
        int cells;
        int ids;
        int prcid;
        int tiers;
        int prctier;
        double width;
        double minwidth = 0;
    private AlbaniaMapper albaniaMapper;
     //读取DB105区文件
    private PlcParameterObject plcmes=PLCAutoMes.PlcMesObject;
public Short selectAll(GlassInfo glassInfo) {
    //定义初始字段
    int cageid;
    String glassid=glassInfo.getGlassid();
    Double width=glassInfo.getWidth();
    Double height=glassInfo.getHeight();
    int glasstype=glassInfo.getGlasstype();
        north_glass_buffer1 glasslist = spianMapper.selectGlass(glassid); // 获取玻璃参数
        // 如果没有此id时
        if (glasslist == null) {
            return (300);
    //判断是否有同类型的
     cageid=albaniaMapper.SelectCage(glassInfo.getGlasstype(), glassInfo.getWidth(), 50);
    //如果有同类型时直接增加
    if(cageid!=Integer.MIN_VALUE){
        //发送plc任务
        //任务完成后增加数量
        albaniaMapper.UpdateCageNumberAdd(cageid);
    }else{
         //判断玻璃是否进入大片笼
        if(glassInfo.getThickness()>=15){
            cageid=albaniaMapper.SelectNewCell(3,5);
        }else{
            cageid=albaniaMapper.SelectNewCell(3,5);
            //发送plc任务
        }
        double widths = glasslist.getglasslengthmm();
        String orderids = glasslist.getordernumber();
        String FrameBarcode = glasslist.getFrameBarcode();
        // 获取铝框相关度最高的笼子排序
        List<StorageCage> storageCage = spianMapper.selectAllFbarcode(FrameBarcode, widths, 400);
        // 判断铝框指定空格是否需要间隔空间
        if (storageCage.size() == 0) {
            storageCage = spianMapper.selectAll(orderids, FrameBarcode);
        //当返回的格子号为空时,返回400笼子已满
        if(cageid==Integer.MIN_VALUE){
            return(400);
        }else{
            //判断完成任务后增加数量
            albaniaMapper.AddCage(cageid, glassid, width, height, width, height, 0, glasstype, 1);
        }
        if (storageCage == null) {
            return (400);
        }
        for (StorageCage storageCage2 : storageCage) {
            // 保存订单优先顺序笼子号
            cage1 = storageCage2.getCage();
            // 判断该笼子号相邻最大的空格数
            int cages = spianMapper.selectCage(cage1);
            // 如果相邻笼子没有空格,或者有正在执行的出片任务时返回400
            if (cages == 0) {
                return (400);
            }
            StorageCage cages1;
            // 判断是否是第二片需要加间隔物
            prctier = spianMapper.selectsum(cage1, storageCage2.getCell());// 传给prc的格子内玻璃数
            if (prctier > 0) {
                cages1 = spianMapper.selectCage1(cage1, storageCage2.getCell(), widths + 400);
            } else {
                cages1 = spianMapper.selectCage1(cage1, storageCage2.getCell(), widths);
            }
            // 判断选中笼子是否有合适宽度空格
            // 有合适空格时进片
            if (cages1 != null && cages >= 1 && storageCage2.getDisabled() == 0) {
                ids = cages1.getId();// 数据库ID
                tiers = cages1.getTier();// 内外片
                cells = cages1.getCell();// 格子号
                prcid = cages1.getPrcId();// 传给prc的目标地id
                width = cages1.getWidth();// 格子剩余宽度
                widths = glasslist.getglasslengthmm();
                // 执行进片
                // 获取该格子内是否有玻璃
                int cellint = spianMapper.selectcell(cage1, cells);
                if (cellint == 1) {
                    // 将外片玻璃的数据更新到内片
                    spianMapper.UpdateDBCage(ids, cage1, cells, 1);
                    // 将新入的玻璃存入外片
                    spianMapper.UpdataAddCage2(orderids, glassid, glasslist, cage1, cells, ids - 1, 2);
                    spianMapper.UpdataAddCage1(widths, cage1, cells);// 减少格子宽度
                } else {
                    // 数据库修改笼子表新增一条玻璃
                    spianMapper.UpdataAddCage2(orderids, glassid, glasslist, cage1, cells, ids, 2);
                    spianMapper.UpdataAddCage1(widths, cage1, cells);// 减少格子宽度
                }
                // 进片车起始位置
                S7control.getinstance().WriteWord(plcmes.getPlcParameter("AddStart").getAddress(plcmes.getPlcParameter("AddStart").getAddressIndex()), (short) 1000);
                // 进片车目标位置
                S7control.getinstance().WriteWord(plcmes.getPlcParameter("Addgoal").getAddress(plcmes.getPlcParameter("Addgoal").getAddressIndex()), (short) prcid);
                // 进片玻璃宽
                S7control.getinstance().WriteWord(plcmes.getPlcParameter("AddLength").getAddress(plcmes.getPlcParameter("AddLength").getAddressIndex()), (short) widths);
                // 进片笼内已有玻璃数
                S7control.getinstance().WriteWord(plcmes.getPlcParameter("AddCount").getAddress(plcmes.getPlcParameter("AddCount").getAddressIndex()), (short) prctier);
                // 进片车启动 1为启动
                S7control.getinstance().WriteWord(plcmes.getPlcParameter("AddActivate").getAddress(plcmes.getPlcParameter("AddActivate").getAddressIndex()), (short) 1);
                String activate =plcmes.getPlcParameter("AddActivate").getValue();// 判断启动是否写入
                int activate2 = 0;
                if (activate.equals("1")) {
                    activate2 = 1;
                }else{
                    while (activate.equals("1")) {
                        // 出片任务发送字改为1
                        S7control.getinstance().WriteWord(plcmes.getPlcParameter("AddActivate").getAddress(plcmes.getPlcParameter("AddActivate").getAddressIndex()), (short) 1);
                        activate =plcmes.getPlcParameter("AddActivate").getValue();// 判断启动是否写入
                    }
                }
                outmesid(glassid, "FeedID");//派发id
                spianMapper.Inserttask(0, 0, 1000, ids, glassid.toString(), prctier,activate2);// 新增任务
                return (200);
            }
        }
        return (400);
    }
    //增加任务记录
    albaniaMapper.Inserttask(0, 0, 0, cageid, glassInfo.getGlassid(), 0, 0);
    return(200);
    public Short selectout2(String glassid) {
         //读取DB105区文件
            PlcParameterObject plcmes=PLCAutoMes.PlcMesObject;
        //读106
        PlcParameterObject plcread=PLCAutoMes.PlcReadObject;
}
        char[] a = glassid.toCharArray();
        List<Short> datas = new ArrayList<>();
        // 获取优先出片的位置
        StorageCage cageout = spianMapper.selectOut2(glassid);
        if (cageout == null) {
            return (300);
        }
        int cage = cageout.getCage(); // 储存出片位置,笼子格子几号玻璃
        int cell = cageout.getCell();// 出片格号
        int tier = cageout.getTier();// 出片内外片
        int prcid = cageout.getPrcId();// prcid
        int prcid2;
        int ids;
        int cages;
        int cells;
        double glasswidth = cageout.getGlassWidth();
        int state = spianMapper.selectGlassState(cage, cell);// 获取格子数量
        // 判断玻璃内外片
        if (tier == 2) {
            // 判断玻璃可直接出片时
            spianMapper.OverOutSlice(glassid.toString(), 1, 0);// 更新出片队列任务状态为进行中
            spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度
            spianMapper.UpdataGlassCageState(glassid.toString(), 3);// 更改笼子表的玻璃状态
            spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid, state, 3);// 新增任务
        } else {
            // 获取格子的玻璃数量
            // 判断内片是否需要调拨
            if (state == 1) {
                spianMapper.OverOutSlice(glassid.toString(), 1, 0);// 更新出片队列任务状态为进行中
                spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度
                spianMapper.UpdataGlassCageState(glassid, 3);// 更改笼子表的玻璃状态
                spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid, 1,3);// 新增任务
            } else {
                // 玻璃需要调拨时,判断属于哪个半区的笼子
                if (cage < 6) {
                    StorageCage cagecell = spianMapper.selectGlassCage(cage, glasswidth, 0, 6, cell);
                    if (cagecell == null) {
                        return (300);
                    }
                    // 获取调拨位置进行调拨
                    prcid2 = cagecell.getPrcId();// 调拨目标位PRCID
                    ids = cagecell.getId();// 调拨目标位ID
                    cages = cagecell.getCage();// 调拨目标位笼子
                    cells = cagecell.getCell();// 调拨目标位格子
                    // 更换玻璃的笼子
                    String glassids = spianMapper.SelectGlassid(cage, cell); // 获取被调拨的玻璃id
                    spianMapper.UpdataGlassCageState(glassids, 3);// 更改笼子表的玻璃状态
                    spianMapper.UpdateDBCage(ids, cage, cell, 2);// 将原格子数据更新到新格子里
                    spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度
                    spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度
                    spianMapper.Inserttask(2, 0, cageout.getId(), ids, glassids, 2, 3);// 新增调度任务
                } else {// 笼子号大于5时
                    StorageCage cagecell = spianMapper.selectGlassCage(cage, glasswidth, 5, 11, cell);
                    if (cagecell == null) {
                        return (300);
                    }
                    // 获取调拨位置进行调拨
                    prcid2 = cagecell.getPrcId();// 调拨目标位prcID
                    ids = cagecell.getId();// 调拨目标位ID
                    cages = cagecell.getCage();// 调拨目标位笼子
                    cells = cagecell.getCell();// 调拨目标位格子
                    String glassids = spianMapper.SelectGlassid(cage, cell); // 获取被调拨的玻璃id
                    spianMapper.UpdataGlassCageState(glassids, 3);// 更改笼子表的玻璃状态
                    spianMapper.Inserttask(2, 0, cageout.getId() + 1, ids, glassids, 2, 3);// 新增调度任务
                    spianMapper.UpdateDBCage(ids, cage, cell, 2);// 将原格子数据更新到新格子里
                    spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度
                    spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度
                }
                //发送plc任务
                 S7control.getinstance().WriteWord(plcmes.getPlcParameter("AddStart").getAddress(plcmes.getPlcParameter("AddStart").getAddressIndex()), (short) prcid);
                 S7control.getinstance().WriteWord(plcmes.getPlcParameter("Addgoal").getAddress(plcmes.getPlcParameter("Addgoal").getAddressIndex()), (short) prcid2);
                 S7control.getinstance().WriteWord(plcmes.getPlcParameter("AddCount").getAddress(plcmes.getPlcParameter("AddCount").getAddressIndex()), (short) state);
                 S7control.getinstance().WriteWord(plcmes.getPlcParameter("AddActivate").getAddress(plcmes.getPlcParameter("AddActivate").getAddressIndex()), (short) 1);
                 String activate =plcmes.getPlcParameter("AddActivate").getValue();// 判断启动是否写入
                 int activate2 = 0;
                 if (activate.equals("1")) {
                     activate2 = 1;
                 }else{
                     while (activate.equals("1")) {
                         // 出片任务发送字改为1
                         S7control.getinstance().WriteWord(plcmes.getPlcParameter("AddActivate").getAddress(plcmes.getPlcParameter("AddActivate").getAddressIndex()), (short) 1);
                         activate =plcmes.getPlcParameter("AddActivate").getValue();// 判断启动是否写入
                     }
                 }
                outmesid(glassid, "ReleaseID");//派发id
                //发送完倒片结束
                return (200); // 结束
            }
        }
         // 出片车起始位置
         S7control.getinstance().WriteWord(plcmes.getPlcParameter("AddStart").getAddress(plcmes.getPlcParameter("OutStart").getAddressIndex()), (short) prcid);
         // 出片车目标位置
         S7control.getinstance().WriteWord(plcmes.getPlcParameter("Addgoal").getAddress(plcmes.getPlcParameter("Outgoal").getAddressIndex()), (short) 1000);
         // 出片笼内已有玻璃数
         S7control.getinstance().WriteWord(plcmes.getPlcParameter("AddCount").getAddress(plcmes.getPlcParameter("OutCount").getAddressIndex()), (short) state);
         // 出片车启动 1为启动
         S7control.getinstance().WriteWord(plcmes.getPlcParameter("AddActivate").getAddress(plcmes.getPlcParameter("OutActivate").getAddressIndex()), (short) 1);
         String activate =plcmes.getPlcParameter("AddActivate").getValue();// 判断启动是否写入
         int activate2 = 0;
         if (activate.equals("1")) {
             activate2 = 1;
         }else{
             while (activate.equals("1")) {
                 // 出片任务发送字改为1
                 S7control.getinstance().WriteWord(plcmes.getPlcParameter("AddActivate").getAddress(plcmes.getPlcParameter("AddActivate").getAddressIndex()), (short) 1);
                 activate =plcmes.getPlcParameter("AddActivate").getValue();// 判断启动是否写入
             }
         }
         outmesid(glassid, "ReleaseID");//派发id
        //直接出片结束
    public Short selectout(String glasstype) {
        //判断笼子最先出哪片
        return(200);// 结束
    }
@@ -310,12 +118,12 @@
    // 根据玻璃id完成在进行中的任务
    public void overtask(String glassid) {
        spianMapper.UpdatetaskOut(glassid.toString());// 完成上一次 出片或者进片任务
        spianMapper.OverOutSlice(glassid.toString(), 2, 1);// 完成出片队列任务
        spianMapper.UpdataGlassCage(glassid.toString(), 0);// 清除出片格子玻璃信息
        spianMapper.UpdateCageOver(glassid.toString(), 0);// 更改笼子表出片状态
        spianMapper.UpdateCageadd(glassid.toString(), 1);// 更改笼子表进片状态
        spianMapper.UpdateAddQueue(glassid.toString());// 把进片的玻璃更新到出片队列中
        // spianMapper.UpdatetaskOut(glassid.toString());// 完成上一次 出片或者进片任务
        // spianMapper.OverOutSlice(glassid.toString(), 2, 1);// 完成出片队列任务
        // spianMapper.UpdataGlassCage(glassid.toString(), 0);// 清除出片格子玻璃信息
        // spianMapper.UpdateCageOver(glassid.toString(), 0);// 更改笼子表出片状态
        // spianMapper.UpdateCageadd(glassid.toString(), 1);// 更改笼子表进片状态
        // spianMapper.UpdateAddQueue(glassid.toString());// 把进片的玻璃更新到出片队列中
    }
}
springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java
@@ -202,4 +202,8 @@
        return Result.success(map);
    }
    public List<StorageCage> SelectStorageCageInfo() {
        return homeMapper.SelectStorageCageInfo();
    }
}
springboot-vue3/src/main/resources/JsonFile/PlcAlbania.json
New file
@@ -0,0 +1,424 @@
{
   "plcAddressBegin":"DB14.0",
   "plcAddressLenght":"210",
   "dataType":"word",
   "parameteInfor":[
      {
         "codeId": "PLCToMES",
         "addressIndex":"0",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"m/min"
      },
      {
          "codeId": "IDStatus1",
          "addressIndex":"2",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"m/min"
       },
       {
          "codeId": "IDStatus2",
          "addressIndex":"4",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"m/min"
       },
       {
          "codeId": "IDStatus3",
          "addressIndex":"6",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       },
       {
          "codeId": "IDStatus4",
          "addressIndex":"8",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       },
       {
          "codeId": "IDStatus5",
          "addressIndex":"10",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       }
       ,
       {
          "codeId": "IDStatus6",
          "addressIndex":"12",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       },
       {
          "codeId": "StautsID1",
          "addressIndex":"14",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       }
       ,
       {
          "codeId": "StautsID2",
          "addressIndex":"16",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       }
       ,
       {
          "codeId": "StautsID3",
          "addressIndex":"18",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       }
       ,
       {
          "codeId": "StautsID4",
          "addressIndex":"20",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       }
       ,
       {
          "codeId": "StautsID5",
          "addressIndex":"22",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       },
       {
          "codeId": "StautsID6",
          "addressIndex":"24",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       },
       {
          "codeId": "GaToMES",
          "addressIndex":"26",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       },
       {
          "codeId": "Height",
          "addressIndex":"28",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       },
       {
          "codeId": "width",
          "addressIndex":"30",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       },
       {
          "codeId": "ExportTOMES1",
          "addressIndex":"32",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       }
       ,
       {
          "codeId": "ExportToMES2",
          "addressIndex":"34",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       } ,
       {
          "codeId": "MESToPLC",
          "addressIndex":"36",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       } ,
       {
          "codeId": "MESID1",
          "addressIndex":"38",
          "addressLenght":"14",
          "ratio":"1",
          "unit":"mm/S"
       } ,
       {
          "codeId": "MESID2",
          "addressIndex":"54",
          "addressLenght":"14",
          "ratio":"1",
          "unit":"mm/S"
       },
       {
          "codeId": "MESID3",
          "addressIndex":"70",
          "addressLenght":"14",
          "ratio":"1",
          "unit":"mm/S"
       },
       {
          "codeId": "MESID4",
          "addressIndex":"86",
          "addressLenght":"14",
          "ratio":"1",
          "unit":"mm/S"
       },
       {
          "codeId": "MESID5",
          "addressIndex":"102",
          "addressLenght":"14",
          "ratio":"1",
          "unit":"mm/S"
       },
       {
          "codeId": "MESID6",
          "addressIndex":"118",
          "addressLenght":"14",
          "ratio":"1",
          "unit":"mm/S"
       },
       {
          "codeId": "MESToPLCStart1",
          "addressIndex":"134",
          "addressLenght":"2",
          "ratio":"1",
          "unit":"mm/S"
       },{
         "codeId": "MESToPLCStart2",
         "addressIndex":"136",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "MESToPLCStart3",
         "addressIndex":"138",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      }
      ,{
         "codeId": "MESToPLCStart4",
         "addressIndex":"140",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      }
      ,{
         "codeId": "MESToPLCStart5",
         "addressIndex":"142",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      }
      ,{
         "codeId": "MESToPLCStart6",
         "addressIndex":"144",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "MESToPLCTarget1",
         "addressIndex":"146",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "MESToPLCTarget2",
         "addressIndex":"148",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "MESToPLCTarget3",
         "addressIndex":"150",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "MESToPLCTarget4",
         "addressIndex":"152",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "MESToPLCTarget5",
         "addressIndex":"154",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "MESToPLCTarget6",
         "addressIndex":"156",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "MESToPLCStatus1",
         "addressIndex":"158",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "MESToPLCStatus2",
         "addressIndex":"160",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "MESToPLCStatus3",
         "addressIndex":"162",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "MESToPLCStatus4",
         "addressIndex":"164",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "MESToPLCStatus5",
         "addressIndex":"166",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "MESToPLCStatus6",
         "addressIndex":"168",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "MESToGaStatus",
         "addressIndex":"170",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "A01Err",
         "addressIndex":"172",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "A02Err",
         "addressIndex":"174",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "B01Err",
         "addressIndex":"176",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "C01Err",
         "addressIndex":"178",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "C02Err",
         "addressIndex":"180",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "ErrSpace1",
         "addressIndex":"182",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "ErrSpace2",
         "addressIndex":"184",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "ErrSpace3",
         "addressIndex":"186",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "B01Position",
         "addressIndex":"188",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "C01Position",
         "addressIndex":"190",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "C02Position",
         "addressIndex":"192",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "DeviceState",
         "addressIndex":"194",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "AllFVRun",
         "addressIndex":"196",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "A01State",
         "addressIndex":"198",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "A02State",
         "addressIndex":"200",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "B01State",
         "addressIndex":"202",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "C01State",
         "addressIndex":"204",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "C02State",
         "addressIndex":"206",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      },{
         "codeId": "MainControl",
         "addressIndex":"208",
         "addressLenght":"2",
         "ratio":"1",
         "unit":"mm/S"
      }
   ]
}