|
|
@ -71,7 +71,7 @@ int jd_add_attachments(EPM_action_message_t msg) {
|
|
|
|
ITK_ask_argument_named_value(TC_next_argument(arguments), &temp_key, &temp_val);
|
|
|
|
ITK_ask_argument_named_value(TC_next_argument(arguments), &temp_key, &temp_val);
|
|
|
|
paras[temp_key] = temp_val;
|
|
|
|
paras[temp_key] = temp_val;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const char *relation = paras["realtion"].c_str();
|
|
|
|
const char *relation = paras["relation"].c_str();
|
|
|
|
const char *item = paras["item"].c_str();
|
|
|
|
const char *item = paras["item"].c_str();
|
|
|
|
printf("relation:%s\n", relation);
|
|
|
|
printf("relation:%s\n", relation);
|
|
|
|
printf("item:%s\n", item);
|
|
|
|
printf("item:%s\n", item);
|
|
|
@ -81,14 +81,15 @@ int jd_add_attachments(EPM_action_message_t msg) {
|
|
|
|
for (int i = 0;i < att_cnt;i++) {
|
|
|
|
for (int i = 0;i < att_cnt;i++) {
|
|
|
|
char *att_type;
|
|
|
|
char *att_type;
|
|
|
|
AOM_ask_value_string(attachments[i], "object_type", &att_type);
|
|
|
|
AOM_ask_value_string(attachments[i], "object_type", &att_type);
|
|
|
|
if (tc_strcmp(att_type, "ItemRevision") == 0) {
|
|
|
|
printf("target type:%s\n",att_type);
|
|
|
|
|
|
|
|
if (tc_strcmp(att_type, "JD2_GTSYWTSRevision") == 0) {
|
|
|
|
tag_t *csjh;
|
|
|
|
tag_t *csjh;
|
|
|
|
int csjh_cnt;
|
|
|
|
int csjh_cnt;
|
|
|
|
AOM_ask_value_tags(attachments[i], relation, &csjh_cnt, &csjh);
|
|
|
|
AOM_ask_value_tags(attachments[i], relation, &csjh_cnt, &csjh);
|
|
|
|
for (int ii = 0;ii < csjh_cnt;ii++) {
|
|
|
|
for (int ii = 0;ii < csjh_cnt;ii++) {
|
|
|
|
char *item_type;
|
|
|
|
char *item_type;
|
|
|
|
AOM_ask_value_string(csjh[ii], "object_type", &item_type);
|
|
|
|
AOM_ask_value_string(csjh[ii], "object_type", &item_type);
|
|
|
|
printf("object_type:%s\n", item_type);
|
|
|
|
printf("csjh_type:%s\n", item_type);
|
|
|
|
if (tc_strcmp(item_type, item) == 0) {
|
|
|
|
if (tc_strcmp(item_type, item) == 0) {
|
|
|
|
tag_t *csjh_revs;
|
|
|
|
tag_t *csjh_revs;
|
|
|
|
int rev_cnt;
|
|
|
|
int rev_cnt;
|
|
|
|