#include "respgetfhymht.h" #include #include #include RespGetFhymHt::RespGetFhymHt(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()=="rsCount") { this->rsCount = it.value().toInt32(); } else if(it.name()=="rs") { QScriptValueIterator it2(it.value()); while(it2.hasNext()) { it2.next(); if (it2.flags() & QScriptValue::SkipInEnumeration) continue; QScriptValue sv1 = it2.value(); if (sv1.property("taskid").toInt32() > 0) { map.insert("serialnum",sv1.property("serialnum").toString()); map.insert("taskid",sv1.property("taskid").toString()); map.insert("usercode",sv1.property("usercode").toString()); map.insert("pnumfiletype",sv1.property("pnumfiletype").toString()); map.insert("origfilename",sv1.property("origfilename").toString()); map.insert("hmzs",sv1.property("hmzs").toString()); map.insert("zcsl",sv1.property("zcsl").toString()); map.insert("ycsl",sv1.property("ycsl").toString()); map.insert("wzsl",sv1.property("wzsl").toString()); map.insert("feecount",sv1.property("fee_count").toString()); map.insert("createtime",sv1.property("create_time").toString()); map.insert("finishtime",sv1.property("finish_time").toString()); map.insert("state",sv1.property("state").toString()); map.insert("statestr",sv1.property("statestr").toString()); map.insert("price",sv1.property("price").toString()); map.insert("duefee",sv1.property("duefee").toString()); map.insert("settlefee",sv1.property("settlefee").toString()); map.insert("giftfee",sv1.property("giftfee").toString()); map.insert("memo",sv1.property("memo").toString()); map.insert("isdeliver",sv1.property("isdeliver").toString()); map.insert("delivertime",sv1.property("delivertime").toString()); } } } else { /* QScriptValue sv1 = it.value(); if (sv1.property("taskid").toInt32() > 0) { map.insert("serialnum",sv1.property("serialnum").toString()); map.insert("taskid",sv1.property("taskid").toString()); map.insert("usercode",sv1.property("usercode").toString()); map.insert("pnumfiletype",sv1.property("pnumfiletype").toString()); map.insert("origfilename",sv1.property("origfilename").toString()); map.insert("hmzs",sv1.property("hmzs").toString()); map.insert("zcsl",sv1.property("zcsl").toString()); map.insert("ycsl",sv1.property("ycsl").toString()); map.insert("wzsl",sv1.property("wzsl").toString()); map.insert("feecount",sv1.property("fee_count").toString()); map.insert("createtime",sv1.property("create_time").toString()); map.insert("finishtime",sv1.property("finish_time").toString()); map.insert("state",sv1.property("state").toString()); map.insert("statestr",sv1.property("statestr").toString()); map.insert("price",sv1.property("price").toString()); map.insert("duefee",sv1.property("duefee").toString()); map.insert("settlefee",sv1.property("settlefee").toString()); map.insert("giftfee",sv1.property("giftfee").toString()); map.insert("memo",sv1.property("memo").toString()); map.insert("isdeliver",sv1.property("isdeliver").toString()); map.insert("delivertime",sv1.property("delivertime").toString()); }*/ } } } } int RespGetFhymHt::getRtnCode() { return this->rtnCode; } QString RespGetFhymHt::getRtnMemo() { return this->rtnMemo; } int RespGetFhymHt::getRsCount() { return this->rsCount; } QMultiMap RespGetFhymHt::getRs() { return this->map; }