|
@@ -261,14 +261,15 @@ func refreshAllCalculateHcz(to orm.TxOrmer, edbInfoId, source int, fromEdbInfo *
|
|
|
if currentItem != nil && preItem != nil {
|
|
|
existKey := edbCode + currentItem.DataTime
|
|
|
if _, ok := existMap[existKey]; !ok {
|
|
|
- // 有计算出来值,那么就从待删除指标中移除
|
|
|
- delete(removeDateMap, currentItem.DataTime)
|
|
|
|
|
|
currentDate, _ := time.Parse(utils.FormatDate, currentItem.DataTime)
|
|
|
timestamp := currentDate.UnixNano() / 1e6
|
|
|
timestampStr := fmt.Sprintf("%d", timestamp)
|
|
|
val := HczDiv(currentItem.Value, preItem.Value)
|
|
|
if val != "" {
|
|
|
+ // 有计算出来值,那么就从待删除指标中移除
|
|
|
+ delete(removeDateMap, currentItem.DataTime)
|
|
|
+
|
|
|
if existVal, findOk := existDataMap[currentItem.DataTime]; !findOk {
|
|
|
addSql += GetAddSql(edbInfoIdStr, edbCode, currentItem.DataTime, timestampStr, val)
|
|
|
isAdd = true
|