diff --git a/HEZON_ITK.sdf b/HEZON_ITK.sdf
index cc25451..fe54876 100644
Binary files a/HEZON_ITK.sdf and b/HEZON_ITK.sdf differ
diff --git a/HEZON_ITK.suo b/HEZON_ITK.suo
index 6d3ee69..1289571 100644
Binary files a/HEZON_ITK.suo and b/HEZON_ITK.suo differ
diff --git a/HEZON_ITK.v11.suo b/HEZON_ITK.v11.suo
index 827ee6d..147cabe 100644
Binary files a/HEZON_ITK.v11.suo and b/HEZON_ITK.v11.suo differ
diff --git a/HEZON_ITK/HEZON_ITK.vcxproj b/HEZON_ITK/HEZON_ITK.vcxproj
index 54a825b..5851127 100644
--- a/HEZON_ITK/HEZON_ITK.vcxproj
+++ b/HEZON_ITK/HEZON_ITK.vcxproj
@@ -137,7 +137,7 @@
true
true
true
- Ws2_32.lib;%(AdditionalDependencies)
+ %(AdditionalDependencies)
libuser_exits.ar.lib;%(IgnoreSpecificDefaultLibraries)
$(OutDir)\bs.dll
/FORCE %(AdditionalOptions)
@@ -164,6 +164,7 @@
+
@@ -184,6 +185,7 @@
+
diff --git a/HEZON_ITK/HEZON_ITK.vcxproj.filters b/HEZON_ITK/HEZON_ITK.vcxproj.filters
index b669544..5968f2d 100644
--- a/HEZON_ITK/HEZON_ITK.vcxproj.filters
+++ b/HEZON_ITK/HEZON_ITK.vcxproj.filters
@@ -131,6 +131,12 @@
epm-handler
+
+ epm-handler
+
+
+ epm-handler
+
diff --git a/HEZON_ITK/Sample_confirmation_sheet.cpp b/HEZON_ITK/Sample_confirmation_sheet.cpp
new file mode 100644
index 0000000..63430c0
--- /dev/null
+++ b/HEZON_ITK/Sample_confirmation_sheet.cpp
@@ -0,0 +1,207 @@
+#include "util.h"
+
+
+int setTarget2(tag_t tag_task, tag_t tag_a) {
+ int ifail = ITK_ok;
+ int master_count = 0, count = 0;
+ int attachment_types = 0;
+
+ if (tag_a != NULL) {
+ AOM_unlock(tag_a);
+ attachment_types = EPM_target_attachment;
+
+ printf("开始将版本放入目标\n");
+ ITKCALL(EPM_add_attachments(tag_task, 1, &(tag_a), &attachment_types));
+ printf("结束将版本放入目标\n");
+
+ return ITK_ok;
+ }
+}
+
+int Sample_confirmation_sheet(EPM_rule_message_t msg) {
+
+ POM_AM__set_application_bypass(true);
+ tag_t root_task, * attachments;
+ int att_cnt;
+ //获得根节点
+ EPM_ask_root_task(msg.task, &root_task);
+ //获得根任务下的组件
+ EPM_ask_attachments(root_task, EPM_target_attachment, &att_cnt, &attachments);
+
+ //判断参数是否符合要求
+ char* object_string;
+ std::string names = "";
+ int bjNum = 0;
+ //遍历任务组件 TC_Is_Represented_By
+ for (int i = 0; i < att_cnt; i++) {
+ if (isTypeOf(attachments[i], "ItemRevision")) {
+ int object_att;
+ tag_t* object;
+ //得到零组件
+ AOM_ask_value_tags(attachments[i], "items_tag", &object_att, &object);
+ if (object_att == 0)
+ {
+ continue;
+ }
+ char* item_id;
+
+ int n_referencers;
+ int* levels;
+ tag_t* referencers;
+ char** relations;
+ //得到零组件的引用对象
+ WSOM_where_referenced(object[0], 1, &n_referencers, &levels, &referencers, &relations);
+
+ int itemRecision_att;
+ tag_t* itemRecision;
+ //得到引用对象的最新版本
+
+ AOM_ask_value_tags(referencers[0], "revision_list", &itemRecision_att, &itemRecision);
+ if (itemRecision_att <= 0) {
+ EMH_store_error_s1(EMH_severity_error, EMH_IDGENERATION_ERROR_BASE, "该清单没有关联物料!");
+ return EPM_nogo;
+ }
+ ////creation_date
+ //int dataNum;
+ //date_t* time;
+ //int index = 0;
+ //int prefTime = 0;
+ //int prefTimeDay = 0;
+ //int prefTimeHour = 0;
+ //int prefTimeMinute = 0;
+ //for (int j = 0; j < itemRecision_att; j++) {
+ // if (isTypeOf(itemRecision[j], "ItemRevision")) {
+
+ // AOM_ask_value_dates(itemRecision[j], "creation_date", &dataNum, &time);
+ // int createTime = time->year + time->month;
+ // if (createTime > prefTime) {
+ // prefTime = createTime;
+ // prefTimeDay = time->day;
+ // prefTimeHour = time->hour;
+ // prefTimeMinute = time->minute;
+ // index = j;
+ // }
+ // if (createTime == prefTime) {
+ // if (time->day > prefTimeDay) {
+ // prefTime = createTime;
+ // prefTimeDay = time->day;
+ // prefTimeHour = time->hour;
+ // prefTimeMinute = time->minute;
+ // index = j;
+ // }
+ // if (time->day == prefTimeDay) {
+ // if (time->hour > prefTimeHour) {
+ // prefTime = createTime;
+ // prefTimeDay = time->day;
+ // prefTimeHour = time->hour;
+ // prefTimeMinute = time->minute;
+ // index = j;
+ // }
+ // if (time->hour == prefTimeHour) {
+ // if (time->minute > prefTimeMinute) {
+ // prefTime = createTime;
+ // prefTimeDay = time->day;
+ // prefTimeHour = time->hour;
+ // prefTimeMinute = time->minute;
+ // index = j;
+ // }
+ // }
+ // }
+ // }
+
+ // }
+ //}
+ //新增物料,判断版本表单是否是待验证状态
+ if (itemRecision_att == 1) {
+ int form_att;
+ tag_t* forms;
+ AOM_ask_value_tags(itemRecision[0], "IMAN_master_form_rev", &form_att, &forms);
+ printf("form_att====>%d\n", form_att);
+ char* object_string;
+ int fb_att;
+ tag_t* fb;
+ AOM_ask_value_tags(forms[0], "release_status_list", &fb_att, &fb);
+ if (fb_att == 0) {
+ EMH_store_error_s1(EMH_severity_error, EMH_IDGENERATION_ERROR_BASE, "物料版本非待验证状态,请先走物料新增审批流程");
+ return EPM_nogo;
+ }
+ AOM_ask_value_string(fb[0], "object_string", &object_string);
+ printf("object_string====>%s\n", object_string);
+ if (strcmp(object_string, "待验证") != 0 && strcmp(object_string, "正式") != 0)
+ {
+ EMH_store_error_s1(EMH_severity_error, EMH_IDGENERATION_ERROR_BASE, "物料版本表单状态不是待待验证或正式,不允许发起流程");
+ return EPM_nogo;
+ }
+
+ }
+
+ //已经升版,判断上一版本是否已经发布
+ //if (itemRecision_att > 1) {
+ // int dataNum;
+ // date_t* time;
+ // AOM_ask_value_dates(itemRecision[index - 1], "date_released", &dataNum, &time);
+ // cout << "time1->year:" << time->year << endl;
+ // if (time->year == 0) {
+ // //没有发布
+ // EMH_store_error_s1(EMH_severity_error, EMH_IDGENERATION_ERROR_BASE, "请检查物料版本表单状态");
+ // return EPM_nogo;
+ // }
+ //}
+
+ int tz_att;
+ tag_t* tz;
+ //得到引用对象的版本关系 TC_Is_Represented_By 找到图纸对象
+ AOM_ask_value_tags(itemRecision[itemRecision_att-1], "TC_Is_Represented_By", &tz_att, &tz);
+ if (tz_att < 1) {
+ //没有图纸 date_released
+ bjNum = -1;
+ }
+ else {
+ int tzRelease_att;
+ tag_t* tzRelease;
+ //获取图纸对象的版本
+ AOM_ask_value_tags(tz[0], "revision_list", &tzRelease_att, &tzRelease);
+
+ int dataNum1;
+ date_t* time1;
+ //判断图纸对象的版本是否发布
+ AOM_ask_value_dates(tzRelease[tzRelease_att - 1], "date_released", &dataNum1, &time1);
+ printf("1=>\n");
+ //cout << "time1->year:" << time1->year << endl;
+ if (time1->year == 0) {
+ //没有发布
+ bjNum = -1;
+ printf("2=>\n");
+ }
+ else {
+ printf("3=>\n");
+ //将版本进行发布
+ /*tag_t release_status = NULL;
+ RELSTAT_create_release_status("TCM Released", &release_status);
+ RELSTAT_add_release_status(release_status, 1, &itemRecision[index], TRUE);*/
+
+ //记得开旁路
+ tag_t task_tag = NULLTAG,
+ root_task_tag = NULLTAG;
+ task_tag = msg.task;
+
+ setTarget2(root_task, itemRecision[itemRecision_att-1]);//将版本带入目标
+
+ }
+
+ }
+ }
+ }
+
+ if (bjNum == -1) {
+ char* message = "需要确认图纸存在并已发布!!";
+ cout << "Exception:" << message << endl;
+ EMH_store_error_s1(EMH_severity_error, EMH_IDGENERATION_ERROR_BASE, message);
+ return EPM_nogo;
+
+ }
+
+ POM_AM__set_application_bypass(false);
+ return EPM_go;
+
+}
\ No newline at end of file
diff --git a/HEZON_ITK/bs_bom_check.cpp b/HEZON_ITK/bs_bom_check.cpp
index 4e89cb4..12aa7c3 100644
--- a/HEZON_ITK/bs_bom_check.cpp
+++ b/HEZON_ITK/bs_bom_check.cpp
@@ -11,7 +11,7 @@ void judge(tag_t top,string &status,stringstream &ss)
AOM_UIF_ask_value(lines[j], "jd2_last_release_status", &val);
printf("status:%s\n", val);
string temp = val;
- if (temp.length()>0&&status.find(val) != -1)
+ if (temp.length()>0&&status.find(val) == -1)
{
AOM_ask_value_string(lines[j], "bl_rev_object_string", &val);
ss << val << ',';
@@ -68,7 +68,7 @@ int bs_bom_check(EPM_rule_message_t msg)
}
BOM_set_window_top_line(win, NULLTAG, attachments[i], NULLTAG, &top);
AOM_UIF_ask_value(top, "jd2_last_release_status", &val);
- if (tc_strlen(val) && paras["status"].find(val) != -1)
+ if (tc_strlen(val) && paras["status"].find(val) == -1)
{
AOM_ask_value_string(top, "bl_rev_object_string", &val);
ss << val << ',';
diff --git a/HEZON_ITK/bs_sap.cpp b/HEZON_ITK/bs_sap.cpp
index ab0ee0e..64476e2 100644
--- a/HEZON_ITK/bs_sap.cpp
+++ b/HEZON_ITK/bs_sap.cpp
@@ -97,6 +97,10 @@ int bs_sap_material(EPM_action_message_t msg) {
printf("revision get error\n");
continue;
}
+ char *idddd, *nameeee;
+ AOM_ask_value_string(rev, "item_id", &idddd);
+ AOM_ask_value_string(rev, "object_name", &nameeee);
+ printf("===>id=%s,name=%s\n", idddd, nameeee);
char* item_type;
AOM_ask_value_string(rev, "object_type", &item_type);
int pref_cnt;
@@ -162,10 +166,16 @@ int bs_sap_material(EPM_action_message_t msg) {
AOM_ask_value_string(form, "jd2_flbm", &temp);
cout << "class prop id 1069, jd2_flbm:" << temp << endl;
dic[convert_to_cstring(class_map[ids[j]].c_str())] = convert_to_cstring(temp);
+ printf("--------特殊1069------\n", ids[j]);
+ printf("value1:%s\n", convert_to_cstring(class_map[ids[j]].c_str()));
+ printf("value2:%s\n", convert_to_cstring(temp));
}
else {
if (val_count[j]) {
dic[convert_to_cstring(class_map[ids[j]].c_str())] = convert_to_cstring(vals[j][0]);
+ printf("--------------\n", ids[j]);
+ printf("value1:%s\n", convert_to_cstring(class_map[ids[j]].c_str()));
+ printf("value2:%s\n", convert_to_cstring(vals[j][0]));
}
}
}
diff --git a/HEZON_ITK/check_release_issus.cpp b/HEZON_ITK/check_release_issus.cpp
new file mode 100644
index 0000000..15c4f03
--- /dev/null
+++ b/HEZON_ITK/check_release_issus.cpp
@@ -0,0 +1,54 @@
+#include "util.h"
+
+int check_release_issus(EPM_rule_message_t msg) {
+
+ POM_AM__set_application_bypass(true);
+ tag_t root_task, * attachments;
+ int att_cnt;
+ //获得根节点
+ EPM_ask_root_task(msg.task, &root_task);
+ //获得根任务下的组件
+ EPM_ask_attachments(root_task, EPM_target_attachment, &att_cnt, &attachments);
+
+ //判断参数是否符合要求
+ char* object_string;
+ std::string names = "";
+ int bjNum = 0;
+ //遍历任务组件
+ for (int i = 0; i < att_cnt; i++) {
+ if (isTypeOf(attachments[i], "ItemRevision")) {
+ //判断版本属性 release_status_list (是否发布)
+ int release_att;
+ tag_t* release;
+ AOM_ask_value_tags(attachments[i], "release_status_list", &release_att, &release);
+ cout << "release_att:" << release_att << endl;
+ cout << "release:" << release << endl;
+ if (release_att >= 1) {
+ continue;
+ }
+ else {
+ //如果date_released没有,打一个标记,并记录所有没有的对象
+ bjNum = -1;
+ AOM_ask_value_string(attachments[i], "object_string", &object_string);
+ names.append(object_string);
+ names.append(";");
+ }
+
+ }
+ }
+
+ if (bjNum == -1) {
+ std::string massage = "物料/图纸当前版本未发布!";
+ names.append(massage);
+ const char* p = names.c_str();
+ cout << "Exception:" << p << endl;
+
+ EMH_store_error_s1(EMH_severity_error, EMH_IDGENERATION_ERROR_BASE, p);
+ return EPM_nogo;
+ }
+
+
+ POM_AM__set_application_bypass(false);
+ return EPM_go;
+
+}
\ No newline at end of file
diff --git a/HEZON_ITK/epm_handler_common.h b/HEZON_ITK/epm_handler_common.h
index 6047652..a5e6d91 100644
--- a/HEZON_ITK/epm_handler_common.h
+++ b/HEZON_ITK/epm_handler_common.h
@@ -64,6 +64,8 @@ extern "C" {
int jd_rev_release(EPM_rule_message_t msg);
int jd_prop_relate(METHOD_message_t *msg, va_list args);
int jd_splicing_task(EPM_action_message_t msg);
+ int check_release_issus(EPM_rule_message_t msg);
+ int Sample_confirmation_sheet(EPM_rule_message_t msg);
////锟斤拷锟斤拷锟斤拷锟斤拷息签锟斤拷姹撅拷锟斤拷锟斤拷锟饺
//int qtmc_sign_ir(EPM_action_message_t msg);
diff --git a/HEZON_ITK/epm_register_handler.cxx b/HEZON_ITK/epm_register_handler.cxx
index 4c94de2..e008013 100644
--- a/HEZON_ITK/epm_register_handler.cxx
+++ b/HEZON_ITK/epm_register_handler.cxx
@@ -270,6 +270,24 @@ extern DLLAPI int CUST_init_module(int *decision, va_list args) {
// fprintf(stdout , "Registering action handler qtmc-sign-ir failed %d!\n",ifail);
//}
+ ifail = EPM_register_rule_handler("check_release_issus", "check_release_issus",
+ (EPM_rule_handler_t)check_release_issus);
+ if (ifail) {
+ printf("register check_release_issus failed\n");
+ }
+ else {
+ printf("register check_release_issus successfully\n");
+ }
+
+ ifail = EPM_register_rule_handler("Sample_confirmation_sheet", "Sample_confirmation_sheet",
+ (EPM_rule_handler_t)Sample_confirmation_sheet);
+ if (ifail) {
+ printf("register Sample_confirmation_sheet failed\n");
+ }
+ else {
+ printf("register Sample_confirmation_sheet successfully\n");
+ }
+
return ifail;
}
//
diff --git a/HEZON_ITK/jd_auto_revise.cpp b/HEZON_ITK/jd_auto_revise.cpp
index cc7d78f..48f52a0 100644
--- a/HEZON_ITK/jd_auto_revise.cpp
+++ b/HEZON_ITK/jd_auto_revise.cpp
@@ -1,4 +1,7 @@
#include "util.h"
+#include
+#include
+
static void add_int_to_int_array(int add_int, int *n_int_array, int **int_array) {
int count = *n_int_array;
@@ -43,59 +46,68 @@ static void revise_item_revisions(int num_target_objs, tag_t *target_object_tags
for (int ii = 0; ii < num_target_objs; ii++) {
tag_t type_tag = NULLTAG;
+ //询问对象的类型。
TCTYPE_ask_object_type(target_object_tags[ii], &type_tag);
tag_t revise_input_tag = NULLTAG;
+ //为输入业务对象构造一个SaveAsInput对象。
+ //使用这个SaveAsInput对象来保存用于创建对象的输入数据。
TCTYPE_construct_operationinput(type_tag, TCTYPE_OPERATIONINPUT_REVISE, &revise_input_tag);
revise_input_tags[ii] = revise_input_tag;
printf("\nTarget Objects::\n");
int attached_object_count = 0;
tag_t *deepcopydata_tags = NULL;
+ //检索输入对象(正在进行的顶级对象)的DeepCopyData标记opvar指定的操作类型,如SaveAs或modify。
TCTYPE_ask_deepcopydata(target_object_tags[ii],
TCTYPE_OPERATIONINPUT_REVISE, &attached_object_count, &deepcopydata_tags);
tag_t last_object = NULLTAG;
for (int jj = 0; jj < attached_object_count; jj++) {
- AOM_ask_value_tag(deepcopydata_tags[jj], "targetObject",
- &object_tag);
+ //询问单值属性的值。
+ AOM_ask_value_tag(deepcopydata_tags[jj], "targetObject",&object_tag);
if (object_tag != last_object) {
+ //返回指定工作空间对象的对象ID。字符串是出现在工作区显示的对象列中的对象ID。
WSOM_ask_object_id_string(object_tag, &id_string);
+ //询问对象的类型。
TCTYPE_ask_object_type(object_tag, &type_tag);
+ //询问类型的名称。
TCTYPE_ask_name(type_tag, type_name);
printf("%s (%s)\n", id_string, type_name);
}
last_object = object_tag;
-
+ //询问单值属性的值。
AOM_ask_value_tag(deepcopydata_tags[jj], "attachedObject", &object_tag);
if (object_tag != NULLTAG) {
+ //返回指定工作空间对象的对象ID。字符串是出现在工作区显示的对象列中的对象ID。
WSOM_ask_object_id_string(object_tag, &id_string);
+ //询问对象的类型。
TCTYPE_ask_object_type(object_tag, &type_tag);
+ //询问类型的名称。
TCTYPE_ask_name(type_tag, type_name);
printf("attachedObject: %s (%s)\n", id_string, type_name);
}
}
if (attached_object_count > 0) {
- add_int_to_int_array(attached_object_count, &n_ints_in_list,
- &all_attached_object_count);
+ add_int_to_int_array(attached_object_count, &n_ints_in_list,&all_attached_object_count);
for (int jj = 0; jj < attached_object_count; jj++) {
- add_tag_to_tag_array(deepcopydata_tags[jj], &n_tags_in_list,
- &all_deepcopydata_tags);
+ add_tag_to_tag_array(deepcopydata_tags[jj], &n_tags_in_list,&all_deepcopydata_tags);
}
}
if (deepcopydata_tags) MEM_free(deepcopydata_tags);
}
-
+ //控件中的修改数据对指定的输入对象进行修改,属性和深度复制附加的对象,DeepCopyData提供。
TCTYPE_revise_objects(num_target_objs, target_object_tags,
revise_input_tags, all_attached_object_count, all_deepcopydata_tags,
&target_copy_tags, &ifails);
printf("\nNew Revisions:\n");
for (int ii = 0; ii < num_target_objs; ii++) {
-
- WSOM_ask_object_id_string(target_copy_tags[ii],
- &id_string);
+ //返回指定工作空间对象的对象ID。字符串是出现在工作区显示的对象列中的对象ID。
+ WSOM_ask_object_id_string(target_copy_tags[ii],&id_string);
+ //询问对象的类型。
TCTYPE_ask_object_type(target_copy_tags[ii], &type_tag);
+ //询问类型的名称。
TCTYPE_ask_name(type_tag, type_name);
if (ifails[ii] == ITK_ok) {
@@ -118,17 +130,93 @@ static void revise_item_revisions(int num_target_objs, tag_t *target_object_tags
if (id_string) MEM_free(id_string);
}
+static int grant_access(tag_t dataset_tag, tag_t user)
+{
+ int ifail = ITK_ok;
+ tag_t write_prev = NULLTAG;
+
+ ifail = AOM_refresh(dataset_tag, POM_modify_lock);
+ if (ifail != ITK_ok)
+ {
+ return ifail;
+ }
+
+ ifail = AM_find_privilege("WRITE", &write_prev);
+ if (ifail != ITK_ok)
+ {
+ AOM_unlock(dataset_tag);
+ return ifail;
+ }
+
+ ifail = AM_grant_privilege(dataset_tag, user, write_prev);//赋予写权限
+ if (ifail != ITK_ok)
+ {
+ AOM_unlock(dataset_tag);
+ return ifail;
+ }
+
+ ifail = AM_save_acl(dataset_tag);
+ if (ifail != ITK_ok)
+ {
+ AOM_unlock(dataset_tag);
+ return ifail;
+ }
+
+ ifail = AE_save_myself(dataset_tag);
+ if (ifail != ITK_ok)
+ {
+ AOM_unlock(dataset_tag);
+ return ifail;
+ }
+ return ifail;
+}
+
int jd_auto_revise(EPM_action_message_t msg) {
int att_cnt;
tag_t root_task, *attachments;
+ //获得根节点
EPM_ask_root_task(msg.task, &root_task);
+ //获得根任务下的组件
EPM_ask_attachments(root_task, EPM_target_attachment, &att_cnt, &attachments);
vector revs;
vector tags;
+ vector items;
POM_AM__set_application_bypass(true);
+ //遍历任务组件
for (int i = 0;i < att_cnt;i++) {
if (isTypeOf(attachments[i], "ItemRevision")) {
revs.push_back(attachments[i]);
+ //////////////////////////////////////////////////////////////////////////////////////
+ int object_att;
+ tag_t* object;
+ //得到零组件
+ AOM_ask_value_tags(attachments[i], "items_tag", &object_att, &object);
+
+ tag_t owning_user, group;
+ //询问单值属性的值。获取对象所有者
+ AOM_ask_value_tag(msg.task, "owning_user", &owning_user);
+ //给写权限
+ grant_access(object[0], owning_user);
+
+ //返回用户的默认登录组属性。
+ //SA_ask_user_login_group(owning_user, &group);
+
+ //AOM_lock(object[0]);
+ //int res = ITK_ok;
+ //char* uid;
+ ////设置对象的用户和组所有权。
+ //ITKCALL(AOM_set_ownership(object[0], owning_user, group));
+ ////将应用程序对象保存到数据库中。在调用save之前,必须首先加载或刷新对象以进行修改。
+ //ITKCALL(res = AOM_save(object[0]));
+ //if (res != ITK_ok) {
+ // //注意返回的“UID”对于一个BOM标签不是持久化到另一个会话,并且对于道具标签是无效的
+ // ITK__convert_tag_to_uid(object[0], &uid);
+ // cout << uid << endl;
+ // //释放指定的内存块。
+ // if (uid) MEM_free(uid);
+ //}
+ //AOM_unlock(object[0]);
+ //////////////////////////////////////////////////////////////////////////////////////
}
}
revise_item_revisions(revs.size(), &revs[0], &tags);
@@ -136,22 +224,29 @@ int jd_auto_revise(EPM_action_message_t msg) {
tag_t owning_user, group;
char *name, **prefs;
int prefs_cnt = 0, tags_cnt = tags.size();
+ //询问单值属性的值。获取对象所有者
AOM_ask_value_tag(msg.task, "owning_user", &owning_user);
+ //询问单值属性的值。获取用户name
AOM_ask_value_string(owning_user, "object_string", &name);
cout << "owning_user:" << name << endl;
+ //返回用户的默认登录组属性。
SA_ask_user_login_group(owning_user, &group);
char *group_name;
+ //询问单值属性的值。
AOM_ask_value_string(group, "object_string", &group_name);
cout << "group name:" << group_name << endl;
+ //询问数据类型为“String”的首选项的所有值。
PREF_ask_char_values("jd2_auto_revise_relations", &prefs_cnt, &prefs);
for (int i = 0;i < prefs_cnt;i++) {
cout << "relation:" << prefs[i] << endl;
for (int ii = 0;ii < tags_cnt;ii++) {
tag_t *temp;
int num = 0;
+ //询问属性的一个或多个值。属性可以是单值的,也可以是多值的(例如,数组或列表)。
AOM_ask_value_tags(tags[ii], prefs[i], &num, &temp);
for (int iii = 0;iii < num;iii++) {
char *str;
+ //询问单值属性的值。
AOM_ask_value_string(temp[iii], "object_string", &str);
cout << "add name:" << str << endl;
tags.push_back(temp[iii]);
@@ -163,11 +258,15 @@ int jd_auto_revise(EPM_action_message_t msg) {
AOM_lock(tags[i]);
int res = ITK_ok;
char *uid;
+ //设置对象的用户和组所有权。
ITKCALL(AOM_set_ownership(tags[i], owning_user, group));
+ //将应用程序对象保存到数据库中。在调用save之前,必须首先加载或刷新对象以进行修改。
ITKCALL(res = AOM_save(tags[i]));
if (res != ITK_ok) {
+ //注意返回的“UID”对于一个BOM标签不是持久化到另一个会话,并且对于道具标签是无效的
ITK__convert_tag_to_uid(tags[i], &uid);
cout << uid << endl;
+ //释放指定的内存块。
if (uid) MEM_free(uid);
}
AOM_unlock(tags[i]);
diff --git a/HEZON_ITK/x64/Release/.NETFramework,Version=v4.0.AssemblyAttributes.asm b/HEZON_ITK/x64/Release/.NETFramework,Version=v4.0.AssemblyAttributes.asm
index f924cf7..7874fb7 100644
--- a/HEZON_ITK/x64/Release/.NETFramework,Version=v4.0.AssemblyAttributes.asm
+++ b/HEZON_ITK/x64/Release/.NETFramework,Version=v4.0.AssemblyAttributes.asm
@@ -1,4 +1,4 @@
-; Listing generated by Microsoft (R) Optimizing Compiler Version 19.00.24215.1
+; Listing generated by Microsoft (R) Optimizing Compiler Version 19.00.23026.0
; Generated by VC++ for Common Language Runtime
-.file "C:\Users\5rKB5bPlusD\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cpp"
+.file "C:\Users\Administrator\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cpp"
diff --git a/HEZON_ITK/x64/Release/HEZON_ITK.Build.CppClean.log b/HEZON_ITK/x64/Release/HEZON_ITK.Build.CppClean.log
index f6b0dae..40b734b 100644
--- a/HEZON_ITK/x64/Release/HEZON_ITK.Build.CppClean.log
+++ b/HEZON_ITK/x64/Release/HEZON_ITK.Build.CppClean.log
@@ -1,49 +1,51 @@
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\vc140.pdb
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\epm_register_handler.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_send_mail.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_prop_relate.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_get_target2.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_get_target.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_ckeck_bom_use.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_check_bom_99.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_check_99_cglx.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_auto_revise.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\csendmail.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_wl_check.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_test_release_check.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_sign_cad.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_signoff.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_sap.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_file_transfer.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_bypass.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_bom_transmit_check.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_bom_save_check.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_bom_check.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_rev_release.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_check_id_wllx.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\util.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_splicing_task.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_check_wlms_len.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_signoff.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_send_mail2.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_schedule_joint.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_clear_field.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_check_99_bomyt.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_batch_process.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_add_attachments.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_custom_main.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\.netframework,version=v4.0.assemblyattributes.obj
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\.netframework,version=v4.0.assemblyattributes.asm
-e:\work\vs_workspace\jditk\x64\release\bs.dll
-e:\work\vs_workspace\jditk\x64\release\hezon_itk.pdb
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\metagen.write.1.tlog
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.vcxprojresolveassemblyreference.cache
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\cl.command.1.tlog
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\cl.read.1.tlog
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\cl.write.1.tlog
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\link.command.1.tlog
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\link.read.1.tlog
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\link.write.1.tlog
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\metagen.read.1.tlog
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\declib.dll.metagen
-e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\tzres.dll.bi
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\vc140.pdb
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_send_mail.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_prop_relate.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_get_target2.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_get_target.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_ckeck_bom_use.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_check_bom_99.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_check_99_cglx.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_auto_revise.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\csendmail.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\check_release_issus.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\bs_wl_check.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\bs_test_release_check.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\bs_sign_cad.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\bs_signoff.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\bs_sap.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\bs_file_transfer.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\bs_bypass.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\bs_bom_transmit_check.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\bs_bom_save_check.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\bs_bom_check.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_rev_release.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_check_id_wllx.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\util.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\sample_confirmation_sheet.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_splicing_task.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_check_wlms_len.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_signoff.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_send_mail2.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_schedule_joint.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_clear_field.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_check_99_bomyt.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_batch_process.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\jd_add_attachments.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\bs_custom_main.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\epm_register_handler.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\.netframework,version=v4.0.assemblyattributes.obj
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\.netframework,version=v4.0.assemblyattributes.asm
+c:\users\administrator\desktop\vs\鍚夊痉\itk\x64\release\bs.dll
+c:\users\administrator\desktop\vs\鍚夊痉\itk\x64\release\hezon_itk.pdb
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\hezon_itk.tlog\metagen.write.1.tlog
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\hezon_itk.vcxprojresolveassemblyreference.cache
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\hezon_itk.tlog\cl.command.1.tlog
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\hezon_itk.tlog\cl.read.1.tlog
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\hezon_itk.tlog\cl.write.1.tlog
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\hezon_itk.tlog\link.command.1.tlog
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\hezon_itk.tlog\link.read.1.tlog
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\hezon_itk.tlog\link.write.1.tlog
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\hezon_itk.tlog\metagen.read.1.tlog
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\hezon_itk.tlog\declib.dll.metagen
+c:\users\administrator\desktop\vs\鍚夊痉\itk\hezon_itk\x64\release\hezon_itk.tlog\tzres.dll.bi
diff --git a/HEZON_ITK/x64/Release/HEZON_ITK.lastbuildstate b/HEZON_ITK/x64/Release/HEZON_ITK.lastbuildstate
deleted file mode 100644
index ac54383..0000000
--- a/HEZON_ITK/x64/Release/HEZON_ITK.lastbuildstate
+++ /dev/null
@@ -1,2 +0,0 @@
-#v4.0:v110:false
-Release|x64|C:\Users\Administrator\Documents\c++\HEZON_ITK\|
diff --git a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/HEZON_ITK.lastbuildstate b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/HEZON_ITK.lastbuildstate
index 7097f65..bb992ba 100644
--- a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/HEZON_ITK.lastbuildstate
+++ b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/HEZON_ITK.lastbuildstate
@@ -1,2 +1,2 @@
-#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=true:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
-Release|x64|E:\work\vs_workspace\jditk\|
+#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=true:VCToolArchitecture=Native32Bit
+Release|x64|C:\Users\Administrator\Desktop\VS\鍚夊痉\itk\|
diff --git a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/metagen.read.1.tlog b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/metagen.read.1.tlog
index 56f4bc3..a6e03df 100644
Binary files a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/metagen.read.1.tlog and b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/metagen.read.1.tlog differ
diff --git a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/metagen.write.1.tlog b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/metagen.write.1.tlog
index 715b260..5135269 100644
Binary files a/HEZON_ITK/x64/Release/HEZON_ITK.tlog/metagen.write.1.tlog and b/HEZON_ITK/x64/Release/HEZON_ITK.tlog/metagen.write.1.tlog differ