package cn.superdesk.uniorder.dubbo.consumer.accounting.qchjc;

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dto.param.accounting.qchjc.QchjcSupplierAccountingListRequest;
import cn.superdesk.uniorder.dto.vo.organisation.UnifiedSupplierVo;
import cn.superdesk.uniorder.dto.vo.thirdpart.qchjc.accounting.QchjcAccountingUnifiedSupplierVo;
import cn.superdesk.uniorder.dubbo.facade.thirdpart.qchjc.accounting.DubboQchjcSupplierStatementService;
import com.alibaba.dubbo.config.annotation.Reference;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author xc
 * @description
 * @date 2022/4/14 20:08
 */
@Component
@Slf4j
public class QchjcSupplierAccountingDubboService {
    @Reference(version = "1.0.0", timeout = 30000, retries = -1)
    private DubboQchjcSupplierStatementService dubboQchjcSupplierStatementService;

    public R<List<QchjcAccountingUnifiedSupplierVo>> list(QchjcSupplierAccountingListRequest request) {
        return dubboQchjcSupplierStatementService.queryQchjcSupplierStatementList(request);
    }

    public R<String> remark(Long id, String remark, String token) {
        return dubboQchjcSupplierStatementService.remark(id, remark, token);
    }

    public R<QchjcAccountingUnifiedSupplierVo> get(Long id) {
        return dubboQchjcSupplierStatementService.getQchjcSupplierStatement(id);
    }

    public R<List<UnifiedSupplierVo>> getSupplierList() {
        return dubboQchjcSupplierStatementService.getSupplierList();
    }
}
