cl
2024-01-19 e0fac38b26845f25de479783e0c76cf12a5311e0
修改数据采集
已修改42个文件
1314 ■■■■■ 文件已修改
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/mapper/mapping/ProductionOrderBatchInfoMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/opc/OPCComm.java 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP010/impl/BOP010ServerInterfaceImpl.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP020/impl/BOP020ServerInterfaceImpl.java 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP030/impl/BOP030ServerInterfaceImpl.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP030B/impl/BOP030BServerInterfaceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP040/impl/BOP040ServerInterfaceImpl.java 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP040B/impl/BOP040BServerInterfaceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/COP010/impl/COP010ServerInterfaceImpl.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/COP020/impl/COP020ServerInterfaceImpl.java 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/COP030/impl/COP030ServerInterfaceImpl.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/DOP010/impl/DOP010ServerInterfaceImpl.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/DOP020/impl/DOP020ServerInterfaceImpl.java 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP010/impl/EOP010ServerInterfaceImpl.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP020/impl/EOP020ServerInterfaceImpl.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP030/impl/EOP030ServerInterfaceImpl.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP040/impl/EOP040ServerInterfaceImpl.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP050/impl/EOP050ServerInterfaceImpl.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP060/impl/EOP060ServerInterfaceImpl.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP070/impl/EOP070ServerInterfaceImpl.java 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP070B/impl/EOP070BServerInterfaceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP080/impl/EOP080ServerInterfaceImpl.java 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP090/impl/EOP090ServerInterfaceImpl.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP090B/impl/EOP090BServerInterfaceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP010/impl/OP010ServerInterfaceImpl.java 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP020/impl/OP020ServerInterfaceImpl.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP030/impl/OP030ServerInterfaceImpl.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP040/impl/OP040ServerInterfaceImpl.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP050/impl/OP050ServerInterfaceImpl.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP070/impl/OP070ServerInterfaceImpl.java 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP080/impl/OP080ServerInterfaceImpl.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP090/impl/OP090ServerInterfaceImpl.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP100/impl/OP100ServerInterfaceImpl.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP110/impl/OP110ServerInterfaceImpl.java 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP120/impl/OP120ServerInterfaceImpl.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP120B/impl/OP120BServerInterfaceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP130/impl/OP130ServerInterfaceImpl.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP130B/impl/OP130BServerInterfaceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP140/impl/OP140ServerInterfaceImpl.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP150/impl/OP150ServerInterfaceImpl.java 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP160/impl/OP160ServerInterfaceImpl.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP170/impl/OP170ServerInterfaceImpl.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/mapper/mapping/ProductionOrderBatchInfoMapper.xml
@@ -39,10 +39,10 @@
        <include refid="Base_Column_List"/>
        from om_production_order_batch_info where 1 = 1
        <if test="paramCondition.workOrderNo != null and paramCondition.workOrderNo != ''">
            and work_order_no like CONCAT('%',#{paramCondition.workOrderNo},'%')
            and work_order_no = #{paramCondition.workOrderNo}
        </if>
        <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
            and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
            and location_code = #{paramCondition.locationCode}
        </if>
    </select>
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/opc/OPCComm.java
@@ -767,6 +767,135 @@
            // 同步读取,500ms一次
            final AccessBase access = new SyncAccess(server, 500);
            //OP010回调
            access.addItem(OPCElement.OP010_F_HEART_BEAT, new DataCallBack_OP010_F_HEART_BEAT());//心跳
            /* access.addItem(OPCElement.OP010_E_STATE, new DataCallBack_OP010_E_STATE());//设备状态*/
            //OP020回调
            access.addItem(OPCElement.OP020_F_HEART_BEAT, new DataCallBack_OP020_F_HEART_BEAT());//心跳
            //OP030回调
            access.addItem(OPCElement.OP030_F_HEART_BEAT, new DataCallBack_OP030_F_HEART_BEAT());//心跳
            //OP040回调
            access.addItem(OPCElement.OP040_F_HEART_BEAT, new DataCallBack_OP040_F_HEART_BEAT());//心跳
            //OP050回调
            access.addItem(OPCElement.OP050_F_HEART_BEAT, new DataCallBack_OP050_F_HEART_BEAT());//心跳
            //OP070回调
            access.addItem(OPCElement.OP070_F_HEART_BEAT, new DataCallBack_OP070_F_HEART_BEAT());//心跳
            //OP080回调
            access.addItem(OPCElement.OP080_F_HEART_BEAT, new DataCallBack_OP080_F_HEART_BEAT());//心跳
            //OP090回调
            access.addItem(OPCElement.OP090_F_HEART_BEAT, new DataCallBack_OP090_F_HEART_BEAT());//心跳
            //OP100回调
            access.addItem(OPCElement.OP100_F_HEART_BEAT, new DataCallBack_OP100_F_HEART_BEAT());//心跳
            //OP110回调
            access.addItem(OPCElement.OP110_F_HEART_BEAT, new DataCallBack_OP110_F_HEART_BEAT());//心跳
            //OP120回调
            access.addItem(OPCElement.OP120_F_HEART_BEAT, new DataCallBack_OP120_F_HEART_BEAT());//心跳
            //OP120B回调
            access.addItem(OPCElement.OP120B_F_HEART_BEAT, new DataCallBack_OP120B_F_HEART_BEAT());//心跳
            //OP130回调
            access.addItem(OPCElement.OP130_F_HEART_BEAT, new DataCallBack_OP130_F_HEART_BEAT());//心跳
            //OP130B回调
            access.addItem(OPCElement.OP130B_F_HEART_BEAT, new DataCallBack_OP130B_F_HEART_BEAT());//心跳
            //OP140回调
            access.addItem(OPCElement.OP140_F_HEART_BEAT, new DataCallBack_OP140_F_HEART_BEAT());//心跳
            //OP150回调
/*
            access.addItem(OPCElement.OP150_F_HEART_BEAT, new DataCallBack_OP150_F_HEART_BEAT());//心跳
*/
            //OP160回调
            access.addItem(OPCElement.OP160_F_HEART_BEAT, new DataCallBack_OP160_F_HEART_BEAT());//心跳
            //OP170回调
            access.addItem(OPCElement.OP170_F_HEART_BEAT, new DataCallBack_OP170_F_HEART_BEAT());//心跳
            //COP010回调
            access.addItem(OPCElement.COP010_F_HEART_BEAT, new DataCallBack_COP010_F_HEART_BEAT());//心跳
            //COP020回调
            access.addItem(OPCElement.COP020_F_HEART_BEAT, new DataCallBack_COP020_F_HEART_BEAT());//心跳
            //COP030回调
            access.addItem(OPCElement.COP030_F_HEART_BEAT, new DataCallBack_COP030_F_HEART_BEAT());//心跳
            //BOP010回调
            access.addItem(OPCElement.BOP010_F_HEART_BEAT, new DataCallBack_BOP010_F_HEART_BEAT());//心跳
            //BOP020回调
            access.addItem(OPCElement.BOP020_F_HEART_BEAT, new DataCallBack_BOP020_F_HEART_BEAT());//心跳
            //BOP030回调
            access.addItem(OPCElement.BOP030_F_HEART_BEAT, new DataCallBack_BOP030_F_HEART_BEAT());//心跳
            //BOP030B回调
            access.addItem(OPCElement.BOP030B_F_HEART_BEAT, new DataCallBack_BOP030B_F_HEART_BEAT());//心跳
            //BOP040回调
            access.addItem(OPCElement.BOP040_F_HEART_BEAT, new DataCallBack_BOP040_F_HEART_BEAT());//心跳
            //BOP040B回调
            access.addItem(OPCElement.BOP040B_F_HEART_BEAT, new DataCallBack_BOP040B_F_HEART_BEAT());//心跳
            //DOP010回调
            access.addItem(OPCElement.DOP010_F_HEART_BEAT, new DataCallBack_DOP010_F_HEART_BEAT());//心跳
            //DOP020回调
            /* access.addItem(OPCElement.DOP020_F_HEART_BEAT, new DataCallBack_DOP020_F_HEART_BEAT());//心跳*/
            //EOP010回调
            access.addItem(OPCElement.EOP010_F_HEART_BEAT, new DataCallBack_EOP010_F_HEART_BEAT());//心跳
            //EOP020回调
            access.addItem(OPCElement.EOP020_F_HEART_BEAT, new DataCallBack_EOP020_F_HEART_BEAT());//心跳
            //EOP030回调
            access.addItem(OPCElement.EOP030_F_HEART_BEAT, new DataCallBack_EOP030_F_HEART_BEAT());//心跳
            //EOP040回调
            access.addItem(OPCElement.EOP040_F_HEART_BEAT, new DataCallBack_EOP040_F_HEART_BEAT());//心跳
            //EOP050回调
            access.addItem(OPCElement.EOP050_F_HEART_BEAT, new DataCallBack_EOP050_F_HEART_BEAT());//心跳
            //EOP060回调
            access.addItem(OPCElement.EOP060_F_HEART_BEAT, new DataCallBack_EOP060_F_HEART_BEAT());//心跳
            //EOP070回调
            access.addItem(OPCElement.EOP070_F_HEART_BEAT, new DataCallBack_EOP070_F_HEART_BEAT());//心跳
            //EOP070B回调
            /*access.addItem(OPCElement.EOP070B_F_HEART_BEAT, new DataCallBack_EOP070B_F_HEART_BEAT());//心跳*/
            //EOP080回调
            access.addItem(OPCElement.EOP080_F_HEART_BEAT, new DataCallBack_EOP080_F_HEART_BEAT());//心跳
            //EOP090回调
            access.addItem(OPCElement.EOP090_F_HEART_BEAT, new DataCallBack_EOP090_F_HEART_BEAT());//心跳
            //EOP090B回调
            access.addItem(OPCElement.EOP090B_F_HEART_BEAT, new DataCallBack_EOP090B_F_HEART_BEAT());//心跳
            //OP010组
            final Group OP010_GROUP = server.addGroup("OP010");
            OP010_F_HEART_BEAT = OP010_GROUP.addItem((OPCElement.OP010_F_HEART_BEAT));//心跳
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP010/impl/BOP010ServerInterfaceImpl.java
@@ -83,8 +83,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getBOP010_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
            /*String isHeartBeat = OPCUnit.read(opc.getBOP010_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.BOP010_F_HEART_BEAT) {
@@ -110,8 +110,8 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getBOP010_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleFinsh();
                        handleMaterial();
                    }
                }
@@ -215,13 +215,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getBOP010_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getBOP010_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getBOP010_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -231,22 +225,10 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP020/impl/BOP020ServerInterfaceImpl.java
@@ -74,8 +74,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getBOP020_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
            /*String isHeartBeat = OPCUnit.read(opc.getBOP020_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.BOP020_F_HEART_BEAT) {
                //PC读工单
@@ -93,9 +93,11 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getBOP020_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                        handleMaterial();
                    }
                }
@@ -176,13 +178,7 @@
        logger.info("BOP020工位,handleInfo END!");
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getBOP020_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getBOP020_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getBOP020_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -192,22 +188,9 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP030/impl/BOP030ServerInterfaceImpl.java
@@ -81,8 +81,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getBOP030_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
      /*      String isHeartBeat = OPCUnit.read(opc.getBOP030_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.BOP030_F_HEART_BEAT) {
                //PC读工单
@@ -100,9 +100,9 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getBOP030_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                        handleMaterial();
                    }
                }
                handleOilState();
@@ -211,13 +211,7 @@
        logger.info("BOP030工位,handleInfo END!");
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getBOP030_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getBOP030_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getBOP030_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -227,22 +221,10 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP030B/impl/BOP030BServerInterfaceImpl.java
@@ -69,9 +69,9 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getBOP030B_F_HEART_BEAT());
         /*   String isHeartBeat = OPCUnit.read(opc.getBOP030B_F_HEART_BEAT());
            assert isHeartBeat != null;
            setHeartbeat(isHeartBeat);
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.BOP030B_F_HEART_BEAT) {
                //PC读工单
@@ -89,8 +89,8 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getBOP030B_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                    }
                }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP040/impl/BOP040ServerInterfaceImpl.java
@@ -74,9 +74,9 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getBOP040_F_HEART_BEAT());
        /*    String isHeartBeat = OPCUnit.read(opc.getBOP040_F_HEART_BEAT());
            assert isHeartBeat != null;
            setHeartbeat(isHeartBeat);
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.BOP040_F_HEART_BEAT) {
                //PC读工单
@@ -94,9 +94,9 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getBOP040_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                        handleMaterial();
                    }
                }
@@ -177,13 +177,7 @@
        logger.info("BOP040工位,handleInfo END!");
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getBOP040_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getBOP040_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getBOP040_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -193,22 +187,9 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP040B/impl/BOP040BServerInterfaceImpl.java
@@ -69,9 +69,9 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getBOP040B_F_HEART_BEAT());
           /* String isHeartBeat = OPCUnit.read(opc.getBOP040B_F_HEART_BEAT());
            assert isHeartBeat != null;
            setHeartbeat(isHeartBeat);
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.BOP040B_F_HEART_BEAT) {
                //PC读工单
@@ -89,8 +89,8 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getBOP040B_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                    }
                }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/COP010/impl/COP010ServerInterfaceImpl.java
@@ -81,8 +81,8 @@
    public synchronized void monitor() {
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getCOP010_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
        /*    String isHeartBeat = OPCUnit.read(opc.getCOP010_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.COP010_F_HEART_BEAT) {
@@ -107,8 +107,8 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getCOP010_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleFinsh();
                        handleMaterial();
                    }
                }
@@ -213,13 +213,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getCOP010_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getCOP010_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getCOP010_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -229,22 +223,9 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/COP020/impl/COP020ServerInterfaceImpl.java
@@ -73,8 +73,8 @@
    public synchronized void monitor() {
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getCOP020_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
        /*    String isHeartBeat = OPCUnit.read(opc.getCOP020_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.COP020_F_HEART_BEAT) {
                //PC读工单
@@ -92,9 +92,9 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getCOP020_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                        handleMaterial();
                    }
                }
@@ -175,13 +175,7 @@
        logger.info("COP020工位,handleInfo END!");
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getCOP020_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getCOP020_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getCOP020_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -191,22 +185,9 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/COP030/impl/COP030ServerInterfaceImpl.java
@@ -73,8 +73,8 @@
    public synchronized void monitor() {
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getCOP030_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
         /*   String isHeartBeat = OPCUnit.read(opc.getCOP030_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.COP030_F_HEART_BEAT) {
                //PC读工单
@@ -92,9 +92,9 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getCOP030_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                        handleMaterial();
                    }
                }
@@ -175,13 +175,7 @@
        logger.info("COP030工位,handleInfo END!");
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getCOP030_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getCOP030_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getCOP030_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -191,22 +185,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/DOP010/impl/DOP010ServerInterfaceImpl.java
@@ -78,8 +78,8 @@
    public synchronized void monitor() {
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getDOP010_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
          /*  String isHeartBeat = OPCUnit.read(opc.getDOP010_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.DOP010_F_HEART_BEAT) {
@@ -104,8 +104,8 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getDOP010_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleFinsh();
                        handleMaterial();
                    }
                }
@@ -219,13 +219,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getDOP010_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getDOP010_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getDOP010_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -235,22 +229,10 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/DOP020/impl/DOP020ServerInterfaceImpl.java
@@ -80,8 +80,8 @@
    public synchronized void monitor() {
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getDOP020_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
           /* String isHeartBeat = OPCUnit.read(opc.getDOP020_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.DOP020_F_HEART_BEAT) {
                //PC读工单
@@ -99,9 +99,9 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getDOP020_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                        handleMaterial();
                    }
                }
                handleOilState();
@@ -210,13 +210,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getDOP020_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getDOP020_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getDOP020_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -226,22 +220,9 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP010/impl/EOP010ServerInterfaceImpl.java
@@ -73,8 +73,8 @@
    public synchronized void monitor() {
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getEOP010_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
        /*    String isHeartBeat = OPCUnit.read(opc.getEOP010_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.EOP010_F_HEART_BEAT) {
                //PC读工单
@@ -92,9 +92,9 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getEOP010_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                        handleMaterial();
                    }
                }
@@ -124,13 +124,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getEOP010_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getEOP010_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getEOP010_S_SFC_CODE());//总成编码
        }
        String materialCode = OPCUnit.read(opc.getEOP010_S_MATERIAL_CODE());
        MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
        materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
@@ -153,22 +147,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                materialTraceabilityParam.setMaterialCode(productionOrderBatchInfoResult.getMaterialCode());//物料编码
                materialTraceabilityParam.setMaterialBatchNo(productionOrderBatchInfoResult.getBatch());//物料批次
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP020/impl/EOP020ServerInterfaceImpl.java
@@ -73,8 +73,8 @@
    public synchronized void monitor() {
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getEOP020_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
         /*   String isHeartBeat = OPCUnit.read(opc.getEOP020_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.EOP020_F_HEART_BEAT) {
                //PC读工单
@@ -92,9 +92,9 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getEOP020_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                        handleMaterial();
                    }
                }
@@ -176,13 +176,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getEOP020_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getEOP020_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getEOP020_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -192,22 +186,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP030/impl/EOP030ServerInterfaceImpl.java
@@ -78,8 +78,8 @@
    public synchronized void monitor() {
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getEOP030_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
         /*   String isHeartBeat = OPCUnit.read(opc.getEOP030_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.EOP030_F_HEART_BEAT) {
                //PC读工单
@@ -97,9 +97,9 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getEOP030_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                        handleMaterial();
                    }
                }
@@ -182,13 +182,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getEOP030_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getEOP030_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getEOP030_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -198,22 +192,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP040/impl/EOP040ServerInterfaceImpl.java
@@ -73,8 +73,8 @@
    public synchronized void monitor() {
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getEOP040_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
     /*       String isHeartBeat = OPCUnit.read(opc.getEOP040_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.EOP040_F_HEART_BEAT) {
                //PC读工单
@@ -92,9 +92,9 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getEOP040_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                        handleMaterial();
                    }
                }
@@ -176,13 +176,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getEOP040_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getEOP040_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getEOP040_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -192,22 +186,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP050/impl/EOP050ServerInterfaceImpl.java
@@ -73,8 +73,8 @@
    public synchronized void monitor() {
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getEOP050_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
   /*         String isHeartBeat = OPCUnit.read(opc.getEOP050_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.EOP050_F_HEART_BEAT) {
                //PC读工单
@@ -92,9 +92,9 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getEOP050_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                        handleMaterial();
                    }
                }
@@ -176,13 +176,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getEOP050_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getEOP050_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getEOP050_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -192,22 +186,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP060/impl/EOP060ServerInterfaceImpl.java
@@ -80,8 +80,8 @@
    public synchronized void monitor() {
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getEOP060_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
          /*  String isHeartBeat = OPCUnit.read(opc.getEOP060_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.EOP060_F_HEART_BEAT) {
                //PC读工单
@@ -105,9 +105,9 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getEOP060_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                        handleMaterial();
                    }
                }
@@ -246,13 +246,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getEOP060_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getEOP060_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getEOP060_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -262,22 +256,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP070/impl/EOP070ServerInterfaceImpl.java
@@ -73,8 +73,8 @@
    public synchronized void monitor() {
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getEOP070_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
         /*   String isHeartBeat = OPCUnit.read(opc.getEOP070_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.EOP070_F_HEART_BEAT) {
                //PC读工单
@@ -92,9 +92,9 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getEOP070_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                        handleMaterial();
                    }
                }
@@ -176,13 +176,6 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getEOP070_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getEOP070_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getEOP070_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -192,22 +185,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP070B/impl/EOP070BServerInterfaceImpl.java
@@ -68,8 +68,8 @@
    public synchronized void monitor() {
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getEOP070B_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
         /*   String isHeartBeat = OPCUnit.read(opc.getEOP070B_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.EOP070B_F_HEART_BEAT) {
                //PC读工单
@@ -87,8 +87,8 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getEOP070B_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                    }
                }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP080/impl/EOP080ServerInterfaceImpl.java
@@ -73,8 +73,8 @@
    public synchronized void monitor() {
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getEOP080_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
           /* String isHeartBeat = OPCUnit.read(opc.getEOP080_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.EOP080_F_HEART_BEAT) {
                //PC读工单
@@ -92,9 +92,9 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getEOP080_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                        handleMaterial();
                    }
                }
@@ -176,13 +176,6 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getEOP080_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getEOP080_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getEOP080_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -192,22 +185,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP090/impl/EOP090ServerInterfaceImpl.java
@@ -73,8 +73,8 @@
    public synchronized void monitor() {
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getEOP090_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
          /*  String isHeartBeat = OPCUnit.read(opc.getEOP090_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.EOP090_F_HEART_BEAT) {
                //PC读工单
@@ -92,9 +92,9 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getEOP090_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                        handleMaterial();
                    }
                }
@@ -176,13 +176,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getEOP090_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getEOP090_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getEOP090_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -192,22 +186,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP090B/impl/EOP090BServerInterfaceImpl.java
@@ -68,8 +68,8 @@
    public synchronized void monitor() {
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getEOP090B_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
           /* String isHeartBeat = OPCUnit.read(opc.getEOP090B_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.EOP090B_F_HEART_BEAT) {
                //PC读工单
@@ -87,8 +87,8 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getEOP090B_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                    }
                }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP010/impl/OP010ServerInterfaceImpl.java
@@ -89,8 +89,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getOP010_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
           /* String isHeartBeat = OPCUnit.read(opc.getOP010_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.OP010_F_HEART_BEAT) {
@@ -116,8 +116,13 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getOP010_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        logger.info("handleFinsh开始时间:"+new Date());
                        handleFinsh();
                        logger.info("handleFinsh完成时间:"+new Date());
                        logger.info("handleMaterial开始时间:"+new Date());
                        handleMaterial();
                        logger.info("handleMaterial完成时间:"+new Date());
                    }
                }
@@ -271,13 +276,7 @@
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getOP010_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getOP010_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getOP010_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -287,22 +286,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP020/impl/OP020ServerInterfaceImpl.java
@@ -77,8 +77,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getOP020_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
          /*  String isHeartBeat = OPCUnit.read(opc.getOP020_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.OP020_F_HEART_BEAT) {
                //PC读工单
@@ -96,9 +96,15 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getOP020_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        logger.info("handleFinsh开始时间:"+new Date());
                        handleFinsh();
                        logger.info("handleFinsh完成时间:"+new Date());
                        logger.info("handleInfo开始时间:"+new Date());
                        handleInfo();
                        logger.info("handleInfo完成时间:"+new Date());
                        logger.info("handleMaterial开始时间:"+new Date());
                        handleMaterial();
                        logger.info("handleMaterial完成时间:"+new Date());
                    }
                }
@@ -127,13 +133,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getOP020_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getOP020_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getOP020_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -143,22 +143,9 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP030/impl/OP030ServerInterfaceImpl.java
@@ -77,8 +77,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getOP030_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
       /*     String isHeartBeat = OPCUnit.read(opc.getOP030_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.OP030_F_HEART_BEAT) {
                //PC读工单
@@ -96,9 +96,15 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getOP030_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        logger.info("handleFinsh开始时间:"+new Date());
                        handleFinsh();
                        logger.info("handleFinsh完成时间:"+new Date());
                        logger.info("handleInfo开始时间:"+new Date());
                        handleInfo();
                        logger.info("handleInfo完成时间:"+new Date());
                        logger.info("handleMaterial开始时间:"+new Date());
                        handleMaterial();
                        logger.info("handleMaterial完成时间:"+new Date());
                    }
                }
@@ -127,13 +133,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getOP030_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getOP030_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getOP030_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -143,22 +143,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP040/impl/OP040ServerInterfaceImpl.java
@@ -77,8 +77,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getOP040_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
           /* String isHeartBeat = OPCUnit.read(opc.getOP040_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.OP040_F_HEART_BEAT) {
@@ -97,9 +97,15 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getOP040_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        logger.info("handleFinsh开始时间:"+new Date());
                        handleFinsh();
                        logger.info("handleFinsh完成时间:"+new Date());
                        logger.info("handleInfo开始时间:"+new Date());
                        handleInfo();
                        logger.info("handleInfo完成时间:"+new Date());
                        logger.info("handleMaterial开始时间:"+new Date());
                        handleMaterial();
                        logger.info("handleMaterial完成时间:"+new Date());
                    }
                }
@@ -128,13 +134,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getOP040_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getOP040_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getOP040_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -144,22 +144,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP050/impl/OP050ServerInterfaceImpl.java
@@ -85,8 +85,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getOP050_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
           /* String isHeartBeat = OPCUnit.read(opc.getOP050_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.OP050_F_HEART_BEAT) {
                //PC读工单
@@ -104,9 +104,15 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getOP050_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        logger.info("handleFinsh开始时间:"+new Date());
                        handleFinsh();
                        logger.info("handleFinsh完成时间:"+new Date());
                        logger.info("handleInfo开始时间:"+new Date());
                        handleInfo();
                        logger.info("handleInfo完成时间:"+new Date());
                        logger.info("handleMaterial开始时间:"+new Date());
                        handleMaterial();
                        logger.info("handleMaterial完成时间:"+new Date());
                    }
                }
@@ -165,13 +171,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getOP050_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getOP050_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getOP050_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -181,22 +181,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP070/impl/OP070ServerInterfaceImpl.java
@@ -77,8 +77,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getOP070_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
            /*String isHeartBeat = OPCUnit.read(opc.getOP070_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.OP070_F_HEART_BEAT) {
                //PC读工单
@@ -96,9 +96,15 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getOP070_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        logger.info("handleFinsh开始时间:"+new Date());
                        handleFinsh();
                        logger.info("handleFinsh完成时间:"+new Date());
                        logger.info("handleInfo开始时间:"+new Date());
                        handleInfo();
                        logger.info("handleInfo完成时间:"+new Date());
                        logger.info("handleMaterial开始时间:"+new Date());
                        handleMaterial();
                        logger.info("handleMaterial完成时间:"+new Date());
                    }
                }
@@ -127,13 +133,6 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getOP070_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getOP070_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getOP070_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -143,22 +142,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP080/impl/OP080ServerInterfaceImpl.java
@@ -83,8 +83,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getOP080_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
          /*  String isHeartBeat = OPCUnit.read(opc.getOP080_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.OP080_F_HEART_BEAT) {
                //PC读工单
@@ -108,9 +108,15 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getOP080_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        logger.info("handleFinsh开始时间:"+new Date());
                        handleFinsh();
                        logger.info("handleFinsh完成时间:"+new Date());
                        logger.info("handleInfo开始时间:"+new Date());
                        handleInfo();
                        logger.info("handleInfo完成时间:"+new Date());
                        logger.info("handleMaterial开始时间:"+new Date());
                        handleMaterial();
                        logger.info("handleMaterial完成时间:"+new Date());
                    }
                }
@@ -185,13 +191,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getOP080_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getOP080_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getOP080_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -201,22 +201,9 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP090/impl/OP090ServerInterfaceImpl.java
@@ -78,8 +78,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getOP090_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
           /* String isHeartBeat = OPCUnit.read(opc.getOP090_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.OP090_F_HEART_BEAT) {
                //PC读工单
@@ -97,9 +97,15 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getOP090_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        logger.info("handleFinsh开始时间:"+new Date());
                        handleFinsh();
                        logger.info("handleFinsh完成时间:"+new Date());
                        logger.info("handleInfo开始时间:"+new Date());
                        handleInfo();
                        logger.info("handleInfo完成时间:"+new Date());
                        logger.info("handleMaterial开始时间:"+new Date());
                        handleMaterial();
                        logger.info("handleMaterial完成时间:"+new Date());
                    }
                }
@@ -128,13 +134,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getOP090_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getOP090_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getOP090_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -144,22 +144,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP100/impl/OP100ServerInterfaceImpl.java
@@ -76,8 +76,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getOP100_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
          /*  String isHeartBeat = OPCUnit.read(opc.getOP100_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.OP100_F_HEART_BEAT) {
                //PC读工单
@@ -95,9 +95,15 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getOP100_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        logger.info("handleFinsh开始时间:"+new Date());
                        handleFinsh();
                        logger.info("handleFinsh完成时间:"+new Date());
                        logger.info("handleInfo开始时间:"+new Date());
                        handleInfo();
                        logger.info("handleInfo完成时间:"+new Date());
                        logger.info("handleMaterial开始时间:"+new Date());
                        handleMaterial();
                        logger.info("handleMaterial完成时间:"+new Date());
                    }
                }
@@ -142,22 +148,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0 ){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP110/impl/OP110ServerInterfaceImpl.java
@@ -77,8 +77,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getOP110_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
          /*  String isHeartBeat = OPCUnit.read(opc.getOP110_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.OP110_F_HEART_BEAT) {
                //PC读工单
@@ -96,9 +96,15 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getOP110_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        logger.info("handleFinsh开始时间:"+new Date());
                        handleFinsh();
                        logger.info("handleFinsh完成时间:"+new Date());
                        logger.info("handleInfo开始时间:"+new Date());
                        handleInfo();
                        logger.info("handleInfo完成时间:"+new Date());
                        logger.info("handleMaterial开始时间:"+new Date());
                        handleMaterial();
                        logger.info("handleMaterial完成时间:"+new Date());
                    }
                }
@@ -127,13 +133,6 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getOP110_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getOP110_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getOP110_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -143,22 +142,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP120/impl/OP120ServerInterfaceImpl.java
@@ -77,8 +77,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getOP120_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
            /*String isHeartBeat = OPCUnit.read(opc.getOP120_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.OP120_F_HEART_BEAT) {
                //PC读工单
@@ -96,9 +96,15 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getOP120_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        logger.info("handleFinsh开始时间:"+new Date());
                        handleFinsh();
                        logger.info("handleFinsh完成时间:"+new Date());
                        logger.info("handleInfo开始时间:"+new Date());
                        handleInfo();
                        logger.info("handleInfo完成时间:"+new Date());
                        logger.info("handleMaterial开始时间:"+new Date());
                        handleMaterial();
                        logger.info("handleMaterial完成时间:"+new Date());
                    }
                }
@@ -127,13 +133,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getOP120_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getOP120_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getOP120_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -143,22 +143,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP120B/impl/OP120BServerInterfaceImpl.java
@@ -77,8 +77,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getOP120B_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
            /*String isHeartBeat = OPCUnit.read(opc.getOP120B_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.OP120B_F_HEART_BEAT) {
                //PC读工单
@@ -96,9 +96,10 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getOP120B_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        //handleMaterial();
                        handleInfo();
                        handleFinsh();
                        handleInfo();
                       // handleMaterial();
                    }
                }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP130/impl/OP130ServerInterfaceImpl.java
@@ -77,8 +77,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getOP130_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
   /*         String isHeartBeat = OPCUnit.read(opc.getOP130_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.OP130_F_HEART_BEAT) {
@@ -97,9 +97,15 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getOP130_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        logger.info("handleFinsh开始时间:"+new Date());
                        handleFinsh();
                        logger.info("handleFinsh完成时间:"+new Date());
                        logger.info("handleInfo开始时间:"+new Date());
                        handleInfo();
                        logger.info("handleInfo完成时间:"+new Date());
                        logger.info("handleMaterial开始时间:"+new Date());
                        handleMaterial();
                        logger.info("handleMaterial完成时间:"+new Date());
                    }
                }
@@ -144,22 +150,9 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP130B/impl/OP130BServerInterfaceImpl.java
@@ -77,8 +77,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getOP130B_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
          /*  String isHeartBeat = OPCUnit.read(opc.getOP130B_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.OP130B_F_HEART_BEAT) {
@@ -97,9 +97,10 @@
                    if(isPLCFinish.equals("true")){
                        String isFinish = OPCUnit.read(opc.getOP130B_J_PC_FINISH());//PC操作完成
                        if(isFinish.equals("false")){
                           // handleMaterial();
                            handleInfo();
                            handleFinsh();
                            handleInfo();
                            //handleMaterial();
                        }
                    }
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP140/impl/OP140ServerInterfaceImpl.java
@@ -77,8 +77,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getOP140_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
           /* String isHeartBeat = OPCUnit.read(opc.getOP140_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.OP140_F_HEART_BEAT) {
@@ -97,9 +97,16 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getOP140_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        logger.info("handleFinsh开始时间:"+new Date());
                        handleFinsh();
                        logger.info("handleFinsh完成时间:"+new Date());
                        logger.info("handleInfo开始时间:"+new Date());
                        handleInfo();
                        logger.info("handleInfo完成时间:"+new Date());
                        logger.info("handleMaterial开始时间:"+new Date());
                        handleMaterial();
                        logger.info("handleMaterial完成时间:"+new Date());
                    }
                }
@@ -144,22 +151,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP150/impl/OP150ServerInterfaceImpl.java
@@ -77,8 +77,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getOP150_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
           /* String isHeartBeat = OPCUnit.read(opc.getOP150_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.OP150_F_HEART_BEAT) {
                //PC读工单
@@ -96,9 +96,10 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getOP150_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                       /* handleInfo();*/
                        handleMaterial();
                        handleFinsh();
                        //handleInfo();
                        handleMaterial();
                    }
                }
