package com.ruoyi.web.controller.common;

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.system.domain.Dksq;
import com.ruoyi.system.service.IDkCommonServerce;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: tjf
 * @Date: 2023/6/15 15:27
 * @Describe:
 */
@RestController
@RequestMapping("/dkCommon")
public class DkCommonController extends BaseController {
    @Autowired
    private IDkCommonServerce dkCommonServerce;


    /**
     * 后台首页统计
     */
    @PostMapping("/index")
    public AjaxResult index()
    {
        return dkCommonServerce.index();
    }

    /**
     * 后台首页统计
     * ECharts
     */
    @PostMapping("/eCharts")
    public AjaxResult eCharts(@RequestBody Dksq dksq)
    {
        return dkCommonServerce.eCharts(dksq);
    }

    /**
     * 劳动局审核
     */
    @PreAuthorize("@ss.hasPermi('dkCommon:dksq:shenHe')")
    @PostMapping("/shenHe")
    public AjaxResult shenHe(@RequestBody Dksq dksq)
    {
        return dkCommonServerce.shenHe(dksq);
    }

    /**
     * 劳动局指派银行
     */
    @PreAuthorize("@ss.hasPermi('dkCommon:dksq:zhiPai')")
    @PostMapping("/zhiPai")
    public AjaxResult zhiPai(@RequestBody Dksq dksq)
    {
        return dkCommonServerce.zhiPai(dksq);
    }

    /**
     * 银行评估材料
     */
    @PreAuthorize("@ss.hasPermi('dkCommon:dksq:pingGu')")
    @PostMapping("/pingGu")
    public AjaxResult pingGu(@RequestBody Dksq dksq)
    {
        return dkCommonServerce.pingGu(dksq);
    }

    /**
     * 银行放贷
     */
    @PreAuthorize("@ss.hasPermi('dkCommon:dksq:fangDai')")
    @PostMapping("/fangDai")
    public AjaxResult fangDai(@RequestBody Dksq dksq)
    {
        return dkCommonServerce.fangDai(dksq);
    }
}
