三力士演示demo

yun-zuoyi
钮海涛 5 years ago
parent 1581e8b86c
commit 2bbc0bea66

@ -0,0 +1,31 @@
package cn.estsh.i3plus.pojo.aps.model;
import lombok.Data;
import java.util.Date;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
@Data
public class TimeBlock implements Comparable<TimeBlock> {
private Date begin;
private Date end;
private boolean onDuty = true;
private String shift;
@Override
public int compareTo(TimeBlock o) {
if (this.getBegin().equals(o.getBegin())) {
if (this.getEnd().equals(o.getEnd())) {
return 0;
}
return this.getEnd().before(o.getEnd()) ? -1 : 1 ;
}
return this.getBegin().before(o.getBegin()) ? -1 : 1;
}
}
Loading…
Cancel
Save