Merge remote-tracking branch 'origin/master'
commit
90090bedf6
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue