From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目

---
 src/api/iot/ota/task/record/index.ts |   38 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/src/api/iot/ota/task/record/index.ts b/src/api/iot/ota/task/record/index.ts
new file mode 100644
index 0000000..aedc0b9
--- /dev/null
+++ b/src/api/iot/ota/task/record/index.ts
@@ -0,0 +1,38 @@
+import request from '@/config/axios'
+
+/** IoT OTA 浠诲姟璁板綍淇℃伅 */
+export interface OtaTaskRecord {
+  id?: number // 鍗囩骇璁板綍缂栧彿
+  firmwareId?: number // 鍥轰欢缂栧彿
+  firmwareVersion?: string // 鍥轰欢鐗堟湰
+  taskId?: number // 浠诲姟缂栧彿
+  deviceId?: string // 璁惧缂栧彿
+  deviceName?: string // 璁惧鍚嶇О
+  currentVersion?: string // 褰撳墠鐗堟湰
+  fromFirmwareId?: number // 鏉ユ簮鐨勫浐浠剁紪鍙�
+  fromFirmwareVersion?: string // 鏉ユ簮鐨勫浐浠剁増鏈�
+  status?: number // 鍗囩骇鐘舵��
+  progress?: number // 鍗囩骇杩涘害锛岀櫨鍒嗘瘮
+  description?: string // 鍗囩骇杩涘害鎻忚堪
+  updateTime?: Date // 鏇存柊鏃堕棿
+}
+
+// IoT OTA 浠诲姟璁板綍 API
+export const IoTOtaTaskRecordApi = {
+  getOtaTaskRecordStatusStatistics: async (firmwareId?: number, taskId?: number) => {
+    const params: any = {}
+    if (firmwareId) params.firmwareId = firmwareId
+    if (taskId) params.taskId = taskId
+    return await request.get({ url: `/iot/ota/task/record/get-status-statistics`, params })
+  },
+
+  // 鏌ヨ OTA 浠诲姟璁板綍鍒嗛〉
+  getOtaTaskRecordPage: async (params: any) => {
+    return await request.get({ url: `/iot/ota/task/record/page`, params })
+  },
+
+  // 鍙栨秷 OTA 浠诲姟璁板綍
+  cancelOtaTaskRecord: async (id: number) => {
+    return await request.put({ url: `/iot/ota/task/record/cancel?id=` + id })
+  }
+}

--
Gitblit v1.8.0