Merge remote-tracking branch 'origin/master'

master
ArgonarioD 2022-07-11 00:00:46 +08:00
commit 90090bedf6
1 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,34 @@
package cn.edu.hfut.rmdjzz.projectmanagement.entity.dto;
import cn.edu.hfut.rmdjzz.projectmanagement.entity.Task;
import lombok.Data;
import lombok.NonNull;
import java.time.LocalDate;
import java.util.Objects;
/**
* @author
* @since 2022/7/8 15:40
*/
@Data
public class TaskTrendDTO {
LocalDate taskDate;
String taskStatus;
Long taskNum;
public void changeForUnclosed(TaskTrendDTO taskTrend) {
if(Objects.equals(Task.STATUS_UNCLOSED, taskStatus)) {
taskNum += taskTrend.getTaskNum();
}
}
public void changeForClosed(TaskTrendDTO taskTrend) {
if(Objects.equals(Task.STATUS_UNCLOSED, taskStatus)) {
taskNum -= taskTrend.getTaskNum();
} else {
if(Objects.equals(taskTrend.getTaskStatus(), taskStatus)) {
taskNum += taskTrend.getTaskNum();
}
}
}
}