From a440ec3bfaa1363f5841100b8948d852971a2eb1 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期二, 10 十二月 2024 13:19:58 +0800 Subject: [PATCH] MmPredictAlarmConfigService --- iailab-module-model/iailab-module-model-biz/src/main/resources/template/cpp.vm | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/resources/template/cpp.vm b/iailab-module-model/iailab-module-model-biz/src/main/resources/template/cpp.vm index 939e6ba..1025477 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/resources/template/cpp.vm +++ b/iailab-module-model/iailab-module-model-biz/src/main/resources/template/cpp.vm @@ -17,7 +17,16 @@ { PyGILThreadLock lock; - PyObject* pModule = create_py_module("${pyModule}.${pyName}"); + + jclass hashmapClass = env->FindClass("java/util/HashMap"); + jmethodID getMID = env->GetMethodID(hashmapClass, "get", "(Ljava/lang/Object;)Ljava/lang/Object;"); + jstring keyJString = env->NewStringUTF("pyFile"); + jobject javaValueObj = env->CallObjectMethod(settings, getMID, keyJString); + const char* strValue = env->GetStringUTFChars((jstring)javaValueObj, NULL); + cout << strValue << endl; + + PyObject* pModule = create_py_module(strValue); + /*PyObject* pModule = create_py_module("${pyModule}.${pyName}");*/ if (pModule == NULL) { cout << "model error" << endl; -- Gitblit v1.9.3