package com.sunxung.factoring.web.irrCalculate;

import com.sunxung.factoring.entity.irrCalculate.vo.IRRCalculateVoList;
import com.sunxung.factoring.service.irrCalculate.IRRCalculateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @className:IRRCalculateController
 * @description:有关IRR计算类
 * @author:杜豪波
 * @e-mail:347793599@qq.com
 * @date:2019年3月1日
 */
@Controller
@RequestMapping(value = "/irr")
public class IRRCalculateController {

    private static final String PREFIX = "irrCalculate/";
    @Autowired
    private IRRCalculateService calculateService;

    /**
     * IRR计算
     */
    @RequestMapping(value = "/doCalculate")
    @ResponseBody
    public Object doCalculate(IRRCalculateVoList list) {
        return calculateService.irrCalculate(list);
    }


    /***
     * 获取IRR计算界面
     */
    @RequestMapping(value = "/get/view")
    public String getView() {
        return PREFIX + "irrCalculate";
    }
}
