package com.zcloud.domain.web;


import com.alibaba.cola.dto.MultiResponse;
import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.Response;
import com.alibaba.cola.dto.SingleResponse;
import com.jjb.saas.framework.auth.model.SSOUser;
import com.jjb.saas.framework.auth.utils.AuthContext;
import com.zcloud.domain.api.ProjectTaskScoreInfoServiceI;
import com.zcloud.domain.dto.*;
import com.zcloud.domain.dto.clientobject.ProjectTaskScoreInfoCO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

import java.util.ArrayList;

/**
 * web-adapter
 *
 * @Author zhaokai
 * @Date 2026-01-27 11:30:45
 */
@Api(tags = "课题任务评分详情")
@RequestMapping("/${application.gateway}/projectTaskScoreInfo")
@RestController
@AllArgsConstructor
public class ProjectTaskScoreInfoController {
    private final ProjectTaskScoreInfoServiceI projectTaskScoreInfoService;
    @ApiOperation("设置评分")
    @PostMapping("/setScore")
    public SingleResponse setScore(@Validated @RequestBody ProjectTaskSetScoreCmd projectTaskSetScoreCmd) {
        projectTaskScoreInfoService.setScore(projectTaskSetScoreCmd);
        return SingleResponse.buildSuccess();
    }

    @ApiOperation("新增任务评审人员")
    @PostMapping("/saveScoreUser")
    public SingleResponse<ProjectTaskScoreInfoCO> saveScoreUser(@Validated @RequestBody ProjectTaskDetailAddCmd cmd) {
        return projectTaskScoreInfoService.saveScoreUser(cmd);
    }

   /*    @ApiOperation("分页")
    @PostMapping("/list")
    public PageResponse<ProjectTaskScoreInfoCO> page(@RequestBody ProjectTaskScoreInfoPageQry qry) {
        return projectTaskScoreInfoService.listPage(qry);
    }

    @ApiOperation("所有数据")
    @GetMapping("/listAll")
    public MultiResponse<ProjectTaskScoreInfoCO> listAll() {
        return MultiResponse.of(new ArrayList<ProjectTaskScoreInfoCO>());
    }

    @ApiOperation("详情")
    @GetMapping("/{id}")
    public SingleResponse<ProjectTaskScoreInfoCO> getInfoById(@PathVariable("id") Long id) {
        return SingleResponse.of(new ProjectTaskScoreInfoCO());
    }

    @ApiOperation("删除")
    @DeleteMapping("/{id}")
    public Response remove(@PathVariable("id") Long id) {
        projectTaskScoreInfoService.remove(id);
        return SingleResponse.buildSuccess();
    }

    @ApiOperation("删除多个")
    @DeleteMapping("/ids")
    public Response removeBatch(@RequestParam Long[] ids) {
        projectTaskScoreInfoService.removeBatch(ids);
        return SingleResponse.buildSuccess();
    }*/


}

