import com.sdtool.common.api.BusinessExecutor
import com.sdtool.common.datas.ERPModule
import com.sdtool.common.entity.base.ProcessStringItem
import com.sweetfish.service.RetResult
import org.apache.logging.log4j.LogManager
import org.apache.logging.log4j.Logger

@SuppressWarnings("unused")
class BE_Init_ExpandoGroovy implements BusinessExecutor<ProcessStringItem, ProcessStringItem> {

    protected final Logger logger = LogManager.getLogger(this.getClass().getSimpleName())

    @Override
    String scriptName() {
        return "初始化扩展Groovy方法"
    }

    @Override
    ERPModule module() {
        return ERPModule.SYSTEM
    }

    void start(long supplierCode) {
        logger.info("扩展Groovy方法")
    }

    RetResult<ProcessStringItem> execute(ProcessStringItem source) {
        return RetResult.<ProcessStringItem> successT().result(
                ProcessStringItem.newBuilder()
                        .itemValue("此代码无需执行，主要用于扩展Groovy方法，简化书写")
                        .build()
        )
    }
}