jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
@@ -10,6 +10,8 @@ import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.jcdm.main.constant.Constants; import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo; import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService; import com.kangaroohy.milo.model.ReadWriteEntity; import com.kangaroohy.milo.service.MiloService; import org.springframework.security.access.prepost.PreAuthorize; @@ -43,6 +45,9 @@ { @Autowired private IBsFormulaChildInfoService bsFormulaChildInfoService; @Autowired private IOmProductionOrdeInfoService omProductionOrdeInfoService; @Autowired private MiloService miloService; @@ -113,11 +118,13 @@ String str = thoroughfare+"."+bsFormulaChildInfo.getProcessesCode()+".MESScrew"; miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(str).value(stepNumber).build());//拧紧步骤 if("OP230".equals(bsFormulaChildInfo.getProcessesCode())){ List<OmProductionOrdeInfo> list = omProductionOrdeInfoService.list(new LambdaQueryWrapper<OmProductionOrdeInfo>().like(OmProductionOrdeInfo::getProductNum, bsFormulaChildInfo.getSfcBarcode())); String sfcCode = list.get(0).getProductNum(); //所有进站将进站时间写给PLC SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String currentDate = dateFormat.format(new Date()); miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + bsFormulaChildInfo.getProcessesCode() + ".StartTime").value(currentDate).build()); miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + bsFormulaChildInfo.getProcessesCode() + ".SNCode").value(bsFormulaChildInfo.getSfcBarcode()).build()); miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + bsFormulaChildInfo.getProcessesCode() + ".SNCode").value(sfcCode).build()); miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + bsFormulaChildInfo.getProcessesCode() + ".RecordDataDone").value(11).build()); }else if("OP220".equals(bsFormulaChildInfo.getProcessesCode())){ miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + bsFormulaChildInfo.getProcessesCode() + ".RecordDataDone").value(11).build()); jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -185,10 +185,12 @@ } } if(Constants.OP230.equals(device)){ WebSocketUsers.sendMessageToUserByText(map.get(device), "twoHundredAndThirtyEND"); CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> { updateOrderStatus(snCode, "5","");//OP230工位更新工单状态为已完成 reportFactoryMes(snCode, "OP240", format.format(new Date()));//工厂MES报工 //暂时 OP240工位还没有好,在230报240的工 }); miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".SNCode").value("").build()); } if(result == 21){ result = savePassingStation(thoroughfare, device, snCode, orderNumber, stationStatus);//保存过站 jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -125,7 +125,7 @@ <span>最高转速:</span><span>12000rpm</span><br> </div> <div style="margin-top: 4px"> <span>防护等级:</span><span>IP68</span><br> <span>防护等级:</span><span>IP67</span><br> </div> <div style="margin-top: 4px"> <span>峰值工作电流:</span><span>230A</span><br> @@ -153,15 +153,15 @@ </div> <div style="margin-top: 4px"> <span style="font-size: 22px">993083</span><br> <span style="font-size: 22px">993983</span><br> </div> <div style="margin-top: 4px"> <span style="font-size: 22px">9900166410</span><br> <span style="font-size: 22px">9900200461</span><br> </div> <div style="margin-top: 4px"> <span style="font-size: 22px">2407190000002</span> <span style="font-size: 22px">{{headContent.sfcCode}}</span> </div> </div> @@ -526,7 +526,9 @@ this.headContent.processesCode === 'OP190'|| this.headContent.processesCode === 'OP200'|| this.headContent.processesCode === 'OP210'|| this.headContent.processesCode === 'OP220'){ this.headContent.processesCode === 'OP220'|| this.headContent.processesCode === 'OP230' ){ this.headContent.sfcCode = rowsData.productNum } this.workpieceInformation.workOrderNo = rowsData.workOrderNo; @@ -650,6 +652,8 @@ unfinishedProcess({processesCode: self.headContent.processesCode,recordDataDone: 21}).then(response => {}); }else if (event.data === "IN") { self.cakeLamp.InPlace = 1; }else if(event.data === "twoHundredAndThirtyEND"){ self.endClear() } else if (event.data === "OUT") { self.cakeLamp.release = 1; } else if (event.data === "END") {