main
熊朝柱 2 weeks ago
parent 7b752b108c
commit 972dfc025f

Binary file not shown.

@ -22,7 +22,7 @@
<ProjectGuid>{8E665218-4AC2-4DDD-A50E-4245BA64C3C3}</ProjectGuid> <ProjectGuid>{8E665218-4AC2-4DDD-A50E-4245BA64C3C3}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>HEZON_ITK</RootNamespace> <RootNamespace>HEZON_ITK</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@ -50,7 +50,7 @@
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<UseOfMfc>false</UseOfMfc> <UseOfMfc>false</UseOfMfc>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v142</PlatformToolset>
<CLRSupport>true</CLRSupport> <CLRSupport>true</CLRSupport>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@ -80,6 +80,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<TargetName>jd_check_jz</TargetName>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
@ -139,7 +140,7 @@
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>libuser_exits.ar.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>libuser_exits.ar.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<OutputFile>$(OutDir)\bs.dll</OutputFile> <OutputFile>$(OutDir)\jd_check_jz.dll</OutputFile>
<AdditionalOptions>/FORCE %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/FORCE %(AdditionalOptions)</AdditionalOptions>
<AdditionalLibraryDirectories> <AdditionalLibraryDirectories>
</AdditionalLibraryDirectories> </AdditionalLibraryDirectories>

