CanadaMes-ui/src/lang/locales/en-US.json
@@ -1,6 +1,6 @@ { "Clear":"Clear", "ip":"localhost", "ip":"192.168.10.21", "systemTitle": "Login System", "usernamePlaceholder": "Please enter username", "passwordPlaceholder": "Please enter password", @@ -568,7 +568,8 @@ "A02行走伺服回零":"A02 SERVE TRAVEL Home" }, "A01行走伺服回零":"A01 SERVE TRAVEL Home", "A02行走伺服回零":"A02 SERVE TRAVEL Home" "A02行走伺服回零":"A02 SERVE TRAVEL Home", "Set":"Set" } CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -1,6 +1,6 @@ { "Clear":"清除", "ip":"localhost", "ip":"192.168.10.21", "systemTitle": "登录系统", "usernamePlaceholder": "请输入用户名", "passwordPlaceholder": "请输入密码", @@ -514,6 +514,7 @@ "Servomanualone":"半自动", "Address parameter settings":"地址参数设置", "Speed parameter settings":"速度参数设置", "InteractionState":"交互状态" "InteractionState":"交互状态", "Set":"设定" } CanadaMes-ui/src/layout/index.vue
@@ -310,10 +310,10 @@ } } }, //45秒复位倒数计时 //60秒复位倒数计时 CountDown() { clearInterval(timer); let count = 45; let count = 60; timer = setInterval( () => { if (this.EmergencyStop == true) { CanadaMes-ui/src/views/Electrical/Positioning1.vue
@@ -114,13 +114,13 @@ > </el-breadcrumb> <el-row :gutter="18" class="card"> <el-row :gutter="18" class="card" style="width: 1400px"> <el-col :span="7" v-for="(dataGroup, groupIndex) in jsonData" :key="groupIndex" > <el-card class="json-block"> <el-card class="json-block" style="width: 400px"> <div class="button-row" style="display: flex; justify-content: space-between" @@ -143,15 +143,17 @@ <span class="name" style="width: 250px">{{ item.name }}</span> <el-input v-if="item.type === '0'" style="width: 120px" v-model="item.value" class="input-box" :oninput="`value=value.replace(/^0|[^0-9]/g,'');if(value<`+item.min+`){value=`+item.value+`}else if(value>`+item.max+`){value=`+item.value+`}`" @keyup.enter.native="submitDataToBackend($event)" ></el-input> <span v-if="item.unit" :name="item.unit">{{ item.unit }}</span> <!-- <el-button v-if="item.type === '0' && item.name !== '格子间距' && item.name !== '出片接片地址' && item.name !== '存片接片地址'" class="input-box" @click="submitDataToBackend();">取地址</el-button> --> <el-button v-if="item.type === '0' && item.name !== '格子间距' && item.name !== 'GridSpacing' " class="input-box" @click="updateButtonValue(dataGroup, itemIndex,groupIndex);">{{ $t("Set") }}</el-button> </div> </div> </el-card> @@ -172,6 +174,12 @@ data() { return { jsonData: data, // 加载整个data.json文件作为jsonData A01:"", A02:"", B01:"", B02:"", jianju:"" }; }, activated() { @@ -184,8 +192,45 @@ this.$forceUpdate(); }, methods: { updateButtonValue(dataGroup, itemIndex) { this.$set(dataGroup[itemIndex].button, "value", 1); // 点击按钮后将值改为1 updateButtonValue(dataGroup, itemIndex,groupIndex) { if(groupIndex==1){ const value = parseFloat(this.A01); this.$set(dataGroup[itemIndex], "value", value); console.log(value) } if(groupIndex==2){ const value = parseFloat(this.A02) ; this.$set(dataGroup[itemIndex], "value", value); console.log(value) } if(groupIndex==3){ const value = parseFloat(this.A01) + parseFloat(this.jianju); this.$set(dataGroup[itemIndex], "value", value); console.log(value) } if(groupIndex==4){ const value=parseFloat(this.A02)+parseFloat(this.jianju) this.$set(dataGroup[itemIndex], "value", value); } if(groupIndex==5){ const value=parseFloat(this.B01)-parseFloat(this.jianju) this.$set(dataGroup[itemIndex], "value", value); } if(groupIndex==6){ const value=parseFloat(this.B02)+parseFloat(this.jianju) this.$set(dataGroup[itemIndex], "value", value); } this.submitDataToBackend(event); }, //提交数据到后端 submitDataToBackend(event) { @@ -287,6 +332,24 @@ } } } this.A01 = obj.shishi1[0][0]; this.A02 = obj.shishi1[0][1]; this.B01= obj.shishi1[0][2]; this.B02 = obj.shishi1[0][3]; this.jianju = obj.params[0][0]; } }; CanadaMes-ui/src/views/home/index.vue
@@ -375,6 +375,17 @@ <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)"> @@ -405,13 +416,13 @@ <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)"> <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.2,6', 6)"> <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.1', 6)"> {{ $t('Clear') }}</el-button> </div> @@ -599,12 +610,6 @@ <el-dialog :visible.sync="dialogFormVisible5" :title="$t('Please confirm the glass information')"> <el-form :model="form" label-width="100px" style="padding-right: 30px"> <div style="display: flex;justify-content: center;"> <!-- <el-form-item> <el-input style="width:50%;margin-left: 20%;" :placeholder="$t('Enter the glass barcode')" v-model="glassid2"></el-input> <el-button type="primary" @click="SelectGlassByGlassIDs(1)">{{ $t('Query') }}</el-button> </el-form-item> --> <el-form-item> {{ $t('Confirm State') }}:{{ this.isConfirm == true ? $t('Allow') : $t('Not Allow') }} <el-button type="primary" @click="isConfirmState()"> @@ -723,22 +728,11 @@ </el-form-item> </div> <div style="display: flex;justify-content: right;"> <!-- <el-button @click="DeleteQueueGlasss(2)" type="primary">{{ $t('Clear Current') }}</el-button> <el-button @click="InsertQueueGlass(2)" type="primary" :disabled="disabled"> {{ $t('Confirm') }}</el-button> <el-button @click="DeleteQueueGlasss(1)" type="primary">{{ $t('Clear Current') }}</el-button> --> <el-button @click="InsertQueueGlass(1)" style="margin-right: 100px;" type="primary" :disabled="disabled1"> {{ $t('Confirm') }}</el-button> </div> </el-form> <!-- <template #footer> <span class="dialog-footer"> <el-button @click="cancel3()">{{ $t('cancel') }}</el-button> </span> </template> --> </el-dialog> <el-dialog :visible.sync="dialogFormVisible6" :title="$t('Outing Queue')" top="5vh"> @@ -761,9 +755,6 @@ <label style="background-color:yellow;font-size: 23px;" for=""> {{ isQueueWarning == true ? $t('The cage is disabled') : "" }} </label> <!-- <span style="background-color:yellow;"> {{ isQueueWarning== true ? $t('The cage is disabled') : $t('The cage is disabled') }} </span> --> <div style="display:flex;"> <div style="width:70%;"> <el-table :data="this.OutSlice" :height="700" :span-method="objectSpanMethod" border @@ -793,45 +784,12 @@ }}</el-button> </template> </el-table-column> <!-- <el-table-column :min-width="300" prop="position" :label="$t('Position')" style="font-size: 20px;"> <template slot-scope='scope'> <div :style="'width:' + (scope.row.position == 1 ? '300' : '100') + 'px;height:' + (scope.row.position == 1 ? '100' : '200') + 'px;background-Color:gray;margin:0 auto;'"> </div> </template> </el-table-column> --> <!-- <el-table-column prop="position" :label="$t('Flipped')" :min-width="200"> <template slot-scope='scope'> {{ scope.row.flip == true ? $t('EXTERIQR OUT AND BYPASS TO THE LEFT') : $t('EXTERIQR OUT AND BYPASS TO THE RIGHT') }} </template> </el-table-column> --> <el-table-column :width="100" :label="$t('Operate')"> <template slot-scope='scope'> <!-- <el-button type="text" size="small" @click="getTopMove(scope.row, scope.$index)" style="font-size: 15px;" :disabled="(scope.$index == 0 || isAllowReordering == true || scope.row.state == 1)"> {{ $t('Top') }} </el-button> <el-button type="text" size="small" @click="getUpMove(scope.row, scope.$index)" style="font-size: 15px;" :disabled="(scope.$index == 0 || isAllowReordering == true || scope.row.state == 1)"> {{ $t('Up') }} </el-button> <el-button type="text" size="small" @click="getDownMove(scope.row, scope.$index)" style="font-size: 15px;" :disabled="(OutSlice.length - 1 == scope.$index || isAllowReordering == true || scope.row.state == 1)"> {{ $t('Down') }} </el-button> --> <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" :disabled="isAllowQueue" @click="deleteproductionqueueglass(scope.row.barcode)">{{ $t('Delete') }}</el-button> <!-- <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" :disabled="isAllowQueue" @click="FrameStateUpdate(scope.row.barcode,scope.row.framestate)">{{ scope.row.framestate == 0 ? $t('Stop') : $t('Start') }}</el-button> --> </template> </el-table-column> </el-table> @@ -881,7 +839,6 @@ </template> </el-table-column> <!-- <el-table-column prop="Flip" :label="$t('Flipped')"></el-table-column> --> <el-table-column prop="out_slice.state" :label="$t('In the queue')"> <template slot-scope='scope'> {{ scope.row.out_slice != null ? $t('Yes') : $t('No') }} @@ -893,12 +850,6 @@ {{ scope.row.storageCage != null ? $t('Yes') : $t('No') }} </template> </el-table-column> <!-- <el-table-column :width="80" :label="$t('Operate')"> <template slot-scope='scope'> <el-checkbox label="" :disabled="!(scope.row.storageCage != null && scope.row.out_slice == null)" :checked="scope.row.isCheck" @change="CheckBoxchange(scope.row.barcode, $event)"></el-checkbox> </template> </el-table-column> --> </el-table> </el-dialog> <el-dialog :visible.sync="dialogFormCountDown" :title="$t('Approximately resettable time')" top="5vh"> @@ -1019,6 +970,9 @@ }, created() { this.load(); }, activated() { this.init(); } , @@ -1076,9 +1030,9 @@ this.CurrentFrame = obj.CurrentFrame; //获取设备状态 // if (obj.DeviceList != null) { // this.DeviceList = obj.DeviceList[0]; // } if (obj.DeviceList != null) { this.DeviceList = obj.DeviceList[0]; } //获取设备上的玻璃id if (obj.GlassIdList != null) { this.GlassIdList = obj.GlassIdList[0]; @@ -1196,6 +1150,10 @@ socket.onerror = function () { console.log("websocket发生了错误"); } //跳转页面时关闭socket this.$router.afterEach(function () { socket.close(); }); } }, load() { @@ -1248,14 +1206,6 @@ this.cagelist3 = res.data.list3; this.cagelist4 = res.data.list4; }); // //加载进片任务数据 // loadtask(this.task1).then(res => { // this.tasklist1 = res.data.list; // }); // //加载进出片任务数据 // loadtask(this.task2).then(res => { // this.tasklist2 = res.data.list; // }); //加载报警信息 SelectAlarmmgInfo().then(res => { this.alarm = res.data.alarmmg; @@ -1296,7 +1246,6 @@ }, //手动上片 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')); @@ -1371,36 +1320,6 @@ //获取扫码位和上片位数据 SelectGlassByGlassIDs() { this.showform3(); // if (parameter == 1) { // SelectGlassByGlassID(this.glassid2).then(res => { // if (res.data.form != null) { // if (res.data.form.glassId != null) { // this.form4 = res.data.form; // this.$message.success(this.$t('query was successful')); // this.Sizerange(this.form4, 2); // } else { // this.$message.error(this.$t('There is no such glass')); // } // } else { // this.$message.error(this.$t('There is no such glass')); // } // }); // } else { // SelectGlassByGlassID(this.glassid1).then(res => { // if (res.data.form != null) { // if (res.data.form.glassId != null) { // this.form5 = res.data.form; // this.$message.success(this.$t('query was successful')); // this.Sizerange(this.form5, 1); // } else { // this.$message.error(this.$t('There is no such glass')); // } // } else { // this.$message.error(this.$t('There is no such glass')); // } // }); // } }, //查询客户玻璃信息 @@ -1426,16 +1345,6 @@ //查询铝框id对应玻璃信息 SelectAluminumFrameInfoById(this.framebarcode).then(res => { this.AluminumFrame = res.data.AluminumFrame; console.log(this.AluminumFrame); // this.AluminumFrame.forEach(item => { // if (item.storageCage != null && item.out_slice == null) { // item.isCheck = true; // } else { // item.isCheck = false; // } // item.Flip = res.data.flip; // item.FrameNo = this.framebarcode; // }); }); this.dialogFormVisible7 = true; }, @@ -1668,6 +1577,7 @@ InsertQueueGlass(parameter) { if (parameter == 1 && this.form5.glassId != "") { if (this.form5.glassId != this.form2.glassId && this.form5.glassId != this.form3.glassId) { if (this.dialogFormVisible5 == true) { InsertQueueGlassId(1, this.form5).then(res => { if (res.data.message == 200) { this.form5 = {}; @@ -1679,6 +1589,7 @@ this.$message.error(this.$t('This glass ID already exists in the sorting cage')); } }); } } else { this.$message.error(this.$t('The glass ID already exists in the loading queue')); } @@ -1854,7 +1765,7 @@ } this.UpdateSequence(Sequence); }, //修改顺序 //修改出片顺序 UpdateSequence(Sequence) { let i = 0; this.OutSlice.forEach(item => { @@ -1969,9 +1880,9 @@ } else { this.disabled = false; } if (position == 3 && this.isConfirm == true && this.D01RequestState == true) { this.InsertQueueGlass(1); } // if (position == 3 && this.isConfirm == true && this.D01RequestState == true && this.dialogFormVisible5 == true) { // this.InsertQueueGlass(1); // } } } }, @@ -1987,9 +1898,9 @@ } }); }, //45秒复位倒数计时 //60秒复位倒数计时 CountDown() { let count = 45; let count = 60; let timer = setInterval( () => { if (this.EmergencyStop == true) { @@ -2094,7 +2005,7 @@ type: 'warning' }).then(() => { ClearGlassId(position, this.GlassIdList[num]).then(res => { if (res.data.message3 == 200) { if (res.data.message == 200) { this.$message.success(this.$t('Operation successful')); } else { this.$message.success(this.$t('operation failed')); springboot-vue3/src/main/java/com/example/springboot/component/PLCAutomaticParameterSettingReview2.java
@@ -60,34 +60,39 @@ readAndUpdateBitValues(plcBitObject); readAndUpdateWordValues(plcParameterObject); readAndUpdateWordValues(plcStateObject); // List<Boolean> getplcvlues = S7control.getinstance().ReadBits(plcBitObject.getPlcAddressBegin(), plcBitObject.getPlcAddressLength()); // plcBitObject.setPlcBitList(getplcvlues); // int index = plcParameterObject.getPlcParameter("A01A02conveyorVelocity(Max)").getAddressIndex(); // System.out.println(index); // plcParameterObject.getPlcParameter("A01A02conveyorVelocity(Max)").getAddress(index); // System.out.println(plcParameterObject.getPlcParameter("A01A02conveyorVelocity(Max)").getAddress(index)); // S7control.getinstance().WriteWord(plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getAddress(index), (short) 100); List<String> addresses = new ArrayList<>(); addresses.add("conveyorVelocity(AutoFAST)"); addresses.add("A02ID"); System.out.println(plcParameterObject.getPlcParameterValues(addresses)); // List<String> addresses = new ArrayList<>(); // addresses.add("conveyorVelocity(AutoFAST)"); // addresses.add("A02ID"); //System.out.println(plcParameterObject.getPlcParameterValues(addresses)); List<String> addresses2 = new ArrayList<>(); addresses2.add("conveyorVelocity(AutoSLOW)"); addresses2.add("D01.SRdec"); addresses2.add("D01.SRinpos"); addresses2.add("D05.SRinpos"); System.out.println(plcBitObject.getPlcBitValues(addresses2)); int index2 = plcBitObject.getPlcBit("DO1id").getAddressIndex(); int index2 = plcBitObject.getPlcBit("D05.SRinpos").getAddressIndex(); System.out.println(index2); plcBitObject.getPlcBit("DO1id").getAddress(index2); System.out.println(plcBitObject.getPlcBit("DO1id").getAddress(index2)); List<String> addresses3 = new ArrayList<>(); addresses3.add("A02ID1"); addresses3.add("A01CurrentGrid"); System.out.println(plcStateObject.getPlcParameterValues(addresses3)); plcBitObject.getPlcBit("D05.SRinpos").getAddress(index2); System.out.println(plcBitObject.getPlcBit("D05.SRinpos").getAddress(index2)); // // // List<String> addresses3 = new ArrayList<>(); // addresses3.add("A02ID1"); // addresses3.add("A01CurrentGrid"); // System.out.println(plcStateObject.getPlcParameterValues(addresses3)); } } } springboot-vue3/src/main/java/com/example/springboot/component/PlcPositioning1.java
@@ -49,12 +49,18 @@ // Short[] values1 = {1,1,1, 1,2, 3, 4, 5, 6, 7, 8, 9, 10,11, 12,13,14,15,16,17,18,19,20,11, 12,13,14,15,16,17,18,19,20 }; // List<Short> arraylist = new ArrayList<>(Arrays.asList(values1)); List<Short> arraylist5 = S7control.getinstance().ReadWord("DB106.0", 1); List<Short> arraylist6 = S7control.getinstance().ReadWord("DB106.12", 1); List<Short> arraylist7 = S7control.getinstance().ReadWord("DB106.40", 1); List<Short> arraylist8 = S7control.getinstance().ReadWord("DB106.50", 1); arraylist5.addAll(arraylist6); arraylist5.addAll(arraylist7); arraylist5.addAll(arraylist8); JSONObject jsonObject = new JSONObject(); jsonObject.append("params", arraylist); jsonObject.append("shishi1", arraylist5); // WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Positioning1"); springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -12,6 +12,7 @@ import com.example.springboot.service.*; import org.springframework.beans.factory.annotation.Autowired; import com.example.springboot.entity.Glass; import com.example.springboot.entity.Out_slice; import com.example.springboot.entity.Queue; import com.example.springboot.entity.StorageCage; @@ -45,6 +46,8 @@ private StorageCageService storageCageService; public static Boolean FeedState = false; // public Plchome() throws IOException { // config = new Configuration("config.properties"); // } @@ -58,12 +61,12 @@ try { Thread.sleep(1000); // 注入mapper homeMapper = WebSocketServer.applicationContext.getBean(HomeMapper.class); spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class); spianService = WebSocketServer.applicationContext.getBean(SpianService.class); outSliceServive = WebSocketServer.applicationContext.getBean(OutSliceServive.class); north_Glass_Buffer1Service = WebSocketServer.applicationContext.getBean(North_Glass_Buffer1Service.class); north_Glass_Buffer1Service = WebSocketServer.applicationContext .getBean(North_Glass_Buffer1Service.class); storageCageService = WebSocketServer.applicationContext.getBean(StorageCageService.class); dbserve = WebSocketServer.applicationContext.getBean(JdbcConnections.class); @@ -120,14 +123,10 @@ // String E01id = new String( S7controlLK.getinstance().ReadByte("DB17.0",16)); // String J01id = new String( S7controlLK.getinstance().ReadByte("DB17.22",14)); if (S7control.getinstance().CheckConnected() == true) { // 铝框线交互 if (S7controlLK.getinstance().CheckConnected() == true) { if (CurrentFrame != null) { S7controlLK.getinstance().writeStrings(CurrentFrame.getBarCode(),"DB17.0"); } @@ -155,19 +154,16 @@ } S7controlLK.getinstance().WriteWord("DB17.38", (short) send); } } if (S7control.getinstance().CheckConnected() == true) { // 获取当前扫码方式 List<Boolean> Scanningmethods = S7control.getinstance().ReadBits("DB101.11.4", 1); if (Scanningmethods != null) { for (Boolean Scanningmethod : Scanningmethods) { jsonObject.append("Scanningmethod", Scanningmethod); } } // 获取当前扫码枪玻璃id String CurrrentGlassId = spianService.queGlassid("DB103.256", 14).toString(); jsonObject.append("CurrrentGlassId", CurrrentGlassId); @@ -244,12 +240,6 @@ jsonObject.append("AluminumFrame", AluminumFrame); } // 获取进片请求状态 List<Short> D01Request = S7control.getinstance().ReadWord("DB106.24", 1); boolean D01RequestState = D01Request.contains((short) 1); // boolean D01RequestState =true; jsonObject.append("D01RequestState", D01RequestState); // 复位倒计时 // 地址104.9.6 List<Boolean> countdown = S7control.getinstance().ReadBits("DB104.9.6", 1); @@ -268,14 +258,30 @@ for (Boolean emergencystop : emergencystops) { jsonObject.append("emergencystop", emergencystop); } // 获取进片请求状态 List<Short> D01Request = S7control.getinstance().ReadWord("DB106.24", 1); boolean D01RequestState = D01Request.contains((short) 1); jsonObject.append("D01RequestState", D01RequestState); // 获取进片发送状态 List<Short> D01respnse = S7control.getinstance().ReadWord("DB106.16", 1); boolean D01ResponseState = D01respnse.contains((short) 1); // jsonObject.append("D01RequestState", D01RequestState); // 自动进片 if ((form3.getglassheight() < 380 || form3.getglasswidth() < 390 || form3.getglassheight() > 1810 || form3.getglasswidth() > 2760) || (form3.getglassheight() < 390 || form3.getglasswidth() < 380 || form3.getglassheight() > 2760 || form3.getglasswidth() > 1810)) { if (isConfirm == true && D01RequestState == true && D01ResponseState == false) { storageCageService.InsertQueueGlassId((short) 1, form3); } } } } catch (InterruptedException e) { e.printStackTrace(); } boolean dbconnected = false; try { springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -274,24 +274,8 @@ // 手动添加扫码位玻璃 @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 { return storageCageService.InsertQueueGlassId(id, queue); if (id == 1) { // 调用伍存储过程 zhi=spianService.selectAll(queue.getglassId()); if(zhi==200){ homeMapper.InsertQueueGlassId(queue, id); } } map.put("message",zhi); } return Result.success(map); } // 确认扫码位玻璃信息 springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
@@ -216,7 +216,7 @@ Out_slice SelectCurrentFrame(); //根据玻璃id查询任务信息 @Select("select task_type from storage_task where glass_id=#{glassid} and task_state!=2") @Select("select task_type from storage_task where glass_id=#{glassid} and task_state!=1") Short SelectTaskByGlassId(String glassid); //修改格子宽度 springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java
@@ -9,7 +9,9 @@ import org.springframework.stereotype.Service; import com.example.springboot.common.Result; import com.example.springboot.component.Plchome; import com.example.springboot.component.S7control; import com.example.springboot.entity.Queue; import com.example.springboot.entity.StorageCage; import com.example.springboot.entity.StorageTask; import com.example.springboot.mapper.HomeMapper; @@ -36,7 +38,8 @@ List<StorageTask> cageList = homeMapper.SelectTaskByState(types); for (StorageTask storageTask : cageList) { // 判断出片任务位置并清除对应玻璃id if ((storageTask.getGlassId().equals(A01glassid1)|| storageTask.getGlassId().equals(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"); } @@ -89,7 +92,8 @@ // List<StorageCage> storageCages = homeMapper.selectinout(3); // for (StorageCage storageCage : storageCages) { // List<StorageCage> storageCagess = homeMapper.SelectStoragesGlassById(storageCage.getGlassId()); // List<StorageCage> storageCagess = // homeMapper.SelectStoragesGlassById(storageCage.getGlassId()); // for (StorageCage storageCagez : storageCagess) { @@ -175,4 +179,29 @@ return Result.success(map); } public Result InsertQueueGlassId(Short id, Queue queue) { Map<String, Object> map = new HashMap<>(); if (Plchome.FeedState == false) { Plchome.FeedState = true; Short zhi = 200; short result = homeMapper.SelectStorageByGlassId(queue.getglassId()); if (result > 0) { map.put("message", "300"); } else { if (id == 1) { // 调用伍存储过程 zhi = spianService.selectAll(queue.getglassId()); if (zhi == 200) { homeMapper.InsertQueueGlassId(queue, id); } } map.put("message", zhi); } Plchome.FeedState = false; } else { map.put("message", 200); } return Result.success(map); } } springboot-vue3/src/main/resources/JsonFile/PlcSign.json
@@ -1,5 +1,5 @@ { "plcAddressBegin":"DB100.0.0", "plcAddressBegin":"DB102.0.0", "plcAddressLenght":"11", "dataType":"bit", "parameteInfor":[ @@ -8,7 +8,7 @@ "addressIndex":"0" }, { "codeId": "conveyorVelocity(AutoSLOW)", "codeId": "D01.SRinpos", "addressIndex":"1" }, { @@ -40,7 +40,7 @@ "addressIndex":"9" }, { "codeId": "DO1id", "codeId": "D05.SRinpos", "addressIndex":"10" } ]