package com.sunxung.factoring.web.project;

import com.sunxung.factoring.entity.ResponseJson;
import com.sunxung.factoring.service.project.BusinessProcessingLogService;
import com.sunxung.factoring.service.project.BusinessProcessingTaskService;
import com.sunxung.factoring.service.sys.flowable.FlowableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author Yafan Wang
 * @Date 2024/3/18 16:16
 */
@Controller
@RequestMapping("api/businessProcessingTask")
public class BusinessProcessingTaskApiController {

    @Autowired
    private BusinessProcessingTaskService businessProcesingTaskService;

    /**
     * 加载流程业务内各个节点处理的历史信息
     */
    @GetMapping(value = "/doBusinessCHistoryView")
    @ResponseBody
    public ResponseJson doBusinessCHistoryView(@RequestParam Long businessKey, @RequestParam String businessType) {
        return new ResponseJson(businessProcesingTaskService.getCLogByBusinessKeyBusinessType(businessKey, businessType));
    }

}
