You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.4 KiB
48 lines
1.4 KiB
#include "util.h"
|
|
|
|
int jd_rev_release(EPM_rule_message_t msg)
|
|
{
|
|
POM_AM__set_application_bypass(true);
|
|
tag_t root_task, *attachments, *boms, *xjxxds;
|
|
int att_cnt, bom_cnt, xjxxd_cnt;
|
|
char *object_string;
|
|
//获得根任务
|
|
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++)
|
|
{
|
|
AOM_ask_value_tags(attachments[i], "JD2_BGH", &xjxxd_cnt, &xjxxds);
|
|
//AOM_ask_value_tags(attachments[i], "FTH4xjxxdgx", &xjxxd_cnt, &xjxxds);
|
|
for (int i = 0; i < xjxxd_cnt; i++)
|
|
{
|
|
//零组件版本
|
|
if (isTypeOf(xjxxds[i], "ItemRevision"))
|
|
{
|
|
vector<tag_t> tags1(1, xjxxds[i]);
|
|
vector<int> types1(1, EPM_target_attachment);
|
|
EPM_add_attachments(root_task, 1, &tags1[0], &types1[0]);
|
|
AOM_ask_value_tags(xjxxds[i], "structure_revisions", &bom_cnt, &boms);
|
|
if (bom_cnt > 0)
|
|
{
|
|
//bom视图版本
|
|
for (int i = 0; i < bom_cnt; i++)
|
|
{
|
|
vector<tag_t> tags2(1, boms[i]);
|
|
vector<int> types2(1, EPM_target_attachment);
|
|
EPM_add_attachments(root_task, 1, &tags2[0], &types2[0]);
|
|
}
|
|
}
|
|
}
|
|
//版本表单
|
|
if (isTypeOf(xjxxds[i], "Form"))
|
|
{
|
|
vector<tag_t> tags3(1, xjxxds[i]);
|
|
vector<int> types3(1, EPM_target_attachment);
|
|
EPM_add_attachments(root_task, 1, &tags3[0], &types3[0]);
|
|
}
|
|
}
|
|
}
|
|
POM_AM__set_application_bypass(false);
|
|
return EPM_go;
|
|
} |