diff --git a/.gitignore b/.gitignore index 3079a69..38ab227 100644 --- a/.gitignore +++ b/.gitignore @@ -369,3 +369,9 @@ ASALocalRun/ HEZON_ITK/x64/ HEZON_ITK/HEZON_ITK.vcxproj HEZON_ITK/HEZON_ITK.vcxproj.filters +HEZON_ITK/bs_sap.cpp.orig +HEZON_ITK/epm_handler_common.h.orig +HEZON_ITK/epm_register_handler.cxx.orig +HEZON_ITK/HEZON_ITK.vcxproj.filters~9cec5b3be0639e60437e0ba1a3035139d8301c0a +HEZON_ITK/HEZON_ITK.vcxproj~9cec5b3be0639e60437e0ba1a3035139d8301c0a +HEZON_ITK/jd_check_wlms_len.cpp.orig diff --git a/HEZON_ITK/HEZON_ITK.vcxproj b/HEZON_ITK/HEZON_ITK.vcxproj new file mode 100644 index 0000000..a711b74 --- /dev/null +++ b/HEZON_ITK/HEZON_ITK.vcxproj @@ -0,0 +1,199 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {8E665218-4AC2-4DDD-A50E-4245BA64C3C3} + Win32Proj + HEZON_ITK + 8.1 + + + + Application + true + Unicode + v140 + + + Application + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + DynamicLibrary + false + false + Unicode + false + v140 + true + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;IPLIB=none;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + Cdecl + + + Console + true + true + true + Ws2_32.lib;%(AdditionalDependencies) + libuser_exits.ar.lib;%(IgnoreSpecificDefaultLibraries) + $(OutDir)\bs.dll + /FORCE %(AdditionalOptions) + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 + + + + + \ No newline at end of file diff --git a/HEZON_ITK/HEZON_ITK.vcxproj.filters b/HEZON_ITK/HEZON_ITK.vcxproj.filters new file mode 100644 index 0000000..ea59700 --- /dev/null +++ b/HEZON_ITK/HEZON_ITK.vcxproj.filters @@ -0,0 +1,125 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {d25e0aa0-8791-4277-b392-abc3943f925c} + + + {f8d4fa90-4363-4e0f-8f44-a2e02a224ad9} + + + {5f8496b0-ad7e-4c6c-b832-59575601b9f1} + + + {aa5fbb6b-b5ee-4f80-8b16-de99d912a542} + + + + + + + + + + epm-handler + + + epm-handler + + + common + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + epm-handler + + + \ No newline at end of file diff --git a/HEZON_ITK/bs_bom_check.cpp b/HEZON_ITK/bs_bom_check.cpp index 9c8c0fc..4e89cb4 100644 --- a/HEZON_ITK/bs_bom_check.cpp +++ b/HEZON_ITK/bs_bom_check.cpp @@ -53,6 +53,7 @@ int bs_bom_check(EPM_rule_message_t msg) { pass = true; break; + } } if (!pass) diff --git a/HEZON_ITK/bs_sap.cpp b/HEZON_ITK/bs_sap.cpp index d31e49a..00b6e58 100644 --- a/HEZON_ITK/bs_sap.cpp +++ b/HEZON_ITK/bs_sap.cpp @@ -166,15 +166,18 @@ int bs_sap_material(EPM_action_message_t msg) { } -void get_bom(System::Collections::Generic::List^> ^a_list, tag_t line, char *werks, char *stlan, string pid, tag_t relation_type, boolean is_hl, boolean is_judge) { - int line_cnt; +void get_bom(System::Collections::Generic::List^> ^a_list,tag_t line,char *werks,char *stlan,string pid, tag_t relation_type,boolean is_hl,boolean is_judge,vector &bom_ids) +{ int line_cnt; tag_t *lines; BOM_line_ask_child_lines(line, &line_cnt, &lines); char *id; AOM_UIF_ask_value(line, "bl_item_item_id", &id); - if (a_list->Count == 0) { - pid = pid.length() > 0 ? pid : id; - int index = pid.find('-'); + if (find(bom_ids.begin(), bom_ids.end(), id) != bom_ids.end()) + return; + bom_ids.push_back(id); + if(a_list->Count==0) + { + pid = pid.length()>0?pid:id; int index = pid.find('-'); if (index != -1) pid = pid.substr(0,index); } @@ -260,7 +263,7 @@ void get_bom(System::Collections::Generic::List 0 ? pid : id, relation_type, child_is_hl, is_judge); +get_bom(a_list, lines[j], werks, stlan, pid.length()>0 ? pid : id, relation_type, child_is_hl, is_judge,bom_ids); continue; } // if (tc_strcmp(val1, "F") == 0 && tc_strlen(val2) == 0) @@ -271,7 +274,7 @@ void get_bom(System::Collections::Generic::ListAdd(dic); - get_bom(a_list, lines[j], werks, stlan, "", relation_type, child_is_hl, is_judge); +get_bom(a_list, lines[j], werks, stlan,"",relation_type, child_is_hl, is_judge,bom_ids); } } @@ -321,9 +324,11 @@ int bs_sap_bom(EPM_action_message_t msg) { } } printf("has _99:%d\n", has_99); - for (int i = 0; i < att_count; i++) { - if (isTypeOf(attachments[i], "PSBOMViewRevision")) { - printf("execute\n"); + vector bom_ids; + for (int i = 0; i < att_count; i++) + { + if (isTypeOf(attachments[i], "PSBOMViewRevision")) + { printf("execute\n"); int rel_cnt, line_cnt; System::Collections::Generic::List^> ^a_list = gcnew System::Collections::Generic::List^>(); tag_t top_line, *lines, rev, *rels; @@ -336,9 +341,13 @@ int bs_sap_bom(EPM_action_message_t msg) { continue; GRM_list_secondary_objects_only(rev, relation_type, &rel_cnt, &rels); AOM_ask_value_string(rev, "item_id", &id); - if (has_99) { - if (id[0] != '9' || id[1] != '9') { - printf("not 99:%s\n", id); + if (find(bom_ids.begin(), bom_ids.end(), id) != bom_ids.end()) + continue; + + if(has_99) + { + if (id[0] != '9' || id[1] != '9') + { printf("not 99:%s\n", id); continue; } @@ -353,7 +362,7 @@ int bs_sap_bom(EPM_action_message_t msg) { if (tc_strlen(werks) == 0 || tc_strlen(stlan) == 0) continue; boolean is_judege = id[0] == '9'&&id[1] == '9'; - get_bom(a_list, top_line, werks, stlan, "", relation_type, is_hl, is_judege); +get_bom(a_list, top_line, werks, stlan,"", relation_type,is_hl,is_judege,bom_ids); string result = ConvertToString(test->send_bom(url, user, password, a_list)); printf("result:%s\n", result.c_str()); if (result.length() && result[0] == 'E') { diff --git a/HEZON_ITK/epm_handler_common.h b/HEZON_ITK/epm_handler_common.h index 24063c2..b1aa232 100644 --- a/HEZON_ITK/epm_handler_common.h +++ b/HEZON_ITK/epm_handler_common.h @@ -53,6 +53,7 @@ extern "C" { int jd_send_mail(EPM_action_message_t msg); int jd_get_target(EPM_action_message_t msg); int jd_check_wlms_len(EPM_rule_message_t msg); +int jd_check_wlms_len(EPM_rule_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 5bbdcdc..410c0cb 100644 --- a/HEZON_ITK/epm_register_handler.cxx +++ b/HEZON_ITK/epm_register_handler.cxx @@ -165,8 +165,7 @@ extern DLLAPI int CUST_init_module(int *decision, va_list args) { printf("register jd_check_wlms_len failed\n"); } else { printf("register jd_check_wlms_len successfully\n"); - } - //if(ifail == ITK_ok) + } //if(ifail == ITK_ok) //{ // fprintf(stdout,"Registering action handler qtmc-sign-ir completed!\n"); //} diff --git a/HEZON_ITK/jd_check_wlms_len.cpp b/HEZON_ITK/jd_check_wlms_len.cpp index cff4d56..f183b30 100644 --- a/HEZON_ITK/jd_check_wlms_len.cpp +++ b/HEZON_ITK/jd_check_wlms_len.cpp @@ -1,5 +1,52 @@ #include "util.h" +int jd_check_wlms_len(EPM_rule_message_t msg) +{ + POM_AM__set_application_bypass(true); + tag_t root_task, *attachments; + int att_cnt; + EPM_ask_root_task(msg.task, &root_task); + //øµ + EPM_ask_attachments(root_task, EPM_target_attachment, &att_cnt,&attachments); + for (int i = 0; i < att_cnt; i++) + { + if (isTypeOf(attachments[i],"ItemRevision")) + { + int form_att; + tag_t *forms; + AOM_ask_value_tags(attachments[i], "IMAN_master_form_rev", &form_att, &forms); + if (form_att==0) + { + continue; + } + char *wlms; + AOM_ask_value_string(forms[0], "jd2_wlms", &wlms); + cout << "jd2_wlms" << wlms << endl; + int length=0; + for (int i = 0; wlms[i]!=0; i++) + { + if (wlms[i]<128&& wlms[i]>0) + { + length++; + } + else + { + i += 2; + length++; + } + } + cout << "length: " << length << endl; + if (length>40) + { + POM_AM__set_application_bypass(false); + return EMH_store_error_s1(EMH_severity_error, EMH_IDGENERATION_ERROR_BASE, "ַܳ40!!!"); + } + } + POM_AM__set_application_bypass(false); + return EPM_go; + } +}#include "util.h" + int jd_check_wlms_len(EPM_rule_message_t msg) { POM_AM__set_application_bypass(true); tag_t root_task, *attachments; 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 f924cf7..f31a3cf 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,8 @@ ; Listing generated by Microsoft (R) Optimizing Compiler Version 19.00.24215.1 ; Generated by VC++ for Common Language Runtime +<<<<<<< HEAD .file "C:\Users\5rKB5bPlusD\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cpp" +======= +.file "C:\Users\89512\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cpp" +>>>>>>> 9cec5b3be0639e60437e0ba1a3035139d8301c0a 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 7097f65..b61b304 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|E:\work\vs_workspace\jditk\| +Release|x64|C:\Users\89512\Documents\Visual Studio 2015\Projects\itk\|