cadea780371565443ad3d8ac92c7a24b7f7de716.svn-base 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. package cn.com.goldenwater.dcproj.controller.qymten;
  2. import cn.com.goldenwater.core.web.BaseController;
  3. import cn.com.goldenwater.core.web.BaseResponse;
  4. import cn.com.goldenwater.dcproj.dto.AttStstnBaseDto;
  5. import cn.com.goldenwater.dcproj.model.BisInspQymtenEffc;
  6. import cn.com.goldenwater.dcproj.param.AttStstnBaseParam;
  7. import cn.com.goldenwater.dcproj.param.BisInspQymtenEffcParam;
  8. import cn.com.goldenwater.dcproj.service.BisInspQymtenEffcService;
  9. import com.github.pagehelper.PageInfo;
  10. import io.swagger.annotations.Api;
  11. import io.swagger.annotations.ApiOperation;
  12. import io.swagger.annotations.ApiParam;
  13. import org.slf4j.Logger;
  14. import org.slf4j.LoggerFactory;
  15. import org.springframework.beans.factory.annotation.Autowired;
  16. import org.springframework.web.bind.annotation.*;
  17. import java.util.List;
  18. /**
  19. * @author lhc
  20. * @date 2021-7-19
  21. */
  22. @Api(value = "项目质量管理效果管理",tags="项目质量管理效果管理")
  23. @RestController
  24. @RequestMapping("/bis/insp/qymten/effc")
  25. public class BisInspQymtenEffcController extends BaseController {
  26. private Logger logger = LoggerFactory.getLogger(getClass());
  27. @Autowired
  28. private BisInspQymtenEffcService bisInspQymtenEffcService;
  29. @ApiOperation(value = "批量添加项目质量管理效果")
  30. @RequestMapping(value = "/batchAdd", method = RequestMethod.POST)
  31. public BaseResponse insertEffc(@RequestBody AttStstnBaseDto attStstnBaseDto) {
  32. attStstnBaseDto.setPersId(getCurrentPersId());
  33. bisInspQymtenEffcService.batchAdd(attStstnBaseDto);
  34. return buildSuccessResponse();
  35. }
  36. @ApiOperation(value = "修改项目质量管理效果")
  37. @RequestMapping(value = "", method = RequestMethod.POST)
  38. public BaseResponse<BisInspQymtenEffc> insert(@ApiParam(name = "bisInspQymtenEffc", value = "BisInspQymtenEffc", required = true) @RequestBody BisInspQymtenEffc bisInspQymtenEffc) {
  39. bisInspQymtenEffc.setPersId(getCurrentPersId());
  40. bisInspQymtenEffcService.update(bisInspQymtenEffc);
  41. return buildSuccessResponse(bisInspQymtenEffc);
  42. }
  43. @ApiOperation(value = "根据ID删除项目质量管理效果")
  44. @RequestMapping(value = "delete/{id}", method = RequestMethod.POST)
  45. public BaseResponse delete(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
  46. int ret = bisInspQymtenEffcService.delete(id);
  47. return buildSuccessResponse();
  48. }
  49. @ApiOperation(value = "根据ID获取项目质量管理效果(单表)")
  50. @RequestMapping(value = "/{id}", method = RequestMethod.GET)
  51. public BaseResponse<BisInspQymtenEffc> get(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
  52. BisInspQymtenEffc bisInspQymtenEffc = bisInspQymtenEffcService.get(id);
  53. return buildSuccessResponse(bisInspQymtenEffc);
  54. }
  55. @ApiOperation(value = "获取项目质量管理效果")
  56. @RequestMapping(value = "/findList/{rgstrId}", method = RequestMethod.GET)
  57. public BaseResponse<List<BisInspQymtenEffc>> findList(@ApiParam(name = "rgstrId", value = "rgstrId", required = true)@PathVariable String rgstrId,@RequestParam(required = false) String nm){
  58. BisInspQymtenEffcParam bisInspQymtenEffcParam = new BisInspQymtenEffcParam();
  59. bisInspQymtenEffcParam.setNm(nm);
  60. bisInspQymtenEffcParam.setRgstrId(rgstrId);
  61. List<BisInspQymtenEffc> list = bisInspQymtenEffcService.findList(bisInspQymtenEffcParam);
  62. return buildSuccessResponse(list);
  63. }
  64. @ApiOperation(value = "获取未添加项目质量管理效果")
  65. @RequestMapping(value = "/notInsertList",method = RequestMethod.POST)
  66. public BaseResponse<Object> notInsertList(@ApiParam(name = "attStstnBaseParam",value = "attStstnBaseParam",required = true)@RequestBody AttStstnBaseParam attStstnBaseParam){
  67. PageInfo pageInfo = bisInspQymtenEffcService.notInsertList(attStstnBaseParam);
  68. return buildSuccessResponse(pageInfo);
  69. }
  70. }