| | |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("MOZU1."+daParamCollection.getLocationCode()+".RecordDataDone").value(21).build()); |
| | | if(daParamCollection.getLocationCode().equals("M1OP100-1") || daParamCollection.getLocationCode().equals("M1OP100-2") ){ |
| | | try{ |
| | | //更新工单状态为已执行 |
| | | LambdaUpdateWrapper<OmProductionOrdeInfo> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper.set(OmProductionOrdeInfo::getOrderStatus,"3"); |
| | | updateWrapper.eq(OmProductionOrdeInfo::getProductNum,daParamCollection.getProductBarcode()); |
| | | omProductionOrdeInfoService.update(new OmProductionOrdeInfo(),updateWrapper); |
| | | |
| | | //上传工厂MES报工 |
| | | CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> { |
| | | logger.info("OP100报工开始-工厂MES异步方法"); |
| | | String reportResult = RestfulService.getWorkReportResultFeedback(daParamCollection.getProductBarcode(), daParamCollection.getLocationCode(), format.format(new Date())); |
| | | String stationCode = "M1P100";//因为上层系统只支持6位,所有报工工位为M1P100 |
| | | //String reportResult = RestfulService.getWorkReportResultFeedback(daParamCollection.getProductBarcode(), stationCode, format.format(new Date())); |
| | | String reportResult = OPCUaSubscription.getWorkReportResultFeedback(daParamCollection.getProductBarcode(), stationCode, format.format(new Date())); |
| | | JSONObject jsonObject = new JSONObject(reportResult); |
| | | String code = jsonObject.getStr("code"); |
| | | if("success".equals(code)){ |
| | |
| | | // childVO.setItemType("3"); |
| | | // } |
| | | if(paramConfOne!=null){ |
| | | childVO.setItemType(paramConfOne.getSpareField1()); |
| | | childVO.setItemType(paramConfOne.getItemType()); |
| | | childVO.setItemText(paramConfOne.getCollectParameterName()); |
| | | }else { |
| | | childVO.setItemType("3"); |
| | |
| | | parentVO.setCheckList(listChildVo); |
| | | try{ |
| | | CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> { |
| | | logger.info("开始执行异步方法"); |
| | | logger.info("手动工位传工厂MES异步方法start,工位号{},入参{}",stationCode,parentVO.toString()); |
| | | HttpResponse execute = HttpRequest.post(Constants.FACTORY_EMS_UAT_GET_RUL+"deviceResultFeedback").body(JSONUtil.toJsonStr(parentVO)).execute(); |
| | | logger.info("异步方法执行结束"); |
| | | logger.info("手动工位传工厂MES异步方法{}"+execute.body()); |
| | | logger.info("手动工位传工厂MES异步方法end工位号{},出参{}",stationCode,execute.body()); |
| | | |
| | | DaParamCollectionTemp daParamCollectionTemp = new DaParamCollectionTemp(); |
| | | daParamCollectionTemp.setSfcCode(packID); |
| | |
| | | logger.info("进入工位{}-工厂MES推送数据方法automaticWorkstationPushGeelycvMesFeedback",stationCode); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String totalResult = "0"; |
| | | if(paramList.size() > 0){ |
| | | if(!paramList.isEmpty()){ |
| | | logger.info("进入工位{}-拼数据",stationCode); |
| | | ParentVO parentVO = new ParentVO(); |
| | | parentVO.setSiteCode("3983"); |
| | | parentVO.setRecordId(String.valueOf(Instant.now().toEpochMilli())); |
| | | parentVO.setRecordId(UUID.randomUUID().toString()); |
| | | parentVO.setStationCode(stationCode); |
| | | parentVO.setProductNum(packID); |
| | | parentVO.setTotalResult("1"); |