| | |
| | | package com.jcdm.main.bs.formulaChild.controller; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | |
| | | String thoroughfare = Constants.thoroughfareMap.get(bsFormulaChildInfo.getProcessesCode());//获取通道 |
| | | String str = thoroughfare+"."+bsFormulaChildInfo.getProcessesCode()+".MESScrew"; |
| | | if(bsFormulaChildInfo.getProcessesCode().equals("OP230")){ |
| | | //所有进站将进站时间写给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()); |
| | | Integer recordDataDone = 11; |
| | | miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + bsFormulaChildInfo.getProcessesCode() + ".SNCode").value(bsFormulaChildInfo.getSfcBarcode()).build()); |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + bsFormulaChildInfo.getProcessesCode() + ".RecordDataDone").value(recordDataDone).build()); |
| | | } |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(str).value(stepNumber).build()); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |