| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- package cn.com.goldenwater.dcproj.controller.qymten;
- import cn.com.goldenwater.core.web.BaseController;
- import cn.com.goldenwater.core.web.BaseResponse;
- import cn.com.goldenwater.dcproj.dto.AttStstnBaseDto;
- import cn.com.goldenwater.dcproj.model.BisInspQymtenEffc;
- import cn.com.goldenwater.dcproj.param.AttStstnBaseParam;
- import cn.com.goldenwater.dcproj.param.BisInspQymtenEffcParam;
- import cn.com.goldenwater.dcproj.service.BisInspQymtenEffcService;
- 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.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import java.util.List;
- /**
- * @author lhc
- * @date 2021-7-19
- */
- @Api(value = "项目质量管理效果管理",tags="项目质量管理效果管理")
- @RestController
- @RequestMapping("/bis/insp/qymten/effc")
- public class BisInspQymtenEffcController extends BaseController {
- private Logger logger = LoggerFactory.getLogger(getClass());
- @Autowired
- private BisInspQymtenEffcService bisInspQymtenEffcService;
- @ApiOperation(value = "批量添加项目质量管理效果")
- @RequestMapping(value = "/batchAdd", method = RequestMethod.POST)
- public BaseResponse insertEffc(@RequestBody AttStstnBaseDto attStstnBaseDto) {
- attStstnBaseDto.setPersId(getCurrentPersId());
- bisInspQymtenEffcService.batchAdd(attStstnBaseDto);
- return buildSuccessResponse();
- }
- @ApiOperation(value = "修改项目质量管理效果")
- @RequestMapping(value = "", method = RequestMethod.POST)
- public BaseResponse<BisInspQymtenEffc> insert(@ApiParam(name = "bisInspQymtenEffc", value = "BisInspQymtenEffc", required = true) @RequestBody BisInspQymtenEffc bisInspQymtenEffc) {
- bisInspQymtenEffc.setPersId(getCurrentPersId());
- bisInspQymtenEffcService.update(bisInspQymtenEffc);
- return buildSuccessResponse(bisInspQymtenEffc);
- }
- @ApiOperation(value = "根据ID删除项目质量管理效果")
- @RequestMapping(value = "delete/{id}", method = RequestMethod.POST)
- public BaseResponse delete(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
- int ret = bisInspQymtenEffcService.delete(id);
- return buildSuccessResponse();
- }
- @ApiOperation(value = "根据ID获取项目质量管理效果(单表)")
- @RequestMapping(value = "/{id}", method = RequestMethod.GET)
- public BaseResponse<BisInspQymtenEffc> get(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
- BisInspQymtenEffc bisInspQymtenEffc = bisInspQymtenEffcService.get(id);
- return buildSuccessResponse(bisInspQymtenEffc);
- }
- @ApiOperation(value = "获取项目质量管理效果")
- @RequestMapping(value = "/findList/{rgstrId}", method = RequestMethod.GET)
- public BaseResponse<List<BisInspQymtenEffc>> findList(@ApiParam(name = "rgstrId", value = "rgstrId", required = true)@PathVariable String rgstrId,@RequestParam(required = false) String nm){
- BisInspQymtenEffcParam bisInspQymtenEffcParam = new BisInspQymtenEffcParam();
- bisInspQymtenEffcParam.setNm(nm);
- bisInspQymtenEffcParam.setRgstrId(rgstrId);
- List<BisInspQymtenEffc> list = bisInspQymtenEffcService.findList(bisInspQymtenEffcParam);
- return buildSuccessResponse(list);
- }
- @ApiOperation(value = "获取未添加项目质量管理效果")
- @RequestMapping(value = "/notInsertList",method = RequestMethod.POST)
- public BaseResponse<Object> notInsertList(@ApiParam(name = "attStstnBaseParam",value = "attStstnBaseParam",required = true)@RequestBody AttStstnBaseParam attStstnBaseParam){
- PageInfo pageInfo = bisInspQymtenEffcService.notInsertList(attStstnBaseParam);
- return buildSuccessResponse(pageInfo);
- }
- }
|