zhangcl 1 місяць тому
батько
коміт
848749821d
1 змінених файлів з 53 додано та 0 видалено
  1. 53 0
      src/api/pms/iotdevicerunlog/index.ts

+ 53 - 0
src/api/pms/iotdevicerunlog/index.ts

@@ -0,0 +1,53 @@
+import request from '@/config/axios'
+
+// 设备运行数据记录 中间表 VO
+export interface IotDeviceRunLogVO {
+  id: number // 主键id
+  deptId: number // 部门id 所属小队
+  deviceId: number // 设备id
+  deviceCode: string // 设备编码
+  deviceComp: string // 设备部件
+  pointCode: string // 采集点位 信息 code
+  pointName: string // 采集点位信息 名称
+  type: number // 数据类型 1手动填报 2自动采集
+  value: number // 设备运行记录值 运行公里数km 运行公里数H
+  time: Date // 填报时间 or 采集时间
+  dailyRunTime: number // 当日运行时间 H
+  totalRunTime: number // 累计运行时间 H
+  dailyMileage: number // 当日运行里程 H
+  totalMileage: number // 累计运行里程 H
+  remark: string // 备注
+}
+
+// 设备运行数据记录 中间表 API
+export const IotDeviceRunLogApi = {
+  // 查询设备运行数据记录 中间表分页
+  getIotDeviceRunLogPage: async (params: any) => {
+    return await request.get({ url: `/pms/iot-device-run-log/page`, params })
+  },
+
+  // 查询设备运行数据记录 中间表详情
+  getIotDeviceRunLog: async (id: number) => {
+    return await request.get({ url: `/pms/iot-device-run-log/get?id=` + id })
+  },
+
+  // 新增设备运行数据记录 中间表
+  createIotDeviceRunLog: async (data: IotDeviceRunLogVO) => {
+    return await request.post({ url: `/pms/iot-device-run-log/create`, data })
+  },
+
+  // 修改设备运行数据记录 中间表
+  updateIotDeviceRunLog: async (data: IotDeviceRunLogVO) => {
+    return await request.put({ url: `/pms/iot-device-run-log/update`, data })
+  },
+
+  // 删除设备运行数据记录 中间表
+  deleteIotDeviceRunLog: async (id: number) => {
+    return await request.delete({ url: `/pms/iot-device-run-log/delete?id=` + id })
+  },
+
+  // 导出设备运行数据记录 中间表 Excel
+  exportIotDeviceRunLog: async (params) => {
+    return await request.download({ url: `/pms/iot-device-run-log/export-excel`, params })
+  },
+}