WellInfoController.java 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package com.bowintek.practice.controller;
  2. import com.bowintek.practice.filter.exception.BaseResponse;
  3. import com.bowintek.practice.filter.exception.RespGenerstor;
  4. import com.bowintek.practice.model.WellBasicInformation;
  5. import com.bowintek.practice.services.service.OrganizationService;
  6. import com.bowintek.practice.services.service.WellInfoService;
  7. import com.bowintek.practice.vo.cd.CdOrganizationTreeVo;
  8. import com.bowintek.practice.vo.query.WellInfoParams;
  9. import com.github.pagehelper.PageInfo;
  10. import org.springframework.beans.factory.annotation.Autowired;
  11. import org.springframework.web.bind.annotation.*;
  12. import java.util.ArrayList;
  13. import java.util.HashMap;
  14. import java.util.List;
  15. @RestController
  16. @RequestMapping(value = "/api/wellInfo")
  17. public class WellInfoController {
  18. @Autowired
  19. private WellInfoService wellInfoService;
  20. @Autowired
  21. private OrganizationService organizationService;
  22. @ResponseBody
  23. @GetMapping("/getList")
  24. public BaseResponse<PageInfo<HashMap<String, Object>>> getList(@RequestParam("page") int page, @RequestParam("rows") int rows,
  25. WellInfoParams params) throws Exception {
  26. PageInfo<HashMap<String, Object>> result = wellInfoService.getList(page, rows, params);
  27. return RespGenerstor.success(result);
  28. }
  29. @GetMapping("/getOrganizationTree")
  30. public BaseResponse getDictionaryList() {
  31. List<CdOrganizationTreeVo> treeVoList = organizationService.getListTree();
  32. return RespGenerstor.success(organizationService.getListTree());
  33. }
  34. @GetMapping("/getWellInfo")
  35. public BaseResponse getWellInfo(String well_id) {
  36. HashMap<String,Object> wellInfo = wellInfoService.getWellInfo(well_id);
  37. List<HashMap<String,Object>> boreholeInterList =wellInfoService.selectBoreholeInterList(well_id);
  38. List<HashMap<String,Object>> testHistoryList =wellInfoService.selectTestHistoryList(well_id);
  39. List<HashMap<String,Object>> analyticalAssaysList =wellInfoService.selectAnalyticalAssaysList(well_id);
  40. HashMap<String, Object> result = new HashMap<>();
  41. result.put("dataModel",wellInfo);
  42. result.put("boreholeInterList",boreholeInterList);
  43. result.put("testHistoryList",testHistoryList);
  44. result.put("analyticalAssaysList",analyticalAssaysList);
  45. return RespGenerstor.success(result);
  46. }
  47. }