duanjianjun hace 2 años
padre
commit
463487eaf4
Se han modificado 2 ficheros con 8 adiciones y 3 borrados
  1. 1 0
      MFCApplication1/CvxText.cpp
  2. 7 3
      MFCApplication1/MFCApplication1Dlg.cpp

+ 1 - 0
MFCApplication1/CvxText.cpp

@@ -796,5 +796,6 @@ int PareseModeJson(preinfo::templatesInfo&  temeplatInfo)
 		_qstc.groups = _vctOpt;
 		page._vecQtChoices.push_back(_qstc);
 	}
+	temeplatInfo.push_back(page);
 	return 0;
 }

+ 7 - 3
MFCApplication1/MFCApplication1Dlg.cpp

@@ -163,6 +163,7 @@ int IdentifyCallback(result::spinfo& pinfo, void* param)
 
 
 HANDLE _threadScan = NULL;
+char* g_strIdentifyMsg[7] = { "正常","内部error","批次号异常","保存路径异常","模板为空","图像列表异常","图像列表不是模板整数倍" };
 DWORD WINAPI ScanThread(void *param)
 {
 	CMFCApplication1Dlg* pWnd = (CMFCApplication1Dlg*)theApp.m_pMainWnd;
@@ -188,7 +189,7 @@ DWORD WINAPI ScanThread(void *param)
 		exitfun();
 		return 0;
 	}
-	nRet = api_processing_images("",
+	nRet = api_processing_images("123456",
 		strTempDir.c_str(),
 		temeplatInfo,
 		sujChiInfo,
@@ -201,7 +202,10 @@ DWORD WINAPI ScanThread(void *param)
 	////启动算法扫描功能
 	if (nRet != RT_OK)
 	{
-		pWnd->FormatScanMsg("扫描失败,errorCode:%d", nRet);
+		if (nRet >= 0 && nRet <= 6)
+			pWnd->FormatScanMsg("扫描失败,错误描述:%s, errorCode:%d", g_strIdentifyMsg[nRet], nRet);
+		else
+			pWnd->FormatScanMsg("扫描失败,errorCode:%d", nRet);
 	}
 	exitfun();
 	return  0L;
@@ -584,6 +588,6 @@ void CMFCApplication1Dlg::FormatScanMsg(const char *szFmt, ...)
 	va_end(ap);
 	CString strMsg;
 	// 扫描异常
-	strMsg.Format(L"%s!\r\n", GB2312ToTstring(szLogMsg).c_str());
+	strMsg.Format(L"%s\r\n", GB2312ToTstring(szLogMsg).c_str());
 	SendMessage(WM_SHOWSCANINFO, (WPARAM)strMsg.GetBuffer(), 0);
 }