|
@ -29,6 +29,7 @@ import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
|
import java.text.DecimalFormat;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
@ -813,7 +814,8 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
|
|
if (answerDOs != null && answerDOs.size() > 0) {
|
|
if (answerDOs != null && answerDOs.size() > 0) {
|
|
answerCount = answerDOs.size();
|
|
answerCount = answerDOs.size();
|
|
}
|
|
}
|
|
vo.setPercentage(PercentageUtil.bs(answerCount, total) + "%");
|
|
|
|
|
|
DecimalFormat df = new DecimalFormat("0.00");
|
|
|
|
vo.setPercentage(df.format(PercentageUtil.bs(answerCount, total))+ "%");
|
|
vo.setOptCount(answerCount);
|
|
vo.setOptCount(answerCount);
|
|
vo.setId(vo.getCode());
|
|
vo.setId(vo.getCode());
|
|
}
|
|
}
|