package com.ruoyi.execution.produce.dispersed.service.impl.script.common;

import com.ruoyi.execution.produce.dispersed.service.IScriptService;
import com.ruoyi.system.entity.runbpm.IntoProduction;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import javax.annotation.PreDestroy;

/**
 * 公共的投产节点脚本
 *
 * @author hanzihang
 * @date 2023/11/13
 */
@Service("CommonProductionSchedulingServiceImpl")
@Scope("prototype")
public class CommonProductionSchedulingServiceImpl implements IScriptService {


    @Override
    public Object preExecutionScript(Object parameter) {
        return true;
    }

    @Override
    public Object ExecutionScript(Object parameter) {
        IntoProduction intoProduction = (IntoProduction) parameter;

        return null;
    }

    @Override
    public Object afterExecutionScript(Object parameter) {
        return null;
    }

    @Override
    public boolean isVerificationMethod() {
        return true;
    }

    @Override
    @PreDestroy
    public boolean preDestroy() {
        System.out.println("清理成功！");
        return true;
    }
}
