Browse Source

fix:临时任务客户分布其它统计优化修改

duxin 11 months ago
parent
commit
8428bc7669

+ 5 - 5
src/jfw/modules/bigmember/src/entity/marketAnalysis/customized_analysis.go

@@ -461,12 +461,12 @@ func CustomerDistribute(thisRow AreaCTop) (data []map[string]interface{}, otherD
 	//	total += v.AreaTotal
 	//	amount += v.BuyclassAmount.Value
 	//}
-	pCount := util.Int64All(thisRow.ProjectCount) - total
-	pAmount := util.Float64All(thisRow.Amount) - amount
-	if pCount != 0 || pAmount != 0 {
-		otherData = make(map[string]interface{})
-		otherData["buyclass"] = "其它"
+	otherData = make(map[string]interface{})
+	otherData["buyclass"] = "其它"
+	if pCount := util.Int64All(thisRow.ProjectCount.DocCount) - total; pCount > 0 {
 		otherData["total"] = pCount
+	}
+	if pAmount := thisRow.Amount.Value - amount; pAmount > 0 {
 		otherData["amount"] = pAmount
 	}
 	return

+ 2 - 2
src/jfw/modules/bigmember/src/entity/portrait_screen.go

@@ -113,11 +113,11 @@ func TimeParse(str string) (st, et time.Time, err error) {
 	tRanges := strings.Split(str, "_")
 	if len(tRanges) == 2 {
 		// 使用 time.Parse 进行校验
-		st, err = time.Parse(time.DateOnly, tRanges[0])
+		st, err = time.Parse("time.DateOnly", tRanges[0])
 		if err != nil {
 			return
 		}
-		et, err = time.Parse(time.DateOnly, tRanges[1])
+		et, err = time.Parse("time.DateOnly", tRanges[1])
 		if err != nil {
 			return
 		}