cl
2024-02-23 73bc0656dc15cd9cc95c6f4f51949ef0437088ce
修改数据采集
已修改42个文件
1917 ■■■■ 文件已修改
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/BOP010Callback.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/BOP020Callback.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/BOP030BCallback.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/BOP030Callback.java 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/BOP040BCallback.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/BOP040Callback.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/COP010Callback.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/COP020Callback.java 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/COP030Callback.java 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/DOP010Callback.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/DOP020Callback.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP010Callback.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP020Callback.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP030Callback.java 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP040Callback.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP050Callback.java 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP060Callback.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP070Callback.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP080Callback.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP090BCallback.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP090Callback.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/InitCallback.java 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP010Callback.java 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP020Callback.java 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP030Callback.java 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP040Callback.java 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP050Callback.java 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP070Callback.java 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP080Callback.java 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP090Callback.java 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP100Callback.java 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP110Callback.java 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP120BCallback.java 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP120Callback.java 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP130BCallback.java 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP130Callback.java 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP140Callback.java 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP150Callback.java 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP160Callback.java 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP170Callback.java 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/StateCallback.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/init/CustomRunner.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/BOP010Callback.java
@@ -46,7 +46,7 @@
import java.util.Random;
@Component
public class BOP010Callback implements SubscriptionCallback {
public class BOP010Callback {
    public MiloService miloService;
@@ -129,49 +129,7 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.COP010_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP010_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.BOP010_J_PLC_START)){
                if("true".equals(value.toString())){
                    String isRepair = miloService.
                            readFromOpcUa(OPCElement.BOP010_P_REPAIR)
                            .getValue().toString();//是否返修
                    if(isRepair.equals("true")){
                        handleRepair();
                    }else{
                        handleOrder();
                    }
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.BOP010_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("BOP010值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    public void handleOrder() throws Exception{
@@ -211,7 +169,8 @@
        String S_PRODUCT_STATE_CODE = miloService.
                readFromOpcUa(OPCElement.BOP010_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP010_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -224,8 +183,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP010_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/BOP020Callback.java
@@ -38,7 +38,7 @@
import java.util.List;
@Component
public class BOP020Callback implements SubscriptionCallback {
public class BOP020Callback  {
    public MiloService miloService;
@@ -121,42 +121,6 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.BOP020_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP020_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.BOP020_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.BOP020_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("BOP020值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -193,7 +157,8 @@
        String S_PRODUCT_STATE_CODE = miloService.
                readFromOpcUa(OPCElement.BOP020_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP020_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -206,8 +171,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP020_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/BOP030BCallback.java
@@ -38,7 +38,7 @@
import java.util.List;
@Component
public class BOP030BCallback implements SubscriptionCallback {
public class BOP030BCallback  {
    public MiloService miloService;
@@ -120,42 +120,6 @@
        this.greaseManageService = greaseManageService;
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.BOP030B_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP030B_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.BOP030B_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.BOP030B_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("BOP030B值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/BOP030Callback.java
@@ -38,7 +38,7 @@
import java.util.List;
@Component
public class BOP030Callback implements SubscriptionCallback {
public class BOP030Callback {
    public MiloService miloService;
@@ -121,42 +121,7 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.BOP030_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP030_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.BOP030_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.BOP030_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("BOP030值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -193,7 +158,8 @@
        String S_PRODUCT_STATE_CODE = miloService.
                readFromOpcUa(OPCElement.BOP030_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP030_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -206,8 +172,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP030_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/BOP040BCallback.java
@@ -38,7 +38,7 @@
import java.util.List;
@Component
public class BOP040BCallback implements SubscriptionCallback {
public class BOP040BCallback{
    public MiloService miloService;
@@ -121,42 +121,6 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.BOP040B_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP040B_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.BOP040B_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.BOP040B_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("BOP040B值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -194,6 +158,8 @@
                readFromOpcUa(OPCElement.BOP040B_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP040B_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -206,8 +172,6 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP040B_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/BOP040Callback.java
@@ -38,7 +38,7 @@
import java.util.List;
@Component
public class BOP040Callback implements SubscriptionCallback {
public class BOP040Callback  {
    public MiloService miloService;
@@ -121,42 +121,7 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.BOP040_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.BOP040_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.BOP040_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.BOP040_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("BOP040值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/COP010Callback.java
@@ -49,7 +49,7 @@
import java.util.*;
@Component
public class COP010Callback implements SubscriptionCallback {
public class COP010Callback  {
    public MiloService miloService;
@@ -132,50 +132,6 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.COP010_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.COP010_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.COP010_J_PLC_START)){
                if("true".equals(value.toString())){
                    String isRepair = miloService.
                            readFromOpcUa(OPCElement.COP010_P_REPAIR)
                            .getValue().toString();//是否返修
                    if(isRepair.equals("true")){
                        handleRepair();
                    }else{
                        handleOrder();
                    }
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.COP010_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("COP010值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
            System.out.println("finally" +ecpStr);
        }
    }
    public void handleOrder() throws Exception{
@@ -215,7 +171,8 @@
        String S_PRODUCT_STATE_CODE = miloService.
                readFromOpcUa(OPCElement.COP010_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.COP010_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -228,8 +185,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.COP010_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/COP020Callback.java
@@ -40,7 +40,7 @@
import java.util.List;
@Component
public class COP020Callback implements SubscriptionCallback {
public class COP020Callback {
    public MiloService miloService;
@@ -123,42 +123,7 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.COP020_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.COP020_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.COP020_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.COP020_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -195,7 +160,8 @@
        String S_PRODUCT_STATE_CODE = miloService.
                readFromOpcUa(OPCElement.COP020_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.COP020_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -208,8 +174,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.COP020_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/COP030Callback.java
@@ -40,7 +40,7 @@
import java.util.List;
@Component
public class COP030Callback implements SubscriptionCallback {
public class COP030Callback{
    public MiloService miloService;
@@ -123,42 +123,7 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.COP030_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.COP030_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.COP030_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.COP030_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -195,7 +160,8 @@
        String S_PRODUCT_STATE_CODE = miloService.
                readFromOpcUa(OPCElement.COP030_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.COP030_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -208,8 +174,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.COP030_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/DOP010Callback.java
@@ -46,7 +46,7 @@
import java.util.Random;
@Component
public class DOP010Callback implements SubscriptionCallback {
public class DOP010Callback {
    public MiloService miloService;
@@ -129,49 +129,6 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.COP010_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.DOP010_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.DOP010_J_PLC_START)){
                if("true".equals(value.toString())){
                    String isRepair = miloService.
                            readFromOpcUa(OPCElement.DOP010_P_REPAIR)
                            .getValue().toString();//是否返修
                    if(isRepair.equals("true")){
                        handleRepair();
                    }else{
                        handleOrder();
                    }
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.DOP010_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    //handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    public void handleOrder() throws Exception{
        IN_TIME = DateTool.getLocalTimeForDate();
@@ -207,7 +164,8 @@
        String S_PRODUCT_STATE_CODE = miloService.
                readFromOpcUa(OPCElement.DOP010_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.DOP010_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -220,8 +178,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.DOP010_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/DOP020Callback.java
@@ -38,7 +38,7 @@
import java.util.List;
@Component
public class DOP020Callback implements SubscriptionCallback {
public class DOP020Callback {
    public MiloService miloService;
@@ -121,42 +121,7 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.DOP020_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.DOP020_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.DOP020_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.DOP020_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP010Callback.java
@@ -39,7 +39,7 @@
import java.util.List;
@Component
public class EOP010Callback implements SubscriptionCallback {
public class EOP010Callback {
    public MiloService miloService;
@@ -122,42 +122,6 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.EOP010_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP010_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.EOP010_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.EOP010_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -194,7 +158,8 @@
        String S_PRODUCT_STATE_CODE = miloService.
                readFromOpcUa(OPCElement.EOP010_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP010_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -207,8 +172,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP010_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP020Callback.java
@@ -38,7 +38,7 @@
import java.util.List;
@Component
public class EOP020Callback implements SubscriptionCallback {
public class EOP020Callback {
    public MiloService miloService;
@@ -121,42 +121,6 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.EOP020_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP020_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.EOP020_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.EOP020_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -193,7 +157,8 @@
        String S_PRODUCT_STATE_CODE = miloService.
                readFromOpcUa(OPCElement.EOP020_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP020_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -206,8 +171,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP020_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP030Callback.java
@@ -38,7 +38,7 @@
import java.util.List;
@Component
public class EOP030Callback implements SubscriptionCallback {
public class EOP030Callback {
    public MiloService miloService;
@@ -121,42 +121,7 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.EOP030_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP030_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.EOP030_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.EOP030_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -193,7 +158,8 @@
        String S_PRODUCT_STATE_CODE = miloService.
                readFromOpcUa(OPCElement.EOP030_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP030_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -206,8 +172,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP030_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP040Callback.java
@@ -38,7 +38,7 @@
import java.util.List;
@Component
public class EOP040Callback implements SubscriptionCallback {
public class EOP040Callback {
    public MiloService miloService;
@@ -121,42 +121,6 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.EOP040_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP040_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.EOP040_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.EOP040_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -194,6 +158,8 @@
                readFromOpcUa(OPCElement.EOP040_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP040_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -206,8 +172,6 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP040_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP050Callback.java
@@ -38,7 +38,7 @@
import java.util.List;
@Component
public class EOP050Callback implements SubscriptionCallback {
public class EOP050Callback  {
    public MiloService miloService;
@@ -121,42 +121,7 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.EOP050_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP050_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.EOP050_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.EOP050_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -193,7 +158,8 @@
        String S_PRODUCT_STATE_CODE = miloService.
                readFromOpcUa(OPCElement.EOP050_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP050_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -206,8 +172,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP050_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP060Callback.java
@@ -38,7 +38,7 @@
import java.util.List;
@Component
public class EOP060Callback implements SubscriptionCallback {
public class EOP060Callback  {
    public MiloService miloService;
@@ -121,42 +121,7 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.EOP060_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP060_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.EOP060_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.EOP060_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP070Callback.java
@@ -38,7 +38,7 @@
import java.util.List;
@Component
public class EOP070Callback implements SubscriptionCallback {
public class EOP070Callback  {
    public MiloService miloService;
@@ -120,42 +120,6 @@
        this.greaseManageService = greaseManageService;
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.EOP070_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP070_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.EOP070_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.EOP070_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP080Callback.java
@@ -38,7 +38,7 @@
import java.util.List;
@Component
public class EOP080Callback implements SubscriptionCallback {
public class EOP080Callback  {
    public MiloService miloService;
@@ -121,42 +121,7 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.EOP080_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP080_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.EOP080_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.EOP080_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP090BCallback.java
@@ -38,7 +38,7 @@
import java.util.List;
@Component
public class EOP090BCallback implements SubscriptionCallback {
public class EOP090BCallback {
    public MiloService miloService;
@@ -121,42 +121,7 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.EOP090B_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP090B_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.EOP090B_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.EOP090B_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/EOP090Callback.java
@@ -38,7 +38,7 @@
import java.util.List;
@Component
public class EOP090Callback implements SubscriptionCallback {
public class EOP090Callback {
    public MiloService miloService;
@@ -121,42 +121,7 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.EOP090_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.EOP090_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.EOP090_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.EOP090_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/InitCallback.java
@@ -99,15 +99,6 @@
    static {
        logger = Logger.getLogger(InitCallback.class);
    }
    private static Date IN_TIME = null;
    private static String S_ORDER_CODE = "";//工单编号
    private static String S_PRODUCT_CODE = "";//产品编号
    private static String S_PRODUCT_TYPE= "";//产品类型
    private static String S_SFC_CODE = "";//总成编码
    private static String PRODUCTION_LINE  = "OP";//产线号
    private static String LOCATION_CODE  = "OP010";//工位号
    private static Integer ACTUAL_ONLINE_QTY  = 0 ;//上线数量
    OP010Callback OP010Callback;
    OP020Callback OP020Callback;
@@ -432,8 +423,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.OP020_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    OP020Callback.handleFinsh();
                    OP020Callback.handleMaterial();
                    OP020Callback.handleInfo();
                    OP020Callback.handleMaterial();
                }
                //OP030
@@ -449,8 +441,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.OP030_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    OP030Callback.handleFinsh();
                    OP030Callback.handleMaterial();
                    OP030Callback.handleInfo();
                    OP030Callback.handleMaterial();
                }
                //OP040
@@ -466,8 +459,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.OP040_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    OP040Callback.handleFinsh();
                    OP040Callback.handleMaterial();
                    OP040Callback.handleInfo();
                    OP040Callback.handleMaterial();
                }
                //OP050
@@ -484,7 +478,6 @@
                else if (identifier.equals(OPCElement.OP050_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    OP050Callback.handleFinsh();
                    OP050Callback.handleInfo();
                    OP050Callback.handleMaterial();
                }
@@ -541,8 +534,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.OP090_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    OP090Callback.handleFinsh();
                    OP090Callback.handleMaterial();
                    OP090Callback.handleInfo();
                    OP090Callback.handleMaterial();
                }
@@ -558,9 +552,11 @@
                }
                //PLC出站
                else if (identifier.equals(OPCElement.OP100_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    OP100Callback.handleMaterial();
                    OP100Callback.handleInfo();
                    OP100Callback.handleFinsh();
                    OP100Callback.handleInfo();
                    OP100Callback.handleMaterial();
                }
                //OP110
@@ -576,8 +572,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.OP110_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    OP110Callback.handleFinsh();
                    OP110Callback.handleMaterial();
                    OP110Callback.handleInfo();
                    OP110Callback.handleMaterial();
                }
                //OP120
@@ -593,8 +590,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.OP120_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    OP120Callback.handleFinsh();
                    OP120Callback.handleMaterial();
                    OP120Callback.handleInfo();
                    OP120Callback.handleMaterial();
                }
                //OP120B
@@ -627,8 +625,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.OP130_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    OP130Callback.handleFinsh();
                    OP130Callback.handleMaterial();
                    OP130Callback.handleInfo();
                    OP130Callback.handleMaterial();
                }
                //OP130B
@@ -644,8 +643,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.OP130B_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    OP130BCallback.handleFinsh();
                    OP130BCallback.handleMaterial();
                    OP130BCallback.handleInfo();
                    OP130BCallback.handleMaterial();
                }
                //OP140
@@ -661,8 +661,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.OP140_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    OP140Callback.handleFinsh();
                    OP140Callback.handleMaterial();
                    OP140Callback.handleInfo();
                    OP140Callback.handleMaterial();
                }
                //OP150
@@ -752,8 +753,8 @@
                //PLC出站
                else if (identifier.equals(OPCElement.BOP020_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    BOP020Callback.handleFinsh();
                    BOP020Callback.handleMaterial();
                    BOP020Callback.handleInfo();
                    BOP020Callback.handleMaterial();
                }
@@ -770,8 +771,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.BOP030_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    BOP030Callback.handleFinsh();
                    BOP030Callback.handleMaterial();
                    BOP030Callback.handleInfo();
                    BOP030Callback.handleMaterial();
                }
                //BOP030B
@@ -804,8 +806,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.BOP040_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    BOP040Callback.handleFinsh();
                    BOP040Callback.handleMaterial();
                    BOP040Callback.handleInfo();
                    BOP040Callback.handleMaterial();
                }
                //BOP040B
@@ -862,8 +865,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.COP020_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    COP020Callback.handleFinsh();
                    COP020Callback.handleMaterial();
                    COP020Callback.handleInfo();
                    COP020Callback.handleMaterial();
                }
@@ -880,8 +884,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.COP030_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    COP030Callback.handleFinsh();
                    COP030Callback.handleMaterial();
                    COP030Callback.handleInfo();
                    COP030Callback.handleMaterial();
                }
@@ -921,8 +926,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.DOP020_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    DOP020Callback.handleFinsh();
                    DOP020Callback.handleMaterial();
                    DOP020Callback.handleInfo();
                    DOP020Callback.handleMaterial();
                }
                //EOP010
@@ -938,8 +944,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.EOP010_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    EOP010Callback.handleFinsh();
                    EOP010Callback.handleMaterial();
                    EOP010Callback.handleInfo();
                    EOP010Callback.handleMaterial();
                }
                //EOP020
                //心跳
@@ -954,8 +961,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.EOP020_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    EOP020Callback.handleFinsh();
                    EOP020Callback.handleMaterial();
                    EOP020Callback.handleInfo();
                    EOP020Callback.handleMaterial();
                }
                //EOP030
@@ -971,8 +979,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.EOP030_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    EOP030Callback.handleFinsh();
                    EOP030Callback.handleMaterial();
                    EOP030Callback.handleInfo();
                    EOP030Callback.handleMaterial();
                }
                //EOP040
@@ -988,8 +997,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.EOP040_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    EOP040Callback.handleFinsh();
                    EOP040Callback.handleMaterial();
                    EOP040Callback.handleInfo();
                    EOP040Callback.handleMaterial();
                }
                //EOP050
@@ -1005,8 +1015,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.EOP050_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    EOP050Callback.handleFinsh();
                    EOP050Callback.handleMaterial();
                    EOP050Callback.handleInfo();
                    EOP050Callback.handleMaterial();
                }
                //EOP060
@@ -1022,8 +1033,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.EOP060_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    EOP060Callback.handleFinsh();
                    EOP060Callback.handleMaterial();
                    EOP060Callback.handleInfo();
                    EOP060Callback.handleMaterial();
                }
                //EOP070
@@ -1039,8 +1051,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.EOP070_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    EOP070Callback.handleFinsh();
                    EOP070Callback.handleMaterial();
                    EOP070Callback.handleInfo();
                    EOP070Callback.handleMaterial();
                }
                //EOP080
@@ -1056,8 +1069,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.EOP080_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    EOP080Callback.handleFinsh();
                    EOP080Callback.handleMaterial();
                    EOP080Callback.handleInfo();
                    EOP080Callback.handleMaterial();
                }
                //EOP090
@@ -1073,8 +1087,9 @@
                //PLC出站
                else if (identifier.equals(OPCElement.EOP090_J_PLC_FINISH) && null != value && "true".equals(value.toString())) {
                    EOP090Callback.handleFinsh();
                    EOP090Callback.handleMaterial();
                    EOP090Callback.handleInfo();
                    EOP090Callback.handleMaterial();
                }
                //EOP090B
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP010Callback.java
@@ -52,7 +52,7 @@
import java.util.List;
@Component
public class OP010Callback implements SubscriptionCallback {
public class OP010Callback {
    public MiloService miloService;
@@ -135,52 +135,6 @@
        this.greaseManageService = greaseManageService;
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.OP010_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP010_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.OP010_J_PLC_START)){
                if("true".equals(value.toString())){
                    String isRepair = miloService.
                            readFromOpcUa(OPCElement.OP010_P_REPAIR)
                            .getValue().toString();//是否返修
                    if(isRepair.equals("true")){
                        handleRepair();
                    }else{
                        handleOrder();
                    }
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.OP010_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
            System.out.println("finally" +ecpStr);
        }
    }
    //PC读工单
@@ -269,7 +223,9 @@
                readFromOpcUa(OPCElement.OP010_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        if("2".equals(S_PRODUCT_STATE_CODE)){
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP010_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
       /* if("2".equals(S_PRODUCT_STATE_CODE)){
            ProductionOrderRecordsParam productionOrderRecordsParam = new ProductionOrderRecordsParam();
            productionOrderRecordsParam.setWorkOrderNo(S_ORDER_CODE);
            productionOrderRecordsParam.setProductNo(S_SFC_CODE);
@@ -280,7 +236,7 @@
                productionOrderRecordsParam.setWhetherPass(S_PRODUCT_STATE_CODE);
                productionOrderRecordsService.update(productionOrderRecordsParam);
            }
        }
        }*/
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -293,8 +249,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP010_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP020Callback.java
@@ -42,7 +42,7 @@
import java.util.List;
@Component
public class OP020Callback implements SubscriptionCallback {
public class OP020Callback{
    public MiloService miloService;
@@ -125,42 +125,7 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.OP020_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP020_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.OP020_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.OP020_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -198,7 +163,10 @@
                readFromOpcUa(OPCElement.OP020_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        if("2".equals(S_PRODUCT_STATE_CODE)){
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP020_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
       /* if("2".equals(S_PRODUCT_STATE_CODE)){
            ProductionOrderRecordsParam productionOrderRecordsParam = new ProductionOrderRecordsParam();
            productionOrderRecordsParam.setWorkOrderNo(S_ORDER_CODE);
            productionOrderRecordsParam.setProductNo(S_SFC_CODE);
@@ -209,7 +177,7 @@
                productionOrderRecordsParam.setWhetherPass(S_PRODUCT_STATE_CODE);
                productionOrderRecordsService.update(productionOrderRecordsParam);
            }
        }
        }*/
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -222,8 +190,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP020_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP030Callback.java
@@ -41,7 +41,7 @@
import java.util.List;
@Component
public class OP030Callback implements SubscriptionCallback {
public class OP030Callback{
    public MiloService miloService;
@@ -124,42 +124,6 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.OP030_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP030_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.OP030_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.OP030_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -196,8 +160,9 @@
        String S_PRODUCT_STATE_CODE = miloService.
                readFromOpcUa(OPCElement.OP030_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        if("2".equals(S_PRODUCT_STATE_CODE)){
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP030_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
   /*     if("2".equals(S_PRODUCT_STATE_CODE)){
            ProductionOrderRecordsParam productionOrderRecordsParam = new ProductionOrderRecordsParam();
            productionOrderRecordsParam.setWorkOrderNo(S_ORDER_CODE);
            productionOrderRecordsParam.setProductNo(S_SFC_CODE);
@@ -208,7 +173,7 @@
                productionOrderRecordsParam.setWhetherPass(S_PRODUCT_STATE_CODE);
                productionOrderRecordsService.update(productionOrderRecordsParam);
            }
        }
        }*/
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -221,8 +186,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP030_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP040Callback.java
@@ -41,7 +41,7 @@
import java.util.List;
@Component
public class OP040Callback implements SubscriptionCallback {
public class OP040Callback{
    public MiloService miloService;
@@ -124,42 +124,6 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.OP040_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP040_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.OP040_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.OP040_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -196,8 +160,9 @@
        String S_PRODUCT_STATE_CODE = miloService.
                readFromOpcUa(OPCElement.OP040_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        if("2".equals(S_PRODUCT_STATE_CODE)){
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP040_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
      /*  if("2".equals(S_PRODUCT_STATE_CODE)){
            ProductionOrderRecordsParam productionOrderRecordsParam = new ProductionOrderRecordsParam();
            productionOrderRecordsParam.setWorkOrderNo(S_ORDER_CODE);
            productionOrderRecordsParam.setProductNo(S_SFC_CODE);
@@ -208,7 +173,7 @@
                productionOrderRecordsParam.setWhetherPass(S_PRODUCT_STATE_CODE);
                productionOrderRecordsService.update(productionOrderRecordsParam);
            }
        }
        }*/
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -221,8 +186,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP040_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP050Callback.java
@@ -43,7 +43,7 @@
import java.util.List;
@Component
public class OP050Callback implements SubscriptionCallback {
public class OP050Callback{
    public MiloService miloService;
@@ -126,42 +126,7 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.OP050_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP050_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.OP050_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.OP050_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleMaterial();
                    handleFinsh();
                    handleInfo();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -199,6 +164,15 @@
        logger.info("handleFinsh PC处理开始!");
        Object copSfcCode = miloService.
                readFromOpcUa(OPCElement.OP050_S_SFC_CODE_COP)
                .getValue();
        Object bopSfcCode = miloService.
                readFromOpcUa(OPCElement.OP050_S_SFC_CODE_BOP)
                .getValue();
        Object object = miloService.
                readFromOpcUa(OPCElement.OP050_S_PRODUCT_STATE_CODE)
                .getValue();
@@ -206,6 +180,10 @@
        if(null != object){
            S_PRODUCT_STATE_CODE = object.toString();
        }
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP050_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -219,12 +197,7 @@
        passingStationCollectionService.add(param);
        Object copSfcCode = miloService.
                readFromOpcUa(OPCElement.OP050_S_SFC_CODE_COP)
                .getValue();
        Object bopSfcCode = miloService.
                readFromOpcUa(OPCElement.OP050_S_SFC_CODE_BOP)
                .getValue();
        if(null != copSfcCode && null != bopSfcCode){
        //根据分总成编码,将EOP物料数据绑定关系修改为总成编码
@@ -245,7 +218,7 @@
        logger.info("bopSfcCode:"+bopSfcCode);
        //查询COP和BOP是否合格
        PassingStationCollectionParam passingStationCollectionParam = new PassingStationCollectionParam();
     /*   PassingStationCollectionParam passingStationCollectionParam = new PassingStationCollectionParam();
        passingStationCollectionParam.setSfcCode(S_SFC_CODE);
        List<PassingStationCollectionResult> passingStationCollectionResultList =
                passingStationCollectionService.findListBySpec(passingStationCollectionParam);
@@ -270,10 +243,9 @@
                productionOrderRecordsParam.setWhetherPass("2");
                productionOrderRecordsService.update(productionOrderRecordsParam);
            }
        }
        }*/
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP050_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
    public void handleMaterial() {
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP070Callback.java
@@ -41,7 +41,7 @@
import java.util.List;
@Component
public class OP070Callback implements SubscriptionCallback {
public class OP070Callback {
    public MiloService miloService;
@@ -125,42 +125,6 @@
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.OP070_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP070_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.OP070_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.OP070_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -198,7 +162,10 @@
                readFromOpcUa(OPCElement.OP070_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        if("2".equals(S_PRODUCT_STATE_CODE)){
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP070_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
      /*  if("2".equals(S_PRODUCT_STATE_CODE)){
            ProductionOrderRecordsParam productionOrderRecordsParam = new ProductionOrderRecordsParam();
            productionOrderRecordsParam.setWorkOrderNo(S_ORDER_CODE);
            productionOrderRecordsParam.setProductNo(S_SFC_CODE);
@@ -209,7 +176,7 @@
                productionOrderRecordsParam.setWhetherPass(S_PRODUCT_STATE_CODE);
                productionOrderRecordsService.update(productionOrderRecordsParam);
            }
        }
        }*/
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -222,8 +189,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP070_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP080Callback.java
@@ -46,7 +46,7 @@
import java.util.List;
@Component
public class OP080Callback implements SubscriptionCallback {
public class OP080Callback{
    public MiloService miloService;
@@ -128,43 +128,6 @@
        this.greaseManageService = greaseManageService;
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.OP080_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP080_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.OP080_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.OP080_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    public void handleRepair() throws Exception{
@@ -249,7 +212,10 @@
                readFromOpcUa(OPCElement.OP080_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        if("2".equals(S_PRODUCT_STATE_CODE)){
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP080_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
     /*   if("2".equals(S_PRODUCT_STATE_CODE)){
            ProductionOrderRecordsParam productionOrderRecordsParam = new ProductionOrderRecordsParam();
            productionOrderRecordsParam.setWorkOrderNo(S_ORDER_CODE);
            productionOrderRecordsParam.setProductNo(S_SFC_CODE);
@@ -260,7 +226,7 @@
                productionOrderRecordsParam.setWhetherPass(S_PRODUCT_STATE_CODE);
                productionOrderRecordsService.update(productionOrderRecordsParam);
            }
        }
        }*/
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -273,8 +239,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP080_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP090Callback.java
@@ -43,7 +43,7 @@
import java.util.List;
@Component
public class OP090Callback implements SubscriptionCallback {
public class OP090Callback{
    public MiloService miloService;
@@ -127,43 +127,6 @@
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.OP090_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP090_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.OP090_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.OP090_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleMaterial();
                    handleFinsh();
                    handleInfo();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -207,6 +170,14 @@
            S_PRODUCT_STATE_CODE = object.toString();
        }
        Object eopSfcCode = miloService.
                readFromOpcUa(OPCElement.OP090_S_SFC_CODE_EOP)
                .getValue();
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP090_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
        param.setProductCode(S_PRODUCT_CODE);
@@ -218,9 +189,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        Object eopSfcCode = miloService.
                readFromOpcUa(OPCElement.OP090_S_SFC_CODE_EOP)
                .getValue();
        if(null != eopSfcCode) {
            //根据分总成编码,将EOP物料数据绑定关系修改为总成编码
@@ -235,7 +204,7 @@
            logger.info("S_SFC_CODE:" + S_SFC_CODE);
            logger.info("eopSfcCode:" + eopSfcCode);
        }
        //查询COP和BOP是否合格
       /* //查询COP和BOP是否合格
        PassingStationCollectionParam passingStationCollectionParam = new PassingStationCollectionParam();
        passingStationCollectionParam.setSfcCode(S_SFC_CODE);
        List<PassingStationCollectionResult> passingStationCollectionResultList =
@@ -262,10 +231,9 @@
                productionOrderRecordsParam.setWhetherPass("2");
                productionOrderRecordsService.update(productionOrderRecordsParam);
            }
        }
        }*/
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP090_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
    public void handleMaterial() {
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP100Callback.java
@@ -41,7 +41,7 @@
import java.util.List;
@Component
public class OP100Callback implements SubscriptionCallback {
public class OP100Callback{
    public MiloService miloService;
@@ -125,42 +125,7 @@
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.OP100_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP100_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.OP100_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.OP100_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -198,7 +163,10 @@
                readFromOpcUa(OPCElement.OP100_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        if("2".equals(S_PRODUCT_STATE_CODE)){
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP100_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
      /*  if("2".equals(S_PRODUCT_STATE_CODE)){
            ProductionOrderRecordsParam productionOrderRecordsParam = new ProductionOrderRecordsParam();
            productionOrderRecordsParam.setWorkOrderNo(S_ORDER_CODE);
            productionOrderRecordsParam.setProductNo(S_SFC_CODE);
@@ -209,7 +177,7 @@
                productionOrderRecordsParam.setWhetherPass(S_PRODUCT_STATE_CODE);
                productionOrderRecordsService.update(productionOrderRecordsParam);
            }
        }
        }*/
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -222,8 +190,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP100_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP110Callback.java
@@ -41,7 +41,7 @@
import java.util.List;
@Component
public class OP110Callback implements SubscriptionCallback {
public class OP110Callback {
    public MiloService miloService;
@@ -125,43 +125,6 @@
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.OP110_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP110_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.OP110_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.OP110_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
        logger.info("handleOrder PC处理开始!");
@@ -198,7 +161,10 @@
                readFromOpcUa(OPCElement.OP110_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        if("2".equals(S_PRODUCT_STATE_CODE)){
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP110_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
       /* if("2".equals(S_PRODUCT_STATE_CODE)){
            ProductionOrderRecordsParam productionOrderRecordsParam = new ProductionOrderRecordsParam();
            productionOrderRecordsParam.setWorkOrderNo(S_ORDER_CODE);
            productionOrderRecordsParam.setProductNo(S_SFC_CODE);
@@ -209,7 +175,7 @@
                productionOrderRecordsParam.setWhetherPass(S_PRODUCT_STATE_CODE);
                productionOrderRecordsService.update(productionOrderRecordsParam);
            }
        }
        }*/
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -222,8 +188,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP110_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP120BCallback.java
@@ -41,7 +41,7 @@
import java.util.List;
@Component
public class OP120BCallback implements SubscriptionCallback {
public class OP120BCallback {
    public MiloService miloService;
@@ -125,43 +125,6 @@
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.OP120B_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP120B_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.OP120B_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.OP120B_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
        logger.info("handleOrder PC处理开始!");
@@ -198,7 +161,10 @@
                readFromOpcUa(OPCElement.OP120B_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        if("2".equals(S_PRODUCT_STATE_CODE)){
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP120B_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
      /*  if("2".equals(S_PRODUCT_STATE_CODE)){
            ProductionOrderRecordsParam productionOrderRecordsParam = new ProductionOrderRecordsParam();
            productionOrderRecordsParam.setWorkOrderNo(S_ORDER_CODE);
            productionOrderRecordsParam.setProductNo(S_SFC_CODE);
@@ -209,7 +175,7 @@
                productionOrderRecordsParam.setWhetherPass(S_PRODUCT_STATE_CODE);
                productionOrderRecordsService.update(productionOrderRecordsParam);
            }
        }
        }*/
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -222,8 +188,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP120B_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP120Callback.java
@@ -41,7 +41,7 @@
import java.util.List;
@Component
public class OP120Callback implements SubscriptionCallback {
public class OP120Callback{
    public MiloService miloService;
@@ -125,43 +125,6 @@
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.OP120_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP120_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.OP120_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.OP120_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
        logger.info("handleOrder PC处理开始!");
@@ -198,7 +161,11 @@
                readFromOpcUa(OPCElement.OP120_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        if("2".equals(S_PRODUCT_STATE_CODE)){
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP120_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
      /*  if("2".equals(S_PRODUCT_STATE_CODE)){
            ProductionOrderRecordsParam productionOrderRecordsParam = new ProductionOrderRecordsParam();
            productionOrderRecordsParam.setWorkOrderNo(S_ORDER_CODE);
            productionOrderRecordsParam.setProductNo(S_SFC_CODE);
@@ -209,7 +176,7 @@
                productionOrderRecordsParam.setWhetherPass(S_PRODUCT_STATE_CODE);
                productionOrderRecordsService.update(productionOrderRecordsParam);
            }
        }
        }*/
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -222,8 +189,6 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP120_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP130BCallback.java
@@ -41,7 +41,7 @@
import java.util.List;
@Component
public class OP130BCallback implements SubscriptionCallback {
public class OP130BCallback{
    public MiloService miloService;
@@ -124,42 +124,6 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.OP130B_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP130B_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.OP130B_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.OP130B_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -197,7 +161,10 @@
                readFromOpcUa(OPCElement.OP130B_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        if("2".equals(S_PRODUCT_STATE_CODE)){
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP130B_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
  /*      if("2".equals(S_PRODUCT_STATE_CODE)){
            ProductionOrderRecordsParam productionOrderRecordsParam = new ProductionOrderRecordsParam();
            productionOrderRecordsParam.setWorkOrderNo(S_ORDER_CODE);
            productionOrderRecordsParam.setProductNo(S_SFC_CODE);
@@ -208,7 +175,7 @@
                productionOrderRecordsParam.setWhetherPass(S_PRODUCT_STATE_CODE);
                productionOrderRecordsService.update(productionOrderRecordsParam);
            }
        }
        }*/
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -221,8 +188,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP130B_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP130Callback.java
@@ -41,7 +41,7 @@
import java.util.List;
@Component
public class OP130Callback implements SubscriptionCallback {
public class OP130Callback{
    public MiloService miloService;
@@ -125,42 +125,7 @@
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.OP130_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP130_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.OP130_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.OP130_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -198,7 +163,10 @@
                readFromOpcUa(OPCElement.OP130_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        if("2".equals(S_PRODUCT_STATE_CODE)){
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP130_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
      /*  if("2".equals(S_PRODUCT_STATE_CODE)){
            ProductionOrderRecordsParam productionOrderRecordsParam = new ProductionOrderRecordsParam();
            productionOrderRecordsParam.setWorkOrderNo(S_ORDER_CODE);
            productionOrderRecordsParam.setProductNo(S_SFC_CODE);
@@ -209,7 +177,7 @@
                productionOrderRecordsParam.setWhetherPass(S_PRODUCT_STATE_CODE);
                productionOrderRecordsService.update(productionOrderRecordsParam);
            }
        }
        }*/
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -222,8 +190,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP130_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP140Callback.java
@@ -41,7 +41,7 @@
import java.util.List;
@Component
public class OP140Callback implements SubscriptionCallback {
public class OP140Callback{
    public MiloService miloService;
@@ -125,42 +125,6 @@
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.OP140_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP140_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.OP140_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.OP140_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -197,8 +161,9 @@
        String S_PRODUCT_STATE_CODE = miloService.
                readFromOpcUa(OPCElement.OP140_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        if("2".equals(S_PRODUCT_STATE_CODE)){
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP140_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
     /*   if("2".equals(S_PRODUCT_STATE_CODE)){
            ProductionOrderRecordsParam productionOrderRecordsParam = new ProductionOrderRecordsParam();
            productionOrderRecordsParam.setWorkOrderNo(S_ORDER_CODE);
            productionOrderRecordsParam.setProductNo(S_SFC_CODE);
@@ -209,7 +174,7 @@
                productionOrderRecordsParam.setWhetherPass(S_PRODUCT_STATE_CODE);
                productionOrderRecordsService.update(productionOrderRecordsParam);
            }
        }
        }*/
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -222,8 +187,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP140_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP150Callback.java
@@ -41,7 +41,7 @@
import java.util.List;
@Component
public class OP150Callback implements SubscriptionCallback {
public class OP150Callback {
    public MiloService miloService;
@@ -125,42 +125,6 @@
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.OP150_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP150_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.OP150_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.OP150_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -198,7 +162,9 @@
                readFromOpcUa(OPCElement.OP150_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        if("2".equals(S_PRODUCT_STATE_CODE)){
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP150_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
      /*  if("2".equals(S_PRODUCT_STATE_CODE)){
            ProductionOrderRecordsParam productionOrderRecordsParam = new ProductionOrderRecordsParam();
            productionOrderRecordsParam.setWorkOrderNo(S_ORDER_CODE);
            productionOrderRecordsParam.setProductNo(S_SFC_CODE);
@@ -209,7 +175,7 @@
                productionOrderRecordsParam.setWhetherPass(S_PRODUCT_STATE_CODE);
                productionOrderRecordsService.update(productionOrderRecordsParam);
            }
        }
        }*/
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -222,8 +188,6 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP150_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP160Callback.java
@@ -41,7 +41,7 @@
import java.util.List;
@Component
public class OP160Callback implements SubscriptionCallback {
public class OP160Callback {
    public MiloService miloService;
@@ -125,42 +125,6 @@
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.OP160_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP160_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.OP160_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.OP160_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -197,8 +161,9 @@
        String S_PRODUCT_STATE_CODE = miloService.
                readFromOpcUa(OPCElement.OP160_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        if("2".equals(S_PRODUCT_STATE_CODE)){
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP160_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
     /*   if("2".equals(S_PRODUCT_STATE_CODE)){
            ProductionOrderRecordsParam productionOrderRecordsParam = new ProductionOrderRecordsParam();
            productionOrderRecordsParam.setWorkOrderNo(S_ORDER_CODE);
            productionOrderRecordsParam.setProductNo(S_SFC_CODE);
@@ -209,7 +174,7 @@
                productionOrderRecordsParam.setWhetherPass(S_PRODUCT_STATE_CODE);
                productionOrderRecordsService.update(productionOrderRecordsParam);
            }
        }
        }*/
        //处理过站信息
        PassingStationCollectionParam param = new PassingStationCollectionParam();
        param.setWorkOrderNo(S_ORDER_CODE);
@@ -222,8 +187,7 @@
        param.setOutRsSign(S_PRODUCT_STATE_CODE);//出站是否合格
        passingStationCollectionService.add(param);
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP160_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("handleFinsh PC处理完成!");
    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP170Callback.java
@@ -43,7 +43,7 @@
import java.util.List;
@Component
public class OP170Callback implements SubscriptionCallback {
public class OP170Callback {
    public MiloService miloService;
@@ -127,42 +127,7 @@
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            //心跳
            if(null != value && identifier.equals(OPCElement.OP170_F_HEART_BEAT)){
                if( "false".equals(value.toString()))
                {
                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP170_F_HEART_BEAT,true);
                    miloService.writeToOpcUa(entity);
                }
            }
            //PLC进站
            else if(null != value && identifier.equals(OPCElement.OP170_J_PLC_START)){
                if("true".equals(value.toString())){
                    handleOrder();
                }
            }
            //PLC出站
            else if(null != value && identifier.equals(OPCElement.OP170_J_PLC_FINISH)){
                if("true".equals(value.toString())){
                    handleFinsh();
                    handleInfo();
                    handleMaterial();
                }
            }else{
                System.out.println("值没有变");
            }
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    //PC读工单
    public void handleOrder() throws Exception {
@@ -199,7 +164,8 @@
        String S_PRODUCT_STATE_CODE = miloService.
                readFromOpcUa(OPCElement.OP170_S_PRODUCT_STATE_CODE)
                .getValue().toString();
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP170_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        //修改报工记录
        ProductionOrderRecordsParam productionOrderRecordsParam = new ProductionOrderRecordsParam();
        productionOrderRecordsParam.setWorkOrderNo(S_ORDER_CODE);
@@ -240,8 +206,7 @@
            }
        }
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP170_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        logger.info("OP170工位,handleFinsh PC处理完成!");
    }
    public void handleMaterial() {
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/StateCallback.java
@@ -58,7 +58,7 @@
import java.util.Random;
@Component
public class StateCallback implements SubscriptionCallback {
public class StateCallback{
    public MiloService miloService;
@@ -141,19 +141,7 @@
        this.productionOrderRecordsService = productionOrderRecordsService;
        this.productionOrderBatchInfoService = productionOrderBatchInfoService;
    }
    @Override
    public void onSubscribe(String identifier, Object value) {
        String ecpStr = "";//异常记录标记
        try {
            handleInfo();
        } catch (Exception e) {
            ecpStr ="出现异常:" + logUtil.getTrace(e);
        }finally {
            if(!"".equals(ecpStr)){
                logger.info(ecpStr+"\r\n");
            }
        }
    }
    public void handleInfo() throws Exception {
        logger.info("OP100工位,handleInfo START!");
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/init/CustomRunner.java
@@ -96,7 +96,6 @@
        System.out.println("start run^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
        List<String> lists = getList();
        miloService.subscriptionFromOpcUa(lists,InitCallback);
        System.out.println("end run^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
    }
@@ -259,7 +258,7 @@
        lists.add(OPCElement.OP170_J_PLC_START);
        lists.add(OPCElement.OP170_J_PLC_FINISH);
        if(null == stateLists ){
        /*if(null == stateLists ){
            EquipmentInfoParam equipmentInfoParam = new EquipmentInfoParam();
            stateLists = equipmentInfoService.findListBySpec(equipmentInfoParam);
        }
@@ -271,7 +270,7 @@
                    lists.add(result.getSpareField1());
                }
            }
        }
        }*/
        return lists;
    }
}