|
@@ -37,7 +37,7 @@ public class MetricsTplDetailController extends BaseController {
|
|
|
|
|
|
@ApiOperation("选择指标")
|
|
|
@GetMapping("/select/{tplId}")
|
|
|
- public TableDataInfo select(@ApiParam(value = "模板ID" , required = true) @PathVariable("tplId") Long tplId) {
|
|
|
+ public TableDataInfo select(@ApiParam(value = "模板ID", required = true) @PathVariable("tplId") Long tplId) {
|
|
|
startPage();
|
|
|
List<MetricsDef> list = metricsTplDetailService.selectMetricsDefList(tplId);
|
|
|
return getDataTable(list);
|
|
@@ -45,7 +45,7 @@ public class MetricsTplDetailController extends BaseController {
|
|
|
|
|
|
@ApiOperation("添加指标")
|
|
|
@GetMapping("/add/{tplId}")
|
|
|
- public AjaxResult add(@ApiParam(value = "模板ID" , required = true) @PathVariable("tplId") Long tplId, @ApiParam(value = "指标ID数组" , required = true) Long[] metricsIds) {
|
|
|
+ public AjaxResult add(@ApiParam(value = "模板ID", required = true) @PathVariable("tplId") Long tplId, @ApiParam(value = "指标ID数组", required = true) Long[] metricsIds) {
|
|
|
return success(metricsTplDetailService.insertMetricsTplDetails(tplId, metricsIds));
|
|
|
}
|
|
|
|
|
@@ -67,7 +67,7 @@ public class MetricsTplDetailController extends BaseController {
|
|
|
*/
|
|
|
@ApiOperation("导出模板指标明细列表")
|
|
|
@PreAuthorize("@ss.hasPermi('metrics:detail:export')")
|
|
|
- @Log(title = "模板指标明细" , businessType = BusinessType.EXPORT)
|
|
|
+ @Log(title = "模板指标明细", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/export")
|
|
|
public void export(HttpServletResponse response, MetricsTplDetail metricsTplDetail) {
|
|
|
List<MetricsTplDetail> list = metricsTplDetailService.selectMetricsTplDetailList(metricsTplDetail);
|
|
@@ -90,7 +90,7 @@ public class MetricsTplDetailController extends BaseController {
|
|
|
*/
|
|
|
@ApiOperation("新增模板指标明细")
|
|
|
@PreAuthorize("@ss.hasPermi('metrics:detail:add')")
|
|
|
- @Log(title = "模板指标明细" , businessType = BusinessType.INSERT)
|
|
|
+ @Log(title = "模板指标明细", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
public AjaxResult add(@RequestBody MetricsTplDetail metricsTplDetail) {
|
|
|
return toAjax(metricsTplDetailService.insertMetricsTplDetail(metricsTplDetail));
|
|
@@ -101,9 +101,18 @@ public class MetricsTplDetailController extends BaseController {
|
|
|
*/
|
|
|
@ApiOperation("修改模板指标明细")
|
|
|
@PreAuthorize("@ss.hasPermi('metrics:detail:edit')")
|
|
|
- @Log(title = "模板指标明细" , businessType = BusinessType.UPDATE)
|
|
|
+ @Log(title = "模板指标明细", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
|
public AjaxResult edit(@RequestBody MetricsTplDetail metricsTplDetail) {
|
|
|
+ if (metricsTplDetail.getAlarmMid() != null) {
|
|
|
+ metricsTplDetail.setAlarmMid(metricsTplDetail.getAlarmMid().trim());
|
|
|
+ }
|
|
|
+ if (metricsTplDetail.getAlarmLow() != null) {
|
|
|
+ metricsTplDetail.setAlarmLow(metricsTplDetail.getAlarmLow().trim());
|
|
|
+ }
|
|
|
+ if (metricsTplDetail.getAlarmHigh() != null) {
|
|
|
+ metricsTplDetail.setAlarmHigh(metricsTplDetail.getAlarmHigh().trim());
|
|
|
+ }
|
|
|
omService.update(metricsTplDetail);
|
|
|
return toAjax(metricsTplDetailService.updateMetricsTplDetail(metricsTplDetail));
|
|
|
}
|
|
@@ -113,7 +122,7 @@ public class MetricsTplDetailController extends BaseController {
|
|
|
*/
|
|
|
@ApiOperation("删除模板指标明细")
|
|
|
@PreAuthorize("@ss.hasPermi('metrics:detail:remove')")
|
|
|
- @Log(title = "模板指标明细" , businessType = BusinessType.DELETE)
|
|
|
+ @Log(title = "模板指标明细", businessType = BusinessType.DELETE)
|
|
|
@DeleteMapping("/{tplDetailIds}")
|
|
|
public AjaxResult remove(@PathVariable Long[] tplDetailIds) {
|
|
|
for (Long detailId : tplDetailIds) {
|