c4b69afed003a559ab1737acc188e62b1f4ff2c6.svn-base 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. package cn.com.goldenwater.dcproj.controller.svwtqh;
  2. import cn.com.goldenwater.dcproj.model.BisInspSvwtqhChk;
  3. import cn.com.goldenwater.dcproj.param.BisInspSvwtqhChkParam;
  4. import cn.com.goldenwater.dcproj.service.BisInspSvwtqhChkService;
  5. import cn.com.goldenwater.core.web.BaseController;
  6. import cn.com.goldenwater.core.web.BaseResponse;
  7. import cn.com.goldenwater.id.util.UuidUtil;
  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.apache.commons.lang3.StringUtils;
  14. import org.springframework.beans.factory.annotation.Autowired;
  15. import org.springframework.util.Assert;
  16. import org.springframework.web.bind.annotation.PathVariable;
  17. import org.springframework.web.bind.annotation.RequestBody;
  18. import org.springframework.web.bind.annotation.RequestMapping;
  19. import org.springframework.web.bind.annotation.RequestMethod;
  20. import org.springframework.web.bind.annotation.RequestParam;
  21. import org.springframework.web.bind.annotation.RestController;
  22. import java.util.List;
  23. /**
  24. * @author lhc
  25. * @date 2021-6-23
  26. */
  27. @Api(value = "101监督检查情况管理",tags="101监督检查情况管理")
  28. @RestController
  29. @RequestMapping("/bis/insp/svwtqh/chk")
  30. public class BisInspSvwtqhChkController extends BaseController {
  31. private Logger logger = LoggerFactory.getLogger(getClass());
  32. @Autowired
  33. private BisInspSvwtqhChkService bisInspSvwtqhChkService;
  34. @ApiOperation(value = "修改101监督检查情况管理")
  35. @RequestMapping(value = "", method = RequestMethod.POST)
  36. public BaseResponse<BisInspSvwtqhChk> insert(@ApiParam(name = "bisInspSvwtqhChk", value = "BisInspSvwtqhChk", required = true) @RequestBody BisInspSvwtqhChk bisInspSvwtqhChk) {
  37. bisInspSvwtqhChk.setPersId(getCurrentPersId());
  38. int ret = 0;
  39. if(StringUtils.isBlank(bisInspSvwtqhChk.getId())){
  40. ret = bisInspSvwtqhChkService.insert(bisInspSvwtqhChk);
  41. } else {
  42. ret = bisInspSvwtqhChkService.update(bisInspSvwtqhChk);
  43. }
  44. return buildSuccessResponse(bisInspSvwtqhChk);
  45. }
  46. @ApiOperation(value = "根据ID删除101监督检查情况管理")
  47. @RequestMapping(value = "delete/{id}", method = RequestMethod.POST)
  48. public BaseResponse delete(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
  49. int ret = bisInspSvwtqhChkService.delete(id);
  50. return buildSuccessResponse();
  51. }
  52. @ApiOperation(value = "根据ID获取101监督检查情况管理(单表)")
  53. @RequestMapping(value = "/{id}", method = RequestMethod.GET)
  54. public BaseResponse<BisInspSvwtqhChk> get(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
  55. BisInspSvwtqhChk bisInspSvwtqhChk = bisInspSvwtqhChkService.get(id);
  56. return buildSuccessResponse(bisInspSvwtqhChk);
  57. }
  58. }