You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.1 KiB

#include "xwholestockindexs.h"
XWholeStockIndexs::XWholeStockIndexs(QObject *parent) : QObject(parent)
{
}
XWholeStockIndexs::~XWholeStockIndexs()
{
}
QString XWholeStockIndexs::toInsertSql(_WholeStockIndexsParam stockIndex)
{
QString sql = QString("insert into wholestockindexs (code, name, tradeDay,componentNum,open,close,differRange,volumn,amount,mvByCSRC,freeFloatMv) "
"SELECT '%1', '%2', '%3',%4,%5,%6,'%7',%8,%9,%10,%11 from DUAL where not exists(select code from wholestockindexs where code = '%1' and tradeDay = '%3' and open = %5);")
.arg(stockIndex.code)
.arg(stockIndex.name)
.arg(stockIndex.tradeDay)
.arg(stockIndex.componentNum)
.arg(stockIndex.open)
.arg(stockIndex.close)
.arg(stockIndex.differRange)
.arg(stockIndex.volumn)
.arg(stockIndex.amount)
.arg(stockIndex.mvByCSRC)
.arg(stockIndex.freeFloatMv);
return sql;
}
QString XWholeStockIndexs::toDeleteSql()
{
return "";
}
QString XWholeStockIndexs::toQuerySql()
{
return "";
}