Koishi hai 1 ano
pai
achega
6530935612

+ 1 - 2
power-fitting-JN/src/main/java/com.gyee.power.fitting/controller/gf/NewPhotovoltaicController.java

@@ -14,7 +14,6 @@ import com.gyee.power.fitting.model.custom.TableTitle;
 import com.gyee.power.fitting.service.ProBasicEquipmentService;
 import com.gyee.power.fitting.service.impl.NewIvPvCurveFittingService;
 import com.gyee.power.fitting.service.impl.ScatterpointService;
-import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
@@ -202,7 +201,7 @@ public class NewPhotovoltaicController {
     }
 
     @GetMapping(value = "/wtByWplist")
-    @ApiOperation(value = "风机列表", notes = "风机列表")
+    //@ApiOperation(value = "风机列表", notes = "风机列表")
     public R wtByWplist(@RequestParam(value = "wpids", required = true) String wpids) {
 
         List<ProBasicEquipment> resultList = curveFittingService.wtByWplist(wpids);

+ 4 - 5
power-fitting-JN/src/main/java/com.gyee.power.fitting/dispersionanalysis/InverterAnalysis2.java

@@ -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;
     }
 

+ 3 - 5
power-fitting-JN/src/main/java/com.gyee.power.fitting/dispersionanalysis/PhotovoltaicEfficiencyAnalysis2.java

@@ -6,10 +6,7 @@ import com.gyee.power.fitting.common.result.ResultCode;
 import com.gyee.power.fitting.model.custom.PhotovoltaicInfo;
 import com.gyee.power.fitting.service.impl.IvPvCurveFittingService;
 import lombok.extern.slf4j.Slf4j;
-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;
@@ -19,7 +16,8 @@ import java.util.Map;
 //光伏转换效率分析
 @Slf4j
 @CrossOrigin
-@RestController("/conversion")
+@RequestMapping("/conversion")
+@RestController
 public class PhotovoltaicEfficiencyAnalysis2 {
 
     @Resource