package cn.superdesk.uniorder.openapi.service.qchjc.task.accounting;

import cn.superdesk.uniorder.dto.vo.thirdpart.qchjc.accounting.QchjcCustomerStatementVo;
import cn.superdesk.uniorder.dubbo.facade.thirdpart.qchjc.accounting.DubboQchjcCustomerStatementService;
import com.alibaba.dubbo.config.annotation.Reference;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author xc
 * @description
 * @date 2022/4/4 14:55
 */
@Service
@Slf4j
public class QchjcCutomerStatementDubboConsumerService {

    @Reference(version = "1.0.0", timeout = 300000, retries = -1)
    private DubboQchjcCustomerStatementService dubboQchjcCustomerStatementService;

    /**
     * 集采-采购单位对账单入库
     *
     * @param id
     */
    //@DistributedLock(name = "#vo.accountingOrderSn")
    public void doSave(Long id) {
        dubboQchjcCustomerStatementService.doSave(id);
    }


    /**
     * 集采-获取待入库状态采购单位对账单集合
     *
     * @return
     */
    public QchjcCustomerStatementVo getTodoList(Long id) {
        return dubboQchjcCustomerStatementService.getTodoList(id);
    }

    public List<Long> getTodoIdList() {
        return dubboQchjcCustomerStatementService.getTodoIdList();
    }
}
