5178e4522c040c643a4ae084276b1c96d8d23497.svn-base 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package cn.com.goldenwater.dcproj.controller.fjqa;
  2. import cn.com.goldenwater.dcproj.model.BisInspQaScore;
  3. import cn.com.goldenwater.dcproj.param.BisInspQaScoreParam;
  4. import cn.com.goldenwater.dcproj.service.BisInspQaScoreService;
  5. import cn.com.goldenwater.core.web.BaseController;
  6. import cn.com.goldenwater.core.web.BaseResponse;
  7. import io.swagger.annotations.Api;
  8. import io.swagger.annotations.ApiOperation;
  9. import io.swagger.annotations.ApiParam;
  10. import org.slf4j.Logger;
  11. import org.slf4j.LoggerFactory;
  12. import org.springframework.beans.factory.annotation.Autowired;
  13. import org.springframework.web.bind.annotation.*;
  14. import java.util.List;
  15. /**
  16. * @author hjp
  17. * @date 2022-7-28
  18. */
  19. @Api(value = "工程质量监督履职情况评分管理", tags = "工程质量监督履职情况评分管理")
  20. @RestController
  21. @RequestMapping("/bis/insp/fjqa/score")
  22. public class BisInspQaScoreController extends BaseController {
  23. private Logger logger = LoggerFactory.getLogger(getClass());
  24. @Autowired
  25. private BisInspQaScoreService bisInspQaScoreService;
  26. @ApiOperation(value = "修改工程质量监督履职情况评分")
  27. @RequestMapping(value = "", method = RequestMethod.POST)
  28. public BaseResponse<BisInspQaScore> insert(@ApiParam(name = "bisInspQaScore", value = "BisInspQaScore", required = true) @RequestBody BisInspQaScore bisInspQaScore) {
  29. bisInspQaScore.setPersId(getCurrentPersId());
  30. bisInspQaScoreService.update(bisInspQaScore);
  31. return buildSuccessResponse(bisInspQaScore);
  32. }
  33. @ApiOperation(value = "根据ID删除工程质量监督履职情况评分")
  34. @RequestMapping(value = "delete/{id}", method = RequestMethod.POST)
  35. public BaseResponse<?> delete(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
  36. int ret = bisInspQaScoreService.delete(id);
  37. return buildSuccessResponse();
  38. }
  39. @ApiOperation(value = "根据ID获取工程质量监督履职情况评分(单表)")
  40. @RequestMapping(value = "/{id}", method = RequestMethod.GET)
  41. public BaseResponse<BisInspQaScore> get(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
  42. BisInspQaScore bisInspQaScore = bisInspQaScoreService.get(id);
  43. return buildSuccessResponse(bisInspQaScore);
  44. }
  45. @ApiOperation(value = "获取工程质量监督履职情况评分")
  46. @RequestMapping(value = "/findList/{rgstrId}", method = RequestMethod.GET)
  47. public BaseResponse<List<BisInspQaScore>> findList(@ApiParam(name = "rgstrId", value = "rgstrId", required = true) @PathVariable String rgstrId) {
  48. BisInspQaScoreParam bisInspQaScoreParam = new BisInspQaScoreParam();
  49. bisInspQaScoreParam.setRgstrId(rgstrId);
  50. List<BisInspQaScore> list = bisInspQaScoreService.findList(bisInspQaScoreParam);
  51. return buildSuccessResponse(list);
  52. }
  53. }