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;

/**
 * 流程数据：根据tabids来获取流程数量 (对外)
 */
@FeignClient(name= Constants.WEAVER_NAME, url="${weaver.service.url}", configuration = FeignConfiguration.class)
public interface GetToDoRequestCountService {

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

    @Data
    class ToDoRequestCountRequest{
        ToDoRequestCountconditions  conditions;		       //非必填
        boolean isMergeShow;	   //非必填	是否主次账号统一显示	"true"
        boolean isNeedOs;	      //非必填	是否显示异构系统数据 ， 为true时还需 设置开启异构系统显示才会显示	"true"
        String tabIds;		      //非必填	要查询的范围 如: 0 全部待办 ， 1 未读 ， 多个tabid之间使用 ‘，’ 分隔。 不传默认为0	"1,2"
        String userId;		      //非必填	要查询的用户id，不传取当前登录用户
    }

    @Data
    class ToDoRequestCountconditions{
        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 ToDoRequestCountResponse{

    }

}
