99d45d3a70c01736aaa4e20d64d07fc2babf1418.svn-base 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. package cn.com.goldenwater.dcproj.controller.ststn;
  2. import cn.com.goldenwater.dcproj.model.BisInspStstnSaf;
  3. import cn.com.goldenwater.dcproj.param.BisInspStstnSafParam;
  4. import cn.com.goldenwater.dcproj.service.BisInspStstnSafService;
  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 cn.com.goldenwater.target.CheckException;
  9. import io.swagger.annotations.Api;
  10. import io.swagger.annotations.ApiOperation;
  11. import io.swagger.annotations.ApiParam;
  12. import org.slf4j.Logger;
  13. import org.slf4j.LoggerFactory;
  14. import org.apache.commons.lang3.StringUtils;
  15. import org.springframework.beans.factory.annotation.Autowired;
  16. import org.springframework.util.Assert;
  17. import org.springframework.web.bind.annotation.PathVariable;
  18. import org.springframework.web.bind.annotation.RequestBody;
  19. import org.springframework.web.bind.annotation.RequestMapping;
  20. import org.springframework.web.bind.annotation.RequestMethod;
  21. import org.springframework.web.bind.annotation.RequestParam;
  22. import org.springframework.web.bind.annotation.RestController;
  23. import java.util.List;
  24. /**
  25. * @author lhc
  26. * @date 2021-7-13
  27. */
  28. @Api(value = "福建标准化工地-安全文明施工管理",tags="福建标准化工地-安全文明施工管理")
  29. @RestController
  30. @RequestMapping("/bis/insp/ststn/saf")
  31. public class BisInspStstnSafController extends BaseController {
  32. private Logger logger = LoggerFactory.getLogger(getClass());
  33. @Autowired
  34. private BisInspStstnSafService bisInspStstnSafService;
  35. @ApiOperation(value = "修改福建标准化工地-安全文明施工")
  36. @RequestMapping(value = "", method = RequestMethod.POST)
  37. public BaseResponse<BisInspStstnSaf> insert(@ApiParam(name = "bisInspStstnSaf", value = "BisInspStstnSaf", required = true) @RequestBody BisInspStstnSaf bisInspStstnSaf) {
  38. bisInspStstnSaf.setPersId(getCurrentPersId());
  39. // if(StringUtils.isBlank(bisInspStstnSaf.getId())){
  40. // bisInspStstnSafService.insert(bisInspStstnSaf);
  41. // } else {
  42. bisInspStstnSafService.update(bisInspStstnSaf);
  43. // }
  44. return buildSuccessResponse(bisInspStstnSaf);
  45. }
  46. @ApiOperation(value = "根据ID删除福建标准化工地-安全文明施工")
  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 = bisInspStstnSafService.delete(id);
  50. return buildSuccessResponse();
  51. }
  52. @ApiOperation(value = "根据ID获取福建标准化工地-安全文明施工(单表)")
  53. @RequestMapping(value = "/{id}", method = RequestMethod.GET)
  54. public BaseResponse<BisInspStstnSaf> get(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
  55. BisInspStstnSaf bisInspStstnSaf = bisInspStstnSafService.get(id);
  56. return buildSuccessResponse(bisInspStstnSaf);
  57. }
  58. }