Browse Source

预警规则保存修改

tags/24090101
CMM 2 months ago
parent
commit
01ebd6b361
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/sys/controller/EarlyWarningController.java

+ 5
- 0
hz-pm-api/src/main/java/com/hz/pm/api/sys/controller/EarlyWarningController.java View File

@@ -1,5 +1,6 @@
package com.hz.pm.api.sys.controller; package com.hz.pm.api.sys.controller;


import com.hz.pm.api.user.helper.MhUnitCache;
import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.model.PageVo;
import com.ningdatech.log.annotation.WebLog; import com.ningdatech.log.annotation.WebLog;
import com.hz.pm.api.sys.model.req.WarningListReq; import com.hz.pm.api.sys.model.req.WarningListReq;
@@ -34,6 +35,7 @@ public class EarlyWarningController {
private final IEarlyWarningService earlyWarningService; private final IEarlyWarningService earlyWarningService;


private final IEarlyWarningRecordsService earlyWarningRecordsService; private final IEarlyWarningRecordsService earlyWarningRecordsService;
private final MhUnitCache mhUnitCache;


@ApiOperation(value = "预警规则获取", notes = "预警规则获取") @ApiOperation(value = "预警规则获取", notes = "预警规则获取")
@GetMapping("/detail/{mhUnitId}") @GetMapping("/detail/{mhUnitId}")
@@ -45,6 +47,9 @@ public class EarlyWarningController {
@PostMapping("/save") @PostMapping("/save")
@WebLog("预警规则保存") @WebLog("预警规则保存")
public String save(@Validated @RequestBody WflowEarlyWarningDTO dto) { public String save(@Validated @RequestBody WflowEarlyWarningDTO dto) {
Long mhUnitId = dto.getMhUnitId();
List<Long> viewChildIds = mhUnitCache.getViewChildIdsRecursion(mhUnitId);
dto.setViewChildUnitIds(viewChildIds);
return earlyWarningService.saveByMhUnit(dto); return earlyWarningService.saveByMhUnit(dto);
} }




Loading…
Cancel
Save