From cfa9e919f0b4fbcc2e036c67799b2ffc102376d8 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期五, 10 五月 2024 15:58:26 +0800
Subject: [PATCH] 根据客户需求修改主界面权限设置,取消部分按钮,调整部分英文名称,添加铝框显示

---
 CanadaMes-ui/src/views/home/index.vue                                               |  119 ++++++++++++++-----
 springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java    |   26 ++--
 springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java   |   44 ++++++-
 CanadaMes-ui/src/lang/locales/en-US.json                                            |    5 
 springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java         |  102 +++++++++-------
 springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java |    2 
 CanadaMes-ui/src/lang/locales/zh-CN.json                                            |    5 
 7 files changed, 202 insertions(+), 101 deletions(-)

diff --git a/CanadaMes-ui/src/lang/locales/en-US.json b/CanadaMes-ui/src/lang/locales/en-US.json
index 6df853d..459641e 100644
--- a/CanadaMes-ui/src/lang/locales/en-US.json
+++ b/CanadaMes-ui/src/lang/locales/en-US.json
@@ -1,6 +1,7 @@
 {
-  "Confirmation needed":"Confirmation needed",
-  "ip":"192.168.10.21",
+  "Clear":"Clear",
+  "ip":"localhost",
+  "Abort":"Abort",
   "Mes Connection failed":"Mes Connection failed",
   "Plc1 Connection failed":"Plc1 Connection failed",
   "Plc2 Connection failed":"Plc2 Connection failed",
diff --git a/CanadaMes-ui/src/lang/locales/zh-CN.json b/CanadaMes-ui/src/lang/locales/zh-CN.json
index 197fd40..70b5051 100644
--- a/CanadaMes-ui/src/lang/locales/zh-CN.json
+++ b/CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -1,6 +1,7 @@
 {
-  "Confirmation needed":"娓呴櫎",
-  "ip":"192.168.10.21",
+  "Clear":"娓呴櫎",
+  "ip":"localhost",
+  "Abort":"涓",
   "Mes Connection failed":"Mes杩炴帴澶辫触",
   "Plc1 Connection failed":"Plc1杩炴帴澶辫触",
   "Plc2 Connection failed":"Plc2杩炴帴澶辫触",
diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue
index a3b57e4..ee8fe16 100644
--- a/CanadaMes-ui/src/views/home/index.vue
+++ b/CanadaMes-ui/src/views/home/index.vue
@@ -259,13 +259,13 @@
                 <el-button type="primary" @click="showform2()" :disabled="OrderInfo"
                     :class="OrderInfo == true ? 'hide' : ''">{{ $t('Order Info')
                     }}</el-button>
-                <el-button type="primary" @click="showcageinfo(1)" :disabled="OrderInfo"
+                <el-button type="primary" @click="showcageinfo(1)" :disabled="CageDetails"
                     :class="CageDetails == true ? 'hide' : ''">{{ $t('Cage Details')
                     }}</el-button>
                 <el-button type="primary" @click="showform6()" :disabled="OutingQueue"
                     :class="OutingQueue == true ? 'hide' : ''">
                     {{ $t('Outfeed Queue') }}</el-button>
-                <el-button type="primary" @click="TaskStop(0)" :disabled="OutingQueue"
+                <!-- <el-button type="primary" @click="TaskStop(0)" :disabled="OutingQueue"
                     :class="StopTask == true ? 'hide' : ''">
                     {{ $t('Terminate Feeding') }}</el-button>
                 <el-button type="primary" @click="TaskStop(1)" :disabled="StopTask"
@@ -273,7 +273,7 @@
                     {{ $t('Terminate Outing') }}</el-button>
                 <el-button type="primary" @click="SoftEmergencyStop()" :disabled="SoftEmergencyStopState"
                     :class="SoftEmergencyStopState == true ? 'hide' : ''">
-                    {{ $t('SoftEmergencyStop') }}</el-button>
+                    {{ $t('SoftEmergencyStop') }}</el-button> -->
                 <!-- <el-input style="width:15%;" :placeholder="$t('Enter the Order No')" v-model="order"></el-input>
                 <el-button type="warning" @click="showform1();">{{ $t('Exit the glass by order number') }}</el-button> -->
             </div>
@@ -295,7 +295,7 @@
                             {{ scope.row.glasswidthmm }}*{{ scope.row.glassheightmm }}
                         </template>
                     </el-table-column>
-                    <el-table-column :label="$t('Task Complete')">
+                    <el-table-column :label="$t('Abort')">
                         <template slot-scope='scope'>
                             <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                                 @click="endtask(1, scope.row.glassId, scope.row.cell)">{{ $t('Task Complete')
@@ -321,7 +321,7 @@
                         </template>
                     </el-table-column>
 
-                    <el-table-column :label="$t('Task Complete')">
+                    <el-table-column :label="$t('Abort')">
                         <template slot-scope='scope'>
                             <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                                 @click="endtask(0, scope.row.glassId, scope.row.cell)">{{ $t('Task Complete')
@@ -416,66 +416,66 @@
                 <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('Confirmation needed') }}</el-button>
+                        {{ $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.3', 1)">
-                        {{ $t('Confirmation needed') }}</el-button>
+                        {{ $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('Confirmation needed') }}</el-button>
+                        {{ $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('Confirmation needed') }}</el-button>
+                        {{ $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('Confirmation needed') }}</el-button>
+                        {{ $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('Confirmation needed') }}</el-button>
+                        {{ $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('Confirmation needed') }}</el-button>
+                        {{ $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('Confirmation needed') }}</el-button>
+                        {{ $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('Confirmation needed') }}</el-button>
+                        {{ $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('Confirmation needed') }}</el-button>
+                        {{ $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('Confirmation needed') }}</el-button>
+                        {{ $t('Clear') }}</el-button>
                 </div>
 
 
@@ -598,16 +598,20 @@
                 <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"
+                            :disabled="(scope.row.state == 1&&loadname=='admin') ? 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;"
-                            :disabled="scope.row.state == 1 ? false : true"
+                            :disabled="(scope.row.state == 1&&(loadname=='admin'||loadname=='Transfer')) ? false : true"
                             @click="outglass(scope.row.glassId, scope.row.state)">{{ $t('Outfeed') }}</el-button>
+
                         <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
+                            :disabled="(loadname=='admin') ? false : true"
                             @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"
+                            :disabled="(scope.row.glassId == null&&loadname=='admin') ? false : true"
                             @click="insertglass(scope.row.cage, scope.row.cell, scope.row.tier)">{{ $t('Add')
                             }}</el-button>
                     </template>
@@ -832,9 +836,12 @@
                 <div style="width:30%;" v-for="(item) in CurrentFrame" :key="item['barcode']">
                     <el-button style="margin-left: 42%;" type="primary" @click="FrameStateUpdate(item['barcode'])">{{
                 $t('Next') }}</el-button>
-                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Current Frame') }}:{{ item['barcode'] }}</h1>
+                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Current Frame') }}:</h1>
+                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Barcode') }}:{{ item['barcode'] }}</h1>
+                    <h1 style="font-size: 40px;text-align: center;">{{ $t('List No') }}:{{ item['listId'] }}</h1>
+                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Box No') }}:{{ item['boxId'] }}</h1>
                     <h1 style="font-size: 30px;text-align: center;">
-                        {{ item['flip'] == true ? $t('EXTERIQR OUT AND BYPASS TO THE LEFT')
+                        {{ item['flip'] == 1 ? $t('EXTERIQR OUT AND BYPASS TO THE LEFT')
                 : $t('EXTERIQR OUT AND BYPASS TO THE RIGHT') }}
                     </h1>
                     <h1 style="font-size: 30px;text-align: center;">{{ item['framewidthmm'] }}*{{ item['frameheightmm']
@@ -853,11 +860,12 @@
 
         <el-dialog :visible.sync="dialogFormVisible7" :title="$t('Glass information corresponding to aluminum frame')"
             top="5vh">
+            
             <el-input style="width:15%;" :placeholder="$t('Enter the Frame No')" v-model="framebarcode"></el-input>
             <el-button type="primary" @click="showform7()">{{ $t('Query') }}</el-button>
-            <el-button type="primary" @click="AddOutSliceS()">{{ $t('Outfeed') }}</el-button>
+            <el-button type="primary" @click="AddOutSliceS()" :disabled="framestate">{{ $t('Outfeed') }}</el-button>
             <el-button type="primary" @click="CloseForm7()">{{ $t('Cancel') }}</el-button>
-            <el-table :data="this.AluminumFrame" :height="700" border style="width: 100%;overflow: auto;">
+            <el-table :data="this.AluminumFrame" :height="200" border style="width: 100%;overflow: auto;">
                 <el-table-column prop="frameBarcode" :label="$t('Frame No')"></el-table-column>
                 <el-table-column prop="barcode" :label="$t('Barcode')"></el-table-column>
                 <el-table-column prop="ordernumber" :label="$t('Order No')"></el-table-column>
@@ -868,7 +876,9 @@
                 <el-table-column prop="storageCage.cage" :label="$t('Cage No')"></el-table-column>
                 <el-table-column prop="storageCage.cell" :label="$t('Slot No')">
                     <template slot-scope='scope'>
-                        {{ (scope.row.cage - 1) * 21 + scope.row.cell }}
+                        {{
+                scope.row.storageCage == null ? "" : (scope.row.storageCage.cage-1)*21+scope.row.storageCage.cell
+            }}
                     </template>
                 </el-table-column>
                 <el-table-column prop="storageCage.tier" :label="$t('The Side')">
@@ -892,6 +902,27 @@
                     </template>
                 </el-table-column>
             </el-table>
+            <div style="width:30%;" v-for="(item) in AluminumFrameInfo" :key="item['barcode']">
+                    <!-- <el-button style="margin-left: 42%;" type="primary" @click="FrameStateUpdate(item['barcode'])">{{
+                $t('Next') }}</el-button> -->
+                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Current Frame') }}:</h1>
+                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Barcode') }}:{{ item['barcode'] }}</h1>
+                    <h1 style="font-size: 40px;text-align: center;">{{ $t('List No') }}:{{ item['listnumber'] }}</h1>
+                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Box No') }}:{{ item['boxnumber'] }}</h1>
+                    <h1 style="font-size: 30px;text-align: center;">
+                        {{ item['flip'] == 1 ? $t('EXTERIQR OUT AND BYPASS TO THE LEFT')
+                : $t('EXTERIQR OUT AND BYPASS TO THE RIGHT') }}
+                    </h1>
+                    <h1 style="font-size: 30px;text-align: center;">{{ item['framelength'] }}*{{ item['frameheight']
+                        }}
+                    </h1>
+
+                    <div class="frame" :style="'background-color: '+ framecolor +';margin-top:30px;margin:0 auto;width: ' +
+                FrameWidthHeight('before', item['framelengthmm'], item['frameheightmm'], item['flip']) + 'px;height:' +
+                FrameWidthHeight('after', item['framelengthmm'], item['frameheightmm'], item['flip']) + 'px;'
+                ">
+                    </div>
+                </div>
         </el-dialog>
         <el-dialog :visible.sync="dialogFormCountDown" :title="$t('Approximately resettable time')" top="5vh">
             <div :style="'font-size: ' + PromptSize + 'px;text-align: center;'">
@@ -1016,7 +1047,10 @@
             form6state:0,
             StateColor:"green",
             plc1:"",
-            plc2:""
+            plc2:"",
+            AluminumFrameInfo:{},
+            framestate:false,
+            framecolor:"green"
         };
     },
     created() {
@@ -1026,7 +1060,6 @@
                 this.count1=this.count2;
             }else{
                 const now = new Date();
-                console.log(this.count1,this.count2);
                 console.log(this.$t('Mes Connection failed')+now);
             }
         }, 60000);
@@ -1118,6 +1151,28 @@
                         if (this.dialogFormVisible6 == true) {
                             this.dialogFormVisible7 = true;
                         }
+                    }
+                    if (obj.AluminumFrameInfo != null) {
+                        this.AluminumFrameInfo = obj.AluminumFrameInfo;
+                        if(this.AluminumFrameInfo[0].frameheightmm>this.AluminumFrameInfo[0].framelengthmm){
+                            if(this.AluminumFrameInfo[0].frameheightmm<600||this.AluminumFrameInfo[0].framelengthmm<400){
+                                this.framestate=true;
+                                this.framecolor="red";
+                            }else{
+                                this.framestate=false;
+                                this.framecolor="green";
+                            }
+                        }else{
+                            if(this.AluminumFrameInfo[0].frameheightmm<400||this.AluminumFrameInfo[0].framelengthmm<600){
+                                this.framestate=true;
+                                this.framecolor="red";
+                            }else{
+                                this.framestate=false;
+                                this.framecolor="green";
+                            }
+                        }
+                    }else{
+                        this.AluminumFrameInfo={};
                     }
 
                     //鏍规嵁杩涚墖鐘舵�佸嚭鍙戣繘鐗囦换鍔�
@@ -1377,7 +1432,7 @@
                     height = this.form.glasswidth;
                     width = this.form.glassheight;
                 }
-                if (height < 380 || width < 380 || height > 1810 || width > 2760) {
+                if (height < 225 || width < 380 || height > 1810 || width > 2760) {
                     this.$message.error(this.$t('The glass size is not within the range'));
                 } else {
                     if (this.zhuangtai == true) {
@@ -1440,8 +1495,9 @@
         WriteGlassID() {
             if (this.glassid1.length == 14) {
                 WriteGlassID(this.glassid1).then(res => {
-                    console.log(res.data);
-                    this.$message.success(this.$t('Successful operation'));
+                    if (res.data.message == 200) {
+                        this.$message.success(this.$t('Successful operation'));
+                    }
                 });
             } else {
                 this.$message.error(this.$t('Please enter the correct glassID'));
@@ -1812,7 +1868,9 @@
                 CloseForm7().then(res => {
                     if (res.data.message == 200) {
                         this.AluminumFrame = null;
+                        this.AluminumFrameInfo = null;
                         this.dialogFormVisible7 = false;
+                        this.framebarcode="";
                         this.$message.success(this.$t('Operation successful'));
                     }
                 });
@@ -2011,7 +2069,6 @@
         },
         //鍒ゆ柇鐜荤拑鏄惁瓒呭嚭鑼冨洿
         Sizerange(Glass, position) {
-            console.log(position);
             if (this.ManuallyInfeedGlass == false) {
                 let width = 0;
                 let height = 0;
@@ -2022,7 +2079,7 @@
                     height = Glass.glasswidth;
                     width = Glass.glassheight;
                 }
-                if (height < 380 || width < 380 || height > 1810 || width > 2760) {
+                if (height < 225 || width < 380 || height > 1810 || width > 2760) {
                     this.$alert(this.$t('The glass size is not within the range'), this.$t('confirm'), {
                         confirmButtonText: this.$t('Yes'),
                         type: 'info',
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
index ffe97fa..d590b52 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -15,6 +15,7 @@
 import com.example.springboot.entity.Queue;
 import com.example.springboot.entity.StorageCage;
 import com.example.springboot.entity.alarmmg;
+import com.example.springboot.entity.north_frame_buffer1_frames;
 import com.example.springboot.entity.north_glass_buffer1;
 import com.example.springboot.mapper.HomeMapper;
 import com.example.springboot.mapper.SpianMapper;
@@ -40,6 +41,8 @@
     public static Boolean isConfirm = true;
     // 寰呯‘璁ょ殑鍑虹墖闃熷垪
     public static List<north_glass_buffer1> AluminumFrame;
+    // 寰呯‘璁ょ殑閾濇淇℃伅
+    public static north_frame_buffer1_frames AluminumFrameInfo=new north_frame_buffer1_frames();
 
     // private Configuration config;
 
@@ -173,52 +176,52 @@
                     // E02鐜荤拑id
                     // log.info("frame1"+S7controlLK.getinstance().CheckConnected());
                     String E02id="";
-                    try {
-                        E02id= S7controlLK.getinstance().readStrings("DB17.40");
-                        plc2=true;
-                    } catch (Exception e) {
-                        // TODO: handle exception
-                        plc2=false;
-                        e.printStackTrace();
-                    }
+                    // try {
+                    //     E02id= S7controlLK.getinstance().readStrings("DB17.40");
+                    //     plc2=true;
+                    // } catch (Exception e) {
+                    //     // TODO: handle exception
+                    //     plc2=false;
+                    //     e.printStackTrace();
+                    // }
                     
-                    jsonObject.append("Plc2", plc2);
-                    // log.info("閾濇绾胯鍙�2"+S7controlLK.getinstance().CheckConnected());
+                    // jsonObject.append("Plc2", plc2);
+                    // // log.info("閾濇绾胯鍙�2"+S7controlLK.getinstance().CheckConnected());
                     
-                    // log.info("E02id"+E02id);
-                    outSliceServive.FrameStateUpdate(E02id);
-                    if (CurrentFrame != null) {
-                        S7controlLK.getinstance().writeStrings(CurrentFrame.getBarCode(), "DB17.0");
-                    }
-                    String J01id = S7controlLK.getinstance().readStrings("DB17.22");
-                    List<Short> liststate = S7controlLK.getinstance().ReadWord("DB17.20", 1);
-                    Short framerequest = liststate.get(0);
-                    // log.info("liststate:" + liststate);
-                    if (framerequest == 1) {
-                        // 閾濇id
-                        String position;
-                        try {
-                            position = dbserve.SelectPositionByFrameBarcode(J01id);
-                        } catch (SQLException e) {
-                            // TODO Auto-generated catch block
-                            position = "0";
-                            e.printStackTrace();
-                        }
-                        Short send;
-                        if (position.equals("1")) {
-                            send = 1;
-                        } else {
-                            send = 2;
-                        }
-                        if (J01id != null) {
-                            int barcodeState = spianMapper.SelectOverState(J01id);// 鑾峰彇璇ラ摑妗嗙殑鐘舵��
-                            if (barcodeState == 0) {// 褰撹閾濇鎵�鏈夌殑鐜荤拑閮芥槸瀹屾垚鐘舵�佹椂鍒犻櫎鍦ㄥ嚭鐗囬槦鍒楃殑鏁版嵁
-                                spianMapper.DeleteQueue(J01id);
-                                // log.info("deleteoutslice:" + J01id);
-                            }
-                        }
-                        S7controlLK.getinstance().WriteWord("DB17.38", (short) send);
-                    }
+                    // // log.info("E02id"+E02id);
+                    // outSliceServive.FrameStateUpdate(E02id);
+                    // if (CurrentFrame != null) {
+                    //     S7controlLK.getinstance().writeStrings(CurrentFrame.getBarCode(), "DB17.0");
+                    // }
+                    // String J01id = S7controlLK.getinstance().readStrings("DB17.22");
+                    // List<Short> liststate = S7controlLK.getinstance().ReadWord("DB17.20", 1);
+                    // Short framerequest = liststate.get(0);
+                    // // log.info("liststate:" + liststate);
+                    // if (framerequest == 1) {
+                    //     // 閾濇id
+                    //     String position;
+                    //     try {
+                    //         position = dbserve.SelectPositionByFrameBarcode(J01id);
+                    //     } catch (SQLException e) {
+                    //         // TODO Auto-generated catch block
+                    //         position = "0";
+                    //         e.printStackTrace();
+                    //     }
+                    //     Short send;
+                    //     if (position.equals("1")) {
+                    //         send = 1;
+                    //     } else {
+                    //         send = 2;
+                    //     }
+                    //     if (J01id != null) {
+                    //         int barcodeState = spianMapper.SelectOverState(J01id);// 鑾峰彇璇ラ摑妗嗙殑鐘舵��
+                    //         if (barcodeState == 0) {// 褰撹閾濇鎵�鏈夌殑鐜荤拑閮芥槸瀹屾垚鐘舵�佹椂鍒犻櫎鍦ㄥ嚭鐗囬槦鍒楃殑鏁版嵁
+                    //             spianMapper.DeleteQueue(J01id);
+                    //             // log.info("deleteoutslice:" + J01id);
+                    //         }
+                    //     }
+                    //     S7controlLK.getinstance().WriteWord("DB17.38", (short) send);
+                    // }
 
                     String E01id = S7controlLK.getinstance().readStrings("DB17.0");
                     // log.info("frameno:" + E01id);
@@ -330,15 +333,14 @@
                                 north_Glass_Buffer1Service.AddOutSliceS(Plchome.FrameNo);
                             } else {
                                 Plchome.AluminumFrame = north_glass_buffer1s;
+                                Plchome.AluminumFrameInfo=dbserve.SelectFrameBarcode(Plchome.FrameNo);
                             }
                         } catch (SQLException e) {
                             // TODO Auto-generated catch block
                             e.printStackTrace();
                         }
                     }
-                    if (AluminumFrame != null) {
-                        jsonObject.append("AluminumFrame", AluminumFrame);
-                    }
+                    
 
                     // 澶嶄綅鍊掕鏃�
                     // 鍦板潃104.9.6
@@ -391,6 +393,12 @@
                     plc1=false;
                     log.info("Plc1" + S7controlLK.getinstance().CheckConnected());
                 }
+                if (AluminumFrame != null) {
+                    jsonObject.append("AluminumFrame", AluminumFrame);
+                }
+                if (AluminumFrameInfo.getbarcode() != null) {
+                    jsonObject.append("AluminumFrameInfo", AluminumFrameInfo);
+                }
                 jsonObject.append("zhi", zhi);
                 jsonObject.append("Plc1", plc1);
                 // jsonObject.append("params", new short[] { 30, 40, });
diff --git a/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java b/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
index d5980ad..91669b8 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
@@ -17,20 +17,20 @@
         //
         System.out.println("鍚姩瀹屾垚");
 
-        new PlcHold().start();
+        // new PlcHold().start();
         new Plchome().start();
-        new PlcLayout().start();
-         new Plcalarm().start();
-         new Plcsign().start();
-         new Plcstate().start();
-         new PlcPositioning1().start();
-         new PlcParameter2().start();
-         new PLCAutomaticParameterSetting().start();
-         new PlcManualonePosition().start();
-         new PlcManualonePosition2().start();
-         new PlcServoManualone().start();
-         new PLCManualJog().start();
-         new PlcInteractionState().start();
+        // new PlcLayout().start();
+        //  new Plcalarm().start();
+        //  new Plcsign().start();
+        //  new Plcstate().start();
+        //  new PlcPositioning1().start();
+        //  new PlcParameter2().start();
+        //  new PLCAutomaticParameterSetting().start();
+        //  new PlcManualonePosition().start();
+        //  new PlcManualonePosition2().start();
+        //  new PlcServoManualone().start();
+        //  new PLCManualJog().start();
+        //  new PlcInteractionState().start();
          
     }
 }
\ No newline at end of file
diff --git a/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java b/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
index 6b21734..3b08bdb 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -311,6 +311,7 @@
   public Result SelectAluminumFrameInfoById(String FrameBarcode) throws SQLException {
     String flip = jdbcConnections.SelectFlipByFrameBarcode(FrameBarcode);
     List<north_glass_buffer1> AluminumFrame = north_Glass_Buffer1Service.SelectAluminumFrameInfoById(FrameBarcode);
+    Plchome.AluminumFrameInfo=jdbcConnections.SelectFrameBarcode(FrameBarcode);
     Map<String, Object> map = new HashMap<>();
     map.put("AluminumFrame", AluminumFrame);
     map.put("flip", flip);
@@ -405,6 +406,7 @@
   @PostMapping("/CloseForm7")
   public Result CloseForm7() {
     Plchome.AluminumFrame = null;
+    Plchome.AluminumFrameInfo = null;
     Map<String, Object> map = new HashMap<>();
     map.put("message", "200");
     return Result.success(map);
diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java b/springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java
index 4da549e..1d984a4 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java
@@ -11,7 +11,9 @@
 import org.springframework.stereotype.Component;
 
 import com.example.springboot.entity.Queue;
+import com.example.springboot.entity.north_frame_buffer1_frames;
 import com.example.springboot.entity.north_glass_buffer1;
+import com.example.springboot.service.North_Glass_Buffer1Service.north_glass_buffer1Comparator;
 
 @Component
 public class JdbcConnections {
@@ -414,6 +416,36 @@
 
 	}
 
+	// 鏍规嵁閾濇id鏌ヨ閾濇淇℃伅
+	public north_frame_buffer1_frames SelectFrameBarcode(String frameBarcode) throws SQLException {
+		try {
+			Connection conn = getConn();
+			north_frame_buffer1_frames frame=new north_frame_buffer1_frames();
+			String sql1 = "select * from north_glass_buffer1_frames where Barcode=? limit 1";
+			ps = conn.prepareStatement(sql1);
+			ps.setString(1, frameBarcode);
+			ResultSet rs = ps.executeQuery();
+			while (rs.next()) {
+				frame.setId(rs.getInt("id"));
+				frame.setlistnumber(rs.getString("listnumber"));
+				frame.setordernumber(rs.getString("ordernumber"));
+				frame.setboxnumber(rs.getString("boxnumber"));
+				frame.setbarcode(rs.getString("barcode"));
+				frame.setframelength(rs.getDouble("framelength"));
+				frame.setframeheight(rs.getDouble("frameheight"));
+				frame.setframelengthmm(rs.getDouble("framelength_mm"));
+				frame.setframeheightmm(rs.getDouble("frameheight_mm"));
+				frame.setflip(rs.getInt("flip"));
+			}
+			conn.close();
+			return frame;
+		} catch (Exception e) {
+			// TODO: handle exception
+			e.printStackTrace();
+			return null;
+		}
+	}
+
 	/**
 	 * 1. 鍔犺浇椹卞姩
 	 * 2. 鑾峰彇杩炴帴 conn
@@ -434,12 +466,12 @@
 	public static Connection getConn() throws SQLException {
 		try {
 			Connection conn = null;
-			// conn =
-			// DriverManager.getConnection("jdbc:mysql://localhost:3306/canadames?serverTimezone=GMT%2B8&characterEncoding=utf-8",
-			// "root", "beibo.123/");
-			conn = DriverManager.getConnection(
-					"jdbc:mysql://192.168.102.9:3306/production?serverTimezone=GMT%2B8&characterEncoding=utf-8&useSSL=false",
-					"northglass", "n0rthgla55");
+			conn =
+			DriverManager.getConnection("jdbc:mysql://localhost:3306/test?serverTimezone=GMT%2B8&characterEncoding=utf-8",
+			"root", "beibo.123/");
+			// conn = DriverManager.getConnection(
+			// 		"jdbc:mysql://192.168.102.9:3306/production?serverTimezone=GMT%2B8&characterEncoding=utf-8&useSSL=false",
+			// 		"northglass", "n0rthgla55");
 			return conn;
 		} catch (Exception e) {
 			// TODO: handle exception

--
Gitblit v1.8.0