Skip to content

Commit

Permalink
qa 배포를 위해 머지합니다. (#132)
Browse files Browse the repository at this point in the history
* fix: 지도 관계 수정 API에서 기존 배정 인원 확인하여 error를 보내는 로직 삭제

* [HOTFIX] 심사의견 양식 수정  /  최종판정 심사의견 확인 가능하도록 수정 (#125)

* fix: 심사보고서 양식 수정

* fix: /reviews/me otherReviews Dto 수정

* fix: 심사현황 조회 심사가 끝난 정보 남기도록 수정 (#131)

* fix: 학생 엑셀 등록 timeout 40초로 수정 (#124)

* fix: 심사논문 관련 추가 수정 (#129)

* fix: 논문 제출이 안된 학생의 심사를 진행할 수 없도록 수정

* fix: 심사위원장이 전원 심사완료가 아닐시 심사할수 없도록 수정

* 추가수정

* fix: filter 조건 수정

* fix: 누락된 query 조건 추가

* fix(be): query typo 수정

* [FIX] 특정 학과 학생 논문 정보 업데이트 오류 수정 (#130)

* fix: 학생이 본심 논문 수정 시 수정지시사항 반영 학과 체크

* fix: 관리자가 본심 논문 수정 시 수정지시사항 반영 학과 체크

* fix: 논문 정보 업데이트 API 다시 수정

* fix: 학생 엑셀 업로드로 논문 제목 수정시 생길 수 있는 오류 수정

---------

Co-authored-by: yesjuhee <juhee0924@g.skku.edu>
Co-authored-by: chanyeong <60565169+jcy0308@users.noreply.github.com>
  • Loading branch information
3 people authored May 9, 2024
1 parent 054aac8 commit 6b6c9cb
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 59 deletions.
8 changes: 4 additions & 4 deletions resources/format/심사결과보고서_양식.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
<tr class="row_1">
<td class="label_1" rowspan="2">
<span>논문제출자</span><br>
Dissertion<br>
Thesis<br>
Submitter
</td>
<td class="label_1">
Expand Down Expand Up @@ -221,7 +221,7 @@
<tr class="row_2">
<td class="label_1" colspan="2">
<span>논문제목</span><br>
Dissertion Title
Thesis Title
</td>
<td colspan="3">
$논문제목
Expand Down Expand Up @@ -276,7 +276,7 @@
$row
</table>
<div id="notice">
※ 심사위원별로 합격/불합격 예부를 “O”로 표기하여 주시기 바랍니다.
※ 심사위원별로 합격/불합격 여부를 “O”로 표기하여 주시기 바랍니다.
</div>
<table id="comment">
<tr class="row_1">
Expand All @@ -291,7 +291,7 @@
</tr>
</table>
<div id="notice">
붙임: 심사위원별 예비심사 보고서 각 1부
붙임: 심사위원별 심사 보고서 각 1부
</div>
<div id="date">
<div id="kor">
Expand Down
2 changes: 1 addition & 1 deletion resources/format/심사보고서_양식.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
<tr class="row_1">
<td class="label_1" rowspan="2">
<span>논문제출자</span><br>
Dissertion<br>
Thesis<br>
Submitter
</td>
<td class="label_1">
Expand Down
6 changes: 3 additions & 3 deletions resources/format/예비심사결과보고서_양식.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<tr class="row_1">
<td class="label_1" rowspan="2">
<span>논문제출자</span><br>
Dissertion<br>
Thesis<br>
Submitter
</td>
<td class="label_1">
Expand Down Expand Up @@ -208,7 +208,7 @@
<tr class="row_2">
<td class="label_1" colspan="2">
<span>논문제목</span><br>
Dissertion Title
Thesis Title
</td>
<td colspan="3">
$논문제목
Expand Down Expand Up @@ -243,7 +243,7 @@
$row
</table>
<div id="notice">
※ 심사위원별로 합격/불합격 예부를 “O”로 표기하여 주시기 바랍니다.
※ 심사위원별로 합격/불합격 여부를 “O”로 표기하여 주시기 바랍니다.
</div>
<table id="comment">
<tr class="row_1">
Expand Down
2 changes: 1 addition & 1 deletion resources/format/예비심사보고서_양식.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
<tr class="row_1">
<td class="label_1" rowspan="2">
<span>논문제출자</span><br>
Dissertion<br>
Thesis<br>
Submitter
</td>
<td class="label_1">
Expand Down
4 changes: 4 additions & 0 deletions src/modules/reviews/dtos/review.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export class OtherReviewDto {
this.name = otherReview.reviewer.name;
this.presentationResult = otherReview.presentationStatus;
this.contentResult = otherReview.contentStatus;
this.comment = otherReview.comment;
if (otherReview.file) this.file = otherReview.file;
else this.file = null;
}
Expand All @@ -84,6 +85,9 @@ export class OtherReviewDto {
@ApiProperty({ description: "구두 심사결과", enum: Summary })
contentResult: Summary;

@ApiProperty({ description: "심사 의견" })
comment: string;

@ApiProperty({ description: "심사 의견 파일" })
file: File;
}
Expand Down
5 changes: 3 additions & 2 deletions src/modules/reviews/reviews.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ export class ReviewsService {
return file.fileId == null;
});
if (submitted.length != 0) {
throw new BadRequestException("논문 제출이 완료되지 않은 학생은 심사할 수 없습니다.");
throw new BadRequestException("미제출파일이 있는 학생은 심사할 수 없습니다.");
}
if (!foundReview) throw new NotFoundException("존재하지 않는 심사정보입니다");
if (userType == UserType.PROFESSOR && foundReview.reviewerId != userId) {
Expand Down Expand Up @@ -1080,6 +1080,7 @@ export class ReviewsService {
const otherReviews = await this.prismaService.review.findMany({
where: {
thesisInfoId: foundReview.thesisInfoId,
isFinal: false,
},
});
const notSubmitted = otherReviews.filter((review) => {
Expand Down Expand Up @@ -1544,7 +1545,7 @@ export class ReviewsService {
},
...(searchQuery.stage && { stage: searchQuery.stage }),
...(searchQuery.title && { title: { contains: searchQuery.title } }),
summary: { in: [Summary.PENDING, Summary.UNEXAMINED] },
// summary: { in: [Summary.PENDING, Summary.UNEXAMINED] },
},
include: {
process: {
Expand Down
59 changes: 23 additions & 36 deletions src/modules/students/students.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,12 @@ export class StudentsService {
where: { id: mainThesisInfo.id },
data: { title: thesisTitle },
});
await tx.thesisInfo.update({
where: { id: revisionThesisInfo.id },
data: { title: thesisTitle },
});
if (revisionThesisInfo) {
await tx.thesisInfo.update({
where: { id: revisionThesisInfo.id },
data: { title: thesisTitle },
});
}
}

// 지도 정보 수정 (reviewer, review)
Expand Down Expand Up @@ -1028,7 +1030,7 @@ export class StudentsService {
return students;
},
{
timeout: 10000,
timeout: 40000,
}
);
}
Expand Down Expand Up @@ -1572,9 +1574,9 @@ export class StudentsService {
(thesisFile) => thesisFile.type === ThesisFileType.PRESENTATION
)[0];

const [thesisInfo] = await this.prismaService.$transaction([
const thesisInfo = await this.prismaService.$transaction(async (tx) => {
// 본심 논문 정보 업데이트
this.prismaService.thesisInfo.update({
const thesisData = await tx.thesisInfo.update({
where: { id: mainThesisInfo.id },
data: {
title,
Expand All @@ -1600,17 +1602,21 @@ export class StudentsService {
include: { file: true },
},
},
}),
// 수정지시사항 논문 정보 업데이트
this.prismaService.thesisInfo.update({
where: { id: revisionThesisInfo.id },
data: {
title,
abstract,
},
}),
]);
});

if (revisionThesisInfo) {
// 수정지시사항 논문 정보 업데이트 : 수정 지시시항 포함 학과만!!
await tx.thesisInfo.update({
where: { id: revisionThesisInfo.id },
data: {
title,
abstract,
},
});
}

return thesisData;
});
return thesisInfo;
} // 수정 지시사항 반영 단계일 경우
else if (currentStage === Stage.REVISION) {
Expand Down Expand Up @@ -1723,15 +1729,6 @@ export class StudentsService {
});
if (foundReviewer) throw new BadRequestException("이미 해당 학생에 배정된 교수입니다.");

// 인원수 초과 확인
const currentReviewers = await this.prismaService.reviewer.findMany({
where: {
processId: process.id,
role,
},
});
if (currentReviewers.length === 2) throw new BadRequestException(`${role}가 이미 2명이므로 추가할 수 없습니다.`);

try {
await this.prismaService.$transaction(async (tx) => {
// reviewer 생성
Expand Down Expand Up @@ -1837,16 +1834,6 @@ export class StudentsService {
// 심사위원장인지 확인
if (process.headReviewerId === reviewerId) throw new BadRequestException("심사위원장은 배정 취소할 수 없습니다.");

// 해당 역할의 교수가 2명인지 확인
const reviewerList = await this.prismaService.reviewer.findMany({
where: {
processId: process.id,
role: foundReviewer.role,
},
});
if (reviewerList.length < 2)
throw new BadRequestException(`${foundReviewer.role}이 2명일 때만 배정 취소가 가능합니다.`);

// 배정 취소 (review, reviewer 삭제)
try {
await this.prismaService.$transaction(async (tx) => {
Expand Down
30 changes: 18 additions & 12 deletions src/modules/theses/theses.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ export class ThesesService {
(thesisInfo) => thesisInfo.stage === Stage.REVISION
)[0];

const [thesisInfo] = await this.prismaService.$transaction([
const thesisInfo = await this.prismaService.$transaction(async (tx) => {
// 본심 논문 정보 업데이트
this.prismaService.thesisInfo.update({
const thesisData = tx.thesisInfo.update({
where: { id },
data: {
title,
Expand All @@ -106,16 +106,22 @@ export class ThesesService {
include: { file: true },
},
},
}),
// 수정지시사항 논문 정보 업데이트
this.prismaService.thesisInfo.update({
where: { id: revisionThesisInfo.id },
data: {
title,
abstract,
},
}),
]);
});

if (revisionThesisInfo) {
// 수정지시사항 논문 정보 업데이트 : 수정 지시시항 포함 학과만!!
await tx.thesisInfo.update({
where: { id: revisionThesisInfo.id },
// where: { id: revisionThesisInfo.id },
data: {
title,
abstract,
},
});
}

return thesisData;
});

return thesisInfo;
} // 수정 지시사항 반영 단계일 경우
Expand Down

0 comments on commit 6b6c9cb

Please sign in to comment.