上传升级程序表单时,增加对升级程序存放地址和程序覆盖起始地址的判断。
| | |
| | | public String storeRamAddr; |
| | | |
| | | /** |
| | | * 程序覆盖超始地址(4字节,8位十六进制字符) |
| | | * 程序覆盖起始地址(4字节,8位十六进制字符) |
| | | */ |
| | | @Schema(description = "程序覆盖超始地址", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @Schema(description = "程序覆盖起始地址", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | public String startRamAddr; |
| | | |
| | | /** |
| | |
| | | || vo.startRamAddr.trim().equals("") |
| | | || vo.startRamAddr.length() != 8 |
| | | || !HexUtil.isHexNumber(vo.startRamAddr)){ |
| | | return BaseResponseUtils.buildFail("程序覆盖超始地址(4字节,8位十六进制数)不正确") ; |
| | | return BaseResponseUtils.buildFail("程序覆盖起始地址(4字节,8位十六进制数)不正确") ; |
| | | } |
| | | if(vo.file == null){ |
| | | return BaseResponseUtils.buildFail("RTU程序文件必须上传") ; |