diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..8c06301 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ + +[*] + +# ReSharper properties +resharper_member_initializer_list_style=on_single_line +resharper_new_line_before_catch=false +resharper_new_line_before_else=false +resharper_new_line_before_while=false +resharper_simple_case_statement_style=line_break +resharper_simple_embedded_statement_style=line_break +resharper_wrap_after_expression_lbrace=false +resharper_wrap_before_expression_rbrace=false diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..1bcfb19 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,21 @@ +{ + "configurations": [ + { + "name": "Win32", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": [ + "_DEBUG", + "UNICODE", + "_UNICODE" + ], + "windowsSdkVersion": "8.1", + "compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe", + "cStandard": "c11", + "cppStandard": "c++17", + "intelliSenseMode": "msvc-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/HEZON_ITK.VC.db b/HEZON_ITK.VC.db deleted file mode 100644 index ab172e8..0000000 Binary files a/HEZON_ITK.VC.db and /dev/null differ diff --git a/HEZON_ITK/HEZON_ITK.vcxproj b/HEZON_ITK/HEZON_ITK.vcxproj index 491fc5b..41bc918 100644 --- a/HEZON_ITK/HEZON_ITK.vcxproj +++ b/HEZON_ITK/HEZON_ITK.vcxproj @@ -129,7 +129,7 @@ true true WIN32;NDEBUG;_CONSOLE;IPLIB=none;%(PreprocessorDefinitions) - C:\Users\lyf\Documents\tclib\tc12\include;C:\Users\lyf\Documents\tclib\tc12\include_cpp;%(AdditionalIncludeDirectories) + C:\work\include12_2;C:\work\include_cpp12_2;C:\Java\jdk1.8.0_231\include\win32;C:\Java\jdk1.8.0_231\include;%(AdditionalIncludeDirectories) Cdecl @@ -139,7 +139,7 @@ true - C:\Users\lyf\Documents\tclib\tc12\lib\*.lib;%(AdditionalDependencies) + C:\work\lib12_2\*.lib;%(AdditionalDependencies) libuser_exits.ar.lib;%(IgnoreSpecificDefaultLibraries) $(OutDir)\bs.dll /FORCE %(AdditionalOptions) @@ -163,11 +163,14 @@ + + + diff --git a/HEZON_ITK/HEZON_ITK.vcxproj.filters b/HEZON_ITK/HEZON_ITK.vcxproj.filters index a413b68..27c823e 100644 --- a/HEZON_ITK/HEZON_ITK.vcxproj.filters +++ b/HEZON_ITK/HEZON_ITK.vcxproj.filters @@ -64,6 +64,12 @@ epm-handler + + epm-handler + + + epm-handler + @@ -75,5 +81,8 @@ epm-handler + + epm-handler + \ No newline at end of file diff --git a/HEZON_ITK/bs_custom_main.cxx b/HEZON_ITK/bs_custom_main.cxx index f930510..59bd8e6 100644 --- a/HEZON_ITK/bs_custom_main.cxx +++ b/HEZON_ITK/bs_custom_main.cxx @@ -27,6 +27,7 @@ #include #include "epm_register_handler.h" #include "epm_handler_common.h" +#include "jd_clear_field.h" #ifdef __cplusplus @@ -53,6 +54,7 @@ extern "C" { "USER_gs_shell_init_module", (CUSTOM_EXIT_ftn_t)CUST_init_module); + Register_revise_msg(); return ifail; } diff --git a/HEZON_ITK/epm_handler_common.h b/HEZON_ITK/epm_handler_common.h index ec6ce6c..e04da47 100644 --- a/HEZON_ITK/epm_handler_common.h +++ b/HEZON_ITK/epm_handler_common.h @@ -43,6 +43,7 @@ int bs_bom_check(EPM_rule_message_t msg); int bs_wl_check(EPM_rule_message_t msg); int bs_bom_save_check(METHOD_message_t *msg, va_list args); int bs_sign_cad(EPM_action_message_t msg); +int jd_signoff(EPM_action_message_t msg); ////将流程信息签入版本属性上去 //int qtmc_sign_ir(EPM_action_message_t msg); diff --git a/HEZON_ITK/epm_register_handler.cxx b/HEZON_ITK/epm_register_handler.cxx index 76ba424..36ed1bb 100644 --- a/HEZON_ITK/epm_register_handler.cxx +++ b/HEZON_ITK/epm_register_handler.cxx @@ -116,6 +116,15 @@ extern DLLAPI int CUST_init_module(int *decision, va_list args) printf("register bs_sign_cad successfully\n"); } + + ifail = EPM_register_action_handler("jd_signoff", "jd_signoff", + (EPM_action_handler_t)jd_signoff); + if (ifail) { + printf("register jd_signoff failed\n"); + } else { + printf("register jd_signoff successfully\n"); + + } //if(ifail == ITK_ok) //{ // fprintf(stdout,"Registering action handler qtmc-sign-ir completed!\n"); diff --git a/HEZON_ITK/jd_clear_field.cpp b/HEZON_ITK/jd_clear_field.cpp new file mode 100644 index 0000000..3cf44e2 --- /dev/null +++ b/HEZON_ITK/jd_clear_field.cpp @@ -0,0 +1,556 @@ +锘#include "jd_clear_field.h" +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "sstream" +#include "atlstr.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "tc/envelope.h" +#include +#include "ae/dataset.h" +#include +#include +#include +#include +#include +#include +#include +#include "ce/ce.h" +#include +#include +#include +#include +#include +#include "string" +#include "sstream" +#include +#include +#include +#include
+#include "ctime" +#include "tchar.h" +#include "jni.h" + +#ifdef WIN32 +#include +#include +#else +#include +#include +#endif +#include +#include +#define MAX_PATH_LEN 256 + +#define GUID_LEN 64 + +#ifdef WIN32 +#define ACCESS(fileName,accessMode) _access(fileName,accessMode) +#define MKDIR(path) _mkdir(path) +#else +#define ACCESS(fileName,accessMode) access(fileName,accessMode) +#define MKDIR(path) mkdir(path,S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) +#endif + +#define LOCALJARPATH "D:\\Siemens\\Teamcenter11\\bin\\tc_extra_jar\\" +#define REMOTEJARPATH "D:\\app\\Siemens\\Teamcenter12\\bin\\tc_extra_jar\\" + +//#include +using namespace std; +#ifdef __cplusplus +extern "C" int POM_AM__set_application_bypass(logical bypass); +extern "C" { +#endif + + int32_t createDirectory(const std::string &directoryPath) { + uint32_t dirPathLen = directoryPath.length(); + if (dirPathLen > MAX_PATH_LEN) { + return -1; + } + char tmpDirPath[MAX_PATH_LEN] = { 0 }; + for (uint32_t i = 0; i < dirPathLen; ++i) { + tmpDirPath[i] = directoryPath[i]; + if (tmpDirPath[i] == '\\' || tmpDirPath[i] == '/') { + if (ACCESS(tmpDirPath, 0) != 0) { + int32_t ret = MKDIR(tmpDirPath); + if (ret != 0) { + return ret; + } + } + } + } + return 0; + } + + static void replace_dataset_named_reference(tag_t dataset_tag, tag_t old_file, + const char *new_file_path, char *ref_name) { + IMF_file_data_p_t file_data; + int index = 0; + char *name; + + IMF_get_file_access(old_file, 0, &file_data); + + tag_t new_file_tag = NULLTAG; + AOM_lock(old_file); + + IMF_ask_original_file_name2(old_file, &name); + + IMF_replace_file_and_get_new_tag(old_file, new_file_path, + FALSE, &new_file_tag); + + AOM_lock(dataset_tag); + + AE_replace_dataset_named_ref2(dataset_tag, old_file, ref_name, + AE_PART_OF, new_file_tag); + AE_save_myself(dataset_tag); + + IMF_set_original_file_name2(new_file_tag, name); + AOM_unlock(dataset_tag); + IMF_release_file_access(&file_data); + } + + bool isTypeOf(tag_t objtag, const char * type_name) { + tag_t type = NULLTAG; + TCTYPE_ask_object_type(objtag, &type); + tag_t item_type = NULLTAG; + TCTYPE_find_type(type_name, "", &item_type); + bool is_type = false; + if (item_type != NULLTAG) { + logical isok = FALSE; + TCTYPE_is_type_of(type, item_type, &isok); + if (isok) { + is_type = true; + } + } + return is_type; + } + + string GBKToUTF8(const char* strGBK) { + int len = MultiByteToWideChar(CP_ACP, 0, strGBK, -1, NULL, 0); + wchar_t* wstr = new wchar_t[len + 1]; + memset(wstr, 0, len + 1); + MultiByteToWideChar(CP_ACP, 0, strGBK, -1, wstr, len); + len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL); + char* str = new char[len + 1]; + memset(str, 0, len + 1); + WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, len, NULL, NULL); + string strTemp = str; + if (wstr) delete[] wstr; + if (str) delete[] str; + return strTemp; + } + + + /* + 鏄犲皠 + -path 璺緞 + -name 鐢ㄦ埛鍚 + -step 娴佺▼闃舵: 缂栧埗锛49锛屾牎瀵癸細50锛屽鏍革細51锛屼細绛撅細52锛屾壒鍑嗭細53 + */ + static int sign(JNIEnv* env, jclass class_Test, const char* path, char* name, int step) { + printf("signin\n"); + jmethodID methodId_main = env->GetStaticMethodID(class_Test, "sign", "(Ljava/lang/String;Ljava/lang/String;I)I"); + if (methodId_main == NULL) { + printf("error\n"); + return 0; + } + string path1 = GBKToUTF8(path); + string name1 = GBKToUTF8(name); + jstring jpath = env->NewStringUTF(path1.c_str()); + jstring jname = env->NewStringUTF(name1.c_str()); + jint jstep = (jint)step; + printf("path:%s,name%s,step%d\n", path1.c_str(), name1.c_str(), step); + jint result = 0; + result = env->CallStaticIntMethod(class_Test, methodId_main, jpath, jname, jstep); + int res = result; + printf("result:%d\n", res); + printf("signout\n"); + return res; + } + + void add_path(JNIEnv* env, const std::string& path) { + const std::string urlPath = "file:/" + path; + jclass classLoaderCls = env->FindClass("java/lang/ClassLoader"); + printf("111\n"); + jmethodID getSystemClassLoaderMethod = env->GetStaticMethodID(classLoaderCls, "getSystemClassLoader", "()Ljava/lang/ClassLoader;"); + jobject classLoaderInstance = env->CallStaticObjectMethod(classLoaderCls, getSystemClassLoaderMethod); + jclass urlClassLoaderCls = env->FindClass("java/net/URLClassLoader"); + jmethodID addUrlMethod = env->GetMethodID(urlClassLoaderCls, "addURL", "(Ljava/net/URL;)V"); + jclass urlCls = env->FindClass("java/net/URL"); + jmethodID urlConstructor = env->GetMethodID(urlCls, "", "(Ljava/lang/String;)V"); + jobject urlInstance = env->NewObject(urlCls, urlConstructor, env->NewStringUTF(urlPath.c_str())); + env->CallVoidMethod(classLoaderInstance, addUrlMethod, urlInstance); + std::cout << "Added " << urlPath << " to the classpath." << std::endl; + } + + int JD_clear(METHOD_message_t* msg, va_list args, tag_t new_rev) { + printf("鍗囩増鎵ц\n"); + //鑾峰彇鏁版嵁闆 + char *temp_path, *attach_type; + int n_attachs; + tag_t ref_obj, excelx_tag, excel_tag, wordx_tag, word_tag, type_tag, word_ref, excel_ref, *dataset; + ITEM_attached_object_t *rev_attachments; + AE_reference_type_t ae_ref; + TCTYPE_find_type("MSExcelX", "Dataset", &excelx_tag); + TCTYPE_find_type("MSExcel", "Dataset", &excel_tag); + TCTYPE_find_type("MSWord", "Dataset", &word_tag); + TCTYPE_find_type("MSWordX", "Dataset", &wordx_tag); + temp_path = getenv("temp"); + + printf("temp_path:%s\n", temp_path); + + //鍒涘缓tc_export鐩綍 + stringstream dir; + dir << temp_path; + dir << "\\tc_export\\"; + createDirectory(dir.str()); + + printf("dir:%s\n", dir.str().c_str()); + + //鑾峰彇guid + char buffer[GUID_LEN] = { 0 }; + GUID guid; + + if (CoCreateGuid(&guid)) { + fprintf(stderr, "create guid error\n"); + return -1; + } + _snprintf(buffer, sizeof(buffer), + "%08X-%04X-%04x-%02X%02X-%02X%02X%02X%02X%02X%02X", + guid.Data1, guid.Data2, guid.Data3, + guid.Data4[0], guid.Data4[1], guid.Data4[2], + guid.Data4[3], guid.Data4[4], guid.Data4[5], + guid.Data4[6], guid.Data4[7]); + printf("guid: %s\n", buffer); + + POM_AM__set_application_bypass(true); + + //鐢宠铏氭嫙鏈 + wstringstream wss; + wss << getenv("JRE_HOME") << "\\bin\\server\\jvm.dll"; + + printf("wxs:%s\n", wss.str().c_str()); + + JavaVMInitArgs vmArgs; + const int OPTION_COUNT = 1; + vmArgs.nOptions = OPTION_COUNT; + JavaVMOption options[OPTION_COUNT] = { 0 }; + options[0].optionString = "-Xmx1024m"; + vmArgs.options = options; + vmArgs.version = JNI_VERSION_1_8; + vmArgs.ignoreUnrecognized = JNI_TRUE; + printf("before load dll\n"); + HMODULE hModule = LoadLibrary(wss.str().c_str()); + if (hModule == NULL) { + printf("error load dll"); + return -1; + } + printf("after load dll\n"); + typedef jint(JNICALL *CreateJavaVMFuncPtr)(JavaVM **pvm, void **penv, void *args); + CreateJavaVMFuncPtr CreateJavaVM = (CreateJavaVMFuncPtr)GetProcAddress(hModule, "JNI_CreateJavaVM"); + typedef jint(JNICALL * GetCreatedJavaVMs)(JavaVM**, jsize, jsize*); + + GetCreatedJavaVMs jni_GetCreatedJavaVMs; + jni_GetCreatedJavaVMs = (GetCreatedJavaVMs)GetProcAddress(GetModuleHandle( + TEXT("jvm.dll")), "JNI_GetCreatedJavaVMs"); + JavaVM *jvm = nullptr, *jvms; + JNIEnv *env = nullptr; + jsize size = 0; + jni_GetCreatedJavaVMs(&jvms, 0, &size); + printf("before load jvm\n"); + if (size) { + JavaVM** buffer = new JavaVM*[size]; + jni_GetCreatedJavaVMs(buffer, size, &size); + buffer[0]->GetEnv((void**)&env, JNI_VERSION_1_8); + jint result = buffer[0]->AttachCurrentThread((void**)&env, NULL); + } else { + jint res = (*CreateJavaVM)(&jvm, (void**)&env, &vmArgs); + if (res < 0) { + printf("error load jvm"); + return -1; + } + } + + printf("after load jvm\n"); + + + stringstream s; + if (ACCESS(LOCALJARPATH, 0) != 0) { + s << REMOTEJARPATH; + s << "sign2fileRunnable.jar"; + add_path(env, s.str().c_str()); + } else { + s << LOCALJARPATH; + s << "sign2fileRunnable.jar"; + add_path(env, s.str().c_str()); + } + + printf("add path\n"); + jclass class_Test; + int file_type = -1; + + int ifail = ITK_ok, objects_count; + + tag_t *objects; + + + ITKCALL(AOM_ask_value_tags(new_rev, "IMAN_master_form_rev", &objects_count, &objects)); + //琛ㄥ崟绛惧悕 + for (auto iii = 0; iii < objects_count; iii++) { + AOM_lock(objects[iii]); + AOM_set_value_string(objects[iii], "jd2_bz", ""); + AOM_set_value_string(objects[iii], "jd2_bzrq", ""); + AOM_set_value_string(objects[iii], "jd2_jd", ""); + AOM_set_value_string(objects[iii], "jd2_jdrq", ""); + AOM_set_value_string(objects[iii], "jd2_sh", ""); + AOM_set_value_string(objects[iii], "jd2_shrq", ""); + AOM_set_value_string(objects[iii], "jd2_hq", ""); + AOM_set_value_string(objects[iii], "jd2_hqrq", ""); + AOM_set_value_string(objects[iii], "jd2_pz", ""); + AOM_set_value_string(objects[iii], "jd2_pzrq", ""); + ITKCALL(AOM_save(objects[iii])); + AOM_unlock(objects[iii]); + } + MEM_free(objects); + + printf("startSign\n"); + ITKCALL(AOM_ask_value_tags(new_rev, "IMAN_specification", &n_attachs, &dataset)); + for (int i = 0;i < n_attachs;i++) { + stringstream ss; + ss << dir.str().c_str(); + printf(ss.str().c_str()); + ITKCALL(TCTYPE_ask_object_type(dataset[i], &type_tag)); + if (type_tag == wordx_tag || type_tag == word_tag) { + ITKCALL(AE_ask_dataset_named_ref2(dataset[i], "word", &ae_ref, &word_ref)); + char *file_name; + ITKCALL(AOM_UIF_ask_value(word_ref, "file_name", &file_name)); + ss << buffer; + ss << "_"; + ss << file_name; + printf("path:%s\n", ss.str().c_str()); + ITKCALL(AE_export_named_ref(dataset[i], "word", ss.str().c_str())); + file_type = 0; + } else if (type_tag == excel_tag || type_tag == excelx_tag) { + ITKCALL(AE_ask_dataset_named_ref2(dataset[i], "excel", &ae_ref, &excel_ref)); + char *file_name; + ITKCALL(AOM_UIF_ask_value(excel_ref, "file_name", &file_name)); + ss << buffer; + ss << "_"; + ss << file_name; + printf("path:%s\n", ss.str().c_str()); + ITKCALL(AE_export_named_ref(dataset[i], "excel", ss.str().c_str())); + file_type = 1; + } + + printf("file_type:%d\n", file_type); + if (file_type == 0) { + class_Test = env->FindClass("sign2file/SignToWord"); + int res = sign(env, class_Test, ss.str().c_str(), "", 54); + if (res) { + replace_dataset_named_reference(dataset[i], word_ref, ss.str().c_str(), "word"); + } + } else if (file_type == 1) { + class_Test = env->FindClass("sign2file/SignToExcel"); + int res = sign(env, class_Test, ss.str().c_str(), "", 54); + if (res) { + replace_dataset_named_reference(dataset[i], excel_ref, ss.str().c_str(), "excel"); + } + } + file_type = -1; + } + MEM_free(dataset); + AOM_ask_value_tags(new_rev, "TC_Attaches", &n_attachs, &dataset); + for (int i = 0;i < n_attachs;i++) { + stringstream ss; + ss << dir.str().c_str(); + ITKCALL(TCTYPE_ask_object_type(dataset[i], &type_tag)); + if (type_tag == wordx_tag || type_tag == word_tag) { + ITKCALL(AE_ask_dataset_named_ref2(dataset[i], "word", &ae_ref, &word_ref)); + char *file_name; + ITKCALL(AOM_UIF_ask_value(word_ref, "file_name", &file_name)); + ss << buffer; + ss << "_"; + ss << file_name; + printf("path:%s\n", ss.str().c_str()); + ITKCALL(AE_export_named_ref(dataset[i], "word", ss.str().c_str())); + file_type = 0; + } else if (type_tag == excel_tag || type_tag == excelx_tag) { + ITKCALL(AE_ask_dataset_named_ref2(dataset[i], "excel", &ae_ref, &excel_ref)); + char *file_name; + ITKCALL(AOM_UIF_ask_value(excel_ref, "file_name", &file_name)); + ss << buffer; + ss << "_"; + ss << file_name; + printf("path:%s\n", ss.str().c_str()); + ITKCALL(AE_export_named_ref(dataset[i], "excel", ss.str().c_str())); + file_type = 1; + } + + printf("file_type:%d\n", file_type); + if (file_type == 0) { + class_Test = env->FindClass("sign2file/SignToWord"); + int res = sign(env, class_Test, ss.str().c_str(), "", 54); + if (res) { + replace_dataset_named_reference(dataset[i], word_ref, ss.str().c_str(), "word"); + } + } else if (file_type == 1) { + class_Test = env->FindClass("sign2file/SignToExcel"); + int res = sign(env, class_Test, ss.str().c_str(), "", 54); + if (res) { + replace_dataset_named_reference(dataset[i], excel_ref, ss.str().c_str(), "excel"); + } + } + file_type = -1; + } + MEM_free(dataset); + printf("endSign\n"); + + FreeLibrary(hModule); + POM_AM__set_application_bypass(false); + return ITK_ok; + } + + int JD_Revise_clear(METHOD_message_t* msg, va_list args) { + + tag_t new_rev = va_arg(args, tag_t); + char *operation = va_arg(args, char*), **pref_values, *type; + int ifail = ITK_ok, pref_count; + AOM_ask_value_string(new_rev, "object_type", &type); + + if (strcmp(operation, "Revise") == 0 || strcmp(operation, "SaveAs") == 0) { + if (isTypeOf(new_rev, "ItemRevision")) { + //鑾峰彇棣栭夐」 + PREF_ask_char_values("jd_revise_clear_revisions",&pref_count,&pref_values); + for (int i = 0;i < pref_count;i++) { + if (strcmp(pref_values[i],type)==0) { + JD_clear(msg, args, new_rev); + break; + } + } + } + + } + + return ifail; + } + + extern int Register_revise_msg(void) { + int status = ITK_ok; + char *err_string, *err_function; + int err_line = -1; + printf("JD_Revise_clear鍑芥暟寮濮嬫敞鍐孿n"); + + METHOD_id_t mth_tag; + ITKCALL(status = METHOD_find_method("ItemRevision", ITEM_deep_copy_msg, &mth_tag)); + if (mth_tag.id != 0) { + ITKCALL(METHOD_add_action(mth_tag, METHOD_post_action_type, JD_Revise_clear, NULL)); + printf("JD_Revise_clear娉ㄥ唽鎴愬姛\n"); + } + return status; + } + +#ifdef __cplusplus +} +#endif + + + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/** +* @headerfile standard c & cpp header files +*/ +#include +#include +#include +#include +#include +#include +#include +#include +using namespace std; + +/** +* @headerfile user's header files +*/ + + + diff --git a/HEZON_ITK/jd_clear_field.h b/HEZON_ITK/jd_clear_field.h new file mode 100644 index 0000000..225f7d0 --- /dev/null +++ b/HEZON_ITK/jd_clear_field.h @@ -0,0 +1,33 @@ + +#ifndef W2_CLEAR_FORM_PROPVALUE +#define W2_CLEAR_FORM_PROPVALUE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#ifdef __cplusplus +extern "C" { +#endif + extern USER_EXT_DLL_API int JD_Revise_clear( METHOD_message_t* msg, va_list args ); + extern int Register_revise_msg(void); + + +#ifdef __cplusplus +} +#endif +#include +#endif \ No newline at end of file diff --git a/HEZON_ITK/jd_signoff.cpp b/HEZON_ITK/jd_signoff.cpp new file mode 100644 index 0000000..5c70ac8 --- /dev/null +++ b/HEZON_ITK/jd_signoff.cpp @@ -0,0 +1,524 @@ +锘#include "epm_handler_common.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "tc/envelope.h" +#include +#include "ae/dataset.h" +#include +#include +#include +#include +#include +#include +#include +#include "ce/ce.h" +#include +#include +#include +#include +#include +#include "string" +#include "sstream" +#include +#include +#include +#include +#include "ctime" +#include "tchar.h" +#include "jni.h" + +#ifdef WIN32 +#include +#include +#else +#include +#include +#endif +#include +#include +#define MAX_PATH_LEN 256 + +#ifdef WIN32 +#define ACCESS(fileName,accessMode) _access(fileName,accessMode) +#define MKDIR(path) _mkdir(path) +#else +#define ACCESS(fileName,accessMode) access(fileName,accessMode) +#define MKDIR(path) mkdir(path,S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) +#endif + +#define LOCALJARPATH "D:\\Siemens\\Teamcenter11\\bin\\tc_extra_jar\\" +#define REMOTEJARPATH "D:\\app\\Siemens\\Teamcenter12\\bin\\tc_extra_jar\\" + +using namespace std; +extern "C" int POM_AM__set_application_bypass(logical bypass); + +int32_t createDirectory(const std::string &directoryPath) { + uint32_t dirPathLen = directoryPath.length(); + if (dirPathLen > MAX_PATH_LEN) { + return -1; + } + char tmpDirPath[MAX_PATH_LEN] = { 0 }; + for (uint32_t i = 0; i < dirPathLen; ++i) { + tmpDirPath[i] = directoryPath[i]; + if (tmpDirPath[i] == '\\' || tmpDirPath[i] == '/') { + if (ACCESS(tmpDirPath, 0) != 0) { + int32_t ret = MKDIR(tmpDirPath); + if (ret != 0) { + return ret; + } + } + } + } + return 0; +} + +static void replace_dataset_named_reference(tag_t dataset_tag, tag_t old_file, + const char *new_file_path, char *ref_name) { + IMF_file_data_p_t file_data; + int index = 0; + char *name; + + IMF_get_file_access(old_file, 0, &file_data); + + tag_t new_file_tag = NULLTAG; + AOM_lock(old_file); + + IMF_ask_original_file_name2(old_file, &name); + + IMF_replace_file_and_get_new_tag(old_file, new_file_path, + FALSE, &new_file_tag); + + AOM_lock(dataset_tag); + + AE_replace_dataset_named_ref2(dataset_tag, old_file, ref_name, + AE_PART_OF, new_file_tag); + AE_save_myself(dataset_tag); + + IMF_set_original_file_name2(new_file_tag, name); + AOM_unlock(dataset_tag); + IMF_release_file_access(&file_data); +} + +bool isTypeOf(tag_t objtag, const char * type_name) { + tag_t type = NULLTAG; + TCTYPE_ask_object_type(objtag, &type); + tag_t item_type = NULLTAG; + TCTYPE_find_type(type_name, "", &item_type); + bool is_type = false; + if (item_type != NULLTAG) { + logical isok = FALSE; + TCTYPE_is_type_of(type, item_type, &isok); + if (isok) { + is_type = true; + } + } + return is_type; +} + +string GBKToUTF8(const char* strGBK) +{ + int len = MultiByteToWideChar(CP_ACP, 0, strGBK, -1, NULL, 0); + wchar_t* wstr = new wchar_t[len + 1]; + memset(wstr, 0, len + 1); + MultiByteToWideChar(CP_ACP, 0, strGBK, -1, wstr, len); + len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL); + char* str = new char[len + 1]; + memset(str, 0, len + 1); + WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, len, NULL, NULL); + string strTemp = str; + if (wstr) delete[] wstr; + if (str) delete[] str; + return strTemp; +} + +/* +鏄犲皠 +-path 璺緞 +-name 鐢ㄦ埛鍚 +-step 娴佺▼闃舵: 缂栧埗锛49锛屾牎瀵癸細50锛屽鏍革細51锛屼細绛撅細52锛屾壒鍑嗭細53 +*/ +static int sign(JNIEnv* env, jclass class_Test,const char* path, char* name, int step) { + printf("signin\n"); + jmethodID methodId_main = env->GetStaticMethodID(class_Test, "sign", "(Ljava/lang/String;Ljava/lang/String;I)I"); + if (methodId_main==NULL) { + printf("error\n"); + return 0; + } + string path1 = GBKToUTF8(path); + string name1 = GBKToUTF8(name); + jstring jpath = env->NewStringUTF(path1.c_str()); + jstring jname = env->NewStringUTF(name1.c_str()); + jint jstep = (jint)step; + printf("path:%s,name%s,step%d\n", path1.c_str(), name1.c_str(),step); + jint result = 0; + result = env->CallStaticIntMethod(class_Test, methodId_main, jpath, jname, jstep); + int res = result; + printf("result:%d\n", res); + printf("signout\n"); + return res; +} + +void add_path(JNIEnv* env, const std::string& path) +{ + const std::string urlPath = "file:/" + path; + jclass classLoaderCls = env->FindClass("java/lang/ClassLoader"); + printf("111\n"); + jmethodID getSystemClassLoaderMethod = env->GetStaticMethodID(classLoaderCls, "getSystemClassLoader", "()Ljava/lang/ClassLoader;"); + jobject classLoaderInstance = env->CallStaticObjectMethod(classLoaderCls, getSystemClassLoaderMethod); + jclass urlClassLoaderCls = env->FindClass("java/net/URLClassLoader"); + jmethodID addUrlMethod = env->GetMethodID(urlClassLoaderCls, "addURL", "(Ljava/net/URL;)V"); + jclass urlCls = env->FindClass("java/net/URL"); + jmethodID urlConstructor = env->GetMethodID(urlCls, "", "(Ljava/lang/String;)V"); + jobject urlInstance = env->NewObject(urlCls, urlConstructor, env->NewStringUTF(urlPath.c_str())); + env->CallVoidMethod(classLoaderInstance, addUrlMethod, urlInstance); + std::cout << "Added " << urlPath << " to the classpath." << std::endl; +} + +//鍚夊痉琛ㄥ崟绛惧悕 +int jd_signoff(EPM_action_message_t msg) { + + const char bz = '1', jd = '2', sh = '3', hq = '4', pz = '5', bz_back = '0', clear='6'; + + int ifail = ITK_ok, att_count, objects_count, step; + tag_t rootTask, *attachments, user_tag, *objects; + char *user_name; + logical verdict; + //鑾峰彇鏃堕棿 + time_t t; + time(&t); + tm* time = localtime(&t); + stringstream date; + date << time->tm_year + 1900 << "-"; + date << time->tm_mon + 1 << "-"; + date << time->tm_mday << "-"; + date << time->tm_hour << "-"; + date << time->tm_min << "-"; + date << time->tm_sec; + + + //鑾峰彇鏁版嵁闆 + char *temp_path, *attach_type; + int n_attachs; + tag_t ref_obj, excelx_tag, excel_tag, wordx_tag, word_tag, type_tag, word_ref, excel_ref, *dataset; + ITEM_attached_object_t *rev_attachments; + AE_reference_type_t ae_ref; + TCTYPE_find_type("MSExcelX", "Dataset", &excelx_tag); + TCTYPE_find_type("MSExcel", "Dataset", &excel_tag); + TCTYPE_find_type("MSWord", "Dataset", &word_tag); + TCTYPE_find_type("MSWordX", "Dataset", &wordx_tag); + temp_path = getenv("temp"); + + POM_AM__set_application_bypass(true); + + + //鑾峰彇褰撳墠鐢ㄦ埛 + POM_get_user(&user_name, &user_tag); + + //鑾峰彇閫変腑鐨勭洰鏍囧璞 + TC_argument_list_t * arguments = msg.arguments; + int arg_cnt = TC_number_of_arguments(arguments), status = 0; + + EPM_ask_root_task(msg.task, &rootTask); + EPM_ask_attachments(rootTask, EPM_target_attachment, &att_count, &attachments); + + //鑾峰彇娴佺▼涓厤缃殑handler灞炴 + map paras; + for (auto i = 0; iGetEnv((void**)&env, JNI_VERSION_1_8); + jint result = buffer[0]->AttachCurrentThread((void**)&env, NULL); + } else { + jint res = (*CreateJavaVM)(&jvm, (void**)&env, &vmArgs); + if (res < 0){ + printf("error load jvm"); + return -1; + } + } + + printf("after load jvm\n"); + + stringstream s; + if (ACCESS(LOCALJARPATH, 0) != 0) { + s << REMOTEJARPATH; + s << "sign2fileRunnable.jar"; + add_path(env, s.str().c_str()); + } else { + s << LOCALJARPATH; + s << "sign2fileRunnable.jar"; + add_path(env, s.str().c_str()); + } + + printf("add path\n"); + jclass class_Test; + int file_type = -1; + + printf("step:%d\n", step); + printf("user_name:%s\n", user_name); + printf("date:%s\n", date.str().c_str()); + + for (auto ii = 0; ii < att_count; ii++) { + if (isTypeOf(attachments[ii],"ItemRevision")) { + ITKCALL(AOM_ask_value_tags(attachments[ii], "IMAN_master_form_rev", &objects_count, &objects)); + //琛ㄥ崟绛惧悕 + for (auto iii = 0; iii < objects_count; iii++) { + printf("step:%c\n",step); + AOM_lock(objects[iii]); + switch (step) { + case bz: + AOM_set_value_string(objects[iii], "jd2_bz", user_name); + AOM_set_value_string(objects[iii], "jd2_bzrq", date.str().c_str()); + printf("bz signoff\n"); + break; + case jd: + AOM_set_value_string(objects[iii], "jd2_jd", user_name); + AOM_set_value_string(objects[iii], "jd2_jdrq", date.str().c_str()); + printf("jd signoff\n"); + break; + case sh: + AOM_set_value_string(objects[iii], "jd2_sh", user_name); + AOM_set_value_string(objects[iii], "jd2_shrq", date.str().c_str()); + printf("sh signoff\n"); + break; + case hq: + AOM_set_value_string(objects[iii], "jd2_hq", user_name); + AOM_set_value_string(objects[iii], "jd2_hqrq", date.str().c_str()); + printf("hq signoff\n"); + break; + case pz: + AOM_set_value_string(objects[iii], "jd2_pz", user_name); + AOM_set_value_string(objects[iii], "jd2_pzrq", date.str().c_str()); + printf("pz signoff\n"); + break; + case clear: + AOM_set_value_string(objects[iii], "jd2_bz", ""); + AOM_set_value_string(objects[iii], "jd2_bzrq", ""); + printf("clear signoff\n"); + case bz_back: + AOM_set_value_string(objects[iii], "jd2_jd", ""); + AOM_set_value_string(objects[iii], "jd2_jdrq", ""); + AOM_set_value_string(objects[iii], "jd2_sh", ""); + AOM_set_value_string(objects[iii], "jd2_shrq", ""); + AOM_set_value_string(objects[iii], "jd2_hq", ""); + AOM_set_value_string(objects[iii], "jd2_hqrq", ""); + AOM_set_value_string(objects[iii], "jd2_pz", ""); + AOM_set_value_string(objects[iii], "jd2_pzrq", ""); + printf("bz_back signoff\n"); + break; + } + ITKCALL(AOM_save(objects[iii])); + AOM_unlock(objects[iii]); + } + MEM_free(objects); + + printf("startSign\n"); + ITKCALL(AOM_ask_value_tags(attachments[ii], "IMAN_specification", &n_attachs, &dataset)); + for (int i = 0;i < n_attachs;i++) { + stringstream ss; + ss << dir.str().c_str(); + printf(ss.str().c_str()); + ITKCALL(TCTYPE_ask_object_type(dataset[i], &type_tag)); + if (type_tag == wordx_tag || type_tag == word_tag) { + ITKCALL(AE_ask_dataset_named_ref2(dataset[i], "word", &ae_ref, &word_ref)); + char *file_name; + ITKCALL(AOM_UIF_ask_value(word_ref, "file_name", &file_name)); + ss << date.str().c_str(); + ss << "_"; + ss << file_name; + printf("path:%s\n", ss.str().c_str()); + ITKCALL(AE_export_named_ref(dataset[i], "word", ss.str().c_str())); + file_type = 0; + } else if (type_tag == excel_tag || type_tag == excelx_tag) { + ITKCALL(AE_ask_dataset_named_ref2(dataset[i], "excel", &ae_ref, &excel_ref)); + char *file_name; + ITKCALL(AOM_UIF_ask_value(excel_ref, "file_name", &file_name)); + ss << date.str().c_str(); + ss << "_"; + ss << file_name; + printf("path:%s\n", ss.str().c_str()); + ITKCALL(AE_export_named_ref(dataset[i], "excel", ss.str().c_str())); + file_type = 1; + } + + printf("file_type:%d\n", file_type); + if (file_type == 0) { + class_Test = env->FindClass("sign2file/SignToWord"); + int res = sign(env, class_Test, ss.str().c_str(), user_name, step); + if (res) { + replace_dataset_named_reference(dataset[i], word_ref, ss.str().c_str(), "word"); + } + } else if (file_type == 1) { + class_Test = env->FindClass("sign2file/SignToExcel"); + int res = sign(env, class_Test, ss.str().c_str(), user_name, step); + if (res) { + replace_dataset_named_reference(dataset[i], excel_ref, ss.str().c_str(), "excel"); + } + } + file_type = -1; + } + MEM_free(dataset); + AOM_ask_value_tags(attachments[ii], "TC_Attaches", &n_attachs, &dataset); + for (int i = 0;i < n_attachs;i++) { + stringstream ss; + ss << dir.str().c_str(); + ITKCALL(TCTYPE_ask_object_type(dataset[i], &type_tag)); + if (type_tag == wordx_tag || type_tag == word_tag) { + ITKCALL(AE_ask_dataset_named_ref2(dataset[i], "word", &ae_ref, &word_ref)); + char *file_name; + ITKCALL(AOM_UIF_ask_value(word_ref, "file_name", &file_name)); + ss << date.str().c_str(); + ss << "_"; + ss << file_name; + printf("path:%s\n", ss.str().c_str()); + ITKCALL(AE_export_named_ref(dataset[i], "word", ss.str().c_str())); + file_type = 0; + } else if (type_tag == excel_tag || type_tag == excelx_tag) { + ITKCALL(AE_ask_dataset_named_ref2(dataset[i], "excel", &ae_ref, &excel_ref)); + char *file_name; + ITKCALL(AOM_UIF_ask_value(excel_ref, "file_name", &file_name)); + ss << date.str().c_str(); + ss << "_"; + ss << file_name; + printf("path:%s\n", ss.str().c_str()); + ITKCALL(AE_export_named_ref(dataset[i], "excel", ss.str().c_str())); + file_type = 1; + } + + printf("file_type:%d\n", file_type); + if (file_type == 0) { + class_Test = env->FindClass("sign2file/SignToWord"); + int res = sign(env, class_Test, ss.str().c_str(), user_name, step); + if (res) { + replace_dataset_named_reference(dataset[i], word_ref, ss.str().c_str(), "word"); + } + } else if (file_type == 1) { + class_Test = env->FindClass("sign2file/SignToExcel"); + int res = sign(env, class_Test, ss.str().c_str(), user_name, step); + if (res) { + replace_dataset_named_reference(dataset[i], excel_ref, ss.str().c_str(), "excel"); + } + } + file_type = -1; + } + MEM_free(dataset); + printf("endSign\n"); + } + } + + FreeLibrary(hModule); + POM_AM__set_application_bypass(false); + + return 0; +} diff --git a/HEZON_ITK/x64/Release/.NETFramework,Version=v4.0.AssemblyAttributes.asm b/HEZON_ITK/x64/Release/.NETFramework,Version=v4.0.AssemblyAttributes.asm index 783245d..f924cf7 100644 --- a/HEZON_ITK/x64/Release/.NETFramework,Version=v4.0.AssemblyAttributes.asm +++ b/HEZON_ITK/x64/Release/.NETFramework,Version=v4.0.AssemblyAttributes.asm @@ -1,4 +1,4 @@ -; Listing generated by Microsoft (R) Optimizing Compiler Version 19.00.24210.0 +; Listing generated by Microsoft (R) Optimizing Compiler Version 19.00.24215.1 ; Generated by VC++ for Common Language Runtime -.file "C:\Users\lyf\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cpp" +.file "C:\Users\5rKB5bPlusD\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cpp" diff --git a/HEZON_ITK/x64/Release/HEZON_ITK.log b/HEZON_ITK/x64/Release/HEZON_ITK.log index cae2d83..5bf2978 100644 --- a/HEZON_ITK/x64/Release/HEZON_ITK.log +++ b/HEZON_ITK/x64/Release/HEZON_ITK.log @@ -1,17 +1,118 @@ -锘 bs_sap.cpp -C:\Users\lyf\Documents\tclib\tc12\include\pom/pom/pom.h(816): warning C4819: 璇ユ枃浠跺寘鍚笉鑳藉湪褰撳墠浠g爜椤(936)涓〃绀虹殑瀛楃銆傝灏嗚鏂囦欢淇濆瓨涓 Unicode 鏍煎紡浠ラ槻姝㈡暟鎹涪澶 -C:\Users\lyf\Documents\tclib\tc12\include\pom/pom/pom.h(5420): warning C4819: 璇ユ枃浠跺寘鍚笉鑳藉湪褰撳墠浠g爜椤(936)涓〃绀虹殑瀛楃銆傝灏嗚鏂囦欢淇濆瓨涓 Unicode 鏍煎紡浠ラ槻姝㈡暟鎹涪澶 -C:\Users\lyf\Documents\tclib\tc12\include\qry/qry.h(591): warning C4819: 璇ユ枃浠跺寘鍚笉鑳藉湪褰撳墠浠g爜椤(936)涓〃绀虹殑瀛楃銆傝灏嗚鏂囦欢淇濆瓨涓 Unicode 鏍煎紡浠ラ槻姝㈡暟鎹涪澶 -C:\Users\lyf\Documents\tclib\tc12\include\qry/qry.h(591): warning C4819: 璇ユ枃浠跺寘鍚笉鑳藉湪褰撳墠浠g爜椤(936)涓〃绀虹殑瀛楃銆傝灏嗚鏂囦欢淇濆瓨涓 Unicode 鏍煎紡浠ラ槻姝㈡暟鎹涪澶 -bs_sap.cpp(85): warning C4267: 鈥滃垵濮嬪寲鈥: 浠庘渟ize_t鈥濊浆鎹㈠埌鈥渋nt鈥濓紝鍙兘涓㈠け鏁版嵁 -bs_sap.cpp(100): warning C4101: 鈥渙bj_type鈥: 鏈紩鐢ㄧ殑灞閮ㄥ彉閲 -bs_sap.cpp(240): warning C4101: 鈥渙bj_type鈥: 鏈紩鐢ㄧ殑灞閮ㄥ彉閲 -bs_sap.cpp(272): warning C4101: 鈥渓ines鈥: 鏈紩鐢ㄧ殑灞閮ㄥ彉閲 -bs_sap.cpp(270): warning C4101: 鈥渓ine_cnt鈥: 鏈紩鐢ㄧ殑灞閮ㄥ彉閲 -C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(1189,5): warning MSB8012: TargetPath(C:\Users\lyf\Documents\code\dk\HEZON_ITK\x64\Release\HEZON_ITK.dll) does not match the Linker's OutputFile property value (C:\Users\lyf\Documents\code\dk\HEZON_ITK\x64\Release\bs.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). -C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(1191,5): warning MSB8012: TargetName(HEZON_ITK) does not match the Linker's OutputFile property value (bs). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). -MSVCRT.lib(default_local_stdio_options.obj) : warning LNK4006: __local_stdio_printf_options 宸插湪 libassy_jt.lib(libassy_jt.dll) 涓畾涔夛紱宸插拷鐣ョ浜屼釜瀹氫箟 - 姝e湪鍒涘缓搴 C:\Users\lyf\Documents\code\dk\HEZON_ITK\x64\Release\\bs.lib 鍜屽璞 C:\Users\lyf\Documents\code\dk\HEZON_ITK\x64\Release\\bs.exp -C:\Users\lyf\Documents\code\dk\HEZON_ITK\x64\Release\\bs.dll : warning LNK4088: 鍥 /FORCE 閫夐」鐢熸垚浜嗘槧鍍忥紱鏄犲儚鍙兘涓嶈兘杩愯 - HEZON_ITK.vcxproj -> C:\Users\lyf\Documents\code\dk\HEZON_ITK\x64\Release\HEZON_ITK.dll - HEZON_ITK.vcxproj -> C:\Users\lyf\Documents\code\dk\HEZON_ITK\x64\Release\HEZON_ITK.pdb (Full PDB) +锘 bs_bom_check.cpp +c1xx : fatal error C1083: 鏃犳硶鎵撳紑婧愭枃浠: 鈥渂s_bom_check.cpp鈥: No such file or directory + bs_bom_save_check.cpp +c1xx : fatal error C1083: 鏃犳硶鎵撳紑婧愭枃浠: 鈥渂s_bom_save_check.cpp鈥: No such file or directory + bs_bypass.cpp +C:\work\include12_2\pom/pom/pom.h(806): warning C4819: 璇ユ枃浠跺寘鍚笉鑳藉湪褰撳墠浠g爜椤(936)涓〃绀虹殑瀛楃銆傝灏嗚鏂囦欢淇濆瓨涓 Unicode 鏍煎紡浠ラ槻姝㈡暟鎹涪澶 +C:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 璇ユ枃浠跺寘鍚笉鑳藉湪褰撳墠浠g爜椤(936)涓〃绀虹殑瀛楃銆傝灏嗚鏂囦欢淇濆瓨涓 Unicode 鏍煎紡浠ラ槻姝㈡暟鎹涪澶 + bs_file_transfer.cpp +C:\work\include12_2\pom/pom/pom.h(806): warning C4819: 璇ユ枃浠跺寘鍚笉鑳藉湪褰撳墠浠g爜椤(936)涓〃绀虹殑瀛楃銆傝灏嗚鏂囦欢淇濆瓨涓 Unicode 鏍煎紡浠ラ槻姝㈡暟鎹涪澶 +C:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 璇ユ枃浠跺寘鍚笉鑳藉湪褰撳墠浠g爜椤(936)涓〃绀虹殑瀛楃銆傝灏嗚鏂囦欢淇濆瓨涓 Unicode 鏍煎紡浠ラ槻姝㈡暟鎹涪澶 + bs_sap.cpp +bs_sap.cpp(1): fatal error C1083: 鏃犳硶鎵撳紑鍖呮嫭鏂囦欢: 鈥渦til.h鈥: No such file or directory + bs_signoff.cxx +C:\work\include12_2\pom/pom/pom.h(806): warning C4819: 璇ユ枃浠跺寘鍚笉鑳藉湪褰撳墠浠g爜椤(936)涓〃绀虹殑瀛楃銆傝灏嗚鏂囦欢淇濆瓨涓 Unicode 鏍煎紡浠ラ槻姝㈡暟鎹涪澶 +C:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 璇ユ枃浠跺寘鍚笉鑳藉湪褰撳墠浠g爜椤(936)涓〃绀虹殑瀛楃銆傝灏嗚鏂囦欢淇濆瓨涓 Unicode 鏍煎紡浠ラ槻姝㈡暟鎹涪澶 +bs_signoff.cxx(63): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\time.h(505): note: 鍙傝鈥渓ocaltime鈥濈殑澹版槑 + bs_sign_cad.cpp +c1xx : fatal error C1083: 鏃犳硶鎵撳紑婧愭枃浠: 鈥渂s_sign_cad.cpp鈥: No such file or directory + bs_wl_check.cpp +c1xx : fatal error C1083: 鏃犳硶鎵撳紑婧愭枃浠: 鈥渂s_wl_check.cpp鈥: No such file or directory + epm_register_handler.cxx +epm_register_handler.cxx(50): warning C4101: 鈥渘ow鈥: 鏈紩鐢ㄧ殑灞閮ㄥ彉閲 +epm_register_handler.cxx(49): warning C4101: 鈥渆xpire_date鈥: 鏈紩鐢ㄧ殑灞閮ㄥ彉閲 +epm_register_handler.cxx(49): warning C4101: 鈥渄ate_buf鈥: 鏈紩鐢ㄧ殑灞閮ㄥ彉閲 +epm_register_handler.cxx(51): warning C4101: 鈥減鈥: 鏈紩鐢ㄧ殑灞閮ㄥ彉閲 + bs_custom_main.cxx + jd_clear_field.cpp +C:\work\include12_2\pom/pom/pom.h(806): warning C4819: 璇ユ枃浠跺寘鍚笉鑳藉湪褰撳墠浠g爜椤(936)涓〃绀虹殑瀛楃銆傝灏嗚鏂囦欢淇濆瓨涓 Unicode 鏍煎紡浠ラ槻姝㈡暟鎹涪澶 +C:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 璇ユ枃浠跺寘鍚笉鑳藉湪褰撳墠浠g爜椤(936)涓〃绀虹殑瀛楃銆傝灏嗚鏂囦欢淇濆瓨涓 Unicode 鏍煎紡浠ラ槻姝㈡暟鎹涪澶 +jd_clear_field.cpp(119): warning C4267: 鈥滃垵濮嬪寲鈥: 浠庘渟ize_t鈥濊浆鎹㈠埌鈥渦int32_t鈥濓紝鍙兘涓㈠け鏁版嵁 +jd_clear_field.cpp(181): warning C4190: 鈥淕BKToUTF8鈥濇湁鎸囧畾鐨 C 閾炬帴锛屼絾杩斿洖浜嗕笌 C 涓嶅吋瀹圭殑 UDT鈥渟td::basic_string,std::allocator>鈥 + C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstring(2633): note: 鍙傝鈥渟td::basic_string,std::allocator>鈥濈殑澹版槑 +jd_clear_field.cpp(251): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1183): note: 鍙傝鈥済etenv鈥濈殑澹版槑 +jd_clear_field.cpp(271): warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1952): note: 鍙傝鈥淿snprintf鈥濈殑澹版槑 +jd_clear_field.cpp(283): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1183): note: 鍙傝鈥済etenv鈥濈殑澹版槑 +jd_clear_field.cpp(285): warning C4477: 鈥減rintf鈥: 鏍煎紡瀛楃涓测%s鈥濋渶瑕佺被鍨嬧渃har *鈥濈殑鍙傛暟锛屼絾鍙彉鍙傛暟 1 鎷ユ湁浜嗙被鍨嬧渃onst wchar_t *鈥 + jd_clear_field.cpp(285): note: 璇疯冭檻鍦ㄦ牸寮忓瓧绗︿覆涓娇鐢ㄢ%ls鈥 + jd_clear_field.cpp(285): note: 璇疯冭檻鍦ㄦ牸寮忓瓧绗︿覆涓娇鐢ㄢ%lls鈥 + jd_clear_field.cpp(285): note: 璇疯冭檻鍦ㄦ牸寮忓瓧绗︿覆涓娇鐢ㄢ%Ls鈥 + jd_clear_field.cpp(285): note: 璇疯冭檻鍦ㄦ牸寮忓瓧绗︿覆涓娇鐢ㄢ%ws鈥 +jd_clear_field.cpp(245): warning C4101: 鈥渞ev_attachments鈥: 鏈紩鐢ㄧ殑灞閮ㄥ彉閲 +jd_clear_field.cpp(244): warning C4101: 鈥渞ef_obj鈥: 鏈紩鐢ㄧ殑灞閮ㄥ彉閲 +jd_clear_field.cpp(242): warning C4101: 鈥渁ttach_type鈥: 鏈紩鐢ㄧ殑灞閮ㄥ彉閲 +jd_clear_field.cpp(492): warning C4101: 鈥渆rr_function鈥: 鏈紩鐢ㄧ殑灞閮ㄥ彉閲 +jd_clear_field.cpp(492): warning C4101: 鈥渆rr_string鈥: 鏈紩鐢ㄧ殑灞閮ㄥ彉閲 + jd_signoff.cpp +C:\work\include12_2\pom/pom/pom.h(806): warning C4819: 璇ユ枃浠跺寘鍚笉鑳藉湪褰撳墠浠g爜椤(936)涓〃绀虹殑瀛楃銆傝灏嗚鏂囦欢淇濆瓨涓 Unicode 鏍煎紡浠ラ槻姝㈡暟鎹涪澶 +C:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 璇ユ枃浠跺寘鍚笉鑳藉湪褰撳墠浠g爜椤(936)涓〃绀虹殑瀛楃銆傝灏嗚鏂囦欢淇濆瓨涓 Unicode 鏍煎紡浠ラ槻姝㈡暟鎹涪澶 +jd_signoff.cpp(80): warning C4267: 鈥滃垵濮嬪寲鈥: 浠庘渟ize_t鈥濊浆鎹㈠埌鈥渦int32_t鈥濓紝鍙兘涓㈠け鏁版嵁 +jd_signoff.cpp(213): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\time.h(505): note: 鍙傝鈥渓ocaltime鈥濈殑澹版槑 +jd_signoff.cpp(233): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1183): note: 鍙傝鈥済etenv鈥濈殑澹版槑 +jd_signoff.cpp(309): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1183): note: 鍙傝鈥済etenv鈥濈殑澹版槑 +jd_signoff.cpp(209): warning C4101: 鈥渧erdict鈥: 鏈紩鐢ㄧ殑灞閮ㄥ彉閲 +jd_signoff.cpp(227): warning C4101: 鈥渞ev_attachments鈥: 鏈紩鐢ㄧ殑灞閮ㄥ彉閲 +jd_signoff.cpp(226): warning C4101: 鈥渞ef_obj鈥: 鏈紩鐢ㄧ殑灞閮ㄥ彉閲 +jd_signoff.cpp(224): warning C4101: 鈥渁ttach_type鈥: 鏈紩鐢ㄧ殑灞閮ㄥ彉閲 + util.cpp +c1xx : fatal error C1083: 鏃犳硶鎵撳紑婧愭枃浠: 鈥渦til.cpp鈥: No such file or directory + 姝e湪鐢熸垚浠g爜... +c:\java\jdk1.8.0_231\include\jni.h(1442): warning C4793: 鈥淛NIEnv_::CallStaticIntMethod鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + /clr 涓嬩笉鏀寔 varargs +c:\java\jdk1.8.0_231\include\jni.h(1445): warning C4793: 鈥淛NIEnv_::CallStaticIntMethod鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + 鎵樼浠g爜涓彂鐜颁竴涓笉鍙楁敮鎸佺殑鍐呴儴鍑芥暟 +c:\java\jdk1.8.0_231\include\jni.h(1447): warning C4793: 鈥淛NIEnv_::CallStaticIntMethod鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + 鎵樼浠g爜涓彂鐜颁竴涓笉鍙楁敮鎸佺殑鍐呴儴鍑芥暟 +c:\java\jdk1.8.0_231\include\jni.h(1352): warning C4793: 鈥淛NIEnv_::CallStaticObjectMethod鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + /clr 涓嬩笉鏀寔 varargs +c:\java\jdk1.8.0_231\include\jni.h(1355): warning C4793: 鈥淛NIEnv_::CallStaticObjectMethod鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + 鎵樼浠g爜涓彂鐜颁竴涓笉鍙楁敮鎸佺殑鍐呴儴鍑芥暟 +c:\java\jdk1.8.0_231\include\jni.h(1357): warning C4793: 鈥淛NIEnv_::CallStaticObjectMethod鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + 鎵樼浠g爜涓彂鐜颁竴涓笉鍙楁敮鎸佺殑鍐呴儴鍑芥暟 +c:\java\jdk1.8.0_231\include\jni.h(868): warning C4793: 鈥淛NIEnv_::NewObject鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + /clr 涓嬩笉鏀寔 varargs +c:\java\jdk1.8.0_231\include\jni.h(871): warning C4793: 鈥淛NIEnv_::NewObject鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + 鎵樼浠g爜涓彂鐜颁竴涓笉鍙楁敮鎸佺殑鍐呴儴鍑芥暟 +c:\java\jdk1.8.0_231\include\jni.h(873): warning C4793: 鈥淛NIEnv_::NewObject鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + 鎵樼浠g爜涓彂鐜颁竴涓笉鍙楁敮鎸佺殑鍐呴儴鍑芥暟 +c:\java\jdk1.8.0_231\include\jni.h(1051): warning C4793: 鈥淛NIEnv_::CallVoidMethod鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + /clr 涓嬩笉鏀寔 varargs +c:\java\jdk1.8.0_231\include\jni.h(1053): warning C4793: 鈥淛NIEnv_::CallVoidMethod鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + 鎵樼浠g爜涓彂鐜颁竴涓笉鍙楁敮鎸佺殑鍐呴儴鍑芥暟 +c:\java\jdk1.8.0_231\include\jni.h(1055): warning C4793: 鈥淛NIEnv_::CallVoidMethod鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + 鎵樼浠g爜涓彂鐜颁竴涓笉鍙楁敮鎸佺殑鍐呴儴鍑芥暟 +c:\work\vs_workspace\jditk\hezon_itk\jd_clear_field.cpp(468): warning C4793: 鈥淛D_Revise_clear鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + 鎵樼浠g爜涓彂鐜颁竴涓笉鍙楁敮鎸佺殑鍐呴儴鍑芥暟 +c:\work\vs_workspace\jditk\hezon_itk\jd_clear_field.cpp(469): warning C4793: 鈥淛D_Revise_clear鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + 鎵樼浠g爜涓彂鐜颁竴涓笉鍙楁敮鎸佺殑鍐呴儴鍑芥暟 +c:\java\jdk1.8.0_231\include\jni.h(1442): warning C4793: 鈥淛NIEnv_::CallStaticIntMethod鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + /clr 涓嬩笉鏀寔 varargs +c:\java\jdk1.8.0_231\include\jni.h(1445): warning C4793: 鈥淛NIEnv_::CallStaticIntMethod鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + 鎵樼浠g爜涓彂鐜颁竴涓笉鍙楁敮鎸佺殑鍐呴儴鍑芥暟 +c:\java\jdk1.8.0_231\include\jni.h(1447): warning C4793: 鈥淛NIEnv_::CallStaticIntMethod鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + 鎵樼浠g爜涓彂鐜颁竴涓笉鍙楁敮鎸佺殑鍐呴儴鍑芥暟 +c:\java\jdk1.8.0_231\include\jni.h(1352): warning C4793: 鈥淛NIEnv_::CallStaticObjectMethod鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + /clr 涓嬩笉鏀寔 varargs +c:\java\jdk1.8.0_231\include\jni.h(1355): warning C4793: 鈥淛NIEnv_::CallStaticObjectMethod鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + 鎵樼浠g爜涓彂鐜颁竴涓笉鍙楁敮鎸佺殑鍐呴儴鍑芥暟 +c:\java\jdk1.8.0_231\include\jni.h(1357): warning C4793: 鈥淛NIEnv_::CallStaticObjectMethod鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + 鎵樼浠g爜涓彂鐜颁竴涓笉鍙楁敮鎸佺殑鍐呴儴鍑芥暟 +c:\java\jdk1.8.0_231\include\jni.h(868): warning C4793: 鈥淛NIEnv_::NewObject鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + /clr 涓嬩笉鏀寔 varargs +c:\java\jdk1.8.0_231\include\jni.h(871): warning C4793: 鈥淛NIEnv_::NewObject鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + 鎵樼浠g爜涓彂鐜颁竴涓笉鍙楁敮鎸佺殑鍐呴儴鍑芥暟 +c:\java\jdk1.8.0_231\include\jni.h(873): warning C4793: 鈥淛NIEnv_::NewObject鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + 鎵樼浠g爜涓彂鐜颁竴涓笉鍙楁敮鎸佺殑鍐呴儴鍑芥暟 +c:\java\jdk1.8.0_231\include\jni.h(1051): warning C4793: 鈥淛NIEnv_::CallVoidMethod鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + /clr 涓嬩笉鏀寔 varargs +c:\java\jdk1.8.0_231\include\jni.h(1053): warning C4793: 鈥淛NIEnv_::CallVoidMethod鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + 鎵樼浠g爜涓彂鐜颁竴涓笉鍙楁敮鎸佺殑鍐呴儴鍑芥暟 +c:\java\jdk1.8.0_231\include\jni.h(1055): warning C4793: 鈥淛NIEnv_::CallVoidMethod鈥: 缂栬瘧涓烘湰鏈虹殑鍑芥暟: + 鎵樼浠g爜涓彂鐜颁竴涓笉鍙楁敮鎸佺殑鍐呴儴鍑芥暟 diff --git a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/CL.command.1.tlog b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/CL.command.1.tlog index 01164a2..f696c9e 100644 Binary files a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/CL.command.1.tlog and b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/CL.command.1.tlog differ diff --git a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/CL.read.1.tlog b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/CL.read.1.tlog index 3d709df..34fd129 100644 Binary files a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/CL.read.1.tlog and b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/CL.read.1.tlog differ diff --git a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/CL.write.1.tlog b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/CL.write.1.tlog index 3afb927..436ea85 100644 Binary files a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/CL.write.1.tlog and b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/CL.write.1.tlog differ diff --git a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/HEZON_ITK.lastbuildstate b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/HEZON_ITK.lastbuildstate index bbd4578..40d650d 100644 --- a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/HEZON_ITK.lastbuildstate +++ b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/HEZON_ITK.lastbuildstate @@ -1,2 +1,2 @@ #TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=true:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 -Release|x64|C:\Users\lyf\Documents\code\dk\HEZON_ITK\| +Release|x64|C:\work\vs_workspace\jditk\| diff --git a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/HEZON_ITK.write.1u.tlog b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/HEZON_ITK.write.1u.tlog index 76a75e0..46b134b 100644 Binary files a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/HEZON_ITK.write.1u.tlog and b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/HEZON_ITK.write.1u.tlog differ diff --git a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/link.command.1.tlog b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/link.command.1.tlog index 8dce240..f72c52c 100644 Binary files a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/link.command.1.tlog and b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/link.command.1.tlog differ diff --git a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/link.read.1.tlog b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/link.read.1.tlog index 3cc75cd..0a1ccb1 100644 Binary files a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/link.read.1.tlog and b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/link.read.1.tlog differ diff --git a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/link.write.1.tlog b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/link.write.1.tlog index c593770..2c3b60a 100644 Binary files a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/link.write.1.tlog and b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/link.write.1.tlog differ diff --git a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/metagen.read.1.tlog b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/metagen.read.1.tlog index 98364f4..4b2611d 100644 Binary files a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/metagen.read.1.tlog and b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/metagen.read.1.tlog differ diff --git a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/metagen.write.1.tlog b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/metagen.write.1.tlog index 3fdb089..b11839e 100644 Binary files a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/metagen.write.1.tlog and b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/metagen.write.1.tlog differ diff --git a/HEZON_ITK/x64/Release/HEZON_ITK.vcxprojResolveAssemblyReference.cache b/HEZON_ITK/x64/Release/HEZON_ITK.vcxprojResolveAssemblyReference.cache index da11e84..a28f1dc 100644 Binary files a/HEZON_ITK/x64/Release/HEZON_ITK.vcxprojResolveAssemblyReference.cache and b/HEZON_ITK/x64/Release/HEZON_ITK.vcxprojResolveAssemblyReference.cache differ diff --git a/HEZON_ITK/x64/Release/vc140.pdb b/HEZON_ITK/x64/Release/vc140.pdb index 560b262..4d4c630 100644 Binary files a/HEZON_ITK/x64/Release/vc140.pdb and b/HEZON_ITK/x64/Release/vc140.pdb differ diff --git a/x64/Release/HEZON_ITK.pdb b/x64/Release/HEZON_ITK.pdb index 56656e1..55681ab 100644 Binary files a/x64/Release/HEZON_ITK.pdb and b/x64/Release/HEZON_ITK.pdb differ diff --git a/x64/Release/bs.exp b/x64/Release/bs.exp index 0a0e012..46176db 100644 Binary files a/x64/Release/bs.exp and b/x64/Release/bs.exp differ