| | |
| | | String paramValue = ""; |
| | | if (ObjectUtil.isNotNull(readWriteEntityList.get(i).getValue())){ |
| | | paramValue = readWriteEntityList.get(i).getValue().toString();//参数值 |
| | | if("DATE".equals(list.get(i).getCollectParameterType()) && !paramValue.isEmpty()){ |
| | | /*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);//参数值 |
| | | daParamCollection.setLocationCode(device);//工位 |
| | |
| | | mesList.add(childVO); |
| | | } |
| | | |
| | | /*CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> { |
| | | CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> { |
| | | //插入参数采集表 |
| | | daParamCollectionService.insertBatch(collectionList); |
| | | //上传到工厂mes |
| | |
| | | parentVO.setRecordId(UUID.randomUUID().toString()); |
| | | if("2".equals(stationStatus)){//工站状态 |
| | | parentVO.setTotalResult("0"); |
| | | }else { |
| | | parentVO.setTotalResult("1"); |
| | | } |
| | | parentVO.setProductNum(snCode); |
| | | parentVO.setCheckList(mesList); |
| | |
| | | HttpResponse execute = HttpRequest.post(Constants.FACTORY_EMS_UAT_GET_RUL+"deviceResultFeedback").body(JSONUtil.toJsonStr(parentVO)).execute(); |
| | | log.info("执行工厂MES方法end,工位号{} 返回数据:{}",device,execute.body()); |
| | | |
| | | });*/ |
| | | }); |
| | | } |
| | | }catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | |
| | | .eq(OmProductionOrdeInfo::getProductCode,materialCode));//产品类型 |
| | | if (CollUtil.isNotEmpty(orderList)){ |
| | | Long id = orderList.get(0).getId(); |
| | | productNum = orderList.get(0).getProductNum();//模组码 |
| | | productNum = orderList.get(0).getProductNum();//产品码 |
| | | orderNum = orderList.get(0).getWorkOrderNo(); |
| | | }else{ |
| | | // 查询最新的工单信息 |
| | | OmProductionOrdeInfo lastOrder = omProductionOrdeInfoService.getLastOrder(); |
| | | |
| | | log.info("请求工厂MES工单:入参device{},materialCode:{}", device, materialCode); |
| | | String orderJsonString = RestfulService.getProductionWorkOrderRequest(lastOrder.getProductNum(), "M1OP100",materialCode); |
| | | String orderJsonString = RestfulService.getProductionWorkOrderRequest(lastOrder.getProductNum(), "OP010",materialCode); |
| | | log.info("请求工厂MES工单:出参pack:{}", orderJsonString); |
| | | |
| | | JSONObject jsonObject = new JSONObject(orderJsonString); |