diff --git a/api/version1/departmentseting/departmentpc/programme.go b/api/version1/departmentseting/departmentpc/programme.go index 7c57787..37138fd 100644 --- a/api/version1/departmentseting/departmentpc/programme.go +++ b/api/version1/departmentseting/departmentpc/programme.go @@ -1107,44 +1107,45 @@ func eiteOperatorPlanVersion(orgId, targetId string, operator []string) { var targetReportCont modelskpi.TargetReport err := targetReportCont.DelCont(delWher) if err == nil { - var tarReportContList []modelskpi.TargetReport - var targetDeparcContList []modelskpi.TargetDepartment - err = overall.CONSTANT_DB_KPI.Model(&modelskpi.TargetDepartment{}).Where("`level` = 1 AND `target_id` = ? AND `department_id` = ?").Find(&targetDeparcContList).Error - if err == nil { - for _, v := range targetDeparcContList { - dimensId := v.Dimension - if dimensId == 0 && v.TargetId != 0 { - var targetCont modelskpi.EvaluationTarget - targetCont.GetCont(map[string]interface{}{"et_id": v.TargetId}, "et_dimension") - dimensId = targetCont.Dimension - } - for _, opev := range operator { - var tarReportCont modelskpi.TargetReport - tarReportCont.Dimension = dimensId //维度"` - tarReportCont.TargetId = v.TargetId //指标ID"` - tarReportCont.TargetSunId = v.TargetSunId //子目标"` - tarReportCont.TargetBylaws = v.TargetBylaws //指标细则"` - tarReportCont.DepartmentId = v.DepartmentId //部门ID"` - tarReportCont.PostId = v.PostId //岗位ID"` - tarReportCont.Type = v.Level //类型(1:公司级;2:部门级)"` - tarReportCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` - opevInt, _ := strconv.ParseInt(opev, 10, 64) - tarReportCont.ReportPerson = opevInt //上报人"` - if opev != "" { - var userCont modelshr.PersonArchives - userCont.GetCont(map[string]interface{}{"`key`": opev}, "maindeparment") - tarReportCont.ManDepartment = userCont.MainDeparment //提报人所在部门"` - } - tarReportCont.Time = overTime //写入时间"` - tarReportCont.Class = v.Class //1:定性考核;2:定量考核"` - tarReportCont.Level = v.Type //类型(1:指标;2:子目标;3:细则)"` - tarReportContList = append(tarReportContList, tarReportCont) + + } + var tarReportContList []modelskpi.TargetReport + var targetDeparcContList []modelskpi.TargetDepartment + err = overall.CONSTANT_DB_KPI.Model(&modelskpi.TargetDepartment{}).Where("`level` = 1 AND `target_id` = ? AND `department_id` = ?", targetId, orgId).Find(&targetDeparcContList).Error + if err == nil { + for _, v := range targetDeparcContList { + dimensId := v.Dimension + if dimensId == 0 && v.TargetId != 0 { + var targetCont modelskpi.EvaluationTarget + targetCont.GetCont(map[string]interface{}{"et_id": v.TargetId}, "et_dimension") + dimensId = targetCont.Dimension + } + for _, opev := range operator { + var tarReportCont modelskpi.TargetReport + tarReportCont.Dimension = dimensId //维度"` + tarReportCont.TargetId = v.TargetId //指标ID"` + tarReportCont.TargetSunId = v.TargetSunId //子目标"` + tarReportCont.TargetBylaws = v.TargetBylaws //指标细则"` + tarReportCont.DepartmentId = v.DepartmentId //部门ID"` + tarReportCont.PostId = v.PostId //岗位ID"` + tarReportCont.Type = v.Level //类型(1:公司级;2:部门级)"` + tarReportCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + opevInt, _ := strconv.ParseInt(opev, 10, 64) + tarReportCont.ReportPerson = opevInt //上报人"` + if opev != "" { + var userCont modelshr.PersonArchives + userCont.GetCont(map[string]interface{}{"`key`": opev}, "maindeparment") + tarReportCont.ManDepartment = userCont.MainDeparment //提报人所在部门"` } + tarReportCont.Time = overTime //写入时间"` + tarReportCont.Class = v.Class //1:定性考核;2:定量考核"` + tarReportCont.Level = v.Type //类型(1:指标;2:子目标;3:细则)"` + tarReportContList = append(tarReportContList, tarReportCont) } } - if len(tarReportContList) > 0 { - overall.CONSTANT_DB_KPI.Create(&tarReportContList) - } + } + if len(tarReportContList) > 0 { + overall.CONSTANT_DB_KPI.Create(&tarReportContList) } } diff --git a/api/version1/departmentseting/departmentweb/department.go b/api/version1/departmentseting/departmentweb/department.go index ae2578a..75bb32d 100644 --- a/api/version1/departmentseting/departmentweb/department.go +++ b/api/version1/departmentseting/departmentweb/department.go @@ -1106,7 +1106,8 @@ func (a *ApiMethod) GetHingeTarget(c *gin.Context) { 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.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.XAxisVal []string `json:"xaxis"` //X轴坐标值 sendListCont = append(sendListCont, sendCont) @@ -1159,7 +1160,7 @@ func GetOrgHingeTarget(targetId int64, attribute int, ysers, months string, orgI } maxVal = publicmethod.DecimalEs(maxVal, 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 } @@ -1177,13 +1178,22 @@ func (s *SyncOrgTimeAllScore) GetOrgTargetVal(orgId, targetId int64, attribute i tirgetScore.OrgId = orgId s.OrgScore = append(s.OrgScore, tirgetScore) } - if s.AxisMin == 0 { - s.AxisMin = tirgetScore.Score + // fmt.Printf("tirgetScore.Score---->%v\n", tirgetScore.Score) + if tirgetScore.Score >= 0 { + if s.AxisMin == 0 { + s.AxisMin = tirgetScore.Score + } else { + if 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 { s.AxisMax = tirgetScore.Score } else { diff --git a/api/version1/statistics/newpc.go b/api/version1/statistics/newpc.go index d7c9c11..8ba7fff 100644 --- a/api/version1/statistics/newpc.go +++ b/api/version1/statistics/newpc.go @@ -403,160 +403,160 @@ func (a *ApiMethod) NewSummaryDetails(c *gin.Context) { var lookStatistics []detailedResultsList for _, v := range planVersioInfo { //维度 for _, cv := range v.Child { //指标 - if cv.Id == "43" { - - var statisCont detailedResultsList - statisCont.DimensionId = v.Id //维度Id - statisCont.DimensionName = v.Name //维度名称 - statisCont.DimensionWeight = int64(v.ZhiFraction) //维度权重 - statisCont.TargetId = cv.Id //指标ID - statisCont.TargetName = cv.Name //指标名称 - statisCont.TargetCont = cv.Content //指标名称 - statisCont.Targetweight = cv.ReferenceScore //指标权重 - statisCont.GroupId = strconv.FormatInt(planVersion.Group, 10) //集团Id - statisCont.Versio = planVersion.Key - var groupCont modelshr.AdministrativeOrganization - groupCont.GetCont(map[string]interface{}{"`id`": planVersion.Group}, "name") - statisCont.GroupName = groupCont.Name //集团名称 - statisCont.DepartmentId = strconv.FormatInt(planVersion.Department, 10) //部门ID - var departCont modelshr.AdministrativeOrganization - departCont.GetCont(map[string]interface{}{"`id`": planVersion.Department}, "name") - statisCont.DepartmentName = departCont.Name //部门名称 - - var evalTargetCont modelskpi.EvaluationTarget //指标信息 - if cv.Id != "" && cv.Id != "0" { - targetErr := evalTargetCont.GetCont(map[string]interface{}{"`et_id`": cv.Id}, "et_type") - if targetErr == nil { - monthInt := int64(requestData.Months) - if evalTargetCont.Type == 1 { //定性指标 - statisCont.Score, statisCont.ExecutiveDepartment = DingXingScoreCalculation(orgId, requestData.Year, cv.ReferenceScore, []int64{monthInt}, cv.Id) - } else { //定量指标 - var sendList []dingLiangKaoHe - var dingLiangScore float64 = 0 - switch cv.Cycles { - case 5: //季度指标 - var fengDingZhi float64 = 0 - isTrue := true - switch monthInt { - case 3: - for i := 1; i <= 3; i++ { - sendListIng, orgNameList := GetDingLiangLog(orgId, requestData.Year, int64(i), cv.Id, fmt.Sprintf("%v月份实际分值", i)) - sendList = append(sendList, sendListIng...) - statisCont.ExecutiveDepartment = append(statisCont.ExecutiveDepartment, orgNameList...) - if i == 3 { - for _, v := range sendListIng { - fengDingZhi = v.Capping - if v.MtOrAt == 2 { - dingLiangScore = v.Score - isTrue = false - } - } - } - } - case 6: - for i := 4; i <= 6; i++ { - sendListIng, orgNameList := GetDingLiangLog(orgId, requestData.Year, int64(i), cv.Id, fmt.Sprintf("%v月份实际分值", i)) - sendList = append(sendList, sendListIng...) - statisCont.ExecutiveDepartment = append(statisCont.ExecutiveDepartment, orgNameList...) - if i == 6 { - for _, v := range sendListIng { - fengDingZhi = v.Capping - if v.MtOrAt == 2 { - dingLiangScore = v.Score - isTrue = false - } + // if cv.Id == "120" { + + var statisCont detailedResultsList + statisCont.DimensionId = v.Id //维度Id + statisCont.DimensionName = v.Name //维度名称 + statisCont.DimensionWeight = int64(v.ZhiFraction) //维度权重 + statisCont.TargetId = cv.Id //指标ID + statisCont.TargetName = cv.Name //指标名称 + statisCont.TargetCont = cv.Content //指标名称 + statisCont.Targetweight = cv.ReferenceScore //指标权重 + statisCont.GroupId = strconv.FormatInt(planVersion.Group, 10) //集团Id + statisCont.Versio = planVersion.Key + var groupCont modelshr.AdministrativeOrganization + groupCont.GetCont(map[string]interface{}{"`id`": planVersion.Group}, "name") + statisCont.GroupName = groupCont.Name //集团名称 + statisCont.DepartmentId = strconv.FormatInt(planVersion.Department, 10) //部门ID + var departCont modelshr.AdministrativeOrganization + departCont.GetCont(map[string]interface{}{"`id`": planVersion.Department}, "name") + statisCont.DepartmentName = departCont.Name //部门名称 + + var evalTargetCont modelskpi.EvaluationTarget //指标信息 + if cv.Id != "" && cv.Id != "0" { + targetErr := evalTargetCont.GetCont(map[string]interface{}{"`et_id`": cv.Id}, "et_type") + if targetErr == nil { + monthInt := int64(requestData.Months) + if evalTargetCont.Type == 1 { //定性指标 + statisCont.Score, statisCont.ExecutiveDepartment = DingXingScoreCalculation(orgId, requestData.Year, cv.ReferenceScore, []int64{monthInt}, cv.Id) + } else { //定量指标 + var sendList []dingLiangKaoHe + var dingLiangScore float64 = 0 + switch cv.Cycles { + case 5: //季度指标 + var fengDingZhi float64 = 0 + isTrue := true + switch monthInt { + case 3: + for i := 1; i <= 3; i++ { + sendListIng, orgNameList := GetDingLiangLog(orgId, requestData.Year, int64(i), cv.Id, fmt.Sprintf("%v月份实际分值", i)) + sendList = append(sendList, sendListIng...) + statisCont.ExecutiveDepartment = append(statisCont.ExecutiveDepartment, orgNameList...) + if i == 3 { + for _, v := range sendListIng { + fengDingZhi = v.Capping + if v.MtOrAt == 2 { + dingLiangScore = v.Score + isTrue = false } } } - case 9: - for i := 7; i <= 9; i++ { - sendListIng, orgNameList := GetDingLiangLog(orgId, requestData.Year, int64(i), cv.Id, fmt.Sprintf("%v月份实际分值", i)) - sendList = append(sendList, sendListIng...) - statisCont.ExecutiveDepartment = append(statisCont.ExecutiveDepartment, orgNameList...) - if i == 9 { - for _, v := range sendListIng { - fengDingZhi = v.Capping - if v.MtOrAt == 2 { - dingLiangScore = v.Score - isTrue = false - } + } + case 6: + for i := 4; i <= 6; i++ { + sendListIng, orgNameList := GetDingLiangLog(orgId, requestData.Year, int64(i), cv.Id, fmt.Sprintf("%v月份实际分值", i)) + sendList = append(sendList, sendListIng...) + statisCont.ExecutiveDepartment = append(statisCont.ExecutiveDepartment, orgNameList...) + if i == 6 { + for _, v := range sendListIng { + fengDingZhi = v.Capping + if v.MtOrAt == 2 { + dingLiangScore = v.Score + isTrue = false } } } - case 12: - for i := 10; i <= 12; i++ { - sendListIng, orgNameList := GetDingLiangLog(orgId, requestData.Year, int64(i), cv.Id, fmt.Sprintf("%v月份实际分值", i)) - sendList = append(sendList, sendListIng...) - statisCont.ExecutiveDepartment = append(statisCont.ExecutiveDepartment, orgNameList...) - if i == 12 { - for _, v := range sendListIng { - fengDingZhi = v.Capping - if v.MtOrAt == 2 { - dingLiangScore = v.Score - isTrue = false - } + } + case 9: + for i := 7; i <= 9; i++ { + sendListIng, orgNameList := GetDingLiangLog(orgId, requestData.Year, int64(i), cv.Id, fmt.Sprintf("%v月份实际分值", i)) + sendList = append(sendList, sendListIng...) + statisCont.ExecutiveDepartment = append(statisCont.ExecutiveDepartment, orgNameList...) + if i == 9 { + for _, v := range sendListIng { + fengDingZhi = v.Capping + if v.MtOrAt == 2 { + dingLiangScore = v.Score + isTrue = false } } } - default: - isTrue = true } - if isTrue { - targetScore, attribute, _ := GetTargetPlanScore("", cv.Id, orgId, requestData.Year, monthInt) - if attribute == 3 { - statisCont.Score = targetScore - } else { - var daChengLv float64 = 0 - var pingJunXiShu float64 = 0 - for _, j := range sendList { - daChengLv = daChengLv + j.CompletionRateAll - pingJunXiShu++ - } - if pingJunXiShu > 0 { - pingJunZhi := daChengLv / pingJunXiShu - statisCont.Score = publicmethod.DecimalEs(GetQuantifyScore(targetScore, pingJunZhi, fengDingZhi), 2) - } else { - statisCont.Score = targetScore + case 12: + for i := 10; i <= 12; i++ { + sendListIng, orgNameList := GetDingLiangLog(orgId, requestData.Year, int64(i), cv.Id, fmt.Sprintf("%v月份实际分值", i)) + sendList = append(sendList, sendListIng...) + statisCont.ExecutiveDepartment = append(statisCont.ExecutiveDepartment, orgNameList...) + if i == 12 { + for _, v := range sendListIng { + fengDingZhi = v.Capping + if v.MtOrAt == 2 { + dingLiangScore = v.Score + isTrue = false + } } } - } else { - statisCont.Score = dingLiangScore } - default: - sendList, statisCont.ExecutiveDepartment = GetDingLiangLog(orgId, requestData.Year, monthInt, cv.Id, "") - chushu := len(sendList) - if chushu > 0 { - isTrue := true - for _, v := range sendList { - dingLiangScore = dingLiangScore + v.Score - if v.MtOrAt == 2 { - dingLiangScore = v.Score - isTrue = false - } + isTrue = true + } + if isTrue { + targetScore, attribute, _ := GetTargetPlanScore("", cv.Id, orgId, requestData.Year, monthInt) + if attribute == 3 { + statisCont.Score = targetScore + } else { + var daChengLv float64 = 0 + var pingJunXiShu float64 = 0 + for _, j := range sendList { + daChengLv = daChengLv + j.CompletionRateAll + pingJunXiShu++ } - if isTrue { - dingLiangScore, _ = publicmethod.DecimalNew(dingLiangScore/float64(chushu), 2) - statisCont.Score = dingLiangScore + if pingJunXiShu > 0 { + pingJunZhi := daChengLv / pingJunXiShu + statisCont.Score = publicmethod.DecimalEs(GetQuantifyScore(targetScore, pingJunZhi, fengDingZhi), 2) } else { - statisCont.Score = dingLiangScore + statisCont.Score = targetScore } + } + } else { + statisCont.Score = dingLiangScore + } + default: + sendList, statisCont.ExecutiveDepartment = GetDingLiangLog(orgId, requestData.Year, monthInt, cv.Id, "") + chushu := len(sendList) + if chushu > 0 { + isTrue := true + for _, v := range sendList { + dingLiangScore = dingLiangScore + v.Score + if v.MtOrAt == 2 { + dingLiangScore = v.Score + isTrue = false + } + } + if isTrue { + dingLiangScore, _ = publicmethod.DecimalNew(dingLiangScore/float64(chushu), 2) + statisCont.Score = dingLiangScore } else { - targetScore, _, _ := GetTargetPlanScore("", cv.Id, orgId, requestData.Year, monthInt) - statisCont.Score = targetScore + statisCont.Score = dingLiangScore } + } else { + targetScore, _, _ := GetTargetPlanScore("", cv.Id, orgId, requestData.Year, monthInt) + statisCont.Score = targetScore } + } } } - statisCont.Type = evalTargetCont.Type //1:定性;2:定量 - statisCont.Unit = cv.Unit //单位 - statisCont.Cycle = cv.Cycles //周期 - statisCont.Cycleattr = cv.CycleAttres //辅助参数 - lookStatistics = append(lookStatistics, statisCont) } + statisCont.Type = evalTargetCont.Type //1:定性;2:定量 + statisCont.Unit = cv.Unit //单位 + statisCont.Cycle = cv.Cycles //周期 + statisCont.Cycleattr = cv.CycleAttres //辅助参数 + lookStatistics = append(lookStatistics, statisCont) + // } } } diff --git a/config/configDatabase/database.yaml b/config/configDatabase/database.yaml index 77b817f..1575d8d 100644 --- a/config/configDatabase/database.yaml +++ b/config/configDatabase/database.yaml @@ -28,17 +28,17 @@ wechat: gorm_log: false #是否开启gorm日志 #HR数据库 hrdatabase: - # url_path: '127.0.0.1' #数据库地址 - # port: 3306 #数据库端口 - # name: 'hr_new' #数据库名称 - # username: 'root' #数据库用户民 - # password: 'root' #数据库密码 - - url_path: '172.20.5.33' #数据库地址 - port: 4000 #数据库端口 + url_path: '127.0.0.1' #数据库地址 + port: 3306 #数据库端口 name: 'hr_new' #数据库名称 username: 'root' #数据库用户民 - password: '9z_Bu28r1*DZ3K6@+a' #数据库密码 + password: 'root' #数据库密码 + + # url_path: '172.20.5.33' #数据库地址 + # port: 4000 #数据库端口 + # name: 'hr_new' #数据库名称 + # username: 'root' #数据库用户民 + # password: '9z_Bu28r1*DZ3K6@+a' #数据库密码 charset: 'utf8mb4' #数据库编码方式 parseTime: 'True' #是否自动转换时间 @@ -158,18 +158,18 @@ healthReportDate: #绩效考核数据库 kpiDate: - url_path: '127.0.0.1' #数据库地址 - port: 3306 #数据库端口 - # url_path: '172.20.5.33' #数据库地址 - # port: 4000 #数据库端口 + # url_path: '127.0.0.1' #数据库地址 + # port: 3306 #数据库端口 + url_path: '172.20.5.33' #数据库地址 + port: 4000 #数据库端口 charset: 'utf8mb4' #数据库编码方式 parseTime: 'True' #是否自动转换时间 loc: 'Local' #时区 name: 'perform' #数据库名称 # name: 'performing' #数据库名称 username: 'root' #数据库用户民 - password: 'root' #数据库密码 - # password: '9z_Bu28r1*DZ3K6@+a' #数据库密码 + # password: 'root' #数据库密码 + password: '9z_Bu28r1*DZ3K6@+a' #数据库密码 max_idle_conns: 100 #最大空闲数量 max_open_conns: 1500 #最大打开数量 gorm_log: true #是否开启gorm日志 diff --git a/overall/publicmethod/technique.go b/overall/publicmethod/technique.go index 16bd352..74f9188 100644 --- a/overall/publicmethod/technique.go +++ b/overall/publicmethod/technique.go @@ -1935,6 +1935,94 @@ func (d *DateTimeTotimes) BaisStrToTime(dateTime string) { maxVal 最大值 minVal 最小值 */ +func NewJudjeMaxOfMinVal(maxVal, minVal float64) (maxVals, minVals float64) { + fmt.Printf("统一图标计算最大值最小值方法---->maxVal%v\nminVal:%v\n", maxVal, minVal) + if maxVal == 0 && minVal == 0 { + maxVals = 1 + return + } + fmt.Printf("统一图标计算最大值最小值方法--1-->maxVal%v\nminVal:%v\n", maxVal, minVal) + if maxVal > 0 && minVal > 0 { + if maxVal < minVal { + guoDu := maxVal + maxVal = minVal + minVal = guoDu + } + + if maxVal < 1 { + maxVals = maxVal + 0.1 + minVals = minVal - 0.1 + } else if maxVal < 10 { + maxVals = math.Ceil(maxVal) + 1 + minVals = math.Ceil(minVal) - 1 + } else { + jianGe := math.Ceil((maxVal - minVal) / 5) + if jianGe <= 0 { + jianGe = 1 + } + maxVals = math.Ceil(maxVal) + jianGe + minVals = math.Ceil(minVal) - jianGe + } + if minVals < 0 { + minVals = 0 + } + } else if maxVal > 0 && minVal < 0 { + fmt.Printf("统一图标计算最大值最小值方法--2-->maxVal%v\nminVal:%v\n", maxVal, minVal) + if maxVal < 1 { + maxVals = maxVal + 0.1 + } else if maxVal < 10 { + maxVals = math.Ceil(maxVal) + 1 + } else { + jianGe := math.Ceil((maxVal) / 5) + if jianGe <= 0 { + jianGe = 1 + } + maxVals = math.Ceil(maxVal) + jianGe + } + jianGe := math.Ceil(minVal / 5) + if jianGe == 0 { + if minVal < -1 { + jianGe = -0.1 + } else { + jianGe = -1 + } + } + minVals = math.Ceil(minVal) + jianGe + + fmt.Printf("统一图标计算最大值最小值方法--3-->maxVal%v\nminVal:%v\n", maxVals, minVals) + } else { + if maxVal < minVal { + guoDu := maxVal + maxVal = minVal + minVal = guoDu + } + fmt.Printf("统一图标计算最大值最小值方法--3-->maxVal%v\nminVal:%v\n", maxVal, minVal) + if minVal > -1 { + maxVals = 0 + minVals = minVal - 0.1 + fmt.Printf("统一图标计算最大值最小值方法--4-->maxVal%v\nminVal:%v\n", maxVal, minVal) + } else if minVal > -10 { + maxVals = 0 + minVals = math.Ceil(minVal) - 1 + fmt.Printf("统一图标计算最大值最小值方法--5-->maxVal%v\nminVal:%v\n", maxVal, minVal) + } else { + jianGe := math.Ceil((maxVal - minVal) / 5) + if jianGe == 0 { + jianGe = 1 + } + minVals = math.Ceil(minVal) - jianGe + if minVal > -10 { + maxVals = 0 + } else { + maxVals = math.Ceil(minVal) + jianGe + } + fmt.Printf("统一图标计算最大值最小值方法--6-->maxVal%v\nminVal:%v\n", maxVal, minVal) + } + } + maxVals = DecimalEs(maxVals, 2) + minVals = DecimalEs(minVals, 2) + return +} func JudjeMaxOfMinVal(maxVal, minVal float64) (maxVals, minVals float64) { if maxVal > 0 { if minVal > 0 { @@ -2291,6 +2379,7 @@ func GetPlanVresion(orgId, years, months int64) (planVersionInfo modelskpi.PlanV } } } + fmt.Printf("maxKey:%v\n", maxKey) if maxKey.Key != "" { err = overall.CONSTANT_DB_KPI.Where("`key` = ?", maxKey.Key).Find(&planVersionInfo).Error if err != nil {