Compare commits
2 Commits
f994fc391e
...
374a508737
| Author | SHA1 | Date | |
|---|---|---|---|
| 374a508737 | |||
| 80279a0586 |
@@ -574,11 +574,20 @@ public class CphGoodApplyServiceImpl extends ServiceImpl<CphGoodApplyMapper, Cph
|
|||||||
// 各科平均成绩75分以上含70分
|
// 各科平均成绩75分以上含70分
|
||||||
List<CphStuScoreMiddleDto> cphStuScoreMiddleDtos = new LambdaQueryChainWrapper<>(cphStuScoreMiddleDtoMapper)
|
List<CphStuScoreMiddleDto> cphStuScoreMiddleDtos = new LambdaQueryChainWrapper<>(cphStuScoreMiddleDtoMapper)
|
||||||
.eq(CphStuScoreMiddleDto::getStuNo, stuNo)
|
.eq(CphStuScoreMiddleDto::getStuNo, stuNo)
|
||||||
|
.eq(CphStuScoreMiddleDto::getXndm, year.xndm)
|
||||||
.list();
|
.list();
|
||||||
BigDecimal Grade = new BigDecimal(0);
|
BigDecimal Grade = new BigDecimal(0);
|
||||||
for (CphStuScoreMiddleDto cphStuScoreMiddleDto : cphStuScoreMiddleDtos) {
|
for (CphStuScoreMiddleDto cphStuScoreMiddleDto : cphStuScoreMiddleDtos) {
|
||||||
BigDecimal bigDecimal = new BigDecimal(cphStuScoreMiddleDto.getCj());
|
if(cphStuScoreMiddleDto.getCj().equals("不及格")){
|
||||||
Grade = Grade.add(bigDecimal);
|
throw new RuntimeException("有不及格成绩,无法申请");
|
||||||
|
}
|
||||||
|
if(cphStuScoreMiddleDto.getCj().equals("及格")){
|
||||||
|
BigDecimal bigDecimal = new BigDecimal("60.00");
|
||||||
|
Grade = Grade.add(bigDecimal);
|
||||||
|
}else{
|
||||||
|
BigDecimal bigDecimal = new BigDecimal(cphStuScoreMiddleDto.getCj());
|
||||||
|
Grade = Grade.add(bigDecimal);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (Grade.divide(new BigDecimal(cphStuScoreMiddleDtos.size()), 2, RoundingMode.HALF_UP)
|
if (Grade.divide(new BigDecimal(cphStuScoreMiddleDtos.size()), 2, RoundingMode.HALF_UP)
|
||||||
.compareTo(new BigDecimal(70)) < 0) {
|
.compareTo(new BigDecimal(70)) < 0) {
|
||||||
@@ -678,8 +687,16 @@ public class CphGoodApplyServiceImpl extends ServiceImpl<CphGoodApplyMapper, Cph
|
|||||||
|| Objects.equals(cphStuScoreMiddleDto.getCj(), "NULL")) {
|
|| Objects.equals(cphStuScoreMiddleDto.getCj(), "NULL")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
BigDecimal bigDecimal = new BigDecimal(cphStuScoreMiddleDto.getCj());
|
if(cphStuScoreMiddleDto.getCj().equals("不及格")){
|
||||||
Grade = Grade.add(bigDecimal);
|
throw new RuntimeException("有不及格成绩,无法申请");
|
||||||
|
}
|
||||||
|
if(cphStuScoreMiddleDto.getCj().equals("及格")){
|
||||||
|
BigDecimal bigDecimal = new BigDecimal("60.00");
|
||||||
|
Grade = Grade.add(bigDecimal);
|
||||||
|
}else{
|
||||||
|
BigDecimal bigDecimal = new BigDecimal(cphStuScoreMiddleDto.getCj());
|
||||||
|
Grade = Grade.add(bigDecimal);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (Grade.divide(new BigDecimal(cphStuScoreMiddleDtos.size()), 2, RoundingMode.HALF_UP)
|
if (Grade.divide(new BigDecimal(cphStuScoreMiddleDtos.size()), 2, RoundingMode.HALF_UP)
|
||||||
.compareTo(new BigDecimal(75)) < 0) {
|
.compareTo(new BigDecimal(75)) < 0) {
|
||||||
@@ -784,6 +801,7 @@ public class CphGoodApplyServiceImpl extends ServiceImpl<CphGoodApplyMapper, Cph
|
|||||||
// 各科平均成绩75分以上含75分
|
// 各科平均成绩75分以上含75分
|
||||||
LambdaQueryWrapper<CphStuScoreMiddleDto> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<CphStuScoreMiddleDto> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(CphStuScoreMiddleDto::getStuNo, stuNo);
|
queryWrapper.eq(CphStuScoreMiddleDto::getStuNo, stuNo);
|
||||||
|
queryWrapper.eq(CphStuScoreMiddleDto::getXndm, year.getXndm());
|
||||||
List<CphStuScoreMiddleDto> cphStuScoreMiddleDtos = cphStuScoreMiddleDtoMapper
|
List<CphStuScoreMiddleDto> cphStuScoreMiddleDtos = cphStuScoreMiddleDtoMapper
|
||||||
.selectList(queryWrapper);
|
.selectList(queryWrapper);
|
||||||
BigDecimal Grade = new BigDecimal(0);
|
BigDecimal Grade = new BigDecimal(0);
|
||||||
@@ -794,8 +812,16 @@ public class CphGoodApplyServiceImpl extends ServiceImpl<CphGoodApplyMapper, Cph
|
|||||||
|| Objects.equals(cphStuScoreMiddleDto.getCj(), "NULL")) {
|
|| Objects.equals(cphStuScoreMiddleDto.getCj(), "NULL")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
BigDecimal bigDecimal = new BigDecimal(cphStuScoreMiddleDto.getCj());
|
if(cphStuScoreMiddleDto.getCj().equals("不及格")){
|
||||||
Grade = Grade.add(bigDecimal);
|
throw new RuntimeException("有不及格成绩,无法申请");
|
||||||
|
}
|
||||||
|
if(cphStuScoreMiddleDto.getCj().equals("及格")){
|
||||||
|
BigDecimal bigDecimal = new BigDecimal("60.00");
|
||||||
|
Grade = Grade.add(bigDecimal);
|
||||||
|
}else{
|
||||||
|
BigDecimal bigDecimal = new BigDecimal(cphStuScoreMiddleDto.getCj());
|
||||||
|
Grade = Grade.add(bigDecimal);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (Grade.divide(new BigDecimal(cphStuScoreMiddleDtos.size()), 2, RoundingMode.HALF_UP)
|
if (Grade.divide(new BigDecimal(cphStuScoreMiddleDtos.size()), 2, RoundingMode.HALF_UP)
|
||||||
.compareTo(new BigDecimal(75)) < 0) {
|
.compareTo(new BigDecimal(75)) < 0) {
|
||||||
@@ -993,8 +1019,16 @@ public class CphGoodApplyServiceImpl extends ServiceImpl<CphGoodApplyMapper, Cph
|
|||||||
.list();
|
.list();
|
||||||
BigDecimal Grade = new BigDecimal(0);
|
BigDecimal Grade = new BigDecimal(0);
|
||||||
for (CphStuScoreMiddleDto cphStuScoreMiddleDto : cphStuScoreMiddleDtos) {
|
for (CphStuScoreMiddleDto cphStuScoreMiddleDto : cphStuScoreMiddleDtos) {
|
||||||
BigDecimal bigDecimal = new BigDecimal(cphStuScoreMiddleDto.getCj());
|
if(cphStuScoreMiddleDto.getCj().equals("不及格")){
|
||||||
Grade = Grade.add(bigDecimal);
|
throw new RuntimeException("有不及格成绩,无法申请");
|
||||||
|
}
|
||||||
|
if(cphStuScoreMiddleDto.getCj().equals("及格")){
|
||||||
|
BigDecimal bigDecimal = new BigDecimal("60.00");
|
||||||
|
Grade = Grade.add(bigDecimal);
|
||||||
|
}else{
|
||||||
|
BigDecimal bigDecimal = new BigDecimal(cphStuScoreMiddleDto.getCj());
|
||||||
|
Grade = Grade.add(bigDecimal);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (Grade.divide(new BigDecimal(cphStuScoreMiddleDtos.size()), 2, RoundingMode.HALF_UP)
|
if (Grade.divide(new BigDecimal(cphStuScoreMiddleDtos.size()), 2, RoundingMode.HALF_UP)
|
||||||
.compareTo(new BigDecimal(70)) < 0) {
|
.compareTo(new BigDecimal(70)) < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user