Commit 70c1bc4a authored by 李腾威's avatar 李腾威

任务 5665 5666

parent 1b9b06c7
...@@ -9,12 +9,14 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -9,12 +9,14 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* 信号分类量测枚举表 * 信号分类量测枚举表
...@@ -92,7 +94,18 @@ public class SignalClassifyController extends AbstractBaseController { ...@@ -92,7 +94,18 @@ public class SignalClassifyController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "信号分类量测枚举表列表全部数据查询", notes = "信号分类量测枚举表列表全部数据查询") @ApiOperation(httpMethod = "GET",value = "信号分类量测枚举表列表全部数据查询", notes = "信号分类量测枚举表列表全部数据查询")
@GetMapping(value = "/list") @GetMapping(value = "/list")
public ResponseModel<List<SignalClassify>> selectForList() { public ResponseModel<List<SignalClassify>> selectForList(@RequestParam(required = false) String isAlarm,
return ResponseHelper.buildResponse(iSignalClassifyService.query().list()); @RequestParam(required = false) String isContainFire) {
if(!ValidationUtil.isEmpty(isAlarm) && "true".equals(isAlarm)) {
if(!ValidationUtil.isEmpty(isContainFire) && "false".equals(isContainFire)) {
return ResponseHelper.buildResponse(iSignalClassifyService.query().list().stream().filter(e->e.getIsAlarm() == 1 && !"FIREALARM".equals(e.getTypeCode())).collect(Collectors.toList()));
} else {
return ResponseHelper.buildResponse(iSignalClassifyService.query().list().stream().filter(e->e.getIsAlarm() == 1).collect(Collectors.toList()));
}
} else {
return ResponseHelper.buildResponse(iSignalClassifyService.query().list());
}
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment