| package com.zy.acs.common.domain; | 
|   | 
| import com.zy.acs.common.domain.protocol.IMessageBody; | 
| import lombok.Data; | 
|   | 
| import java.io.Serializable; | 
|   | 
| /** | 
|  * Created by vincent on 2023/3/23 | 
|  */ | 
| @Data | 
| public class AgvProtocol implements Serializable { | 
|   | 
|     private static final long serialVersionUID = 8858385758421567504L; | 
|   | 
|     private String agvNo; | 
|   | 
|     private int timestamp; | 
|   | 
|     private IMessageBody messageBody; | 
|   | 
|     public static AgvProtocol build(String agvNo) { | 
|         AgvProtocol protocol = new AgvProtocol(); | 
|         protocol.setAgvNo(agvNo); | 
|         protocol.setTimestamp((int) (System.currentTimeMillis()/1000)); | 
|         return protocol; | 
|     } | 
|   | 
|     public AgvProtocol setAgvNo(String agvNo) { | 
|         this.agvNo = agvNo; | 
|         return this; | 
|     } | 
|   | 
|     public AgvProtocol setMessageBody(IMessageBody messageBody) { | 
|         this.messageBody = messageBody; | 
|         return this; | 
|     } | 
|   | 
| } |