package jnpf.personnels.controller.app.audit;

import jnpf.base.ActionResult;
import jnpf.model.personnels.vo.history.FtbPersonnelsAuditRunTaskHistoryVO;
import jnpf.personnels.service.FtbPersonnelsAuditRunTaskHistoryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

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

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


    @Resource
    FtbPersonnelsAuditRunTaskHistoryService service;


    /**
     * 查看历史审批列表
     *
     * @param id 审批ID
     * @return 历史审批列表的结果Action
     */
    @GetMapping("/view-list/{id}/{type}")
    public ActionResult<List<FtbPersonnelsAuditRunTaskHistoryVO>> viewHistoricalApprovalList(
            @PathVariable("id") String id,@PathVariable("type")String type){
        return ActionResult.success(service.viewHistoricalApprovalList(id,type));
    }

}
