From f73f610cdf4b0666dc139a51e72353b88f8f25ab Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期四, 19 十月 2023 17:27:17 +0800
Subject: [PATCH] 为保证正确获取集群状态, 添加程序启动时读取system-service运行状态
---
model/procedures.go | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/model/procedures.go b/model/procedures.go
index 2d1cef2..4c93059 100644
--- a/model/procedures.go
+++ b/model/procedures.go
@@ -12,16 +12,17 @@
type (
Procedures struct {
gorm.Model
- WorkOrderID string `gorm:"index;type:varchar(191);not null;comment:宸ュ崟ID" json:"-"`
- OrderID string `gorm:"index;type:varchar(191);not null;comment:璁㈠崟ID" json:"-"`
- DeviceID string `gorm:"index;type:varchar(191);comment:璁惧ID" json:"deviceId"`
- ProcedureID string `gorm:"index;type:varchar(191);comment:宸ュ簭ID" json:"procedureId"`
- Channel int32 `gorm:"index;comment:閫氶亾" json:"channel"` //閫氶亾
- StartTime int64 `gorm:"comment:璁″垝寮�濮嬫椂闂�" json:"startTime"`
- EndTime int64 `gorm:"comment:璁″垝缁撴潫鏃堕棿" json:"endTime"`
- Status ProcedureStatus
- ProcedureData string `json:"-"` //common.ProductProcedure json涓�
- ProceduresInfo common.ProductProcedure `json:"procedure" gorm:"-"` //common.ProductProcedure 瀵硅薄
+ WorkOrderID string `gorm:"index;type:varchar(191);not null" json:"-"`
+ OrderID string `gorm:"index;type:varchar(191);not null" json:"-"`
+ DeviceID string `gorm:"index;type:varchar(191)" json:"deviceId"`
+ ProcedureID string `gorm:"index;type:varchar(191)" json:"procedureId"`
+ Channel int32 `gorm:"index;" json:"channel"` //閫氶亾
+ ProcessModelNumber string `gorm:"index;" json:"processModelNumber"` //宸ヨ壓妯″瀷缂栧彿
+ StartTime int64 `json:"startTime"`
+ EndTime int64 `json:"endTime"`
+ Status ProcedureStatus
+ ProcedureData string `json:"-"` //common.ProductProcedure json涓�
+ ProceduresInfo common.ProductProcedure `json:"procedure" gorm:"-"` //common.ProductProcedure 瀵硅薄
}
ProceduresSearch struct {
@@ -178,7 +179,7 @@
}
if len(slf.ProcedureIds) > 0 {
- db = db.Where("procedure_id in ?", slf.ProcedureIds)
+ db = db.Where("procedure_id IN (?)", slf.ProcedureIds)
}
if slf.ProcedureID != "" {
@@ -186,7 +187,7 @@
}
if len(slf.Channels) > 0 {
- db = db.Where("channel in ?", slf.Channels)
+ db = db.Where("channel IN (?)", slf.Channels)
}
return db
--
Gitblit v1.8.0