From b8cc7fbf753253ca5482c33fa6f10741c6f563fa Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期三, 13 十一月 2024 09:33:00 +0800 Subject: [PATCH] 修改删除升级任务中的一个控制器的bug --- pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/program/UgRtuProgramCtrl.java | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/program/UgRtuProgramCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/program/UgRtuProgramCtrl.java index 66872cd..33993ce 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/program/UgRtuProgramCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/program/UgRtuProgramCtrl.java @@ -151,6 +151,10 @@ 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 ; @@ -166,7 +170,7 @@ } 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; -- Gitblit v1.8.0