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 + + } }