package com.ecep.contract.controller.project.cost;

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

import lombok.Setter;

/**
 * 从相关合同中导入成本项
 */
public class ProjectCostImportItemsFromContractsTasker extends Tasker<Object> implements WebSocketClientTasker {
    @Setter
    private ProjectCostVo cost;

    @Override
    protected Object execute(MessageHolder holder) throws Exception {
        updateTitle("修复项目成本 " + cost.getId());
        return callRemoteTask(holder, getLocale(), cost.getId());
    }

    @Override
    public String getTaskName() {
        return "ProjectCostImportItemsFromContractsTasker";
    }

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