Parcourir la source

Z991239-6293 #comment feat: 身份证RTA调整

陈纪林80310970 il y a 3 mois
Parent
commit
b655b49641

+ 2 - 1
Module/include/DevFSMCommBase.hpp

@@ -13,6 +13,7 @@
 #include <map>
 #include <string>
 #include "fileutil.h"
+#include "RVCEventCode.h"
 
 #if defined(_MSC_VER)
 #pragma comment(lib, "Version.lib")
@@ -674,7 +675,7 @@ public:
 			ErrorCodeEnum eErrOld = this->GetEntityBase()->GetFunction()->GetPath("DepBak", strOldPath);
 			if (eErrOld != Error_Succeed)
 			{
-				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Get [DepBak] Path failed! errcode:%s.", SpStrError(eErrOld));
+				DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(RTAERR_GETPATH_FAILED)("Get [DepBak] Path failed! errcode:%s.", SpStrError(eErrOld));
 			}
 			strOldPath = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "%s", strOldPath.GetData(), filename);
 

+ 5 - 4
Module/mod_IDCertificate/IDCertFSM.cpp

@@ -909,7 +909,7 @@ ErrorCodeEnum CIDCertFSM::GetPngBlobEx(CBlob &data, CSimpleStringA fileNamePrefi
 	eErr = m_pEntity->GetFunction()->GetPath("Dep", strPath);
 	if (eErr != Error_Succeed)
 	{
-		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Get [Dep] path failed!  errcode:%s.", SpStrError(eErr));
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(RTAERR_GETPATH_FAILED)("Get [Dep] path failed!  errcode:%s.", SpStrError(eErr));
 		return Error_Param;
 	}
 
@@ -920,7 +920,7 @@ ErrorCodeEnum CIDCertFSM::GetPngBlobEx(CBlob &data, CSimpleStringA fileNamePrefi
 		eErr = m_pEntity->GetFunction()->GetPath("DepBak", strOldPath);
 		if (eErr != Error_Succeed)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Get [DepBak] Path failed! errcode:%s.", SpStrError(eErr));
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(RTAERR_GETPATH_FAILED)("Get [DepBak] Path failed! errcode:%s.", SpStrError(eErr));
 			return Error_Param;
 		}
 		strOldPath = strOldPath + SPLIT_SLASH_STR + fileNamePrefix;
@@ -1145,14 +1145,15 @@ int CIDCertFSM::Initial()
 	eErrDev = spEntityFunction->OpenConfig(Config_Root, spConfig);
 	if (eErrDev != Error_Succeed) {
 		LogWarn(Severity_Middle, eErrDev, IDCertificate_UserErrorCode_Open_RootCfg_Failed, "open cfg file failed!");
-		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("open cfg file failed!");
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(RTAERR_CONFIG_OPEN_FAILED).setAPI(__FUNCTION__)("open cfg file failed!");
 		m_bOpening = false;
 		return 2;
 	}
 
 	eErrDev = pEntity->LoadVendorLibName();
 	if (eErrDev != Error_Succeed) {
-		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("get vendor dll(%s)name failed.", pEntity->GetVendorLibName().GetData());
+		LogWarn(Severity_Middle, eErrDev, IDCertificate_UserErrorCode_Get_DevAdapter_Path_Failed, 
+			CSimpleStringA::Format("LoadVendorLibName failed,error:%d", eErrDev));
 		m_bOpening = false;
 		return 2;
 	}

+ 2 - 0
Module/mod_IDCertificate/IDCertFSM.h

@@ -93,6 +93,8 @@ enum BmpType
 #include "IDCerClass.h"
 #include "IDCertificate_def_g.h"
 #include "IDCertificate_LogCode.h"
+#include "RVCEventCode.h"
+
 #pragma region forsonar
 typedef IDCertificate::IDCertService_CancelRead_Info IDCert_CancelRead_Info;
 typedef IDCertificate::IDCertService_ReadAndScanUTF8_Req IDCert_ReadAndScanUTF8_Req; //ex2

+ 1 - 0
Module/mod_IDCertificate/IDCertificate_UserErrorCode.h

@@ -8,6 +8,7 @@
 #define IDCertificate_UserErrorCode_RootInfo			    0x20100204	//root信息
 #define IDCertificate_UserErrorCode_ScanIImageFailed        0x20100205	//扫描图像失败
 
+#define IDCertificate_UserErrorCode_Get_DevAdapter_Path_Failed	0x2010020c //获取适配器路径失败
 #define IDCertificate_UserErrorCode_DevOpenFailed			0x2010020d	//设备打开失败 2010020d
 #define IDCertificate_UserErrorCode_DllLoadFailed			0x2010020e  //厂商适配器加载失败 2010020e
 #define IDCertificate_UserErrorCode_Release_Object_Failed	0x2010020f //释放设备失败