Commit 4daf93a9 by wuyang.zou

fix bug: Filter Hype-v Create Default Virtual Machine Ip

         like 10.57.*.*
parent 22e1c231
......@@ -177,7 +177,8 @@ void FlowControl::_GetIpAddress()
if(address.protocol() == QAbstractSocket::IPv4Protocol) {
QLOG_INFO()<<QString("[<<<<---FlowControl::_GetIpAddress getFromLocalHostName:%1--->>>>]").arg(address.toString());
//1.1.1.1 > length > 7
if(address.toString().length()>7 && address.toString()!= "127.0.0.1" && !(address.toString().contains("192.168.") ) ) {
if(address.toString().length()>7 && address.toString()!= "127.0.0.1" && !(address.toString().contains("192.168."))
&& !(address.toString().contains("10.0.75.1") ) && !(address.toString().contains("172.") ) ) {
ipAddress=address.toString();
QLOG_INFO()<<QString("[<<<<---FlowControl::_GetIpAddress Request Real IpAddress:%1--->>>>]").arg(address.toString());
break;
......@@ -583,13 +584,13 @@ bool FlowControl::_Login()
m_reportOMSReocrdOrderTimer->start(1000*5);
m_notifySimPullTimer->start(10*1000);
m_remindCasherBlinkFloatTimer->start(5*1000);
//_AddOrderPull(QString(),QString());
//在登陆时再次检查数据库连接是否都正常;
if(!m_initPmsGetStoreConfigDBRet || !m_initPmsOrdersDataRet) {
if ( !m_initPmsGetStoreConfigDBRet ) {
result = false;
QLOG_INFO()<<QString("[<<<<---FlowControl::_Login() m_initPmsGetStoreConfigDBRet, m_initPmsOrdersDataRet:--->>>>]")
<<m_initPmsGetStoreConfigDBRet <<m_initPmsOrdersDataRet;
emit showAlert(AlertForm::MSGERROR, QString::fromLocal8Bit("尝试打开PMS数据库(StoreConfig** 或 Orders**)失败"));
emit showAlert(AlertForm::MSGERROR, QString::fromLocal8Bit("尝试打开PMS数据库(StoreConfig**)失败"));
} else {
_AddOrderPull(QString(),QString());
}
......@@ -2302,6 +2303,11 @@ bool FlowControl::_PmsMachineReqTryLogin()
bool bGetStoreCnf = PmsGetStoreConfig::getInstance().GetStoreConfig(m_storeId,m_posId,m_cashierId,m_cashierName,m_pmsMachineNo);
if(!bGetStoreCnf) {
QLOG_ERROR()<<QString::fromLocal8Bit("[<<<<---FlowControl::_PmsMachineReqTryLogin() Failed:--->>>>>]");
m_initPmsGetStoreConfigDBRet = PmsGetStoreConfig::getInstance().initPmsStoreConfigDB();
QLOG_INFO()<<QString::fromLocal8Bit("[<<<<---FlowControl::_PmsMachineReqTryLogin() m_initPmsGetStoreConfigDBRet:--->>>>]")
<<m_initPmsGetStoreConfigDBRet;
return true;
}
if(m_bFirstRecvInfo || !m_bLoginResult) {
......
@echo OFF
if not "%~1"=="p" start /min cmd.exe /c %0 p&exit
echo !!!!!!!!准备安装PMS插件相关程序!!!!!!!!!!
echo _________________________________________
echo _________________________________________
echo .
echo !!!!!!!!请勿关闭此窗口!!!!!!!!!!
echo !!!!!!!!请勿关闭此窗口!!!!!!!!!!
echo .
echo !!!!!!!!!!!!!请耐心等待 3 分钟左右!!!!!!!!!!!!!!
echo !!!!!!!!程序安装完成后,此窗口会自动关闭!!!!!!!!!!!!
echo .
echo !!!!!!!!请勿关闭此窗口!!!!!!!!!!
echo !!!!!!!!请勿关闭此窗口!!!!!!!!!!
echo .
echo _________________________________________
echo _________________________________________
echo ................
rem #1、进入当前BAT脚本所在的目录;
set curdir=%~dp0
cd /d %curdir%
rem #1.1、判断当前进程是存在,存在则kill;
tasklist>C:\FMtasklist.txt
find "PmsPlugin.exe" C:\FMtasklist.txt&&taskkill /f /im "PmsPlugin.exe"
rem 2、判断指定的两个目录是否存在,存在则备份;
if exist c:\Freemud\PmsPlugin (
echo "已经存在目录: PmsPlugin; 备份原始,更新当前包"
move c:\Freemud\PmsPlugin c:\Freemud\PmsPlugin_bak
md c:\Freemud\PmsPlugin
)
ping -n 10 127.1>nul
rem #3、拷贝安装包目录下的两个程序包到指定的C盘目录;
xcopy /s/e/y/i/f PmsPlugin c:\Freemud\PmsPlugin
echo "拷贝程序包到目标目录完成"
ping -n 10 127.1>nul
rem 3、将PmsPlugin目录下的开机启动外卖插件程序的bat脚本拷贝到系统启动项中;
copy c:\Freemud\PmsPlugin\StartPmsPluginProgram.bat c:\Users\Administrator\AppData\Roaming\Microsoft\Windows\"Start Menu"\Programs\Startup\
rem copy c:\Freemud\PmsPlugin\StartPmsPluginProgram.bat C:\Freemud\"zwy abc"\
echo "拷贝开机自启动脚本 StartPmsPluginProgram.bat 到指定目录完成"
ping -n 10 127.1>nul
rem 4、程序安装完成后,启动插件程序;
IF EXIST C:\Freemud\PmsPlugin\PmsPlugin.exe start "" "C:\Freemud\PmsPlugin\PmsPlugin.exe"
echo !!!!!!!!启动程序完成!!!!!!!!
@echo OFF
if not "%~1"=="p" start /min cmd.exe /c %0 p&exit
echo !!!!!!!!准备启动外卖插件程序!!!!!!!!!!
echo _________________________________________
echo _________________________________________
echo .
echo !!!!!!!!请勿关闭此窗口!!!!!!!!!!
echo !!!!!!!!请勿关闭此窗口!!!!!!!!!!
echo .
echo !!!!!!!!!!!!!请耐心等待 5 分钟左右!!!!!!!!!!!!!!
echo !!!!!!!!程序启动后,此窗口会自动关闭!!!!!!!!!!!!
echo .
echo !!!!!!!!请勿关闭此窗口!!!!!!!!!!
echo !!!!!!!!请勿关闭此窗口!!!!!!!!!!
echo .
echo _________________________________________
echo _________________________________________
echo ................
ping 127.0.0.200 -n 300 >nul
IF EXIST C:\Freemud\PmsPlugin\PmsPlugin.exe start "" "C:\Freemud\PmsPlugin\PmsPlugin.exe"
rem ----------------------------------------------------------------------------------
rem 指定待删除FmPlugin日志文件的存放路径
set SrcFmPluginDir=C:\Freemud\PmsPlugin\log\
rem 指定删除天数的日志文件:日志文件的修改日期 与 当前日期的 天数 差值;
set DaysAgo=60
forfiles /p %SrcFmPluginDir% /s /m *.* /d -%DaysAgo% /c "cmd /c del /f /q /a @path"
rem ---------------------------------------------------------------------------------------------
echo !!!!!!!!启动程序完成!!!!!!!!
rem ----------------------------------------------------------------------------------
ping 127.0.0.200 -n 10 >nul
sc start PmsPluginDaemon
echo !!!!!!!!启动守护服务成功!!!!!!!!
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment