|
@@ -1,5 +1,6 @@
|
|
|
package com.cpp.web.controller.configManager;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.cpp.common.core.domain.R;
|
|
|
import com.cpp.web.domain.datafactory.SftpChannel;
|
|
@@ -252,4 +253,20 @@ public class ElectricFieldController {
|
|
|
}
|
|
|
return R.ok(list);
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping("/findByType")
|
|
|
+ public R findByType(String type) {
|
|
|
+ QueryWrapper wrapper = new QueryWrapper<>();
|
|
|
+ wrapper.eq("electric_field_type_enum", type);
|
|
|
+ wrapper.orderByAsc("id");
|
|
|
+ List<ElectricField> electricFieldList = electricFieldService.list(wrapper);
|
|
|
+ List<Map<String, String>> list = new ArrayList<>();
|
|
|
+ for (ElectricField e : electricFieldList) {
|
|
|
+ Map<String, String> map = new HashMap<>();
|
|
|
+ map.put("label", e.getName());
|
|
|
+ map.put("value", e.getStationCode());
|
|
|
+ list.add(map);
|
|
|
+ }
|
|
|
+ return R.ok(list);
|
|
|
+ }
|
|
|
}
|