Browse Source

fix:暂时去除权限控制

pull/62/head
肖晋飞 2 weeks ago
parent
commit
8573ebde93
  1. 18
      yudao-module-alert/yudao-module-alert-biz/src/main/java/cn/iocoder/yudao/module/alert/controller/admin/exa/EXAController.java
  2. 18
      yudao-module-alert/yudao-module-alert-biz/src/main/java/cn/iocoder/yudao/module/alert/controller/admin/instant/InstantController.java
  3. 4
      yudao-module-alert/yudao-module-alert-biz/src/main/java/cn/iocoder/yudao/module/alert/controller/admin/model/RunModelController.java
  4. 8
      yudao-module-alert/yudao-module-alert-biz/src/main/java/cn/iocoder/yudao/module/alert/controller/admin/warn/warnController.java

18
yudao-module-alert/yudao-module-alert-biz/src/main/java/cn/iocoder/yudao/module/alert/controller/admin/exa/EXAController.java

@ -38,7 +38,7 @@ public class EXAController {
@GetMapping("/page")
@Operation(summary = "获取测点分页列表")
@PreAuthorize("@ss.hasPermission('alert:exa:query')")
// @PreAuthorize("@ss.hasPermission('alert:exa:query')")
public CommonResult<PageResult<EXAHttp>> getEXAList(EXAPageReqVO reqVO) throws IOException, URISyntaxException {
PageResult<EXAHttp> pageResult = exaService.getEXAPage(reqVO);
return success(BeanUtils.toBean(pageResult, EXAHttp.class));
@ -46,7 +46,7 @@ public class EXAController {
@GetMapping("/nowList")
@Operation(summary = "获取带实时值的列表")
@PreAuthorize("@ss.hasPermission('alert:exa:query')")
// @PreAuthorize("@ss.hasPermission('alert:exa:query')")
public CommonResult<List<EXAHttp>> getNowDataList(List<EXAHttp> list) throws IOException, URISyntaxException {
List<EXAHttp> nowList=exaService.getEXAListNow(list);
return success(nowList);
@ -54,7 +54,7 @@ public class EXAController {
@PostMapping("/nowListReal")
@Operation(summary = "获取带实时值的列表")
@PreAuthorize("@ss.hasPermission('alert:exa:query')")
// @PreAuthorize("@ss.hasPermission('alert:exa:query')")
public CommonResult<EXAResult> getNowList(@RequestBody EXANowListReqVO list) throws IOException, URISyntaxException {
EXAResult nowList=exaService.getEXAListNowReal(list);
return success(nowList);
@ -63,7 +63,7 @@ public class EXAController {
@GetMapping("/now")
@Operation(summary = "根据点号获取测点实时值-单点或多点")
@PreAuthorize("@ss.hasPermission('alert:exa:query')")
// @PreAuthorize("@ss.hasPermission('alert:exa:query')")
public CommonResult<String> getNowData(String itemName) throws IOException, URISyntaxException {
String nowData=exaService.getEXANow(itemName);
return success(nowData);
@ -72,7 +72,7 @@ public class EXAController {
@GetMapping("/historys")
@Operation(summary = "获取点号历史-支持多点(点号之间用逗号分割)")
@PreAuthorize("@ss.hasPermission('alert:exa:query')")
// @PreAuthorize("@ss.hasPermission('alert:exa:query')")
public CommonResult<List<List<List<Double>>>> getEXAHistorys(EXAHistoryReqVO exaHistoryReqVo) {
List<List<List<Double>>> historyLists=exaService.getEXAHistorys(exaHistoryReqVo);
return success(historyLists);
@ -80,7 +80,7 @@ public class EXAController {
@PostMapping("/create")
@Operation(summary = "新增EXA点号")
@PreAuthorize("@ss.hasPermission('alert:exa:create')")
// @PreAuthorize("@ss.hasPermission('alert:exa:create')")
public CommonResult<String> createPoint(@Valid @RequestBody Point pointVo) throws IOException {
String id = exaService.createPoint(pointVo);
return success(id);
@ -88,7 +88,7 @@ public class EXAController {
@GetMapping("/group")
@Operation(summary = "获取EXA所有组名")
@PreAuthorize("@ss.hasPermission('alert:exa:query')")
// @PreAuthorize("@ss.hasPermission('alert:exa:query')")
public CommonResult<List<List<String>>> getEXAGroupInfo() throws URISyntaxException, IOException {
List<List<String>> groupList=exaService.getEXAGroupInfo();
return success(groupList);
@ -97,7 +97,7 @@ public class EXAController {
@DeleteMapping("/delete")
@Operation(summary = "删除点号")
@Parameter(name = "ItemName", description = "点号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('alert:exa:delete')")
// @PreAuthorize("@ss.hasPermission('alert:exa:delete')")
public CommonResult<Boolean> deleteUser(@RequestParam("ItemName") String ItemName) {
String result= exaService.deletePoint(ItemName);
@ -129,7 +129,7 @@ public class EXAController {
@Parameter(name = "file", description = "Excel 文件", required = true),
@Parameter(name = "updateSupport", description = "是否支持更新,默认为 false", example = "true")
})
@PreAuthorize("@ss.hasPermission('system:user:import')")
// @PreAuthorize("@ss.hasPermission('system:user:import')")
public CommonResult<EXAPointImportRespVO> importExcel(@RequestParam("file") MultipartFile file,
@RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport) throws Exception {
System.out.println(file.getInputStream());

18
yudao-module-alert/yudao-module-alert-biz/src/main/java/cn/iocoder/yudao/module/alert/controller/admin/instant/InstantController.java

@ -34,7 +34,7 @@ public class InstantController {
@GetMapping("/page")
@Operation(summary = "获得模型实例分页列表")
@PreAuthorize("@ss.hasPermission('run:instant:list')")
// @PreAuthorize("@ss.hasPermission('run:instant:list')")
public CommonResult<PageResult<InstantRespVO>> getInstantPage(@Valid InstantPageReqVO pageReqVO) {
PageResult<InstantDO> pageResult = instantService.getInstantPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, InstantRespVO.class));
@ -43,7 +43,7 @@ public class InstantController {
@GetMapping("/get")
@Operation(summary = "获得实例信息")
@PreAuthorize("@ss.hasPermission('run:instant:query')")
// @PreAuthorize("@ss.hasPermission('run:instant:query')")
public CommonResult<InstantRespVO> getInstant(@RequestParam("id") Long id) {
InstantDO instant = instantService.getInstant(id);
return success(BeanUtils.toBean(instant, InstantRespVO.class));
@ -52,7 +52,7 @@ public class InstantController {
@GetMapping("/getPoint")
@Operation(summary = "获得某实例的测点列表")
@PreAuthorize("@ss.hasPermission('run:instant:query')")
// @PreAuthorize("@ss.hasPermission('run:instant:query')")
public CommonResult<List<InstantPointRespVO>> getInstantPoint(@RequestParam("id") Long id) {
List<InstantPointRespVO> instantPointList= instantService.getInstantPoint(id);
return success(instantPointList);
@ -61,7 +61,7 @@ public class InstantController {
@PostMapping("/getChart")
@Operation(summary = "获得某实例的曲线数据--默认-读历史")
@PreAuthorize("@ss.hasPermission('run:instant:query')")
// @PreAuthorize("@ss.hasPermission('run:instant:query')")
public CommonResult<List<InstantChartRespVO>> getInstantChart( @Valid @RequestBody InstantChartReqVO instantChartReqVO) {
List<InstantChartRespVO> instantChartList= instantService.getInstantChart(instantChartReqVO);
return success(instantChartList);
@ -79,7 +79,7 @@ public class InstantController {
@PutMapping("/update")
@Operation(summary = "修改模型实例")
@PreAuthorize("@ss.hasPermission('run:instant:update')")
// @PreAuthorize("@ss.hasPermission('run:instant:update')")
public CommonResult<Boolean> updateInstant(@Valid @RequestBody InstantSaveReqVO updateReqVO) {
instantService.updateInstant(updateReqVO);
return success(true);
@ -87,7 +87,7 @@ public class InstantController {
@GetMapping("/count")
@Operation(summary = "获得各状态数量列表")
@PreAuthorize("@ss.hasPermission('run:instant:query')")
// @PreAuthorize("@ss.hasPermission('run:instant:query')")
public CommonResult<InstantCountRespVO> getInstantPage() {
InstantCountRespVO instantCountRespVO= instantService.getInstantCount();
return success(BeanUtils.toBean(instantCountRespVO, InstantCountRespVO.class));
@ -97,7 +97,7 @@ public class InstantController {
@PostMapping("/create")
@Operation(summary = "创建模型实例")
@PreAuthorize("@ss.hasPermission('run:instant:create')")
// @PreAuthorize("@ss.hasPermission('run:instant:create')")
public CommonResult<List<String>> createInstant(@RequestBody InstantSaveReqVO createReqVO) throws IOException {
return success(instantService.createInstant(createReqVO));
}
@ -105,7 +105,7 @@ public class InstantController {
@DeleteMapping("/delete")
@Operation(summary = "删除模型实例")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('run:instant:delete')")
// @PreAuthorize("@ss.hasPermission('run:instant:delete')")
public CommonResult<Boolean> deleteInstant(@RequestParam("id") Long id) {
instantService.deleteInstant(id);
return success(true);
@ -114,7 +114,7 @@ public class InstantController {
@PostMapping("/calc")
@Operation(summary = "回算模型实例" )
@PreAuthorize("@ss.hasPermission('run:instant:calc')")
// @PreAuthorize("@ss.hasPermission('run:instant:calc')")
public CommonResult<InstantCalcResultVO> calcInstant( @Valid @RequestBody InstantCalcReqVO instantCalcReqVO) {
InstantCalcResultVO instantCalcResult= instantService.calcInstant(instantCalcReqVO);
return success(instantCalcResult);

4
yudao-module-alert/yudao-module-alert-biz/src/main/java/cn/iocoder/yudao/module/alert/controller/admin/model/RunModelController.java

@ -36,7 +36,7 @@ public class RunModelController {
@GetMapping("/page")
@Operation(summary = "获得模型分页列表")
@PreAuthorize("@ss.hasPermission('run:model:query')")
// @PreAuthorize("@ss.hasPermission('run:model:query')")
public CommonResult<PageResult<ModelRespVO>> getModelPage(@Valid ModelPageReqVO pageReqVO) {
PageResult<ModelDO> pageResult = runModelService.getModelPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, ModelRespVO.class));
@ -44,7 +44,7 @@ public class RunModelController {
@GetMapping("/version/page")
@Operation(summary = "获得模型版本分页列表")
@PreAuthorize("@ss.hasPermission('run:model:query')")
// @PreAuthorize("@ss.hasPermission('run:model:query')")
public CommonResult<PageResult<ModelVersionRespVO>> getModelVersionPage(@Valid ModelVersionPageReqVO pageReqVO) {
PageResult<ModelVersionDO> pageResult = runModelService.getModelVersionPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, ModelVersionRespVO.class));

8
yudao-module-alert/yudao-module-alert-biz/src/main/java/cn/iocoder/yudao/module/alert/controller/admin/warn/warnController.java

@ -38,14 +38,14 @@ public class warnController {
@GetMapping("/page")
@Operation(summary = "获得预警分页列表")
@PreAuthorize("@ss.hasPermission('run:warn:query')")
// @PreAuthorize("@ss.hasPermission('run:warn:query')")
public CommonResult<PageResult<WarnRespVO>> getWarnPage(@Valid WarnPageReqVO pageReqVO) {
PageResult<WarnDO> pageResult = warnService.getWarnPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, WarnRespVO.class));
}
@GetMapping("/page-real")
@Operation(summary = "获得预警分页列表")
@PreAuthorize("@ss.hasPermission('run:warn:query')")
// @PreAuthorize("@ss.hasPermission('run:warn:query')")
public CommonResult<PageResult<WarnRespVO>> getWarnPageReal(@Valid WarnPageReqVO pageReqVO) {
pageReqVO.setStatusRealTime(0L);
pageReqVO.setWarnStatus1(1L);
@ -54,7 +54,7 @@ public class warnController {
}
@GetMapping("/get")
@Operation(summary = "获得预警信息")
@PreAuthorize("@ss.hasPermission('run:warn:query')")
// @PreAuthorize("@ss.hasPermission('run:warn:query')")
public CommonResult<WarnRespVO> getWarn(@RequestParam("id") Long id) {
WarnDO warn = warnService.getWarn(id);
return success(BeanUtils.toBean(warn, WarnRespVO.class));
@ -62,7 +62,7 @@ public class warnController {
@PutMapping("/update")
@Operation(summary = "修改预警")
@PreAuthorize("@ss.hasPermission('run:warn:update')")
// @PreAuthorize("@ss.hasPermission('run:warn:update')")
public CommonResult<Boolean> updateWarn(@Valid @RequestBody WarnSaveReqVO updateReqVO) {
warnService.updateWarn(updateReqVO);
return success(true);

Loading…
Cancel
Save