| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.jcdm.common.core.domain.entity.SysDictData; |
| | | import com.jcdm.main.constant.Constants; |
| | | import com.jcdm.main.da.cellData.service.IDaCellDataService; |
| | | import com.jcdm.main.da.collectionParamConf.service.IDaCollectionParamConfService; |
| | |
| | | import com.jcdm.main.da.testDeviceInterfaceTemp.service.IDaTestDeviceInterfaceTempService; |
| | | import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService; |
| | | import com.jcdm.main.plcserver.sub.OPCUaSubscription; |
| | | import com.jcdm.system.service.ISysDictDataService; |
| | | import com.kangaroohy.milo.service.MiloService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.ApplicationArguments; |
| | | import org.springframework.boot.ApplicationRunner; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Component |
| | |
| | | @Autowired |
| | | private IDaCellDataService daCellDataService; |
| | | |
| | | @Autowired |
| | | private ISysDictDataService sysDictDataService; |
| | | |
| | | @Override |
| | | public void run(ApplicationArguments args) throws Exception { |
| | | |
| | | //PLC到MES物料转换 |
| | | Constants.materialMap.put("1","9900200461");//微卡电驱动系统总成(9999276636)//9900200461 |
| | | Constants.materialMap.put("2","9900207783");//微面电驱动系统总成(9999276639)//9900207783 |
| | | |
| | | Constants.facMaterialMap.put("9900200461","9999276636");//生产物料转工厂物料请求工单 |
| | | Constants.facMaterialMap.put("9900207783","9999276639");//生产物料转工厂物料请求工单 |
| | | materialInit(); |
| | | // Constants.materialMap.put("1","9900200461");//微卡电驱动系统总成(9999276636)//9900200461 |
| | | // Constants.materialMap.put("2","9900207783");//微面电驱动系统总成(9999276639)//9900207783 |
| | | // |
| | | // Constants.facMaterialMap.put("9900200461","9999276636");//生产物料转工厂物料请求工单 |
| | | // Constants.facMaterialMap.put("9900207783","9999276639");//生产物料转工厂物料请求工单 |
| | | |
| | | //通道 |
| | | Constants.thoroughfareMap.put(Constants.OP010,"JCDM035-1"); |
| | |
| | | .stream().map(DaOpcuaConfig::getNode).collect(Collectors.toList()); |
| | | return lists; |
| | | } |
| | | |
| | | public void materialInit(){ |
| | | SysDictData plcMesData = new SysDictData(); |
| | | plcMesData.setDictType("plc_mes"); |
| | | |
| | | SysDictData imesGeelyMesData = new SysDictData(); |
| | | imesGeelyMesData.setDictType("imes_geely_mes"); |
| | | |
| | | List<SysDictData> plcMesList = sysDictDataService.selectDictDataList(plcMesData); |
| | | List<SysDictData> imesGeelyMesList = sysDictDataService.selectDictDataList(imesGeelyMesData); |
| | | |
| | | for (SysDictData sysDictData : plcMesList) { |
| | | Constants.materialMap.put(sysDictData.getDictLabel(),sysDictData.getDictValue()); |
| | | } |
| | | |
| | | for (SysDictData sysDictData : imesGeelyMesList) { |
| | | Constants.facMaterialMap.put(sysDictData.getDictLabel(),sysDictData.getDictValue()); |
| | | } |
| | | System.out.println("物料初始化"+Constants.materialMap+"---"+Constants.facMaterialMap); |
| | | } |
| | | } |
| | | |