123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- package com.bowintek.practice.controller;
- import com.bowintek.practice.filter.exception.BaseResponse;
- import com.bowintek.practice.filter.exception.RespGenerstor;
- import com.bowintek.practice.model.WellBasicInformation;
- import com.bowintek.practice.services.service.OrganizationService;
- import com.bowintek.practice.services.service.WellInfoService;
- import com.bowintek.practice.vo.cd.CdOrganizationTreeVo;
- import com.bowintek.practice.vo.query.WellInfoParams;
- import com.github.pagehelper.PageInfo;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import java.util.ArrayList;
- import java.util.HashMap;
- import java.util.List;
- @RestController
- @RequestMapping(value = "/api/wellInfo")
- public class WellInfoController {
- @Autowired
- private WellInfoService wellInfoService;
- @Autowired
- private OrganizationService organizationService;
- @ResponseBody
- @GetMapping("/getList")
- public BaseResponse<PageInfo<HashMap<String, Object>>> getList(@RequestParam("page") int page, @RequestParam("rows") int rows,
- WellInfoParams params) throws Exception {
- PageInfo<HashMap<String, Object>> result = wellInfoService.getList(page, rows, params);
- return RespGenerstor.success(result);
- }
- @GetMapping("/getOrganizationTree")
- public BaseResponse getDictionaryList() {
- List<CdOrganizationTreeVo> treeVoList = organizationService.getListTree();
- return RespGenerstor.success(organizationService.getListTree());
- }
- @GetMapping("/getWellInfo")
- public BaseResponse getWellInfo(String well_id) {
- HashMap<String,Object> wellInfo = wellInfoService.getWellInfo(well_id);
- List<HashMap<String,Object>> boreholeInterList =wellInfoService.selectBoreholeInterList(well_id);
- List<HashMap<String,Object>> testHistoryList =wellInfoService.selectTestHistoryList(well_id);
- List<HashMap<String,Object>> analyticalAssaysList =wellInfoService.selectAnalyticalAssaysList(well_id);
- HashMap<String, Object> result = new HashMap<>();
- result.put("dataModel",wellInfo);
- result.put("boreholeInterList",boreholeInterList);
- result.put("testHistoryList",testHistoryList);
- result.put("analyticalAssaysList",analyticalAssaysList);
- return RespGenerstor.success(result);
- }
- }
|