xuhy
2025-05-09 202729432866117778bc1c20315a06aa84fee98e
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TQaTestItemController.java
@@ -7,7 +7,9 @@
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.enums.QATestItemStatusEnum;
import com.ruoyi.system.dto.TQaTestItemDTO;
import com.ruoyi.system.dto.UpAndDownDTO;
import com.ruoyi.system.model.TQaTestItem;
import com.ruoyi.system.model.TQaTestItemReport;
import com.ruoyi.system.query.TQaTestItemQuery;
@@ -49,7 +51,7 @@
     * 获取QA检测项管理管理列表
     */
    @PreAuthorize("@ss.hasPermi('system:qaTestItem:list')")
    @ApiOperation(value = "获取QA检测项管理分页列表")
    @ApiOperation(value = "获取QA检测项管理分页列表",  response = TQaTestItemQuery.class)
    @PostMapping(value = "/api/t-qa-test-item/pageList")
    public R<PageInfo<TQaTestItemVO>> pageList(@RequestBody String param) {
        TQaTestItemQuery query = JSON.parseObject(param, TQaTestItemQuery.class);
@@ -89,13 +91,13 @@
    @ApiOperation(value = "查看QA检测项管理详情")
    @GetMapping(value = "/open/t-qa-test-item/getDetailById")
    public R<TQaTestItemVO> getDetailById(@RequestParam String id) {
        TQaTestItem projectTeam = qaTestItemService.getById(id);
        TQaTestItemVO projectTeamVO = new TQaTestItemVO();
        BeanUtils.copyProperties(projectTeam, projectTeamVO);
        TQaTestItem testItem = qaTestItemService.getById(id);
        TQaTestItemVO testItemVO = new TQaTestItemVO();
        BeanUtils.copyProperties(testItem, testItemVO);
        // 查询QA检测项检测报告
        List<TQaTestItemReportVO> qaTestItemReportVOS= qaTestItemReportService.getList(id);
        projectTeamVO.setQaTestItemReportList(qaTestItemReportVOS);
        return R.ok(projectTeamVO);
        testItemVO.setQaTestItemReportList(qaTestItemReportVOS);
        return R.ok(testItemVO);
    }
    /**
@@ -127,17 +129,16 @@
    /**
     * 修改QA检测项管理
     */
//    @PreAuthorize("@ss.hasPermi('system:qaTestItem:upAndDown')")
//    @Log(title = "QA检测项管理信息-提交评价QA检测项管理状态", businessType = BusinessType.UPDATE)
//    @ApiOperation(value = "修改QA检测项管理状态",response = UpAndDownDTO.class)
//    @PostMapping(value = "/api/t-qa-test-item/upAndDown")
//    public R<Boolean> upAndDown(@RequestBody String param) {
//        UpAndDownDTO dto = JSON.parseObject(param,UpAndDownDTO.class);
//        TQaTestItem projectTeam = qaTestItemService.getById(dto.getId());
//        projectTeam.setStatus(dto.getStatus());
//        qaTestItemService.updateById(projectTeam);
//        return R.ok();
//    }
    @PreAuthorize("@ss.hasPermi('system:qaTestItem:commitEvaluate')")
    @Log(title = "QA检测项管理信息-提交评价QA检测项管理状态", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改QA检测项管理状态")
    @PutMapping(value = "/open/t-qa-test-item/commitEvaluate")
    public R<Boolean> commitEvaluate(@RequestParam String id) {
        TQaTestItem testItem = qaTestItemService.getById(id);
        testItem.setStatus(QATestItemStatusEnum.TO_BE_EVALUATED.getCode());
        qaTestItemService.updateById(testItem);
        return R.ok();
    }
}