#include "epm_handler_common.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "ae/dataset.h" #include #include #include #include #include #include #include #include "schmgt/schmgt_bridge_itk.h" #include #include "cfm/cfm.h" #include "schmgt/schmgt_bridge_itk.h" #include #include "metaframework/BusinessObjectRef.hxx" #include "tccore/ItemRevision.hxx" #include "ps/ps.h" #include "sstream" #include #include #include #include #include "epm/EPMTask.hxx" #include "bom/bom.h" #include //#include "easylogging++.h" #include #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 #include #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* ret); bool isTypeOf(tag_t objtag, const char * type_name); void vecToArray(vector &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); //万向签字测试 int wx_signoff2(tag_t task); int chintSignChange(tag_t task); //根据itemID查询零件版本 void queryRevByItemID(string item_id, tag_t *rev); //物料更新 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