package com.ecep.contract.controller.vendor;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.ecep.contract.MessageHolder;
import com.ecep.contract.WebSocketClientTasker;
import com.ecep.contract.task.Tasker;
import com.ecep.contract.vo.VendorVo;

import lombok.Setter;

public class VendorNextSignDateTask extends Tasker<Object> implements WebSocketClientTasker {
    private static final Logger logger = LoggerFactory.getLogger(VendorNextSignDateTask.class);

    @Setter
    private VendorVo vendor;

    @Override
    public String getTaskName() {
        return getClass().getSimpleName();
    }

    @Override
    public void updateProgress(long current, long total) {
        super.updateProgress(current, total);
    }

    @Override
    protected Object execute(MessageHolder holder) throws Exception {
        updateTitle("计算供应商下一个评价日期");
        return callRemoteTask(holder, getLocale(), vendor.getId());
    }
}