package com.mes.config; import org.springframework.boot.context.properties.ConfigurationProperties; import java.util.ArrayList; import java.util.List; /** * 凸焊客户端配置,对应 application.yml 中 {@code mes.*}。 */ @ConfigurationProperties(prefix = "mes") public class MesClientProperties { /** 主窗口标题 */ private String appTitle = "MES 凸焊客户端"; /** MES 服务 IP(拼 HTTP/SSE 地址) */ private String serverIp = ""; /** 过站工号;system 跳过服务端绑员工校验 */ private String userCode = "system"; /** 过程参数上传路径(凸焊批追走 /upload,不过站) */ private String uploadPath = "/js/a/mes/mesFlexHg/upload"; /** 参数档标识,凸焊为 tuhan */ private String paramProfile = "tuhan"; /** 默认设备类型文案 */ private String deviceType = "凸焊"; /** 收到入队 SSE 后是否自动 next 取码 */ private boolean autoNextOnPush = true; /** 本机工位列表(一拖多) */ private List stations = new ArrayList(); /** 单工位:编码 + S7 PLC */ public static class StationConfig { /** 工位序号(界面/日志用) */ private int id; /** 工位编码(与 MES 队列 stationSn 一致) */ private String stationSn = ""; /** Tab/面板显示标题 */ private String title = ""; /** 是否启用 PLC 通讯 */ private boolean plcEnabled = true; /** PLC IP,如 192.168.0.10 */ private String plcIp = "192.168.0.10"; /** PLC 型号:S1200 / S1500 / S200_SMART 等 */ private String plcType = "S1200"; /** PLC 读写超时(毫秒) */ private int plcTimeoutMs = 3000; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getStationSn() { return stationSn; } public void setStationSn(String stationSn) { this.stationSn = stationSn; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public boolean isPlcEnabled() { return plcEnabled; } public void setPlcEnabled(boolean plcEnabled) { this.plcEnabled = plcEnabled; } public String getPlcIp() { return plcIp; } public void setPlcIp(String plcIp) { this.plcIp = plcIp; } public String getPlcType() { return plcType; } public void setPlcType(String plcType) { this.plcType = plcType; } public int getPlcTimeoutMs() { return plcTimeoutMs; } public void setPlcTimeoutMs(int plcTimeoutMs) { this.plcTimeoutMs = plcTimeoutMs; } } public String getAppTitle() { return appTitle; } public void setAppTitle(String appTitle) { this.appTitle = appTitle; } public String getServerIp() { return serverIp; } public void setServerIp(String serverIp) { this.serverIp = serverIp; } public String getUserCode() { return userCode; } public void setUserCode(String userCode) { this.userCode = userCode; } public String getUploadPath() { return uploadPath; } public void setUploadPath(String uploadPath) { this.uploadPath = uploadPath; } public String getParamProfile() { return paramProfile; } public void setParamProfile(String paramProfile) { this.paramProfile = paramProfile; } public String getDeviceType() { return deviceType; } public void setDeviceType(String deviceType) { this.deviceType = deviceType; } public boolean isAutoNextOnPush() { return autoNextOnPush; } public void setAutoNextOnPush(boolean autoNextOnPush) { this.autoNextOnPush = autoNextOnPush; } public List getStations() { return stations; } public void setStations(List stations) { this.stations = stations; } }