package cn.com.goldenwater.dcproj.controller.xjvill; import cn.com.goldenwater.core.web.BaseController; import cn.com.goldenwater.core.web.BaseResponse; import cn.com.goldenwater.dcproj.dto.AttCountryDto; import cn.com.goldenwater.dcproj.dto.BisNewDcuserRelVillDto; import cn.com.goldenwater.dcproj.model.BisInspXjvill; import cn.com.goldenwater.dcproj.service.BisInspXjvillService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; /** * @author lhc * @date 2021-9-9 */ @Api(value = "新疆兵团农村饮水督查登记表管理", tags = "新疆兵团农村饮水督查登记表管理") @RestController @RequestMapping("/bis/insp/xjvill") public class BisInspXjvillController extends BaseController { private Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private BisInspXjvillService bisInspXjvillService; @ApiOperation(value = "修改新疆兵团农村饮水督查登记表") @RequestMapping(value = "", method = RequestMethod.POST) public BaseResponse insert(@ApiParam(name = "bisInspXjvill", value = "BisInspXjvill", required = true) @RequestBody BisInspXjvill bisInspXjvill) { bisInspXjvillService.update(bisInspXjvill); return buildSuccessResponse(bisInspXjvill); } @ApiOperation(value = "根据ID获取新疆兵团农村饮水督查登记表(单表)") @RequestMapping(value = "/{id}", method = RequestMethod.GET) public BaseResponse get(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) { BisInspXjvill bisInspXjvill = bisInspXjvillService.get(id); return buildSuccessResponse(bisInspXjvill); } @ApiOperation(value = "获取县-镇(乡)--村用水户和饮水工程列表") @RequestMapping(value = "/findNode/{code}/{regstrId}", method = RequestMethod.GET) public BaseResponse findNode( @ApiParam(name = "code", value = "code", required = true) @PathVariable String code, @ApiParam(name = "regstrId", value = "regstrId", required = true) @PathVariable String regstrId) { return buildSuccessResponse(bisInspXjvillService.findNode(code, regstrId)); } @ApiOperation(value = "获取督查中县-镇(乡)--村树节点") @RequestMapping(value = "/findTree/{rgstrId}", method = RequestMethod.GET) public BaseResponse> findTree(@ApiParam(name = "rgstrId", value = "rgstrId", required = true) @PathVariable String rgstrId) { return buildSuccessResponse(bisInspXjvillService.findTree(rgstrId)); } @ApiOperation(value = "获取未添加的团") @RequestMapping(value = "/findCheckTree/{rgstrId}", method = RequestMethod.GET) public BaseResponse> findCheckTree(@ApiParam(name = "rgstrId", value = "rgstrId", required = true) @PathVariable String rgstrId) { return buildSuccessResponse(bisInspXjvillService.findCheckTree(rgstrId)); } }