feat(attendance): 添加排班生成功能

- 在IWmsAttendanceScheduleService中新增generateSchedule方法
- 在WmsAttendanceScheduleController中添加生成排班API接口
- 实现WmsAttendanceScheduleServiceImpl中的排班生成逻辑,支持正常排班和倒班
- 扩展WmsAttendanceShiftRule实体类,添加倒班转换班次字段
- 更新WmsAttendanceShiftRule相关BO、VO类及数据库映射
- 创建GenerateScheduleBo请求对象用于接收排班生成参数
- 实现倒班规则查询和班次验证功能
- 添加排班重复性检查机制
This commit is contained in:
2026-05-09 13:59:37 +08:00
parent e42afdaf20
commit 0ecc886485
9 changed files with 292 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ import com.klp.common.enums.BusinessType;
import com.klp.common.utils.poi.ExcelUtil;
import com.klp.domain.vo.WmsAttendanceScheduleVo;
import com.klp.domain.bo.WmsAttendanceScheduleBo;
import com.klp.domain.bo.GenerateScheduleBo;
import com.klp.service.IWmsAttendanceScheduleService;
import com.klp.common.core.page.TableDataInfo;
@@ -96,4 +97,14 @@ public class WmsAttendanceScheduleController extends BaseController {
@PathVariable Long[] scheduleIds) {
return toAjax(iWmsAttendanceScheduleService.deleteWithValidByIds(Arrays.asList(scheduleIds), true));
}
/**
* 生成排班
*/
@Log(title = "生成排班", businessType = BusinessType.INSERT)
@PostMapping("/generate")
public R<Void> generateSchedule(@Validated @RequestBody GenerateScheduleBo bo) {
iWmsAttendanceScheduleService.generateSchedule(bo);
return R.ok();
}
}