feat(wms/attendance): 新增排班班次批量修改功能

在IWmsAttendanceScheduleService接口、WmsAttendanceScheduleController控制器和WmsAttendanceScheduleServiceImpl服务实现类中新增batchUpdateShiftByIds方法,支持通过主键ID列表批量更新排班记录的班次。新增BatchUpdateScheduleItemBo业务对象用于接收批量更新项,包含scheduleId和shiftId字段并进行非空校验。Controller层提供/batchUpdateShift端点,使用PUT请求并应用防重复提交和操作日志注解。Service层实现遍历列表并利用MyBatis-Plus的UpdateWrapper进行批量更新,确保事务一致性。
This commit is contained in:
2026-05-27 17:43:41 +08:00
parent d2f6086093
commit d0a15032f2
4 changed files with 49 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ import com.klp.domain.vo.WmsAttendanceScheduleVo;
import com.klp.domain.bo.WmsAttendanceScheduleBo;
import com.klp.domain.bo.GenerateScheduleBo;
import com.klp.domain.bo.BatchUpdateScheduleBo;
import com.klp.domain.bo.BatchUpdateScheduleItemBo;
import com.klp.service.IWmsAttendanceScheduleService;
import com.klp.common.core.page.TableDataInfo;
@@ -119,4 +120,15 @@ public class WmsAttendanceScheduleController extends BaseController {
iWmsAttendanceScheduleService.batchUpdateSchedule(bo);
return R.ok();
}
/**
* 批量修改排班班次(按主键)
*/
@Log(title = "排班班次批量修改", businessType = BusinessType.UPDATE)
@RepeatSubmit()
@PutMapping("/batchUpdateShift")
public R<Void> batchUpdateShiftByIds(@Validated @RequestBody List<BatchUpdateScheduleItemBo> list) {
iWmsAttendanceScheduleService.batchUpdateShiftByIds(list);
return R.ok();
}
}