| | |
| | | import com.dy.common.aop.SsoAop; |
| | | import com.dy.common.softUpgrade.parse.HexFileParse; |
| | | import com.dy.common.softUpgrade.parse.HexFileVo; |
| | | import com.dy.common.util.DateTime; |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.pojoRm.UgRtuProgram; |
| | | import com.dy.pipIrrGlobal.voRm.VoRtuProgram; |
| | | import com.dy.pipIrrGlobal.pojoUg.UgRtuProgram; |
| | | import com.dy.pipIrrGlobal.voUg.VoRtuProgram; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.media.Content; |
| | |
| | | if(vo.file == null){ |
| | | return BaseResponseUtils.buildFail("RTU程序文件必须上传") ; |
| | | } |
| | | String fileName = vo.file.getOriginalFilename() ; |
| | | if(this.sv.existFileName(fileName)){ |
| | | return BaseResponseUtils.buildFail("RTU程序文件名已存在") ; |
| | | } |
| | | |
| | | HexFileVo fileVo = null ; |
| | | byte[] fileBytes = null ; |
| | |
| | | } |
| | | if(fileVo != null){ |
| | | UgRtuProgram po = new UgRtuProgram(); |
| | | po.hexFileName = vo.file.getOriginalFilename() ; |
| | | po.hexFileName = fileName ; |
| | | po.programCalculateBytes = (int)fileVo.calculateBytes ; |
| | | po.programCrc16 = fileVo.bytesCrc16 ; |
| | | po.programBytes = fileVo.bytes; |