增加了工作项完成的时间线的具体类

master
yang.yongquan 2022-07-10 23:49:38 +08:00
parent 0cda29574f
commit deb17f2f6c
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();
}
}
}
}