@ -1,207 +1,172 @@
#include "util.h" #include "util.h"
#include <ict/ict_userservice.h>
#include <tccore/uom.h>
int setTarget2(tag_t tag_task, tag_t tag_a) { bool startsWith(const char* str, const char* prefix) {
int ifail = ITK_ok; return strncmp(str, prefix, strlen(prefix)) == 0;
int master_count = 0, count = 0; }
int attachment_types = 0;
bool endsWith(const char* str, const char* suffix) {
if (!str || !suffix)
return str == suffix;
size_t lenStr = strlen(str);
size_t lenSuffix = strlen(suffix);
if (tag_a != NULL) { if (lenSuffix > lenStr)
AOM_unlock(tag_a); return false;
attachment_types = EPM_target_attachment;
printf("开始将版本放入目标\n"); return strncmp(str + lenStr - lenSuffix, suffix, lenSuffix) == 0;
ITKCALL(EPM_add_attachments(tag_task, 1, &(tag_a), &attachment_types)); }
printf("结束将版本放入目标\n");
bool isJD2_BJRevision(const char* type) {
return startsWith(type, "JD2") && endsWith(type, "BJRevision");
}
return ITK_ok; /*
*
*/
int getCharLength(char str[])
{
int count = 0;
for (int i = 0; str[i]; i++)
{
if (str[i] < 0) i++;
count++;
} }
return count;
} }
int Sample_confirmation_sheet(EPM_rule_message_t msg) { /*
*
POM_AM__set_application_bypass(true); */
tag_t root_task, * attachments; int jd_check_jz(EPM_rule_message_t msg) {
int att_cnt; printf("Sample_confirmation_sheet is begin! \n");
//获得根节点 int ifail = ITK_ok,
EPM_ask_root_task(msg.task, &root_task); result_tag = EPM_go;
//获得根任务下的组件 tag_t rootTask = NULLTAG;
EPM_ask_attachments(root_task, EPM_target_attachment, &att_cnt, &attachments); int attachmentCount = 0;
tag_t* attachmentTags = NULL,
//判断参数是否符合要求 attachmentTag = NULLTAG;
char* object_string; char* type = NULL,
std::string names = ""; * name = NULL,
int bjNum = 0; * jz = NULL;
//遍历任务组件 TC_Is_Represented_By int form_cnt = 0;
for (int i = 0; i < att_cnt; i++) { tag_t* forms = NULL;
if (isTypeOf(attachments[i], "ItemRevision")) {
int object_att; ITKCALL(ifail = EPM_ask_root_task(msg.task, &rootTask));
tag_t* object; ITKCALL(ifail = EPM_ask_attachments(rootTask, EPM_target_attachment, &attachmentCount, &attachmentTags));
//得到零组件 //便利所有的流程目标下的对象
AOM_ask_value_tags(attachments[i], "items_tag", &object_att, &object); for (int i = 0; i < attachmentCount; i++) {
if (object_att == 0) attachmentTag = attachmentTags[i];//PartRevisionMaster
{
ITKCALL(ifail = AOM_ask_value_string(attachmentTag, "object_type", &type));
ITKCALL(ifail = AOM_ask_value_string(attachmentTag, "object_name", &name));
printf(">>>当前流程下对象的类型为==[%s]\n", type);
//获取版本对象下的表单
ITKCALL(ifail = AOM_ask_value_tags(attachmentTag, "IMAN_master_form_rev", &form_cnt, &forms));
//==========================下面是检查特定版本类型JD2_XXBJRevision下的表单属性净重===========================================================================================================
if (isJD2_BJRevision(type)) {
//检查版本表单是否存在属性jd2_jz
ITKCALL(ifail = AOM_ask_value_string(forms[0], "jd2_jz", &jz));
printf("获取净重属性的ifail结果 = [%d] \n", ifail);
if (ifail != 0 && ifail != 2) {
//未获取到净重属性,流程正常发起
printf("未获取到净重属性,流程正常发起 \n");
continue; continue;
} }else {
char* item_id; if (jz != NULL && stricmp(jz, "") == 0) {
//弹出弹窗提示,且终止流程
int n_referencers; printf(">>>部件净重为空,不允许发起流程,请检查!!\n");
int* levels; char* message = "部件净重为空,不允许发起流程,请检查!!";
tag_t* referencers; cout << "Exception:" << message << endl;
char** relations; EMH_store_error_s1(EMH_severity_error, EMH_IDGENERATION_ERROR_BASE, message);
//得到零组件的引用对象 result_tag = EPM_nogo;
WSOM_where_referenced(object[0], 1, &n_referencers, &levels, &referencers, &relations); break;
}else if (jz != NULL && stricmp(jz, "0.001") < 0) {
int itemRecision_att; //弹出弹窗提示,且终止流程
tag_t* itemRecision; printf(">>>部件净重小于0.001,不允许发起流程,请检查!!\n");
//得到引用对象的最新版本 char* message = "部件净重小于0.001,不允许发起流程,请检查!!";
cout << "Exception:" << message << endl;
AOM_ask_value_tags(referencers[0], "revision_list", &itemRecision_att, &itemRecision); EMH_store_error_s1(EMH_severity_error, EMH_IDGENERATION_ERROR_BASE, message);
if (itemRecision_att <= 0) { result_tag = EPM_nogo;
EMH_store_error_s1(EMH_severity_error, EMH_IDGENERATION_ERROR_BASE, "该清单没有关联物料!"); break;
return EPM_nogo; }else {
} //正常发起流程
////creation_date printf(">>>净重=[%s],允许发起流程!\n",jz);
//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;
}
} }
}
else {
printf(">>>当前流程下对象[%s]类型为[%s]类型非部件类型JD2_[XX]BJRevision不必检查净重\n", name,type);
}
}
//已经升版,判断上一版本是否已经发布 MEM_free(forms);
//if (itemRecision_att > 1) { MEM_free(name);
// int dataNum; MEM_free(type);
// date_t* time; MEM_free(attachmentTags);
// AOM_ask_value_dates(itemRecision[index - 1], "date_released", &dataNum, &time); return result_tag;
// 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]);//将版本带入目标
} /*
* userservice
*/
int USERSEVICE_getProperties(void* returnValue) {
int ifail = ITK_ok;
} tag_t tag = NULL_TAG;
char* uomName = NULL;
tag_t* release_objs = NULL;
//接收参数
USERARG_get_tag_argument(&tag);
USERARG_get_string_argument(&uomName);
int num_could = 0;
tag_t* uoms = NULL, uom = NULLTAG;
// 获取所有单位的列表
ITKCALL(UOM_extent(&num_could, &uoms));
for (int i = 0; i < num_could; i++)
{
char* name = NULL;
UOM_ask_name(uoms[i], &name);
if (strcmp(name, uomName) == 0)
{
uom = uoms[i];
break;
} }
} }
// 初始化类ID、属性ID和标签变量
char* class_id = NULL;
tag_t attr_id = NULLTAG, class_tag = NULLTAG, tag_instance = NULLTAG;
// 锁定对象以防止在操作过程中被修改
ITKCALL(AOM_lock(tag));
// 获取对象所属类的标签和名称
ITKCALL(POM_class_of_instance(tag, &class_tag));
ITKCALL(POM_name_of_class(class_tag, &class_id));
// 获取类中名为"uom_tag"的属性的标签
ITKCALL(POM_attr_id_of_attr("uom_tag", class_id, &attr_id));
// 刷新对象的实例以确保数据是最新的
ITKCALL(POM_refresh_instances_any_class(1, &tag, POM_modify_lock));
// 将对象的单位属性设置为之前找到的单位标签
ITKCALL(POM_set_attr_tag(1, &tag, attr_id, uom));
// 保存对对象所做的更改
ITKCALL(POM_save_instances(1, &tag, true));
// 解锁对象
ITKCALL(AOM_unlock(tag));
// 刷新对象的状态
ITKCALL(AOM_refresh(tag, false));
return ifail;
}
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;
}

