zy 2 éve
szülő
commit
6389dd6cd8

+ 31 - 0
neim-biz/src/main/java/com/jiayue/biz/controller/ManualEntryController.java

@@ -1,6 +1,10 @@
 package com.jiayue.biz.controller;
 
+import com.jiayue.biz.domain.ProjectInfo;
+import com.jiayue.biz.domain.TotalityInfo;
 import com.jiayue.biz.service.ManualEntryService;
+import com.jiayue.biz.service.ProjectInfoService;
+import com.jiayue.biz.service.TotalityInfoService;
 import com.jiayue.common.core.controller.BaseController;
 import com.jiayue.common.core.domain.AjaxResult;
 import lombok.RequiredArgsConstructor;
@@ -9,6 +13,11 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 /**
  * 人工录入Controller
  * @date 2023-05-9
@@ -18,6 +27,8 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("/manualEntry")
 public class ManualEntryController extends BaseController {
     private final ManualEntryService manualEntryService;
+    private final TotalityInfoService totalityInfoService;
+    private final ProjectInfoService projectInfoService;
     /*获取光伏站下拉框,风场站的下拉框*/
     @GetMapping("/stationInfo")
     public AjaxResult hauFuInfo() {
@@ -28,4 +39,24 @@ public class ManualEntryController extends BaseController {
     public AjaxResult getProvincialEnergyStations() {
         return AjaxResult.success(manualEntryService.getProvincialEnergyStations());
     }
+    //获取项目(场站)总体信息
+    @GetMapping("/getTotalityInfo")
+    public AjaxResult getTotalityInfo() {
+        return AjaxResult.success(totalityInfoService.selectTotalityInfoList());
+    }
+    /**
+     *项目进展获取项目名称+id
+     */
+    @GetMapping("/getProjectInfo")
+    public AjaxResult getProjectInfo(){
+        List<Map<String,String>> list = new ArrayList<>();
+        List<ProjectInfo> projectInfoList = projectInfoService.getProjectInfoList();
+        for(ProjectInfo projectInfo : projectInfoList){
+            Map<String,String> map = new HashMap<>();
+            map.put("id",projectInfo.getId());
+            map.put("name",projectInfo.getProjectBasicInfo().getProjectName());
+            list.add(map);
+        }
+        return AjaxResult.success(list);
+    }
 }

+ 1 - 0
neim-biz/src/main/java/com/jiayue/biz/service/ManualEntryService.java

@@ -2,6 +2,7 @@ package com.jiayue.biz.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.jiayue.biz.domain.ProvincialEnergyStations;
+import com.jiayue.biz.domain.TotalityInfo;
 import com.jiayue.biz.domain.WindTowerDataParentTable;
 import com.jiayue.biz.dto.ProjectEvolveDto;
 import com.jiayue.biz.dto.SelectLabForVal;

+ 4 - 9
neim-biz/src/main/java/com/jiayue/biz/service/impl/ManualEntryServiceImpl.java

@@ -27,7 +27,7 @@ import java.util.*;
 import java.util.stream.Collectors;
 
 /**
- * 首页Service业务层处理
+ * 人工录入Service业务层处理
  *
  * @author L.ym
  * @date 2022-05-11
@@ -37,8 +37,9 @@ import java.util.stream.Collectors;
 public class ManualEntryServiceImpl extends ServiceImpl<WindTowerDataParentTableMapper, WindTowerDataParentTable> implements ManualEntryService {
 
     private final StationInfoService stationInfoService;
-    private final ProjectInfoService projectInfoService;
+
     private final ProvincialEnergyStationsService provincialEnergyStationsService;
+
     /*
      * 获取光伏站下拉框,风场站的下拉框
     */
@@ -73,11 +74,5 @@ public class ManualEntryServiceImpl extends ServiceImpl<WindTowerDataParentTable
     public ProvincialEnergyStations getProvincialEnergyStations() {
         return provincialEnergyStationsService.getProvincialEnergyStations();
     }
-    /**
-     *获取项目信息
-     *
-     * */
-    public List<ProjectInfo> getProjectInfo(){
-        return projectInfoService.getProjectInfoList();
-    }
+
 }

+ 3 - 0
neim-biz/src/main/java/com/jiayue/biz/service/impl/ProvincialEnergyStationsServiceImpl.java

@@ -20,5 +20,8 @@ public class ProvincialEnergyStationsServiceImpl implements ProvincialEnergyStat
         return mongoTemplate.findOne(query, ProvincialEnergyStations.class, "province_info");
     }
 
+    public void updateProvincialEnergyStations(){
+
+    }
 
 }