From 2e386b805cbb0b24c92ea6d667fc8d2c146ad469 Mon Sep 17 00:00:00 2001 From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com> Date: 星期二, 14 十月 2025 11:36:19 +0800 Subject: [PATCH] 1.优先csv --- SourceCode/Bond/Servo/CPageGlassList.h | 40 ++++++++++++++++++++++++++++++---------- 1 files changed, 30 insertions(+), 10 deletions(-) diff --git a/SourceCode/Bond/Servo/CPageGlassList.h b/SourceCode/Bond/Servo/CPageGlassList.h index 5fa77a5..bb23485 100644 --- a/SourceCode/Bond/Servo/CPageGlassList.h +++ b/SourceCode/Bond/Servo/CPageGlassList.h @@ -1,5 +1,6 @@ 锘�#pragma once -#include "ListCtrlEx.h" +#include "CExpandableListCtrl.h" +#include "GlassLogDb.h" // CPageGlassList 瀵硅瘽妗� @@ -18,8 +19,8 @@ IObserver* m_pObserver; // 鎼滅储鍏抽敭瀛� + GlassLogDb::Filters m_filters; std::string m_strStatus; - std::string m_strKeyword; // 椤电爜 int m_nCurPage; @@ -32,22 +33,37 @@ // 鎺т欢 CDateTimeCtrl m_dateTimeStart; CDateTimeCtrl m_dateTimeEnd; - CListCtrlEx m_listCtrl; + CExpandableListCtrl m_listCtrl; private: - void InitRxWindow(); + int m_nColCount = 0; + bool m_rebuilding = false; + +private: + void InitRxWindows(); void Resize(); void InitStatusCombo(); void InitTimeRangeCombo(); void InitDateTimeControls(); - void LoadTransfers(); + void LoadData(); void UpdatePageData(); void UpdatePageControls(); - void UpdateDateFilter(); - /* - void FillDataToListCtrl(const std::vector<TransferData>& vecData); - void InsertTransferData(const TransferData& data); - */ + void InsertWipRow(SERVO::CGlass* pGlass); + static bool GlassMatchesFilters(const SERVO::CGlass& g, + const GlassLogDb::Filters& f, + bool useEndTime = false); + void UpdateWipData(); + bool eraseGlassInVector(SERVO::CGlass* pGlass, std::vector<SERVO::CGlass*>& glasses); + void UpdateWipRow(unsigned int index, SERVO::CGlass* pGlass); + bool WriteAnsiStringAsUtf8ToFile(const CString& ansiContent, const CString& filePath); + void ExportToCsv(const GlassLogDb::Row& row, const CString& filePath); + void ExportToJson(const GlassLogDb::Row& row, const CString& filePath); + void ExportBasicInfo(CString& csvContent, const GlassLogDb::Row& row); + void ExportProcessParams(CString& csvContent, const GlassLogDb::Row& row); + void ExportSensorData(CString& csvContent, const GlassLogDb::Row& row); + static std::vector<std::string> getMachineColumnOrder(int machineId); + static std::string timePointToString(const std::chrono::system_clock::time_point& tp); + static int64_t timePointToMs(const std::chrono::system_clock::time_point& tp); // 瀵硅瘽妗嗘暟鎹� #ifdef AFX_DESIGN_TIME @@ -67,5 +83,9 @@ afx_msg void OnBnClickedButtonExport(); afx_msg void OnBnClickedButtonPrevPage(); afx_msg void OnBnClickedButtonNextPage(); + afx_msg void OnShowFullText(NMHDR* pNMHDR, LRESULT* pResult); + virtual BOOL PreTranslateMessage(MSG* pMsg); DECLARE_MESSAGE_MAP() +public: + afx_msg void OnBnClickedButtonExportRow(); }; -- Gitblit v1.9.3