| | |
| | | omProductionOrdeInfo.setWorkOrderNo(dataObject.getStr("productionOrderNum")); |
| | | omProductionOrdeInfo.setProductNum(dataObject.getStr("productNum")); |
| | | omProductionOrdeInfo.setStationCode(dataObject.getStr("stationCode")); |
| | | omProductionOrdeInfo.setMaterialCode(dataObject.getStr("materialCode")); |
| | | omProductionOrdeInfo.setProductCode(dataObject.getStr("materialCode")); |
| | | omProductionOrdeInfo.setPlanQty(Long.valueOf(dataObject.getStr("plannedQuantity"))); |
| | | omProductionOrdeInfo.setOnlineCompletionMark("0"); |
| | | omProductionOrdeInfo.setSfResult("0"); |
| | | omProductionOrdeInfo.setProductCode(dataObject.getStr("model")); |
| | | omProductionOrdeInfo.setProductModel(dataObject.getStr("model")); |
| | | omProductionOrdeInfo.setCreateTime(new Date()); |
| | | omProductionOrdeInfo.setCreateUser("工厂MES"); |
| | | omProductionOrdeInfoService.save(omProductionOrdeInfo); |
| | |
| | | paramValue = readWriteEntityList.get(i).getValue().toString();//参数值 |
| | | if("DATE".equals(list.get(i).getCollectParameterType()) && !paramValue.isEmpty()){ |
| | | paramValue = format.parse(TimeUtil.test(TimeUtil.stringProcessing(paramValue))).toString(); |
| | | }else if("MODEL".equals(list.get(i).getCollectParameterType()) && !paramValue.isEmpty()){ |
| | | paramValue = Constants.materialMap.get(paramValue); |
| | | } |
| | | } |
| | | daParamCollection.setParamValue(paramValue);//参数值 |
| | |
| | | HttpRequest httpRequest = HttpRequest.get(url); |
| | | result = response.body(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | throw new RuntimeException(e); |
| | | }finally { |
| | | return result; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取采集参数基础数据 |
| | | * @param productCode |
| | | * @param stationCode |
| | | * @return list |
| | | */ |
| | | public List<ChildVO> getCollectParamBasicData(String productCode , String stationCode) { |
| | | List<ChildVO> basicList = new ArrayList<>(); |
| | | try { |
| | | //查询参数配置表 |
| | | List<DaCollectionParamConf> list = collectionParamConfService.list(new LambdaQueryWrapper<DaCollectionParamConf>() |
| | | .eq(DaCollectionParamConf::getProcessesCode, stationCode)//工位 |
| | | .eq(DaCollectionParamConf::getCollectParameterType, "BASIC")//采集参数类型 |
| | | ); |
| | | if (CollUtil.isNotEmpty(list)){ |
| | | for(DaCollectionParamConf conf:list){ |
| | | ChildVO childVO = new ChildVO(); |
| | | childVO.setItemCode(conf.getCollectParameterId());//参数 |
| | | childVO.setItemType(conf.getItemType()); |
| | | childVO.setItemValue(conf.getParamCentral());//参数值 |
| | | childVO.setItemText(conf.getCollectParameterName()); |
| | | childVO.setCheckResult("1"); |
| | | childVO.setCheckTime(format.format(new Date())); |
| | | basicList.add(childVO); |
| | | } |
| | | } |
| | | return basicList; |
| | | }catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |