From f9188dc1a6e96c1ca9520ebdc07bbfe26876351c Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期一, 04 十二月 2023 19:19:39 +0800 Subject: [PATCH] 字段更改 --- model/dashboard.go | 43 +++++++++++++-------- docs/swagger.yaml | 15 +++++++ docs/docs.go | 20 +++++++++ docs/swagger.json | 20 +++++++++ 4 files changed, 78 insertions(+), 20 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index cc69d5d..7afc936 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1301,7 +1301,7 @@ }, "planOrderFinishRate": { "description": "璁″垝杈炬垚鐜�", - "type": "string" + "type": "integer" }, "planProductionAmount": { "description": "璁″垝鍔犲伐鏁�", @@ -1327,6 +1327,10 @@ "description": "鎬昏澶囨暟", "type": "integer" }, + "totalProductionAmount": { + "description": "鎬讳骇閲�", + "type": "integer" + }, "updatedAt": { "type": "string" }, @@ -1346,6 +1350,17 @@ }, "workOrderStatsData": { "description": "宸ュ崟杩涘害缁熻", + "type": "string" + }, + "workerTypeStats": { + "description": "浜哄憳宸ョ鍒嗘瀽", + "type": "array", + "items": { + "$ref": "#/definitions/model.CommonStats" + } + }, + "workerTypeStatsData": { + "description": "浜哄憳宸ョ鍒嗘瀽", "type": "string" }, "workshopStats": { @@ -1845,6 +1860,9 @@ "defective": { "type": "integer" }, + "name": { + "type": "string" + }, "percent": { "type": "integer" }, diff --git a/docs/swagger.json b/docs/swagger.json index 2934e2c..4c97e53 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -1289,7 +1289,7 @@ }, "planOrderFinishRate": { "description": "璁″垝杈炬垚鐜�", - "type": "string" + "type": "integer" }, "planProductionAmount": { "description": "璁″垝鍔犲伐鏁�", @@ -1315,6 +1315,10 @@ "description": "鎬昏澶囨暟", "type": "integer" }, + "totalProductionAmount": { + "description": "鎬讳骇閲�", + "type": "integer" + }, "updatedAt": { "type": "string" }, @@ -1334,6 +1338,17 @@ }, "workOrderStatsData": { "description": "宸ュ崟杩涘害缁熻", + "type": "string" + }, + "workerTypeStats": { + "description": "浜哄憳宸ョ鍒嗘瀽", + "type": "array", + "items": { + "$ref": "#/definitions/model.CommonStats" + } + }, + "workerTypeStatsData": { + "description": "浜哄憳宸ョ鍒嗘瀽", "type": "string" }, "workshopStats": { @@ -1833,6 +1848,9 @@ "defective": { "type": "integer" }, + "name": { + "type": "string" + }, "percent": { "type": "integer" }, diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 7cf48a1..9e77c3d 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -270,7 +270,7 @@ type: string planOrderFinishRate: description: 璁″垝杈炬垚鐜� - type: string + type: integer planProductionAmount: description: 璁″垝鍔犲伐鏁� type: integer @@ -289,6 +289,9 @@ totalDeviceAmount: description: 鎬昏澶囨暟 type: integer + totalProductionAmount: + description: 鎬讳骇閲� + type: integer updatedAt: type: string version: @@ -303,6 +306,14 @@ type: array workOrderStatsData: description: 宸ュ崟杩涘害缁熻 + type: string + workerTypeStats: + description: 浜哄憳宸ョ鍒嗘瀽 + items: + $ref: '#/definitions/model.CommonStats' + type: array + workerTypeStatsData: + description: 浜哄憳宸ョ鍒嗘瀽 type: string workshopStats: description: 杞﹂棿缁熻 @@ -644,6 +655,8 @@ properties: defective: type: integer + name: + type: string percent: type: integer qualified: diff --git a/model/dashboard.go b/model/dashboard.go index 79a54cf..6146a2b 100644 --- a/model/dashboard.go +++ b/model/dashboard.go @@ -11,20 +11,20 @@ Dashboard struct { gorm.Model Version string - DeviceRunningAmount int //寮�鏈哄彴鏁� - totalProductionAmount int //鎬讳骇閲� - WorkOrderAmount int //鐢熶骇宸ュ崟鏁� - DelayWorkOrderAmount int //寤舵湡浜や粯宸ュ崟鏁� - MaterialMissWorkOrderAmount int //鐗╂枡涓嶈冻宸ュ崟鏁� - PlanOrderFinishRate string //璁″垝杈炬垚鐜� - TotalDeviceAmount int //鎬昏澶囨暟 - InMaintenanceDeviceAmount int //缁翠慨涓澶囨暟 - InternalDeviceRunningAmount int //鑷湁寮�鏈哄彴鏁� - ExternalDeviceRunningAmount int //澶栧姞宸ュ彴鏁� - OutPlanProductionAmount int //璁″垝澶栧姞宸ユ暟 - PlanProductionAmount int //璁″垝鍔犲伐鏁� - RealExternalProductionAmount int //瀹為檯澶栧姞宸ユ暟 - RealProductionAmount int //瀹為檯鐢熶骇鏁� + DeviceRunningAmount int //寮�鏈哄彴鏁� + TotalProductionAmount int //鎬讳骇閲� + WorkOrderAmount int64 //鐢熶骇宸ュ崟鏁� + DelayWorkOrderAmount int64 //寤舵湡浜や粯宸ュ崟鏁� + MaterialMissWorkOrderAmount int //鐗╂枡涓嶈冻宸ュ崟鏁� + PlanOrderFinishRate int64 //璁″垝杈炬垚鐜� + TotalDeviceAmount int64 //鎬昏澶囨暟 + InMaintenanceDeviceAmount int64 //缁翠慨涓澶囨暟 + InternalDeviceRunningAmount int //鑷湁寮�鏈哄彴鏁� + ExternalDeviceRunningAmount int //澶栧姞宸ュ彴鏁� + OutPlanProductionAmount int //璁″垝澶栧姞宸ユ暟 + PlanProductionAmount int //璁″垝鍔犲伐鏁� + RealExternalProductionAmount int //瀹為檯澶栧姞宸ユ暟 + RealProductionAmount int //瀹為檯鐢熶骇鏁� DeviceLoadData string //璁惧璐熻嵎瀵规瘮鍒嗘瀽 DeviceLoad []*CommonStats `gorm:"-"` //璁惧璐熻嵎瀵规瘮鍒嗘瀽 @@ -36,8 +36,10 @@ PersonnelProductivity []*CommonStats `gorm:"-"` //浜哄憳鐢熶骇鏁堢巼 PersonnelSkillPercentData string //浜哄憳鎶�鑳藉崰姣� PersonnelSkillPercent []*CommonStats `gorm:"-"` //浜哄憳鎶�鑳藉崰姣� + WorkerTypeStatsData string //浜哄憳宸ョ鍒嗘瀽 + WorkerTypeStats []*CommonStats `gorm:"-"` //浜哄憳宸ョ鍒嗘瀽 - TodayFinishAmount int //杞﹂棿褰撴棩鍚堣鐢熶骇 + TodayFinishAmount int64 //杞﹂棿褰撴棩鍚堣鐢熶骇 TodayQualifiedRate string //杞﹂棿褰撴棩姝e搧鐜� WorkshopStatsData string //杞﹂棿缁熻 WorkshopStats []*WorkshopStats `gorm:"-"` //杞﹂棿缁熻 @@ -51,8 +53,9 @@ } WorkshopStats struct { - Total int - Qualified int + Name string + Total int64 + Qualified int64 Defective int Percent int } @@ -90,6 +93,7 @@ var orderFinishRate []*CommonStats var personnelProductivity []*CommonStats var personnelSkillPercent []*CommonStats + var workerTypeStats []*CommonStats var workshopStats []*WorkshopStats var workOrderStats []*WorkOrderStats var err error @@ -118,6 +122,11 @@ slf.PersonnelSkillPercent = personnelSkillPercent } } + if slf.WorkerTypeStatsData != "" { + if err = json.Unmarshal([]byte(slf.WorkerTypeStatsData), &workerTypeStats); err == nil { + slf.WorkerTypeStats = workerTypeStats + } + } if slf.WorkshopStatsData != "" { if err = json.Unmarshal([]byte(slf.WorkshopStatsData), &workshopStats); err == nil { slf.WorkshopStats = workshopStats -- Gitblit v1.8.0