cl
2024-09-06 91b54fc007c9e82087738048d3b767c9645a6aec
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
@@ -111,17 +111,18 @@
            String thoroughfare = Constants.thoroughfareMap.get(bsFormulaChildInfo.getProcessesCode());//获取通道
            String str = thoroughfare+"."+bsFormulaChildInfo.getProcessesCode()+".MESScrew";
            if(bsFormulaChildInfo.getProcessesCode().equals("OP230")){
            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(str).value(stepNumber).build());//拧紧步骤
            if("OP230".equals(bsFormulaChildInfo.getProcessesCode())){
                //所有进站将进站时间写给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.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + bsFormulaChildInfo.getProcessesCode() + ".RecordDataDone").value(11).build());
            }else if(bsFormulaChildInfo.getProcessesCode().equals("OP220")){
            }else if("OP220".equals(bsFormulaChildInfo.getProcessesCode())){
                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + bsFormulaChildInfo.getProcessesCode() + ".RecordDataDone").value(11).build());
            }
            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(str).value(stepNumber).build());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }