Jay
5 天以前 eca625c35d5ed64c98277d2f83963e46438f50ce
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/schedule/impl/ScheduleModelHandlerImpl.java
@@ -28,6 +28,7 @@
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * @author PanZhibao
@@ -51,7 +52,7 @@
    private SampleConstructor sampleConstructor;
    @Override
    public ScheduleResultVO doSchedule(String schemeCode, Date scheduleTime) throws ModelInvokeException {
    public ScheduleResultVO doSchedule(String schemeCode, Date scheduleTime, HashMap<String, Object> params) throws ModelInvokeException {
        ScheduleResultVO scheduleResult = new ScheduleResultVO();
        StScheduleSchemeEntity scheduleScheme = stScheduleSchemeService.getByCode(schemeCode);
        StScheduleModelEntity scheduleModel = stScheduleModelService.get(scheduleScheme.getModelId());
@@ -76,6 +77,14 @@
                log.error("模型setting不存在,modelId=" + modelId);
                return null;
            }
            //如果输入参数中包含setting,则覆盖默认的setting
            if (!params.isEmpty()){
                for (Map.Entry<String, Object> entry : params.entrySet()){
                    if (settings.containsKey(entry.getKey())){
                        settings.put(entry.getKey(), entry.getValue());
                    }
                }
            }
            // 校验setting必须有pyFile,否则可能导致程序崩溃
            if (!settings.containsKey(MdkConstant.PY_FILE_KEY)) {
                log.error("模型设置参数缺少必要信息【" + MdkConstant.PY_FILE_KEY +  "】,请重新上传模型!");