| | |
| | | private String mowerId; |
| | | private String cuttingWidth; |
| | | private String simCardNumber; |
| | | private String handheldMarkerId; |
| | | private String firmwareVersion; |
| | | private String appVersion; |
| | | |
| | |
| | | } |
| | | |
| | | // 带参构造方法 |
| | | public Setsys(String mowerId, String cuttingWidth, String simCardNumber, String firmwareVersion, String appVersion) { |
| | | public Setsys(String mowerId, String cuttingWidth, String simCardNumber, String handheldMarkerId, String firmwareVersion, String appVersion) { |
| | | this.mowerId = mowerId; |
| | | this.cuttingWidth = cuttingWidth; |
| | | this.simCardNumber = simCardNumber; |
| | | this.handheldMarkerId = handheldMarkerId; |
| | | this.firmwareVersion = firmwareVersion; |
| | | this.appVersion = appVersion; |
| | | } |
| | |
| | | this.simCardNumber = simCardNumber; |
| | | } |
| | | |
| | | public String getHandheldMarkerId() { |
| | | return handheldMarkerId; |
| | | } |
| | | |
| | | public void setHandheldMarkerId(String handheldMarkerId) { |
| | | this.handheldMarkerId = handheldMarkerId; |
| | | } |
| | | |
| | | public String getFirmwareVersion() { |
| | | return firmwareVersion; |
| | | } |
| | |
| | | this.mowerId = "-1".equals(props.getProperty("mowerId")) ? null : props.getProperty("mowerId"); |
| | | this.cuttingWidth = "-1".equals(props.getProperty("cuttingWidth")) ? null : props.getProperty("cuttingWidth"); |
| | | this.simCardNumber = "-1".equals(props.getProperty("simCardNumber")) ? null : props.getProperty("simCardNumber"); |
| | | this.handheldMarkerId = "-1".equals(props.getProperty("handheldMarkerId")) ? null : props.getProperty("handheldMarkerId"); |
| | | this.firmwareVersion = "-1".equals(props.getProperty("firmwareVersion")) ? null : props.getProperty("firmwareVersion"); |
| | | this.appVersion = "-1".equals(props.getProperty("appVersion")) ? null : props.getProperty("appVersion"); |
| | | |
| | |
| | | case "simCardNumber": |
| | | this.simCardNumber = value; |
| | | break; |
| | | case "handheldMarkerId": |
| | | this.handheldMarkerId = value; |
| | | break; |
| | | case "firmwareVersion": |
| | | this.firmwareVersion = value; |
| | | break; |
| | |
| | | this.mowerId = null; |
| | | this.cuttingWidth = null; |
| | | this.simCardNumber = null; |
| | | this.handheldMarkerId = null; |
| | | this.firmwareVersion = null; |
| | | this.appVersion = null; |
| | | } |
| | |
| | | System.out.println("mowerId: " + (mowerId != null ? mowerId : "未设置")); |
| | | System.out.println("cuttingWidth: " + (cuttingWidth != null ? cuttingWidth : "未设置")); |
| | | System.out.println("simCardNumber: " + (simCardNumber != null ? simCardNumber : "未设置")); |
| | | System.out.println("handheldMarkerId: " + (handheldMarkerId != null ? handheldMarkerId : "未设置")); |
| | | System.out.println("firmwareVersion: " + (firmwareVersion != null ? firmwareVersion : "未设置")); |
| | | System.out.println("appVersion: " + (appVersion != null ? appVersion : "未设置")); |
| | | } |
| | |
| | | "mowerId='" + mowerId + '\'' + |
| | | ", cuttingWidth='" + cuttingWidth + '\'' + |
| | | ", simCardNumber='" + simCardNumber + '\'' + |
| | | ", handheldMarkerId='" + handheldMarkerId + '\'' + |
| | | ", firmwareVersion='" + firmwareVersion + '\'' + |
| | | ", appVersion='" + appVersion + '\'' + |
| | | '}'; |