|
|
#include"kutil.h"
|
|
|
#include <iostream>
|
|
|
#include <map>
|
|
|
#include <vector>
|
|
|
#include <string>
|
|
|
#include "libxl.h"
|
|
|
#include <io.h>
|
|
|
#include <direct.h>
|
|
|
#include <cstring>
|
|
|
#include <ctime>
|
|
|
#include <cfm/cfm.h>
|
|
|
#include <wchar.h>
|
|
|
#include <locale>
|
|
|
#include <ctime>
|
|
|
#include <iostream>
|
|
|
#include <codecvt>
|
|
|
#include <chrono>
|
|
|
#include <Windows.h>
|
|
|
#include <thread>
|
|
|
#include <regex>
|
|
|
#include <res\reservation.h>
|
|
|
#include "libxl.h"
|
|
|
#include <map>
|
|
|
#include <fstream>
|
|
|
#include <iostream>
|
|
|
#include <stdio.h>
|
|
|
#include <stdlib.h>
|
|
|
#include <iostream>
|
|
|
#include <iomanip>
|
|
|
|
|
|
using namespace libxl;
|
|
|
using namespace std::chrono_literals;
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
#define debug true
|
|
|
#define ITK_err 919012
|
|
|
|
|
|
int is_in(char* wenben, char* search_word)
|
|
|
{
|
|
|
int i = 0, j = 0, flag = -1;
|
|
|
while (i < strlen(wenben) && j < strlen(search_word))
|
|
|
{
|
|
|
if (wenben[i] == search_word[j])
|
|
|
{ //如果字符相同则两个字符都增加
|
|
|
i++;
|
|
|
j++;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
i = i - j + 1; //主串字符回到比较最开始比较的后一个字符
|
|
|
j = 0; //字串字符重新开始
|
|
|
}
|
|
|
if (j == strlen(search_word))
|
|
|
{ //如果匹配成功
|
|
|
flag = 1; //字串出现
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
return flag;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int LD_ECN01_SetCICNFormProperty(EPM_action_message_t msg) {
|
|
|
printf("================================================开始执行LD_ECN01_SetCICNFormProperty================================================\n");
|
|
|
//开旁路
|
|
|
POM_AM__set_application_bypass(true);
|
|
|
int att_cnt = 0;
|
|
|
int doc_num = 0;
|
|
|
tag_t rootTask_tag = NULLTAG;
|
|
|
tag_t task = NULLTAG;
|
|
|
tag_t* attachments = NULLTAG;
|
|
|
tag_t* doc_tags = NULLTAG;
|
|
|
string error;
|
|
|
char* arg = NULL, * argflag = NULL, * argvalue = NULL;
|
|
|
int arg_cnt = TC_number_of_arguments(msg.arguments);
|
|
|
char* property = NULL, * value = NULL, * type = NULL;
|
|
|
task = msg.task;
|
|
|
string erro2 = "";
|
|
|
string erro = "";
|
|
|
int send1 = 0;
|
|
|
int send2 = 0;
|
|
|
ITKCALL(EPM_ask_root_task(task, &rootTask_tag));
|
|
|
if (arg_cnt > 0)
|
|
|
{
|
|
|
for (int i = 0; i < arg_cnt; i++)
|
|
|
{
|
|
|
arg = TC_next_argument(msg.arguments);
|
|
|
ITKCALL(ITK_ask_argument_named_value((const char*)arg, &argflag, &argvalue));
|
|
|
if (strcmp(argflag, "property") == 0) {
|
|
|
if (argvalue != NULL)
|
|
|
{
|
|
|
printf("获取的值%s:\n", argvalue);
|
|
|
property = argvalue;
|
|
|
|
|
|
}
|
|
|
}
|
|
|
if (strcmp(argflag, "value") == 0) {
|
|
|
if (argvalue != NULL)
|
|
|
{
|
|
|
printf("获取的值%s:\n", argvalue);
|
|
|
value = argvalue;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
//获取流程下目标关系下的对象
|
|
|
printf("获取流程下目标关系下的对象\n");
|
|
|
ITKCALL(EPM_ask_attachments(rootTask_tag, EPM_target_attachment, &doc_num, &doc_tags));
|
|
|
for (int i = 0; i < doc_num; i++) {
|
|
|
char* objtype = NULL;
|
|
|
ITKCALL(AOM_ask_value_string(doc_tags[i], "object_type", &objtype));
|
|
|
if (strcmp("LD6_CNRevision", objtype) == 0) {
|
|
|
int relnum; tag_t* reltags;
|
|
|
ITKCALL(AOM_ask_value_tags(doc_tags[i], "LD6_WorkFRelation", &relnum, &reltags));
|
|
|
for (int j = 0; j < relnum; j++) {
|
|
|
//获取表单
|
|
|
printf("获取表单\n");
|
|
|
char* formtype;
|
|
|
tag_t form = NULL;
|
|
|
ITKCALL(AOM_ask_value_string(reltags[j], "object_type", &formtype));
|
|
|
if (strcmp(formtype, "LD6_CIForm") == 0 || strcmp(formtype, "LD6_CNForm") == 0) {
|
|
|
printf("开始修改属性值\n");
|
|
|
//开始修改属性值
|
|
|
AOM_lock(reltags[j]);
|
|
|
//获取当前流程节点名称
|
|
|
printf("获取当前流程节点名称\n");
|
|
|
char* taskName, * getValue;
|
|
|
ITKCALL(AOM_ask_value_string(task, "object_name", &taskName));
|
|
|
printf("当前流程节点名称为:%s\n",taskName);
|
|
|
//遍历表格
|
|
|
int num;//表格行数
|
|
|
tag_t* rows = NULL;//表格对象
|
|
|
ITKCALL(AOM_ask_table_rows(reltags[j], "ld6_ChangeTable", &num, &rows));
|
|
|
printf("获取表格\n");
|
|
|
for (int b = 0; b < num; b++) {
|
|
|
ITKCALL(AOM_ask_value_string(rows[b], "ld6_ChangeTaskName", &getValue));
|
|
|
printf("获取到的行:%s\n", getValue);
|
|
|
if (strstr(taskName, getValue)!=NULL) {
|
|
|
printf("获取到了同名的行\n");
|
|
|
char* flag;
|
|
|
ITKCALL(AOM_ask_value_string(rows[b], "ld6_YNChange", &flag));
|
|
|
printf("获取到ld6_YNChange的属性为:%s\n", flag);
|
|
|
if (strcmp(flag, "是") == 0) {
|
|
|
printf("可以修改\n");
|
|
|
vector<string> pripers;
|
|
|
Split(property, ";", pripers);
|
|
|
vector<string> values;
|
|
|
Split(value, ";", values);
|
|
|
if (pripers.size() == values.size()) {
|
|
|
for (int a = 0; a < pripers.size(); a++) {
|
|
|
AOM_lock(rows[b]);
|
|
|
vector<string> atts;
|
|
|
Split(pripers[a], ".", atts);
|
|
|
if (strcmp(atts[1].c_str(), "date") == 0) {
|
|
|
printf("获取到了时间\n");
|
|
|
date_t vadate;
|
|
|
if (strcmp(values[a].c_str(), "SysDate") == 0) {
|
|
|
// 获取当前时间
|
|
|
auto timeNow = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
|
|
|
// 转换为本地时间
|
|
|
tm localTime;
|
|
|
localtime_s(&localTime, &timeNow);
|
|
|
// 初始化date_t对象
|
|
|
vadate.year = localTime.tm_year + 1900;
|
|
|
vadate.month = static_cast<byte>(localTime.tm_mon) + 1;
|
|
|
vadate.day = static_cast<byte>(localTime.tm_mday);
|
|
|
vadate.hour = static_cast<byte>(localTime.tm_hour);
|
|
|
vadate.minute = static_cast<byte>(localTime.tm_min);
|
|
|
vadate.second = static_cast<byte>(localTime.tm_sec);
|
|
|
}
|
|
|
else {
|
|
|
printf("开始转换时间\n");
|
|
|
//ITKCALL(ITK_string_to_date(values[a].c_str(), &vadate));
|
|
|
/*vector<string> dataList;
|
|
|
Split(values[a].c_str(), "-", dataList);*/
|
|
|
// 创建tm对象,用于存储转换后的日期
|
|
|
std::tm date = {};
|
|
|
|
|
|
// 使用std::istringstream解析日期字符串
|
|
|
std::istringstream iss(values[a].c_str());
|
|
|
iss >> std::get_time(&date, "%Y-%m-%d %H:%M:%S");
|
|
|
// 检查日期是否解析成功
|
|
|
if (iss.fail())
|
|
|
{
|
|
|
std::cout << "转换失败!" << std::endl;
|
|
|
return 1;
|
|
|
}
|
|
|
else {
|
|
|
// 初始化date_t对象
|
|
|
vadate.year = date.tm_year + 1900;
|
|
|
vadate.month = static_cast<byte>(date.tm_mon) + 1;
|
|
|
vadate.day = static_cast<byte>(date.tm_mday);
|
|
|
vadate.hour = static_cast<byte>(date.tm_hour);
|
|
|
vadate.minute = static_cast<byte>(date.tm_min);
|
|
|
vadate.second = static_cast<byte>(date.tm_sec);
|
|
|
}
|
|
|
}
|
|
|
printf("属性%s=%s\n", atts[0].c_str(), values[a].c_str());
|
|
|
// 打印转换后的日期
|
|
|
std::cout << "年:" << vadate.year << std::endl;
|
|
|
std::cout << "月:" << static_cast<int>(vadate.month) << std::endl;
|
|
|
std::cout << "日:" << static_cast<int>(vadate.day) << std::endl;
|
|
|
std::cout << "时:" << static_cast<int>(vadate.hour) << std::endl;
|
|
|
std::cout << "分:" << static_cast<int>(vadate.minute) << std::endl;
|
|
|
std::cout << "秒:" << static_cast<int>(vadate.second) << std::endl;
|
|
|
ITKCALL(AOM_set_value_date(rows[b], atts[0].c_str(), vadate));
|
|
|
}
|
|
|
else if (strcmp(atts[1].c_str(), "string") == 0) {
|
|
|
printf("获取到了字符串\n");
|
|
|
printf("属性%s=%s\n", atts[0].c_str(), values[a].c_str());
|
|
|
ITKCALL(AOM_set_value_string(rows[b], atts[0].c_str(), values[a].c_str()));
|
|
|
ITKCALL(AOM_UIF_set_value(rows[b], atts[0].c_str(), values[a].c_str()));
|
|
|
}
|
|
|
AOM_save(rows[b]);
|
|
|
AOM_unlock(rows[b]);
|
|
|
AOM_refresh(rows[b], true);
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
char* error = "流程参数配置有误";
|
|
|
EMH_store_error_s2(EMH_severity_error, ITK_err, "提示", error);
|
|
|
return 1;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
AOM_save(reltags[j]);
|
|
|
AOM_unlock(reltags[j]);
|
|
|
AOM_refresh(reltags[j], true);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
//关旁路
|
|
|
POM_AM__set_application_bypass(false);
|
|
|
printf("================================================执行LD_ECN01_SetCICNFormProperty结束================================================\n");
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int LD_515_SetCICNFormProperty(EPM_action_message_t msg) {
|
|
|
printf("开始执行");
|
|
|
//开旁路
|
|
|
POM_AM__set_application_bypass(true);
|
|
|
int att_cnt = 0;
|
|
|
int doc_num = 0;
|
|
|
tag_t rootTask_tag = NULLTAG;
|
|
|
tag_t getfatag = NULLTAG;
|
|
|
tag_t task = NULLTAG;
|
|
|
tag_t* attachments = NULLTAG;
|
|
|
tag_t* doc_tags = NULLTAG;
|
|
|
string error;
|
|
|
char* arg = NULL, * argflag = NULL, * argvalue = NULL;
|
|
|
int arg_cnt = TC_number_of_arguments(msg.arguments);
|
|
|
char* property = NULL, * value = NULL, * type = NULL,* parentwfname = NULL;
|
|
|
task = msg.task;
|
|
|
string erro2 = "";
|
|
|
string erro = "";
|
|
|
int send1 = 0;
|
|
|
int send2 = 0;
|
|
|
ITKCALL(EPM_ask_root_task(task, &rootTask_tag));
|
|
|
if (arg_cnt > 0)
|
|
|
{
|
|
|
for (int i = 0; i < arg_cnt; i++)
|
|
|
{
|
|
|
arg = TC_next_argument(msg.arguments);
|
|
|
ITKCALL(ITK_ask_argument_named_value((const char*)arg, &argflag, &argvalue));
|
|
|
if (strcmp(argflag, "parentwfname") == 0) {
|
|
|
if (argvalue != NULL)
|
|
|
{
|
|
|
printf("获取的值%s:\n", argvalue);
|
|
|
parentwfname = argvalue;
|
|
|
int doc_num1 = 0; tag_t* doc_tags1 = NULLTAG;
|
|
|
ITKCALL(EPM_ask_attachments(rootTask_tag, EPM_target_attachment, &doc_num1, &doc_tags1));
|
|
|
if (doc_num1>0) {
|
|
|
int fatagint; tag_t* fatasks;
|
|
|
ITKCALL(AOM_ask_value_tags(doc_tags1[0], "fnd0AllWorkflows", &fatagint,&fatasks));
|
|
|
int falgnum = 0;
|
|
|
for (int j = 0; j < fatagint;j++) {
|
|
|
char* fataskName;
|
|
|
ITKCALL(AOM_ask_value_string(fatasks[j], "object_name", &fataskName));
|
|
|
printf("fataskName:%s\n", fataskName);
|
|
|
if (strcmp(fataskName, parentwfname) == 0) {
|
|
|
getfatag = fatasks[j];
|
|
|
break;
|
|
|
}
|
|
|
else {
|
|
|
falgnum++;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (falgnum == fatagint) {
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (strcmp(argflag, "property") == 0) {
|
|
|
if (argvalue != NULL)
|
|
|
{
|
|
|
printf("获取的值%s:\n", argvalue);
|
|
|
property = argvalue;
|
|
|
|
|
|
}
|
|
|
}
|
|
|
if (strcmp(argflag, "value") == 0) {
|
|
|
if (argvalue != NULL)
|
|
|
{
|
|
|
printf("获取的值%s:\n", argvalue);
|
|
|
value = argvalue;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
//获取流程下目标关系下的对象
|
|
|
printf("获取流程下目标关系下的对象\n");
|
|
|
ITKCALL(EPM_ask_attachments(rootTask_tag, EPM_target_attachment, &doc_num, &doc_tags));
|
|
|
for (int i = 0; i < doc_num; i++) {
|
|
|
char* objtype = NULL;
|
|
|
ITKCALL(AOM_ask_value_string(doc_tags[i], "object_type", &objtype));
|
|
|
if (strcmp("LD6_CNRevision", objtype) == 0) {
|
|
|
int relnum; tag_t* reltags;
|
|
|
|
|
|
ITKCALL(AOM_ask_value_tags(doc_tags[i], "LD6_WorkFRelation", &relnum, &reltags));
|
|
|
for (int j = 0; j < relnum; j++) {
|
|
|
//获取表单
|
|
|
printf("获取表单\n");
|
|
|
char* formtype;
|
|
|
tag_t form = NULL;
|
|
|
ITKCALL(AOM_ask_value_string(reltags[j], "object_type", &formtype));
|
|
|
if (strcmp(formtype, "LD6_CIForm") == 0 || strcmp(formtype, "LD6_CNForm") == 0) {
|
|
|
printf("开始修改属性值\n");
|
|
|
//开始修改属性值
|
|
|
AOM_lock(reltags[j]);
|
|
|
//获取当前流程节点名称
|
|
|
printf("获取当前流程节点名称\n");
|
|
|
char * getValue;
|
|
|
string taskName = "";
|
|
|
char* taguid;
|
|
|
ITK__convert_tag_to_uid(rootTask_tag, &taguid);
|
|
|
int fathnum;
|
|
|
printf("获取当前流程的跟节点\n");
|
|
|
char* testUid;
|
|
|
ITK__convert_tag_to_uid(rootTask_tag, &testUid);
|
|
|
printf("testUid:%s\n", testUid);
|
|
|
|
|
|
////获取对象rootTask_tag引用关系下的所有对象
|
|
|
//int *getrenums,referNum;
|
|
|
//tag_t* renum;
|
|
|
//char** retags;
|
|
|
//WSOM_where_referenced(rootTask_tag,1, &referNum,&getrenums, &renum, &retags);
|
|
|
//for (int g = 0; g < referNum;g++) {
|
|
|
// char* faname;
|
|
|
// ITKCALL(AOM_ask_value_string(renum[g], "object_name", &faname));
|
|
|
//
|
|
|
|
|
|
//
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
//ITKCALL(AOM_ask_value_tags(rootTask_tag, "parent_processes", &fathnum, &fathtag));
|
|
|
//printf("fathnum:%d\n", fathnum);
|
|
|
/*int allstartnum = 0; tag_t* allstart;
|
|
|
printf("获取跟节点的所有流程任务\n");
|
|
|
ITKCALL(AOM_ask_value_tags(getfatag, "fnd0StartedTasks",&allstartnum, &allstart));
|
|
|
for (int n = 0; n < allstartnum;n++) {
|
|
|
int statesnum; tag_t* statesName;
|
|
|
printf("获取流程任务的uid\n");
|
|
|
ITKCALL(AOM_ask_value_tags(allstart[n], "interprocess_task_dependencies",&statesnum, &statesName));
|
|
|
for (int m = 0; m < statesnum;m++) {
|
|
|
char* gettaguid;
|
|
|
ITK__convert_tag_to_uid(statesName[m], &gettaguid);
|
|
|
printf("判断uid\n");
|
|
|
printf("anssart:%s,%s\n", gettaguid, taguid);
|
|
|
if (strcmp(gettaguid,taguid)==0) {
|
|
|
ITKCALL(AOM_ask_value_string(allstart[n], "object_name", &taskName));
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
}*/
|
|
|
//查询数据库获取父任务的流程对象
|
|
|
//调用java查询sqlserver数据库
|
|
|
printf("开始执行cmd方法");
|
|
|
char cmd[1024] = "";
|
|
|
strcpy(cmd, "java -jar D:\\Siemens\\Teamcenter13\\bin\\sapjco3.jar");
|
|
|
strcat(cmd, " ");
|
|
|
strcat(cmd, " ");
|
|
|
strcat(cmd, "\"SELECT pw.pobject_name from PWORKSPACEOBJECT pw, (SELECT rprimary_objectu from PIMANRELATION where rsecondary_objectu = '?') p WHERE pw.puid = p.rprimary_objectu\"");
|
|
|
strcat(cmd, " ");
|
|
|
strcat(cmd, taguid);
|
|
|
strcat(cmd, " ");
|
|
|
strcat(cmd, "sql");
|
|
|
printf("\n%s\n", cmd);
|
|
|
system(cmd);
|
|
|
//读取本地的result文件(SAP)
|
|
|
string SAPfile = "D:\\TCSELECT\\sqlresult.txt";
|
|
|
std::ifstream file(SAPfile);
|
|
|
if (!file.is_open()) {
|
|
|
std::cerr << "Failed to open file!" << std::endl;
|
|
|
char* error = "数据库查询出错";
|
|
|
EMH_store_error_s2(EMH_severity_error, ITK_err, "提示", error);
|
|
|
return 1;
|
|
|
}
|
|
|
else {
|
|
|
std::stringstream buffer1;
|
|
|
buffer1 << file.rdbuf();
|
|
|
std::string resultStr = buffer1.str();
|
|
|
printf("返回的值%s:\n", resultStr.c_str());
|
|
|
//taskName = (char *)resultStr.c_str();
|
|
|
taskName.append(resultStr);
|
|
|
printf("taskName:%s\n", taskName.c_str());
|
|
|
}
|
|
|
printf("当前流程节点名称为:%s\n", taskName.c_str());
|
|
|
//遍历表格
|
|
|
int num;//表格行数
|
|
|
tag_t* rows = NULL;//表格对象
|
|
|
ITKCALL(AOM_ask_table_rows(reltags[j], "ld6_ChangeTable", &num, &rows));
|
|
|
printf("获取表格\n");
|
|
|
for (int b = 0; b < num; b++) {
|
|
|
ITKCALL(AOM_ask_value_string(rows[b], "ld6_ChangeTaskName", &getValue));
|
|
|
printf("获取到的行:%s\n", getValue);
|
|
|
if (strstr(taskName.c_str(), getValue) != NULL) {
|
|
|
printf("获取到了同名的行\n");
|
|
|
char* flag;
|
|
|
ITKCALL(AOM_ask_value_string(rows[b], "ld6_YNChange", &flag));
|
|
|
printf("获取到ld6_YNChange的属性为:%s\n", flag);
|
|
|
if (strcmp(flag, "是") == 0) {
|
|
|
printf("可以修改\n");
|
|
|
vector<string> pripers;
|
|
|
Split(property, ";", pripers);
|
|
|
vector<string> values;
|
|
|
Split(value, ";", values);
|
|
|
if (pripers.size() == values.size()) {
|
|
|
for (int a = 0; a < pripers.size(); a++) {
|
|
|
AOM_lock(rows[b]);
|
|
|
vector<string> atts;
|
|
|
Split(pripers[a], ".", atts);
|
|
|
if (strcmp(atts[1].c_str(), "date") == 0) {
|
|
|
printf("获取到了时间\n");
|
|
|
date_t vadate;
|
|
|
if (strcmp(values[a].c_str(), "SysDate") == 0) {
|
|
|
// 获取当前时间
|
|
|
auto timeNow = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
|
|
|
// 转换为本地时间
|
|
|
tm localTime;
|
|
|
localtime_s(&localTime, &timeNow);
|
|
|
// 初始化date_t对象
|
|
|
vadate.year = localTime.tm_year + 1900;
|
|
|
vadate.month = static_cast<byte>(localTime.tm_mon) + 1;
|
|
|
vadate.day = static_cast<byte>(localTime.tm_mday);
|
|
|
vadate.hour = static_cast<byte>(localTime.tm_hour);
|
|
|
vadate.minute = static_cast<byte>(localTime.tm_min);
|
|
|
vadate.second = static_cast<byte>(localTime.tm_sec);
|
|
|
}
|
|
|
else {
|
|
|
printf("开始转换时间\n");
|
|
|
//ITKCALL(ITK_string_to_date(values[a].c_str(), &vadate));
|
|
|
/*vector<string> dataList;
|
|
|
Split(values[a].c_str(), "-", dataList);*/
|
|
|
// 创建tm对象,用于存储转换后的日期
|
|
|
std::tm date = {};
|
|
|
|
|
|
// 使用std::istringstream解析日期字符串
|
|
|
std::istringstream iss(values[a].c_str());
|
|
|
iss >> std::get_time(&date, "%Y-%m-%d %H:%M:%S");
|
|
|
// 检查日期是否解析成功
|
|
|
if (iss.fail())
|
|
|
{
|
|
|
std::cout << "转换失败!" << std::endl;
|
|
|
return 1;
|
|
|
}
|
|
|
else {
|
|
|
// 初始化date_t对象
|
|
|
vadate.year = date.tm_year + 1900;
|
|
|
vadate.month = static_cast<byte>(date.tm_mon) + 1;
|
|
|
vadate.day = static_cast<byte>(date.tm_mday);
|
|
|
vadate.hour = static_cast<byte>(date.tm_hour);
|
|
|
vadate.minute = static_cast<byte>(date.tm_min);
|
|
|
vadate.second = static_cast<byte>(date.tm_sec);
|
|
|
}
|
|
|
}
|
|
|
printf("属性%s=%s\n", atts[0].c_str(), values[a].c_str());
|
|
|
// 打印转换后的日期
|
|
|
std::cout << "年:" << vadate.year << std::endl;
|
|
|
std::cout << "月:" << static_cast<int>(vadate.month) << std::endl;
|
|
|
std::cout << "日:" << static_cast<int>(vadate.day) << std::endl;
|
|
|
std::cout << "时:" << static_cast<int>(vadate.hour) << std::endl;
|
|
|
std::cout << "分:" << static_cast<int>(vadate.minute) << std::endl;
|
|
|
std::cout << "秒:" << static_cast<int>(vadate.second) << std::endl;
|
|
|
ITKCALL(AOM_set_value_date(rows[b], atts[0].c_str(), vadate));
|
|
|
}
|
|
|
else if (strcmp(atts[1].c_str(), "string") == 0) {
|
|
|
printf("获取到了字符串\n");
|
|
|
printf("属性%s=%s\n", atts[0].c_str(), values[a].c_str());
|
|
|
ITKCALL(AOM_set_value_string(rows[b], atts[0].c_str(), values[a].c_str()));
|
|
|
ITKCALL(AOM_UIF_set_value(rows[b], atts[0].c_str(), values[a].c_str()));
|
|
|
}
|
|
|
AOM_save(rows[b]);
|
|
|
AOM_unlock(rows[b]);
|
|
|
AOM_refresh(rows[b], true);
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
char* error = "流程参数配置有误";
|
|
|
EMH_store_error_s2(EMH_severity_error, ITK_err, "提示", error);
|
|
|
return 1;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
AOM_save(reltags[j]);
|
|
|
AOM_unlock(reltags[j]);
|
|
|
AOM_refresh(reltags[j], true);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
}
|
|
|
//关旁路
|
|
|
POM_AM__set_application_bypass(false);
|
|
|
}
|
|
|
|
|
|
return 0;
|
|
|
} |