|
|
@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
|
|
|
import java.math.RoundingMode;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
@ -247,7 +248,13 @@ public class TrainingServiceImpl implements TrainingService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
StuSynthesisPlanScoreAndAvgScoreDto dto = new StuSynthesisPlanScoreAndAvgScoreDto();
|
|
|
|
StuSynthesisPlanScoreAndAvgScoreDto dto = new StuSynthesisPlanScoreAndAvgScoreDto();
|
|
|
|
dto.setList(returnList);
|
|
|
|
dto.setList(returnList);
|
|
|
|
dto.setAvgScore(fenzi.divide(fenmu).setScale(4, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)).setScale(2, BigDecimal.ROUND_HALF_UP));
|
|
|
|
if (fenzi.compareTo(BigDecimal.ZERO)<=0){
|
|
|
|
|
|
|
|
System.out.println();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//todo 报错舍去模式有问题,修改了四舍五入模式
|
|
|
|
|
|
|
|
dto.setAvgScore(fenzi.divide(fenmu,4, RoundingMode.HALF_UP)
|
|
|
|
|
|
|
|
.multiply(BigDecimal.valueOf(100))
|
|
|
|
|
|
|
|
.setScale(2, RoundingMode.HALF_UP));
|
|
|
|
return dto;
|
|
|
|
return dto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|