Browse Source

修改光伏所用接口

xieshengjie 2 years ago
parent
commit
d1a874f938

+ 21 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/ProBasicEquipmentController.java

@@ -57,4 +57,25 @@ public class ProBasicEquipmentController {
         }
     }
 
+    /**
+     * 多条件获取设备列表
+     *
+     * @param wpid
+     * @return
+     */
+    @GetMapping("equipmentsByWpid")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R getWtPowerCurveFittingList(
+            @RequestParam(value = "wpid", required = false) String wpid) {
+
+        List<ProBasicEquipment> list = proBasicEquipmentService.getProBasicEquipmentList(wpid);
+
+        if (null != list) {
+            return R.data(ResultMsg.ok(list));
+        } else {
+            return R.error(ResultMsg.error());
+        }
+    }
+
 }

+ 2 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/homepage/EconomyHomePageController.java

@@ -76,13 +76,14 @@ public class EconomyHomePageController {
     public R getEconomyPointRanking(
             @RequestParam(value = "foreignKeyId", required = true) String foreignKeyId,
             @RequestParam(value = "dateType", required = true) String dateType,
+            @RequestParam(value = "staType", required = true) String staType,
             @RequestParam(value = "pointCode", required = true) String pointCode,
             @RequestParam(value = "popup", required = false) boolean popup
     )  {
 
         List<ProEconPointCodeDTO> dtos = null;
         try {
-            dtos = economyPointHomePageService.getEconomyPointRanking(foreignKeyId, dateType, pointCode, popup);
+            dtos = economyPointHomePageService.getEconomyPointRanking(foreignKeyId, dateType, pointCode, popup,staType);
         } catch (Exception e) {
             log.error("请求异常", e);
             return R.error(ResultMsg.error());

+ 3 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProBasicEquipmentService.java

@@ -26,5 +26,8 @@ public interface IProBasicEquipmentService extends IService<ProBasicEquipment> {
     List<ProBasicEquipment> getProBasicEquipmentList(String companyIds, String windpowerstationIds, String projectIds, String lineIds,String  type);
 
 
+    List<ProBasicEquipment> getProBasicEquipmentList(String wpid);
+
+
 
 }

+ 1 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPointCodeService.java

@@ -23,6 +23,6 @@ public interface IProEconPointCodeService extends IService<ProEconPointCode> {
 
     ProEconPointCode getProEconPointCode(String nemCode);
 
-    List<ProEconPointCodeDTO>  getEconPointRanking(String regionId, String companyId, String pointCode,Date date,String dateType,boolean popup);
+    List<ProEconPointCodeDTO>  getEconPointRanking(String regionId, String companyId, String pointCode,Date date,String dateType,boolean popup,String statype);
 
 }

+ 5 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProBasicEquipmentServiceImpl.java

@@ -59,4 +59,9 @@ public class ProBasicEquipmentServiceImpl extends ServiceImpl<ProBasicEquipmentM
         SortUtils.sort(list,"nemCode",SortUtils.ASC);
         return list;
     }
+
+    @Override
+    public List<ProBasicEquipment> getProBasicEquipmentList(String wpid) {
+        return CacheContext.wtls.stream().filter(i->i.getWindpowerstationId().equals(wpid)).collect(Collectors.toList());
+    }
 }

+ 2 - 2
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPointCodeServiceImpl.java

@@ -59,8 +59,8 @@ public class ProEconPointCodeServiceImpl extends ServiceImpl<ProEconPointCodeMap
     }
 
     @Override
-    public List<ProEconPointCodeDTO> getEconPointRanking(String regionId, String companyId, String pointCode, Date date, String dateType, boolean popup) {
-        List<ProBasicPowerstation> powerstationList = proBasicPowerstationService.getProBasicPowerstationlist(regionId, companyId, "");
+    public List<ProEconPointCodeDTO> getEconPointRanking(String regionId, String companyId, String pointCode, Date date, String dateType, boolean popup,String statype) {
+        List<ProBasicPowerstation> powerstationList = proBasicPowerstationService.getProBasicPowerstationlist(regionId, companyId, statype);
 
         ProEconPointCode proEconPointCode = getProEconPointCode(pointCode);
         if (null == proEconPointCode){

+ 2 - 2
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/homepage/EconomyPointHomePageService.java

@@ -223,11 +223,11 @@ public class EconomyPointHomePageService {
      * @param pointCode
      * @return
      */
-    public List<ProEconPointCodeDTO> getEconomyPointRanking(String foreignKeyId, String dateType,String pointCode,boolean popup){
+    public List<ProEconPointCodeDTO> getEconomyPointRanking(String foreignKeyId, String dateType,String pointCode,boolean popup,String statype){
         //获取当前时间
         String strdate = DateUtils.toDate1(new Date());
         Date date = DateUtils.parseDate(strdate);
-        List<ProEconPointCodeDTO> pointCodeDTO = proEconPointCodeService.getEconPointRanking("", foreignKeyId, pointCode,date,dateType,popup);
+        List<ProEconPointCodeDTO> pointCodeDTO = proEconPointCodeService.getEconPointRanking("", foreignKeyId, pointCode,date,dateType,popup,statype);
         return pointCodeDTO;
     }
     /**