Files
scrq-hd/.svn/pristine/7a/7a082de16cbbb8e78d1b14dd5725a745e5c0bb53.svn-base
2025-07-03 10:34:04 +08:00

95 lines
2.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.cmeim.basic.po;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
* 班次有效工作时间
* </p>
*
* @author wuyuqi
* @since 2022-08-30
*/
@Getter
@Setter
@TableName("ba_time_work_hour")
@ApiModel(value = "BaTimeWorkHour对象", description = "班次有效工作时间")
public class BaTimeWorkHour implements Serializable, Comparable<BaTimeWorkHour> {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键id")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ApiModelProperty("班次ID")
private Long timeId;
@ApiModelProperty("班次名")
private String timeName;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("开始时间")
private String startTime;
@ApiModelProperty("开始时间")
private String endTime;
@ApiModelProperty("时长")
private Double hour;
@ApiModelProperty("是否加班")
private Boolean isExtra;
@ApiModelProperty("逻辑删除")
@TableLogic
private Boolean isDeleted;
@ApiModelProperty("创建时间")
private Date createDt;
@ApiModelProperty("创建人")
private String createBy;
@ApiModelProperty("更新时间")
private Date updateDt;
@ApiModelProperty("更新人")
private String updateBy;
@TableField(exist = false)
@ApiModelProperty("是否跨天1是0否")
private Integer isAcrossDay;
public BaTimeWorkHour() {
this.isExtra = false;
}
@Override
public int compareTo(BaTimeWorkHour o) {
int startTime1 = Integer.parseInt(this.startTime.replaceAll(":", ""));
int startTime2 = Integer.parseInt(o.getStartTime().replaceAll(":", ""));
if (startTime1 != startTime2) {
return startTime1 - startTime2;
} else {
int endTime1 = Integer.parseInt(this.endTime.replaceAll(":", ""));
int endTime2 = Integer.parseInt(o.getEndTime().replaceAll(":", ""));
return endTime1 - endTime2;
}
}
}