package com.ibiz.activiti.feign;

import com.alibaba.fastjson.JSONObject;
import com.ibiz.activiti.util.domain.WFINSTANCEDTO;
import com.ibiz.activiti.util.domain.WFSTEPACTORDTO;
import com.ibiz.activiti.util.domain.WFWORKLISTDTO;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

public interface UniWFFeignClient {

    /**
     * 计算流程下一步审批用户1
     * @param wfstepactor_id
     * @param wfstepactordto
     * @return
     */
    @RequestMapping(method = RequestMethod.POST, value = "/wfenginecallbackservice/wfstepactors/{wfstepactor_id}/calculatenext")
    WFSTEPACTORDTO calculatenextWFSTEPACTOR(@PathVariable("wfstepactor_id") String wfstepactor_id, @RequestBody JSONObject wfstepactordto) ;

    /**
     * 更新统一中的流程实例信息
     * @param wfinstance_id
     * @param wfinstancedto
     * @return
     */
    @RequestMapping(method = RequestMethod.PUT, value = "/wfenginecallbackservice/wfinstances/{wfinstance_id}")
    WFINSTANCEDTO updateWFINSTANCE(@PathVariable("wfinstance_id") String wfinstance_id, @RequestBody JSONObject wfinstancedto) ;

    /**
     * 更新统一中的流程待办列表信息
     * @param wfworklist_id
     * @param wfworklistdto
     * @return
     */
    @RequestMapping(method = RequestMethod.PUT, value = "/wfenginecallbackservice/wfworklists/{wfworklist_id}")
    WFWORKLISTDTO updateWFWORKLIST(@PathVariable("wfworklist_id") String wfworklist_id, @RequestBody JSONObject wfworklistdto) ;

    /**
     * 往统一插入待办
     * @param wfworklistdto
     * @return
     */
    @RequestMapping(method = RequestMethod.POST, value = "/wfenginecallbackservice/wfworklists")
    WFWORKLISTDTO createWFWORKLIST(@RequestBody JSONObject wfworklistdto) ;

}
