|
@@ -205,9 +205,9 @@ public class ReportController {
|
|
|
int total = (int) totalScore;
|
|
|
for (int i = total; i >= 0; i--) {
|
|
|
if (i % range == 0) {
|
|
|
- if(i==0){
|
|
|
+ if (i == 0) {
|
|
|
rangeCount = jsonObject.getInt(String.valueOf(i));
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
rangeCount = getSumCount(jsonObject, i, i - range + 1);
|
|
|
}
|
|
|
sumCount = sumCount + rangeCount;
|
|
@@ -421,7 +421,9 @@ public class ReportController {
|
|
|
|
|
|
private String getOptionJson(ReportSubjectQuery query, ReportSubject reportSubject) {
|
|
|
JSONObject value = new JSONObject();
|
|
|
- value.accumulate("options", reportSubject.getOptions().split(ANSWER_SPLIT));
|
|
|
+ if (reportSubject.getOptions() != null) {
|
|
|
+ value.accumulate("options", reportSubject.getOptions().split(ANSWER_SPLIT));
|
|
|
+ }
|
|
|
JSONArray array = new JSONArray();
|
|
|
query.setObjective(true);
|
|
|
List<ReportSubjectQuestion> list = questionService.findByQuery(query);
|