|
|
@@ -632,12 +632,12 @@ QMap<QString,QStringList> SNCDataBase::getLocalClientConfigs()
|
|
|
}
|
|
|
QString SNCDataBase::getAppVersion()
|
|
|
{
|
|
|
- return "7.6.2";//必须是7.1.0三段
|
|
|
+ return "7.6.3";//必须是7.1.0三段
|
|
|
}
|
|
|
|
|
|
QString SNCDataBase::getAppVersion2()
|
|
|
{
|
|
|
- return "7.6.2";
|
|
|
+ return "7.6.3";
|
|
|
}
|
|
|
QString SNCDataBase::getSegVersion()
|
|
|
{
|
|
|
@@ -1195,14 +1195,22 @@ QStringList SNCDataBase::getSegmentByCityAndCorp(QString city, QString corp)
|
|
|
cmcc = getCMCC();
|
|
|
cutc = getCUTC();
|
|
|
ctcc = getCTCC();
|
|
|
- if(corp=="CMCC")
|
|
|
+
|
|
|
+ if(corp=="CMCC") {
|
|
|
where +=" and substr(seg,1,3) in ("+cmcc+")";
|
|
|
- else if(corp=="CUTC")
|
|
|
+ where +=" and substr(seg,1,4) <> '1349'"; //1349号段属于电信
|
|
|
+ }
|
|
|
+ else if(corp=="CUTC") {
|
|
|
where +=" and substr(seg,1,3) in ("+cutc+")";
|
|
|
- else if(corp=="CTCC")
|
|
|
- where +=" and substr(seg,1,3) in ("+ctcc+")";
|
|
|
- else
|
|
|
+ }
|
|
|
+ else if(corp=="CTCC") {
|
|
|
+ //where +=" and substr(seg,1,3) in ("+ctcc+")";
|
|
|
+ where +=" and (substr(seg,1,3) in ("+ctcc+") or substr(seg,1,4) = '1349')"; //1349号段属于电信
|
|
|
+ }
|
|
|
+ else {
|
|
|
where +=" and 0>1 ";
|
|
|
+ }
|
|
|
+
|
|
|
QSqlQuery query;
|
|
|
query.exec("select seg from num.mseg " + where + " order by seg asc ");
|
|
|
QStringList list;
|
|
|
@@ -1281,15 +1289,23 @@ QStringList SNCDataBase::getSegmentDynamic(QString city, QString corp, int days)
|
|
|
cmcc = getCMCC();
|
|
|
cutc = getCUTC();
|
|
|
ctcc = getCTCC();
|
|
|
- if(corp=="CMCC")
|
|
|
+
|
|
|
+ if(corp=="CMCC") {
|
|
|
where +=" and substr(a.seg,1,3) in ("+cmcc+")";
|
|
|
- else if(corp=="CUTC")
|
|
|
+ where +=" and substr(a.seg,1,4) <> '1349'"; //1349号段属于电信
|
|
|
+ }
|
|
|
+ else if(corp=="CUTC") {
|
|
|
where +=" and substr(a.seg,1,3) in ("+cutc+")";
|
|
|
- else if(corp=="CTCC")
|
|
|
- where +=" and substr(a.seg,1,3) in ("+ctcc+")";
|
|
|
- else
|
|
|
+ }
|
|
|
+ else if(corp=="CTCC") {
|
|
|
+ //where +=" and substr(a.seg,1,3) in ("+ctcc+")";
|
|
|
+ where +=" and (substr(a.seg,1,3) in ("+ctcc+") or substr(a.seg,1,4) = '1349')"; //1349号段属于电信
|
|
|
+ }
|
|
|
+ else {
|
|
|
where +=" and 1>0 ";
|
|
|
+ }
|
|
|
where += " and b.check_day<" + QString::number(days);
|
|
|
+
|
|
|
QSqlQuery query;
|
|
|
query.exec("select a.seg,b.s1,b.s2,b.s3,b.s4,b.sample_index,b.recommend_index,b.check_day from num.mseg a LEFT JOIN seg_dynamic b on a.seg = b.seg " + where + " ");
|
|
|
QSqlRecord rec = query.record();
|
|
|
@@ -1354,17 +1370,25 @@ QStringList SNCDataBase::getSegmentDynamicByCityAndCorp(QString city, QString co
|
|
|
//cmcc = "'134','135','136','137','138','139','147','150','151','152','154','157','158','159','182','183','187','188'";
|
|
|
//cutc = "'130','131','132','145','155','156','185','186'";
|
|
|
//ctcc = "'133','153','180','189'";
|
|
|
- cmcc = getCMCC();
|
|
|
- cutc = getCUTC();
|
|
|
- ctcc = getCTCC();
|
|
|
- if(corp=="CMCC")
|
|
|
+ cmcc = getCMCC(); //移动
|
|
|
+ cutc = getCUTC(); //联通
|
|
|
+ ctcc = getCTCC(); //电信
|
|
|
+
|
|
|
+ if(corp=="CMCC") {
|
|
|
where +=" and substr(a.seg,1,3) in ("+cmcc+")";
|
|
|
- else if(corp=="CUTC")
|
|
|
+ where +=" and substr(a.seg,1,4) <> '1349'"; //1349号段属于电信
|
|
|
+ }
|
|
|
+ else if(corp=="CUTC") {
|
|
|
where +=" and substr(a.seg,1,3) in ("+cutc+")";
|
|
|
- else if(corp=="CTCC")
|
|
|
- where +=" and substr(a.seg,1,3) in ("+ctcc+")";
|
|
|
- else
|
|
|
+ }
|
|
|
+ else if(corp=="CTCC") {
|
|
|
+ //where +=" and substr(a.seg,1,3) in ("+ctcc+")";
|
|
|
+ where +=" and (substr(a.seg,1,3) in ("+ctcc+") or substr(a.seg,1,4) = '1349')"; //1349号段属于电信
|
|
|
+ }
|
|
|
+ else {
|
|
|
where +=" and 0>1 ";
|
|
|
+ }
|
|
|
+
|
|
|
QSqlQuery query;
|
|
|
query.exec("select a.seg,b.s1,b.s2,b.s3,b.s4,b.sample_index,b.recommend_index,b.check_day from num.mseg a LEFT JOIN seg_dynamic b on a.seg = b.seg " + where + " ");
|
|
|
QSqlRecord rec = query.record();
|