From f4b16acc37b72b5137358345437bafde0c187502 Mon Sep 17 00:00:00 2001 From: Elvis Date: Wed, 6 Nov 2019 11:22:03 +0800 Subject: [PATCH] 修改学号排序问题 --- src/com/fh/controller/sunvote/report/ReportController.java | 9 ++++++--- src/com/fh/controller/sunvote/student/StudentController.java | 9 ++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/com/fh/controller/sunvote/report/ReportController.java b/src/com/fh/controller/sunvote/report/ReportController.java index c8bb0bf..a07911f 100644 --- a/src/com/fh/controller/sunvote/report/ReportController.java +++ b/src/com/fh/controller/sunvote/report/ReportController.java @@ -480,9 +480,12 @@ public class ReportController extends BaseController { String n1 = o1.getString("NUMBER"); String n2 = o2.getString("NUMBER"); if(n1 != null && n2 != null){ - Double d= Double.parseDouble(n1) - Double.parseDouble(n2); - - return Integer.valueOf(d.intValue()); + try{ + Double d= Double.parseDouble(n1) - Double.parseDouble(n2); + return Integer.valueOf(d.intValue()); + }catch(Exception ex){ + return 0; + } } } return o2score - o1score > 0 ? 1 : -1; diff --git a/src/com/fh/controller/sunvote/student/StudentController.java b/src/com/fh/controller/sunvote/student/StudentController.java index 221f189..51a9347 100644 --- a/src/com/fh/controller/sunvote/student/StudentController.java +++ b/src/com/fh/controller/sunvote/student/StudentController.java @@ -23,18 +23,17 @@ import org.springframework.web.servlet.ModelAndView; import com.fh.controller.base.BaseController; import com.fh.entity.Page; +import com.fh.service.sunvote.classroster.ClassRosterManager; +import com.fh.service.sunvote.student.StudentManager; +import com.fh.service.sunvote.term.TermManager; import com.fh.util.AppUtil; import com.fh.util.Const; import com.fh.util.FileUpload; +import com.fh.util.Jurisdiction; import com.fh.util.ObjectExcelRead; import com.fh.util.ObjectExcelView; import com.fh.util.PageData; -import com.fh.util.Jurisdiction; import com.fh.util.PathUtil; -import com.fh.util.Tools; -import com.fh.service.sunvote.classroster.ClassRosterManager; -import com.fh.service.sunvote.student.StudentManager; -import com.fh.service.sunvote.term.TermManager; /** * 说明:学生管理 -- libgit2 0.21.4