| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- package cn.com.goldenwater.dcproj.controller.sdqa;
- import cn.com.goldenwater.dcproj.model.BisInspQaScore1Sd;
- import cn.com.goldenwater.dcproj.param.BisInspQaScore1SdParam;
- import cn.com.goldenwater.dcproj.service.BisInspQaScore1SdService;
- import cn.com.goldenwater.core.web.BaseController;
- import cn.com.goldenwater.core.web.BaseResponse;
- import cn.com.goldenwater.dcproj.utils.StringUtils;
- import cn.com.goldenwater.id.util.UuidUtil;
- 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.util.Assert;
- 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;
- import java.util.List;
- /**
- * @author lhc
- * @date 2024-4-7
- */
- @Api(value = "xxx管理",tags="xxx管理")
- @RestController
- @RequestMapping("/bis/insp/sdqa/score1")
- public class BisInspQaScore1SdController extends BaseController {
- private Logger logger = LoggerFactory.getLogger(getClass());
- @Autowired
- private BisInspQaScore1SdService bisInspQaScore1SdService;
- @ApiOperation(value = "添加xxx")
- @RequestMapping(value = "", method = RequestMethod.POST)
- public BaseResponse<BisInspQaScore1Sd> insert(@ApiParam(name = "bisInspQaScore1Sd", value = "BisInspQaScore1Sd", required = true) @RequestBody BisInspQaScore1Sd bisInspQaScore1Sd) {
- int ret = 0;
- if(StringUtils.isBlank(bisInspQaScore1Sd.getId())) {
- ret = bisInspQaScore1SdService.insert(bisInspQaScore1Sd);
- }
- else{
- ret = bisInspQaScore1SdService.update(bisInspQaScore1Sd);
- }
- return buildSuccessResponse(bisInspQaScore1Sd);
- }
- @ApiOperation(value = "根据ID删除xxx")
- @RequestMapping(value = "delete/{id}", method = RequestMethod.POST)
- public BaseResponse<?> delete(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
- int ret = bisInspQaScore1SdService.delete(id);
- return buildSuccessResponse();
- }
- @ApiOperation(value = "根据ID获取xxx(单表)")
- @RequestMapping(value = "/{id}", method = RequestMethod.GET)
- public BaseResponse<BisInspQaScore1Sd> get(@ApiParam(name = "caseId", value = "caseId", required = true) @RequestParam String caseId, @ApiParam(name = "scoreName", value = "scoreName", required = true) @RequestParam String scoreName) {
- BisInspQaScore1Sd bisInspQaScore1Sd = bisInspQaScore1SdService.getByCaseScore(caseId, scoreName);
- return buildSuccessResponse(bisInspQaScore1Sd);
- }
- }
|