diff --git a/HEZON_ITK/HEZON_ITK.vcxproj b/HEZON_ITK/HEZON_ITK.vcxproj
index 86a3f0c..9095cbf 100644
--- a/HEZON_ITK/HEZON_ITK.vcxproj
+++ b/HEZON_ITK/HEZON_ITK.vcxproj
@@ -129,7 +129,11 @@
true
true
WIN32;NDEBUG;_CONSOLE;IPLIB=none;%(PreprocessorDefinitions)
+<<<<<<< HEAD
D:\work\include12_2;D:\work\include_cpp12_2;C:\Java\jdk1.8.0_231\include\win32;C:\Java\jdk1.8.0_231\include;%(AdditionalIncludeDirectories)
+=======
+ C:\Users\lyf\Documents\tclib\include;C:\Users\lyf\Documents\tclib\include_cpp;C:\Program Files\Java\jdk1.8.0_212\include\win32;C:\Program Files\Java\jdk1.8.0_212\include;%(AdditionalIncludeDirectories)
+>>>>>>> 75d75317d3feeaf219ba70fbc3430469d70d2d05
Cdecl
@@ -139,7 +143,11 @@
true
+<<<<<<< HEAD
D:\work\lib12_2\*.lib;%(AdditionalDependencies)
+=======
+ C:\Users\lyf\Documents\tclib\tc12\lib\*.lib;%(AdditionalDependencies)
+>>>>>>> 75d75317d3feeaf219ba70fbc3430469d70d2d05
libuser_exits.ar.lib;%(IgnoreSpecificDefaultLibraries)
$(OutDir)\bs.dll
/FORCE %(AdditionalOptions)
diff --git a/HEZON_ITK/HEZON_ITK.vcxproj.filters b/HEZON_ITK/HEZON_ITK.vcxproj.filters
index dc99b6d..f88c1fb 100644
--- a/HEZON_ITK/HEZON_ITK.vcxproj.filters
+++ b/HEZON_ITK/HEZON_ITK.vcxproj.filters
@@ -73,9 +73,12 @@
epm-handler
+<<<<<<< HEAD
epm-handler
+=======
+>>>>>>> 75d75317d3feeaf219ba70fbc3430469d70d2d05
diff --git a/HEZON_ITK/bs_bom_save_check.cpp b/HEZON_ITK/bs_bom_save_check.cpp
index 7631a4d..727e941 100644
--- a/HEZON_ITK/bs_bom_save_check.cpp
+++ b/HEZON_ITK/bs_bom_save_check.cpp
@@ -1,6 +1,6 @@
#include "util.h"
-int save_judge(tag_t top, string &check, string &name, vector &type_vec, vector &quantity_type_vec, stringstream &ss)
+void save_judge(tag_t top, string &check, string &name, vector &type_vec, vector &quantity_type_vec, stringstream &ss, stringstream &status_ss)
{
int line_cnt;
tag_t *lines;
@@ -29,14 +29,11 @@ int save_judge(tag_t top, string &check, string &name, vector &type_vec,
if (temp.length() == 0 || check.find(temp) != -1)
{
AOM_ask_value_string(lines[i], "bl_rev_object_string", &val);
- name = val;
- return 1;
+ status_ss << val << ",";
}
- int result = save_judge(lines[i], check, name, type_vec, quantity_type_vec, ss);
- if (result)
- return result;
+ save_judge(lines[i], check, name, type_vec, quantity_type_vec, ss,status_ss);
+
}
- return 0;
}
int bs_bom_save_check(METHOD_message_t *msg, va_list args)
@@ -53,7 +50,7 @@ int bs_bom_save_check(METHOD_message_t *msg, va_list args)
tag_t win = va_arg(args, tag_t), top;
char *check_val, **type_val, **quantity_type;
string name, check;
- stringstream ss;
+ stringstream ss,status_ss;
int type_cnt, quantity_type_cnt;
PREF_ask_char_value("connor_bom_check_value", 0, &check_val);
PREF_ask_char_values("connor_bom_check_type", &type_cnt, &type_val);
@@ -63,14 +60,15 @@ int bs_bom_save_check(METHOD_message_t *msg, va_list args)
check = check_val;
BOM_ask_window_top_line(win, &top);
- ifail = save_judge(top, check, name, type_vec, quantity_type_vec, ss);
+ save_judge(top, check, name, type_vec, quantity_type_vec, ss, status_ss);
if (ss.str().length())
{
ss << "物料数量为空,请填写!\n";
- ifail = 2;
+ ifail = 1;
}
- else if (ifail) {
- ss << name << "对象为冻结状态或未发布,不能保存BOM!";
+ if (status_ss.str().length()) {
+ ss << status_ss.str() << "对象为冻结状态或未发布,不能保存BOM!\n";
+ ifail = 1;
}
if (ss.str().length())
EMH_store_error_s1(EMH_severity_user_error, EMH_PROP_error_base, ss.str().c_str());
diff --git a/HEZON_ITK/bs_sap.cpp b/HEZON_ITK/bs_sap.cpp
index c5e3d77..7048af5 100644
--- a/HEZON_ITK/bs_sap.cpp
+++ b/HEZON_ITK/bs_sap.cpp
@@ -91,11 +91,26 @@ int bs_sap_material(EPM_action_message_t msg)
printf("start111\n");
for (int i = 0; i < att_count; i++)
{
- if (isTypeOf(attachments[i], "ItemRevision"))
+ if (isTypeOf(attachments[i], "Form"))
{
- int rel_cnt;
- tag_t *rels;
- GRM_list_secondary_objects_only(attachments[i], relation_type, &rel_cnt, &rels);
+ int rel_cnt,*levels;
+ tag_t *rels,rev=NULLTAG,form;
+ char **relations;
+ form = attachments[i];
+ WSOM_where_referenced2(form, 1, &rel_cnt, &levels, &rels, &relations);
+ for(int j=0;j ^dic = gcnew System::Collections::Generic::Dictionary();
for (auto j = prop_map.begin(); j != prop_map.end(); j++)
{
@@ -103,35 +118,35 @@ int bs_sap_material(EPM_action_message_t msg)
string temp_val;
if (j->second == "item_id")
{
- AOM_ask_value_string(attachments[i], j->second.c_str(), &val);
+ AOM_ask_value_string(rev, j->second.c_str(), &val);
temp_val = val;
}
else if (j->second == "release_status_list") {
int status_cnt;
tag_t *rel_status;
- AOM_ask_value_tags(rels[0], j->second.c_str(), &status_cnt, &rel_status);
+ AOM_ask_value_tags(form, j->second.c_str(), &status_cnt, &rel_status);
if (status_cnt)
AOM_UIF_ask_value(rel_status[status_cnt - 1], "object_string", &val);
temp_val = rel_map[val];
}else if(j->second=="jd2_dldw")
{
- AOM_UIF_ask_value(rels[0], j->second.c_str(), &val);
+ AOM_UIF_ask_value(form, j->second.c_str(), &val);
temp_val = val;
}
else
{
tag_t lov;
- AOM_ask_lov(rels[0], j->second.c_str(), &lov);
+ AOM_ask_lov(form, j->second.c_str(), &lov);
if (lov)
- AOM_ask_value_string(rels[0], j->second.c_str(), &val);
+ AOM_ask_value_string(form, j->second.c_str(), &val);
else
- AOM_UIF_ask_value(rels[0], j->second.c_str(), &val);
+ AOM_UIF_ask_value(form, j->second.c_str(), &val);
temp_val = val;
}
dic[convert_to_cstring(j->first.c_str())] = convert_to_cstring(temp_val.c_str());
}
tag_t class_obj;
- ICS_ask_classification_object(attachments[i], &class_obj);
+ ICS_ask_classification_object(rev, &class_obj);
if (class_obj)
{
char ***vals;
@@ -155,7 +170,7 @@ int bs_sap_material(EPM_action_message_t msg)
if(result.length()&&result[0]=='E')
{
char *val;
- AOM_ask_value_string(attachments[i], "item_id", &val);
+ AOM_ask_value_string(rev, "item_id", &val);
stringstream err;
err << val << " 发送错误:" << result;
EMH_store_error_s1(EMH_severity_error, EMH_ATTR_error_base, err.str().c_str());
@@ -172,7 +187,7 @@ 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)
+void get_bom(System::Collections::Generic::List^> ^a_list,tag_t line,char *werks,char *stlan,string pid, tag_t relation_type)
{
int line_cnt;
tag_t *lines;
@@ -182,7 +197,7 @@ void get_bom(System::Collections::Generic::List ^dic = gcnew System::Collections::Generic::Dictionary();
- dic["MATNR"] = convert_to_cstring(id);
+ dic["MATNR"] = convert_to_cstring(pid.length()>0?pid.c_str():id);
dic["WERKS"] = convert_to_cstring(werks);
dic["STLAN"] = convert_to_cstring(stlan);
dic["BMENG"] = "1";
@@ -199,8 +214,33 @@ void get_bom(System::Collections::Generic::ListAdd(dic);
+ continue;
+ }
a_list->Add(dic);
- get_bom(a_list, lines[j], werks, stlan);
+
+ get_bom(a_list, lines[j], werks, stlan,"",relation_type);
}
}
@@ -252,7 +292,7 @@ int bs_sap_bom(EPM_action_message_t msg)
if (tc_strlen(werks)==0||tc_strlen(stlan)==0)
continue;
- get_bom(a_list, top_line, werks, stlan);
+ get_bom(a_list, top_line, werks, stlan,"", relation_type);
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/bs_wl_check.cpp b/HEZON_ITK/bs_wl_check.cpp
index 8bc1da6..6e00983 100644
--- a/HEZON_ITK/bs_wl_check.cpp
+++ b/HEZON_ITK/bs_wl_check.cpp
@@ -3,8 +3,10 @@
int bs_wl_check(EPM_rule_message_t msg)
{
int ifail = EPM_go, att_count, tag_cnt,form_cnt;
- tag_t rootTask, *attachments, win, top, *tags,*forms;
+ tag_t rootTask, *attachments, *tags,*forms;
char *val;
+ stringstream ss,name_ss;
+
EPM_ask_root_task(msg.task, &rootTask);
EPM_ask_attachments(rootTask, EPM_target_attachment, &att_count, &attachments);
@@ -68,7 +70,6 @@ int bs_wl_check(EPM_rule_message_t msg)
AOM_ask_value_tags(attachments[i], paras["relation"].c_str(), &tag_cnt, &tags);
printf("relation :%s\n, length:%d\n", paras["relation"].c_str(), tag_cnt);
pass = false;
-
for(int j=0;j