| | |
| | | import com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity; |
| | | import com.iailab.module.model.mcs.pre.entity.MmModelArithSettingsEntity; |
| | | import com.iailab.module.model.mcs.pre.entity.MmPredictModelEntity; |
| | | import com.iailab.module.model.mcs.pre.enums.ItemRunStatusEnum; |
| | | import com.iailab.module.model.mcs.pre.service.MmItemOutputService; |
| | | import com.iailab.module.model.mcs.pre.service.MmModelArithSettingsService; |
| | | import com.iailab.module.model.mdk.common.enums.TypeA; |
| | |
| | | * @throws ModelInvokeException |
| | | */ |
| | | @Override |
| | | public synchronized PredictResultVO predictByModel(Date predictTime, MmPredictModelEntity predictModel,String itemName) throws ModelInvokeException { |
| | | public synchronized PredictResultVO predictByModel(Date predictTime, MmPredictModelEntity predictModel,String itemName, ItemRunStatusEnum itemRunStatusEnum) throws ModelInvokeException { |
| | | PredictResultVO result = new PredictResultVO(); |
| | | if (predictModel == null) { |
| | | throw new ModelInvokeException("modelEntity is null"); |
| | |
| | | HashMap<String, Object> modelResult = DllUtils.run(newModelBean, param2Values, predictModel.getMpkprojectid()); |
| | | if (!modelResult.containsKey(CommonConstant.MDK_STATUS_CODE) || !modelResult.containsKey(CommonConstant.MDK_RESULT) || |
| | | !modelResult.get(CommonConstant.MDK_STATUS_CODE).toString().equals(CommonConstant.MDK_STATUS_100)) { |
| | | itemRunStatusEnum = ItemRunStatusEnum.MODELRESULTERROR; |
| | | throw new RuntimeException("模型结果异常:" + modelResult); |
| | | } |
| | | modelResult = (HashMap<String, Object>) modelResult.get(CommonConstant.MDK_RESULT); |