zwxi 1 年之前
父节点
当前提交
af087da57e
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      controller/census/invoice_payment.go

+ 2 - 2
controller/census/invoice_payment.go

@@ -1513,9 +1513,9 @@ func getCensusIncomeListV2(ch chan models.CensusIncomeChartResp, req fms.IncomeL
 					yoy = (totalMoneySlice[i] + totalMoneySlice[i-1] + totalMoneySlice[i-2]) / 3
 					yoyStr = fmt.Sprintf("%.4f", yoy)
 					yoySlice = append(yoySlice, yoyStr)
+				} else {
+					yoySlice = append(yoySlice, "")
 				}
-				yoyStr = fmt.Sprintf("%.4f", yoy)
-				yoySlice = append(yoySlice, yoyStr)
 			}
 		}
 	}