| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- #include "respsubmitjsjcfile.h"
- #include <QScriptValue>
- #include <QScriptEngine>
- #include <QScriptValueIterator>
- RespSubmitJSJCfile::RespSubmitJSJCfile(QString json)
- {
- this->json = json;
- QScriptEngine engine;
- QScriptValue sv = engine.evaluate("value = " + this->json);
- QScriptValueIterator it(sv);
- if(json.isEmpty())
- {
- rtnCode = RTNCODE_NETWORK_NOTAVAILABLE;
- rtnMemo = RTNMEMO_NETWORK_NOTAVAILABLE;
- }
- else if(json=="ABORT")
- {
- rtnCode = RTNCODE_NETWORK_ABORT;
- rtnMemo = RTNMEMO_NETWORK_ABORT;
- }
- else
- {
- rtnCode = RTNCODE_INVALID_FORMAT;
- rtnMemo = RTNMEMO_INVALID_FORMAT;
- while (it.hasNext())
- {
- it.next();
- if(it.name()=="rtnCode")
- {
- this->rtnCode = it.value().toInt32();
- }
- else if(it.name()=="rtnMemo")
- {
- this->rtnMemo = it.value().toString();
- }
- else if(it.name()=="ltfid")
- {
- this->batchid = it.value().toString();
- }
- else if(it.name()=="inserttime")
- {
- this->insertTime = it.value().toString();
- }
- else if(it.name()=="submitNum")
- {
- this->submitNum = it.value().toInt32();
- }
- }
- }
- }
- int RespSubmitJSJCfile::getRtnCode()
- {
- return this->rtnCode;
- }
- QString RespSubmitJSJCfile::getRtnMemo()
- {
- return this->rtnMemo;
- }
- int RespSubmitJSJCfile::getSubmitNum()
- {
- return this->submitNum;
- }
- QString RespSubmitJSJCfile::getBatchID()
- {
- return this->batchid;
- }
- QString RespSubmitJSJCfile::getInsertTime()
- {
- return this->insertTime;
- }
|