package jnpf.personnels.controller.web.audit;

import jnpf.base.ActionResult;
import jnpf.model.personnels.vo.history.FtbPersonnelsAuditRunTaskHistoryVO;
import jnpf.personnels.service.FtbPersonnelsAuditRunTaskHistoryService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * web人事审核历史执行的任务信息模块
 *
 * @author penghao
 */
@RestController
@RequestMapping("/web/personnels-task-history")
public class FtbPersonnelsAuditRunTaskHistoryController {


    @Resource
    FtbPersonnelsAuditRunTaskHistoryService service;


    /**
     * 查看历史审批列表
     *
     * @param id 审批ID
     * @return 历史审批列表的结果Action
     */
    @GetMapping("/view-list/{id}/{type}")
    @Deprecated(since = "人事接入oa废弃原审批代码")
    public ActionResult<List<FtbPersonnelsAuditRunTaskHistoryVO>> viewHistoricalApprovalList(
            @PathVariable("id") String id,@PathVariable("type")String type){
        return ActionResult.success(service.viewHistoricalApprovalList(id, type));
    }

}
