wuwen 3 년 전
부모
커밋
f20462128e
1개의 변경된 파일10개의 추가작업 그리고 4개의 파일을 삭제
  1. 10 4
      src/main/java/com/ssj/service/kmt/correctsys/KmtCorrectSysServiceImpl.java

+ 10 - 4
src/main/java/com/ssj/service/kmt/correctsys/KmtCorrectSysServiceImpl.java

@@ -754,10 +754,16 @@ public class KmtCorrectSysServiceImpl implements KmtCorrectSysService {
 	                        	homeworkCheckStudentDto.setErrorCount(0);
 	                        }
 	                        //将超过4天的作业就不可以再质检了
-	                        if(homework.getTotal()>homework.getChecked() 
-	                        		&& DateHelper.daysOfTwo(DateHelper.parseDate(homework.getDate(), "yyyy-MM-dd"),new Date())>4
-	                        		) {
-	                        	homeworkCheckStudentDto.setType(1);
+	                        if(homework.getTotal()>homework.getChecked()){
+	                        	 Calendar ca = Calendar.getInstance();
+	                             ca.setTime(DateHelper.parseDate(homework.getDate()+" 12:00:00", "yyyy-MM-dd HH:mm:ss"));
+	            		         ca.add(Calendar.DATE, 4);// num为增加的天数,可以改变的
+	            		         System.out.println(DateHelper.format(ca.getTime(), "yyyy-MM-dd HH:mm:ss"));
+	            		         if(new Date().getTime()>=ca.getTime().getTime()) {
+	            		        	 homeworkCheckStudentDto.setType(1);
+	            		         }else {
+	            		        	 homeworkCheckStudentDto.setType(0);
+	            		         }
 	                        }else {
 	                        	homeworkCheckStudentDto.setType(0);
 	                        }