package cn.ey.biz.module.weaver.api;

import cn.ey.biz.module.weaver.common.Constants;
import cn.ey.biz.module.weaver.common.RSP;
import cn.ey.biz.module.weaver.autoconfigure.FeignConfiguration;
import lombok.Data;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 流程数据：待办 中抄送流程数量 (对外)
 *
 */
@FeignClient(name= Constants.WEAVER_NAME, url="${weaver.service.url}", configuration = FeignConfiguration.class)
public interface GetCCWorkflowRequestCountService {

    @RequestMapping(method= RequestMethod.POST, value="/api/workflow/paService/getCCWorkflowRequestCount",
            consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,
            produces = MediaType.TEXT_PLAIN_VALUE)
    RSP<CCWorkflowResponse> getCCWorkflowRequestCount(@RequestBody CCWorkflowRequestRequest request);

    @Data
    class CCWorkflowRequestRequest{
        CCWorkflowRequestConditions conditions;	//非必填	高级搜索条件 可以把多个条件放入这个map中
        boolean isMergeShow;	//非必填	是否主次账号统一显示	"true"
        boolean isNeedOs;	   //非必填	是否显示异构系统数据 ， 为true时还需 设置开启异构系统显示才会显示	"true"
        String userId;	       //非必填	要查询的用户id，不传取当前登录用户	"11"
    }

    @Data
    class CCWorkflowRequestConditions{
        String wfcode;
        String ownerdepartmentid;
        String requestname;
        String nodetype;
        String workcode;
        String archivestatus;
        String operatedateselect;
        String recievedateselect;
        String creatersubcompanyid;
        String requestlevel;
        String unophrmid;
        String docids;
        String creatertype;
        String proids;
        String crmids;
        String craterid;
        String hrmcreaterid;
        String createdateselect;
    }

    @Data
    class CCWorkflowResponse{

    }

}
