| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #include "ssomanage.h"
- #include "WSSSO.h"
- #include "respgetusersso.h"
- #include "sncdatabase.h"
- #include "respgetsysaccount.h"
- SSOManage::SSOManage(QString userHash)
- {
- this->userHash = userHash;
- }
- void SSOManage::run()
- {
- WSSSO sso;
- QString json = sso.getUserSSO(userHash);
- RespGetUserSSO response(json);
- if(response.getRtnCode() != 1)
- {
- emit message("»ñÈ¡µÇ¼ÐÅϢʧ°Ü!");
- }
- else
- {
- QMultiMap<QString,QString> ssoInfo = response.getRs();
- QMap<QString,QString> shunshiInfo;
- QMap<QString,QString> mingyuanInfo;
- QStringList sysCodes = ssoInfo.values("sysCode");
- for(int i=0;i<sysCodes.size();i++)
- {
- WSSSO sso3;
- QString json = sso3.getSysAccount(sysCodes.at(i),userHash);
- RespGetSysAccount response3(json);
- if(sysCodes.at(i)=="1")
- {
- shunshiInfo.insert("usercode",response3.getUserCode());
- shunshiInfo.insert("userpwd",response3.getUserPwd());
- }
- else if(sysCodes.at(i)=="2")
- {
- mingyuanInfo.insert("usercode",response3.getUserCode());
- mingyuanInfo.insert("userpwd",response3.getUserPwd());
- }
- }
- emit accountInfoUpdated(shunshiInfo,mingyuanInfo);
- }
- }
|