|
|
@ -1106,7 +1106,8 @@ func (a *ApiMethod) GetHingeTarget(c *gin.Context) { |
|
|
if len(receivedValue.OrgId) > 1 { |
|
|
if len(receivedValue.OrgId) > 1 { |
|
|
sendCont.DataList, sendCont.XAxisVal, sendCont.YAxis.Max, sendCont.YAxis.Min = GetOrgHingeTarget(v.Id, v.Type, currentYears, currentMonths, receivedValue.OrgId) |
|
|
sendCont.DataList, sendCont.XAxisVal, sendCont.YAxis.Max, sendCont.YAxis.Min = GetOrgHingeTarget(v.Id, v.Type, currentYears, currentMonths, receivedValue.OrgId) |
|
|
} |
|
|
} |
|
|
sendCont.YAxis.Max, sendCont.YAxis.Min = publicmethod.JudjeMaxOfMinVal(sendCont.YAxis.Max, sendCont.YAxis.Min) |
|
|
fmt.Printf("最小值:%v\n", sendCont.YAxis.Min) |
|
|
|
|
|
sendCont.YAxis.Max, sendCont.YAxis.Min = publicmethod.NewJudjeMaxOfMinVal(sendCont.YAxis.Max, sendCont.YAxis.Min) |
|
|
// sendCont.DataList []float64 `json:"datalist"`
|
|
|
// sendCont.DataList []float64 `json:"datalist"`
|
|
|
// sendCont.XAxisVal []string `json:"xaxis"` //X轴坐标值
|
|
|
// sendCont.XAxisVal []string `json:"xaxis"` //X轴坐标值
|
|
|
sendListCont = append(sendListCont, sendCont) |
|
|
sendListCont = append(sendListCont, sendCont) |
|
|
@ -1159,7 +1160,7 @@ func GetOrgHingeTarget(targetId int64, attribute int, ysers, months string, orgI |
|
|
} |
|
|
} |
|
|
maxVal = publicmethod.DecimalEs(maxVal, 2) |
|
|
maxVal = publicmethod.DecimalEs(maxVal, 2) |
|
|
minVal = publicmethod.DecimalEs(minVal, 2) |
|
|
minVal = publicmethod.DecimalEs(minVal, 2) |
|
|
fmt.Printf("orgScore------->%v------->%v------->%v\n", orgScore, maxVal, minVal) |
|
|
// fmt.Printf("orgScore------->%v------->%v------->%v\n", orgScore, maxVal, minVal)
|
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -1177,6 +1178,8 @@ func (s *SyncOrgTimeAllScore) GetOrgTargetVal(orgId, targetId int64, attribute i |
|
|
tirgetScore.OrgId = orgId |
|
|
tirgetScore.OrgId = orgId |
|
|
s.OrgScore = append(s.OrgScore, tirgetScore) |
|
|
s.OrgScore = append(s.OrgScore, tirgetScore) |
|
|
} |
|
|
} |
|
|
|
|
|
// fmt.Printf("tirgetScore.Score---->%v\n", tirgetScore.Score)
|
|
|
|
|
|
if tirgetScore.Score >= 0 { |
|
|
if s.AxisMin == 0 { |
|
|
if s.AxisMin == 0 { |
|
|
s.AxisMin = tirgetScore.Score |
|
|
s.AxisMin = tirgetScore.Score |
|
|
} else { |
|
|
} else { |
|
|
@ -1184,6 +1187,13 @@ func (s *SyncOrgTimeAllScore) GetOrgTargetVal(orgId, targetId int64, attribute i |
|
|
s.AxisMin = tirgetScore.Score |
|
|
s.AxisMin = tirgetScore.Score |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
// fmt.Printf("tirgetScore.Score--1-->%v\n-->%v\n", tirgetScore.Score, s.AxisMin)
|
|
|
|
|
|
if s.AxisMin > tirgetScore.Score { |
|
|
|
|
|
s.AxisMin = tirgetScore.Score |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if s.AxisMax == 0 { |
|
|
if s.AxisMax == 0 { |
|
|
s.AxisMax = tirgetScore.Score |
|
|
s.AxisMax = tirgetScore.Score |
|
|
} else { |
|
|
} else { |
|
|
|