| | |
| | | import java.util.concurrent.CompletableFuture; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static org.apache.commons.lang3.SystemUtils.getUserName; |
| | | |
| | | /** |
| | | * 设备产品过程参数采集Service业务层处理 |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | public void addCollectParamBasicData(String stationCode,String modelCode){ |
| | | List<DaCollectionParamConf> confList = daCollectionParamConfService.list(new LambdaQueryWrapper<DaCollectionParamConf>().like(DaCollectionParamConf::getCollectParameterId, "YGBH")); |
| | | if(!confList.isEmpty()){ |
| | | DaCollectionParamConf daCollectionParamConf = confList.get(0); |
| | | DaParamCollection collection = new DaParamCollection(); |
| | | collection.setSfcCode(modelCode);//模组码 |
| | | collection.setParamCode(daCollectionParamConf.getCollectParameterId());//参数编码 |
| | | collection.setParamName(daCollectionParamConf.getCollectParameterName());//参数名称 |
| | | collection.setParamValue(getUserName());//参数值 |
| | | collection.setLocationCode(stationCode);//工位 |
| | | collection.setCollectionTime(new Date());//采集时间 |
| | | daParamCollectionService.save(collection); |
| | | |
| | | DaParamCollectionTemp collectionTemp = new DaParamCollectionTemp(); |
| | | collectionTemp.setSfcCode(modelCode);//模组码 |
| | | collectionTemp.setParamCode(daCollectionParamConf.getCollectParameterId());//参数编码 |
| | | collectionTemp.setParamName(daCollectionParamConf.getCollectParameterName());//参数名称 |
| | | collectionTemp.setParamValue(getUserName());//参数值 |
| | | collectionTemp.setLocationCode(stationCode);//工位 |
| | | collectionTemp.setCollectionTime(new Date());//采集时间 |
| | | daParamCollectionTempService.save(collectionTemp); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void pushStartStopTime(String paramCode, String paramName, String productNum) { |
| | | ParentVO parentVO = new ParentVO(); |
| | |
| | | |
| | | @Override |
| | | public void pushGeelycvMesFeedback(String packID, String stationCode) { |
| | | //添加基础参数(登陆人信息) |
| | | try { |
| | | addCollectParamBasicData(stationCode,packID); |
| | | }catch (Exception e){ |
| | | throw new RuntimeException(e); |
| | | } |
| | | logger.info("进入人工工位推送工厂MES数据方法-pushGeelycvMesFeedback-工位{}-pack码{}",stationCode,packID); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String totalResult = "0"; |