|
@@ -64,6 +64,9 @@ public class CoreEvaluateTaskServiceImpl extends ServiceImpl<CoreEvaluateTaskMap
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public TableDataInfo<CoreEvaluateTaskVO> selectPage(EvaluateTaskDTO evaluateTaskDTO) {
|
|
public TableDataInfo<CoreEvaluateTaskVO> selectPage(EvaluateTaskDTO evaluateTaskDTO) {
|
|
|
|
|
+ EvaluateTaskStatisticsDTO evaluateTaskStatisticsDTO=new EvaluateTaskStatisticsDTO();
|
|
|
|
|
+ BeanUtils.copyProperties(evaluateTaskDTO,evaluateTaskStatisticsDTO);
|
|
|
|
|
+ statistics(evaluateTaskStatisticsDTO);
|
|
|
Page<CoreEvaluateTaskVO> page;
|
|
Page<CoreEvaluateTaskVO> page;
|
|
|
//分页
|
|
//分页
|
|
|
if (evaluateTaskDTO.getPageNum() != null && evaluateTaskDTO.getPageSize() != null) {
|
|
if (evaluateTaskDTO.getPageNum() != null && evaluateTaskDTO.getPageSize() != null) {
|
|
@@ -117,12 +120,12 @@ public class CoreEvaluateTaskServiceImpl extends ServiceImpl<CoreEvaluateTaskMap
|
|
|
Page<Map> statistics = baseMapper.statistics(page, evaluateTaskStatisticsDTO);
|
|
Page<Map> statistics = baseMapper.statistics(page, evaluateTaskStatisticsDTO);
|
|
|
List<Map> rows = statistics.getRecords();
|
|
List<Map> rows = statistics.getRecords();
|
|
|
for (int i = 0; i < rows.size(); i++) {
|
|
for (int i = 0; i < rows.size(); i++) {
|
|
|
- Object taskId = rows.get(i).get("taskId");
|
|
|
|
|
- List<Map> contentByTaskId = baseMapper.getContentByTaskId((Long) taskId);
|
|
|
|
|
|
|
+ Object id = rows.get(i).get("id");
|
|
|
|
|
+ List<Map> contentByTaskId = baseMapper.getContentByTaskId((Long) id);
|
|
|
if (CollectionUtils.isNotEmpty(contentByTaskId)) {
|
|
if (CollectionUtils.isNotEmpty(contentByTaskId)) {
|
|
|
int total = 0;
|
|
int total = 0;
|
|
|
for (int l = 0; l < contentByTaskId.size(); l++) {
|
|
for (int l = 0; l < contentByTaskId.size(); l++) {
|
|
|
- Integer score = Integer.valueOf(contentByTaskId.get(l).get("score").toString());
|
|
|
|
|
|
|
+ Double score =Double.valueOf(contentByTaskId.get(l).get("score").toString());
|
|
|
rows.get(i).put(contentByTaskId.get(l).get("content"), score);
|
|
rows.get(i).put(contentByTaskId.get(l).get("content"), score);
|
|
|
total += score;
|
|
total += score;
|
|
|
}
|
|
}
|