|
|
|
|
@ -1,12 +1,7 @@
|
|
|
|
|
using ATS.NonCustodial.Application.Base; |
|
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Admins.AppDictionaries; |
|
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Admins.User; |
|
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Business.AppCaseManagements.AppCaseManagement; |
|
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Business.AppCaseManagements.AppCaseManagement.Input; |
|
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Business.AppCaseManagements.AppCaseManagement.Output; |
|
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Business.AppEarlyWarnings; |
|
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Business.AppEarlyWarnings.Output; |
|
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Business.IM.Notifies; |
|
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Business.ViolationStatistics; |
|
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Business.ViolationStatistics.Input; |
|
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Business.ViolationStatistics.Output; |
|
|
|
|
@ -21,13 +16,12 @@ using ATS.NonCustodial.Shared.Common.Dtos;
|
|
|
|
|
using ATS.NonCustodial.Shared.Common.UnifiedResults; |
|
|
|
|
using ATS.NonCustodial.Shared.Extensions; |
|
|
|
|
using ATS.NonCustodial.Shared.Extensions.Collection; |
|
|
|
|
using ATS.NonCustodial.Shared.Helpers; |
|
|
|
|
using AutoMapper.QueryableExtensions; |
|
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
|
using NPOI.SS.Formula.Functions; |
|
|
|
|
using StackExchange.Profiling.Internal; |
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
using static Microsoft.EntityFrameworkCore.DbLoggerCategory; |
|
|
|
|
using static System.Runtime.InteropServices.JavaScript.JSType; |
|
|
|
|
|
|
|
|
|
namespace ATS.NonCustodial.Application.Impl.Business |
|
|
|
|
{ |
|
|
|
|
@ -45,6 +39,7 @@ namespace ATS.NonCustodial.Application.Impl.Business
|
|
|
|
|
private readonly IAppDictionaryService _appDictionaryService; |
|
|
|
|
private readonly IEfRepository<AppEarlyWarning, long> _appEarlyWarningRepository; |
|
|
|
|
private readonly IUserService _userService; |
|
|
|
|
private readonly IEfRepository<AppCaseSupervisedPerson, long> _appSupervisedPersonRepository; |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// |
|
|
|
|
@ -61,7 +56,7 @@ namespace ATS.NonCustodial.Application.Impl.Business
|
|
|
|
|
IEfRepository<AppCaseManagement, long> appCaseManagementRepository, |
|
|
|
|
IEfRepository<AppCaseSupervisedPerson, long> appCaseSupervisedPersonRepository, |
|
|
|
|
IEfRepository<AppCaseSupervisor, long> appCaseSupervisorRepository |
|
|
|
|
):base(appCaseManagementRepository, |
|
|
|
|
) : base(appCaseManagementRepository, |
|
|
|
|
appCaseSupervisorRepository, |
|
|
|
|
appCaseSupervisedPersonRepository, |
|
|
|
|
userService, |
|
|
|
|
@ -72,6 +67,7 @@ namespace ATS.NonCustodial.Application.Impl.Business
|
|
|
|
|
_appDictionaryService = appDictionaryService; |
|
|
|
|
_appEarlyWarningRepository = appEarlyWarningRepository; |
|
|
|
|
_userService = userService; |
|
|
|
|
_appSupervisedPersonRepository = appCaseSupervisedPersonRepository; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#endregion Identity |
|
|
|
|
@ -110,18 +106,18 @@ namespace ATS.NonCustodial.Application.Impl.Business
|
|
|
|
|
//根据当前登录人查看其手里的案件被监管人 |
|
|
|
|
var spList = await base.GetCurrentUserCaseListAsync(); |
|
|
|
|
//获取案件信息 |
|
|
|
|
var casebaselist = await spList.Where(q => q.AppCaseManagement != null&& caseIdList.Contains(q.AppCaseManagement.Id)).Select(q => q.AppCaseManagement).ToListAsync(); |
|
|
|
|
var casebaselist = await spList.Where(q => q.AppCaseManagement != null && caseIdList.Contains(q.AppCaseManagement.Id)).Select(q => q.AppCaseManagement).ToListAsync(); |
|
|
|
|
//获取案件id |
|
|
|
|
var casebase = await spList |
|
|
|
|
.Where(q => q.AppCaseManagement != null && caseIdList.Contains(q.AppCaseManagement.Id)) |
|
|
|
|
.WhereIf(input.CaseProgress != null, a => a.AppCaseManagement.CaseProgress == input.CaseProgress).Select(q => q.AppCaseManagement.Id).ToListAsync(); |
|
|
|
|
var spIds = await spList.Where(q => q.AppCaseSupervisedPerson != null&& casebase.Contains(q.AppCaseSupervisedPerson.CaseId)).Select(w => w.AppCaseSupervisedPerson!.SupervisedPersonId).ToListAsync(); |
|
|
|
|
var spIds = await spList.Where(q => q.AppCaseSupervisedPerson != null && casebase.Contains(q.AppCaseSupervisedPerson.CaseId)).Select(w => w.AppCaseSupervisedPerson!.SupervisedPersonId).ToListAsync(); |
|
|
|
|
//查询记录 |
|
|
|
|
var query = await _appEarlyWarningRepository |
|
|
|
|
.AsQueryable(false, true).Where(q=> spIds.Contains(q.SupervisedPersonId)) |
|
|
|
|
.AsQueryable(false, true).Where(q => spIds.Contains(q.SupervisedPersonId)) |
|
|
|
|
.WhereIf(input.CaseId != default, a => a.CaseId == input.CaseId) |
|
|
|
|
.WhereIf(input.SupervisedPersonId != default, w => w.SupervisedPersonId == input.SupervisedPersonId) |
|
|
|
|
.WhereIf(input.SupervisedPersonName.HasValue(),w=>w.SupervisedPersonName.Contains(input.SupervisedPersonName)) |
|
|
|
|
.WhereIf(input.SupervisedPersonName.HasValue(), w => w.SupervisedPersonName.Contains(input.SupervisedPersonName)) |
|
|
|
|
.WhereIf(input.TimeSearch?.BeginTime != null && input.TimeSearch?.EndTime != null, q => q.CreatedTime >= input.TimeSearch.BeginTime && q.CreatedTime <= $"{input.TimeSearch.EndTime.Value.ToString("yyyy-MM-dd")} 23:59:59".ToDateTime()) |
|
|
|
|
.ToListAsync(); |
|
|
|
|
|
|
|
|
|
@ -141,7 +137,7 @@ namespace ATS.NonCustodial.Application.Impl.Business
|
|
|
|
|
{ |
|
|
|
|
CaseId = data.Key.CaseId, |
|
|
|
|
SupervisedPersonId = data.Key.SupervisedPersonId, |
|
|
|
|
CaseName = casebaselist.Where(q=>q.Id==data.Key.CaseId).First()?.Name, |
|
|
|
|
CaseName = casebaselist.Where(q => q.Id == data.Key.CaseId).First()?.Name, |
|
|
|
|
//data.Key.CaseName, |
|
|
|
|
SupervisedPersonName = data.Key.SupervisedPersonName, |
|
|
|
|
CaseProgress = casebaselist.Where(q => q.Id == data.Key.CaseId).First()?.CaseProgress, |
|
|
|
|
@ -157,7 +153,68 @@ namespace ATS.NonCustodial.Application.Impl.Business
|
|
|
|
|
|
|
|
|
|
return ResultOutput.Ok(pageResult); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// 违规记录统计导出 |
|
|
|
|
/// </summary> |
|
|
|
|
/// <returns></returns> |
|
|
|
|
[HttpPost] |
|
|
|
|
public async Task<IActionResult> ViolationStatisticsExportAsync(ViolationStatisticsPageInput input) |
|
|
|
|
{ |
|
|
|
|
//获取当前用户权限下的案件ids |
|
|
|
|
var limits = User.limits; |
|
|
|
|
var selectLimits = await _appCaseSupervisorRepository.AsQueryable(false, true) |
|
|
|
|
.Where(w => limits.Contains(w.UnitId.ToString())) |
|
|
|
|
.ToListAsync(); |
|
|
|
|
var caseIdList = selectLimits.Select(w => w.CaseId).Distinct().ToList(); |
|
|
|
|
//根据当前登录人查看其手里的案件被监管人 |
|
|
|
|
var spList = await base.GetCurrentUserCaseListAsync(); |
|
|
|
|
//获取案件信息 |
|
|
|
|
var casebaselist = await spList.Where(q => q.AppCaseManagement != null && caseIdList.Contains(q.AppCaseManagement.Id)).Select(q => q.AppCaseManagement).ToListAsync(); |
|
|
|
|
//获取案件id |
|
|
|
|
var casebase = await spList |
|
|
|
|
.Where(q => q.AppCaseManagement != null && caseIdList.Contains(q.AppCaseManagement.Id)) |
|
|
|
|
.WhereIf(input.CaseProgress != null, a => a.AppCaseManagement.CaseProgress == input.CaseProgress).Select(q => q.AppCaseManagement.Id).ToListAsync(); |
|
|
|
|
var spIds = await spList.Where(q => q.AppCaseSupervisedPerson != null && casebase.Contains(q.AppCaseSupervisedPerson.CaseId)).Select(w => w.AppCaseSupervisedPerson!.SupervisedPersonId).ToListAsync(); |
|
|
|
|
//查询记录 |
|
|
|
|
var query = await _appEarlyWarningRepository |
|
|
|
|
.AsQueryable(false, true).Where(q => spIds.Contains(q.SupervisedPersonId)) |
|
|
|
|
.WhereIf(input.CaseId != default, a => a.CaseId == input.CaseId) |
|
|
|
|
.WhereIf(input.SupervisedPersonId != default, w => w.SupervisedPersonId == input.SupervisedPersonId) |
|
|
|
|
.WhereIf(input.SupervisedPersonName.HasValue(), w => w.SupervisedPersonName.Contains(input.SupervisedPersonName)) |
|
|
|
|
.WhereIf(input.TimeSearch?.BeginTime != null && input.TimeSearch?.EndTime != null, q => q.CreatedTime >= input.TimeSearch.BeginTime && q.CreatedTime <= $"{input.TimeSearch.EndTime.Value.ToString("yyyy-MM-dd")} 23:59:59".ToDateTime()) |
|
|
|
|
.ToListAsync(); |
|
|
|
|
|
|
|
|
|
//分组 |
|
|
|
|
var dataGroup = query |
|
|
|
|
.GroupBy(w => new { w.CaseId, w.SupervisedPersonId, w.CaseName, w.SupervisedPersonName }); |
|
|
|
|
|
|
|
|
|
var pageData = dataGroup.Skip((input.PageIndex - 1) * input.PageSize) |
|
|
|
|
.Take(input.PageSize); |
|
|
|
|
//处理身份证字段 |
|
|
|
|
var userList = await _userService.GetAllByConditionAsync(new BatchIdsInput() |
|
|
|
|
{ |
|
|
|
|
Ids = pageData.Select(w => w.Key.SupervisedPersonId).ToList() |
|
|
|
|
}); |
|
|
|
|
//(0:待执行 1:侦查阶段 2:已结束,3:审查起诉阶段,4:审理阶段) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var dataList = pageData.Select(data => new ViolationStatisticsExportDto() |
|
|
|
|
{ |
|
|
|
|
CaseId = data.Key.CaseId, |
|
|
|
|
SupervisedPersonId = data.Key.SupervisedPersonId, |
|
|
|
|
CaseName = casebaselist.Where(q => q.Id == data.Key.CaseId).First()?.Name, |
|
|
|
|
//data.Key.CaseName, |
|
|
|
|
SupervisedPersonName = data.Key.SupervisedPersonName, |
|
|
|
|
CaseProgress = casebaselist.Where(q => q.Id == data.Key.CaseId).First()?.CaseProgress.ToDescription(), |
|
|
|
|
Violations = data.Count(), |
|
|
|
|
IdCard = userList.FirstOrDefault(w => w.Id == data.Key.SupervisedPersonId)?.IdCard |
|
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
|
|
var memorySystem = ExcelHelper.ToExcel(dataList); |
|
|
|
|
return new FileController().File(memorySystem.ToArray(), "application/ms-excel", DateTime.Now.ToString("f") + ".xlsx"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 违规人数分页查询 |
|
|
|
|
@ -172,12 +229,12 @@ namespace ATS.NonCustodial.Application.Impl.Business
|
|
|
|
|
var casebase = spList.Select(q => q.Id); |
|
|
|
|
//查询记录 |
|
|
|
|
var query = await _appEarlyWarningRepository |
|
|
|
|
.AsQueryable(false, true).Where(q => casebase.Contains(q.CaseId)&& !string.IsNullOrEmpty(q.Title)) |
|
|
|
|
.AsQueryable(false, true).Where(q => casebase.Contains(q.CaseId) && !string.IsNullOrEmpty(q.Title)) |
|
|
|
|
.WhereIf(input.CaseId != default, a => a.CaseId == input.CaseId) |
|
|
|
|
.WhereIf(input.Wglx != null, a => a.EarlyWarningTypeId == input.Wglx) |
|
|
|
|
.WhereIf(input.SupervisedPersonId != default, w => w.SupervisedPersonId == input.SupervisedPersonId) |
|
|
|
|
.WhereIf(input.TimeSearch?.BeginTime != null && input.TimeSearch?.EndTime != null, q => q.CreatedTime >= input.TimeSearch.BeginTime && q.CreatedTime <= $"{input.TimeSearch.EndTime.Value.ToString("yyyy-MM-dd")} 23:59:59".ToDateTime()) |
|
|
|
|
.OrderByDescending(q=>q.CreatedTime) |
|
|
|
|
.OrderByDescending(q => q.CreatedTime) |
|
|
|
|
.ToListAsync(); |
|
|
|
|
|
|
|
|
|
//分组 |
|
|
|
|
@ -199,9 +256,9 @@ namespace ATS.NonCustodial.Application.Impl.Business
|
|
|
|
|
//data.Key.CaseName, |
|
|
|
|
SupervisedPersonName = data.SupervisedPersonName, |
|
|
|
|
IdCard = userList.FirstOrDefault(w => w.Id == data.SupervisedPersonId)?.IdCard, |
|
|
|
|
Wgtime= data?.CreatedTime, |
|
|
|
|
Wgtime = data?.CreatedTime, |
|
|
|
|
Wglx = data?.Title, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
|
|
var pageResult = new PagedList<ViolationStatisticsListDto>() |
|
|
|
|
@ -225,14 +282,133 @@ namespace ATS.NonCustodial.Application.Impl.Business
|
|
|
|
|
var list = await _appEarlyWarningRepository |
|
|
|
|
.AsQueryable(false, true) |
|
|
|
|
.WhereIf(input.TimeSearch.BeginTime != null && input.TimeSearch.EndTime != null, q => q.CreatedTime >= input.TimeSearch.BeginTime && q.CreatedTime <= $"{input.TimeSearch.EndTime.Value.ToString("yyyy-MM-dd")} 23:59:59".ToDateTime()) |
|
|
|
|
.WhereIf(input.Wglx!=null, q=>q.EarlyWarningTypeId == input.Wglx) |
|
|
|
|
.WhereIf(input.Wglx != null, q => q.EarlyWarningTypeId == input.Wglx) |
|
|
|
|
.Where(q => caseIds.Contains(q.CaseId)).ToListAsync(); |
|
|
|
|
|
|
|
|
|
var geruplist = list.Where(q=>!string.IsNullOrEmpty(q.Title)).GroupBy(q => q.Title).Select(q => new { name = q.Key, value = q.Distinct((a, b) => a.SupervisedPersonId == b.SupervisedPersonId).Count() }); |
|
|
|
|
var count = geruplist.Sum(q=>q.value); |
|
|
|
|
return ResultOutput.Ok(new { count=count, data = geruplist,list= list.Distinct((a, b) => a.SupervisedPersonId == b.SupervisedPersonId&&a.Title == b.Title).ToList() }); |
|
|
|
|
var geruplist = list.Where(q => !string.IsNullOrEmpty(q.Title)).GroupBy(q => q.Title).Select(q => new { name = q.Key, value = q.Distinct((a, b) => a.SupervisedPersonId == b.SupervisedPersonId).Count() }); |
|
|
|
|
var count = geruplist.Sum(q => q.value); |
|
|
|
|
return ResultOutput.Ok(new { count = count, data = geruplist, list = list.Distinct((a, b) => a.SupervisedPersonId == b.SupervisedPersonId && a.Title == b.Title).ToList() }); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// 未打卡统计 |
|
|
|
|
/// </summary> |
|
|
|
|
/// <returns></returns> |
|
|
|
|
[HttpPost] |
|
|
|
|
public async Task<IResultOutput> NotClockedStatisticsPageAsync(NotClockedInput input) |
|
|
|
|
{ |
|
|
|
|
//获取当前用户权限下的案件ids |
|
|
|
|
var limits = User.limits; |
|
|
|
|
var selectLimits = await _appCaseSupervisorRepository.AsQueryable(false, true) |
|
|
|
|
.Where(w => limits.Contains(w.UnitId.ToString())) |
|
|
|
|
.ToListAsync(); |
|
|
|
|
var caseIdList = selectLimits.Select(w => w.CaseId).Distinct().ToList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var caseList = await _appCaseManagementRepository.AsQueryable(false, true) |
|
|
|
|
.Where(w => caseIdList.Contains(w.Id)) |
|
|
|
|
.WhereIf(input.CaseId.HasValue, w => w.Id == input.CaseId) |
|
|
|
|
.ToListAsync(); |
|
|
|
|
|
|
|
|
|
List<NotClockListDto> notClockList = new List<NotClockListDto>(); |
|
|
|
|
foreach (var item in caseList) |
|
|
|
|
{ |
|
|
|
|
if (item == null) continue; |
|
|
|
|
var caseType= await _appDictionaryService.GetDicByDicId(item.CaseTypeId); |
|
|
|
|
NotClockListDto notClockListDto = new NotClockListDto(); |
|
|
|
|
notClockListDto.Bmsah = item.Bmsah; |
|
|
|
|
notClockListDto.CaseId = item.Id; |
|
|
|
|
notClockListDto.CaseName = item.Name; |
|
|
|
|
notClockListDto.CreatedTime = item.CreatedTime; |
|
|
|
|
notClockListDto.CaseTypeName = caseType.Name; |
|
|
|
|
notClockListDto.SupervisionUnit = ""; |
|
|
|
|
//根据案件找到被监管 |
|
|
|
|
var supervisedPerson = await _appSupervisedPersonRepository |
|
|
|
|
.AsQueryable(false, true) |
|
|
|
|
.Where(w => w.CaseId == item.Id) |
|
|
|
|
.ToListAsync(); |
|
|
|
|
foreach (var person in supervisedPerson) |
|
|
|
|
{ |
|
|
|
|
notClockListDto.SupervisedPersonId = person.SupervisedPersonId; |
|
|
|
|
notClockListDto.SupervisedPersonName = person.SupervisedPersonName; |
|
|
|
|
var earlyList = await _appEarlyWarningRepository |
|
|
|
|
.AsQueryable(false, true) |
|
|
|
|
.Where(w => w.Title == "未打卡" && w.SupervisedPersonId == person.SupervisedPersonId |
|
|
|
|
&& w.CaseId == item.Id) |
|
|
|
|
.WhereIf(input.EndCreatedTime.HasValue, w => w.CreatedTime <= input.EndCreatedTime) |
|
|
|
|
.WhereIf(input.StartCreatedTime.HasValue, w => w.CreatedTime >= input.StartCreatedTime) |
|
|
|
|
.ToListAsync(); |
|
|
|
|
notClockListDto.NotClockedCount= earlyList.Count; |
|
|
|
|
notClockList.Add(notClockListDto); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ResultOutput.Ok(notClockList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 未打卡统计导出 |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="input"></param> |
|
|
|
|
/// <returns></returns> |
|
|
|
|
public async Task<IActionResult> NotClockedStatisticsExportAsync(NotClockedInput input) |
|
|
|
|
{ |
|
|
|
|
//获取当前用户权限下的案件ids |
|
|
|
|
var limits = User.limits; |
|
|
|
|
var selectLimits = await _appCaseSupervisorRepository.AsQueryable(false, true) |
|
|
|
|
.Where(w => limits.Contains(w.UnitId.ToString())) |
|
|
|
|
.ToListAsync(); |
|
|
|
|
var caseIdList = selectLimits.Select(w => w.CaseId).Distinct().ToList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var caseList = await _appCaseManagementRepository.AsQueryable(false, true) |
|
|
|
|
.Where(w => caseIdList.Contains(w.Id)) |
|
|
|
|
.WhereIf(input.CaseId.HasValue, w => w.Id == input.CaseId) |
|
|
|
|
.ToListAsync(); |
|
|
|
|
|
|
|
|
|
List<NotClockExportDto> notClockList = new List<NotClockExportDto>(); |
|
|
|
|
foreach (var item in caseList) |
|
|
|
|
{ |
|
|
|
|
if (item == null) continue; |
|
|
|
|
var caseType = await _appDictionaryService.GetDicByDicId(item.CaseTypeId); |
|
|
|
|
NotClockExportDto notClockListDto = new NotClockExportDto(); |
|
|
|
|
notClockListDto.Bmsah = item.Bmsah; |
|
|
|
|
notClockListDto.CaseId = item.Id; |
|
|
|
|
notClockListDto.CaseName = item.Name; |
|
|
|
|
notClockListDto.CreatedTime = item.CreatedTime; |
|
|
|
|
notClockListDto.CaseTypeName = caseType.Name; |
|
|
|
|
notClockListDto.SupervisionUnit = ""; |
|
|
|
|
//根据案件找到被监管 |
|
|
|
|
var supervisedPerson = await _appSupervisedPersonRepository |
|
|
|
|
.AsQueryable(false, true) |
|
|
|
|
.Where(w => w.CaseId == item.Id) |
|
|
|
|
.ToListAsync(); |
|
|
|
|
foreach (var person in supervisedPerson) |
|
|
|
|
{ |
|
|
|
|
notClockListDto.SupervisedPersonId = person.SupervisedPersonId; |
|
|
|
|
notClockListDto.SupervisedPersonName = person.SupervisedPersonName; |
|
|
|
|
var earlyList = await _appEarlyWarningRepository |
|
|
|
|
.AsQueryable(false, true) |
|
|
|
|
.Where(w => w.Title == "未打卡" && w.SupervisedPersonId == person.SupervisedPersonId |
|
|
|
|
&& w.CaseId == item.Id) |
|
|
|
|
.WhereIf(input.EndCreatedTime.HasValue, w => w.CreatedTime <= input.EndCreatedTime) |
|
|
|
|
.WhereIf(input.StartCreatedTime.HasValue, w => w.CreatedTime >= input.StartCreatedTime) |
|
|
|
|
.ToListAsync(); |
|
|
|
|
notClockListDto.NotClockedCount = earlyList.Count; |
|
|
|
|
notClockList.Add(notClockListDto); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
var memorySystem = ExcelHelper.ToExcel(notClockList); |
|
|
|
|
return new FileController().File(memorySystem.ToArray(), "application/ms-excel", DateTime.Now.ToString("f") + ".xlsx"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 添加违规记录 |
|
|
|
|
/// </summary> |
|
|
|
|
@ -240,4 +416,8 @@ namespace ATS.NonCustodial.Application.Impl.Business
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
public async Task<IResultOutput> AddAsync(AppViolationStatisticsAddInput input) => await base.AddAsync(input, _appViolationStatisticsRepository); |
|
|
|
|
} |
|
|
|
|
public class FileController : ControllerBase |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |