package com.jeeplus.finance.ccpm.controller;

import com.jeeplus.finance.ccpm.service.TranspondService;
import com.jeeplus.finance.ccpm.vo.TranspondDTO;
import com.jeeplus.finance.invoice.service.CwFinanceInvoiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping(value = "/transpond")
public class Transport {

    @Autowired
    private CwFinanceInvoiceService cwFinanceInvoiceService;

    @Autowired
    private TranspondService transpondService;


    @RequestMapping(value = "detailFinance", method = RequestMethod.GET)
    public Object detailDistribute(@RequestParam String id, @RequestParam String processDefKey) {
        return cwFinanceInvoiceService.detailDistribute(id, processDefKey);
    }


    /**
     * 审核分发操作
     * @return
     */
    @RequestMapping(value = "auditDistribute", method = RequestMethod.POST)
    @ResponseBody
    public Map<String,Object> auditDistribute(@RequestBody TranspondDTO transpondDTO) {
        Map<String, Object> res = transpondService.auditDistribute(transpondDTO);
        return res;
    }








}
