|
@@ -258,8 +258,6 @@ func refreshAllCalculateLjzzy(to *gorm.DB, edbInfoId, source, subSource int, fro
|
|
var date string
|
|
var date string
|
|
var val float64
|
|
var val float64
|
|
|
|
|
|
- //fmt.Println("delete:", yk, i, yv[i], dataCurrentItem)
|
|
|
|
-
|
|
|
|
if dataCurrentItem != nil {
|
|
if dataCurrentItem != nil {
|
|
if i == 1 || i == 2 {
|
|
if i == 1 || i == 2 {
|
|
if _, mok := yv[1]; mok { //1月有值
|
|
if _, mok := yv[1]; mok { //1月有值
|
|
@@ -318,7 +316,8 @@ func refreshAllCalculateLjzzy(to *gorm.DB, edbInfoId, source, subSource int, fro
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- if i == 1 && len(yv) > 1 {
|
|
|
|
|
|
+
|
|
|
|
+ if i == 1 {
|
|
_, mok := yv[1]
|
|
_, mok := yv[1]
|
|
_, tok := yv[2]
|
|
_, tok := yv[2]
|
|
|
|
|
|
@@ -327,6 +326,10 @@ func refreshAllCalculateLjzzy(to *gorm.DB, edbInfoId, source, subSource int, fro
|
|
month := strconv.Itoa(i)
|
|
month := strconv.Itoa(i)
|
|
_, date = utils.GetMonthStartAndEnd(year, month)
|
|
_, date = utils.GetMonthStartAndEnd(year, month)
|
|
delete(removeDateMap, date)
|
|
delete(removeDateMap, date)
|
|
|
|
+ val = yv[2].Value
|
|
|
|
+ a := decimal.NewFromFloat(val)
|
|
|
|
+ b := decimal.NewFromFloat(2.0)
|
|
|
|
+ val, _ = a.Div(b).Float64()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|