package com.ruoyi.postCheck.controller;

import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
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.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.postCheck.domain.PostCheckedProblemRecord;
import com.ruoyi.postCheck.service.IPostCheckedProblemRecordService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiImplicitParam;

/**
 * 岗检问题操作记录表Controller
 *
 * @author csg
 * @date 2023-12-23
 */
@Api(tags = "3.3.2-岗检问题操作记录表接口")
@RestController
@RequestMapping("/postCheck/postCheckedProblemRecord")
public class PostCheckedProblemRecordController extends BaseController
{
    @Autowired
    private IPostCheckedProblemRecordService postCheckedProblemRecordService;

    /**
     * 查询岗检问题操作记录表列表
     */
    @ApiOperation("查询岗检问题操作记录表列表")
    @ApiImplicitParams({
//                    @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", dataTypeClass = Long.class),
                    @ApiImplicitParam(name = "problemId", value = "问题ID（多）", dataType = "Long", dataTypeClass = Long.class),
//                    @ApiImplicitParam(name = "userBy", value = "操作者姓名", dataType = "String", dataTypeClass = String.class),
//                    @ApiImplicitParam(name = "content", value = "操作内容", dataType = "String", dataTypeClass = String.class),
//                    @ApiImplicitParam(name = "delFlag", value = "删除标志（0代表存在 2代表删除）", dataType = "String", dataTypeClass = String.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:postCheckedProblemRecord:list')")
    @GetMapping("/list")
    public TableDataInfo list(PostCheckedProblemRecord postCheckedProblemRecord)
    {
//        startPage();
        List<PostCheckedProblemRecord> list = postCheckedProblemRecordService.selectPostCheckedProblemRecordList(postCheckedProblemRecord);
        return getDataTable(list);
    }

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

    /**
     * 获取岗检问题操作记录表详细信息
    @ApiOperation("获取岗检问题操作记录表详细信息")
//    @PreAuthorize("@ss.hasPermi('postCheck:postCheckedProblemRecord:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(postCheckedProblemRecordService.selectPostCheckedProblemRecordById(id));
    }
     */

    /**
     * 新增岗检问题操作记录表
    @ApiOperation("新增岗检问题操作记录表")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", dataTypeClass = Long.class),
        @ApiImplicitParam(name = "problemId", value = "问题ID（多）", dataType = "Long", dataTypeClass = Long.class),
        @ApiImplicitParam(name = "userBy", value = "操作者姓名", dataType = "String", dataTypeClass = String.class),
        @ApiImplicitParam(name = "content", value = "操作内容", dataType = "String", dataTypeClass = String.class),
        @ApiImplicitParam(name = "delFlag", value = "删除标志（0代表存在 2代表删除）", dataType = "String", dataTypeClass = String.class),
    })
//    @PreAuthorize("@ss.hasPermi('postCheck:postCheckedProblemRecord:add')")
    @Log(title = "岗检问题操作记录表", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody PostCheckedProblemRecord postCheckedProblemRecord)
    {
        return toAjax(postCheckedProblemRecordService.insertPostCheckedProblemRecord(postCheckedProblemRecord));
    }
     */

    /**
     * 修改岗检问题操作记录表
    @ApiOperation("修改岗检问题操作记录表")
    @ApiImplicitParams({
                    @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", dataTypeClass = Long.class),
                    @ApiImplicitParam(name = "problemId", value = "问题ID（多）", dataType = "Long", dataTypeClass = Long.class),
                    @ApiImplicitParam(name = "userBy", value = "操作者姓名", dataType = "String", dataTypeClass = String.class),
                    @ApiImplicitParam(name = "content", value = "操作内容", dataType = "String", dataTypeClass = String.class),
                    @ApiImplicitParam(name = "delFlag", value = "删除标志（0代表存在 2代表删除）", dataType = "String", dataTypeClass = String.class),
    })
//    @PreAuthorize("@ss.hasPermi('postCheck:postCheckedProblemRecord:edit')")
    @Log(title = "岗检问题操作记录表", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody PostCheckedProblemRecord postCheckedProblemRecord)
    {
        return toAjax(postCheckedProblemRecordService.updatePostCheckedProblemRecord(postCheckedProblemRecord));
    }
     */

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