| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- package cn.com.goldenwater.dcproj.controller.fjqa;
- import cn.com.goldenwater.dcproj.model.BisInspQaScore1;
- import cn.com.goldenwater.dcproj.service.BisInspQaScore1Service;
- import cn.com.goldenwater.core.web.BaseController;
- import cn.com.goldenwater.core.web.BaseResponse;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import io.swagger.annotations.ApiParam;
- import org.apache.commons.lang3.StringUtils;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.PathVariable;
- import org.springframework.web.bind.annotation.RequestBody;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestMethod;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.RestController;
- /**
- * @author hjp
- * @date 2022-7-28
- */
- @Api(value = "福建工程质量监督-分数说明管理", tags = "福建工程质量监督-分数说明管理")
- @RestController
- @RequestMapping("/bis/insp/fjqa/score1")
- public class BisInspQaScore1Controller extends BaseController {
- private Logger logger = LoggerFactory.getLogger(getClass());
- @Autowired
- private BisInspQaScore1Service bisInspQaScore1Service;
- @ApiOperation(value = "添加/修改福建工程质量监督-分数说明")
- @RequestMapping(value = "", method = RequestMethod.POST)
- public BaseResponse<BisInspQaScore1> insert(@ApiParam(name = "bisInspQaScore1", value = "BisInspQaScore1", required = true) @RequestBody BisInspQaScore1 bisInspQaScore1) {
- int ret = 0;
- if (StringUtils.isBlank(bisInspQaScore1.getId())) {
- ret = bisInspQaScore1Service.insert(bisInspQaScore1);
- } else {
- ret = bisInspQaScore1Service.update(bisInspQaScore1);
- }
- return buildSuccessResponse(bisInspQaScore1);
- }
- @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 = bisInspQaScore1Service.delete(id);
- return buildSuccessResponse();
- }
- @ApiOperation(value = "根据scoreName和caseId获取福建工程质量监督-分数说明(单表)")
- @RequestMapping(value = "/get", method = RequestMethod.GET)
- public BaseResponse<BisInspQaScore1> get(@ApiParam(name = "caseId", value = "caseId", required = true) @RequestParam String caseId, @ApiParam(name = "scoreName", value = "scoreName", required = true) @RequestParam String scoreName) {
- BisInspQaScore1 bisInspQaScore1 = bisInspQaScore1Service.getByCaseScore(caseId, scoreName);
- return buildSuccessResponse(bisInspQaScore1);
- }
- }
|