|
@@ -5,15 +5,16 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.gyee.backconfig.config.CacheContext;
|
|
|
import com.gyee.backconfig.config.R;
|
|
|
import com.gyee.backconfig.model.auto.ProEconTestingPoint;
|
|
|
+import com.gyee.backconfig.service.auto.AsysncGeneratePointService;
|
|
|
import com.gyee.backconfig.service.auto.IProEconTestingPointService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiImplicitParam;
|
|
|
-import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -35,6 +36,9 @@ public class ProEconTestingPointController {
|
|
|
|
|
|
@Autowired
|
|
|
private CacheContext cacheContext;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private AsysncGeneratePointService asysncTestService;
|
|
|
/**
|
|
|
* 逻辑测点list
|
|
|
* @param id
|
|
@@ -105,7 +109,7 @@ public class ProEconTestingPointController {
|
|
|
|
|
|
/**
|
|
|
* 测点生成器
|
|
|
- * @param points 测点,多条逗号隔开 默认空:全部
|
|
|
+ * @param points 测点,数组 默认空:全部
|
|
|
* @param station 场站 默认空(全场)
|
|
|
* @param type fj:风机测点;fc:风场测点;sbs:变电所测点;ws:气象站测点;sq:方正测点 默认空:全部
|
|
|
* @return
|
|
@@ -115,8 +119,9 @@ public class ProEconTestingPointController {
|
|
|
public R generatePoint(@RequestParam(value = "points", required = false) String[] points,
|
|
|
@RequestParam(value = "station", required = false) String station,
|
|
|
@RequestParam(value = "type", required = false) String type) {
|
|
|
+
|
|
|
try {
|
|
|
- proEconTestingPointService.generatePoint(station, points, type);
|
|
|
+ asysncTestService.generatePoint(station, points, type);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return R.error();
|
|
@@ -124,6 +129,24 @@ public class ProEconTestingPointController {
|
|
|
return R.ok().data(true);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 测点分类列表
|
|
|
+ * @param type fj:风机测点;fc:风场测点;sbs:变电所测点;ws:气象站测点;sq:方正测点 默认空:全部
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping(value = "/type-point-list")
|
|
|
+ @ApiOperation(value = "测点分类列表", notes = "测点分类列表")
|
|
|
+ public R generateTypePointList( @RequestParam(value = "type", required = false) String type) {
|
|
|
+ List<ProEconTestingPoint> list = new ArrayList<>();
|
|
|
+ try {
|
|
|
+ list = proEconTestingPointService.generateTypePointList(type);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ return R.error();
|
|
|
+ }
|
|
|
+ return R.ok().data(list);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
@PostMapping(value = "/generateSubStationPoint")
|
|
@@ -166,4 +189,6 @@ public class ProEconTestingPointController {
|
|
|
}
|
|
|
return R.ok().data(true);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|