From 66a85c70afb149986871febe17a4133b6995cd09 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 30 十一月 2023 19:58:02 +0800
Subject: [PATCH] dashboard接口和数据表

---
 docs/swagger.yaml |  173 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 170 insertions(+), 3 deletions(-)

diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index f69843e..b96b9ed 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -192,6 +192,127 @@
       total:
         type: integer
     type: object
+  model.CommonStats:
+    properties:
+      name:
+        type: string
+      value:
+        type: string
+    type: object
+  model.Dashboard:
+    properties:
+      createdAt:
+        type: string
+      delayWorkOrderAmount:
+        description: 寤舵湡浜や粯宸ュ崟鏁�
+        type: integer
+      deletedAt:
+        type: string
+      deviceLoad:
+        description: 璁惧璐熻嵎瀵规瘮鍒嗘瀽
+        items:
+          $ref: '#/definitions/model.CommonStats'
+        type: array
+      deviceLoadData:
+        description: 璁惧璐熻嵎瀵规瘮鍒嗘瀽
+        type: string
+      deviceRunningAmount:
+        description: 寮�鏈哄彴鏁�
+        type: integer
+      externalDeviceRunningAmount:
+        description: 澶栧姞宸ュ彴鏁�
+        type: integer
+      id:
+        type: integer
+      inMaintenanceDeviceAmount:
+        description: 缁翠慨涓澶囨暟
+        type: integer
+      internalDeviceRunningAmount:
+        description: 鑷湁寮�鏈哄彴鏁�
+        type: integer
+      materialMissWorkOrderAmount:
+        description: 鐗╂枡涓嶈冻宸ュ崟鏁�
+        type: integer
+      materialRequirement:
+        description: 鐗╂枡闇�姹傜粺璁�
+        items:
+          $ref: '#/definitions/model.CommonStats'
+        type: array
+      materialRequirementData:
+        description: 鐗╂枡闇�姹傜粺璁�
+        type: string
+      orderFinishRate:
+        description: 璁㈠崟瀹屾垚姣旂巼
+        items:
+          $ref: '#/definitions/model.CommonStats'
+        type: array
+      orderFinishRateData:
+        description: 璁㈠崟瀹屾垚姣旂巼
+        type: string
+      outPlanProductionAmount:
+        description: 璁″垝澶栧姞宸ユ暟
+        type: integer
+      personnelProductivity:
+        description: 浜哄憳鐢熶骇鏁堢巼
+        items:
+          $ref: '#/definitions/model.CommonStats'
+        type: array
+      personnelProductivityData:
+        description: 浜哄憳鐢熶骇鏁堢巼
+        type: string
+      personnelSkillPercent:
+        description: 浜哄憳鎶�鑳藉崰姣�
+        items:
+          $ref: '#/definitions/model.CommonStats'
+        type: array
+      personnelSkillPercentData:
+        description: 浜哄憳鎶�鑳藉崰姣�
+        type: string
+      planOrderFinishRate:
+        description: 璁″垝杈炬垚鐜�
+        type: string
+      planProductionAmount:
+        description: 璁″垝鍔犲伐鏁�
+        type: integer
+      realExternalProductionAmount:
+        description: 瀹為檯澶栧姞宸ユ暟
+        type: integer
+      realProductionAmount:
+        description: 瀹為檯鐢熶骇鏁�
+        type: integer
+      todayFinishAmount:
+        description: 杞﹂棿褰撴棩鍚堣鐢熶骇
+        type: integer
+      todayQualifiedRate:
+        description: 杞﹂棿褰撴棩姝e搧鐜�
+        type: string
+      totalDeviceAmount:
+        description: 鎬昏澶囨暟
+        type: integer
+      updatedAt:
+        type: string
+      version:
+        type: string
+      workOrderAmount:
+        description: 鐢熶骇宸ュ崟鏁�
+        type: integer
+      workOrderStats:
+        description: 宸ュ崟杩涘害缁熻
+        items:
+          $ref: '#/definitions/model.WorkOrderStats'
+        type: array
+      workOrderStatsData:
+        description: 宸ュ崟杩涘害缁熻
+        type: string
+      workshopStats:
+        description: 杞﹂棿缁熻
+        items:
+          $ref: '#/definitions/model.WorkshopStats'
+        type: array
+      workshopStatsData:
+        description: 杞﹂棿缁熻
+        type: string
+    type: object
   model.DevicePlc:
     properties:
       address:
@@ -454,9 +575,6 @@
       barCode:
         description: 鏉″舰鐮�
         type: string
-      channel:
-        description: 閫氶亾
-        type: integer
       createdAt:
         type: string
       deletedAt:
@@ -497,6 +615,38 @@
         type: string
       workerTime:
         description: 宸ユ椂锛屽崟浣嶇
+        type: integer
+    type: object
+  model.WorkOrderStats:
+    properties:
+      delayDays:
+        description: 寤舵湡澶╂暟
+        type: integer
+      number:
+        description: 缂栧彿
+        type: string
+      percent:
+        description: 瀹屾垚杩涘害
+        type: integer
+      planTime:
+        description: 璁″垝鏃堕棿
+        type: string
+      product:
+        description: 浜у搧
+        type: string
+      scale:
+        description: 瑙勬牸
+        type: string
+    type: object
+  model.WorkshopStats:
+    properties:
+      defective:
+        type: integer
+      percent:
+        type: integer
+      qualified:
+        type: integer
+      total:
         type: integer
     type: object
   problem.CheckResult:
@@ -854,6 +1004,23 @@
       summary: 鏇存柊plc閰嶇疆
       tags:
       - Config
+  /v1/dashboard/dashboard:
+    get:
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: 鎴愬姛
+          schema:
+            allOf:
+            - $ref: '#/definitions/contextx.Response'
+            - properties:
+                data:
+                  $ref: '#/definitions/model.Dashboard'
+              type: object
+      summary: 椹鹃┒鑸�
+      tags:
+      - 椹鹃┒鑸�
   /v1/device/config:
     post:
       parameters:

--
Gitblit v1.8.0