|
@@ -1,8 +1,10 @@
|
|
package com.jiayue.biz.controller;
|
|
package com.jiayue.biz.controller;
|
|
|
|
|
|
|
|
+import com.jiayue.biz.domain.InverterInfo;
|
|
import com.jiayue.biz.domain.PvModuleModel;
|
|
import com.jiayue.biz.domain.PvModuleModel;
|
|
import com.jiayue.biz.domain.StationInfo;
|
|
import com.jiayue.biz.domain.StationInfo;
|
|
import com.jiayue.biz.domain.WeatherStationInfo;
|
|
import com.jiayue.biz.domain.WeatherStationInfo;
|
|
|
|
+import com.jiayue.biz.service.InverterInfoService;
|
|
import com.jiayue.biz.service.PvModuleModelService;
|
|
import com.jiayue.biz.service.PvModuleModelService;
|
|
import com.jiayue.biz.service.StationInfoService;
|
|
import com.jiayue.biz.service.StationInfoService;
|
|
import com.jiayue.biz.service.WeatherStationInfoService;
|
|
import com.jiayue.biz.service.WeatherStationInfoService;
|
|
@@ -15,10 +17,7 @@ import lombok.RequiredArgsConstructor;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.HashMap;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
+import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -33,6 +32,8 @@ import java.util.stream.Collectors;
|
|
public class InverterInfoController extends BaseController {
|
|
public class InverterInfoController extends BaseController {
|
|
private final PvModuleModelService pvModuleModelService;
|
|
private final PvModuleModelService pvModuleModelService;
|
|
private final StationInfoService stationInfoService;
|
|
private final StationInfoService stationInfoService;
|
|
|
|
+
|
|
|
|
+ private final InverterInfoService inverterInfoService;
|
|
@GetMapping("/getPvModuleModel")
|
|
@GetMapping("/getPvModuleModel")
|
|
public AjaxResult getPvModuleModel() {
|
|
public AjaxResult getPvModuleModel() {
|
|
List<PvModuleModel> pvModuleModels = pvModuleModelService.list();
|
|
List<PvModuleModel> pvModuleModels = pvModuleModelService.list();
|
|
@@ -63,4 +64,26 @@ public class InverterInfoController extends BaseController {
|
|
}
|
|
}
|
|
return AjaxResult.success(list);
|
|
return AjaxResult.success(list);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //新增逆变器
|
|
|
|
+ @PostMapping("/addInverterInfo")
|
|
|
|
+ public void addInverterInfo(InverterInfo inverterInfo, String stationId){
|
|
|
|
+ inverterInfoService.addInverterInfo(inverterInfo,stationId);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //修改逆变器
|
|
|
|
+ @PutMapping("/updateInverterInfo")
|
|
|
|
+ public void updateInverterInfo(InverterInfo inverterInfo,String stationId){
|
|
|
|
+ inverterInfoService.updateInverterInfo(inverterInfo,stationId);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ //删除逆变器
|
|
|
|
+ @DeleteMapping("/deleteInverterInfo")
|
|
|
|
+ public void deleteInverterInfo(InverterInfo inverterInfo,String stationId){
|
|
|
|
+ inverterInfoService.deleteInverterInfo(inverterInfo,stationId);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|