feat(wms): 添加考勤排班、班次及倒班规则功能模块
- 新增 IWmsAttendanceScheduleService 接口及其实现类 - 新增 IWmsAttendanceShiftService 接口及其实现类 - 新增 IWmsAttendanceShiftRuleService 接口及其实现类 - 添加 WmsAttendanceSchedule、WmsAttendanceShift、WmsAttendanceShiftRule 实体类 - 创建对应的 BO 和 VO 类用于数据传输 - 添加 WmsAttendanceScheduleController、WmsAttendanceShiftController、WmsAttendanceShiftRuleController 控制器 - 新增相应的 Mapper 接口和 XML 映射文件 - 实现分页查询、新增、修改、删除等基础功能 - 集成 Excel 导出功能和数据校验机制
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
package com.klp.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 排班(谁在哪天上班)视图对象 wms_attendance_schedule
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-05-08
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class WmsAttendanceScheduleVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long scheduleId;
|
||||
|
||||
/**
|
||||
* 员工ID
|
||||
*/
|
||||
@ExcelProperty(value = "员工ID")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
@ExcelProperty(value = "日期")
|
||||
private Date workDate;
|
||||
|
||||
/**
|
||||
* 班次ID
|
||||
*/
|
||||
@ExcelProperty(value = "班次ID")
|
||||
private Long shiftId;
|
||||
|
||||
/**
|
||||
* 班次名称
|
||||
*/
|
||||
@ExcelProperty(value = "班次名称")
|
||||
private String shiftName;
|
||||
|
||||
/**
|
||||
* 班组(倒班用)
|
||||
*/
|
||||
@ExcelProperty(value = "班组", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "倒=班用")
|
||||
private String shiftGroup;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.klp.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 倒班规则(支持按日期或按周期自动切换班次)视图对象 wms_attendance_shift_rule
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-05-08
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class WmsAttendanceShiftRuleVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long ruleId;
|
||||
|
||||
/**
|
||||
* 规则类型(date=按日期倒班 / cycle=按周期倒班)
|
||||
*/
|
||||
@ExcelProperty(value = "规则类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "d=ate=按日期倒班,/=,c=ycle=按周期倒班")
|
||||
private String ruleType;
|
||||
|
||||
/**
|
||||
* 倒班日期(如:1,11,21,31)
|
||||
*/
|
||||
@ExcelProperty(value = "倒班日期", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "如=:1,11,21,31")
|
||||
private String changeDays;
|
||||
|
||||
/**
|
||||
* 周期天数(如每10天倒班)
|
||||
*/
|
||||
@ExcelProperty(value = "周期天数", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "如=每10天倒班")
|
||||
private Long cycleDays;
|
||||
|
||||
/**
|
||||
* 班次A(通常白班ID)
|
||||
*/
|
||||
@ExcelProperty(value = "班次A", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "通=常白班ID")
|
||||
private Long shiftA;
|
||||
|
||||
/**
|
||||
* 班次B(通常夜班ID)
|
||||
*/
|
||||
@ExcelProperty(value = "班次B", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "通=常夜班ID")
|
||||
private Long shiftB;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.klp.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 班次视图对象 wms_attendance_shift
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-05-08
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class WmsAttendanceShiftVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long shiftId;
|
||||
|
||||
/**
|
||||
* 班次名称(长白/夜班/办公)
|
||||
*/
|
||||
@ExcelProperty(value = "班次名称", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "长=白/夜班/办公")
|
||||
private String shiftName;
|
||||
|
||||
/**
|
||||
* 班次类型(白班/夜班)
|
||||
*/
|
||||
@ExcelProperty(value = "班次类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "白=班/夜班")
|
||||
private String shiftType;
|
||||
|
||||
/**
|
||||
* 季节(夏季/冬季)
|
||||
*/
|
||||
@ExcelProperty(value = "季节", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "夏=季/冬季")
|
||||
private String season;
|
||||
|
||||
/**
|
||||
* 上班1
|
||||
*/
|
||||
@ExcelProperty(value = "上班1")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 下班1
|
||||
*/
|
||||
@ExcelProperty(value = "下班1")
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 上班2
|
||||
*/
|
||||
@ExcelProperty(value = "上班2")
|
||||
private Date startTime2;
|
||||
|
||||
/**
|
||||
* 下班2
|
||||
*/
|
||||
@ExcelProperty(value = "下班2")
|
||||
private Date endTime2;
|
||||
|
||||
/**
|
||||
* 是否跨天
|
||||
*/
|
||||
@ExcelProperty(value = "是否跨天")
|
||||
private Long isCrossDay;
|
||||
|
||||
/**
|
||||
* 工时(如18小时)
|
||||
*/
|
||||
@ExcelProperty(value = "工时", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "如=18小时")
|
||||
private BigDecimal workHours;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user