Jelajahi Sumber

利润曲线修改

xyxie 9 bulan lalu
induk
melakukan
1534c950fa
1 mengubah file dengan 4 tambahan dan 3 penghapusan
  1. 4 3
      services/data/future_good/profit_chart_info.go

+ 4 - 3
services/data/future_good/profit_chart_info.go

@@ -285,7 +285,8 @@ func ProfitChartChartData(baseEdbInfo *data_manage.EdbInfo, baseDataListMap map[
 			if edbInfoId == baseEdbInfo.EdbInfoId {
 				findDataList = append(findDataList, findDataValue)
 				yDataMap[0] = findDataValue
-				xEdbInfoIdList = append(xEdbInfoIdList, edbInfoId)
+				xEdbInfoIdList = append(xEdbInfoIdList, -edbInfoId)
+				index += 1
 				continue
 			}
 			baseEdbDateDataTmp, ok := allBaseEdbDateDataMap[edbInfoId]
@@ -301,7 +302,7 @@ func ProfitChartChartData(baseEdbInfo *data_manage.EdbInfo, baseDataListMap map[
 			findDataList = append(findDataList, findDataValueTmp)
 			yDataMap[index] = findDataValueTmp
 
-			xEdbInfoIdList = append(xEdbInfoIdList, edbInfoId)
+			xEdbInfoIdList = append(xEdbInfoIdList, -edbInfoId)
 			index += 1
 		}
 
@@ -541,7 +542,7 @@ func handleProfitResultData(baseEdbInfo *data_manage.EdbInfo, yDataList []data_m
 	})
 
 	for _, n := range nList {
-		if n == 0 {
+		if n < 0 {
 			continue
 		}
 		xDataList = append(xDataList, data_manage.XData{