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.0 KiB

#include "xhighstockindexs.h"
XHighStockIndexs::XHighStockIndexs(QObject *parent) : QObject(parent)
{
}
XHighStockIndexs::~XHighStockIndexs()
{
}
QString XHighStockIndexs::toInsertSql(_HighStockIndexsParam stock)
{
QString sql = QString("insert into highstockindexs (code, name, tradeDay,open,close,differRange,isHighRangeP,hpDateP,LIMITUPNUM,mvByCSRC,COMPONENTNUM) "
"SELECT '%1', '%2', '%3',%4,%5,%6,%7,'%8',%9,%10,%11 from DUAL where not exists(select code from highstockindexs where code = '%1' and hpDateP = '%8');")
.arg(stock.code)
.arg(stock.name)
.arg(stock.tradeDay)
.arg(stock.open)
.arg(stock.close)
.arg(stock.differRange)
.arg(stock.isHighRangeP)
.arg(stock.HpDateP)
.arg(stock.LIMITUPNUM)
.arg(stock.mvByCSRC)
.arg(stock.COMPONENTNUM);
return sql;
}
QString XHighStockIndexs::toDeleteSql()
{
return "";
}
QString XHighStockIndexs::toQuerySql()
{
return "";
}