From a17738e1545ff7dbef6398b8ec1eab93ab59c9a1 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 30 六月 2022 19:14:47 +0800 Subject: [PATCH] '功能完善' --- app/ExcelUtil.cpp | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/app/ExcelUtil.cpp b/app/ExcelUtil.cpp index bf43735..154d000 100644 --- a/app/ExcelUtil.cpp +++ b/app/ExcelUtil.cpp @@ -42,9 +42,19 @@ std::ostringstream out_str; out_str << setiosflags(ios::fixed) << std::setprecision(2) << stof(tradeData.price); + + ws->label(index, 0, tradeData.time, xf); ws->label(index, 1, out_str.str(), xf); - ws->label(index, 2, tradeData.limitPrice ? L"涨停价" : L"非涨停价", xf); + if (tradeData.limitPrice == LIMIT_PRICE_NORMAL) { + ws->label(index, 2, L"正常价", xf); + } + else if (tradeData.limitPrice == LIMIT_PRICE_UP) { + ws->label(index, 2, L"涨停价", xf); + } + else if (tradeData.limitPrice == LIMIT_PRICE_DOWN) { + ws->label(index, 2, L"跌停价", xf); + } ws->label(index, 3, to_string(tradeData.num), xf); @@ -52,13 +62,13 @@ wstring operate; switch (tradeData.operateType) { - case BUY: + case OPERATE_BUY: operate = L"买";break; - case BUY_CANCEL: + case OPERATE_BUY_CANCEL: operate = L"买撤";break; - case SELL: + case OPERATE_SELL: operate = L"卖";break; - case SELL_CANCEL: + case OPERATE_SELL_CANCEL: operate = L"卖撤";break; default: break; -- Gitblit v1.8.0