package cn.com.goldenwater.dcproj.controller.pblm; import cn.com.goldenwater.core.web.BaseController; import cn.com.goldenwater.core.web.BaseResponse; import cn.com.goldenwater.dcproj.model.*; import cn.com.goldenwater.dcproj.param.*; import cn.com.goldenwater.dcproj.service.GwPblmShrService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.List; @Api(value = "督查问题共享", tags = "督查问题共享") @RestController @RequestMapping("/gw/pblm/shr") public class GwPblmShrController extends BaseController { private Logger logger = LoggerFactory.getLogger(getClass()); @Resource private GwPblmShrService gwPblmShrService; @ApiOperation(value = "查询共享整改问题") @RequestMapping(value = "/selectGwPblmShrByCondition", method = RequestMethod.POST) public BaseResponse selectGwPblmShrByCondition(@ApiParam(name = "gwPblmShrParam", value = "gwPblmShrParam", required = true) @RequestBody GwPblmShrParam gwPblmShrParam) { List dataList = gwPblmShrService.selectGwPblmShrByCondition(gwPblmShrParam); PageHelper.startPage(gwPblmShrParam);// 分页 PageInfo pageInfo = new PageInfo(dataList); return buildSuccessResponse(pageInfo); } @ApiOperation(value = "查询问题附件") @RequestMapping(value = "/selectGwPblmShrFileByCondition", method = RequestMethod.POST) public BaseResponse selectGwPblmShrFileByCondition(@ApiParam(name = "gwPblmShrFileParam", value = "gwPblmShrFileParam", required = true) @RequestBody GwPblmShrFileParam gwPblmShrFileParam) { List dataList = gwPblmShrService.selectGwPblmShrFileByCondition(gwPblmShrFileParam); PageHelper.startPage(gwPblmShrFileParam);// 分页 PageInfo pageInfo = new PageInfo(dataList); return buildSuccessResponse(pageInfo); } @ApiOperation(value = "查询问题反馈") @RequestMapping(value = "/selectGwPblmRectByCondition", method = RequestMethod.POST) public BaseResponse selectGwPblmRectByCondition(@ApiParam(name = "gwPblmRectParam", value = "gwPblmRectParam", required = true) @RequestBody GwPblmRectParam gwPblmRectParam) { List dataList = gwPblmShrService.selectGwPblmRectByCondition(gwPblmRectParam); PageHelper.startPage(gwPblmRectParam);// 分页 PageInfo pageInfo = new PageInfo(dataList); return buildSuccessResponse(pageInfo); } @ApiOperation(value = "查询反馈问题过程记录") @RequestMapping(value = "/selectGwPblmRectRecordByCondition", method = RequestMethod.POST) public BaseResponse selectGwPblmRectRecordByCondition(@ApiParam(name = "gwPblmRectRecordParam", value = "gwPblmRectRecordParam", required = true) @RequestBody GwPblmRectRecordParam gwPblmRectRecordParam) { List dataList = gwPblmShrService.selectGwPblmRectRecordByCondition(gwPblmRectRecordParam); PageHelper.startPage(gwPblmRectRecordParam);// 分页 PageInfo pageInfo = new PageInfo(dataList); return buildSuccessResponse(pageInfo); } @ApiOperation(value = "查询问题反馈附件") @RequestMapping(value = "/selectGwPblmRectFileByCondition", method = RequestMethod.POST) public BaseResponse selectGwPblmRectFileByCondition(@ApiParam(name = "gwPblmRectFileParam", value = "gwPblmRectFileParam", required = true) @RequestBody GwPblmRectFileParam gwPblmRectFileParam) { List dataList = gwPblmShrService.selectGwPblmRectFileByCondition(gwPblmRectFileParam); PageHelper.startPage(gwPblmRectFileParam);// 分页 PageInfo pageInfo = new PageInfo(dataList); return buildSuccessResponse(pageInfo); } @ApiOperation(value = "根据ID获取共享整改问题") @RequestMapping(value = "/getGwPblmShr/{id}", method = RequestMethod.GET) public BaseResponse getGwPblmShr(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) { GwPblmShr gwPblmShr = gwPblmShrService.getGwPblmShr(id); return buildSuccessResponse(gwPblmShr); } @ApiOperation(value = "根据ID获取问题附件") @RequestMapping(value = "/getGwPblmShrFile/{id}", method = RequestMethod.GET) public BaseResponse> getGwPblmShrFile(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) { List gwPblmShrFiles = gwPblmShrService.getGwPblmShrFile(id); return buildSuccessResponse(gwPblmShrFiles); } @ApiOperation(value = "根据ID获取问题反馈") @RequestMapping(value = "/getGwPblmRect/{id}", method = RequestMethod.GET) public BaseResponse getGwPblmRect(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) { GwPblmRect gwPblmRect = gwPblmShrService.getGwPblmRect(id); return buildSuccessResponse(gwPblmRect); } @ApiOperation(value = "根据ID获取反馈问题过程记录") @RequestMapping(value = "/getGwPblmRectRecord/{id}", method = RequestMethod.GET) public BaseResponse> getGwPblmRectRecord(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) { // 根据问题反馈ID,查找问题 GwPblmRect vo = gwPblmShrService.getGwPblmRectById(id); List gwPblmRectRecords = gwPblmShrService.getGwPblmRectRecord(vo.getPblmId()); return buildSuccessResponse(gwPblmRectRecords); } @ApiOperation(value = "根据ID获取问题反馈附件") @RequestMapping(value = "/getGwPblmRectFile/{id}", method = RequestMethod.GET) public BaseResponse> getGwPblmRectFile(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) { // 根据问题反馈ID,查找问题 GwPblmRect vo = gwPblmShrService.getGwPblmRectById(id); List gwPblmRectFiles = gwPblmShrService.getGwPblmRectFile(vo.getPblmId()); return buildSuccessResponse(gwPblmRectFiles); } }