e104dab13768e45ef9a764e35926870878a99a26.svn-base 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. package cn.com.goldenwater.dcproj.controller.plansd;
  2. import cn.com.goldenwater.dcproj.model.BisInspPlanDtlAddvcd;
  3. import cn.com.goldenwater.dcproj.service.BisInspPlanDtlAddvcdService;
  4. import cn.com.goldenwater.core.web.BaseController;
  5. import cn.com.goldenwater.core.web.BaseResponse;
  6. import io.swagger.annotations.Api;
  7. import io.swagger.annotations.ApiOperation;
  8. import io.swagger.annotations.ApiParam;
  9. import org.slf4j.Logger;
  10. import org.slf4j.LoggerFactory;
  11. import org.springframework.beans.factory.annotation.Autowired;
  12. import org.springframework.util.Assert;
  13. import org.springframework.web.bind.annotation.PathVariable;
  14. import org.springframework.web.bind.annotation.RequestBody;
  15. import org.springframework.web.bind.annotation.RequestMapping;
  16. import org.springframework.web.bind.annotation.RequestMethod;
  17. import org.springframework.web.bind.annotation.RestController;
  18. /**
  19. * @author hjp
  20. * @date 2022-8-9
  21. */
  22. @Api(value = "检查年度计划分解表-关联检查行政区管理",tags="检查年度计划分解表-关联检查行政区管理")
  23. @RestController
  24. @RequestMapping("/bis/insp/plan/dtladdvcd")
  25. public class BisInspPlanDtlAddvcdController extends BaseController {
  26. private Logger logger = LoggerFactory.getLogger(getClass());
  27. @Autowired
  28. private BisInspPlanDtlAddvcdService bisInspPlanDtlAddvcdService;
  29. @ApiOperation(value = "添加检查年度计划分解表-关联检查行政区")
  30. @RequestMapping(value = "/add", method = RequestMethod.POST)
  31. public BaseResponse<BisInspPlanDtlAddvcd> insert(@ApiParam(name = "bisInspPlanDtlAddvcd", value = "BisInspPlanDtlAddvcd", required = true) @RequestBody BisInspPlanDtlAddvcd bisInspPlanDtlAddvcd) {
  32. int ret = bisInspPlanDtlAddvcdService.insert(bisInspPlanDtlAddvcd);
  33. return buildSuccessResponse(bisInspPlanDtlAddvcd);
  34. }
  35. @ApiOperation(value = "根据ID删除检查年度计划分解表-关联检查行政区")
  36. @RequestMapping(value = "delete/{id}", method = RequestMethod.POST)
  37. public BaseResponse delete(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
  38. int ret = bisInspPlanDtlAddvcdService.delete(id);
  39. return buildSuccessResponse();
  40. }
  41. @ApiOperation(value = "更新检查年度计划分解表-关联检查行政区信息")
  42. @RequestMapping(value = "/update", method = RequestMethod.POST)
  43. public BaseResponse<BisInspPlanDtlAddvcd> update(@ApiParam(name = "bisInspPlanDtlAddvcd", value = "BisInspPlanDtlAddvcd", required = true) @RequestBody BisInspPlanDtlAddvcd bisInspPlanDtlAddvcd) {
  44. Assert.notNull(bisInspPlanDtlAddvcd.getId(), "主键id为必填参数");
  45. int ret = bisInspPlanDtlAddvcdService.update(bisInspPlanDtlAddvcd);
  46. return buildSuccessResponse(bisInspPlanDtlAddvcd);
  47. }
  48. @ApiOperation(value = "根据ID获取检查年度计划分解表-关联检查行政区(单表)")
  49. @RequestMapping(value = "/{id}", method = RequestMethod.GET)
  50. public BaseResponse<BisInspPlanDtlAddvcd> get(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
  51. BisInspPlanDtlAddvcd bisInspPlanDtlAddvcd = bisInspPlanDtlAddvcdService.get(id);
  52. return buildSuccessResponse(bisInspPlanDtlAddvcd);
  53. }
  54. }