|
@@ -7,12 +7,14 @@ import (
|
|
|
"eta/eta_mobile/services/alarm_msg"
|
|
|
"eta/eta_mobile/utils"
|
|
|
"fmt"
|
|
|
- "github.com/beego/beego/v2/client/orm"
|
|
|
- "github.com/rdlucklib/rdluck_tools/paging"
|
|
|
- "go.mongodb.org/mongo-driver/bson"
|
|
|
"strconv"
|
|
|
"strings"
|
|
|
"time"
|
|
|
+
|
|
|
+ "go.mongodb.org/mongo-driver/bson"
|
|
|
+
|
|
|
+ "github.com/beego/beego/v2/client/orm"
|
|
|
+ "github.com/rdlucklib/rdluck_tools/paging"
|
|
|
)
|
|
|
|
|
|
type EdbInfo struct {
|
|
@@ -1658,6 +1660,25 @@ func GetEdbInfoCount(source int, edbCode string) (count int, err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+type EdbInfoEditRecord struct {
|
|
|
+ EdbInfoId int `description:"指标ID"`
|
|
|
+ EdbName string `description:"指标名称"`
|
|
|
+ Frequency string `description:"频率"`
|
|
|
+ Unit string `description:"单位"`
|
|
|
+ ClassifyId int `description:"分类id"`
|
|
|
+ CalculateFormula string `description:"计算公式"`
|
|
|
+ OperateUserId int `description:"操作人id"`
|
|
|
+ OperateUserRealName string `description:"操作人姓名"`
|
|
|
+}
|
|
|
+
|
|
|
+func ModifyEdbInfoBaseTimeById(edbInfoId int, cTime time.Time) (err error) {
|
|
|
+ o := orm.NewOrmUsingDB("data")
|
|
|
+ // 更新修改时间
|
|
|
+ sql := ` UPDATE edb_info SET base_modify_time = ? WHERE edb_info_id = ? `
|
|
|
+ _, err = o.Raw(sql, cTime, edbInfoId).Exec()
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
// GetEdbInfoByNameArr 根据名称获取指标
|
|
|
func GetEdbInfoByNameArr(names []string, edbInfoType int) (items []*EdbInfo, err error) {
|
|
|
if len(names) == 0 {
|