|
@@ -10,10 +10,10 @@ import (
|
|
|
"github.com/rdlucklib/rdluck_tools/paging"
|
|
|
)
|
|
|
|
|
|
-// BaseFromMysteelChemicalIndex 钢联化工指标表
|
|
|
+// BaseFromMysteelChemicalIndex 上海钢联指标表
|
|
|
type BaseFromMysteelChemicalIndex struct {
|
|
|
BaseFromMysteelChemicalIndexId int `orm:"column(base_from_mysteel_chemical_index_id);pk"`
|
|
|
- BaseFromMysteelChemicalClassifyId int `orm:"column(base_from_mysteel_chemical_classify_id)" description:"钢联化工指标分类id"`
|
|
|
+ BaseFromMysteelChemicalClassifyId int `orm:"column(base_from_mysteel_chemical_classify_id)" description:"上海钢联指标分类id"`
|
|
|
IndexCode string `description:"指标编码"`
|
|
|
IndexName string `description:"指标名称"`
|
|
|
Unit string `description:"单位"`
|
|
@@ -78,7 +78,7 @@ var BaseFromMysteelChemicalIndexCols = struct {
|
|
|
ModifyTime: "modify_time",
|
|
|
}
|
|
|
|
|
|
-// Update 更新钢联化工指标基础信息
|
|
|
+// Update 更新上海钢联指标基础信息
|
|
|
func (item *BaseFromMysteelChemicalIndex) Update(cols []string) (err error) {
|
|
|
o := orm.NewOrmUsingDB("data")
|
|
|
_, err = o.Update(item, cols...)
|
|
@@ -106,7 +106,7 @@ func (m *BaseFromMysteelChemicalIndex) GeItemsByCondition(condition string, pars
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-// AddBaseFromMysteelChemicalIndex 添加钢联化工指标
|
|
|
+// AddBaseFromMysteelChemicalIndex 添加上海钢联指标
|
|
|
func AddBaseFromMysteelChemicalIndex(item *BaseFromMysteelChemicalIndex) (lastId int64, err error) {
|
|
|
o := orm.NewOrmUsingDB("data")
|
|
|
lastId, err = o.Insert(item)
|
|
@@ -118,17 +118,17 @@ func AddBaseFromMysteelChemicalIndex(item *BaseFromMysteelChemicalIndex) (lastId
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-// AddBaseFromMysteelChemicalIndex 添加钢联化工指标
|
|
|
+// AddBaseFromMysteelChemicalIndex 添加上海钢联指标
|
|
|
func BatchAddBaseFromMysteelChemicalIndex(items []*BaseFromMysteelChemicalIndex) (lastId int64, err error) {
|
|
|
o := orm.NewOrmUsingDB("data")
|
|
|
_, err = o.InsertMulti(len(items), items)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-// BaseFromMysteelChemicalData 钢联化工指标数据表
|
|
|
+// BaseFromMysteelChemicalData 上海钢联指标数据表
|
|
|
type BaseFromMysteelChemicalData struct {
|
|
|
BaseFromMysteelChemicalDataId int `orm:"column(base_from_mysteel_chemical_data_id);pk"`
|
|
|
- BaseFromMysteelChemicalIndexId int `orm:"column(base_from_mysteel_chemical_index_id)" description:"钢联化工指标id"`
|
|
|
+ BaseFromMysteelChemicalIndexId int `orm:"column(base_from_mysteel_chemical_index_id)" description:"上海钢联指标id"`
|
|
|
IndexCode string `description:"指标编码"`
|
|
|
DataTime time.Time `description:"数据日期"`
|
|
|
Value float64 `description:"数据值"`
|
|
@@ -136,7 +136,7 @@ type BaseFromMysteelChemicalData struct {
|
|
|
CreateTime time.Time `description:"创建时间"`
|
|
|
}
|
|
|
|
|
|
-// MysteelChemicalFrequency 钢联化工频度
|
|
|
+// MysteelChemicalFrequency 上海钢联频度
|
|
|
type MysteelChemicalFrequency struct {
|
|
|
Frequency string `description:"频度:1-日度 2-周度 3-月度 4-季度 5-年度 99-无固定频率"`
|
|
|
}
|
|
@@ -151,7 +151,7 @@ func GetMysteelChemicalIndexByClassifyId(classifyId int) (items []*BaseFromMyste
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-// MysteelChemicalFrequencyByClassifyId 根据分类id获取钢联化工频度数据列表
|
|
|
+// MysteelChemicalFrequencyByClassifyId 根据分类id获取上海钢联频度数据列表
|
|
|
func MysteelChemicalFrequencyByClassifyId(classifyId int) (items []*MysteelChemicalFrequency, err error) {
|
|
|
o := orm.NewOrmUsingDB("data")
|
|
|
if classifyId == 0 {
|
|
@@ -165,7 +165,7 @@ func MysteelChemicalFrequencyByClassifyId(classifyId int) (items []*MysteelChemi
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// GetMysteelChemicalFrequency 获取钢联化工频度数据列表
|
|
|
+// GetMysteelChemicalFrequency 获取上海钢联频度数据列表
|
|
|
func GetMysteelChemicalFrequency(condition string, pars []interface{}) (items []*MysteelChemicalFrequency, err error) {
|
|
|
o := orm.NewOrmUsingDB("data")
|
|
|
sql := ` SELECT frequency FROM base_from_mysteel_chemical_index WHERE 1=1 AND frequency != "" `
|
|
@@ -177,11 +177,11 @@ func GetMysteelChemicalFrequency(condition string, pars []interface{}) (items []
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-// MysteelChemicalList 钢联化工指标列表
|
|
|
+// 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"`
|
|
|
- ParentClassifyId int `description:"钢联化工指标父级分类id"`
|
|
|
+ BaseFromMysteelChemicalClassifyId int `orm:"column(base_from_mysteel_chemical_classify_id)" description:"上海钢联指标分类id"`
|
|
|
+ ParentClassifyId int `description:"上海钢联指标父级分类id"`
|
|
|
IndexCode string `description:"指标编码"`
|
|
|
IndexName string `description:"指标名称"`
|
|
|
UnitName string `orm:"column(unit)"`
|
|
@@ -194,13 +194,13 @@ type MysteelChemicalList struct {
|
|
|
DataList []*MysteelChemicalData
|
|
|
}
|
|
|
|
|
|
-// MysteelChemicalData 钢联化工数据列表
|
|
|
+// MysteelChemicalData 上海钢联数据列表
|
|
|
type MysteelChemicalData struct {
|
|
|
InputValue string `orm:"column(value)" description:"值"`
|
|
|
DataTime string `orm:"column(data_time)" description:"日期"`
|
|
|
}
|
|
|
|
|
|
-// GetMysteelChemicalIndex 根据分类id获取钢联化工频度数据列表
|
|
|
+// GetMysteelChemicalIndex 根据分类id获取上海钢联频度数据列表
|
|
|
func GetMysteelChemicalIndex(condition string, pars []interface{}) (items []*MysteelChemicalList, err error) {
|
|
|
o := orm.NewOrmUsingDB("data")
|
|
|
sql := ` SELECT * FROM base_from_mysteel_chemical_index WHERE 1=1 `
|
|
@@ -213,7 +213,7 @@ func GetMysteelChemicalIndex(condition string, pars []interface{}) (items []*Mys
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-// GetMysteelChemicalIndexData 根据指标code获取钢联化工数据列表
|
|
|
+// GetMysteelChemicalIndexData 根据指标code获取上海钢联数据列表
|
|
|
func GetMysteelChemicalIndexData(indexCode string, startSize, pageSize int) (items []*MysteelChemicalData, err error) {
|
|
|
sql := ` SELECT * FROM (
|
|
|
SELECT DISTINCT a.index_code,a.value,a.data_time FROM base_from_mysteel_chemical_data AS a WHERE index_code=?
|
|
@@ -226,7 +226,7 @@ func GetMysteelChemicalIndexData(indexCode string, startSize, pageSize int) (ite
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-// GetMysteelChemicalIndexDataCount 根据指标code获取钢联化工数据列表 获取钢联数据总数
|
|
|
+// GetMysteelChemicalIndexDataCount 根据指标code获取上海钢联数据列表 获取钢联数据总数
|
|
|
func GetMysteelChemicalIndexDataCount(indexCode string) (count int, err error) {
|
|
|
sql := `SELECT COUNT(1) AS count FROM (
|
|
|
SELECT * FROM (
|
|
@@ -314,7 +314,7 @@ func GetBaseFromMysteelChemicalDataMaxCount(classifyId int) (count int, err erro
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-// GetMysteelChemicalIndexDataByCode 通过钢联化工指标code获取所有数据列表
|
|
|
+// GetMysteelChemicalIndexDataByCode 通过上海钢联指标code获取所有数据列表
|
|
|
func GetMysteelChemicalIndexDataByCode(indexCode string) (items []*MysteelChemicalData, err error) {
|
|
|
sql := ` SELECT * FROM (
|
|
|
SELECT DISTINCT a.index_code,a.value,a.data_time FROM base_from_mysteel_chemical_data AS a WHERE index_code=?
|
|
@@ -327,7 +327,7 @@ func GetMysteelChemicalIndexDataByCode(indexCode string) (items []*MysteelChemic
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-// MoveBaseFromMysteelChemicalIndex 移动钢联化工指标分类
|
|
|
+// MoveBaseFromMysteelChemicalIndex 移动上海钢联指标分类
|
|
|
func MoveBaseFromMysteelChemicalIndex(chartInfoId, classifyId int) (err error) {
|
|
|
o := orm.NewOrmUsingDB("data")
|
|
|
sql := ` UPDATE base_from_mysteel_chemical_index
|
|
@@ -357,7 +357,7 @@ func GetFirstBaseFromMysteelChemicalIndexByClassifyId(classifyId int) (item *Bas
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-// GetMysteelChemicalIndexCount 根据条件获取钢联化工数据
|
|
|
+// GetMysteelChemicalIndexCount 根据条件获取上海钢联数据
|
|
|
func GetMysteelChemicalIndexCount(condition string, pars []interface{}) (count int, err error) {
|
|
|
o := orm.NewOrmUsingDB("data")
|
|
|
sql := ` SELECT COUNT(1) AS count FROM base_from_mysteel_chemical_index WHERE 1=1 `
|
|
@@ -370,7 +370,7 @@ func GetMysteelChemicalIndexCount(condition string, pars []interface{}) (count i
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-// GetMysteelChemicalIndexList 根据分类id获取钢联化工频度数据列表
|
|
|
+// GetMysteelChemicalIndexList 根据分类id获取上海钢联频度数据列表
|
|
|
func GetMysteelChemicalIndexList(condition string, pars []interface{}, startSize, pageSize int, orderDesc string) (items []*BaseFromMysteelChemicalIndex, err error) {
|
|
|
o := orm.NewOrmUsingDB("data")
|
|
|
sql := ` SELECT * FROM base_from_mysteel_chemical_index WHERE 1=1 `
|
|
@@ -483,7 +483,7 @@ type TerminalNum struct {
|
|
|
Num int `description:"num"`
|
|
|
}
|
|
|
|
|
|
-// GetMysteelChemicalGroupTerminalNum 获取钢联化工指标的终端分布
|
|
|
+// GetMysteelChemicalGroupTerminalNum 获取上海钢联指标的终端分布
|
|
|
func GetMysteelChemicalGroupTerminalNum() (items []*TerminalNum, err error) {
|
|
|
o := orm.NewOrmUsingDB("data")
|
|
|
sql := ` SELECT terminal_code,count(1) num FROM base_from_mysteel_chemical_index GROUP BY terminal_code ORDER BY num ASC `
|
|
@@ -495,7 +495,7 @@ func GetMysteelChemicalGroupTerminalNum() (items []*TerminalNum, err error) {
|
|
|
// @Description: 刷新配置的基础指标信息结构体
|
|
|
type BaseRefreshEdbInfo struct {
|
|
|
EdbInfoId int
|
|
|
- ClassifyId int `description:"钢联化工指标分类id"`
|
|
|
+ ClassifyId int `description:"上海钢联指标分类id"`
|
|
|
IndexCode string `description:"指标编码"`
|
|
|
IndexName string `description:"指标名称"`
|
|
|
EndDate string `description:"最新日期"`
|
|
@@ -516,7 +516,7 @@ type RefreshBaseEdbInfoResp struct {
|
|
|
}
|
|
|
|
|
|
// GetMysteelChemicalBaseInfoList
|
|
|
-// @Description: 获取钢联化工数据列表
|
|
|
+// @Description: 获取上海钢联数据列表
|
|
|
// @author: Roc
|
|
|
// @datetime 2024-01-10 14:28:35
|
|
|
// @param condition string
|
|
@@ -558,7 +558,7 @@ func GetMysteelChemicalBaseInfoList(condition string, pars []interface{}, orderB
|
|
|
}
|
|
|
|
|
|
// ModifyMysteelChemicalUpdateStatus
|
|
|
-// @Description: 修改钢联化工数据停更状态
|
|
|
+// @Description: 修改上海钢联数据停更状态
|
|
|
// @author: Roc
|
|
|
// @datetime 2024-01-08 16:23:31
|
|
|
// @param edbIdList []int
|
|
@@ -616,7 +616,7 @@ func ModifyMysteelChemicalUpdateStatus(edbIdList []int, indexCodeList []string,
|
|
|
}
|
|
|
|
|
|
// ModifyMysteelChemicalUpdateStatusByEdbInfoId
|
|
|
-// @Description: 修改单个钢联化工指标停更状态,同时停更依赖于该指标的计算指标
|
|
|
+// @Description: 修改单个上海钢联指标停更状态,同时停更依赖于该指标的计算指标
|
|
|
// @author: Roc
|
|
|
// @datetime 2024-01-08 16:23:31
|
|
|
// @param edbIdList []int
|