40 lines
1.1 KiB
Java
40 lines
1.1 KiB
Java
package iet.ustb.sf.controller;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import iet.ustb.sf.common.R;
|
|
import iet.ustb.sf.domain.Rule;
|
|
import iet.ustb.sf.service.RuleService;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import jakarta.annotation.Resource;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 目标管控-规则
|
|
* RuleController
|
|
*
|
|
* @author huangge1199
|
|
* @since 2025/8/11 13:55:47
|
|
*/
|
|
@Tag(name = "目标管控-规则")
|
|
@RestController
|
|
@RequestMapping("/mbgk/rule")
|
|
public class RuleController {
|
|
|
|
@Resource
|
|
private RuleService ruleService;
|
|
|
|
@Operation(summary = "根据指标ID查询规则")
|
|
@PostMapping("/getRulesByTarget")
|
|
public R<List<Rule>> getRulesByTarget(@RequestBody JSONObject params) {
|
|
List<Rule> ruleList = ruleService.getRulesByTarget(params);
|
|
return R.ok(ruleList);
|
|
}
|
|
|
|
}
|