package com.tuoheng.admin.controller;

import com.tuoheng.admin.query.InspectionFileQuery;
import com.tuoheng.admin.service.IInspectionFileService;
import com.tuoheng.common.core.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author ChengWang
 * @Date 2022/11/29
 */
@RestController
@RequestMapping("/inspectionFile")
public class InspectionFileController {

    @Autowired
    private IInspectionFileService iInspectionFileService;

    /**
     * 问题类型和任务名称
     * @return
     */
    @GetMapping("/getQuestionList")
    public JsonResult getQuestionList(){
        return iInspectionFileService.getQuestionList();
    }

    /**
     * 根据登录人角色获取该部门及子部门下问题列表
     * @param query
     * @return
     */
    @GetMapping("/listByDeptUserType")
    public JsonResult getListByDeptUserType(InspectionFileQuery query){
        return iInspectionFileService.getListByDeptUserType(query);
    }


}
