|
@@ -1,8 +1,9 @@
|
|
|
#include "formwoolfinished.h"
|
|
#include "formwoolfinished.h"
|
|
|
#include "ui_formwoolfinished.h"
|
|
#include "ui_formwoolfinished.h"
|
|
|
#include "sncdatabase.h"
|
|
#include "sncdatabase.h"
|
|
|
-#include "respdlresultfile.h"
|
|
|
|
|
|
|
+#include "respdlfhymresultfile.h"
|
|
|
#include "zip.h"
|
|
#include "zip.h"
|
|
|
|
|
+
|
|
|
FormWoolFinished::FormWoolFinished(QWidget *parent) :
|
|
FormWoolFinished::FormWoolFinished(QWidget *parent) :
|
|
|
QWidget(parent),
|
|
QWidget(parent),
|
|
|
ui(new Ui::FormWoolFinished)
|
|
ui(new Ui::FormWoolFinished)
|
|
@@ -14,10 +15,10 @@ FormWoolFinished::FormWoolFinished(QWidget *parent) :
|
|
|
setDetailNoData();
|
|
setDetailNoData();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void FormWoolFinished::setClientID(QString clientID)
|
|
|
|
|
-{
|
|
|
|
|
- m_clientID = clientID;
|
|
|
|
|
-}
|
|
|
|
|
|
|
+//void FormWoolFinished::setClientID(QString clientID)
|
|
|
|
|
+//{
|
|
|
|
|
+// m_clientID = clientID;
|
|
|
|
|
+//}
|
|
|
|
|
|
|
|
void FormWoolFinished::setClientName(QString clientName)
|
|
void FormWoolFinished::setClientName(QString clientName)
|
|
|
{
|
|
{
|
|
@@ -38,20 +39,20 @@ FormWoolFinished::~FormWoolFinished()
|
|
|
delete m_movieBig;
|
|
delete m_movieBig;
|
|
|
delete m_wool;
|
|
delete m_wool;
|
|
|
delete ui;
|
|
delete ui;
|
|
|
- qDebug()<<QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss")\
|
|
|
|
|
- <<"FormWool.FormWoolFinished Destroyed.";
|
|
|
|
|
|
|
+ qDebug() << QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss")\
|
|
|
|
|
+ << "FormWool.FormWoolFinished Destroyed.";
|
|
|
}
|
|
}
|
|
|
void FormWoolFinished::initVariables()
|
|
void FormWoolFinished::initVariables()
|
|
|
{
|
|
{
|
|
|
|
|
+ m_clientName = "wool";
|
|
|
m_movieBig = new QMovie(":/fetchfromserver.gif");
|
|
m_movieBig = new QMovie(":/fetchfromserver.gif");
|
|
|
m_movieBig->start();
|
|
m_movieBig->start();
|
|
|
|
|
|
|
|
|
|
+ m_keys << "taskid" << "isdeliver" << "pnumfiletype" << "origfilename" << "createtime" << "finishtime"\
|
|
|
|
|
+ << "hmzs" << "feecount" << "zcsl" << "ycsl" << "wzsl" << "settlefee" << "giftfee";
|
|
|
|
|
|
|
|
- m_keys<<"batchid"<<"isdeliver"<<"ispass"<<"detail"<<"resulttj"<<"submittime"<<"finishtime"\
|
|
|
|
|
- <<"finishcount"<<"settlefee"<<"giftfee";
|
|
|
|
|
-
|
|
|
|
|
- m_headers<<""<<"状态"<<"是否放行"<<"原始文件"<<"详细统计"<<"提交时间"<<"完成时间"\
|
|
|
|
|
- <<"已检测"<<"费用"<<"赠送消耗"<<"下载";
|
|
|
|
|
|
|
+ m_headers << "" << "状态" << "文件类型" << "原始文件" << "提交时间" << "完成时间" \
|
|
|
|
|
+ << "号码总数" << "计费数量" << "正常数量" << "异常数量" << "未知数量" << "费用" << "赠送消耗" << "下载";
|
|
|
m_state = NotLogin;
|
|
m_state = NotLogin;
|
|
|
m_curLtfid = "";
|
|
m_curLtfid = "";
|
|
|
m_curQryid = "";
|
|
m_curQryid = "";
|
|
@@ -59,12 +60,13 @@ void FormWoolFinished::initVariables()
|
|
|
|
|
|
|
|
m_wool = new WSWool();
|
|
m_wool = new WSWool();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
void FormWoolFinished::setAccountInfo(QMap<QString, QString> info)
|
|
void FormWoolFinished::setAccountInfo(QMap<QString, QString> info)
|
|
|
{
|
|
{
|
|
|
m_account = info;
|
|
m_account = info;
|
|
|
QString ssoHash = info.value("ssohash");
|
|
QString ssoHash = info.value("ssohash");
|
|
|
QString userCode = info.value("usercode");
|
|
QString userCode = info.value("usercode");
|
|
|
- QString userHash = info.value("userhash");
|
|
|
|
|
|
|
+ QString userHash = info.value("ssohash");
|
|
|
if(!ssoHash.isEmpty())
|
|
if(!ssoHash.isEmpty())
|
|
|
{
|
|
{
|
|
|
if(!userHash.isEmpty())
|
|
if(!userHash.isEmpty())
|
|
@@ -118,15 +120,21 @@ void FormWoolFinished::initUI()
|
|
|
ui->tableWidget->setColumnWidth(col++,20);
|
|
ui->tableWidget->setColumnWidth(col++,20);
|
|
|
ui->tableWidget->setColumnWidth(col++,30);
|
|
ui->tableWidget->setColumnWidth(col++,30);
|
|
|
ui->tableWidget->setColumnWidth(col++,0);
|
|
ui->tableWidget->setColumnWidth(col++,0);
|
|
|
- ui->tableWidget->setColumnWidth(col++,110);
|
|
|
|
|
- ui->tableWidget->setColumnWidth(col++,0);//
|
|
|
|
|
- ui->tableWidget->setColumnWidth(col++,140);
|
|
|
|
|
|
|
+ ui->tableWidget->setColumnWidth(col++,130);
|
|
|
|
|
+ ui->tableWidget->setColumnWidth(col++,0);
|
|
|
ui->tableWidget->setColumnWidth(col++,140);
|
|
ui->tableWidget->setColumnWidth(col++,140);
|
|
|
|
|
+ ui->tableWidget->setColumnWidth(col++,0);
|
|
|
ui->tableWidget->setColumnWidth(col++,73);
|
|
ui->tableWidget->setColumnWidth(col++,73);
|
|
|
- ui->tableWidget->setColumnWidth(col++,61);
|
|
|
|
|
ui->tableWidget->setColumnWidth(col++,60);
|
|
ui->tableWidget->setColumnWidth(col++,60);
|
|
|
|
|
+ ui->tableWidget->setColumnWidth(col++,60);
|
|
|
|
|
+ ui->tableWidget->setColumnWidth(col++,60);
|
|
|
|
|
+ ui->tableWidget->setColumnWidth(col++,60);
|
|
|
|
|
+ ui->tableWidget->setColumnWidth(col++,0);
|
|
|
ui->tableWidget->setColumnWidth(col++,40);
|
|
ui->tableWidget->setColumnWidth(col++,40);
|
|
|
|
|
|
|
|
|
|
+ //m_headers << "" << "状态" << "文件类型" << "原始文件" << "提交时间" << "完成时间" \
|
|
|
|
|
+ //<< "号码总数" << "计费数量" << "正常数量" << "异常数量" << "未知数量" << "费用" << "赠送消耗" << "下载";
|
|
|
|
|
+
|
|
|
ui->widgetExactCheck->setProperty("class","lowframe2");
|
|
ui->widgetExactCheck->setProperty("class","lowframe2");
|
|
|
|
|
|
|
|
//初始化预检测 实号、空、停、关机对应的显示图片exact_result_bg.jpg
|
|
//初始化预检测 实号、空、停、关机对应的显示图片exact_result_bg.jpg
|
|
@@ -134,40 +142,25 @@ void FormWoolFinished::initUI()
|
|
|
int nHeight = exact_result_bg.height()/10;
|
|
int nHeight = exact_result_bg.height()/10;
|
|
|
int nWidth = exact_result_bg.width();
|
|
int nWidth = exact_result_bg.width();
|
|
|
|
|
|
|
|
- ui->labelBarQwld->setPixmap(exact_result_bg.copy(QRect(0 , 0 * nHeight, nWidth, nHeight)));
|
|
|
|
|
- ui->labelBarLaji->setPixmap(exact_result_bg.copy(QRect(0 , 1 * nHeight, nWidth, nHeight)));
|
|
|
|
|
- ui->labelBarShiHao->setPixmap(exact_result_bg.copy(QRect(0 , 2 * nHeight, nWidth, nHeight)));
|
|
|
|
|
- ui->labelBarKong->setPixmap(exact_result_bg.copy(QRect(0 , 3 * nHeight, nWidth, nHeight)));
|
|
|
|
|
- ui->labelBarTing->setPixmap(exact_result_bg.copy(QRect(0 , 4 * nHeight, nWidth, nHeight)));
|
|
|
|
|
- ui->labelBarGuan->setPixmap(exact_result_bg.copy(QRect(0 , 5 * nHeight, nWidth, nHeight)));
|
|
|
|
|
-
|
|
|
|
|
- ui->labelBarHrxz->setPixmap(exact_result_bg.copy(QRect(0 , 6 * nHeight, nWidth, nHeight)));
|
|
|
|
|
- ui->labelBarWfjt->setPixmap(exact_result_bg.copy(QRect(0 , 7 * nHeight, nWidth, nHeight)));
|
|
|
|
|
- ui->labelBarLdtx->setPixmap(exact_result_bg.copy(QRect(0 , 8 * nHeight, nWidth, nHeight)));
|
|
|
|
|
- ui->labelBarOther->setPixmap(exact_result_bg.copy(QRect(0 , 9 * nHeight, nWidth, nHeight)));
|
|
|
|
|
|
|
+ ui->labelBarZc->setPixmap(exact_result_bg.copy(QRect(0 , 0 * nHeight, nWidth, nHeight)));
|
|
|
|
|
+ ui->labelBarYc->setPixmap(exact_result_bg.copy(QRect(0 , 1 * nHeight, nWidth, nHeight)));
|
|
|
|
|
+ ui->labelBarWz->setPixmap(exact_result_bg.copy(QRect(0 , 4 * nHeight, nWidth, nHeight)));
|
|
|
|
|
|
|
|
//初始化图例图标实号、空、停、关机对应的显示图片sample_small.jpg
|
|
//初始化图例图标实号、空、停、关机对应的显示图片sample_small.jpg
|
|
|
QPixmap sample_small(":/sample_small.jpg");
|
|
QPixmap sample_small(":/sample_small.jpg");
|
|
|
nHeight = sample_small.height();
|
|
nHeight = sample_small.height();
|
|
|
nWidth = sample_small.width()/10;
|
|
nWidth = sample_small.width()/10;
|
|
|
|
|
|
|
|
- ui->labelSampleQwdr->setPixmap(sample_small.copy(QRect(0 * nWidth , 0 , nWidth, nHeight)));
|
|
|
|
|
- ui->labelSampleLaji->setPixmap(sample_small.copy(QRect(1 * nWidth , 0 , nWidth, nHeight)));
|
|
|
|
|
- ui->labelSampleShiHao->setPixmap(sample_small.copy(QRect(2 * nWidth , 0 , nWidth, nHeight)));
|
|
|
|
|
- ui->labelSampleKong->setPixmap(sample_small.copy(QRect(3 * nWidth , 0 , nWidth, nHeight)));
|
|
|
|
|
- ui->labelSampleTing->setPixmap(sample_small.copy(QRect(4 * nWidth , 0 , nWidth, nHeight)));
|
|
|
|
|
- ui->labelSampleGuan->setPixmap(sample_small.copy(QRect(5 * nWidth , 0 , nWidth, nHeight)));
|
|
|
|
|
- ui->labelSampleHrxz->setPixmap(sample_small.copy(QRect(6 * nWidth , 0 , nWidth, nHeight)));
|
|
|
|
|
- ui->labelSampleWfjt->setPixmap(sample_small.copy(QRect(7 * nWidth , 0 , nWidth, nHeight)));
|
|
|
|
|
- ui->labelSampleLdtx->setPixmap(sample_small.copy(QRect(8 * nWidth , 0 , nWidth, nHeight)));
|
|
|
|
|
- ui->labelSampleOther->setPixmap(sample_small.copy(QRect(9 * nWidth , 0 , nWidth, nHeight)));
|
|
|
|
|
|
|
+ ui->labelSampleZc->setPixmap(sample_small.copy(QRect(0 * nWidth , 0 , nWidth, nHeight)));
|
|
|
|
|
+ ui->labelSampleYc->setPixmap(sample_small.copy(QRect(1 * nWidth , 0 , nWidth, nHeight)));
|
|
|
|
|
+ ui->labelSampleWz->setPixmap(sample_small.copy(QRect(4 * nWidth , 0 , nWidth, nHeight)));
|
|
|
|
|
|
|
|
ui->pushButtonDel->setVisible(false);
|
|
ui->pushButtonDel->setVisible(false);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void FormWoolFinished::setTableWidgetNoData(QTableWidget *tableWidget)
|
|
void FormWoolFinished::setTableWidgetNoData(QTableWidget *tableWidget)
|
|
|
{
|
|
{
|
|
|
- prepareTableWidgetCells(tableWidget,8);
|
|
|
|
|
|
|
+ prepareTableWidgetCells(tableWidget,15);
|
|
|
tableWidget->setEnabled(false);
|
|
tableWidget->setEnabled(false);
|
|
|
QTableWidgetItem *item = new QTableWidgetItem();
|
|
QTableWidgetItem *item = new QTableWidgetItem();
|
|
|
item->setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
|
item->setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
|
@@ -177,33 +170,19 @@ void FormWoolFinished::setTableWidgetNoData(QTableWidget *tableWidget)
|
|
|
|
|
|
|
|
void FormWoolFinished::setDetailNoData()
|
|
void FormWoolFinished::setDetailNoData()
|
|
|
{
|
|
{
|
|
|
- ui->labelShiHao->setText("实号");
|
|
|
|
|
- ui->labelKong->setText("空号");
|
|
|
|
|
- ui->labelTing->setText("停机");
|
|
|
|
|
- ui->labelGuan->setText("关机");
|
|
|
|
|
- ui->labelWfjt->setText("无法接通");
|
|
|
|
|
- ui->labelLdtx->setText("来电提醒");
|
|
|
|
|
- ui->labelHrxz->setText("呼入限制");
|
|
|
|
|
- ui->labelQwld->setText("请勿来电");
|
|
|
|
|
- ui->labelLaji->setText("垃圾号码");
|
|
|
|
|
- ui->labelOther->setText("其他");
|
|
|
|
|
|
|
+ ui->labelZc->setText("正常");
|
|
|
|
|
+ ui->labelYc->setText("异常");
|
|
|
|
|
+ ui->labelWz->setText("未知");
|
|
|
|
|
|
|
|
//设置上述状态比例的默认宽度为0
|
|
//设置上述状态比例的默认宽度为0
|
|
|
- ui->labelBarShiHao->setFixedWidth(0);
|
|
|
|
|
- ui->labelBarKong->setFixedWidth(0);
|
|
|
|
|
- ui->labelBarTing->setFixedWidth(0);
|
|
|
|
|
- ui->labelBarGuan->setFixedWidth(0);
|
|
|
|
|
- ui->labelBarWfjt->setFixedWidth(0);
|
|
|
|
|
- ui->labelBarLdtx->setFixedWidth(0);
|
|
|
|
|
- ui->labelBarHrxz->setFixedWidth(0);
|
|
|
|
|
- ui->labelBarQwld->setFixedWidth(0);
|
|
|
|
|
- ui->labelBarLaji->setFixedWidth(0);
|
|
|
|
|
- ui->labelBarOther->setFixedWidth(0);
|
|
|
|
|
|
|
+ ui->labelBarZc->setFixedWidth(0);
|
|
|
|
|
+ ui->labelBarYc->setFixedWidth(0);
|
|
|
|
|
+ ui->labelBarWz->setFixedWidth(0);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void FormWoolFinished::setTableWidgetSyncData(QTableWidget *tableWidget)
|
|
void FormWoolFinished::setTableWidgetSyncData(QTableWidget *tableWidget)
|
|
|
{
|
|
{
|
|
|
- prepareTableWidgetCells(tableWidget,8);
|
|
|
|
|
|
|
+ prepareTableWidgetCells(tableWidget,15);
|
|
|
tableWidget->setEnabled(false);
|
|
tableWidget->setEnabled(false);
|
|
|
QLabel *lbl = new QLabel();
|
|
QLabel *lbl = new QLabel();
|
|
|
|
|
|
|
@@ -221,7 +200,7 @@ void FormWoolFinished::prepareTableWidgetCells(QTableWidget *tableWidget, int ro
|
|
|
tableWidget->setRowCount(rows);
|
|
tableWidget->setRowCount(rows);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void FormWoolFinished::fillDataList(QTableWidget *tableWidget,QStringList keys,
|
|
|
|
|
|
|
+void FormWoolFinished::fillDataList(QTableWidget *tableWidget, QStringList keys,
|
|
|
QMultiMap<QString, QString> list, int rowCount)
|
|
QMultiMap<QString, QString> list, int rowCount)
|
|
|
{
|
|
{
|
|
|
setTableWidgetNoData(tableWidget);
|
|
setTableWidgetNoData(tableWidget);
|
|
@@ -229,7 +208,7 @@ void FormWoolFinished::fillDataList(QTableWidget *tableWidget,QStringList keys,
|
|
|
{
|
|
{
|
|
|
return ;
|
|
return ;
|
|
|
}
|
|
}
|
|
|
- prepareTableWidgetCells(tableWidget,rowCount);
|
|
|
|
|
|
|
+ prepareTableWidgetCells(tableWidget, rowCount);
|
|
|
tableWidget->setEnabled(true);
|
|
tableWidget->setEnabled(true);
|
|
|
for(int row = 0;row < rowCount;row++)
|
|
for(int row = 0;row < rowCount;row++)
|
|
|
{
|
|
{
|
|
@@ -260,6 +239,7 @@ void FormWoolFinished::fillDataList(QTableWidget *tableWidget,QStringList keys,
|
|
|
tableWidget->sortByColumn(0);
|
|
tableWidget->sortByColumn(0);
|
|
|
tableWidget->sortByColumn(0);
|
|
tableWidget->sortByColumn(0);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
void FormWoolFinished::setCellElement(QTableWidget *tableWidget, int row, int col,
|
|
void FormWoolFinished::setCellElement(QTableWidget *tableWidget, int row, int col,
|
|
|
QString key,QString value,QMap<QString,QString> data)
|
|
QString key,QString value,QMap<QString,QString> data)
|
|
|
{
|
|
{
|
|
@@ -267,9 +247,9 @@ void FormWoolFinished::setCellElement(QTableWidget *tableWidget, int row, int co
|
|
|
QVariant display = value;
|
|
QVariant display = value;
|
|
|
QVariant tooltip = value;
|
|
QVariant tooltip = value;
|
|
|
item->setTextAlignment(Qt::AlignHCenter|Qt::AlignVCenter);
|
|
item->setTextAlignment(Qt::AlignHCenter|Qt::AlignVCenter);
|
|
|
- //进行数据翻译
|
|
|
|
|
|
|
|
|
|
- if(key=="batchid")
|
|
|
|
|
|
|
+ //进行数据翻译
|
|
|
|
|
+ if(key=="taskid")
|
|
|
{
|
|
{
|
|
|
display = "";
|
|
display = "";
|
|
|
tooltip = "";
|
|
tooltip = "";
|
|
@@ -289,7 +269,12 @@ void FormWoolFinished::setCellElement(QTableWidget *tableWidget, int row, int co
|
|
|
}
|
|
}
|
|
|
item->setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
|
item->setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
|
|
}
|
|
}
|
|
|
- else if(key=="finishcount")
|
|
|
|
|
|
|
+ else if(key=="origfilename")
|
|
|
|
|
+ {
|
|
|
|
|
+ display = value;
|
|
|
|
|
+ tooltip = display;
|
|
|
|
|
+ }
|
|
|
|
|
+ else if(key=="feecount")
|
|
|
{
|
|
{
|
|
|
display = value.toInt();
|
|
display = value.toInt();
|
|
|
tooltip = display;
|
|
tooltip = display;
|
|
@@ -304,8 +289,8 @@ void FormWoolFinished::setCellElement(QTableWidget *tableWidget, int row, int co
|
|
|
display = value.toDouble();
|
|
display = value.toDouble();
|
|
|
tooltip = display;
|
|
tooltip = display;
|
|
|
}
|
|
}
|
|
|
- //设置单元格显示形式,是用item填充还是widget填充
|
|
|
|
|
|
|
|
|
|
|
|
+ //设置单元格显示形式,是用item填充还是widget填充
|
|
|
if(key == "isdeliver")
|
|
if(key == "isdeliver")
|
|
|
{
|
|
{
|
|
|
delete item;
|
|
delete item;
|
|
@@ -314,17 +299,17 @@ void FormWoolFinished::setCellElement(QTableWidget *tableWidget, int row, int co
|
|
|
lbl->setProperty("value",value);
|
|
lbl->setProperty("value",value);
|
|
|
if(value=="0")
|
|
if(value=="0")
|
|
|
{
|
|
{
|
|
|
- QString ispass = data.value("ispass");
|
|
|
|
|
|
|
+ /*QString ispass = data.value("ispass");
|
|
|
if(ispass=="0")
|
|
if(ispass=="0")
|
|
|
{
|
|
{
|
|
|
lbl->setPixmap(QPixmap(":/task_nopass.png"));
|
|
lbl->setPixmap(QPixmap(":/task_nopass.png"));
|
|
|
lbl->setToolTip("未放行");
|
|
lbl->setToolTip("未放行");
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
- {
|
|
|
|
|
|
|
+ {*/
|
|
|
lbl->setPixmap(QPixmap(":/todown.png"));
|
|
lbl->setPixmap(QPixmap(":/todown.png"));
|
|
|
lbl->setToolTip("未下载");
|
|
lbl->setToolTip("未下载");
|
|
|
- }
|
|
|
|
|
|
|
+ //}
|
|
|
}
|
|
}
|
|
|
else if(value=="1")
|
|
else if(value=="1")
|
|
|
{
|
|
{
|
|
@@ -340,13 +325,12 @@ void FormWoolFinished::setCellElement(QTableWidget *tableWidget, int row, int co
|
|
|
item->setData(Qt::ToolTipRole,tooltip);
|
|
item->setData(Qt::ToolTipRole,tooltip);
|
|
|
tableWidget->setItem(row,col,item);
|
|
tableWidget->setItem(row,col,item);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
void FormWoolFinished::query(QString dealstatus)
|
|
void FormWoolFinished::query(QString dealstatus)
|
|
|
{
|
|
{
|
|
|
QString userCode = m_account.value("usercode");
|
|
QString userCode = m_account.value("usercode");
|
|
|
- QMultiMap<QString,QString> list = SNCDataBase::getWoolCheckFinishInfos(userCode,m_clientID,dealstatus);
|
|
|
|
|
|
|
+ QMultiMap<QString,QString> list = SNCDataBase::getWoolCheckFinishInfos(userCode, dealstatus);
|
|
|
int cols = list.uniqueKeys().size();
|
|
int cols = list.uniqueKeys().size();
|
|
|
int rows = 0;
|
|
int rows = 0;
|
|
|
if(cols!=0)
|
|
if(cols!=0)
|
|
@@ -366,7 +350,7 @@ void FormWoolFinished::query(QString dealstatus)
|
|
|
{
|
|
{
|
|
|
if(item->checkState()==Qt::Checked)
|
|
if(item->checkState()==Qt::Checked)
|
|
|
{
|
|
{
|
|
|
- ids<<item->data(Qt::UserRole).toString();
|
|
|
|
|
|
|
+ ids << item->data(Qt::UserRole).toString();
|
|
|
}
|
|
}
|
|
|
if(item->isSelected())
|
|
if(item->isSelected())
|
|
|
{
|
|
{
|
|
@@ -436,64 +420,29 @@ bool FormWoolFinished::addFileToZip(QString zipName, QStringList files)
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void FormWoolFinished::displaySelected(QString detail)
|
|
|
|
|
-{
|
|
|
|
|
- QStringList list = detail.split("\r\n");
|
|
|
|
|
- qDebug()<<list.size()<<list;
|
|
|
|
|
- int i=0;
|
|
|
|
|
- int k = 0;
|
|
|
|
|
- if(list.size()==10)
|
|
|
|
|
- {
|
|
|
|
|
- k=0;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
|
|
+void FormWoolFinished::displaySelected(int hmzs, int zcsl, int ycsl, int wzsl)
|
|
|
|
|
+{
|
|
|
|
|
+ if(!(hmzs > 0))
|
|
|
{
|
|
{
|
|
|
setDetailNoData();
|
|
setDetailNoData();
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- QStringList rates;
|
|
|
|
|
- for(int i=0;i<list.size();i++)
|
|
|
|
|
- {
|
|
|
|
|
- QRegExp rx("\\((.+)\\)");
|
|
|
|
|
- int pos = rx.indexIn(list.at(i));
|
|
|
|
|
- if(pos>0)
|
|
|
|
|
- {
|
|
|
|
|
- QString match = rx.capturedTexts().at(1);
|
|
|
|
|
- rates<<match.replace("%","");
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- rates<<"0";
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- i = k;
|
|
|
|
|
- ui->labelKong->setText(list.at(i++));
|
|
|
|
|
- ui->labelTing->setText(list.at(i++));
|
|
|
|
|
- ui->labelGuan->setText(list.at(i++));
|
|
|
|
|
- ui->labelHrxz->setText(list.at(i++));
|
|
|
|
|
- ui->labelWfjt->setText(list.at(i++));
|
|
|
|
|
- ui->labelLdtx->setText(list.at(i++));
|
|
|
|
|
- ui->labelShiHao->setText(list.at(i++));
|
|
|
|
|
- ui->labelQwld->setText(list.at(i++));
|
|
|
|
|
- ui->labelLaji->setText(list.at(i++));
|
|
|
|
|
- ui->labelOther->setText(list.at(i++));
|
|
|
|
|
- i = k;
|
|
|
|
|
- int barLength = 650;
|
|
|
|
|
|
|
+ double rateZc, rateYc, rateWz;
|
|
|
|
|
+ rateZc = zcsl*1.0/hmzs;
|
|
|
|
|
+ rateYc = ycsl*1.0/hmzs;
|
|
|
|
|
+ rateWz = wzsl*1.0/hmzs;
|
|
|
|
|
|
|
|
- ui->labelBarKong->setFixedWidth(rates.at(i++).toDouble()*barLength/100);
|
|
|
|
|
- ui->labelBarTing->setFixedWidth(rates.at(i++).toDouble()*barLength/100);
|
|
|
|
|
- ui->labelBarGuan->setFixedWidth(rates.at(i++).toDouble()*barLength/100);
|
|
|
|
|
- ui->labelBarWfjt->setFixedWidth(rates.at(i++).toDouble()*barLength/100);
|
|
|
|
|
- ui->labelBarHrxz->setFixedWidth(rates.at(i++).toDouble()*barLength/100);
|
|
|
|
|
- ui->labelBarLdtx->setFixedWidth(rates.at(i++).toDouble()*barLength/100);
|
|
|
|
|
- ui->labelBarShiHao->setFixedWidth(rates.at(i++).toDouble()*barLength/100);
|
|
|
|
|
- ui->labelBarQwld->setFixedWidth(rates.at(i++).toDouble()*barLength/100);
|
|
|
|
|
- ui->labelBarLaji->setFixedWidth(rates.at(i++).toDouble()*barLength/100);
|
|
|
|
|
- ui->labelBarOther->setFixedWidth(rates.at(i++).toDouble()*barLength/100);
|
|
|
|
|
|
|
+ ui->labelZc->setText(QString("正常: %1 (%2%)").arg(zcsl).arg(rateZc*100));
|
|
|
|
|
+ ui->labelYc->setText(QString("异常: %1 (%2%)").arg(ycsl).arg(rateYc*100));
|
|
|
|
|
+ ui->labelWz->setText(QString("未知: %1 (%2%)").arg(wzsl).arg(rateWz*100));
|
|
|
|
|
|
|
|
-}
|
|
|
|
|
|
|
+ int barLength = 650;
|
|
|
|
|
|
|
|
|
|
+ ui->labelBarZc->setFixedWidth(rateZc*barLength);
|
|
|
|
|
+ ui->labelBarYc->setFixedWidth(rateYc*barLength);
|
|
|
|
|
+ ui->labelBarWz->setFixedWidth(rateWz*barLength);
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
void FormWoolFinished::onDataUpdated()
|
|
void FormWoolFinished::onDataUpdated()
|
|
|
{
|
|
{
|
|
@@ -603,8 +552,12 @@ void FormWoolFinished::on_tableWidget_cellClicked(int row, int column)
|
|
|
{
|
|
{
|
|
|
if(row>=0&&column>=0)
|
|
if(row>=0&&column>=0)
|
|
|
{
|
|
{
|
|
|
- QString detail = ui->tableWidget->item(row,4)->data(Qt::UserRole).toString();
|
|
|
|
|
- displaySelected(detail);
|
|
|
|
|
|
|
+ //QString detail = ui->tableWidget->item(row,4)->data(Qt::UserRole).toString();
|
|
|
|
|
+ int hmzs = ui->tableWidget->item(row,6)->data(Qt::UserRole).toInt();
|
|
|
|
|
+ int zcsl = ui->tableWidget->item(row,8)->data(Qt::UserRole).toInt();
|
|
|
|
|
+ int ycsl = ui->tableWidget->item(row,9)->data(Qt::UserRole).toInt();
|
|
|
|
|
+ int wzsl = ui->tableWidget->item(row,10)->data(Qt::UserRole).toInt();
|
|
|
|
|
+ displaySelected(hmzs, zcsl, ycsl, wzsl);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -629,19 +582,17 @@ void FormWoolFinished::on_radioButtonAll_clicked()
|
|
|
void FormWoolFinished::on_radioButtonUndown_clicked()
|
|
void FormWoolFinished::on_radioButtonUndown_clicked()
|
|
|
{
|
|
{
|
|
|
if(!chkAccountState(m_state))
|
|
if(!chkAccountState(m_state))
|
|
|
- return;
|
|
|
|
|
|
|
+ return;
|
|
|
on_radioButtonAll_clicked();
|
|
on_radioButtonAll_clicked();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void FormWoolFinished::on_radioButtonDown_clicked()
|
|
void FormWoolFinished::on_radioButtonDown_clicked()
|
|
|
{
|
|
{
|
|
|
if(!chkAccountState(m_state))
|
|
if(!chkAccountState(m_state))
|
|
|
- return;
|
|
|
|
|
|
|
+ return;
|
|
|
on_radioButtonAll_clicked();
|
|
on_radioButtonAll_clicked();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
void FormWoolFinished::on_checkBoxAll_clicked()
|
|
void FormWoolFinished::on_checkBoxAll_clicked()
|
|
|
{
|
|
{
|
|
|
Qt::CheckState state;
|
|
Qt::CheckState state;
|
|
@@ -677,11 +628,11 @@ void FormWoolFinished::on_tableWidget_cellDoubleClicked(int row, int column)
|
|
|
QMessageBox::critical(this,"结果","未能获取有效的文件编号!",QMessageBox::Ok);
|
|
QMessageBox::critical(this,"结果","未能获取有效的文件编号!",QMessageBox::Ok);
|
|
|
return ;
|
|
return ;
|
|
|
}
|
|
}
|
|
|
- if(ispass!="1")
|
|
|
|
|
- {
|
|
|
|
|
- QMessageBox::critical(this,"结果","单子还未放行!",QMessageBox::Ok);
|
|
|
|
|
- return ;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if(ispass!="1")
|
|
|
|
|
+// {
|
|
|
|
|
+// QMessageBox::critical(this,"结果","单子还未放行!",QMessageBox::Ok);
|
|
|
|
|
+// return ;
|
|
|
|
|
+// }
|
|
|
QString saveFile = getSingleZipFileName(id);
|
|
QString saveFile = getSingleZipFileName(id);
|
|
|
if(saveFile.isEmpty())
|
|
if(saveFile.isEmpty())
|
|
|
return ;
|
|
return ;
|
|
@@ -690,6 +641,7 @@ void FormWoolFinished::on_tableWidget_cellDoubleClicked(int row, int column)
|
|
|
this->setCursor(Qt::ArrowCursor);
|
|
this->setCursor(Qt::ArrowCursor);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
bool FormWoolFinished::download(QString srvID,QString saveZipFileName,bool show)
|
|
bool FormWoolFinished::download(QString srvID,QString saveZipFileName,bool show)
|
|
|
{
|
|
{
|
|
|
|
|
|
|
@@ -712,6 +664,7 @@ bool FormWoolFinished::download(QString srvID,QString saveZipFileName,bool show)
|
|
|
return downloadFromServer(saveZipFileName,srvID,show);
|
|
return downloadFromServer(saveZipFileName,srvID,show);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
bool FormWoolFinished::downloadFromLocal(QString saveFileName,QString cacheFile,bool show)
|
|
bool FormWoolFinished::downloadFromLocal(QString saveFileName,QString cacheFile,bool show)
|
|
|
{
|
|
{
|
|
|
|
|
|
|
@@ -723,11 +676,11 @@ bool FormWoolFinished::downloadFromLocal(QString saveFileName,QString cacheFile,
|
|
|
|
|
|
|
|
bool FormWoolFinished::downloadFromServer(QString saveFileName, QString srvID, bool show)
|
|
bool FormWoolFinished::downloadFromServer(QString saveFileName, QString srvID, bool show)
|
|
|
{
|
|
{
|
|
|
- QString userHash = m_account.value("userhash");
|
|
|
|
|
- QString json = m_wool->dlResultFile(srvID,userHash);
|
|
|
|
|
|
|
+ QString userHash = m_account.value("ssohash");
|
|
|
|
|
+ QString json = m_wool->DlfhymResultFile(srvID,userHash);
|
|
|
|
|
|
|
|
- RespDlResultFile response(json);
|
|
|
|
|
- if(response.getRtnCode()==2)
|
|
|
|
|
|
|
+ RespDlFhymResultFile response(json);
|
|
|
|
|
+ if(response.getRtnCode()==1)
|
|
|
{
|
|
{
|
|
|
QString fileContent = response.getFileContent();
|
|
QString fileContent = response.getFileContent();
|
|
|
QByteArray array = QByteArray::fromBase64(fileContent.toAscii());
|
|
QByteArray array = QByteArray::fromBase64(fileContent.toAscii());
|
|
@@ -736,7 +689,7 @@ bool FormWoolFinished::downloadFromServer(QString saveFileName, QString srvID, b
|
|
|
file.write(array);
|
|
file.write(array);
|
|
|
file.close();
|
|
file.close();
|
|
|
QString cachPath = cacheDownloadFile(saveFileName);
|
|
QString cachPath = cacheDownloadFile(saveFileName);
|
|
|
- SNCDataBase::updateWoolCachePath(srvID,cachPath);
|
|
|
|
|
|
|
+ SNCDataBase::updateWoolCachePath(srvID, cachPath);
|
|
|
if(show)
|
|
if(show)
|
|
|
QMessageBox::information(this,"结果","单子下载成功",QMessageBox::Ok);
|
|
QMessageBox::information(this,"结果","单子下载成功",QMessageBox::Ok);
|
|
|
return true;
|
|
return true;
|
|
@@ -748,6 +701,7 @@ bool FormWoolFinished::downloadFromServer(QString saveFileName, QString srvID, b
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
QString FormWoolFinished::cacheDownloadFile(QString fileName)
|
|
QString FormWoolFinished::cacheDownloadFile(QString fileName)
|
|
|
{
|
|
{
|
|
|
QString userCode = m_account.value("usercode");
|
|
QString userCode = m_account.value("usercode");
|
|
@@ -763,7 +717,6 @@ QString FormWoolFinished::cacheDownloadFile(QString fileName)
|
|
|
|
|
|
|
|
bool FormWoolFinished::chkAccountState(AccountLoginState state)
|
|
bool FormWoolFinished::chkAccountState(AccountLoginState state)
|
|
|
{
|
|
{
|
|
|
-
|
|
|
|
|
bool ret = false;
|
|
bool ret = false;
|
|
|
switch(state)
|
|
switch(state)
|
|
|
{
|
|
{
|
|
@@ -781,6 +734,7 @@ bool FormWoolFinished::chkAccountState(AccountLoginState state)
|
|
|
}
|
|
}
|
|
|
return ret;
|
|
return ret;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
QString FormWoolFinished::getPackZipFileName()
|
|
QString FormWoolFinished::getPackZipFileName()
|
|
|
{
|
|
{
|
|
|
QFileDialog::Options options;
|
|
QFileDialog::Options options;
|
|
@@ -800,6 +754,7 @@ QString FormWoolFinished::getPackZipFileName()
|
|
|
{
|
|
{
|
|
|
count++;
|
|
count++;
|
|
|
str += "_" + item->text();
|
|
str += "_" + item->text();
|
|
|
|
|
+ /*
|
|
|
QTableWidgetItem *item2 = ui->tableWidget->item(i,2);
|
|
QTableWidgetItem *item2 = ui->tableWidget->item(i,2);
|
|
|
if(item2)
|
|
if(item2)
|
|
|
{
|
|
{
|
|
@@ -807,17 +762,17 @@ QString FormWoolFinished::getPackZipFileName()
|
|
|
{
|
|
{
|
|
|
download += item->data(Qt::UserRole).toString()+ " ";
|
|
download += item->data(Qt::UserRole).toString()+ " ";
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ }*/
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if(count==0)
|
|
if(count==0)
|
|
|
return "";
|
|
return "";
|
|
|
- if(!download.isEmpty())
|
|
|
|
|
|
|
+ /*if(!download.isEmpty())
|
|
|
{
|
|
{
|
|
|
QMessageBox::critical(this,"提示","您选择的单子" + download + "现在还没有放行,暂时无法下载,请稍候再试!",QMessageBox::Ok);
|
|
QMessageBox::critical(this,"提示","您选择的单子" + download + "现在还没有放行,暂时无法下载,请稍候再试!",QMessageBox::Ok);
|
|
|
return "";
|
|
return "";
|
|
|
- }
|
|
|
|
|
|
|
+ }*/
|
|
|
defaultZipFileName += "_" + QString::number(count) + str ;
|
|
defaultZipFileName += "_" + QString::number(count) + str ;
|
|
|
QString saveZipFileName = QFileDialog::getSaveFileName(this,"另存为",exportDir + "\\" + defaultZipFileName,
|
|
QString saveZipFileName = QFileDialog::getSaveFileName(this,"另存为",exportDir + "\\" + defaultZipFileName,
|
|
|
tr("ZIP Files (*.zip)"),
|
|
tr("ZIP Files (*.zip)"),
|
|
@@ -832,7 +787,6 @@ QString FormWoolFinished::getPackZipFileName()
|
|
|
return saveZipFileName;
|
|
return saveZipFileName;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
void FormWoolFinished::on_pushButtonDel_clicked()
|
|
void FormWoolFinished::on_pushButtonDel_clicked()
|
|
|
{
|
|
{
|
|
|
if(!chkAccountState(m_state))
|
|
if(!chkAccountState(m_state))
|
|
@@ -895,7 +849,7 @@ void FormWoolFinished::onSingleDownloadClick()
|
|
|
QPushButton *btn = qobject_cast<QPushButton*>(sender());
|
|
QPushButton *btn = qobject_cast<QPushButton*>(sender());
|
|
|
for(int i=0;i<ui->tableWidget->rowCount();i++)
|
|
for(int i=0;i<ui->tableWidget->rowCount();i++)
|
|
|
{
|
|
{
|
|
|
- QWidget *widget = ui->tableWidget->cellWidget(i,10);
|
|
|
|
|
|
|
+ QWidget *widget = ui->tableWidget->cellWidget(i,13);
|
|
|
if(widget)
|
|
if(widget)
|
|
|
{
|
|
{
|
|
|
if(btn==qobject_cast<QPushButton*>(widget))
|
|
if(btn==qobject_cast<QPushButton*>(widget))
|
|
@@ -905,5 +859,4 @@ void FormWoolFinished::onSingleDownloadClick()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|