|
@@ -1,6 +1,7 @@
|
|
package com.ims.eval.controller;
|
|
package com.ims.eval.controller;
|
|
|
|
|
|
|
|
|
|
|
|
+import com.ims.common.utils.StringUtils;
|
|
import com.ims.eval.cache.CacheContext;
|
|
import com.ims.eval.cache.CacheContext;
|
|
import com.ims.eval.config.CustomException;
|
|
import com.ims.eval.config.CustomException;
|
|
import com.ims.eval.entity.BinSection;
|
|
import com.ims.eval.entity.BinSection;
|
|
@@ -12,6 +13,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
* <p>
|
|
* <p>
|
|
@@ -44,8 +46,13 @@ public class BinSectionController {
|
|
@GetMapping(value = "list")
|
|
@GetMapping(value = "list")
|
|
public R list(@RequestParam(value = "id", required = false) String id,
|
|
public R list(@RequestParam(value = "id", required = false) String id,
|
|
@RequestParam(value = "sectionName", required = false) String sectionName,
|
|
@RequestParam(value = "sectionName", required = false) String sectionName,
|
|
- @RequestParam(value = "sectionCode", required = false) String sectionCode) {
|
|
+ @RequestParam(value = "sectionCode", required = false) String sectionCode,
|
|
|
|
+ @RequestParam(value = "type", required = false) String type) {
|
|
List<BinSection> list =CacheContext.bsnList;
|
|
List<BinSection> list =CacheContext.bsnList;
|
|
|
|
+ if(StringUtils.isNotEmpty(list)){
|
|
|
|
+ list = list.stream().filter(s -> s.getType().equals(type)).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+
|
|
return R.ok().data(list);
|
|
return R.ok().data(list);
|
|
}
|
|
}
|
|
|
|
|