@ -21,7 +21,8 @@ void judge(tag_t top,string &status,stringstream &ss)
} }
} }
int bs_bom_check(EPM_rule_message_t msg) int
_bom_check(EPM_rule_message_t msg)
{ {
int ifail = EPM_go, att_count, line_cnt; int ifail = EPM_go, att_count, line_cnt;
tag_t rootTask, *attachments, win, top, *lines; tag_t rootTask, *attachments, win, top, *lines;

@ -28,43 +28,47 @@
#include "epm_register_handler.h" #include "epm_register_handler.h"
#include "epm_handler_common.h" #include "epm_handler_common.h"
#include "jd_clear_field.h" #include "jd_clear_field.h"
#include "ict/ict_userservice.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
DLLAPI int jd_check_jz_register_callbacks()
/**
* @fn extern "C" DLLAPI int liborigin_register_callbacks
* @return usually return ITK_ok
* @brief liborigin customization entry
*/
DLLAPI int bs_register_callbacks()
{ {
char* log_file = NULL;
printf("创建日志文件\n");
char* TO_SRM = (char*)malloc(sizeof("Main"));
strcpy(TO_SRM, "Main");
int ifail = ITK_ok; int ifail = ITK_ok;
ifail = CUSTOM_register_exit(
"bs",
"USERSERVICE_register_methods",
(CUSTOM_EXIT_ftn_t)USERSERVICE_custom_register_methods) ;
ifail = CUSTOM_register_exit( ITKCALL(ifail = CUSTOM_register_exit("jd_check_jz", "USER_gs_shell_init_module",
"bs", (CUSTOM_EXIT_ftn_t)CUST_init_module));
"USER_gs_shell_init_module", if (ifail != ITK_ok)
(CUSTOM_EXIT_ftn_t)CUST_init_module); {
TC_write_syslog("注册jd_check_jz回调失败[CUST_init_module]\n");
}else {
TC_write_syslog("注册jd_check_jz回调成功[CUST_init_module]\n");
}
fprintf(stdout, "\n bssss registering USERSERVICE_custom_register_handlers completed!\n");
ITKCALL(ifail = CUSTOM_register_exit("jd_check_jz", "USERSERVICE_register_methods",
(CUSTOM_EXIT_ftn_t)USERSERVICE_custom_register_methods));
if (ifail != ITK_ok) {
TC_write_syslog("注册回调失败[USERSERVICE_custom_register_handlers]\n");
}
else {
TC_write_syslog("注册回调成功[USERSERVICE_custom_register_handlers]\n");
}
Register_revise_msg();
return ifail; return ifail;
} }
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
/**
* @}
*/

@ -39,7 +39,7 @@ extern "C" {
int bs_file_transfer(EPM_action_message_t msg); int bs_file_transfer(EPM_action_message_t msg);
int bs_sap_material(EPM_action_message_t msg); int bs_sap_material(EPM_action_message_t msg);
int bs_sap_bom(EPM_action_message_t msg); int bs_sap_bom(EPM_action_message_t msg);
int bs_bom_check(EPM_rule_message_t msg); //int bs_bom_check(EPM_rule_message_t msg);
int bs_wl_check(EPM_rule_message_t msg); int bs_wl_check(EPM_rule_message_t msg);
int bs_bom_save_check(METHOD_message_t *msg, va_list args); int bs_bom_save_check(METHOD_message_t *msg, va_list args);
int bs_sign_cad(EPM_action_message_t msg); int bs_sign_cad(EPM_action_message_t msg);
@ -65,10 +65,9 @@ extern "C" {
int jd_prop_relate(METHOD_message_t *msg, va_list args); int jd_prop_relate(METHOD_message_t *msg, va_list args);
int jd_splicing_task(EPM_action_message_t msg); int jd_splicing_task(EPM_action_message_t msg);
int check_release_issus(EPM_rule_message_t msg); int check_release_issus(EPM_rule_message_t msg);
int Sample_confirmation_sheet(EPM_rule_message_t msg); int jd_check_jz(EPM_rule_message_t msg);
//修改单位
////<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣǩ<CFA2><C7A9><EFBFBD><E6B1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȥ int USERSEVICE_getProperties(void* returnValue);
//int qtmc_sign_ir(EPM_action_message_t msg);

@ -51,309 +51,57 @@ extern DLLAPI int CUST_init_module(int *decision, va_list args) {
*decision = ALL_CUSTOMIZATIONS; *decision = ALL_CUSTOMIZATIONS;
printf("register start\n"); printf("==》register start\n");
ifail = EPM_register_action_handler("bs_file_transfer", "bs_file_transfer",
(EPM_action_handler_t)bs_file_transfer);
if (ifail) {
printf("register bs_file_transfer failed\n");
}
else {
printf("register bs_file_transfer successfully\n");
}
ifail = EPM_register_action_handler("bs_sap_material", "bs_sap_material",
(EPM_action_handler_t)bs_sap_material);
if (ifail) {
printf("register bs_sap_material failed\n");
}
else {
printf("register bs_sap_material successfully\n");
}
ifail = EPM_register_action_handler("bs_sap_bom", "bs_sap_bom",
(EPM_action_handler_t)bs_sap_bom);
if (ifail) {
printf("register bs_sap_bom failed\n");
}
else {
printf("register bs_sap_bom successfully\n");
}
ifail = EPM_register_rule_handler("bs_bom_check", "bs_bom_check", (EPM_rule_handler_t)bs_bom_check);
if (ifail) {
printf("register bs_bom_check failed\n");
}
else {
printf("register bs_bom_check successfully\n");
}
ifail = EPM_register_rule_handler("bs_wl_check", "bs_wl_check", (EPM_rule_handler_t)bs_wl_check);
if (ifail) {
printf("register bs_wl_check failed\n");
}
else {
printf("register bs_wl_check successfully\n");
}
ifail = EPM_register_action_handler("bs_sign_cad", "bs_sign_cad",
(EPM_action_handler_t)bs_sign_cad);
if (ifail) {
printf("register bs_sign_cad failed\n");
}
else {
printf("register bs_sign_cad successfully\n");
}
ifail = EPM_register_action_handler("bs_test_release_check", "bs_test_release_check",
(EPM_action_handler_t)bs_test_release_check);
if (ifail) {
printf("register bs_test_release_check failed\n");
}
else {
printf("register bs_test_release_check successfully\n");
}
ifail = EPM_register_action_handler("jd_signoff", "jd_signoff",
(EPM_action_handler_t)jd_signoff);
if (ifail) {
printf("register jd_signoff failed\n");
}
else {
printf("register jd_signoff successfully\n");
}
ifail = EPM_register_action_handler("jd_schedule_joint", "jd_schedule_joint",
(EPM_action_handler_t)jd_schedule_joint);
if (ifail == ITK_ok) {
fprintf(stdout, "Registering action handler jd_schedule_joint completed!\n");
}
else {
fprintf(stdout, "Registering action handler jd_schedule_joint failed %d!\n", ifail);
}
ifail = EPM_register_action_handler("jd_batch_process", "jd_batch_process",
(EPM_action_handler_t)jd_batch_process);
if (ifail) {
printf("register jd_batch_process failed\n");
}
else {
printf("register jd_batch_process successfully\n");
} ifail = EPM_register_rule_handler("jd_check_jz", "jd_check_jz",
ifail = EPM_register_action_handler("jd_add_attachments", "jd_add_attachments", (EPM_rule_handler_t)jd_check_jz);
(EPM_action_handler_t)jd_add_attachments);
if (ifail) { if (ifail) {
printf("register jd_add_attachments failed\n"); printf("注册 jd_check_jz 失败\n");
} }
else { else {
printf("register jd_add_attachments successfully\n"); printf("注册 jd_check_jz 成功\n");
}
ifail = EPM_register_rule_handler("jd_check_99_bomyt", "jd_check_99_bomyt",
(EPM_rule_handler_t)jd_check_99_bomyt);
if (ifail) {
printf("register jd_check_99_bomyt failed\n");
}
else {
printf("register jd_check_99_bomyt successfully\n");
}
ifail = EPM_register_action_handler("jd_send_mail", "jd_send_mail",
(EPM_action_handler_t)jd_send_mail);
if (ifail) {
printf("register jd_send_mail failed\n");
}
else {
printf("register jd_send_mail successfully\n");
}
ifail = EPM_register_action_handler("jd_get_target", "jd_get_target",
(EPM_action_handler_t)jd_get_target);
if (ifail) {
printf("register jd_get_target failed\n");
}
else {
printf("register jd_get_target successfully\n");
}
ifail = EPM_register_rule_handler("jd_check_wlms_len", "jd_check_wlms_len",
(EPM_rule_handler_t)jd_check_wlms_len);
if (ifail) {
printf("register jd_check_wlms_len failed\n");
}
else {
printf("register jd_check_wlms_len successfully\n");
}
ifail = EPM_register_rule_handler("bs_bom_transmit_check", "bs_bom_transmit_check",
(EPM_rule_handler_t)bs_bom_transmit_check);
if (ifail) {
printf("register bs_bom_transmit_check failed\n");
}
else {
printf("register bs_bom_transmit_check successfully\n");
}
ifail = EPM_register_rule_handler("jd_check_bom_use", "jd_check_bom_use",
(EPM_rule_handler_t)jd_check_bom_use);
if (ifail) {
printf("register jd_check_bom_use failed\n");
}
else {
printf("register jd_check_bom_use successfully\n");
}
ifail = EPM_register_rule_handler("jd_check_bom_99", "jd_check_bom_99",
(EPM_rule_handler_t)jd_check_bom_99);
if (ifail) {
printf("register jd_check_bom_99 failed\n");
}
else {
printf("register jd_check_bom_99 successfully\n");
}
ifail = EPM_register_rule_handler("jd_check_ID_wllx", "jd_check_ID_wllx",
(EPM_rule_handler_t)jd_check_ID_wllx);
if (ifail) {
printf("register jd_check_ID_wllx failed\n");
}
else {
printf("register jd_check_ID_wllx successfully\n");
}
ifail = EPM_register_rule_handler("jd_check_99_cglx", "jd_check_99_cglx", (EPM_rule_handler_t)jd_check_99_cglx);
if (ifail) {
printf("register jd_check_99_cglx failed\n");
}
else {
printf("register jd_check_99_cglx successfully\n");
}
ifail = EPM_register_action_handler("jd_auto_revise", "jd_auto_revise", (EPM_action_handler_t)jd_auto_revise);
if (ifail) {
printf("register jd_auto_revise failed\n");
}
else {
printf("register jd_auto_revise successfully\n");
}
ifail = EPM_register_action_handler("jd_send_mail2", "jd_send_mail2",
(EPM_action_handler_t)jd_send_mail2);
if (ifail) {
printf("register jd_send_mail2 failed\n");
}
else {
printf("register jd_send_mail2 successfully\n");
}
ifail = EPM_register_action_handler("jd_get_target2", "jd_get_target2",
(EPM_action_handler_t)jd_get_target2);
if (ifail) {
printf("register jd_get_target2 failed\n");
}
else {
printf("register jd_get_target2 successfully\n");
}
ifail = EPM_register_rule_handler("jd_rev_release", "jd_rev_release",
(EPM_rule_handler_t)jd_rev_release);
if (ifail) {
printf("register jd_rev_release failed\n");
}
else {
printf("register jd_rev_release successfully\n");
}
ifail = EPM_register_action_handler("jd_splicing_task", "jd_splicing_task",
(EPM_action_handler_t)jd_splicing_task);
if (ifail) {
printf("register jd_splicing_task failed\n");
}
else {
printf("register jd_splicing_task successfully\n");
}
//if(ifail == ITK_ok)
//{
// fprintf(stdout,"Registering action handler qtmc-sign-ir completed!\n");
//}
//else
//{
// 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; return ifail;
} }
//
////register service method
extern DLLAPI int USERSERVICE_custom_register_methods() {
int status = 0;
METHOD_id_t mth_tag;
METHOD_find_method("BOMWindow", "BOMWindow_save", &mth_tag);
printf("register service\n");
if (mth_tag.id) {
printf("register bomwindow_save\n");
status = METHOD_add_action(mth_tag, METHOD_pre_action_type, (METHOD_function_t)bs_bom_save_check, NULL);
if (status == ITK_ok) {
printf("register bomwindow_save success\n");
}
else {
printf("register bomwindow_save failed\n");
} extern DLLAPI int USERSERVICE_custom_register_methods() {
int ifail = ITK_ok;
int numberOfArguments = 1,
returnValueType = USERARG_STRING_TYPE, int argCount = 0,
*argumentList = (int*)MEM_alloc(numberOfArguments * sizeof(int)); returnArgType = 0,
argumentList[0] = USERARG_LOGICAL_TYPE;; * argList = NULL;
USER_function_t functionPtr; USER_function_t functionPoint;
functionPtr = bs_bypass;
status = USERSERVICE_register_method("bs_bypass", functionPtr, numberOfArguments, argumentList, returnValueType); //===========1 Uservice============
if (status == ITK_ok) { argCount = 2;
printf("register bs_bypass success\n"); //处理当前服务的函数方法USERSEVICE_getProperties来源cust-uservice.h中声明方法
} functionPoint = USERSEVICE_getProperties;
else { //手动开辟一块地址
printf("register bs_bypass failed\n"); argList = (int*)MEM_alloc(argCount * sizeof(int));
argList[0] = USERARG_TAG_TYPE;
} argList[1] = USERARG_ARRAY_TYPE + USERARG_STRING_TYPE;
}
returnArgType = USERARG_STRING_TYPE;
vector<string> form_types; //参数1服务名称
form_types.push_back("JD2_GTZJRevisionMaster"); //参数2-functionPoint,:函数指针;
form_types.push_back("JD2_GTBJRevisionMaster"); //参数3-argCount服务入参个数
form_types.push_back("JD2_BLZJRevisionMaster"); //参数4-argList服务入参的参数类型
form_types.push_back("JD2_BLBJRevisionMaster"); //参数5-returnArgType返回值类型
form_types.push_back("JD2_BXZJRevisionMaster"); ITKCALL(ifail = USERSERVICE_register_method("USERSEVICE_getProperties", functionPoint, argCount, argList, returnArgType));
form_types.push_back("JD2_BXBJRevisionMaster");
form_types.push_back("JD2_YFSBZJRevisionMaster"); if (ifail == ITK_ok)
form_types.push_back("JD2_YFSBBJRevisionMaster"); {
form_types.push_back("JD2_YLRevisionMaster"); printf("USERVICE [USERSEVICE_getProperties] 注册成功!\n");
form_types.push_back("JD2_FLRevisionMaster"); }
form_types.push_back("JD2_RHRevisionMaster"); else
form_types.push_back("JD2_LSWLRevisionMaster"); {
form_types.push_back("JD2_RHRevisionMaster"); printf("USERVICE [USERSEVICE_getProperties] 注册失败!\n");
form_types.push_back("JD2_CDRevisionMaster"); }
for (int i = 0; i < form_types.size(); i++) { MEM_free(argList);
METHOD_find_prop_method(form_types[i].c_str(), "jd2_flbm", PROP_set_value_string_msg, &mth_tag);
if (mth_tag.id) { //===================2 Uservice=================================
status = METHOD_add_action(mth_tag, METHOD_post_action_type, (METHOD_function_t)jd_prop_relate, NULL);
if (status == ITK_ok) {
cout << "register " << form_types[i].c_str() << " success" << endl;
}
else {
cout << "register " << form_types[i].c_str() << " failed" << endl;
}
}
}
return 0; return ifail;
} }

@ -21,6 +21,8 @@ extern "C" {
#endif #endif
extern DLLAPI int CUST_init_module(int *, va_list); extern DLLAPI int CUST_init_module(int *, va_list);
//extern DLLAPI int USERSERVICE_custom_register_methods();
extern DLLAPI int USERSERVICE_custom_register_methods(); extern DLLAPI int USERSERVICE_custom_register_methods();

@ -37,7 +37,7 @@ int jd_check_ID_wllx(EPM_rule_message_t msg) {
names.append(taskName).append(";"); names.append(taskName).append(";");
} }
} else if (strcmp(p, "4") == 0) { } else if (strcmp(p, "4") == 0) {
char *lxs[8] = { "ZF01" ,"ZF02" ,"ZF03" ,"ZF04" ,"ZF05" ,"ZF06" ,"ZF07" }; char *lxs[10] = { "ZF01" ,"ZF02" ,"ZF03" ,"ZF04" ,"ZF05" ,"ZF06" ,"ZF07","ZF09","ZF10"};
char **lx = lxs; char **lx = lxs;
bool isTrue = false; bool isTrue = false;
for (int i = 0; lx && lx[i]; i++) { for (int i = 0; lx && lx[i]; i++) {

@ -1,4 +0,0 @@
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.00.23026.0
; Generated by VC++ for Common Language Runtime
.file "C:\Users\Administrator\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cpp"

@ -1,51 +1,48 @@
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\vc140.pdb e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\vc142.pdb
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\jd_send_mail.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\jd_send_mail.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\jd_prop_relate.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\jd_prop_relate.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\jd_get_target2.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\jd_get_target2.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\jd_get_target.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\jd_get_target.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\jd_ckeck_bom_use.obj e:\itk_workspace\itk\吉德\itk\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 e:\itk_workspace\itk\吉德\itk\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 e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\jd_check_99_cglx.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\jd_auto_revise.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\jd_auto_revise.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\csendmail.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\csendmail.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\check_release_issus.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\check_release_issus.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\bs_wl_check.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\bs_wl_check.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\bs_test_release_check.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\bs_test_release_check.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\bs_sign_cad.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\bs_sign_cad.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\bs_signoff.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\bs_signoff.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\bs_sap.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\bs_sap.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\bs_file_transfer.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\bs_file_transfer.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\bs_bypass.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\bs_bypass.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\bs_bom_transmit_check.obj e:\itk_workspace\itk\吉德\itk\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 e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\bs_bom_save_check.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\bs_bom_check.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\bs_bom_check.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\jd_rev_release.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\.netframework,version=v4.0.assemblyattributes.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\jd_check_id_wllx.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\jd_rev_release.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\util.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\jd_check_id_wllx.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\sample_confirmation_sheet.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\util.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\jd_splicing_task.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\sample_confirmation_sheet.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\jd_check_wlms_len.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\jd_splicing_task.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\jd_signoff.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\jd_check_wlms_len.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\jd_send_mail2.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\jd_signoff.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\jd_schedule_joint.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\jd_send_mail2.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\jd_clear_field.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\jd_schedule_joint.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\jd_check_99_bomyt.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\jd_clear_field.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\jd_batch_process.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\jd_check_99_bomyt.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\jd_add_attachments.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\jd_batch_process.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\bs_custom_main.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\jd_add_attachments.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\epm_register_handler.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\bs_custom_main.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\.netframework,version=v4.0.assemblyattributes.obj e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\epm_register_handler.obj
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\.netframework,version=v4.0.assemblyattributes.asm e:\itk_workspace\itk\吉德\itk\itk\x64\release\bs.dll
c:\users\administrator\desktop\vs\吉德\itk\x64\release\bs.dll e:\itk_workspace\itk\吉德\itk\itk\x64\release\hezon_itk.pdb
c:\users\administrator\desktop\vs\吉德\itk\x64\release\hezon_itk.pdb e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\hezon_itk.tlog\metagen.write.1.tlog
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\hezon_itk.tlog\metagen.write.1.tlog e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\hezon_itk.tlog\cl.command.1.tlog
c:\users\administrator\desktop\vs\吉德\itk\hezon_itk\x64\release\hezon_itk.vcxprojresolveassemblyreference.cache e:\itk_workspace\itk\吉德\itk\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.command.1.tlog e:\itk_workspace\itk\吉德\itk\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\cl.read.1.tlog e:\itk_workspace\itk\吉德\itk\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\cl.write.1.tlog e:\itk_workspace\itk\吉德\itk\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.command.1.tlog e:\itk_workspace\itk\吉德\itk\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\link.read.1.tlog e:\itk_workspace\itk\吉德\itk\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\link.write.1.tlog e:\itk_workspace\itk\吉德\itk\itk\hezon_itk\x64\release\hezon_itk.tlog\declib.dll.metagen
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

@ -1,2 +1,2 @@
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=true:VCToolArchitecture=Native32Bit PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0:TargetFrameworkVersion=v4.0::EnableManagedIncrementalBuild=true:
Release|x64|C:\Users\Administrator\Desktop\VS\吉德\itk\| Release|x64|E:\ITK_WorkSpace\ITK\吉德\jd_check_jz\itk\|

@ -1,7 +0,0 @@
ImageRuntimeVersion: v4.0.30319
Assembly bs, Version=0.0.*, Culture=固定语言(固定国家/地区):
hash=SHA1, flags=PublicKey
Assembly mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:
hash=None, flags=None
Assembly declib, Version=1.0.*, Culture=固定语言(固定国家/地区):
hash=None, flags=None
Loading…
Cancel
Save