|
@@ -43,16 +43,16 @@ public class MetricsTplDetailController extends BaseController {
|
|
private JdbcTemplate jdbcTemplate;
|
|
private JdbcTemplate jdbcTemplate;
|
|
|
|
|
|
@ApiOperation("选择指标")
|
|
@ApiOperation("选择指标")
|
|
- @GetMapping("/select/{tplId}")
|
|
|
|
- public TableDataInfo select(@ApiParam(value = "模板ID", required = true) @PathVariable("tplId") Long tplId, MetricsDef def) {
|
|
|
|
|
|
+ @GetMapping("/select")
|
|
|
|
+ public TableDataInfo select(@ApiParam(value = "模板ID", required = true) Long tplId, MetricsDef def) {
|
|
startPage();
|
|
startPage();
|
|
List<MetricsDef> list = metricsTplDetailService.selectMetricsDefList(tplId, def);
|
|
List<MetricsDef> list = metricsTplDetailService.selectMetricsDefList(tplId, def);
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation("添加指标")
|
|
@ApiOperation("添加指标")
|
|
- @GetMapping("/add/{tplId}")
|
|
|
|
- public AjaxResult add(@ApiParam(value = "模板ID", required = true) @PathVariable("tplId") Long tplId, @ApiParam(value = "指标ID数组", required = true) Long[] metricsIds) {
|
|
|
|
|
|
+ @GetMapping("/add")
|
|
|
|
+ public AjaxResult add(@ApiParam(value = "模板ID", required = true) Long tplId, @ApiParam(value = "指标ID数组", required = true) Long[] metricsIds) {
|
|
return success(metricsTplDetailService.insertMetricsTplDetails(tplId, metricsIds));
|
|
return success(metricsTplDetailService.insertMetricsTplDetails(tplId, metricsIds));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -87,8 +87,8 @@ public class MetricsTplDetailController extends BaseController {
|
|
*/
|
|
*/
|
|
@ApiOperation("获取模板指标明细详细信息")
|
|
@ApiOperation("获取模板指标明细详细信息")
|
|
//@PreAuthorize("@ss.hasPermi('metrics:detail:query')")
|
|
//@PreAuthorize("@ss.hasPermi('metrics:detail:query')")
|
|
- @GetMapping(value = "/{tplDetailId}")
|
|
|
|
- public AjaxResult getInfo(@PathVariable("tplDetailId") Long tplDetailId) {
|
|
|
|
|
|
+ @GetMapping(value = "/detail")
|
|
|
|
+ public AjaxResult getInfo(Long tplDetailId) {
|
|
return success(metricsTplDetailService.selectMetricsTplDetailByTplDetailId(tplDetailId));
|
|
return success(metricsTplDetailService.selectMetricsTplDetailByTplDetailId(tplDetailId));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -146,8 +146,8 @@ public class MetricsTplDetailController extends BaseController {
|
|
@ApiOperation("删除模板指标明细")
|
|
@ApiOperation("删除模板指标明细")
|
|
//@PreAuthorize("@ss.hasPermi('metrics:detail:remove')")
|
|
//@PreAuthorize("@ss.hasPermi('metrics:detail:remove')")
|
|
@Log(title = "模板指标明细", businessType = BusinessType.DELETE)
|
|
@Log(title = "模板指标明细", businessType = BusinessType.DELETE)
|
|
- @GetMapping("/del/{tplDetailIds}")
|
|
|
|
- public AjaxResult remove(@PathVariable Long[] tplDetailIds) {
|
|
|
|
|
|
+ @GetMapping("/del")
|
|
|
|
+ public AjaxResult remove(Long[] tplDetailIds) {
|
|
for (Long detailId : tplDetailIds) {
|
|
for (Long detailId : tplDetailIds) {
|
|
MetricsTplDetail detail = metricsTplDetailService.selectMetricsTplDetailByTplDetailId(detailId);
|
|
MetricsTplDetail detail = metricsTplDetailService.selectMetricsTplDetailByTplDetailId(detailId);
|
|
omService.del(detail);
|
|
omService.del(detail);
|