wuwen 3 gadi atpakaļ
vecāks
revīzija
f20462128e

+ 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);
 	                        }