-
Notifications
You must be signed in to change notification settings - Fork 0
[TSK-71] 기존 기필 카테고리 대체과목 보정 로직 수정하여 동일과목 학점 미인정 이슈 해결 #310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
f8a2644
3059cc8
014d591
d496bf2
bb9bd4a
4e272f1
62267b3
531505f
76eb9ab
de8ae84
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| package kr.allcll.backend.domain.graduation.credit; | ||
|
|
||
| import jakarta.persistence.Column; | ||
| import jakarta.persistence.Entity; | ||
| import jakarta.persistence.GeneratedValue; | ||
| import jakarta.persistence.GenerationType; | ||
| import jakarta.persistence.Id; | ||
| import jakarta.persistence.Table; | ||
| import kr.allcll.backend.support.entity.BaseEntity; | ||
| import lombok.AccessLevel; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| @Table(name = "course_equivalences") | ||
| @Entity | ||
| @Getter | ||
| @NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
| public class CourseEquivalence extends BaseEntity { | ||
|
|
||
| @Id | ||
| @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| private Long id; | ||
|
|
||
| @Column(name = "group_code", nullable = false) | ||
| private String groupCode; // 동일과목 그룹 번호 | ||
|
|
||
| @Column(name = "curi_no", nullable = false) | ||
| private String curiNo; // 학수번호 | ||
|
|
||
| @Column(name = "curi_nm", nullable = false, length = 255) | ||
| private String curiNm; // 과목명 | ||
|
|
||
| public CourseEquivalence(String groupCode, String curiNo, String curiNm) { | ||
| this.groupCode = groupCode; | ||
| this.curiNo = curiNo; | ||
| this.curiNm = curiNm; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| package kr.allcll.backend.domain.graduation.credit; | ||
|
|
||
| import java.util.List; | ||
| import java.util.Optional; | ||
| import java.util.Set; | ||
| import org.springframework.data.jpa.repository.JpaRepository; | ||
| import org.springframework.data.jpa.repository.Query; | ||
|
|
||
| public interface CourseEquivalenceRepository extends JpaRepository<CourseEquivalence, Long> { | ||
|
|
||
| @Query(""" | ||
| select e.curiNo from CourseEquivalence e | ||
| join CourseEquivalence e2 on e.groupCode = e2.groupCode | ||
| where e2.curiNo in :curiNos | ||
| """) | ||
| List<String> findSameGroupCuriNos(Set<String> curiNos); | ||
|
|
||
| @Query(""" | ||
| select e.groupCode from CourseEquivalence e | ||
| where e.curiNo = :curiNo | ||
| """) | ||
| Optional<String> findGroupCodeByCuriNo(String curiNo); | ||
|
Comment on lines
+19
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Useful? React with 👍 / 👎. |
||
| } | ||
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sync now persists
group_codeand the newfindRequiredCourseInGrouplogic depends on it, butrequired-coursesvalidation still does not require that column/value; if the sheet is not updated (or cells are blank), rows are saved withnullgroup codes and group-based matching always misses, causing equivalent/replacement academic-basic courses to be incorrectly treated as not required instead of failing fast during sync.Useful? React with 👍 / 👎.