| | |
| | | String productType = productTypeObjcet.toString();//产品类型 |
| | | String materialCode = Constants.materialMap.get(productType); |
| | | //调用工厂MES,保存到数据库,并且将工单传给PLC |
| | | receivingWorkOrders(thoroughfare, device,materialCode); |
| | | CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> { |
| | | receivingWorkOrders(thoroughfare, device,materialCode); |
| | | }); |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(11).build()); |
| | | log.info("写入到工位{}的RecordDataDone数据:{}",device,11); |
| | | }else{ |
| | |
| | | } |
| | | } |
| | | |
| | | public void receivingWorkOrders(String thoroughfare ,String device ,String materialCode) |
| | | public synchronized void receivingWorkOrders(String thoroughfare ,String device ,String materialCode) |
| | | { |
| | | String paramProductNum = ""; |
| | | try { |