wangwei 7 년 전
부모
커밋
2c01bac18f
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      sql/考生导入-存储过程.sql

+ 2 - 2
sql/考生导入-存储过程.sql

@@ -31,7 +31,7 @@ BEGIN
 			SELECT x.id into course_id_temp from ecs_core_course x where x.code= course_code and x.org_id=root_org_id;
 			IF course_id_temp is not null THEN
 				 update ec_e_exam_student_tmp x set x.course_id=course_id_temp 
-				 where  x.course_id is null and x.course_code=course_code and  x.batch_id= batch_id;
+				 where  x.course_id is null and x.course_code=course_code and x.root_org_id=root_org_id and  x.batch_id= batch_id;
 			END IF;
 		END IF;
 		
@@ -39,7 +39,7 @@ BEGIN
 			SELECT x.id into org_id_temp from ecs_core_org x where x.code= org_code and x.root_id=root_org_id;
 			IF org_id_temp is not null THEN
 				 update ec_e_exam_student_tmp x set x.org_id=org_id_temp 
-				 where  x.org_id is null and x.org_code=org_code and  x.batch_id= batch_id;
+				 where  x.org_id is null and x.org_code=org_code and x.root_org_id=root_org_id and  x.batch_id= batch_id;
 			END IF;
 		END IF;