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/OpcServiceMain.java | 34 +++++++++++++++++++++------------- 1 files changed, 21 insertions(+), 13 deletions(-) diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/OpcServiceMain.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/OpcServiceMain.java index 636c13a..9242219 100644 --- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/OpcServiceMain.java +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/OpcServiceMain.java @@ -13,6 +13,8 @@ import cn.stylefeng.guns.modular.om.productionOrdeInfo.model.params.ProductionOrdeInfoParam; import cn.stylefeng.guns.modular.om.productionOrdeInfo.model.result.ProductionOrdeInfoResult; import cn.stylefeng.guns.modular.om.productionOrdeInfo.service.ProductionOrdeInfoService; +import cn.stylefeng.guns.modular.om.productionOrderBatchInfo.service.ProductionOrderBatchInfoService; +import cn.stylefeng.guns.modular.om.productionOrderRecords.service.ProductionOrderRecordsService; import cn.stylefeng.guns.modular.sc.repairManageInfo.service.RepairManageInfoService; import cn.stylefeng.guns.modular.sc.serialNumbersConf.service.SerialNumbersConfService; import cn.stylefeng.guns.plcserver.opc.GlobalVariable; @@ -143,22 +145,28 @@ @Autowired private GreaseManageService greaseManageService; + @Autowired + private ProductionOrderRecordsService productionOrderRecordsService; + + @Autowired + private ProductionOrderBatchInfoService productionOrderBatchInfoService; + @Override public void run(String... args) throws Exception { if(GlobalVariable.TERMINATED) { opc.init(productionOrdeInfoService,passingStationCollectionService,paramCollectionService,collectionParamConfService,serialNumbersConfService, equipmentStatusService,equipmentAlarmService,materialTraceabilityService,equipmentInfoService, - repairManageInfoService,locationInfoService,greaseManageService); + repairManageInfoService,locationInfoService,greaseManageService,productionOrderRecordsService,productionOrderBatchInfoService); - GlobalVariable.PRODUCT_TYPE_MAP.put("191.220001-01","1"); - GlobalVariable.PRODUCT_TYPE_MAP.put("191.220003-01","2"); - GlobalVariable.PRODUCT_TYPE_MAP.put("191.220002-01","3"); - GlobalVariable.PRODUCT_TYPE_MAP.put("191.220004-01","4"); + GlobalVariable.PRODUCT_TYPE_MAP.put("12980500000198","1");//C1 36V + GlobalVariable.PRODUCT_TYPE_MAP.put("12980500000174","2");//C1 48V + GlobalVariable.PRODUCT_TYPE_MAP.put("12980500000194","3");//T1 36V + GlobalVariable.PRODUCT_TYPE_MAP.put("12980500000201","4");//T1 48V - GlobalVariable.PRODUCT_CODE_MAP.put("1","191.220001-01"); - GlobalVariable.PRODUCT_CODE_MAP.put("2","191.220003-01"); - GlobalVariable.PRODUCT_CODE_MAP.put("3","191.220002-01"); - GlobalVariable.PRODUCT_CODE_MAP.put("4","191.220004-01"); + GlobalVariable.PRODUCT_CODE_MAP.put("1","12980500000198"); + GlobalVariable.PRODUCT_CODE_MAP.put("2","12980500000174"); + GlobalVariable.PRODUCT_CODE_MAP.put("3","12980500000194"); + GlobalVariable.PRODUCT_CODE_MAP.put("4","12980500000201"); ExecutorService cachedThreadPool = Executors.newCachedThreadPool(); cachedThreadPool.execute(new OP010TaskThreadPool()); @@ -171,12 +179,12 @@ cachedThreadPool.execute(new OP090TaskThreadPool()); cachedThreadPool.execute(new OP100TaskThreadPool()); cachedThreadPool.execute(new OP110TaskThreadPool()); - /* cachedThreadPool.execute(new OP120TaskThreadPool()); - cachedThreadPool.execute(new OP120BTaskThreadPool());*/ + cachedThreadPool.execute(new OP120TaskThreadPool()); + cachedThreadPool.execute(new OP120BTaskThreadPool()); cachedThreadPool.execute(new OP130TaskThreadPool()); cachedThreadPool.execute(new OP130BTaskThreadPool()); cachedThreadPool.execute(new OP140TaskThreadPool()); - cachedThreadPool.execute(new OP150TaskThreadPool()); + /* cachedThreadPool.execute(new OP150TaskThreadPool());*/ cachedThreadPool.execute(new OP160TaskThreadPool()); cachedThreadPool.execute(new OP170TaskThreadPool()); @@ -195,7 +203,7 @@ //DOP cachedThreadPool.execute(new DOP010TaskThreadPool()); - cachedThreadPool.execute(new DOP020TaskThreadPool()); + /*cachedThreadPool.execute(new DOP020TaskThreadPool());*/ //EOP cachedThreadPool.execute(new EOP010TaskThreadPool()); -- Gitblit v1.9.3