|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
|
|
|
|
|
void judge_tag(tag_t tag,int index,vector<string> &vec,stringstream &name)
|
|
|
|
|
{
|
|
|
|
|
if(index==vec.size()-1)
|
|
|
|
|
if(index>=vec.size()-1)
|
|
|
|
|
{
|
|
|
|
|
char *val,*type;
|
|
|
|
|
AOM_ask_value_string(tag, "object_type", &type);
|
|
|
|
@ -38,20 +38,22 @@ void judge_tag(tag_t tag,int index,vector<string> &vec,stringstream &name)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int bs_test_release_check(EPM_rule_message_t msg)
|
|
|
|
|
int bs_test_release_check(EPM_action_message_t msg)
|
|
|
|
|
{
|
|
|
|
|
int ifail = EPM_go, att_count, tag_cnt, rel_cnt;
|
|
|
|
|
int ifail = ITK_ok, att_count, tag_cnt, rel_cnt;
|
|
|
|
|
tag_t rootTask, *attachments, win, top, *tags, tag,*rels;
|
|
|
|
|
char *val;
|
|
|
|
|
printf("begin bs_test_release_check\n");
|
|
|
|
|
EPM_ask_root_task(msg.task, &rootTask);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EPM_ask_attachments(rootTask, EPM_target_attachment, &att_count, &attachments);
|
|
|
|
|
TC_argument_list_t * arguments = msg.arguments;
|
|
|
|
|
int arg_cnt = TC_number_of_arguments(arguments), status = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
stringstream name;
|
|
|
|
|
// map<string, string> paras;
|
|
|
|
|
map<string, vector<string>> judge_map;
|
|
|
|
|
POM_AM__set_application_bypass(true);
|
|
|
|
|
for (auto i = 0; i<arg_cnt; i++)
|
|
|
|
|
{
|
|
|
|
|
char *temp_key, *temp_val;
|
|
|
|
@ -63,7 +65,7 @@ int bs_test_release_check(EPM_rule_message_t msg)
|
|
|
|
|
judge_map[temp[0]] = temp;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i<att_count; i++)
|
|
|
|
|
{
|
|
|
|
|
bool pass = true;
|
|
|
|
@ -74,13 +76,18 @@ int bs_test_release_check(EPM_rule_message_t msg)
|
|
|
|
|
{
|
|
|
|
|
judge_tag(attachments[i], 1, judge_map[type], name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (name.str().length()) {
|
|
|
|
|
ifail = EPM_nogo;
|
|
|
|
|
printf("has error\n");
|
|
|
|
|
|
|
|
|
|
ifail = 1;
|
|
|
|
|
name <<"未发布,请先审核发布!";
|
|
|
|
|
EMH_store_error_s1(EMH_severity_user_error, EMH_PROP_error_base, name.str().c_str());
|
|
|
|
|
EMH_store_error_s1(EMH_severity_warning, EMH_PROP_error_base, name.str().c_str());
|
|
|
|
|
}
|
|
|
|
|
POM_AM__set_application_bypass(false);
|
|
|
|
|
|
|
|
|
|
printf("end bs_test_release_check123\n");
|
|
|
|
|
|
|
|
|
|
return ifail;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|