浏览代码

up:学员导出接口报错处理

yangdamao 3 年之前
父节点
当前提交
20f3615676

+ 2 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/ClassStudentExportVo.java

@@ -133,13 +133,13 @@ public class ClassStudentExportVo implements Serializable {
 		vo.setUserStatusStr(ObjectUtil.isNotNull(studentVo.getUserStatus()) && studentVo.getUserStatus() == 1?"变更":"未变更");
 		vo.setUserBindWxStr(ObjectUtil.isNotNull(studentVo.getUserBindWx()) && studentVo.getUserBindWx() == 1?"是":"否");
 		vo.setUserFollowWxStr(ObjectUtil.isNotNull(studentVo.getUserFollowWx()) && studentVo.getUserFollowWx() == 1?"是":"否");
-		if (ObjectUtil.isNotNull(studentVo.getStuAllNum()) && ObjectUtil.isNotNull(studentVo.getSecAllNum())){
+		if (ObjectUtil.isNotNull(studentVo.getStuAllNum()) && ObjectUtil.isNotNull(studentVo.getSecAllNum()) && studentVo.getSecAllNum() != 0){
 			BigDecimal bigDecimal = new BigDecimal(studentVo.getStuAllNum());
 			BigDecimal bigDecimal1 = new BigDecimal(studentVo.getSecAllNum());
 			BigDecimal multiply = bigDecimal.divide(bigDecimal1, 0, BigDecimal.ROUND_CEILING).multiply(new BigDecimal("100.00"));
 			vo.setStuAllNumStr(studentVo.getStuAllNum()+"/"+studentVo.getSecAllNum()+" "+multiply+"%");
 		}
-		if (ObjectUtil.isNotNull(studentVo.getRecordNum()) && ObjectUtil.isNotNull(studentVo.getExamNum())){
+		if (ObjectUtil.isNotNull(studentVo.getRecordNum()) && ObjectUtil.isNotNull(studentVo.getExamNum()) && studentVo.getExamNum() != 0){
 			BigDecimal bigDecimal = new BigDecimal(studentVo.getRecordNum());
 			BigDecimal bigDecimal1 = new BigDecimal(studentVo.getExamNum());
 			BigDecimal multiply = bigDecimal.divide(bigDecimal1, 0, BigDecimal.ROUND_CEILING).multiply(new BigDecimal("100.00"));