From e0fac38b26845f25de479783e0c76cf12a5311e0 Mon Sep 17 00:00:00 2001 From: cl <418351270@qq.com> Date: 星期五, 19 一月 2024 10:31:28 +0800 Subject: [PATCH] 修改数据采集 --- guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/COP030/impl/COP030ServerInterfaceImpl.java | 32 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP120/impl/OP120ServerInterfaceImpl.java | 38 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP020/impl/BOP020ServerInterfaceImpl.java | 33 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP040/impl/OP040ServerInterfaceImpl.java | 38 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP050/impl/EOP050ServerInterfaceImpl.java | 32 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP080/impl/OP080ServerInterfaceImpl.java | 37 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP140/impl/OP140ServerInterfaceImpl.java | 31 guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP160/impl/OP160ServerInterfaceImpl.java | 39 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/opc/OPCComm.java | 129 +++++ guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP010/impl/EOP010ServerInterfaceImpl.java | 32 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP120B/impl/OP120BServerInterfaceImpl.java | 9 guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP080/impl/EOP080ServerInterfaceImpl.java | 31 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP090B/impl/EOP090BServerInterfaceImpl.java | 6 guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP030/impl/BOP030ServerInterfaceImpl.java | 32 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/DOP010/impl/DOP010ServerInterfaceImpl.java | 30 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP020/impl/EOP020ServerInterfaceImpl.java | 32 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP030B/impl/BOP030BServerInterfaceImpl.java | 6 guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP010/impl/OP010ServerInterfaceImpl.java | 35 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP030/impl/OP030ServerInterfaceImpl.java | 38 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP070/impl/EOP070ServerInterfaceImpl.java | 31 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP050/impl/OP050ServerInterfaceImpl.java | 38 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP110/impl/OP110ServerInterfaceImpl.java | 37 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP070/impl/OP070ServerInterfaceImpl.java | 37 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP130/impl/OP130ServerInterfaceImpl.java | 29 guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/mapper/mapping/ProductionOrderBatchInfoMapper.xml | 4 guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP130B/impl/OP130BServerInterfaceImpl.java | 9 guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP150/impl/OP150ServerInterfaceImpl.java | 33 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP170/impl/OP170ServerInterfaceImpl.java | 39 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP090/impl/OP090ServerInterfaceImpl.java | 38 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/DOP020/impl/DOP020ServerInterfaceImpl.java | 31 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/COP010/impl/COP010ServerInterfaceImpl.java | 29 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP040B/impl/BOP040BServerInterfaceImpl.java | 6 guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP040/impl/EOP040ServerInterfaceImpl.java | 32 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP060/impl/EOP060ServerInterfaceImpl.java | 32 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP010/impl/BOP010ServerInterfaceImpl.java | 30 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP030/impl/EOP030ServerInterfaceImpl.java | 32 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP070B/impl/EOP070BServerInterfaceImpl.java | 6 guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP090/impl/EOP090ServerInterfaceImpl.java | 32 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP040/impl/BOP040ServerInterfaceImpl.java | 31 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/COP020/impl/COP020ServerInterfaceImpl.java | 31 - guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP100/impl/OP100ServerInterfaceImpl.java | 30 guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP020/impl/OP020ServerInterfaceImpl.java | 37 - 42 files changed, 443 insertions(+), 871 deletions(-) diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/mapper/mapping/ProductionOrderBatchInfoMapper.xml b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/mapper/mapping/ProductionOrderBatchInfoMapper.xml index f9a7765..200e5bc 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/mapper/mapping/ProductionOrderBatchInfoMapper.xml +++ b/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> diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/opc/OPCComm.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/opc/OPCComm.java index bdf0b17..e5f6862 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/opc/OPCComm.java +++ b/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));//蹇冭烦 diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP010/impl/BOP010ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP010/impl/BOP010ServerInterfaceImpl.java index b25cffc..6f52b1a 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP010/impl/BOP010ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP020/impl/BOP020ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP020/impl/BOP020ServerInterfaceImpl.java index 3034b9e..4f4374c 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP020/impl/BOP020ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP030/impl/BOP030ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP030/impl/BOP030ServerInterfaceImpl.java index 98a449a..413e49c 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP030/impl/BOP030ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP030B/impl/BOP030BServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP030B/impl/BOP030BServerInterfaceImpl.java index c9b2525..930f273 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP030B/impl/BOP030BServerInterfaceImpl.java +++ b/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(); } } diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP040/impl/BOP040ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP040/impl/BOP040ServerInterfaceImpl.java index 310ba5d..05277f8 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP040/impl/BOP040ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP040B/impl/BOP040BServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP040B/impl/BOP040BServerInterfaceImpl.java index 478bd20..5ceef9b 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/BOP040B/impl/BOP040BServerInterfaceImpl.java +++ b/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(); } } diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/COP010/impl/COP010ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/COP010/impl/COP010ServerInterfaceImpl.java index a105e5c..42ffd9b 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/COP010/impl/COP010ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/COP020/impl/COP020ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/COP020/impl/COP020ServerInterfaceImpl.java index 4de191a..9e7bc93 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/COP020/impl/COP020ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/COP030/impl/COP030ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/COP030/impl/COP030ServerInterfaceImpl.java index 8684cc1..8600293 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/COP030/impl/COP030ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/DOP010/impl/DOP010ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/DOP010/impl/DOP010ServerInterfaceImpl.java index d0acbeb..814b5b1 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/DOP010/impl/DOP010ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/DOP020/impl/DOP020ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/DOP020/impl/DOP020ServerInterfaceImpl.java index 8471ac0..dd78843 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/DOP020/impl/DOP020ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP010/impl/EOP010ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP010/impl/EOP010ServerInterfaceImpl.java index ac0ab5b..ba022d3 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP010/impl/EOP010ServerInterfaceImpl.java +++ b/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());//鐗╂枡鎵规 diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP020/impl/EOP020ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP020/impl/EOP020ServerInterfaceImpl.java index 368fcd3..9097f30 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP020/impl/EOP020ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP030/impl/EOP030ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP030/impl/EOP030ServerInterfaceImpl.java index eaea5ac..50976b8 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP030/impl/EOP030ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP040/impl/EOP040ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP040/impl/EOP040ServerInterfaceImpl.java index 474d869..c1a9ee0 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP040/impl/EOP040ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP050/impl/EOP050ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP050/impl/EOP050ServerInterfaceImpl.java index e32a505..daf9ab1 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP050/impl/EOP050ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP060/impl/EOP060ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP060/impl/EOP060ServerInterfaceImpl.java index 09256e3..36a16e2 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP060/impl/EOP060ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP070/impl/EOP070ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP070/impl/EOP070ServerInterfaceImpl.java index 4a50b16..8cfe9bf 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP070/impl/EOP070ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP070B/impl/EOP070BServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP070B/impl/EOP070BServerInterfaceImpl.java index 1d9e8e4..cf6ef23 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP070B/impl/EOP070BServerInterfaceImpl.java +++ b/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(); } } diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP080/impl/EOP080ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP080/impl/EOP080ServerInterfaceImpl.java index 91e8a68..d18fd54 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP080/impl/EOP080ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP090/impl/EOP090ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP090/impl/EOP090ServerInterfaceImpl.java index a7d0565..c5c3c52 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP090/impl/EOP090ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP090B/impl/EOP090BServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP090B/impl/EOP090BServerInterfaceImpl.java index 7449766..cc9484c 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/EOP090B/impl/EOP090BServerInterfaceImpl.java +++ b/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(); } } diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP010/impl/OP010ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP010/impl/OP010ServerInterfaceImpl.java index 7cbc39a..d26236e 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP010/impl/OP010ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP020/impl/OP020ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP020/impl/OP020ServerInterfaceImpl.java index a728950..4e1a1c1 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP020/impl/OP020ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP030/impl/OP030ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP030/impl/OP030ServerInterfaceImpl.java index 639c489..83e0c14 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP030/impl/OP030ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP040/impl/OP040ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP040/impl/OP040ServerInterfaceImpl.java index 73e3c48..e074a75 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP040/impl/OP040ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP050/impl/OP050ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP050/impl/OP050ServerInterfaceImpl.java index ec7996e..9c6aeee 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP050/impl/OP050ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP070/impl/OP070ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP070/impl/OP070ServerInterfaceImpl.java index b50264f..8aa33b7 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP070/impl/OP070ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP080/impl/OP080ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP080/impl/OP080ServerInterfaceImpl.java index da5ec10..334f2be 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP080/impl/OP080ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP090/impl/OP090ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP090/impl/OP090ServerInterfaceImpl.java index e8cd4ff..ed5608c 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP090/impl/OP090ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP100/impl/OP100ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP100/impl/OP100ServerInterfaceImpl.java index fd0287f..21a62da 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP100/impl/OP100ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP110/impl/OP110ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP110/impl/OP110ServerInterfaceImpl.java index 7fd8d74..43193e4 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP110/impl/OP110ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP120/impl/OP120ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP120/impl/OP120ServerInterfaceImpl.java index a28b770..2daada2 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP120/impl/OP120ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP120B/impl/OP120BServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP120B/impl/OP120BServerInterfaceImpl.java index 25759bf..04b1dba 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP120B/impl/OP120BServerInterfaceImpl.java +++ b/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(); + } } diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP130/impl/OP130ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP130/impl/OP130ServerInterfaceImpl.java index 9815413..dd4203b 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP130/impl/OP130ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP130B/impl/OP130BServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP130B/impl/OP130BServerInterfaceImpl.java index 9a00e21..bc4ed9f 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP130B/impl/OP130BServerInterfaceImpl.java +++ b/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(); + } } diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP140/impl/OP140ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP140/impl/OP140ServerInterfaceImpl.java index f07443a..8c4f676 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP140/impl/OP140ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP150/impl/OP150ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP150/impl/OP150ServerInterfaceImpl.java index b8dba82..9202896 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP150/impl/OP150ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP160/impl/OP160ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP160/impl/OP160ServerInterfaceImpl.java index b6650e9..e1ad2e1 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP160/impl/OP160ServerInterfaceImpl.java +++ b/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); diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP170/impl/OP170ServerInterfaceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP170/impl/OP170ServerInterfaceImpl.java index 26114ce..95a7b07 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/server/OP170/impl/OP170ServerInterfaceImpl.java +++ b/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); -- Gitblit v1.9.3