Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_takeout
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhenfei.zhang
fmp_takeout
Commits
77f0ed83
Commit
77f0ed83
authored
Jul 27, 2017
by
yunpeng.song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加可配置partnerId,修复重复new 拒单界面的bug,修改音频文件 的路径
parent
59a0e60e
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
26 additions
and
16 deletions
+26
-16
Control/flowControl.cpp
+5
-5
Control/flowControl.h
+1
-0
DTools/configManger.cpp
+11
-2
DTools/configManger.h
+2
-0
DTools/dataManger.cpp
+1
-1
detailForm.cpp
+1
-1
floatForm.cpp
+2
-2
fmpinittask.cpp
+1
-4
preDefine.h
+1
-0
version.h
+1
-1
No files found.
Control/flowControl.cpp
View file @
77f0ed83
...
@@ -30,6 +30,8 @@ FlowControl::FlowControl()
...
@@ -30,6 +30,8 @@ FlowControl::FlowControl()
QString
m_dbserverIp
=
ConfigManger
::
GetInstance
().
GetDbServerIp
();
QString
m_dbserverIp
=
ConfigManger
::
GetInstance
().
GetDbServerIp
();
int
m_dbserverPort
=
ConfigManger
::
GetInstance
().
GetDbServerPort
();
int
m_dbserverPort
=
ConfigManger
::
GetInstance
().
GetDbServerPort
();
autoconfirm
=
ConfigManger
::
GetInstance
().
GetAutoconfirm
();
autoconfirm
=
ConfigManger
::
GetInstance
().
GetAutoconfirm
();
m_partnerId
=
ConfigManger
::
GetInstance
().
GetPartnerId
();
m_password
=
ConfigManger
::
GetInstance
().
GetPassword
();
FmPlugin
::
GetInstance
().
SetRemoteInfo
(
m_dbserverIp
,
m_dbserverPort
);
FmPlugin
::
GetInstance
().
SetRemoteInfo
(
m_dbserverIp
,
m_dbserverPort
);
QLOG_INFO
()
<<
QString
(
"DBserverIp is %1,port is %2"
).
arg
(
m_dbserverIp
).
arg
(
QString
::
number
(
m_dbserverPort
));
QLOG_INFO
()
<<
QString
(
"DBserverIp is %1,port is %2"
).
arg
(
m_dbserverIp
).
arg
(
QString
::
number
(
m_dbserverPort
));
}
}
...
@@ -61,11 +63,11 @@ void FlowControl::onGetNewStoreInfo(const QString &operator_id, const QString &p
...
@@ -61,11 +63,11 @@ void FlowControl::onGetNewStoreInfo(const QString &operator_id, const QString &p
m_procOrderSocket
=
new
BillSocket
(
this
);
m_procOrderSocket
=
new
BillSocket
(
this
);
_Login
();
_Login
();
}
else
}
/*
else
{
{
emit setStoreInfo(m_storeId);
emit setStoreInfo(m_storeId);
emit setCashierInfo(m_cashierId);
emit setCashierInfo(m_cashierId);
}
}
*/
}
}
bool
FlowControl
::
_Login
()
bool
FlowControl
::
_Login
()
...
@@ -75,7 +77,7 @@ bool FlowControl::_Login()
...
@@ -75,7 +77,7 @@ bool FlowControl::_Login()
QJsonObject
sendJson
;
QJsonObject
sendJson
;
QJsonObject
recvJson
;
QJsonObject
recvJson
;
sendJson
=
DataManger
::
GetInstance
().
GetLoginData
(
m_storeId
,
SERVER_PASSWORD
,
m_posId
,
m_cashierId
);
sendJson
=
DataManger
::
GetInstance
().
GetLoginData
(
m_storeId
,
m_partnerId
,
m_password
,
m_posId
,
m_cashierId
);
emit
showAlert
(
AlertForm
::
LOADING
,
QString
::
fromLocal8Bit
(
"正在登录......"
));
emit
showAlert
(
AlertForm
::
LOADING
,
QString
::
fromLocal8Bit
(
"正在登录......"
));
QLOG_INFO
()
<<
QString
(
"[---login---][requestData:%1]"
).
arg
(
_GetJsonStr
(
sendJson
));
QLOG_INFO
()
<<
QString
(
"[---login---][requestData:%1]"
).
arg
(
_GetJsonStr
(
sendJson
));
result
=
m_loginSocket
->
Request
(
sendJson
,
recvJson
,
error
);
result
=
m_loginSocket
->
Request
(
sendJson
,
recvJson
,
error
);
...
@@ -626,7 +628,6 @@ void FlowControl::onProcessRejectOrder(const QString &orderId, const int &reason
...
@@ -626,7 +628,6 @@ void FlowControl::onProcessRejectOrder(const QString &orderId, const int &reason
void
FlowControl
::
stopFlow
()
void
FlowControl
::
stopFlow
()
{
{
qDebug
()
<<
"flowthread stop"
;
m_available
=
false
;
m_available
=
false
;
if
(
m_loginSocket
)
if
(
m_loginSocket
)
{
{
...
@@ -643,7 +644,6 @@ void FlowControl::stopFlow()
...
@@ -643,7 +644,6 @@ void FlowControl::stopFlow()
m_procOrderSocket
->
deleteLater
();
m_procOrderSocket
->
deleteLater
();
m_procOrderSocket
=
NULL
;
m_procOrderSocket
=
NULL
;
}
}
}
}
Control/flowControl.h
View file @
77f0ed83
...
@@ -30,6 +30,7 @@ private:
...
@@ -30,6 +30,7 @@ private:
int
autoconfirm
;
int
autoconfirm
;
QString
m_storeId
;
QString
m_storeId
;
QString
m_password
;
QString
m_password
;
QString
m_partnerId
;
QString
m_posId
;
QString
m_posId
;
QString
m_cashierId
;
QString
m_cashierId
;
QDateTime
m_bDate
;
QDateTime
m_bDate
;
...
...
DTools/configManger.cpp
View file @
77f0ed83
...
@@ -14,8 +14,7 @@ void ConfigManger::GetStoreInfo(QString &storeId, QString &posNo,QString &cashie
...
@@ -14,8 +14,7 @@ void ConfigManger::GetStoreInfo(QString &storeId, QString &posNo,QString &cashie
storeId
=
_settings
->
GetValue
(
INI_STOREID
).
toString
();
storeId
=
_settings
->
GetValue
(
INI_STOREID
).
toString
();
posNo
=
_settings
->
GetValue
(
INI_POSNO
).
toString
();
posNo
=
_settings
->
GetValue
(
INI_POSNO
).
toString
();
cashierId
=
"001"
;
cashierId
=
"001"
;
//password=_settings->GetValue(INI_PASSWORD).toString();
password
=
_settings
->
GetValue
(
INI_PASSWORD
).
toString
();
password
=
SERVER_PASSWORD
;
}
}
ConfigManger
&
ConfigManger
::
GetInstance
()
ConfigManger
&
ConfigManger
::
GetInstance
()
...
@@ -69,5 +68,15 @@ int ConfigManger::GetAutoconfirm()
...
@@ -69,5 +68,15 @@ int ConfigManger::GetAutoconfirm()
return
_settings
->
GetValue
(
INI_AUTOCONFIRM
).
toInt
();
return
_settings
->
GetValue
(
INI_AUTOCONFIRM
).
toInt
();
}
}
QString
ConfigManger
::
GetPassword
()
{
return
_settings
->
GetValue
(
INI_PASSWORD
).
toString
();
}
QString
ConfigManger
::
GetPartnerId
()
{
return
_settings
->
GetValue
(
INI_PARTNERID
).
toString
();
}
DTools/configManger.h
View file @
77f0ed83
...
@@ -69,6 +69,8 @@ public:
...
@@ -69,6 +69,8 @@ public:
* */
* */
int
GetDbServerPort
();
int
GetDbServerPort
();
int
GetAutoconfirm
();
int
GetAutoconfirm
();
QString
GetPassword
();
QString
GetPartnerId
();
private
:
private
:
ConfigManger
(){}
ConfigManger
(){}
...
...
DTools/dataManger.cpp
View file @
77f0ed83
...
@@ -26,7 +26,7 @@ QJsonObject DataManger::GetLoginData(const QString &storeId, const QString &pass
...
@@ -26,7 +26,7 @@ QJsonObject DataManger::GetLoginData(const QString &storeId, const QString &pass
{
{
QJsonObject
rObj
,
cObj
;
QJsonObject
rObj
,
cObj
;
rObj
.
insert
(
JSON_REQTYPE
,
LOGIN
);
rObj
.
insert
(
JSON_REQTYPE
,
LOGIN
);
cObj
.
insert
(
JSON_USERNAME
,
storeId
);
cObj
.
insert
(
JSON_USERNAME
,
QString
(
"%1%2"
).
arg
(
partnerId
).
arg
(
storeId
)
);
cObj
.
insert
(
JSON_PASSWORD
,
password
);
cObj
.
insert
(
JSON_PASSWORD
,
password
);
rObj
.
insert
(
JSON_CURRENTUSER
,
cObj
);
rObj
.
insert
(
JSON_CURRENTUSER
,
cObj
);
rObj
.
insert
(
JSON_STATIONID
,
stationId
);
rObj
.
insert
(
JSON_STATIONID
,
stationId
);
...
...
detailForm.cpp
View file @
77f0ed83
...
@@ -15,7 +15,7 @@ DetailForm::DetailForm(QWidget *parent) :
...
@@ -15,7 +15,7 @@ DetailForm::DetailForm(QWidget *parent) :
ui
->
setupUi
(
this
);
ui
->
setupUi
(
this
);
connect
(
this
,
&
DetailForm
::
processOrder
,
&
FlowControl
::
GetInstance
(),
&
FlowControl
::
onProcessOrder
);
connect
(
this
,
&
DetailForm
::
processOrder
,
&
FlowControl
::
GetInstance
(),
&
FlowControl
::
onProcessOrder
);
connect
(
this
,
&
DetailForm
::
processRejectOrder
,
&
FlowControl
::
GetInstance
(),
&
FlowControl
::
onProcessRejectOrder
);
connect
(
this
,
&
DetailForm
::
processRejectOrder
,
&
FlowControl
::
GetInstance
(),
&
FlowControl
::
onProcessRejectOrder
);
m_rejectForm
=
NULL
;
_Init
();
_Init
();
}
}
...
...
floatForm.cpp
View file @
77f0ed83
...
@@ -140,12 +140,12 @@ void FloatForm::onStartRemind(int type)
...
@@ -140,12 +140,12 @@ void FloatForm::onStartRemind(int type)
switch
(
type
)
switch
(
type
)
{
{
case
0
:
case
0
:
m_remindWav
=
QString
(
"%1/wav/msg.wav"
).
arg
(
QApplication
::
applicationDirPath
());
m_remindWav
=
QString
(
"%1/wav/msg.wav"
).
arg
(
QApplication
::
applicationDirPath
()
.
replace
(
"bins"
,
"rcc"
)
);
// 加上音频的时长
// 加上音频的时长
m_wavPlayInterval
=
ConfigManger
::
GetInstance
().
GetSoundInterval
()
+
VALUE_NEWORDERTIME
;
m_wavPlayInterval
=
ConfigManger
::
GetInstance
().
GetSoundInterval
()
+
VALUE_NEWORDERTIME
;
break
;
break
;
case
1
:
case
1
:
m_remindWav
=
QString
(
"%1/wav/msg1.wav"
).
arg
(
QApplication
::
applicationDirPath
());
m_remindWav
=
QString
(
"%1/wav/msg1.wav"
).
arg
(
QApplication
::
applicationDirPath
()
.
replace
(
"bins"
,
"rcc"
)
);
m_wavPlayInterval
=
ConfigManger
::
GetInstance
().
GetSoundInterval
()
+
VALUE_REFUNDORDERTIME
;
m_wavPlayInterval
=
ConfigManger
::
GetInstance
().
GetSoundInterval
()
+
VALUE_REFUNDORDERTIME
;
break
;
break
;
}
}
...
...
fmpinittask.cpp
View file @
77f0ed83
...
@@ -37,7 +37,6 @@ void FMPInitTask::LoadTheme(const QString &theme)
...
@@ -37,7 +37,6 @@ void FMPInitTask::LoadTheme(const QString &theme)
{
{
QString
rccPath
=
QString
(
"%1/skin/%2.rcc"
).
arg
(
g_appDir
.
replace
(
"bins"
,
"rcc"
)).
arg
(
theme
);
QString
rccPath
=
QString
(
"%1/skin/%2.rcc"
).
arg
(
g_appDir
.
replace
(
"bins"
,
"rcc"
)).
arg
(
theme
);
qDebug
()
<<
rccPath
;
if
(
!
QFile
(
rccPath
).
exists
())
if
(
!
QFile
(
rccPath
).
exists
())
{
{
return
;
return
;
...
@@ -62,9 +61,8 @@ void FMPInitTask::Init()
...
@@ -62,9 +61,8 @@ void FMPInitTask::Init()
// 将控制器移到工作线程
// 将控制器移到工作线程
// 将门店信息获取控制器移到工作线程
// 将门店信息获取控制器移到工作线程
//SInfoControl::GetInstance().SetListenPort(ConfigManger::GetInstance().GetTcpServerPort());
sInfoThread
.
start
();
SInfoControl
::
GetInstance
().
moveToThread
(
&
sInfoThread
);
SInfoControl
::
GetInstance
().
moveToThread
(
&
sInfoThread
);
sInfoThread
.
start
();
connect
(
&
sInfoThread
,
&
QThread
::
started
,
&
SInfoControl
::
GetInstance
(),
&
SInfoControl
::
run
,
Qt
::
QueuedConnection
);
connect
(
&
sInfoThread
,
&
QThread
::
started
,
&
SInfoControl
::
GetInstance
(),
&
SInfoControl
::
run
,
Qt
::
QueuedConnection
);
connect
(
this
,
&
FMPInitTask
::
stopThread
,
&
SInfoControl
::
GetInstance
(),
&
SInfoControl
::
stopSinfo
,
Qt
::
DirectConnection
);
connect
(
this
,
&
FMPInitTask
::
stopThread
,
&
SInfoControl
::
GetInstance
(),
&
SInfoControl
::
stopSinfo
,
Qt
::
DirectConnection
);
connect
(
&
SInfoControl
::
GetInstance
(),
&
SInfoControl
::
getNewStoreInfo
,
connect
(
&
SInfoControl
::
GetInstance
(),
&
SInfoControl
::
getNewStoreInfo
,
...
@@ -101,7 +99,6 @@ void FMPInitTask::terminateThread()
...
@@ -101,7 +99,6 @@ void FMPInitTask::terminateThread()
emit
stopThread
();
emit
stopThread
();
sInfoThread
.
wait
(
10000
);
sInfoThread
.
wait
(
10000
);
sInfoThread
.
quit
();
sInfoThread
.
quit
();
//workThread.wait(10000);
workThread
.
quit
();
workThread
.
quit
();
entryThread
.
quit
();
entryThread
.
quit
();
}
}
...
...
preDefine.h
View file @
77f0ed83
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#define INI_POSNO "Takeout/PosNo"
#define INI_POSNO "Takeout/PosNo"
#define INI_PASSWORD "Takeout/Password"
#define INI_PASSWORD "Takeout/Password"
#define INI_AUTOCONFIRM "Takeout/AutoConfirm"
#define INI_AUTOCONFIRM "Takeout/AutoConfirm"
#define INI_PARTNERID "Takeout/PartnerId"
#define JSON_REQTYPE "reqtype"
#define JSON_REQTYPE "reqtype"
#define JSON_CURRENTUSER "current_user"
#define JSON_CURRENTUSER "current_user"
...
...
version.h
View file @
77f0ed83
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#define VER_MINOR 1
#define VER_MINOR 1
#define VER_REVISION 0
#define VER_REVISION 0
#define VER_BUILD
3
#define VER_BUILD
4
//! Convert version numbers to string
//! Convert version numbers to string
#define _STR(S) #S
#define _STR(S) #S
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment