Albania_Mes-ui/src/views/home/index.vue
@@ -306,6 +306,7 @@ .cells { height: 100%; } </style> <template> <el-container> @@ -477,12 +478,12 @@ <div style="height: 780px;"> <!--功能--> <div> <el-button type="primary" @click="ManualMatching()" :disabled="SoftEmergencyStopState" <el-button type="primary" @click="ManualMatching()" :disabled="(this.LastQueue.state<=0)" style="z-index: 999;">{{ $t('Manual matching') }}</el-button> <el-button type="primary" @click="ManualTake()" :disabled="SoftEmergencyStopState" <el-button type="primary" @click="ManualTake()" :disabled="(this.LastQueue.state<=0)" style="z-index: 999;">{{ $t('Manual removal') }}</el-button> <el-button type="primary" @click="AnewMeasure()" :disabled="SoftEmergencyStopState" <el-button type="primary" @click="AnewMeasure()" :disabled="(this.LastQueue.state<=0)" style="z-index: 999;">{{ $t('Remeasure') }}</el-button> </div> springboot-vue3/effective-pom.xml
@@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- ====================================================================== --> <!-- --> <!-- Generated by Maven Help Plugin on 2024-03-19T08:09:38+08:00 --> <!-- Generated by Maven Help Plugin on 2024-04-15T08:30:30+08:00 --> <!-- See: http://maven.apache.org/plugins/maven-help-plugin/ --> <!-- --> <!-- ====================================================================== --> springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java
@@ -61,6 +61,7 @@ } } //进片请求时 GlassInfo glass=albaniaMapper.SelectGlass(); if(PLCToMES!=null && glass!=null&&MESToPLC!=null){ if(PLCToMES.equals("1")==true&&MESToPLC.equals("0")==true){ springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -133,29 +133,29 @@ // 匹配 // System.err.println(PlcRequest+","+MesSend+","+width+","+height); if (plcmes.getPlcParameter("GaToMES").getValue() != null) { String PlcRequest = plcmes.getPlcParameter("GaToMES").getValue();// 请求 String MesSend = plcmes.getPlcParameter("MESToGaStatus").getValue();// 发送 double width = Double.valueOf(plcmes.getPlcParameter("width").getValue());// 宽 double height = Double.valueOf(plcmes.getPlcParameter("Height").getValue());// 高 if ("0".equals(PlcRequest) && istest) { S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), (short) 0); } if ("1".equals(PlcRequest) && "0".equals(MesSend)) { boolean is = HomeService.Normal(width, height, "1"); if (is && istest) { // 测量成功 S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), (short) 1); // if (plcmes.getPlcParameter("GaToMES").getValue() != null) { // String PlcRequest = plcmes.getPlcParameter("GaToMES").getValue();// 请求 // String MesSend = plcmes.getPlcParameter("MESToGaStatus").getValue();// 发送 // double width = Double.valueOf(plcmes.getPlcParameter("width").getValue());// 宽 // double height = Double.valueOf(plcmes.getPlcParameter("Height").getValue());// 高 // if ("0".equals(PlcRequest) && istest) { // S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), // (short) 0); // } // if ("1".equals(PlcRequest) && "0".equals(MesSend)) { // boolean is = HomeService.Normal(width, height, "1"); // if (is && istest) { // // 测量成功 // S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), // (short) 1); } else if (istest) { // 重新测量 S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), (short) 4); } } } // } else if (istest) { // // 重新测量 // S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), // (short) 4); // } // } // } // S7control.getinstance().WriteWord("DB14.170", (short)0); Queue LastQueue = QueueMapper.selectLastQueue(); springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
@@ -17,12 +17,12 @@ // System.out.println("启动完成"); new Plcalarm().start(); new PLCAutoMes().start(); new PlcHoldNew().start(); // new Plcalarm().start(); // new PLCAutoMes().start(); // new PlcHoldNew().start(); new Plchome().start(); new PlcAlbaniaServo().start(); new Plcsign().start(); // new PlcAlbaniaServo().start(); // new Plcsign().start(); } springboot-vue3/src/main/java/com/example/springboot/mapper/AlbaniaMapper.java
@@ -15,7 +15,7 @@ @Select("select id from storage_cage where glasstype=#{glasstype} and width>=#{width}+#{widths} and disabled=0 order by id limit 1") StorageCage SelectCage(int glasstype,Double width,int widths); //判断笼内没有玻璃的空格 @Select("select id from storage_cage where number=0 and cage>#{cage} and cage<#{cage2} and disabled=0 order by id limit 1") @Select("select id from storage_cage where (number is null or number=0) and cage>#{cage} and cage<#{cage2} and disabled=0 order by id limit 1") StorageCage SelectNewCell(int cage,int cage2); //增加玻璃数 @Update("update storage_cage set number=number+1,width=width-glasswidth where id=#{id}") springboot-vue3/src/main/java/com/example/springboot/service/SpianServiceNew.java
@@ -24,6 +24,8 @@ //有进片请求但是测量台没有玻璃 return 400; } System.out.println(glassInfo+"初始"); //定义初始字段 StorageCage cage; String glassid=glassInfo.getGlassid(); @@ -44,14 +46,16 @@ if(glassInfo.getThickness()>=15){ cage=albaniaMapper.SelectNewCell(3,5); }else{ cage=albaniaMapper.SelectNewCell(0,5); cage=albaniaMapper.SelectNewCell(0,4); System.out.println(cage+"理片笼判断"); } //当返回的格子号为空时,返回400笼子已满 if(cage!=null){ albaniaMapper.AddCage(cage.getId(), glassid,width, height, 1, glasstype, 0); Mestast(glassid,1001,cage.getId(),1,"MESID1",1); albaniaMapper.UpdateStorage(width,height,cage.getId()); System.out.println(cage+"任务发送"); }else{ return(400); }