|  |  |  | 
|---|
|  |  |  | import com.dy.common.webUtil.BaseResponseUtils; | 
|---|
|  |  |  | import com.dy.common.webUtil.QueryResultVo; | 
|---|
|  |  |  | import com.dy.common.webUtil.ResultCodeMsg; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoRm.UgRtuTask; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoUg.UgRtuTask; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voPr.VoController; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.Operation; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.media.Content; | 
|---|
|  |  |  | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(res); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("查询RTU升级任务异常", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | return BaseResponseUtils.buildErrorMsg(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<Boolean> deleteAll(Long taskId){ | 
|---|
|  |  |  | if(taskId == null){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("任务id不能为空") ; | 
|---|
|  |  |  | return BaseResponseUtils.buildErrorMsg("任务id不能为空") ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | int count; | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | count = this.sv.deleteAll(taskId); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("删除升级所有对象控制器异常", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | return BaseResponseUtils.buildErrorMsg(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(count <= 0){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("数据库操作失败") ; | 
|---|
|  |  |  | return BaseResponseUtils.buildErrorMsg("数据库操作失败") ; | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(true) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<Boolean> deleteOne(Long id){ | 
|---|
|  |  |  | if(id == null){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("id不能为空") ; | 
|---|
|  |  |  | return BaseResponseUtils.buildErrorMsg("id不能为空") ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | int count; | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | count = this.sv.deleteOne(id); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("删除升级对象控制器异常", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | return BaseResponseUtils.buildErrorMsg(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(count <= 0){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("数据库操作失败") ; | 
|---|
|  |  |  | return BaseResponseUtils.buildErrorMsg("数据库操作失败") ; | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(true) ; | 
|---|
|  |  |  | } | 
|---|