Skip to content

Commit

Permalink
fix: 修改ac变更的bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
GLaxky committed Oct 29, 2024
1 parent 6bacd97 commit 1661957
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/main/java/com/softeng/dingtalk/service/PaperService.java
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,7 @@ public double calculateWeightOfAc(InternalPaper internalPaper) {
*/
public double calculateAc(InternalPaper internalPaper, double sum, int rank) {
// 论文中止时,只有第一作者扣分
double flagForSuspend = (internalPaper.getResult() == InternalPaper.SUSPEND && rank == 1) ? 1.0 : 0.0;
log.info("计算过程");
log.info("internalPaper: " + internalPaper);
log.info("calculateWeightOfAc(internalPaper) :" + calculateWeightOfAc(internalPaper));
log.info("calculateRatioOfAc(rank): " + calculateRatioOfAc(rank));
log.info("flagForSuspend: " + flagForSuspend);
double flagForSuspend = (internalPaper.getResult() != InternalPaper.SUSPEND || rank == 1) ? 1.0 : 0.0;
return calculateWeightOfAc(internalPaper) * calculateRatioOfAc(rank) * sum * flagForSuspend;
}

Expand Down

0 comments on commit 1661957

Please sign in to comment.