From 792a15c15a4cfa0e3ed7e2d71c49afc5802f8127 Mon Sep 17 00:00:00 2001 From: “wangming” <“wangming@antissoft.com”> Date: Thu, 16 Oct 2025 18:41:51 +0800 Subject: [PATCH] feat: 新增按月份删除考勤汇总数据的接口 --- netcore/src/Modularity/Extend/NCC.Extend/LqAttendanceSummaryService.cs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/netcore/src/Modularity/Extend/NCC.Extend/LqAttendanceSummaryService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqAttendanceSummaryService.cs index 8c56b8d..26fac40 100644 --- a/netcore/src/Modularity/Extend/NCC.Extend/LqAttendanceSummaryService.cs +++ b/netcore/src/Modularity/Extend/NCC.Extend/LqAttendanceSummaryService.cs @@ -325,6 +325,7 @@ namespace NCC.Extend .WhereIF(input.Year.HasValue, a => a.Year == input.Year) .WhereIF(input.Month.HasValue, a => a.Month == input.Month) .WhereIF(input.EmployeeStatus.HasValue, a => a.EmployeeStatus == input.EmployeeStatus) + .Select(a => new LqAttendanceSummaryListOutput { id = a.Id, @@ -353,7 +354,26 @@ namespace NCC.Extend #endregion #region 清空某一个月的数据 - + /// + /// 清空某一个月的数据 + /// + /// 年份 + /// 月份 + /// + [HttpDelete("DeleteByMonth/{year}/{month}")] + public async Task DeleteByMonth(string year, string month) + { + int yearInt = int.Parse(year); + int monthInt = int.Parse(month); + await _db.Deleteable().Where(p => p.Year == yearInt && p.Month == monthInt).ExecuteCommandAsync(); + return new + { + success = true, + message = "清空成功" + }; + } #endregion + + } } -- libgit2 0.21.4