@@ -127,13 +128,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getOP150_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getOP150_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getOP150_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -143,22 +138,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP160/impl/OP160ServerInterfaceImpl.java
@@ -77,8 +77,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getOP160_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
         /*   String isHeartBeat = OPCUnit.read(opc.getOP160_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.OP160_F_HEART_BEAT) {
                //PC读工单
@@ -96,9 +96,16 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getOP160_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        logger.info("handleFinsh开始时间:"+new Date());
                        handleFinsh();
                        logger.info("handleFinsh完成时间:"+new Date());
                        logger.info("handleInfo开始时间:"+new Date());
                        handleInfo();
                        logger.info("handleInfo完成时间:"+new Date());
                        logger.info("handleMaterial开始时间:"+new Date());
                        handleMaterial();
                        logger.info("handleMaterial完成时间:"+new Date());
                    }
                }
@@ -127,13 +134,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getOP160_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getOP160_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getOP160_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -143,22 +144,8 @@
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP170/impl/OP170ServerInterfaceImpl.java
@@ -80,8 +80,8 @@
        String ecpStr = "";//异常记录标记
        try{
            String isHeartBeat = OPCUnit.read(opc.getOP170_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);
           /* String isHeartBeat = OPCUnit.read(opc.getOP170_F_HEART_BEAT());
            setHeartbeat(isHeartBeat);*/
            if(GlobalVariable.OP170_F_HEART_BEAT) {
@@ -100,9 +100,15 @@
                if(isPLCFinish.equals("true")){
                    String isFinish = OPCUnit.read(opc.getOP170_J_PC_FINISH());//PC操作完成
                    if(isFinish.equals("false")){
                        handleMaterial();
                        handleInfo();
                        logger.info("handleFinsh开始时间:"+new Date());
                        handleFinsh();
                        logger.info("handleFinsh完成时间:"+new Date());
                        logger.info("handleInfo开始时间:"+new Date());
                        handleInfo();
                        logger.info("handleInfo完成时间:"+new Date());
                        logger.info("handleMaterial开始时间:"+new Date());
                        handleMaterial();
                        logger.info("handleMaterial完成时间:"+new Date());
                    }
                }
@@ -131,13 +137,7 @@
    }
    public void handleMaterial() {
        if("".equals(S_ORDER_CODE)){
            IN_TIME = DateTool.getLocalTimeForDate();
            S_ORDER_CODE = OPCUnit.read(opc.getOP170_S_ORDER_CODE());//工单编号
            S_PRODUCT_TYPE = OPCUnit.read(opc.getOP170_S_PRODUCT_CODE());//产品编号
            S_PRODUCT_CODE = GlobalVariable.PRODUCT_CODE_MAP.get(S_PRODUCT_TYPE);
            S_SFC_CODE = OPCUnit.read(opc.getOP170_S_SFC_CODE());//总成编码
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);
@@ -146,23 +146,8 @@
        List<ProductionOrderBatchInfoResult> list1 = productionOrderBatchInfoService.findListBySpec(productionOrderBatchInfoParam);
        for(int i=0;i<list1.size();i++){
            ProductionOrderBatchInfoResult productionOrderBatchInfoResult = list1.get(i);
            //判断是否有该工位
            String[] locationCodes = productionOrderBatchInfoResult.getLocationCode().split("/");
            logger.info("当前工位:"+locationCodes.toString());
            boolean isLocationCode = false;
            if(locationCodes.length>0)
            {
                for (int j=0;j<locationCodes.length;j++){
                    String location = locationCodes[j];
                    if(location.equals(LOCATION_CODE)){
                        isLocationCode = true;
                    }
                }
            }
            int remainingQuantity =  productionOrderBatchInfoResult.getResidueQuantity();//剩余数量
            if(remainingQuantity>0 && isLocationCode){
            if(remainingQuantity>0){
                //新增物料追溯
                MaterialTraceabilityParam materialTraceabilityParam = new MaterialTraceabilityParam();
                materialTraceabilityParam.setWorkOrderNo(S_ORDER_CODE);