Commit 10dd917c4faab6c364c96294588518f65a12454d
Merge branch 'develop' of http://120.78.57.84/Elvis/SunvoteEducation into develop
Showing
2 changed files
with
20 additions
and
9 deletions
resources/mybatis1/sunvote/HomeworkMapper.xml
... | ... | @@ -225,7 +225,7 @@ |
225 | 225 | and COMPLETE_DATE = #{COMPLETE_DATE} |
226 | 226 | </if> |
227 | 227 | <if test="START_DATE != null and START_DATE != ''"><!-- 关键词检索 --> |
228 | - and COMPLETE_DATE < #{START_DATE} | |
228 | + and COMPLETE_DATE > #{START_DATE} | |
229 | 229 | </if> |
230 | 230 | <if test="END_DATE != null and END_DATE != ''"><!-- 关键词检索 --> |
231 | 231 | and COMPLETE_DATE < #{END_DATE} |
... | ... | @@ -311,7 +311,7 @@ |
311 | 311 | and STUDENT_ID = #{STUDENT_ID} |
312 | 312 | </if> |
313 | 313 | <if test="START_DATE != null and START_DATE != ''"><!-- 关键词检索 --> |
314 | - and COMPLETE_DATE < #{START_DATE} | |
314 | + and COMPLETE_DATE > #{START_DATE} | |
315 | 315 | </if> |
316 | 316 | <if test="END_DATE != null and END_DATE != ''"><!-- 关键词检索 --> |
317 | 317 | and COMPLETE_DATE < #{END_DATE} | ... | ... |
src/com/fh/controller/sunvote/homework/HomeworkController.java
... | ... | @@ -380,8 +380,6 @@ public class HomeworkController extends BaseController { |
380 | 380 | PageData pd = new PageData(); |
381 | 381 | pd = this.getPageData(); |
382 | 382 | pd.put("TEACHER_ID", getTeacherID()); |
383 | - | |
384 | - | |
385 | 383 | if(pd.get("CURRENT_WEEK") == null && pd.get("START_DATE") == null && pd.get("END_DATE") == null){ |
386 | 384 | pd.put("CURRENT_WEEK", "0"); |
387 | 385 | String currentWeek = pd.getString("CURRENT_WEEK"); |
... | ... | @@ -394,8 +392,15 @@ public class HomeworkController extends BaseController { |
394 | 392 | pd.put("START_DATE", getWeekStart(current)); |
395 | 393 | pd.put("END_DATE", getWeekEnd(current)); |
396 | 394 | } |
397 | - List<PageData> dataList = homeworkService.report(pd); | |
398 | - pd.put("DATA", dataList); | |
395 | + | |
396 | + if(pd.get("STUDENT_ID") != null){ | |
397 | + List<PageData> dataList = homeworkService.report(pd); | |
398 | + pd.put("DATA", dataList); | |
399 | + } | |
400 | + if(pd.get("CLASS_ID") != null){ | |
401 | + List<PageData> studentList = studentService.findByClassId(pd); | |
402 | + pd.put("STUDENTS", studentList); | |
403 | + } | |
399 | 404 | pd.remove("JSON"); |
400 | 405 | mv.setViewName("sunvote/homework/homework_student_report"); |
401 | 406 | mv.addObject("pd", pd); |
... | ... | @@ -416,7 +421,6 @@ public class HomeworkController extends BaseController { |
416 | 421 | pd = this.getPageData(); |
417 | 422 | pd.put("TEACHER_ID", getTeacherID()); |
418 | 423 | |
419 | - | |
420 | 424 | if(pd.get("CURRENT_WEEK") == null && pd.get("START_DATE") == null && pd.get("END_DATE") == null){ |
421 | 425 | pd.put("CURRENT_WEEK", "0"); |
422 | 426 | String currentWeek = pd.getString("CURRENT_WEEK"); |
... | ... | @@ -429,8 +433,15 @@ public class HomeworkController extends BaseController { |
429 | 433 | pd.put("START_DATE", getWeekStart(current)); |
430 | 434 | pd.put("END_DATE", getWeekEnd(current)); |
431 | 435 | } |
432 | - List<PageData> dataList = homeworkService.report(pd); | |
433 | - pd.put("DATA", dataList); | |
436 | + if(pd.get("HOMEWORK_ID") != null){ | |
437 | + List<PageData> dataList = homeworkService.report(pd); | |
438 | + pd.put("DATA", dataList); | |
439 | + } | |
440 | + if(pd.get("CLASS_ID") != null){ | |
441 | + List<PageData> studentList = studentService.findByClassId(pd); | |
442 | + pd.put("STUDENTS", studentList); | |
443 | + } | |
444 | + | |
434 | 445 | pd.remove("JSON"); |
435 | 446 | mv.setViewName("sunvote/homework/homework_item_report"); |
436 | 447 | mv.addObject("pd", pd); | ... | ... |