|
@@ -6,8 +6,6 @@ import java.util.List;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
-import net.sf.json.JSONObject;
|
|
|
|
-
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -31,12 +29,14 @@ import cn.com.qmth.stmms.biz.exam.model.Exam;
|
|
import cn.com.qmth.stmms.biz.exam.model.ExamPackage;
|
|
import cn.com.qmth.stmms.biz.exam.model.ExamPackage;
|
|
import cn.com.qmth.stmms.biz.exam.model.ExamQuestion;
|
|
import cn.com.qmth.stmms.biz.exam.model.ExamQuestion;
|
|
import cn.com.qmth.stmms.biz.exam.model.ExamStudent;
|
|
import cn.com.qmth.stmms.biz.exam.model.ExamStudent;
|
|
|
|
+import cn.com.qmth.stmms.biz.exam.model.ExamStudentPaper;
|
|
import cn.com.qmth.stmms.biz.exam.model.ExamSubject;
|
|
import cn.com.qmth.stmms.biz.exam.model.ExamSubject;
|
|
import cn.com.qmth.stmms.biz.exam.model.Marker;
|
|
import cn.com.qmth.stmms.biz.exam.model.Marker;
|
|
import cn.com.qmth.stmms.biz.exam.query.ExamStudentSearchQuery;
|
|
import cn.com.qmth.stmms.biz.exam.query.ExamStudentSearchQuery;
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamPackageService;
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamPackageService;
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamQuestionService;
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamQuestionService;
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamService;
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamService;
|
|
|
|
+import cn.com.qmth.stmms.biz.exam.service.ExamStudentPaperService;
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamStudentService;
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamStudentService;
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamSubjectService;
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamSubjectService;
|
|
import cn.com.qmth.stmms.biz.exam.service.MarkerService;
|
|
import cn.com.qmth.stmms.biz.exam.service.MarkerService;
|
|
@@ -51,6 +51,7 @@ import cn.com.qmth.stmms.common.utils.ExportExcel;
|
|
import cn.com.qmth.stmms.common.utils.ExportExcel2;
|
|
import cn.com.qmth.stmms.common.utils.ExportExcel2;
|
|
import cn.com.qmth.stmms.common.utils.PictureUrlBuilder;
|
|
import cn.com.qmth.stmms.common.utils.PictureUrlBuilder;
|
|
import cn.com.qmth.stmms.common.utils.RequestUtils;
|
|
import cn.com.qmth.stmms.common.utils.RequestUtils;
|
|
|
|
+import net.sf.json.JSONObject;
|
|
|
|
|
|
@Controller
|
|
@Controller
|
|
@RequestMapping("/admin/exam/score")
|
|
@RequestMapping("/admin/exam/score")
|
|
@@ -62,6 +63,9 @@ public class ScoreController extends BaseParameterController {
|
|
@Autowired
|
|
@Autowired
|
|
private CampusService campusService;
|
|
private CampusService campusService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private ExamStudentPaperService studentPaperService;
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private ExamSubjectService subjectService;
|
|
private ExamSubjectService subjectService;
|
|
|
|
|
|
@@ -73,10 +77,10 @@ public class ScoreController extends BaseParameterController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private ExamPackageService packageService;
|
|
private ExamPackageService packageService;
|
|
-
|
|
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private MarkLibraryService markLibraryService;
|
|
private MarkLibraryService markLibraryService;
|
|
-
|
|
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private ScoreRateService scoreRateService;
|
|
private ScoreRateService scoreRateService;
|
|
|
|
|
|
@@ -94,7 +98,7 @@ public class ScoreController extends BaseParameterController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private AsyncTaskExecutor taskExecutor;
|
|
private AsyncTaskExecutor taskExecutor;
|
|
-
|
|
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private MarkerService markerService;
|
|
private MarkerService markerService;
|
|
|
|
|
|
@@ -106,12 +110,12 @@ public class ScoreController extends BaseParameterController {
|
|
if (examId > 0) {
|
|
if (examId > 0) {
|
|
Exam exam = examService.findById(examId);
|
|
Exam exam = examService.findById(examId);
|
|
ModelAndView view = new ModelAndView("modules/exam/scoreList");
|
|
ModelAndView view = new ModelAndView("modules/exam/scoreList");
|
|
- if(subjectCode!=null){
|
|
|
|
- query.setSubjectCode(subjectCode);
|
|
|
|
|
|
+ if (subjectCode != null) {
|
|
|
|
+ query.setSubjectCode(subjectCode);
|
|
}
|
|
}
|
|
query.setExamId(examId);
|
|
query.setExamId(examId);
|
|
-// query.setUpload(true);
|
|
|
|
-// query.setAbsent(false);
|
|
|
|
|
|
+ // query.setUpload(true);
|
|
|
|
+ // query.setAbsent(false);
|
|
query.orderByExamNumber();
|
|
query.orderByExamNumber();
|
|
if (filter == 1) {
|
|
if (filter == 1) {
|
|
query.setObjectiveScore(0d);
|
|
query.setObjectiveScore(0d);
|
|
@@ -120,8 +124,8 @@ public class ScoreController extends BaseParameterController {
|
|
query.setObjectiveScoreGt(0d);
|
|
query.setObjectiveScoreGt(0d);
|
|
query.setSubjectiveScore(0d);
|
|
query.setSubjectiveScore(0d);
|
|
}
|
|
}
|
|
- String ids = getStudentIdsByMarkLoginAndMarkName(query.getMarkLogin(),query.getMarkName());
|
|
|
|
- if(StringUtils.isNotBlank(ids)){
|
|
|
|
|
|
+ String ids = getStudentIdsByMarkLoginAndMarkName(query.getMarkLogin(), query.getMarkName());
|
|
|
|
+ if (StringUtils.isNotBlank(ids)) {
|
|
query.setIds(ids);
|
|
query.setIds(ids);
|
|
}
|
|
}
|
|
query = studentService.findByQuery(query);
|
|
query = studentService.findByQuery(query);
|
|
@@ -129,15 +133,16 @@ public class ScoreController extends BaseParameterController {
|
|
buildSheetUrl(student);
|
|
buildSheetUrl(student);
|
|
buildPackageUrl(student);
|
|
buildPackageUrl(student);
|
|
buildAnswerUrl(student);
|
|
buildAnswerUrl(student);
|
|
- student.setSubjectRemark(subjectService.find(student.getExamId(), student.getSubjectCode()).getRemark());
|
|
|
|
|
|
+ student.setSubjectRemark(
|
|
|
|
+ subjectService.find(student.getExamId(), student.getSubjectCode()).getRemark());
|
|
student.setMarked(isMarked(student));
|
|
student.setMarked(isMarked(student));
|
|
Marker marker = markerService.findByStudentId(student.getId());
|
|
Marker marker = markerService.findByStudentId(student.getId());
|
|
- if(marker != null){
|
|
|
|
|
|
+ if (marker != null) {
|
|
student.setMarkLogin(marker.getLoginName());
|
|
student.setMarkLogin(marker.getLoginName());
|
|
student.setMarkName(marker.getName());
|
|
student.setMarkName(marker.getName());
|
|
}
|
|
}
|
|
MarkLibrary markLibrary = markLibraryService.findByStudentId(student.getId());
|
|
MarkLibrary markLibrary = markLibraryService.findByStudentId(student.getId());
|
|
- if(markLibrary != null){
|
|
|
|
|
|
+ if (markLibrary != null) {
|
|
student.setTagValue(markLibrary.getTags());
|
|
student.setTagValue(markLibrary.getTags());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -148,7 +153,7 @@ public class ScoreController extends BaseParameterController {
|
|
view.addObject("imageServer", imageServer);
|
|
view.addObject("imageServer", imageServer);
|
|
view.addObject("packageServer", packageServer);
|
|
view.addObject("packageServer", packageServer);
|
|
view.addObject("cardServer", cardServer);
|
|
view.addObject("cardServer", cardServer);
|
|
- view.addObject("showExportScore",showExportScore);
|
|
|
|
|
|
+ view.addObject("showExportScore", showExportScore);
|
|
return view;
|
|
return view;
|
|
} else {
|
|
} else {
|
|
return new ModelAndView("redirect:/admin/exam/list");
|
|
return new ModelAndView("redirect:/admin/exam/list");
|
|
@@ -223,7 +228,7 @@ public class ScoreController extends BaseParameterController {
|
|
examService.save(exam);
|
|
examService.save(exam);
|
|
|
|
|
|
ScoreCalculateThread thread = new ScoreCalculateThread(exam, examService, studentService,
|
|
ScoreCalculateThread thread = new ScoreCalculateThread(exam, examService, studentService,
|
|
- questionService,subjectService,scoreRateService,markLibraryService);
|
|
|
|
|
|
+ studentPaperService, questionService, subjectService, scoreRateService, markLibraryService);
|
|
taskExecutor.submit(thread);
|
|
taskExecutor.submit(thread);
|
|
}
|
|
}
|
|
return new ModelAndView("redirect:/admin/exam/score");
|
|
return new ModelAndView("redirect:/admin/exam/score");
|
|
@@ -231,7 +236,7 @@ public class ScoreController extends BaseParameterController {
|
|
return new ModelAndView("redirect:/admin/exam/list");
|
|
return new ModelAndView("redirect:/admin/exam/list");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
@RequestMapping("/export")
|
|
@RequestMapping("/export")
|
|
public String export(ExamStudentSearchQuery query, HttpServletRequest request, HttpServletResponse response,
|
|
public String export(ExamStudentSearchQuery query, HttpServletRequest request, HttpServletResponse response,
|
|
RedirectAttributes redirectAttributes) {
|
|
RedirectAttributes redirectAttributes) {
|
|
@@ -239,38 +244,39 @@ public class ScoreController extends BaseParameterController {
|
|
String subjectCode = RequestUtils.getSession(request).getParameter("subjectCode");
|
|
String subjectCode = RequestUtils.getSession(request).getParameter("subjectCode");
|
|
if (examId > 0) {
|
|
if (examId > 0) {
|
|
query.setExamId(examId);
|
|
query.setExamId(examId);
|
|
-// query.setUpload(true);
|
|
|
|
-// query.setAbsent(false);
|
|
|
|
|
|
+ // query.setUpload(true);
|
|
|
|
+ // query.setAbsent(false);
|
|
query.setPageNumber(1);
|
|
query.setPageNumber(1);
|
|
query.setPageSize(Integer.MAX_VALUE);
|
|
query.setPageSize(Integer.MAX_VALUE);
|
|
- String ids = getStudentIdsByMarkLoginAndMarkName(query.getMarkLogin(),query.getMarkName());
|
|
|
|
- if(StringUtils.isNotBlank(ids)){
|
|
|
|
|
|
+ String ids = getStudentIdsByMarkLoginAndMarkName(query.getMarkLogin(), query.getMarkName());
|
|
|
|
+ if (StringUtils.isNotBlank(ids)) {
|
|
query.setIds(ids);
|
|
query.setIds(ids);
|
|
}
|
|
}
|
|
query = studentService.findByQuery(query);
|
|
query = studentService.findByQuery(query);
|
|
String fileName = "成绩单_" + DateUtils.getDate("yyyyMMdd") + ".xlsx";
|
|
String fileName = "成绩单_" + DateUtils.getDate("yyyyMMdd") + ".xlsx";
|
|
try {
|
|
try {
|
|
- if(subjectCode!=null){
|
|
|
|
- fileName = subjectService.find(examId, subjectCode).getName()+"-机阅考试成绩表";
|
|
|
|
- List<ScoreExportDTO> list = new LinkedList<ScoreExportDTO>();
|
|
|
|
- for (ExamStudent student : query.getResult()) {
|
|
|
|
- if(student.isBreach() || student.isAbsent()){
|
|
|
|
|
|
+ if (subjectCode != null) {
|
|
|
|
+ fileName = subjectService.find(examId, subjectCode).getName() + "-机阅考试成绩表";
|
|
|
|
+ List<ScoreExportDTO> list = new LinkedList<ScoreExportDTO>();
|
|
|
|
+ for (ExamStudent student : query.getResult()) {
|
|
|
|
+ if (student.isBreach() || student.isAbsent()) {
|
|
student.setObjectiveScore(0d);
|
|
student.setObjectiveScore(0d);
|
|
student.setSubjectiveScore(0d);
|
|
student.setSubjectiveScore(0d);
|
|
}
|
|
}
|
|
list.add(new ScoreExportDTO(student));
|
|
list.add(new ScoreExportDTO(student));
|
|
}
|
|
}
|
|
- new ExportExcel(subjectCode+"-"+subjectService.find(examId, subjectCode).getName(), ScoreExportDTO.class).setDataList(list).write(response, fileName + ".xlsx").dispose();
|
|
|
|
- return null;
|
|
|
|
- }
|
|
|
|
- List<ExamStudentDTO> list = new LinkedList<ExamStudentDTO>();
|
|
|
|
- for (ExamStudent student : query.getResult()) {
|
|
|
|
- if(student.isBreach() || student.isAbsent()){
|
|
|
|
|
|
+ new ExportExcel(subjectCode + "-" + subjectService.find(examId, subjectCode).getName(),
|
|
|
|
+ ScoreExportDTO.class).setDataList(list).write(response, fileName + ".xlsx").dispose();
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+ List<ExamStudentDTO> list = new LinkedList<ExamStudentDTO>();
|
|
|
|
+ for (ExamStudent student : query.getResult()) {
|
|
|
|
+ if (student.isBreach() || student.isAbsent()) {
|
|
student.setObjectiveScore(0d);
|
|
student.setObjectiveScore(0d);
|
|
student.setSubjectiveScore(0d);
|
|
student.setSubjectiveScore(0d);
|
|
}
|
|
}
|
|
- list.add(new ExamStudentDTO(student));
|
|
|
|
- }
|
|
|
|
|
|
+ list.add(new ExamStudentDTO(student));
|
|
|
|
+ }
|
|
new ExportExcel("成绩单", ExamStudentDTO.class).setDataList(list).write(response, fileName).dispose();
|
|
new ExportExcel("成绩单", ExamStudentDTO.class).setDataList(list).write(response, fileName).dispose();
|
|
return null;
|
|
return null;
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -285,8 +291,15 @@ public class ScoreController extends BaseParameterController {
|
|
private List<ScoreItem> buildScoreList(ExamStudent student) {
|
|
private List<ScoreItem> buildScoreList(ExamStudent student) {
|
|
List<ScoreItem> scoreList = new LinkedList<ScoreItem>();
|
|
List<ScoreItem> scoreList = new LinkedList<ScoreItem>();
|
|
|
|
|
|
- List<ExamQuestion> oList = questionService.findByExamAndSubjectAndObjective(student.getExamId(),
|
|
|
|
- student.getSubjectCode(), true);
|
|
|
|
|
|
+ List<ExamQuestion> oList = null;
|
|
|
|
+ ExamStudentPaper oPaper = studentPaperService.find(student.getExamId(), student.getExamNumber(), true);
|
|
|
|
+ if (oPaper != null) {
|
|
|
|
+ oList = oPaper.getQuestionList();
|
|
|
|
+ }
|
|
|
|
+ if (oList == null || oList.isEmpty()) {
|
|
|
|
+ oList = questionService.findByExamAndSubjectAndObjective(student.getExamId(), student.getSubjectCode(),
|
|
|
|
+ true);
|
|
|
|
+ }
|
|
List<ScoreItem> list1 = student.getScoreList(true);
|
|
List<ScoreItem> list1 = student.getScoreList(true);
|
|
int index = 0;
|
|
int index = 0;
|
|
for (ExamQuestion question : oList) {
|
|
for (ExamQuestion question : oList) {
|
|
@@ -301,8 +314,15 @@ public class ScoreController extends BaseParameterController {
|
|
}
|
|
}
|
|
scoreList.addAll(list1);
|
|
scoreList.addAll(list1);
|
|
|
|
|
|
- List<ExamQuestion> sList = questionService.findByExamAndSubjectAndObjective(student.getExamId(),
|
|
|
|
- student.getSubjectCode(), false);
|
|
|
|
|
|
+ List<ExamQuestion> sList = null;
|
|
|
|
+ ExamStudentPaper sPaper = studentPaperService.find(student.getExamId(), student.getExamNumber(), false);
|
|
|
|
+ if (sPaper != null) {
|
|
|
|
+ sList = sPaper.getQuestionList();
|
|
|
|
+ }
|
|
|
|
+ if (sList == null || sList.isEmpty()) {
|
|
|
|
+ sList = questionService.findByExamAndSubjectAndObjective(student.getExamId(), student.getSubjectCode(),
|
|
|
|
+ false);
|
|
|
|
+ }
|
|
List<ScoreItem> list2 = student.getScoreList(false);
|
|
List<ScoreItem> list2 = student.getScoreList(false);
|
|
index = 0;
|
|
index = 0;
|
|
for (ExamQuestion question : sList) {
|
|
for (ExamQuestion question : sList) {
|
|
@@ -342,37 +362,37 @@ public class ScoreController extends BaseParameterController {
|
|
student.setAnswerUrl(subject.getAnswerUrl());
|
|
student.setAnswerUrl(subject.getAnswerUrl());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
private boolean isMarked(ExamStudent student) {
|
|
private boolean isMarked(ExamStudent student) {
|
|
- MarkLibrary markLibrary = markLibraryService.findByStudentId(student
|
|
|
|
- .getId());
|
|
|
|
- if(markLibrary != null){
|
|
|
|
|
|
+ MarkLibrary markLibrary = markLibraryService.findByStudentId(student.getId());
|
|
|
|
+ if (markLibrary != null) {
|
|
if (StringUtils.isNotEmpty(markLibrary.getMarkerScoreList())
|
|
if (StringUtils.isNotEmpty(markLibrary.getMarkerScoreList())
|
|
&& markLibrary.getStatus().equals(LibraryStatus.MARKED)) {
|
|
&& markLibrary.getStatus().equals(LibraryStatus.MARKED)) {
|
|
return true;
|
|
return true;
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
+
|
|
@RequestMapping("/exportScore")
|
|
@RequestMapping("/exportScore")
|
|
public String exportScore(ExamStudentSearchQuery query, HttpServletRequest request, HttpServletResponse response,
|
|
public String exportScore(ExamStudentSearchQuery query, HttpServletRequest request, HttpServletResponse response,
|
|
RedirectAttributes redirectAttributes) {
|
|
RedirectAttributes redirectAttributes) {
|
|
int examId = getSessionExamId(request);
|
|
int examId = getSessionExamId(request);
|
|
String examName = "[考试批次名称]成绩单";
|
|
String examName = "[考试批次名称]成绩单";
|
|
if (examId > 0) {
|
|
if (examId > 0) {
|
|
- Exam exam =examService.findById(examId);
|
|
|
|
- if(exam != null){
|
|
|
|
- examName = "["+exam.getName()+"]成绩单";
|
|
|
|
|
|
+ Exam exam = examService.findById(examId);
|
|
|
|
+ if (exam != null) {
|
|
|
|
+ examName = "[" + exam.getName() + "]成绩单";
|
|
}
|
|
}
|
|
- String ids = getStudentIdsByMarkLoginAndMarkName(query.getMarkLogin(),query.getMarkName());
|
|
|
|
- if(StringUtils.isNotBlank(ids)){
|
|
|
|
|
|
+ String ids = getStudentIdsByMarkLoginAndMarkName(query.getMarkLogin(), query.getMarkName());
|
|
|
|
+ if (StringUtils.isNotBlank(ids)) {
|
|
query.setIds(ids);
|
|
query.setIds(ids);
|
|
}
|
|
}
|
|
query.setExamId(examId);
|
|
query.setExamId(examId);
|
|
-// query.setUpload(true);
|
|
|
|
-// query.setAbsent(false);
|
|
|
|
|
|
+ // query.setUpload(true);
|
|
|
|
+ // query.setAbsent(false);
|
|
query.setPageNumber(1);
|
|
query.setPageNumber(1);
|
|
query.setPageSize(Integer.MAX_VALUE);
|
|
query.setPageSize(Integer.MAX_VALUE);
|
|
query = studentService.findByQuery(query);
|
|
query = studentService.findByQuery(query);
|
|
@@ -380,9 +400,9 @@ public class ScoreController extends BaseParameterController {
|
|
String subTitle = "负责教师签字:_______________ 交回日期:_______________";
|
|
String subTitle = "负责教师签字:_______________ 交回日期:_______________";
|
|
try {
|
|
try {
|
|
List<ExamStudentScoreDTO> list = new LinkedList<ExamStudentScoreDTO>();
|
|
List<ExamStudentScoreDTO> list = new LinkedList<ExamStudentScoreDTO>();
|
|
- int i =1;
|
|
|
|
|
|
+ int i = 1;
|
|
for (ExamStudent student : query.getResult()) {
|
|
for (ExamStudent student : query.getResult()) {
|
|
- if(student.isBreach() || student.isAbsent()){
|
|
|
|
|
|
+ if (student.isBreach() || student.isAbsent()) {
|
|
student.setObjectiveScore(0d);
|
|
student.setObjectiveScore(0d);
|
|
student.setSubjectiveScore(0d);
|
|
student.setSubjectiveScore(0d);
|
|
}
|
|
}
|
|
@@ -390,7 +410,8 @@ public class ScoreController extends BaseParameterController {
|
|
list.add(new ExamStudentScoreDTO(student));
|
|
list.add(new ExamStudentScoreDTO(student));
|
|
i++;
|
|
i++;
|
|
}
|
|
}
|
|
- new ExportExcel2(examName,subTitle, ExamStudentScoreDTO.class).setDataList(list).write(response, fileName);
|
|
|
|
|
|
+ new ExportExcel2(examName, subTitle, ExamStudentScoreDTO.class).setDataList(list).write(response,
|
|
|
|
+ fileName);
|
|
return null;
|
|
return null;
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
addMessage(redirectAttributes, "导出成绩失败!" + e.getMessage());
|
|
addMessage(redirectAttributes, "导出成绩失败!" + e.getMessage());
|
|
@@ -400,25 +421,26 @@ public class ScoreController extends BaseParameterController {
|
|
return "redirect:/admin/exam/list";
|
|
return "redirect:/admin/exam/list";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- public String getStudentIdsByMarkLoginAndMarkName(String markLogin,String markName){
|
|
|
|
|
|
+
|
|
|
|
+ public String getStudentIdsByMarkLoginAndMarkName(String markLogin, String markName) {
|
|
String ids = "";
|
|
String ids = "";
|
|
- if(StringUtils.isNotBlank(markLogin)){
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(markLogin)) {
|
|
ids += studentService.findIdsByMarkLogin(markLogin);
|
|
ids += studentService.findIdsByMarkLogin(markLogin);
|
|
- if(ids.equals("")){
|
|
|
|
|
|
+ if (ids.equals("")) {
|
|
ids = "-1";
|
|
ids = "-1";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(StringUtils.isNotBlank(markName)){
|
|
|
|
- String s = studentService.findIdsByMarkName(markName);
|
|
|
|
- if(StringUtils.isBlank(ids)){
|
|
|
|
- if(s.equals("")){
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(markName)) {
|
|
|
|
+ String s = studentService.findIdsByMarkName(markName);
|
|
|
|
+ if (StringUtils.isBlank(ids)) {
|
|
|
|
+ if (s.equals("")) {
|
|
ids = "-1";
|
|
ids = "-1";
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
ids += s;
|
|
ids += s;
|
|
}
|
|
}
|
|
- }else{
|
|
|
|
- if(!ids.equals("-1")){
|
|
|
|
- if(StringUtils.isBlank(s)){
|
|
|
|
|
|
+ } else {
|
|
|
|
+ if (!ids.equals("-1")) {
|
|
|
|
+ if (StringUtils.isBlank(s)) {
|
|
ids = "-1";
|
|
ids = "-1";
|
|
}
|
|
}
|
|
}
|
|
}
|