package com.ruoyi.postCheck.controller;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.postCheck.domain.join.PostPlanJoinProblem;
import com.ruoyi.postCheck.service.IPostPlanJoinProblemService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 岗检问题录入列表Controller
 *
 * @author csg
 * @date 2023-12-22
 */
@Api(tags = "3.2.1-岗检问题录入列表接口")
@RestController
@RequestMapping("/postCheck/postPlanJoinProblem")
public class PostPlanJoinProblemController extends BaseController {
    @Autowired
    private IPostPlanJoinProblemService postPlanJoinProblemService;

    /**
     * 查询岗检问题录入列表列表
     */
    @ApiOperation("查询岗检问题录入列表列表")
    @ApiImplicitParams({
//                    @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class),
//                    @ApiImplicitParam(name = "name", value = "name", dataType = "Long", dataTypeClass = Long.class),

            @ApiImplicitParam(name = "planInfoId", value = "岗检计划明细ID（岗检问题录入时列表的唯一标识）", dataType = "Long", dataTypeClass = Long.class),
            @ApiImplicitParam(name = "checkGroupId", value = "检查工作组ID", dataType = "Long", dataTypeClass = Long.class),
            @ApiImplicitParam(name = "checkGroupName", value = "检查工作组名称", dataType = "String", dataTypeClass = String.class),
            @ApiImplicitParam(name = "checkTeamId", value = "检查小组id", dataType = "Long", dataTypeClass = Long.class),
            @ApiImplicitParam(name = "checkTeamName", value = "检查小组名称", dataType = "String", dataTypeClass = String.class),

            @ApiImplicitParam(name = "checkedUserNames", value = "检查人员中文名称逗号拼接", dataType = "String", dataTypeClass = String.class),
            @ApiImplicitParam(name = "checkTime", value = "问题录入中的检查时间：岗检计划开始时间-yyyy-MM-dd", dataType = "String", dataTypeClass = String.class),

            @ApiImplicitParam(name = "checkedDeptId", value = "被检查部门ID", dataType = "Long", dataTypeClass = Long.class),
            @ApiImplicitParam(name = "checkedDeptName", value = "被检查部门名称", dataType = "String", dataTypeClass = String.class),
            @ApiImplicitParam(name = "checkedPostId", value = "被检查岗位ID", dataType = "Long", dataTypeClass = Long.class),
            @ApiImplicitParam(name = "checkedPostNames", value = "被检查岗位名称(多个逗号拼接)", dataType = "String", dataTypeClass = String.class),
            @ApiImplicitParam(name = "status", value = "岗检状态", dataType = "Integer", dataTypeClass = Integer.class),

            @ApiImplicitParam(name = "pageNum", value = "页码从1开始", dataType = "Integer", dataTypeClass = Integer.class),
            @ApiImplicitParam(name = "pageSize", value = "分页大小", dataType = "Integer", dataTypeClass = Integer.class),
            @ApiImplicitParam(name = "orderBy", value = "排序字段", dataType = "String", dataTypeClass = String.class)
    })
    @PreAuthorize("@ss.hasPermi('postCheck:postPlanJoinProblem:list')")
    @GetMapping("/list")
    public TableDataInfo list(PostPlanJoinProblem postPlanJoinProblem) {
        startPage();
        List<PostPlanJoinProblem> list = postPlanJoinProblemService.selectPostPlanJoinProblemList(postPlanJoinProblem);
        return getDataTable(list);
    }

    /**
     * 导出岗检问题录入列表列表
     @ApiOperation("导出岗检问题录入列表列表")
     @PreAuthorize("@ss.hasPermi('postCheck:postPlanJoinProblem:export')")
     @Log(title = "岗检问题录入列表", businessType = BusinessType.EXPORT)
     @PostMapping("/export") public void export(HttpServletResponse response, PostPlanJoinProblem postPlanJoinProblem)
     {
     List<PostPlanJoinProblem> list = postPlanJoinProblemService.selectPostPlanJoinProblemList(postPlanJoinProblem);
     ExcelUtil<PostPlanJoinProblem> util = new ExcelUtil<PostPlanJoinProblem>(PostPlanJoinProblem.class);
     util.exportExcel(response, list, "岗检问题录入列表数据");
     }
     */

    /**
     * 获取岗检问题录入列表详细信息
     @ApiOperation("获取岗检问题录入列表详细信息")
     @PreAuthorize("@ss.hasPermi('postCheck:postPlanJoinProblem:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
     return success(postPlanJoinProblemService.selectPostPlanJoinProblemById(id));
     }
     */

    /**
     * 新增岗检问题录入列表
     @ApiOperation("新增岗检问题录入列表")
     @ApiImplicitParams({
     @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class),
     @ApiImplicitParam(name = "name", value = "name", dataType = "Long", dataTypeClass = Long.class),
     })
     @PreAuthorize("@ss.hasPermi('postCheck:postPlanJoinProblem:add')")
     @Log(title = "岗检问题录入列表", businessType = BusinessType.INSERT)
     @PostMapping public AjaxResult add(@RequestBody PostPlanJoinProblem postPlanJoinProblem)
     {
     return toAjax(postPlanJoinProblemService.insertPostPlanJoinProblem(postPlanJoinProblem));
     }
     */

    /**
     * 修改岗检问题录入列表
     @ApiOperation("修改岗检问题录入列表")
     @ApiImplicitParams({
     @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class),
     @ApiImplicitParam(name = "name", value = "name", dataType = "Long", dataTypeClass = Long.class),
     })
     @PreAuthorize("@ss.hasPermi('postCheck:postPlanJoinProblem:edit')")
     @Log(title = "岗检问题录入列表", businessType = BusinessType.UPDATE)
     @PutMapping public AjaxResult edit(@RequestBody PostPlanJoinProblem postPlanJoinProblem)
     {
     return toAjax(postPlanJoinProblemService.updatePostPlanJoinProblem(postPlanJoinProblem));
     }
     */

    /**
     * 删除岗检问题录入列表
     @ApiOperation("删除岗检问题录入列表")
     @ApiImplicitParam(name = "ids", value = "Long类型的主键数组", dataType = "Long[]", dataTypeClass = "Long[].class")
     @PreAuthorize("@ss.hasPermi('postCheck:postPlanJoinProblem:remove')")
     @Log(title = "岗检问题录入列表", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids)
     {
     return toAjax(postPlanJoinProblemService.deletePostPlanJoinProblemByIds(ids));
     }
     */
}
