cl
2024-01-19 e0fac38b26845f25de479783e0c76cf12a5311e0
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/OpcServiceMain.java
@@ -9,9 +9,12 @@
import cn.stylefeng.guns.modular.dq.materialTraceability.service.MaterialTraceabilityService;
import cn.stylefeng.guns.modular.em.equipmentAlarm.service.EquipmentAlarmService;
import cn.stylefeng.guns.modular.em.equipmentStatus.service.EquipmentStatusService;
import cn.stylefeng.guns.modular.gm.greaseManage.service.GreaseManageService;
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;
@@ -139,22 +142,31 @@
    @Autowired
    private LocationInfoService locationInfoService;
    @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);
                    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());
@@ -167,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());
@@ -191,7 +203,7 @@
            //DOP
            cachedThreadPool.execute(new DOP010TaskThreadPool());
            cachedThreadPool.execute(new DOP020TaskThreadPool());
            /*cachedThreadPool.execute(new DOP020TaskThreadPool());*/
            //EOP
            cachedThreadPool.execute(new EOP010TaskThreadPool());