|
|
@ -166,8 +166,8 @@ int bs_sap_material(EPM_action_message_t msg) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void get_bom(System::Collections::Generic::List<System::Collections::Generic::Dictionary<String^, String^>^> ^a_list,tag_t line,char *werks,char *stlan,string pid, tag_t relation_type,boolean is_hl,boolean is_judge,vector<string> &bom_ids)
|
|
|
|
void get_bom(System::Collections::Generic::List<System::Collections::Generic::Dictionary<String^, String^>^> ^a_list, tag_t line, char *werks, char *stlan, string pid, tag_t relation_type, boolean is_hl, boolean is_judge, vector<string> &bom_ids) {
|
|
|
|
{ int line_cnt;
|
|
|
|
int line_cnt;
|
|
|
|
tag_t *lines;
|
|
|
|
tag_t *lines;
|
|
|
|
BOM_line_ask_child_lines(line, &line_cnt, &lines);
|
|
|
|
BOM_line_ask_child_lines(line, &line_cnt, &lines);
|
|
|
|
char *id;
|
|
|
|
char *id;
|
|
|
@ -175,8 +175,7 @@ void get_bom(System::Collections::Generic::List<System::Collections::Generic::Di
|
|
|
|
if (find(bom_ids.begin(), bom_ids.end(), id) != bom_ids.end())
|
|
|
|
if (find(bom_ids.begin(), bom_ids.end(), id) != bom_ids.end())
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
bom_ids.push_back(id);
|
|
|
|
bom_ids.push_back(id);
|
|
|
|
if(a_list->Count==0)
|
|
|
|
if (a_list->Count == 0) {
|
|
|
|
{
|
|
|
|
|
|
|
|
pid = pid.length() > 0 ? pid : id; int index = pid.find('-');
|
|
|
|
pid = pid.length() > 0 ? pid : id; int index = pid.find('-');
|
|
|
|
if (index != -1)
|
|
|
|
if (index != -1)
|
|
|
|
pid = pid.substr(0, index);
|
|
|
|
pid = pid.substr(0, index);
|
|
|
@ -219,8 +218,8 @@ void get_bom(System::Collections::Generic::List<System::Collections::Generic::Di
|
|
|
|
AOM_ask_value_string(lines[j], "JD2_sl", &val);
|
|
|
|
AOM_ask_value_string(lines[j], "JD2_sl", &val);
|
|
|
|
quantity = val;
|
|
|
|
quantity = val;
|
|
|
|
int index = quantity.find('.');
|
|
|
|
int index = quantity.find('.');
|
|
|
|
if(index!=-1&&quantity.length()>(index + 4))
|
|
|
|
if (index != -1 && quantity.length() > (index + 4)) {
|
|
|
|
{ quantity = quantity.substr(0,index + 4);
|
|
|
|
quantity = quantity.substr(0, index + 4);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
AOM_ask_value_string(lines[j], "bl_quantity", &val);
|
|
|
|
AOM_ask_value_string(lines[j], "bl_quantity", &val);
|
|
|
@ -325,10 +324,9 @@ int bs_sap_bom(EPM_action_message_t msg) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
printf("has _99:%d\n", has_99);
|
|
|
|
printf("has _99:%d\n", has_99);
|
|
|
|
vector<string> bom_ids;
|
|
|
|
vector<string> bom_ids;
|
|
|
|
for (int i = 0; i < att_count; i++)
|
|
|
|
for (int i = 0; i < att_count; i++) {
|
|
|
|
{
|
|
|
|
if (isTypeOf(attachments[i], "PSBOMViewRevision")) {
|
|
|
|
if (isTypeOf(attachments[i], "PSBOMViewRevision"))
|
|
|
|
printf("execute\n");
|
|
|
|
{ printf("execute\n");
|
|
|
|
|
|
|
|
int rel_cnt, line_cnt;
|
|
|
|
int rel_cnt, line_cnt;
|
|
|
|
System::Collections::Generic::List<System::Collections::Generic::Dictionary<String^, String^>^> ^a_list = gcnew System::Collections::Generic::List<System::Collections::Generic::Dictionary<String^, String^>^>();
|
|
|
|
System::Collections::Generic::List<System::Collections::Generic::Dictionary<String^, String^>^> ^a_list = gcnew System::Collections::Generic::List<System::Collections::Generic::Dictionary<String^, String^>^>();
|
|
|
|
tag_t top_line, *lines, rev, *rels;
|
|
|
|
tag_t top_line, *lines, rev, *rels;
|
|
|
@ -344,10 +342,9 @@ int bs_sap_bom(EPM_action_message_t msg) {
|
|
|
|
if (find(bom_ids.begin(), bom_ids.end(), id) != bom_ids.end())
|
|
|
|
if (find(bom_ids.begin(), bom_ids.end(), id) != bom_ids.end())
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
|
|
if(has_99)
|
|
|
|
if (has_99) {
|
|
|
|
{
|
|
|
|
if (id[0] != '9' || id[1] != '9') {
|
|
|
|
if (id[0] != '9' || id[1] != '9')
|
|
|
|
printf("not 99:%s\n", id);
|
|
|
|
{ printf("not 99:%s\n", id);
|
|
|
|
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|