wangxichen hace 2 semanas
padre
commit
0b8fa9bb03

+ 1 - 37
src/com/mes/component/WorkJPanelOP10.java

@@ -30,7 +30,7 @@ public class WorkJPanelOP10 extends JPanel {
 
     public static final Logger log =  LoggerFactory.getLogger(WorkJPanelOP10.class);
 
-    public String oprno = "OP010";
+    public String oprno = "OP035";
 
     public String pos = "A";
 
@@ -435,24 +435,6 @@ public class WorkJPanelOP10 extends JPanel {
         }
     }
 
-    // 读取上料到中转车
-    public boolean readFeedingToTransfer(){
-        if(isLocal == 1){
-            return true;
-        }else{
-            return readBoolean(plcDb+".1.0");
-        }
-    }
-
-    // 读取中转车上料到设备
-    public boolean readFeedingTransferToDevice(){
-        if(isLocal == 1){
-            return true;
-        }else{
-            return readBoolean(plcDb+".1.1");
-        }
-    }
-
     // 读取下料信号
     public boolean readBlanking(){
         if(isLocal == 1){
@@ -531,24 +513,6 @@ public class WorkJPanelOP10 extends JPanel {
         }
     }
 
-    // 读取中转车号
-    public int readTransferNo(){
-        if(isLocal == 1){
-            return 1;
-        }else{
-            return s7PLC.readInt16(plcDb+".2.0");
-        }
-    }
-
-    // 读取中转车层数
-    public int readTransferFloor(){
-        if(isLocal == 1){
-            return 1;
-        }else{
-            return s7PLC.readInt16(plcDb+".4.0");
-        }
-    }
-
     public boolean readBoolean(String db){
         boolean permit;
         try {

+ 1 - 64
src/com/mes/component/WorkJPanelOP20.java

@@ -32,7 +32,7 @@ public class WorkJPanelOP20 extends JPanel {
 
     public static final Logger log =  LoggerFactory.getLogger(WorkJPanelOP20.class);
 
-    public String oprno = "OP020";
+    public String oprno = "OP040";
 
     public String pos = "A";
 
@@ -52,10 +52,6 @@ public class WorkJPanelOP20 extends JPanel {
 
     public JLabel feedingtodevicelabel; // 上料到设备
 
-    public JLabel feedingtotransferlabel; // 上料到中转车
-
-    public JLabel transfertodevicelabel; // 上料到中转车
-
     public JButton scanBtn;
 
     public JTextField productSn;
@@ -100,8 +96,6 @@ public class WorkJPanelOP20 extends JPanel {
     public Integer tjFlag = 0; // 1=可加工 2=设备运行中 3=加工结束
     public Integer tjStatus = 0; // 提交标识
     public Boolean toDevice = false;
-    public Boolean toTransfer = false;
-    public Boolean transferToDevice = false;
 
     public Boolean plcHeart = false;
 
@@ -357,15 +351,6 @@ public class WorkJPanelOP20 extends JPanel {
             }
         });
 
-        transfertodevicelabel = new JLabel("中转车上料到设备");
-        transfertodevicelabel.setHorizontalAlignment(SwingConstants.LEFT);
-        transfertodevicelabel.setIcon(imageGreen);
-        transfertodevicelabel.setForeground(Color.BLACK);
-//        transfertodevicelabel.setBounds(workWidth/3, 230, workWidth/3, 30);
-        transfertodevicelabel.setBounds(workWidth*2/3, 190, workWidth/3, 30);
-        this.add(transfertodevicelabel);
-
-
         // 信号监控按钮
         signalMonitor = new PlcSignalMonitor(s7PLC, plcDb, oprno + pos, MesClient.mesClientFrame);
         signalBtn = signalMonitor.createSignalButton();
@@ -524,9 +509,6 @@ public class WorkJPanelOP20 extends JPanel {
                         Boolean retFeeding = readBoolean(plcDb+".0.0");
                         feedinglabel.setIcon(retFeeding?imageGreen:imageGray);
 
-                        transferToDevice = readBoolean(plcDb+".1.1");
-                        transfertodevicelabel.setIcon(transferToDevice?imageGreen:imageGray);
-
                         Boolean retFeedingAllow = readBoolean(plcDb+".0.4");
                         feedingmeslabel.setIcon(retFeedingAllow?imageGreen:imageGray);
 
@@ -540,15 +522,6 @@ public class WorkJPanelOP20 extends JPanel {
                         Boolean retAllowBlanking = readBoolean(plcDb+".0.5");
                         blankingmeslabel.setIcon(retAllowBlanking?imageGreen:imageGray);
 
-//                        toDevice = readFeedingToDevice();
-//                        feedingtodevicelabel.setIcon(toDevice?imageGreen:imageGray);
-
-//                        toTransfer = readFeedingToTransfer();
-//                        feedingtotransferlabel.setIcon(toTransfer?imageGreen:imageGray);
-
-                        transferToDevice = readBoolean(plcDb+".1.1");
-                        transfertodevicelabel.setIcon(transferToDevice?imageGreen:imageGray);
-
                         Boolean retRunning = readBoolean(plcDb+".0.2");
                         runlabel.setIcon(retRunning?imageGreen:imageGray);
 
@@ -766,24 +739,6 @@ public class WorkJPanelOP20 extends JPanel {
         }
     }
 
-    // 读取上料到中转车
-    public boolean readFeedingToTransfer(){
-        if(isLocal == 1){
-            return true;
-        }else{
-            return readBoolean(plcDb+".1.0");
-        }
-    }
-
-    // 读取中转车上料到设备
-    public boolean readFeedingTransferToDevice(){
-        if(isLocal == 1){
-            return true;
-        }else{
-            return readBoolean(plcDb+".1.1");
-        }
-    }
-
     // 读取下料信号
     public boolean readBlanking(){
         if(isLocal == 1){
@@ -847,24 +802,6 @@ public class WorkJPanelOP20 extends JPanel {
         }
     }
 
-    // 读取中转车号
-    public int readTransferNo(){
-        if(isLocal == 1){
-            return 1;
-        }else{
-            return s7PLC.readInt16(plcDb+".2.0");
-        }
-    }
-
-    // 读取中转车层数
-    public int readTransferFloor(){
-        if(isLocal == 1){
-            return 1;
-        }else{
-            return s7PLC.readInt16(plcDb+".4.0");
-        }
-    }
-
     // 控制扫码枪读取二维码
     public String readQrcode(){
 //        String sn = "5001040043561010006";

+ 2 - 2
src/com/mes/component/WorkJPanelOP25.java

@@ -19,7 +19,7 @@ public class WorkJPanelOP25 extends JPanel {
 
     public static final Logger log =  LoggerFactory.getLogger(WorkJPanelOP25.class);
 
-    public String oprno = "OP025";
+    public String oprno = "OP045";
 
     public String pos = "A";
 
@@ -272,7 +272,7 @@ public class WorkJPanelOP25 extends JPanel {
         qrcodeBtn = new JButton("二维码");
         qrcodeBtn.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
-                MesClient.createQRCode(productSn.getText(),"OP025");
+                MesClient.createQRCode(productSn.getText(),"OP045");
             }
         });
         qrcodeBtn.setIcon(new ImageIcon(MesClient.class.getResource("/bg/reset_logo.png")));

+ 1 - 66
src/com/mes/component/WorkJPanelOP30.java

@@ -33,7 +33,7 @@ public class WorkJPanelOP30 extends JPanel {
 
     public static final Logger log =  LoggerFactory.getLogger(WorkJPanelOP30.class);
 
-    public String oprno = "OP030";
+    public String oprno = "OP050";
 
     public String pos = "A";
 
@@ -53,10 +53,6 @@ public class WorkJPanelOP30 extends JPanel {
 
     public JLabel feedingtodevicelabel; // 上料到设备
 
-    public JLabel feedingtotransferlabel; // 上料到中转车
-
-    public JLabel transfertodevicelabel; // 上料到中转车
-
     public JButton scanBtn;
 
     public JTextField productSn;
@@ -101,8 +97,6 @@ public class WorkJPanelOP30 extends JPanel {
     public Integer tjFlag = 0; // 1=可加工 2=设备运行中 3=加工结束
     public Integer tjStatus = 0; // 提交标识
     public Boolean toDevice = false;
-    public Boolean toTransfer = false;
-    public Boolean transferToDevice = false;
 
     public Boolean plcHeart = false;
 
@@ -348,17 +342,6 @@ public class WorkJPanelOP30 extends JPanel {
             }
         });
 
-        transfertodevicelabel = new JLabel("中转车上料到设备");
-        transfertodevicelabel.setHorizontalAlignment(SwingConstants.LEFT);
-        transfertodevicelabel.setIcon(imageGreen);
-        transfertodevicelabel.setForeground(Color.BLACK);
-//        transfertodevicelabel.setBounds(workWidth/3, 230, workWidth/3, 30);
-        transfertodevicelabel.setBounds(workWidth*2/3, 190, workWidth/3, 30);
-        this.add(transfertodevicelabel);
-
-
-
-
         startOprnoTimer();
         heartData();
 
@@ -510,9 +493,6 @@ public class WorkJPanelOP30 extends JPanel {
                         Boolean retFeeding = readFeeding();
                         feedinglabel.setIcon(retFeeding?imageGreen:imageGray);
 
-                        transferToDevice = readFeedingTransferToDevice();
-                        transfertodevicelabel.setIcon(transferToDevice?imageGreen:imageGray);
-
                         Boolean retFeedingAllow = readAllowFeeding();
                         feedingmeslabel.setIcon(retFeedingAllow?imageGreen:imageGray);
 
@@ -526,15 +506,6 @@ public class WorkJPanelOP30 extends JPanel {
                         Boolean retAllowBlanking = readAllowBlanking();
                         blankingmeslabel.setIcon(retAllowBlanking?imageGreen:imageGray);
 
-//                        toDevice = readFeedingToDevice();
-//                        feedingtodevicelabel.setIcon(toDevice?imageGreen:imageGray);
-//
-//                        toTransfer = readFeedingToTransfer();
-//                        feedingtotransferlabel.setIcon(toTransfer?imageGreen:imageGray);
-
-                        transferToDevice = readFeedingTransferToDevice();
-                        transfertodevicelabel.setIcon(transferToDevice?imageGreen:imageGray);
-
                         Boolean retRunning = readRunning();
                         runlabel.setIcon(retRunning?imageGreen:imageGray);
 
@@ -737,24 +708,6 @@ public class WorkJPanelOP30 extends JPanel {
         }
     }
 
-    // 读取上料到中转车
-    public boolean readFeedingToTransfer(){
-        if(isLocal == 1){
-            return true;
-        }else{
-            return readBoolean(plcDb+".1.0");
-        }
-    }
-
-    // 读取中转车上料到设备
-    public boolean readFeedingTransferToDevice(){
-        if(isLocal == 1){
-            return true;
-        }else{
-            return readBoolean(plcDb+".1.1");
-        }
-    }
-
     // 读取下料信号
     public boolean readBlanking(){
         if(isLocal == 1){
@@ -818,24 +771,6 @@ public class WorkJPanelOP30 extends JPanel {
         }
     }
 
-    // 读取中转车号
-    public int readTransferNo(){
-        if(isLocal == 1){
-            return 1;
-        }else{
-            return s7PLC.readInt16(plcDb+".2.0");
-        }
-    }
-
-    // 读取中转车层数
-    public int readTransferFloor(){
-        if(isLocal == 1){
-            return 1;
-        }else{
-            return s7PLC.readInt16(plcDb+".4.0");
-        }
-    }
-
     // 控制扫码枪读取二维码
     public String readQrcode(){
 //        String sn = "5001040043561010006";

+ 13 - 114
src/com/mes/component/WorkJPanelScan.java

@@ -1,11 +1,9 @@
 package com.mes.component;
 
 import com.alibaba.fastjson2.JSON;
-import com.alibaba.fastjson2.JSONObject;
 import com.github.xingshuangs.iot.protocol.s7.enums.EPlcType;
 import com.github.xingshuangs.iot.protocol.s7.service.S7PLC;
 import com.mes.ui.CacheData;
-import com.mes.ui.DataUtil;
 import com.mes.ui.MesClient;
 import com.mes.util.JdbcUtils;
 import org.slf4j.Logger;
@@ -24,7 +22,7 @@ public class WorkJPanelScan extends JPanel {
 
     public static final Logger log =  LoggerFactory.getLogger(WorkJPanelScan.class);
 
-    public String oprno = "OP020";
+    public String oprno = "OP040";
 
     public String pos = "A";
 
@@ -44,10 +42,6 @@ public class WorkJPanelScan extends JPanel {
 
     public JLabel feedingtodevicelabel; // 上料到设备
 
-    public JLabel feedingtotransferlabel; // 上料到中转车
-
-    public JLabel transfertodevicelabel; // 上料到中转车
-
     public JButton scanBtn;
 
     public JTextField productSn;
@@ -78,8 +72,6 @@ public class WorkJPanelScan extends JPanel {
     public Integer tjFlag = 0; // 1=可加工 2=设备运行中 3=加工结束
     public Integer tjStatus = 0; // 提交标识
     public Boolean toDevice = false;
-    public Boolean toTransfer = false;
-    public Boolean transferToDevice = false;
 
     public Boolean plcHeart = false;
 
@@ -87,9 +79,6 @@ public class WorkJPanelScan extends JPanel {
 
     public Integer isScan = 1; // 1=西侧 2=东测
 
-    public int transferSn = 0;
-    public int transferFloor = 0;
-
     public JButton signalBtn; // 信号监控按钮
     public PlcSignalMonitor signalMonitor; // 信号监控组件
 
@@ -103,10 +92,10 @@ public class WorkJPanelScan extends JPanel {
         this.lineSn = MesClient.mes_line_sn;
 
         if(position.equals("A")){
-            oprno = "OP020";
+            oprno = "OP040";
             plcDb = "DB7003";
         }else{
-            oprno = "OP030";
+            oprno = "OP050";
             plcDb = "DB7013";
         }
 
@@ -216,27 +205,6 @@ public class WorkJPanelScan extends JPanel {
         });
         this.add(feedingmeslabel);
 
-        transfertodevicelabel = new JLabel("中转车上料到设备");
-        transfertodevicelabel.setHorizontalAlignment(SwingConstants.LEFT);
-        transfertodevicelabel.setIcon(imageGreen);
-        transfertodevicelabel.setForeground(Color.BLACK);
-        transfertodevicelabel.setBounds(workWidth*2/3, 150, workWidth/3, 30);
-        this.add(transfertodevicelabel);
-
-        blankinglabel = new JLabel("中转车号");
-        blankinglabel.setHorizontalAlignment(SwingConstants.LEFT);
-        blankinglabel.setIcon(imageGreen);
-        blankinglabel.setForeground(Color.BLACK);
-        blankinglabel.setBounds(0, 190, workWidth/3, 30);
-        this.add(blankinglabel);
-
-        blankingmeslabel = new JLabel("放置层数");
-        blankingmeslabel.setHorizontalAlignment(SwingConstants.LEFT);
-        blankingmeslabel.setIcon(imageGreen);
-        blankingmeslabel.setForeground(Color.BLACK);
-        blankingmeslabel.setBounds(workWidth/3, 190, workWidth/3, 30);
-        this.add(blankingmeslabel);
-
         startOprnoTimer();
 //        resetScanA();
 
@@ -309,34 +277,9 @@ public class WorkJPanelScan extends JPanel {
                         Boolean retFeeding = readScanFeeding();
                         feedinglabel.setIcon(retFeeding?imageGreen:imageGray);
 
-                        transferToDevice = readFeedingTransferToDevice();
-                        transfertodevicelabel.setIcon(transferToDevice?imageGreen:imageGray);
-
                         Boolean retFeedingAllow = readScanFinish();
                         feedingmeslabel.setIcon(retFeedingAllow?imageGreen:imageGray);
 
-                        if(transferSn == 0){
-                            transferSn = readTransferNo();
-                        }
-                        if(transferFloor == 0){
-                            transferFloor = readTransferFloor();
-                        }
-
-                        if(transferFloor > 0){
-                            blankingmeslabel.setIcon(imageGreen);
-                            blankingmeslabel.setText("放置层数["+transferFloor+"]");
-                        }else{
-                            blankingmeslabel.setIcon(imageGray);
-                            blankingmeslabel.setText("放置层数");
-                        }
-                        if(transferSn > 0){
-                            blankinglabel.setIcon(imageGreen);
-                            blankinglabel.setText("中转车号["+transferSn+"]");
-                        }else{
-                            blankinglabel.setIcon(imageGray);
-                            blankinglabel.setText("中转车号");
-                        }
-
                         //真扫码
                         Boolean retScanFeeding = readScanFeeding();
                         if(retScanFeeding){
@@ -420,33 +363,6 @@ public class WorkJPanelScan extends JPanel {
         }
     }
 
-    // 读取中转车上料到设备
-    public boolean readFeedingTransferToDevice(){
-        if(isLocal == 1){
-            return true;
-        }else{
-            return readBoolean(plcDb+".0.2");
-        }
-    }
-
-    // 读取中转车号
-    public int readTransferNo(){
-        if(isLocal == 1){
-            return 1;
-        }else{
-            return s7PLC.readInt16(plcDb+".2.0");
-        }
-    }
-
-    // 读取中转车层数
-    public int readTransferFloor(){
-        if(isLocal == 1){
-            return 1;
-        }else{
-            return s7PLC.readInt16(plcDb+".4.0");
-        }
-    }
-
     // 控制扫码枪读取二维码
     public String readQrcode(){
 //        String sn = "5001040043561010006";
@@ -455,38 +371,21 @@ public class WorkJPanelScan extends JPanel {
             return "";
         }else{
             try{
-                if(transferToDevice){ // 中转车上料到设备
-                    int transferSn = readTransferNo();
-                    int transferFloor = readTransferFloor();
-                    JSONObject retObj = DataUtil.getSn(oprno+pos,transferSn,transferFloor,MesClient.user_menu.getText());
-                    if(retObj.get("result")!=null&&retObj.get("result").toString().equalsIgnoreCase("true")) {
-                        sn = retObj.getString("data");
+                if(oprno.equals("OP040")){
+                    if(!MesClient.newSn.isEmpty()){
+                        sn = MesClient.newSn;
                     }else{
-                        if(retObj.get("result")==null){
-                            this.setMenuStatus("请求失败,请重试",-1);
+                        if(isScan == 1){
+                            sn = MesClient.scanQrcode2();
                         }else{
-                            if(retObj.get("result").toString().equalsIgnoreCase("false")){
-                                this.setMenuStatus(retObj.getString("message"),-1);
-                            }
+                            sn = MesClient.scanQrcode1();
                         }
                     }
                 }else{
-                    if(oprno.equals("OP020")){
-                        if(!MesClient.newSn.isEmpty()){
-                            sn = MesClient.newSn;
-                        }else{
-                            if(isScan == 1){
-                                sn = MesClient.scanQrcode2();
-                            }else{
-                                sn = MesClient.scanQrcode1();
-                            }
-                        }
+                    if(isScan == 1){
+                        sn = MesClient.scanQrcode4();
                     }else{
-                        if(isScan == 1){
-                            sn = MesClient.scanQrcode4();
-                        }else{
-                            sn = MesClient.scanQrcode3();
-                        }
+                        sn = MesClient.scanQrcode3();
                     }
                 }
 
@@ -495,7 +394,7 @@ public class WorkJPanelScan extends JPanel {
             }
         }
 
-        if(oprno.equals("OP020")){
+        if(oprno.equals("OP040")){
             MesClient.preSn20 = sn;
         }else{
             MesClient.preSn30 = sn;

+ 0 - 710
src/com/mes/component/WorkJPanelTransfer.java

@@ -1,710 +0,0 @@
-package com.mes.component;
-
-import com.alibaba.fastjson2.JSON;
-import com.alibaba.fastjson2.JSONObject;
-import com.github.xingshuangs.iot.protocol.s7.enums.EPlcType;
-import com.github.xingshuangs.iot.protocol.s7.service.S7PLC;
-import com.mes.ui.CacheData;
-import com.mes.ui.DataUtil;
-import com.mes.ui.MesClient;
-import com.mes.util.JdbcUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.swing.*;
-import java.awt.*;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.util.Timer;
-import java.util.TimerTask;
-
-public class WorkJPanelTransfer extends JPanel {
-
-    public static final Logger log =  LoggerFactory.getLogger(WorkJPanelTransfer.class);
-
-    public String oprno = "OP020";
-
-    public String pos = "A";
-
-    public String lastSn = ""; // 最近的码
-
-    public String lineSn = "";
-
-    public JLabel feedinglabel;
-
-    public JLabel feedingmeslabel;
-
-    public JLabel runlabel; //运行反馈,
-
-    public JLabel blankinglabel; // 下料反馈
-
-    public JLabel blankingmeslabel; // 下料MES反馈
-
-    public JLabel feedingtodevicelabel; // 上料到设备
-
-    public JLabel feedingtotransferlabel; // 上料到中转车
-
-    public JLabel transfertodevicelabel; // 上料到中转车
-
-    public JButton scanBtn;
-
-    public JTextField productSn;
-
-    public JTextField productSnFeeding;
-
-    public JButton status_menu;
-
-    public JButton resetBtn;
-
-    public JButton resetFeedingBtn;
-
-    public ImageIcon imageGreen;
-
-    public ImageIcon imageGray;
-
-    public String plcIp1 = "192.168.90.81"; // plc5 西侧
-    public String plcIp2 = "192.168.90.82";
-
-    public S7PLC s7PLC = null;
-
-    public Integer workWidth = 470;
-    public Integer workHeight = 300;
-
-    public String plcDb = "DB7002";
-
-    public Integer tjFeedingFlag = 0; // 上料状态标识
-    public Integer tjFlag = 0; // 1=可加工 2=设备运行中 3=加工结束
-    public Integer tjStatus = 0; // 提交标识
-    public Boolean toDevice = false;
-    public Boolean toTransfer = false;
-    public Boolean transferToDevice = false;
-
-    public Boolean plcHeart = false;
-
-    public Integer isLocal = 0; // 0=正式 1=本地
-
-    public Integer isScan = 1; // 1=西侧 2=东测
-
-    public int transferSn = 0;
-    public int transferFloor = 0;
-
-    // 缓存上一次的信号值,用于检测变化(key=地址, value=上次值)
-    private java.util.Map<String, Boolean> lastBooleanValues = new java.util.HashMap<>();
-    private java.util.Map<String, Boolean> lastWriteBooleanValues = new java.util.HashMap<>();
-
-    public JButton signalBtn; // 信号监控按钮
-    public PlcSignalMonitor signalMonitor; // 信号监控组件
-
-    public CacheData cacheData = null;
-    public String cacheName = "";
-
-    public WorkJPanelTransfer(String position){
-        this.setLayout(null);
-        this.setBackground(Color.WHITE);
-        this.pos = position;
-        this.lineSn = MesClient.mes_line_sn;
-        if(pos.equals("A")){
-            oprno = "OP020";
-        }else{
-            oprno = "OP030";
-            plcDb = "DB7012";
-        }
-
-        cacheName = "cache_transfer_"+oprno+pos;
-        cacheData = JdbcUtils.getCache(cacheName);
-        if(cacheData == null){
-            cacheData = new CacheData();
-            cacheData.setLastSn("");
-            cacheData.setSn("");
-            cacheData.setFeedingSn("");
-            cacheData.setTjStatus(0);
-            cacheData.setTjFlag(0);
-            cacheData.setError(-1);
-            cacheData.setMsg("");
-            JdbcUtils.setCache(cacheName, JSON.toJSONString(cacheData));
-        }
-
-        if(MesClient.mes_line_pos.equals("east")){
-            s7PLC = new S7PLC(EPlcType.S1500, plcIp2);
-            isScan = 2;
-            log.info("IP:"+plcIp2);
-        }else{
-            s7PLC = new S7PLC(EPlcType.S1500, plcIp1);
-            isScan = 1;
-            log.info("IP:"+plcIp1);
-        }
-
-        s7PLC.setConnectTimeout(800);
-        s7PLC.setReceiveTimeout(800);
-
-        JLabel oprnoLabel = new JLabel("中转车"+(pos.equals("A")?"20":"30"));
-        oprnoLabel.setHorizontalAlignment(SwingConstants.CENTER);
-        oprnoLabel.setForeground(Color.BLACK);
-        oprnoLabel.setFont(new Font("微软雅黑", Font.PLAIN, 20));
-        oprnoLabel.setBounds(0, 0, workWidth/5, 40);
-        this.add(oprnoLabel);
-
-        status_menu = new JButton("等待请求扫码");
-        status_menu.setBounds(workWidth/5, 0, workWidth*4/5, 40);
-        status_menu.setForeground(Color.GREEN);
-        status_menu.setForeground(Color.GREEN);
-        status_menu.setFont(new Font("微软雅黑", Font.PLAIN, 16));
-        status_menu.setBackground(Color.BLACK);
-        this.add(status_menu);
-
-        JLabel oprnoLabelFeeding = new JLabel("上料");
-        oprnoLabelFeeding.setHorizontalAlignment(SwingConstants.CENTER);
-        oprnoLabelFeeding.setForeground(Color.BLACK);
-        oprnoLabelFeeding.setFont(new Font("微软雅黑", Font.PLAIN, 20));
-        oprnoLabelFeeding.setBounds(0, 50, workWidth/5, 40);
-        this.add(oprnoLabelFeeding);
-
-        productSnFeeding = new JTextField("");
-        productSnFeeding.setHorizontalAlignment(SwingConstants.CENTER);
-        productSnFeeding.setForeground(Color.BLACK);
-        productSnFeeding.setFont(new Font("微软雅黑", Font.PLAIN, 16));
-        productSnFeeding.setEditable(false);
-        productSnFeeding.setBounds(workWidth/5, 50, workWidth*3/5, 40);
-        productSnFeeding.addMouseListener(new MouseAdapter() {
-            public void mouseClicked(MouseEvent e) {
-                String sn = productSnFeeding.getText().trim();
-                if(!sn.isEmpty()){
-                    MesClient.createQRCode(productSnFeeding.getText(),oprno+pos);
-                }
-            }
-        });
-        this.add(productSnFeeding);
-
-        JLabel oprnoLabelWork = new JLabel("加工");
-        oprnoLabelWork.setHorizontalAlignment(SwingConstants.CENTER);
-        oprnoLabelWork.setForeground(Color.BLACK);
-        oprnoLabelWork.setFont(new Font("微软雅黑", Font.PLAIN, 20));
-        oprnoLabelWork.setBounds(0, 100, workWidth/5, 40);
-        this.add(oprnoLabelWork);
-
-        productSn = new JTextField("");
-        productSn.setHorizontalAlignment(SwingConstants.CENTER);
-        productSn.setForeground(Color.BLACK);
-        productSn.setFont(new Font("微软雅黑", Font.PLAIN, 16));
-        productSn.setEditable(false);
-        productSn.setBounds(workWidth/5, 100, workWidth*3/5, 40);
-        productSn.addMouseListener(new MouseAdapter() {
-            public void mouseClicked(MouseEvent e) {
-                String sn = productSn.getText().trim();
-                if(!sn.isEmpty()){
-                    MesClient.createQRCode(productSn.getText(),oprno+pos);
-                }
-            }
-        });
-        this.add(productSn);
-
-        resetFeedingBtn = new JButton("刷新");
-        resetFeedingBtn.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                int choice = JOptionPane.showConfirmDialog(null, "确定刷新上料工件吗?", "操作确认", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
-                if (choice == JOptionPane.YES_OPTION) {
-                    resetFeeding();
-                }
-            }
-        });
-        resetFeedingBtn.setFont(new Font("微软雅黑", Font.PLAIN, 22));
-        resetFeedingBtn.setBounds(workWidth*4/5 + 10, 50, workWidth/5 - 10, 40);
-        this.add(resetFeedingBtn);
-
-        resetBtn = new JButton("刷新");
-        resetBtn.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                int choice = JOptionPane.showConfirmDialog(null, "确定刷新加工工件吗?", "操作确认", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
-                if (choice == JOptionPane.YES_OPTION) {
-                    resetBlanking();
-                }
-            }
-        });
-        resetBtn.setFont(new Font("微软雅黑", Font.PLAIN, 22));
-        resetBtn.setBounds(workWidth*4/5 + 10, 100, workWidth/5 - 10, 40);
-        this.add(resetBtn);
-
-        imageGreen = new ImageIcon(MesClient.class.getResource("/bg/green_dot.png"));
-        imageGreen.setImage(imageGreen.getImage().getScaledInstance(20, 20, Image.SCALE_SMOOTH));
-
-        imageGray = new ImageIcon(MesClient.class.getResource("/bg/grey_dot.png"));
-        imageGray.setImage(imageGray.getImage().getScaledInstance(20, 20, Image.SCALE_SMOOTH));
-
-        feedinglabel = new JLabel("请求扫码");
-        feedinglabel.setHorizontalAlignment(SwingConstants.LEFT);
-        feedinglabel.setIcon(imageGreen);
-        feedinglabel.setForeground(Color.BLACK);
-        feedinglabel.setBounds(0, 150, workWidth/3, 30);
-        this.add(feedinglabel);
-
-        feedingmeslabel = new JLabel("MES扫码反馈");
-        feedingmeslabel.setHorizontalAlignment(SwingConstants.LEFT);
-        feedingmeslabel.setIcon(imageGreen);
-        feedingmeslabel.setForeground(Color.BLACK);
-        feedingmeslabel.setBounds(workWidth/3, 150, workWidth/3, 30);
-        feedingmeslabel.addMouseListener(new MouseAdapter() {
-            public void mouseClicked(MouseEvent e) {
-                boolean ret = readAllowFeeding();
-                int choice = JOptionPane.showConfirmDialog(null, "确定修改MES扫码反馈结果为"+(ret?"false":"true")+"吗?", "操作确认", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
-                if (choice == JOptionPane.YES_OPTION) {
-                    writeAllowFeeding(!ret);
-                }
-            }
-        });
-        this.add(feedingmeslabel);
-
-        feedingtotransferlabel = new JLabel("上料到中转车");
-        feedingtotransferlabel.setHorizontalAlignment(SwingConstants.LEFT);
-        feedingtotransferlabel.setIcon(imageGreen);
-        feedingtotransferlabel.setForeground(Color.BLACK);
-        feedingtotransferlabel.setBounds(workWidth*2/3, 150, workWidth/3, 30);
-        this.add(feedingtotransferlabel);
-
-        blankinglabel = new JLabel("中转车号");
-        blankinglabel.setHorizontalAlignment(SwingConstants.LEFT);
-        blankinglabel.setIcon(imageGreen);
-        blankinglabel.setForeground(Color.BLACK);
-        blankinglabel.setBounds(0, 190, workWidth/3, 30);
-        this.add(blankinglabel);
-
-        blankingmeslabel = new JLabel("放置层数");
-        blankingmeslabel.setHorizontalAlignment(SwingConstants.LEFT);
-        blankingmeslabel.setIcon(imageGreen);
-        blankingmeslabel.setForeground(Color.BLACK);
-        blankingmeslabel.setBounds(workWidth/3, 190, workWidth/3, 30);
-        this.add(blankingmeslabel);
-
-
-        startOprnoTimer();
-        heartData();
-
-        resetScanA();
-
-        // 信号监控按钮
-        signalMonitor = new PlcSignalMonitor(s7PLC, plcDb, oprno + pos, MesClient.mesClientFrame);
-        signalBtn = signalMonitor.createSignalButton();
-        signalBtn.setBounds(workWidth*2/3 + 63, 230, 90, 26);
-        this.add(signalBtn);
-
-        formatElementUI();
-
-    }
-
-    public void formatElementUI(){
-        cacheData = JdbcUtils.getCache(cacheName);
-        if(cacheData == null){
-            return;
-        }
-        String msg = cacheData.getMsg();
-        int error = cacheData.getError();
-
-        String sn = cacheData.getSn();
-        productSn.setText(sn);
-
-        String feedingSn = cacheData.getFeedingSn();
-        productSnFeeding.setText(feedingSn);
-
-        tjFlag = cacheData.getTjFlag();
-        lastSn = cacheData.getLastSn();
-
-        setMenuStatus(msg,error);
-
-        this.repaint();
-    }
-
-    public void setMenuStatus(String msg,int error){
-        if(error == 0){
-            this.status_menu.setForeground(Color.GREEN);
-        }else{
-            this.status_menu.setForeground(Color.RED);
-        }
-        this.status_menu.setText(msg);
-
-        cacheData.setMsg(msg);
-        cacheData.setError(error);
-        cacheData.setTjFlag(tjFlag);
-        cacheData.setTjStatus(tjStatus);
-        cacheData.setLastSn(lastSn);
-        cacheData.setSn(productSn.getText());
-        cacheData.setFeedingSn(productSnFeeding.getText());
-        JdbcUtils.setCache(cacheName, JSON.toJSONString(cacheData));
-    }
-
-    // 定时任务 -----------------------------------------------------------------------------------------------------
-
-    public Timer cjTimerText2;
-    public void heartData() {
-        if(cjTimerText2!=null) {
-            cjTimerText2.cancel();
-        }
-        cjTimerText2 = new Timer();
-        cjTimerText2.schedule(new TimerTask() {
-            public void run() {
-                if(MesClient.isLogin == 1 && isLocal == 0){
-                    plcHeart = !plcHeart;
-                    writeBoolean(plcDb+".0.6",plcHeart);
-                }
-            }
-        }, 1000,1000);
-    }
-
-    public Timer oprnoTimer;
-    public void startOprnoTimer() {
-
-        //心跳显示图标
-        if(oprnoTimer!=null) {
-            oprnoTimer.cancel();
-        }
-        oprnoTimer = new Timer();
-        oprnoTimer.schedule(new TimerTask() {
-            public void run() {
-                try{
-
-                    if(MesClient.isLogin == 1){
-                        Boolean retFeeding = readFeeding();
-                        feedinglabel.setIcon(retFeeding?imageGreen:imageGray);
-
-                        toTransfer = readFeedingToTransfer();
-                        feedingtotransferlabel.setIcon(toTransfer?imageGreen:imageGray);
-
-                        Boolean retFeedingAllow = readAllowFeeding();
-                        feedingmeslabel.setIcon(retFeedingAllow?imageGreen:imageGray);
-
-                        if(!retFeeding && retFeedingAllow){
-                            writeAllowFeeding(false);
-                            resetFeeding();
-                        }
-
-                        blankingmeslabel.setIcon(imageGreen);
-                        blankingmeslabel.setText("放置层数["+transferFloor+"]");
-
-                        blankinglabel.setIcon(imageGreen);
-                        blankinglabel.setText("中转车号["+transferSn+"]");
-
-                        if(tjFeedingFlag == 0){
-                            tjStatus = 0;
-                            if(retFeeding){
-                                if(transferSn == 0 || transferFloor == 0){
-                                    transferSn = readTransferNo();
-                                    transferFloor = readTransferFloor();
-
-                                    blankinglabel.setIcon(imageGreen);
-                                    blankinglabel.setText("中转车号["+transferSn+"]");
-
-                                    blankingmeslabel.setIcon(imageGreen);
-                                    blankingmeslabel.setText("放置层数["+transferFloor+"]");
-                                }
-
-                                barCode();
-                            }
-                        }else if(tjFeedingFlag == 1){
-                            if(!retFeeding){ // 取消上料
-                                resetFeeding();
-                            }
-//                            if(!retFeeding){ // 取消上料
-//                                if(transferSn > 0 && transferFloor > 0){
-//                                    if(tjStatus == 0) {
-//                                        tjStatus = 1;
-//                                        JSONObject retObj = DataUtil.saveSn(oprno+pos,productSnFeeding.getText().trim(),transferSn,transferFloor,MesClient.user_menu.getText());
-//                                        if(retObj.get("result")!=null&&retObj.get("result").toString().equalsIgnoreCase("true")) {
-//                                            resetFeeding();
-//                                        }else{
-//                                            if(retObj.get("result")==null){
-//                                                setMenuStatus("请求失败,请重试",-1);
-//                                            }else{
-//                                                if(retObj.get("result").toString().equalsIgnoreCase("false")){
-//                                                    setMenuStatus(retObj.getString("message"),-1);
-//                                                }
-//                                            }
-//                                        }
-//                                    }
-//                                }
-//                            }
-                        }
-
-                    }
-
-
-
-                }catch (Exception e) {
-                    log.error(e.getMessage());
-                }
-            }
-        }, 100,1500);
-    }
-
-    public void barCode(){
-        if(!productSnFeeding.getText().isEmpty()){
-            return;
-        }
-        String sn = readQrcode();
-        if(sn.equals("")){
-            if(productSnFeeding.getText().isEmpty()){
-                productSnFeeding.setText("");
-                this.setMenuStatus("扫码结果为空", -1);
-            }
-        }else{
-            productSnFeeding.setText(sn);
-            lastSn = sn;
-
-            if(tjStatus == 0) {
-                tjStatus = 1;
-                log.info("transferSn:"+transferSn);
-                log.info("transferFloor:"+transferFloor);
-                JSONObject retObj2 = DataUtil.saveSn(oprno+pos,sn,transferSn,transferFloor,MesClient.user_menu.getText());
-                if(retObj2.get("result")!=null&&retObj2.get( "result").toString().equalsIgnoreCase("true")) {
-//                    resetFeeding();
-
-                    tjFeedingFlag = 1;//可加工
-                    setMenuStatus("工件可以加工", 0);
-
-                    writeAllowFeeding(true);
-
-                }else{
-                    if(retObj2.get("result")==null){
-                        setMenuStatus("请求失败,请重试",-1);
-                    }else{
-                        if(retObj2.get("result").toString().equalsIgnoreCase("false")){
-                            setMenuStatus(retObj2.getString("message"),-1);
-                        }
-                    }
-                }
-            }
-
-//            // 查询工件质量
-//            JSONObject retObj = DataUtil.checkQuality(sn,oprno+pos,MesClient.user_menu.getText());
-//            if(retObj.get("result")!=null&&retObj.get("result").toString().equalsIgnoreCase("true")) {
-//                tjFeedingFlag = 1;//可加工
-//                setMenuStatus("工件可以加工", 0);
-//
-//                writeAllowFeeding(true);
-////                resetFeedingBtn.setEnabled(false);
-//            }else{
-//                writeAllowFeeding(false);
-//                resetFeedingBtn.setEnabled(true);
-//                if(retObj.get("result")==null){
-//                    setMenuStatus("请求失败,请重试",-1);
-//                }else{
-//                    if(retObj.get("result").toString().equalsIgnoreCase("false")){
-//                        setMenuStatus(retObj.getString("message"),-1);
-//                    }
-//                }
-//            }
-        }
-    }
-
-    public void resetBlanking() {
-        tjFlag = 0;
-        tjStatus = 0;
-        productSn.setText("");
-        setMenuStatus("工件结果已提交,等待下一件",0);
-        resetBtn.setEnabled(true);
-//        writeAllowFeeding(false);
-//        writeAllowBlanking(false);
-    }
-
-    public void resetFeeding() {
-        tjStatus = 0;
-        transferSn = 0;
-        transferFloor = 0;
-        productSnFeeding.setText("");
-        tjFeedingFlag = 0;
-        setMenuStatus("等待请求扫码",0);
-        resetFeedingBtn.setEnabled(true);
-        writeAllowFeeding(false);
-    }
-
-    public void resetScanA() {
-        tjFeedingFlag = 0;
-        tjFlag = 0;
-        tjStatus = 0;
-        productSn.setText("");
-        productSnFeeding.setText("");
-        setMenuStatus("等待请求扫码",0);
-        resetBtn.setEnabled(true);
-        resetFeedingBtn.setEnabled(true);
-        writeAllowFeeding(false);
-        writeAllowBlanking(false);
-    }
-    // 与设备交互-----------------------------------------------------------------------------------------
-
-    // 请求扫码
-    public boolean readFeeding(){
-        if(isLocal == 1){
-            return false;
-        }else{
-            return readBoolean(plcDb+".0.0");
-        }
-    }
-
-    // 读取上料到设备
-    public boolean readFeedingToDevice(){
-        if(isLocal == 1){
-            return true;
-        }else{
-            return readBoolean(plcDb+".0.7");
-        }
-    }
-
-    // 读取上料到中转车
-    public boolean readFeedingToTransfer(){
-        if(isLocal == 1){
-            return true;
-        }else{
-            return readBoolean(plcDb+".1.0");
-        }
-    }
-
-    // 读取中转车上料到设备
-    public boolean readFeedingTransferToDevice(){
-        if(isLocal == 1){
-            return true;
-        }else{
-            return readBoolean(plcDb+".1.1");
-        }
-    }
-
-    // 读取下料信号
-    public boolean readBlanking(){
-        if(isLocal == 1){
-            return false;
-        }else{
-            return readBoolean(plcDb+".0.1");
-        }
-    }
-
-    // 读取设备运行信号
-    public boolean readRunning(){
-        if(isLocal == 1){
-            return true;
-        }else{
-            return readBoolean(plcDb+".0.2");
-        }
-    }
-
-    // 读取设备通讯状态
-    public boolean readDeviceStatus(){
-        if(isLocal == 1){
-            return true;
-        }else{
-            return readBoolean(plcDb+".0.3");
-        }
-    }
-
-    // 读取MES允许上料信号
-    public boolean readAllowFeeding(){
-        if(isLocal == 1){
-            return false;
-        }else{
-            return readBoolean(plcDb+".0.4");
-        }
-    }
-
-    // 写入MES允许上料信号
-    public boolean writeAllowFeeding(Boolean b){
-        if(isLocal == 1){
-            return true;
-        }else{
-            return writeBoolean(plcDb+".0.4",b);
-        }
-    }
-
-    // 读取MES允许下料信号
-    public boolean readAllowBlanking(){
-        if(isLocal == 1){
-            return true;
-        }else{
-            return readBoolean(plcDb+".0.5");
-        }
-    }
-
-    // 写入MES允许下料信号
-    public boolean writeAllowBlanking(Boolean b){
-        if(isLocal == 1){
-            return true;
-        }else{
-            return writeBoolean(plcDb+".0.5",b);
-        }
-    }
-
-    // 读取中转车号
-    public int readTransferNo(){
-        if(isLocal == 1){
-            return 1;
-        }else{
-            return s7PLC.readInt16(plcDb+".2.0");
-        }
-    }
-
-    // 读取中转车层数
-    public int readTransferFloor(){
-        if(isLocal == 1){
-            return 1;
-        }else{
-            return s7PLC.readInt16(plcDb+".4.0");
-        }
-    }
-
-    // 控制扫码枪读取二维码
-    public String readQrcode(){
-//        String sn = "5001040043561010006";
-        String sn = "";
-        if(isLocal == 1){
-            return "";
-        }else{
-            if(oprno.equals("OP020")){
-//                sn = MesClient.workJPanelScanA.productSnFeeding.getText().trim();
-                sn = MesClient.preSn20;
-                log.info("SN20:"+sn);
-                log.info("SN20:"+MesClient.preSn20);
-            }else{
-                sn = MesClient.preSn30;
-//                sn = MesClient.workJPanelScanB.productSnFeeding.getText().trim();
-                log.info("SN30:"+sn);
-                log.info("SN30:"+MesClient.preSn30);
-            }
-        }
-
-        return sn;
-    }
-
-    public boolean readBoolean(String db){
-        boolean permit;
-        try {
-            permit = s7PLC.readBoolean(db);
-            // 值变化时才打印日志(排除心跳地址.0.4和.0.6)
-            Boolean lastValue = lastBooleanValues.get(db);
-            if (lastValue == null || lastValue != permit) {
-                if (!db.endsWith(".0.4") && !db.endsWith(".0.6")) {
-                    log.info("<"+this.oprno+this.pos+">读取"+db+"-->变化:{} -> {}", lastValue, permit);
-                }
-                lastBooleanValues.put(db, permit);
-            }
-        } catch (Exception e) {
-            log.error("<"+this.oprno+this.pos+">读取"+db+"-->失败", e);
-            return false;
-        }
-        return permit;
-    }
-
-    public boolean writeBoolean(String db, boolean permit){
-        try {
-            // 值变化时才写入和打印日志(排除心跳地址.0.4和.0.6)
-            Boolean lastValue = lastWriteBooleanValues.get(db);
-            if (lastValue == null || lastValue != permit) {
-                s7PLC.writeBoolean(db,permit);
-                if (!db.endsWith(".0.4") && !db.endsWith(".0.6")) {
-                    log.info("<"+this.oprno+this.pos+">写入"+db+"-->变化:{} -> {}", lastValue, permit);
-                }
-                lastWriteBooleanValues.put(db, permit);
-            }
-        } catch (Exception e) {
-            log.error("<"+this.oprno+this.pos+">写入"+db+"-->失败,写入内容:{}", permit ? "true" : "false");
-            log.error(e.getMessage(), e);
-            return false;
-        }
-        return true;
-    }
-}

+ 1 - 1
src/com/mes/ui/LoginFarme.java

@@ -26,7 +26,7 @@ public class LoginFarme extends JFrame {
     static JButton scanLoginButton = new JButton("扫  码  登  录");
 
     public LoginFarme(){
-        setTitle("MES系统客户端:OP10-OP30");
+        setTitle("MES系统客户端:OP35-OP50");
 
         ImageIcon bg = new ImageIcon(MesClient.class.getResource("/background.png"));
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

+ 13 - 36
src/com/mes/ui/MesClient.java

@@ -101,10 +101,6 @@ public class MesClient extends JFrame {
 
     public static WorkJPanelOP25 workJPanelOP25A;
 
-    public static WorkJPanelTransfer workJPanelOP20Transfer;
-
-    public static WorkJPanelTransfer workJPanelOP20Transfer2;
-
     public static WorkJPanelOP30 workJPanelOP30A;
     public static WorkJPanelOP30 workJPanelOP30C;
 
@@ -228,7 +224,7 @@ public class MesClient extends JFrame {
 
     public MesClient() {
         setIconImage(Toolkit.getDefaultToolkit().getImage(MesClient.class.getResource("/bg/logo.png")));
-        setTitle("MES系统客户端:OP10-OP30");
+        setTitle("MES系统客户端:OP35-OP50");
 //        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 //        setBounds(0, 0, 1920, 1080);
         setBounds(0, 0, 1024, 768);
@@ -370,7 +366,7 @@ public class MesClient extends JFrame {
 
 
 
-        tabbedPane.addTab("OP10上料+打码", null, indexScrollPaneA, null);
+        tabbedPane.addTab("OP35上料+打码", null, indexScrollPaneA, null);
         tabbedPane.setEnabledAt(0, true);
 
         JPanel indexPanelB = new JPanel();
@@ -415,15 +411,6 @@ public class MesClient extends JFrame {
 
         }
 
-        // 中转车已取消,注释掉OP20中转车面板
-//        JPanel indexPanel20Cs = new JPanel();
-//        indexPanel20Cs.setLayout(null);
-//        indexPanel20Cs.setBackground(Color.WHITE);
-//        workJPanelOP20Transfer = new WorkJPanelTransfer("A");
-//        workJPanelOP20Transfer.setBounds(10, 10, workJPanelOP20Transfer.workWidth, workJPanelOP20C.workHeight);
-//        indexPanel20Cs.add(workJPanelOP20Transfer);
-//        indexPanelB.add(indexPanel20Cs);
-
         JPanel indexPanel20Ca = new JPanel();
         indexPanel20Ca.setLayout(null);
         indexPanel20Ca.setBackground(Color.WHITE);
@@ -434,7 +421,7 @@ public class MesClient extends JFrame {
 
 
 
-        tabbedPane.addTab("OP20正面FSW", null, indexScrollPaneB, null);
+        tabbedPane.addTab("OP40正面FSW", null, indexScrollPaneB, null);
 
         JPanel indexPanelC = new JPanel();
         indexScrollPaneC = new JScrollPane(indexPanelC);
@@ -463,7 +450,7 @@ public class MesClient extends JFrame {
 
 
 
-        tabbedPane.addTab("OP25打磨", null, indexScrollPaneC, null);
+        tabbedPane.addTab("OP45打磨", null, indexScrollPaneC, null);
 
 
         JPanel indexPanelD = new JPanel();
@@ -508,16 +495,6 @@ public class MesClient extends JFrame {
             indexPanelD.add(indexPanel30C);
         }
 
-        // 中转车已取消,注释掉OP30中转车面板
-//        JPanel indexPanel20CDD = new JPanel();
-//        indexPanel20CDD.setLayout(null);
-//        indexPanel20CDD.setBackground(Color.WHITE);
-//        workJPanelOP20Transfer2 = new WorkJPanelTransfer("B");
-//        workJPanelOP20Transfer2.setBounds(10, 10, workJPanelOP20Transfer2.workWidth, workJPanelOP20Transfer2.workHeight);
-//        indexPanel20CDD.add(workJPanelOP20Transfer2);
-//        indexPanelD.add(indexPanel20CDD);
-
-
         JPanel indexPanel20Caa = new JPanel();
         indexPanel20Caa.setLayout(null);
         indexPanel20Caa.setBackground(Color.WHITE);
@@ -526,7 +503,7 @@ public class MesClient extends JFrame {
         indexPanel20Caa.add(workJPanelScanB);
         indexPanelD.add(indexPanel20Caa);
 
-        tabbedPane.addTab("OP30正面FSW", null, indexScrollPaneD, null);
+        tabbedPane.addTab("OP50正面FSW", null, indexScrollPaneD, null);
 
 
         // ========== 工作记录 Tab(改造:OP010/OP020/OP025/OP030子工位Tab + 所有工位) ==========
@@ -541,15 +518,15 @@ public class MesClient extends JFrame {
         workRecordTabbedPane.setFont(new Font("微软雅黑", Font.PLAIN, 14));
 
         // 定义所有子工位
-        // OP010: A, B
-        // OP020: A, B, C, D
-        // OP025: A, B
-        // OP030: A, B, C, D
+        // OP035: A, B
+        // OP040: A, B, C, D
+        // OP045: A, B
+        // OP050: A, B, C, D
         String[][] stationGroups = {
-            {"OP010", "A", "B"},
-            {"OP020", "A", "B", "C", "D"},
-            {"OP025", "A", "B"},
-            {"OP030", "A", "B", "C", "D"}
+            {"OP035", "A", "B"},
+            {"OP040", "A", "B", "C", "D"},
+            {"OP045", "A", "B"},
+            {"OP050", "A", "B", "C", "D"}
         };
         
         // 计算总的工位数(用于数组大小)