refactor(domain): 优化班次时间字段类型

- 将 startTime、endTime、startTime2、endTime2 字段从 Date 类型改为 LocalTime 类型
- 为所有时间字段添加 @JsonFormat 注解以支持 HH:mm:ss 格式
- 为所有时间字段添加 @DateTimeFormat 注解以支持表单绑定
- 更新 WmsAttendanceShift、WmsAttendanceShiftBo 和 WmsAttendanceShiftVo 三个类的时间字段定义
- 移除旧的 java.util.Date 导入并添加 java.time.LocalTime 导入
- 添加对 Spring DateTimeFormat 注解的支持导入
This commit is contained in:
2026-05-09 10:19:50 +08:00
parent be098379d0
commit e42afdaf20
3 changed files with 42 additions and 15 deletions

View File

@@ -6,8 +6,9 @@ import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;
import java.time.LocalTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
/**
* 班次业务对象 wms_attendance_shift
@@ -43,22 +44,30 @@ public class WmsAttendanceShiftBo extends BaseEntity {
/**
* 上班1
*/
private Date startTime;
@JsonFormat(pattern = "HH:mm:ss")
@DateTimeFormat(pattern = "HH:mm:ss")
private LocalTime startTime;
/**
* 下班1
*/
private Date endTime;
@JsonFormat(pattern = "HH:mm:ss")
@DateTimeFormat(pattern = "HH:mm:ss")
private LocalTime endTime;
/**
* 上班2
*/
private Date startTime2;
@JsonFormat(pattern = "HH:mm:ss")
@DateTimeFormat(pattern = "HH:mm:ss")
private LocalTime startTime2;
/**
* 下班2
*/
private Date endTime2;
@JsonFormat(pattern = "HH:mm:ss")
@DateTimeFormat(pattern = "HH:mm:ss")
private LocalTime endTime2;
/**
* 是否跨天