浏览代码

更新指标最新值

xyxie 11 月之前
父节点
当前提交
7be83fd459
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      services/edb_info.go

+ 4 - 0
services/edb_info.go

@@ -108,6 +108,8 @@ func AddOrUpdateEdbInfo(edbItem *models.EdbInfo, sysUserId int, sysUserRealName
 		edbInfo.MaxValue = edbItem.MaxValue
 		edbInfo.MaxValue = edbItem.MaxValue
 		edbInfo.MinValue = edbItem.MinValue
 		edbInfo.MinValue = edbItem.MinValue
 		edbInfo.EdbType = edbItem.EdbType
 		edbInfo.EdbType = edbItem.EdbType
+		edbInfo.LatestDate = edbItem.LatestDate
+		edbInfo.LatestValue = edbItem.LatestValue
 		err = edbInfo.Update([]string{})
 		err = edbInfo.Update([]string{})
 		if err != nil {
 		if err != nil {
 			errMsg = "保存失败"
 			errMsg = "保存失败"
@@ -149,6 +151,8 @@ func AddOrUpdateEdbInfo(edbItem *models.EdbInfo, sysUserId int, sysUserRealName
 		edbInfo.MaxValue = edbItem.MaxValue
 		edbInfo.MaxValue = edbItem.MaxValue
 		edbInfo.MinValue = edbItem.MinValue
 		edbInfo.MinValue = edbItem.MinValue
 		edbInfo.EdbType = edbItem.EdbType
 		edbInfo.EdbType = edbItem.EdbType
+		edbInfo.LatestDate = edbItem.LatestDate
+		edbInfo.LatestValue = edbItem.LatestValue
 		edbInfoId, err = models.AddEdbInfo(edbInfo)
 		edbInfoId, err = models.AddEdbInfo(edbInfo)
 		if err != nil {
 		if err != nil {
 			errMsg = "保存失败"
 			errMsg = "保存失败"