|
@ -1083,7 +1083,7 @@ func (c *CSurveysheetResult) Statistic(selectType string,year string,unit string |
|
|
|
|
|
|
|
|
if selectType == "ratio" { |
|
|
if selectType == "ratio" { |
|
|
// 处理整体满意度的表格
|
|
|
// 处理整体满意度的表格
|
|
|
result.Total.SatisfactionPercent = result.Total.APercent + result.Total.BPercent |
|
|
|
|
|
|
|
|
result.Total.SatisfactionPercent = utils.Decimal(float64(result.Total.ASum+result.Total.BSum)/float64(result.Total.Count), 3) |
|
|
// 处理饼图数据
|
|
|
// 处理饼图数据
|
|
|
result.PicTotal.Row = []string{"非常满意", "满意", "一般", "不满意", "非常不满意"} |
|
|
result.PicTotal.Row = []string{"非常满意", "满意", "一般", "不满意", "非常不满意"} |
|
|
result.PicTotal.ValueLi = []float64{totalData.APercent, totalData.BPercent, totalData.CPercent, totalData.DPercent, totalData.EPercent} |
|
|
result.PicTotal.ValueLi = []float64{totalData.APercent, totalData.BPercent, totalData.CPercent, totalData.DPercent, totalData.EPercent} |
|
@ -1121,7 +1121,7 @@ func (c *CSurveysheetResult) Statistic(selectType string,year string,unit string |
|
|
if subjectData.Count == 0 { |
|
|
if subjectData.Count == 0 { |
|
|
subjectData.SatisfactionPercent = 0 |
|
|
subjectData.SatisfactionPercent = 0 |
|
|
} else { |
|
|
} else { |
|
|
subjectData.SatisfactionPercent = subjectData.APercent + subjectData.BPercent |
|
|
|
|
|
|
|
|
subjectData.SatisfactionPercent = utils.Decimal(subjectData.APercent + subjectData.BPercent, 3) |
|
|
} |
|
|
} |
|
|
data.SubjectStaticDataLi[innerIndex] = subjectData |
|
|
data.SubjectStaticDataLi[innerIndex] = subjectData |
|
|
} |
|
|
} |
|
|