ffa5fd66915f42175d712e5285604de2526dd045.svn-base 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. package cn.com.goldenwater.dcproj.controller.xjvill;
  2. import cn.com.goldenwater.core.web.BaseController;
  3. import cn.com.goldenwater.core.web.BaseResponse;
  4. import cn.com.goldenwater.dcproj.dto.AttCountryDto;
  5. import cn.com.goldenwater.dcproj.dto.BisNewDcuserRelVillDto;
  6. import cn.com.goldenwater.dcproj.model.BisInspXjvill;
  7. import cn.com.goldenwater.dcproj.service.BisInspXjvillService;
  8. import io.swagger.annotations.Api;
  9. import io.swagger.annotations.ApiOperation;
  10. import io.swagger.annotations.ApiParam;
  11. import org.slf4j.Logger;
  12. import org.slf4j.LoggerFactory;
  13. import org.springframework.beans.factory.annotation.Autowired;
  14. import org.springframework.web.bind.annotation.*;
  15. import java.util.List;
  16. /**
  17. * @author lhc
  18. * @date 2021-9-9
  19. */
  20. @Api(value = "新疆兵团农村饮水督查登记表管理", tags = "新疆兵团农村饮水督查登记表管理")
  21. @RestController
  22. @RequestMapping("/bis/insp/xjvill")
  23. public class BisInspXjvillController extends BaseController {
  24. private Logger logger = LoggerFactory.getLogger(getClass());
  25. @Autowired
  26. private BisInspXjvillService bisInspXjvillService;
  27. @ApiOperation(value = "修改新疆兵团农村饮水督查登记表")
  28. @RequestMapping(value = "", method = RequestMethod.POST)
  29. public BaseResponse<BisInspXjvill> insert(@ApiParam(name = "bisInspXjvill", value = "BisInspXjvill", required = true) @RequestBody BisInspXjvill bisInspXjvill) {
  30. bisInspXjvillService.update(bisInspXjvill);
  31. return buildSuccessResponse(bisInspXjvill);
  32. }
  33. @ApiOperation(value = "根据ID获取新疆兵团农村饮水督查登记表(单表)")
  34. @RequestMapping(value = "/{id}", method = RequestMethod.GET)
  35. public BaseResponse<BisInspXjvill> get(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
  36. BisInspXjvill bisInspXjvill = bisInspXjvillService.get(id);
  37. return buildSuccessResponse(bisInspXjvill);
  38. }
  39. @ApiOperation(value = "获取县-镇(乡)--村用水户和饮水工程列表")
  40. @RequestMapping(value = "/findNode/{code}/{regstrId}", method = RequestMethod.GET)
  41. public BaseResponse findNode(
  42. @ApiParam(name = "code", value = "code", required = true) @PathVariable String code,
  43. @ApiParam(name = "regstrId", value = "regstrId", required = true) @PathVariable String regstrId) {
  44. return buildSuccessResponse(bisInspXjvillService.findNode(code, regstrId));
  45. }
  46. @ApiOperation(value = "获取督查中县-镇(乡)--村树节点")
  47. @RequestMapping(value = "/findTree/{rgstrId}", method = RequestMethod.GET)
  48. public BaseResponse<List<BisNewDcuserRelVillDto>> findTree(@ApiParam(name = "rgstrId", value = "rgstrId", required = true)
  49. @PathVariable String rgstrId) {
  50. return buildSuccessResponse(bisInspXjvillService.findTree(rgstrId));
  51. }
  52. @ApiOperation(value = "获取未添加的团")
  53. @RequestMapping(value = "/findCheckTree/{rgstrId}", method = RequestMethod.GET)
  54. public BaseResponse<List<AttCountryDto>> findCheckTree(@ApiParam(name = "rgstrId", value = "rgstrId", required = true)
  55. @PathVariable String rgstrId) {
  56. return buildSuccessResponse(bisInspXjvillService.findCheckTree(rgstrId));
  57. }
  58. }