|
@@ -12,10 +12,7 @@ import com.gyee.power.fitting.model.custom.TsDoubleData;
|
|
|
import com.gyee.power.fitting.service.ProBasicEquipmentPointService;
|
|
|
import com.gyee.power.fitting.service.ProBasicEquipmentService;
|
|
|
import com.gyee.power.fitting.service.ProEconEquipmentmodelService;
|
|
|
-import org.springframework.web.bind.annotation.CrossOrigin;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.ArrayList;
|
|
@@ -26,7 +23,8 @@ import java.util.stream.Collectors;
|
|
|
|
|
|
//等效发电时分析
|
|
|
@CrossOrigin
|
|
|
-@RestController("/equivalent")
|
|
|
+@RequestMapping("/equivalent")
|
|
|
+@RestController
|
|
|
public class InverterAnalysis2 {
|
|
|
|
|
|
@Resource
|
|
@@ -113,6 +111,7 @@ public class InverterAnalysis2 {
|
|
|
|
|
|
// 计算等效发电时
|
|
|
private double calculateEquivalentOperatingHours(double power, double installedCapacity) {
|
|
|
+ if (installedCapacity == 0) return 0;
|
|
|
return power / installedCapacity;
|
|
|
}
|
|
|
|