|
@@ -4,6 +4,7 @@ import (
|
|
|
"eta/eta_api/global"
|
|
|
"eta/eta_api/utils"
|
|
|
"fmt"
|
|
|
+ "gorm.io/gorm"
|
|
|
"strings"
|
|
|
"time"
|
|
|
|
|
@@ -180,22 +181,31 @@ func GetMysteelChemicalFrequency(condition string, pars []interface{}) (items []
|
|
|
|
|
|
// MysteelChemicalList 钢联化工指标列表
|
|
|
type MysteelChemicalList struct {
|
|
|
- Id int `orm:"column(base_from_mysteel_chemical_index_id)"`
|
|
|
- BaseFromMysteelChemicalClassifyId int `orm:"column(base_from_mysteel_chemical_classify_id)" description:"钢联化工指标分类id"`
|
|
|
+ Id int `gorm:"column:base_from_mysteel_chemical_index_id"`
|
|
|
+ BaseFromMysteelChemicalClassifyId int `gorm:"column:base_from_mysteel_chemical_classify_id" description:"钢联化工指标分类id"`
|
|
|
ParentClassifyId int `description:"钢联化工指标父级分类id"`
|
|
|
IndexCode string `description:"指标编码"`
|
|
|
IndexName string `description:"指标名称"`
|
|
|
- UnitName string `orm:"column(unit)"`
|
|
|
+ UnitName string `gorm:"column:unit"`
|
|
|
UniqueCode string `description:"唯一编码"`
|
|
|
- FrequencyName string `orm:"column(frequency)"`
|
|
|
+ FrequencyName string `gorm:"column:frequency"`
|
|
|
EdbInfoId int `description:"指标库的id"`
|
|
|
- UpdateTime string `orm:"column(modify_time)"`
|
|
|
+ UpdateTime string `grom:"column:modify_time"`
|
|
|
IsStop int `description:"是否停更:1:停更,0:未停更"`
|
|
|
IsSupplierStop int `description:"是否供应商停更:1:停更,0:未停更"`
|
|
|
Paging *paging.PagingItem `description:"分页数据" gorm:"-"`
|
|
|
DataList []*MysteelChemicalData `gorm:"-"`
|
|
|
}
|
|
|
|
|
|
+func (m *MysteelChemicalList) AfterFind(tx *gorm.DB) (err error) {
|
|
|
+ if utils.NeedDateOrTimeFormat(utils.DbDriverName) {
|
|
|
+ if m.UpdateTime != "" {
|
|
|
+ m.UpdateTime = utils.GormDateStrToDateTimeStr(m.UpdateTime)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
// MysteelChemicalData 钢联化工数据列表
|
|
|
type MysteelChemicalData struct {
|
|
|
InputValue string `orm:"column(value)" description:"值"`
|