package com.dxhy.erp.enums;

import com.alibaba.fastjson.JSONObject;
import com.dxhy.erp.entity.sdny.SNRequestObject;
import org.springframework.http.ResponseEntity;

import java.util.Map;

public enum RequestRecordEnum {

    SYNC_INVOICE_INFO("/sn/syncInvoiceInfo", "syncInvoiceInfo", ResponseEntity.class,"SDNYMainProcessController", Map.class),

    SINGLE_INVOICE_CHECK("/sn/singleInvoiceCheck", "singleInvoiceCheck", ResponseEntity.class, "SDNYMainProcessController", SNRequestObject.class),

    SINGLE_CHECK_INVOICE("singleCheckInvoice", JSONObject.class, "SNPushCheckRecordService", Map.class, String.class),

    PUSH_CHECK_RESULT_TO_SAP("pushCheckResultToSAP", String.class, "SNPushCheckRecordService", String.class);


    private String className;
    private String portName;
    private String methodName;
    private Class<?>[] argClass;
    private Class<?> responseEntityClass;


    RequestRecordEnum(String portName, String methodName, Class<?> responseEntityClass, String className, Class<?>... argClass) {
        this.className = className;
        this.portName = portName;
        this.methodName = methodName;
        this.argClass = argClass;
        this.responseEntityClass = responseEntityClass;
    }

    RequestRecordEnum(String methodName, Class<?> responseEntityClass, String className, Class<?>... argClass) {
        this.className = className;
        this.methodName = methodName;
        this.argClass = argClass;
        this.responseEntityClass = responseEntityClass;
    }

    public void setResponseEntityClass(Class<?> responseEntityClass) {
        this.responseEntityClass = responseEntityClass;
    }

    public Class<?> getResponseEntityClass() {
        return responseEntityClass;
    }

    public void setPortName(String portName) {
        this.portName = portName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public String getPortName() {
        return portName;
    }

    public String getMethodName() {
        return methodName;
    }

    public Class<?>[] getArgClass() {
        return argClass;
    }

    public void setArgClass(Class<?>[] argClass) {
        this.argClass = argClass;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }
}
