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.

124 lines
3.4 KiB

#include "epm_handler_common.h"
#include <tc\tc_macros.h>
#include <tc\emh.h>
#include <tc\preferences.h>
#include <property\propdesc.h>
#include <epm\epm.h>
#include <tccore\item.h>
#include <tccore\grm.h>
#include <tccore\imantype.h>
#include <sa\am.h>
#include <sa\sa.h>
#include <tccore\aom.h>
#include <tccore\aom_prop.h>
#include <property\prop_errors.h>
#include <tccore\workspaceobject.h>
#include <pom\pom\pom.h>
#include <epm\cr.h>
#include "ae/dataset.h"
#include <iterator>
#include <map>
#include <vector>
#include <ict/ict_userservice.h>
#include <tc/envelope.h>
#include <tc/folder.h>
#include <fclasses/tc_date.h>
#include "schmgt/schmgt_bridge_itk.h"
#include <iostream>
#include "cfm/cfm.h"
#include "schmgt/schmgt_bridge_itk.h"
#include <iostream>
#include "metaframework/BusinessObjectRef.hxx"
#include "tccore/ItemRevision.hxx"
#include "ps/ps.h"
#include "sstream"
#include <sa/tcfile.h>
#include <sa/tcfile_cache.h>
#include <epm/signoff.h>
#include <tccore/grmtype.h>
#include "epm/EPMTask.hxx"
#include "bom/bom.h"
#include <set>
//#include "easylogging++.h"
#include <libxl.h>
#include "tccore/Item.hxx"
#include "ae/ae.h" //mjf
#include "rapidjson/document.h" // rapidjson's DOM-style API
#include "rapidjson/writer.h"
#include "rapidjson/stringbuffer.h"
#include "rapidjson/prettywriter.h"
#include <strstream>
#include <sstream>
#include "SQLAPI.h"
#include "test.h"
using namespace rapidjson;
using namespace Teamcenter;
using namespace std;
extern "C" int POM_AM__set_application_bypass(logical bypass);
//_INITIALIZE_EASYLOGGINGPP
double stringToNum( string str);
void split(std::string s, const char* delim, std::vector<std::string>* ret);
bool isTypeOf(tag_t objtag, const char * type_name);
void vecToArray(vector<string> &vec,char ***arr);
string WStringToString(const wstring& ws);
wstring StringToWString(const string s);
string getTime();
std::string string_To_UTF8(const std::string str);
string getTime2();
double stringToNum( string str);
string get_excel_data(libxl::Book *book,libxl::Sheet *sheet,int row,int col);
void getLatest(tag_t item,tag_t *rev);
void trim(string &s);
int connor_import_item(tag_t task);
int chint_delete_Bom(tag_t rev);
int connor_import_relation(string path1);
int ChintSendMessage(tag_t task);
int test(string &excelPath);
//<2F><><EFBFBD><EFBFBD>ǩ<EFBFBD>ֲ<EFBFBD><D6B2><EFBFBD>
int wx_signoff2(tag_t task);
int chintSignChange(tag_t task);
//<2F><><EFBFBD><EFBFBD>itemID<49><44>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD>
void queryRevByItemID(string item_id, tag_t *rev);
//<2F><><EFBFBD>ϸ<EFBFBD><CFB8><EFBFBD>
int checkIsTypeOrSubtype(tag_t objtag, char * type_name);
#define DOFREE(obj) \
{ \
if(obj) \
{ \
MEM_free(obj); \
obj = NULL; \
} \
}
#define SAFECALL( argument ) \
{ \
int retcode = argument; \
if ( retcode != ITK_ok ) { \
const char* *err; \
const int *e1,*e2; \
int e; \
EMH_ask_errors(&e,&e1,&e2,&err); \
stringstream err_ss;\
for(auto e_i=0;e_i<e;e_i++){\
err_ss<<err[e_i];\
}\
if(e){ \
LERROR<<"func:"<<__func__<<"line:"<<__LINE__<<" ERROR:"<<err_ss.str();\
} \
} \
}