1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- 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;
- import org.springframework.beans.factory.annotation.Autowired;
- 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
- */
- @RequiredArgsConstructor(onConstructor_ = @Autowired)
- @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() {
- return AjaxResult.success(manualEntryService.getStationInfo());
- }
- //获取华电以及全省资源概况
- @GetMapping("/getProvincialEnergyStations")
- 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);
- }
- }
|