2ffe6257c6598b7bba4a023946adf117938d82b4.svn-base 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. package cn.com.goldenwater.dcproj.controller;
  2. import cn.com.goldenwater.dcproj.model.BisInspWrm2021;
  3. import cn.com.goldenwater.dcproj.model.BisInspWrm2021Spota;
  4. import cn.com.goldenwater.dcproj.model.BisInspWrm2021Well;
  5. import cn.com.goldenwater.dcproj.param.BisInspWrm2021SpotaParam;
  6. import cn.com.goldenwater.dcproj.param.BisInspWrm2021WellParam;
  7. import cn.com.goldenwater.dcproj.service.BisInspWrm2021Service;
  8. import cn.com.goldenwater.dcproj.service.BisInspWrm2021WellService;
  9. import cn.com.goldenwater.core.web.BaseController;
  10. import cn.com.goldenwater.core.web.BaseResponse;
  11. import cn.com.goldenwater.id.util.UuidUtil;
  12. import com.github.pagehelper.PageInfo;
  13. import io.swagger.annotations.Api;
  14. import io.swagger.annotations.ApiOperation;
  15. import io.swagger.annotations.ApiParam;
  16. import org.apache.commons.collections.CollectionUtils;
  17. import org.slf4j.Logger;
  18. import org.slf4j.LoggerFactory;
  19. import org.apache.commons.lang3.StringUtils;
  20. import org.springframework.beans.factory.annotation.Autowired;
  21. import org.springframework.util.Assert;
  22. import org.springframework.web.bind.annotation.PathVariable;
  23. import org.springframework.web.bind.annotation.RequestBody;
  24. import org.springframework.web.bind.annotation.RequestMapping;
  25. import org.springframework.web.bind.annotation.RequestMethod;
  26. import org.springframework.web.bind.annotation.RequestParam;
  27. import org.springframework.web.bind.annotation.RestController;
  28. import java.util.Date;
  29. import java.util.List;
  30. /**
  31. * @author lhc
  32. * @date 2021-7-8
  33. */
  34. @Api(value = "地下水超采区管理情况抽查管理",tags="地下水超采区管理情况抽查管理")
  35. @RestController
  36. @RequestMapping("/bis/insp/wrm2021/well")
  37. public class BisInspWrm2021WellController extends BaseController {
  38. private Logger logger = LoggerFactory.getLogger(getClass());
  39. @Autowired
  40. private BisInspWrm2021WellService bisInspWrm2021WellService;
  41. @Autowired
  42. private BisInspWrm2021Service bisInspWrm2021Service;
  43. @ApiOperation(value = "修改地下水超采区管理情况抽查")
  44. @RequestMapping(value = "", method = RequestMethod.POST)
  45. public BaseResponse<BisInspWrm2021Well> insert(@ApiParam(name = "bisInspWrm2021Well", value = "BisInspWrm2021Well", required = true) @RequestBody BisInspWrm2021Well bisInspWrm2021Well) {
  46. return buildSuccessResponse(bisInspWrm2021WellService.save(bisInspWrm2021Well));
  47. }
  48. @ApiOperation(value = "根据ID删除地下水超采区管理情况抽查")
  49. @RequestMapping(value = "delete/{id}", method = RequestMethod.POST)
  50. public BaseResponse delete(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
  51. int ret = bisInspWrm2021WellService.delete(id);
  52. return buildSuccessResponse();
  53. }
  54. @ApiOperation(value = "根据ID获取地下水超采区管理情况抽查(单表)")
  55. @RequestMapping(value = "/{id}", method = RequestMethod.GET)
  56. public BaseResponse<BisInspWrm2021Well> get(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
  57. BisInspWrm2021Well bisInspWrm2021Well = bisInspWrm2021WellService.get(id);
  58. return buildSuccessResponse(bisInspWrm2021Well);
  59. }
  60. @ApiOperation(value = "获取地下水超采区管理情况抽查")
  61. @RequestMapping(value = "/getBy/{rgstrId}", method = RequestMethod.POST)
  62. public BaseResponse<BisInspWrm2021Well> getBy(@PathVariable String rgstrId) {
  63. BisInspWrm2021WellParam bisInspWrm2021WellParam = new BisInspWrm2021WellParam();
  64. bisInspWrm2021WellParam.setRgstrId(rgstrId);
  65. return buildSuccessResponse(bisInspWrm2021WellService.getBy(bisInspWrm2021WellParam));
  66. }
  67. }