#pragma warning (disable: 4996) #pragma warning (disable: 4819) #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #include "epm_sign_rev.h" #include "error_handling.h" #include "common_itk_util.h" #include "hx_custom.h" #include "epm_handler_common.h" //流程节点信息 struct TXFLOWNODEINFOS { char taskname[128]; char username[128]; char timeinfo[128]; //2019.12.2新增注释,注意只有天信有,金卡没有 char commentsinfo[256]; char group[128]; }flownode_s[64]; //参数人员信息 struct TXUSERINFOS { char taskname[128]; char propertyname[128]; char group[128]; }userinfo_s[64]; //参数已经啊信息 struct TXCOMMENTSINFOS { char taskname[128]; char propertyname[128]; char group[128]; }commentsinfo_s[64]; //参数日期信息 struct TXTIMEINFOS { char taskname[128]; char propertyname[128]; char group[128]; }timeinfo_s[64]; int txnodecount = 0; int txuserinfoscount = 0; int txtimeinfoscount = 0; int txcommentsinfoscount = 0; typedef struct{ string TaskUserName; string TaskTimeName; string UserName; string TimeStr; string GroupName; string PropUserName; string PropTimeName; }TXNOTICE_NODE; void txSplitUserInfo(char *userinfo) { char* token = NULL, *ptr = NULL, temp[512] = ""; token = strtok( userinfo, ";"); while( token != NULL ) { /* While there are tokens in "string" */ strcpy(temp,token); ECHO( "token=%s\n", token ); ptr = strstr(temp, "="); if (ptr != NULL) { strcpy(userinfo_s[txuserinfoscount].propertyname, ptr +1); strcpy(ptr,"\0"); strcpy(userinfo_s[txuserinfoscount].taskname ,temp); ECHO("\nuserinfo_s[userinfoscount].taskname=%s,userinfo_s[userinfoscount].propertyname=%s\n", userinfo_s[txuserinfoscount].taskname,userinfo_s[txuserinfoscount].propertyname); } txuserinfoscount ++; /* Get next token: */ token = strtok( NULL, ";"); } } void txSplitCommentsInfo(char *commentsInfo) { char* token = NULL, *ptr = NULL, temp[512] = ""; token = strtok( commentsInfo, ";"); while( token != NULL ) { /* While there are tokens in "string" */ strcpy(temp,token); ECHO( "token=%s\n", token ); ptr = strstr(temp, "="); if (ptr != NULL) { strcpy(commentsinfo_s[txcommentsinfoscount].propertyname, ptr +1); strcpy(ptr,"\0"); strcpy(commentsinfo_s[txcommentsinfoscount].taskname ,temp); ECHO("\ncommentsinfo_s[userinfoscount].taskname=%s,commentsinfo_s[userinfoscount].propertyname=%s\n", commentsinfo_s[txcommentsinfoscount].taskname,commentsinfo_s[txcommentsinfoscount].propertyname); } txcommentsinfoscount ++; /* Get next token: */ token = strtok( NULL, ";"); } } void txSplitTimeInfo(char *userinfo) { char* token = NULL, *ptr = NULL, temp[512] = ""; token = strtok( userinfo, ";"); while( token != NULL ) { /* While there are tokens in "string" */ strcpy(temp,token); ECHO( "token=%s\n", token ); ptr = strstr(temp, "="); if (ptr != NULL) { strcpy(timeinfo_s[txtimeinfoscount].propertyname, ptr +1); strcpy(ptr,"\0"); strcpy(timeinfo_s[txtimeinfoscount].taskname ,temp); ECHO("\ntimeinfo_s[txtimeinfoscount].taskname=%s,timeinfo_s[txtimeinfoscount].propertyname=%s\n",timeinfo_s[txtimeinfoscount].taskname,timeinfo_s[txtimeinfoscount].propertyname); } txtimeinfoscount ++; /* Get next token: */ token = strtok( NULL, ";"); } } int tx_ORIGIN_ask_sign_info(tag_t task_node, char *output_str,char *task_name,char *arg3value,char *arg4value) { int ifail = ITK_ok; tag_t cur_perform_task = NULLTAG,tempTask = NULLTAG; char cur_task_name[WSO_name_size_c+1]="",buf[128] = ""; //编制判断变量 int s = 0; EPM_decision_t decision = EPM_nogo; char* userName; char *timeinfo1 = "",person_name[SA_name_size_c+1]="",*prop_name = "last_mod_date"; tag_t aUserTag = NULLTAG,responsibleParty = NULLTAG; date_t decision_date; //其他节点相关 int perform_count = 0; int *attach_type; tag_t *perform_attaches = NULLTAG; tag_t memberTag = NULLTAG; SIGNOFF_TYPE_t memberType; CR_signoff_decision_t signoff_decision; EPM_signoff_decision_t dec; char *timeinfo="",*group_full_name = NULL; tag_t user_tag=NULLTAG, group_tag = NULLTAG; //循环判断变量 int i=0; EPM_ask_name( task_node, cur_task_name ) ; ECHO("cur_task_name = %s\n",cur_task_name); if ( stricmp( cur_task_name, "perform-signoffs" ) == 0 ) { cur_perform_task = task_node; //得到父节点 EPM_ask_parent_task( cur_perform_task, &tempTask ); EPM_ask_name( tempTask, cur_task_name ); } else if( strcmp( cur_task_name, "编制" ) == 0 || strcmp( cur_task_name, "设计" ) == 0) { cur_perform_task = task_node; } else { EPM_ask_sub_task(task_node, "perform-signoffs", &cur_perform_task) ; if ( cur_perform_task != NULLTAG ) { EPM_ask_name( task_node, cur_task_name ); ECHO( "---------> cur_task_name = %s\n" , cur_task_name ); } } if(cur_perform_task != NULLTAG ) { char type[WSO_name_size_c+1] = ""; WSOM_ask_object_type(cur_perform_task,type); ECHO("current task type = %s\n", type); cout<<"type--------"< ans; //if( d_value != NULL ) //{ // Split(d_value, ' ', ans); // if(ans.size() > 1) // strcat(output_str,ans[0].c_str()); //} strcat(output_str,d_value); //DOFREE(timeinfo); strcat(output_str, "|"); strcpy(flownode_s[txnodecount].taskname,"设计"); strcpy(flownode_s[txnodecount].username,person_name); //if(ans.size() > 1) strcpy(flownode_s[txnodecount].timeinfo,d_value); txnodecount = txnodecount + 1;*/ ECHO("output_str=%s",output_str); EPM_ask_all_attachments(cur_perform_task,&perform_count,&perform_attaches,&attach_type); ECHO("EPM_signoff_attachment Counts = %d", perform_count); for(i=0;i 0) { for (i=0;i"<true"<false"< type_vec; //Split(exclude_type,";",type_vec); ECHO("参数1个数:%d\n",txuserinfoscount); cout<