


#ifndef EPM_HANDLER_COMMON
#define EPM_HANDLER_COMMON

#include "tinyxml.h"
#include <string>
#include <xstring>
#include <vector>
#include <map>
#include <ctime>
#include<iostream>
#include <fstream>
#include <res\res_itk.h>
#include <tc\preferences.h>
#include <tc\tc_macros.h>
#include <tc\folder.h>
#include <qry\qry.h>
#include <fclasses/tc_date.h>
#include <epm/signoff.h>
#include <schmgt\schmgt_bridge_itk.h>
#include <epm/epm.h>
#include <epm/epm_task_template_itk.h>
#include <ae/ae.h>
#include <ics/ics.h>
#include <ict/ict_userservice.h>
#include <bom/bom.h>
#include <tccore\aom_prop.h>
#include <tccore//grm.h>
#include <tccore/grmtype.h>
#include <tccore\item.h>
#include <tccore\aom.h>
#include <sa/user.h>
#include <ics/ics2.h>
#include <wininet.h>
#include<io.h>
#include "ocilib.h"
#include "connor_itk_util.h"
#include <lov/lov.h>
#import "C:\Program Files\Common Files\System\ado\msado15.dll" no_namespace rename("EOF","adoEOF")rename("BOF","adoBOF")

#pragma comment(lib, "WinInet.lib")

using namespace std; 

#ifdef __cplusplus
extern "C" {
#endif

#define DOFREE(obj);
	extern "C" int POM_AM__set_application_bypass(logical bypass);
	bool create_adhoc_signoff(tag_t current_task, vector<tag_t> userID);
	const char * inputFileToFtp(char * filePath);
	char * getLineCode(char * lineCode);
	//void removeChar(char* str, char c);
	char* U2G(const char* utf8);
	const char* newGUID();
	string replace_all_distinct(char* strC, char*  old_valueC, char*  new_valueC);
	void split(char *src, const char *separator, char **dest, int *num);
	int gbk_strlen(const char* str);
	void stringToLenth(int value, int num, char ** result);
	bool count(vector<char *> values, char * value);
	void BOMSendToWeixin(char * userId, tag_t rootTask_tag, string message);
	void itemSendToWeixin(char * userId, tag_t rootTask_tag, string message);
	void TCFindItem(char * queryName, int n_entries, char ** qry_entries, char ** qry_values, int * n_found, tag_t ** dba_mbrs);
	void TCGetPropertyValue(tag_t item, char * type, char * propertyName, char ** propertyValue);
	int ORIGIN_set_bypass(void *returnValue);
	int ORIGIN_close_bypass(void *returnValue);
	int RB_SendErpItem(EPM_action_message_t msg);
	int RB_SendErpBom(EPM_action_message_t msg);
	int RB_CheckForCompletion(EPM_action_message_t msg);
	int RB_PLM2LIMS_JCSY(EPM_action_message_t msg);
	int RB_testquery_ID(EPM_action_message_t msg);
	bool startsWith(const char* str, char first, char second);
	char* removeChar(char* str, char charToRemove);
	char* removeSpaces(char* str);
	void removeFirstFourChars(char* str);
	char* getFirstStr(const char* str, int index);
	void getClassValue(char* value, int id, char** disValue);
	int RB_SendErpItem_New(EPM_action_message_t msg);
	int RB_SendErpBom_New(EPM_action_message_t msg);
	int RB_Send_MDM_GYLX_New(EPM_action_message_t msg);
	int RB_SendGX_New(EPM_action_message_t msg);
	int RB_SendErpItem_New_Rule(EPM_rule_message_t msg);
	int RB_SendErpBom_New_Rule(EPM_rule_message_t msg);
	int RB_SendErpItem_New_Rule_Release(EPM_rule_message_t msg);
	int RB_SendErpBom_New_Rule_Release(EPM_rule_message_t msg);
	int RB_BOM_TO_ERP(EPM_action_message_t msg);
#ifdef __cplusplus
}
#endif

#endif 


/**
* @}
*/