| | |
| | | @PostMapping("/deviceResultFeedback") |
| | | public AjaxResult deviceResultFeedback(@RequestBody ParentVO parentVO) |
| | | { |
| | | // if(parentVO.getStationCode().contains("POP360")){ |
| | | // String softwareNumberOne = parentVO.getCheckList().get(31).getItemValue(); |
| | | // String softwareNumberTwo = parentVO.getCheckList().get(32).getItemValue(); |
| | | // String hardwareNumberOne = parentVO.getCheckList().get(33).getItemValue(); |
| | | // String hardwareNumberTwo = parentVO.getCheckList().get(34).getItemValue(); |
| | | // |
| | | // parentVO.getCheckList().get(31).setItemValue("SSW00"+softwareNumberOne+".00"+softwareNumberTwo); |
| | | // parentVO.getCheckList().get(33).setItemValue("HHW00"+hardwareNumberOne+".00"+hardwareNumberTwo); |
| | | // |
| | | // parentVO.getCheckList().remove(32); |
| | | // parentVO.getCheckList().remove(33); |
| | | // } |
| | | |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | List<ChildVO> li = parentVO.getCheckList(); |
| | | String s = null; |
| | |
| | | daTestDeviceInterface.setCheckList(s); |
| | | daTestDeviceInterface.setCreateTime(new Date()); |
| | | daTestDeviceInterfaceService.save(daTestDeviceInterface); |
| | | if(parentVO.getStationCode().contains("POP410")){ |
| | | if(StringUtils.isNotBlank(parentVO.getProductNum())){ |
| | | OmProductionOrdeInfo one = omProductionOrdeInfoService.getOne(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getProductNum, parentVO.getProductNum())); |
| | | if(ObjectUtil.isNotNull(one)){ |
| | | logger.info("解绑小车{},pack码是{}"+one.getTrolleyYard(),one.getProductNum()); |
| | | one.setTrolleyYard(""); |
| | | omProductionOrdeInfoService.saveOrUpdate(one); |
| | | } |
| | | } |
| | | } |
| | | // if(parentVO.getStationCode().contains("POP410")){ |
| | | // if(StringUtils.isNotBlank(parentVO.getProductNum())){ |
| | | // OmProductionOrdeInfo one = omProductionOrdeInfoService.getOne(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getProductNum, parentVO.getProductNum())); |
| | | // if(ObjectUtil.isNotNull(one)){ |
| | | // logger.info("解绑小车{},pack码是{}"+one.getTrolleyYard(),one.getProductNum()); |
| | | // one.setTrolleyYard(""); |
| | | // omProductionOrdeInfoService.saveOrUpdate(one); |
| | | // } |
| | | // } |
| | | // } |
| | | // try{ |
| | | // CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> { |
| | | // logger.info("开始执行异步方法"); |
| | |
| | | } |
| | | |
| | | @GetMapping("/productionWorkOrderRequest") |
| | | public AjaxResult productionWorkOrderRequest(){ |
| | | public AjaxResult productionWorkOrderRequest(@RequestParam String productNum){ |
| | | List<RestFulOrder> restFulOrders = new ArrayList<>(); |
| | | // try{ |
| | | // CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> { |
| | |
| | | // }catch (Exception e){ |
| | | // System.out.println(e.getMessage()); |
| | | // } |
| | | return AjaxResult.success(restFulOrders); |
| | | String result = ""; |
| | | try { |
| | | String reportResult = RestfulService.getWorkReportResultFeedback(productNum, "POP230", format.format(new Date())); |
| | | JSONObject jsonObject = new JSONObject(reportResult); |
| | | String code = jsonObject.getStr("code"); |
| | | String resultCode = jsonObject.getJSONObject("data").getStr("resultCode"); |
| | | if("success".equals(code)&&"S".equals(resultCode)){ |
| | | //如果成功,执行报工成功方法,修改是否报工为1,添加报工时间 |
| | | result = "成功"; |
| | | }else{ |
| | | //解析工厂mes返回结果,如果失败,执行报工失败方法,修改是否报工为2,添加报工时间 |
| | | result = "try失败"; |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | result = "catch失败"; |
| | | } |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/getQualityData") |