MesClientProperties.java 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. package com.mes.config;
  2. import org.springframework.boot.context.properties.ConfigurationProperties;
  3. import java.util.ArrayList;
  4. import java.util.List;
  5. /**
  6. * 凸焊客户端配置,对应 application.yml 中 {@code mes.*}。
  7. */
  8. @ConfigurationProperties(prefix = "mes")
  9. public class MesClientProperties {
  10. /** 主窗口标题 */
  11. private String appTitle = "MES 凸焊客户端";
  12. /** MES 服务 IP(拼 HTTP/SSE 地址) */
  13. private String serverIp = "";
  14. /** 过站工号;system 跳过服务端绑员工校验 */
  15. private String userCode = "system";
  16. /** 过程参数上传路径(凸焊批追走 /upload,不过站) */
  17. private String uploadPath = "/js/a/mes/mesFlexHg/upload";
  18. /** 参数档标识,凸焊为 tuhan */
  19. private String paramProfile = "tuhan";
  20. /** 默认设备类型文案 */
  21. private String deviceType = "凸焊";
  22. /** 收到入队 SSE 后是否自动 next 取码 */
  23. private boolean autoNextOnPush = true;
  24. /** 本机工位列表(一拖多) */
  25. private List<StationConfig> stations = new ArrayList<StationConfig>();
  26. /** 单工位:编码 + S7 PLC */
  27. public static class StationConfig {
  28. /** 工位序号(界面/日志用) */
  29. private int id;
  30. /** 工位编码(与 MES 队列 stationSn 一致) */
  31. private String stationSn = "";
  32. /** Tab/面板显示标题 */
  33. private String title = "";
  34. /** 是否启用 PLC 通讯 */
  35. private boolean plcEnabled = true;
  36. /** PLC IP,如 192.168.0.10 */
  37. private String plcIp = "192.168.0.10";
  38. /** PLC 型号:S1200 / S1500 / S200_SMART 等 */
  39. private String plcType = "S1200";
  40. /** PLC 读写超时(毫秒) */
  41. private int plcTimeoutMs = 3000;
  42. public int getId() {
  43. return id;
  44. }
  45. public void setId(int id) {
  46. this.id = id;
  47. }
  48. public String getStationSn() {
  49. return stationSn;
  50. }
  51. public void setStationSn(String stationSn) {
  52. this.stationSn = stationSn;
  53. }
  54. public String getTitle() {
  55. return title;
  56. }
  57. public void setTitle(String title) {
  58. this.title = title;
  59. }
  60. public boolean isPlcEnabled() {
  61. return plcEnabled;
  62. }
  63. public void setPlcEnabled(boolean plcEnabled) {
  64. this.plcEnabled = plcEnabled;
  65. }
  66. public String getPlcIp() {
  67. return plcIp;
  68. }
  69. public void setPlcIp(String plcIp) {
  70. this.plcIp = plcIp;
  71. }
  72. public String getPlcType() {
  73. return plcType;
  74. }
  75. public void setPlcType(String plcType) {
  76. this.plcType = plcType;
  77. }
  78. public int getPlcTimeoutMs() {
  79. return plcTimeoutMs;
  80. }
  81. public void setPlcTimeoutMs(int plcTimeoutMs) {
  82. this.plcTimeoutMs = plcTimeoutMs;
  83. }
  84. }
  85. public String getAppTitle() {
  86. return appTitle;
  87. }
  88. public void setAppTitle(String appTitle) {
  89. this.appTitle = appTitle;
  90. }
  91. public String getServerIp() {
  92. return serverIp;
  93. }
  94. public void setServerIp(String serverIp) {
  95. this.serverIp = serverIp;
  96. }
  97. public String getUserCode() {
  98. return userCode;
  99. }
  100. public void setUserCode(String userCode) {
  101. this.userCode = userCode;
  102. }
  103. public String getUploadPath() {
  104. return uploadPath;
  105. }
  106. public void setUploadPath(String uploadPath) {
  107. this.uploadPath = uploadPath;
  108. }
  109. public String getParamProfile() {
  110. return paramProfile;
  111. }
  112. public void setParamProfile(String paramProfile) {
  113. this.paramProfile = paramProfile;
  114. }
  115. public String getDeviceType() {
  116. return deviceType;
  117. }
  118. public void setDeviceType(String deviceType) {
  119. this.deviceType = deviceType;
  120. }
  121. public boolean isAutoNextOnPush() {
  122. return autoNextOnPush;
  123. }
  124. public void setAutoNextOnPush(boolean autoNextOnPush) {
  125. this.autoNextOnPush = autoNextOnPush;
  126. }
  127. public List<StationConfig> getStations() {
  128. return stations;
  129. }
  130. public void setStations(List<StationConfig> stations) {
  131. this.stations = stations;
  132. }
  133. }