|
@@ -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); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|