|
@@ -73,16 +73,16 @@ public class ShipWarningRuleController extends BaseController {
|
|
|
|
|
|
@ApiOperation("预警规则列表")
|
|
|
@GetMapping("/warn-rule/list")
|
|
|
- public TableDataInfo getWarningRuleList(Integer pageNum, Integer pageSize){
|
|
|
+ public TableDataInfo getWarningRuleList(String ruleName, Integer pageNum, Integer pageSize){
|
|
|
startPage(pageNum,pageSize);
|
|
|
- List<WarningRuleResult> results = shipWarningModelMapper.selectRuleList(null,null);
|
|
|
+ List<WarningRuleResult> results = shipWarningModelMapper.selectRuleList(ruleName,null,null);
|
|
|
return getDataTable(results);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("预警规则列表(预警接入)")
|
|
|
@GetMapping("/warn-rule/lists")
|
|
|
public R<List<WarningRuleResult>> lists(){
|
|
|
- List<WarningRuleResult> results = shipWarningModelMapper.selectRuleList(null,null);
|
|
|
+ List<WarningRuleResult> results = shipWarningModelMapper.selectRuleList(null,null,null);
|
|
|
if (results==null||results.size()<0){
|
|
|
return R.fail();
|
|
|
}
|
|
@@ -92,7 +92,7 @@ public class ShipWarningRuleController extends BaseController {
|
|
|
@ApiOperation("预警规则详情")
|
|
|
@GetMapping("/warn-rule/get-by-id")
|
|
|
public R<WarningRuleResult> getWarningRuleById(String id){
|
|
|
- List<WarningRuleResult> results = shipWarningModelMapper.selectRuleList(null,id);
|
|
|
+ List<WarningRuleResult> results = shipWarningModelMapper.selectRuleList(null,null,id);
|
|
|
if(results==null||results.size()<1){
|
|
|
return R.fail();
|
|
|
}
|
|
@@ -169,4 +169,14 @@ public class ShipWarningRuleController extends BaseController {
|
|
|
return R.fail(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "勾选区域",notes = "参数ids是字符串,多个区域id以英文符号逗号隔开")
|
|
|
+ @PostMapping("/getAreaByIds")
|
|
|
+ public R getWarningAreaById(String ids){
|
|
|
+ try {
|
|
|
+ return R.ok(shipWarningService.findInId(ids));
|
|
|
+ }catch (Exception e){
|
|
|
+ return R.fail(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|