|
@@ -50,10 +50,14 @@ func AddOrUpdateEdbData(edbCode string, dataList []*models.EdbDataBase) (err err
|
|
|
}
|
|
|
if oldObj, ok := existMap[dataTime]; !ok {
|
|
|
tmp := &mgodb.EdbDataBase{
|
|
|
- DataTime: dataTime,
|
|
|
- Value: val,
|
|
|
- CreateTime: time.Now(),
|
|
|
- ModifyTime: time.Now(),
|
|
|
+ EdbInfoId: 0,
|
|
|
+ EdbCode: v.EdbCode,
|
|
|
+ DataTime: dataTime,
|
|
|
+ Value: val,
|
|
|
+ Status: v.Status,
|
|
|
+ CreateTime: time.Now(),
|
|
|
+ ModifyTime: time.Now(),
|
|
|
+ DataTimestamp: v.DataTimestamp,
|
|
|
}
|
|
|
addList = append(addList, tmp)
|
|
|
} else {
|
|
@@ -96,10 +100,14 @@ func AddOrUpdateEdbDataCalculate(edbCode string, dataList []*models.EdbDataBase)
|
|
|
}
|
|
|
if oldObj, ok := existMap[dataTime]; !ok {
|
|
|
tmp := &mgodb.EdbDataBase{
|
|
|
- DataTime: dataTime,
|
|
|
- Value: val,
|
|
|
- CreateTime: time.Now(),
|
|
|
- ModifyTime: time.Now(),
|
|
|
+ EdbInfoId: 0,
|
|
|
+ EdbCode: v.EdbCode,
|
|
|
+ DataTime: dataTime,
|
|
|
+ Value: val,
|
|
|
+ Status: v.Status,
|
|
|
+ CreateTime: time.Now(),
|
|
|
+ ModifyTime: time.Now(),
|
|
|
+ DataTimestamp: v.DataTimestamp,
|
|
|
}
|
|
|
addList = append(addList, tmp)
|
|
|
} else {
|