|
|
|
|
@ -7,7 +7,6 @@ using ATS.NonCustodial.Application.Contracts.Interfaces.Business.AppBusinessAppl
|
|
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Business.AppBusinessApplications.Output; |
|
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Business.AppCaseManagements.AppCaseManagement; |
|
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Business.Apps.Output; |
|
|
|
|
using ATS.NonCustodial.Application.Impl.Admins; |
|
|
|
|
using ATS.NonCustodial.Application.Impl.Business.IM; |
|
|
|
|
using ATS.NonCustodial.Domain.Entities.Admins; |
|
|
|
|
using ATS.NonCustodial.Domain.Entities.Business; |
|
|
|
|
@ -26,8 +25,6 @@ using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Microsoft.AspNetCore.SignalR; |
|
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
|
using Newtonsoft.Json; |
|
|
|
|
using NPOI.SS.Formula.Functions; |
|
|
|
|
using System.Linq; |
|
|
|
|
using Yitter.IdGenerator; |
|
|
|
|
|
|
|
|
|
namespace ATS.NonCustodial.Application.Impl.Business |
|
|
|
|
@ -117,8 +114,17 @@ namespace ATS.NonCustodial.Application.Impl.Business
|
|
|
|
|
var caseIdList = selectLimits.Select(w => w.CaseId).Distinct().ToList(); |
|
|
|
|
|
|
|
|
|
var express = await GetExpression(input, _appBusinessApplicationRepository.AsQueryable(false, true)); |
|
|
|
|
express = express.Where(w => caseIdList.Contains(w.CaseId)); |
|
|
|
|
var rtn = await base.GetPageAsync<AppBusinessApplication, AppBusinessApplicationGetPageInput, AppBusinessApplicationListDto>(input, express); |
|
|
|
|
rtn.Data = rtn.Data.Where(w => caseIdList.Contains(w.CaseId)).ToList(); |
|
|
|
|
//rtn.Data = rtn.Data.Where(w => caseIdList.Contains(w.CaseId)).ToList(); |
|
|
|
|
foreach (var item in rtn.Data) |
|
|
|
|
{ |
|
|
|
|
if (item.EndSupervisionDate.HasValue) |
|
|
|
|
{ |
|
|
|
|
item.ActiveTimePeriodBegin = null; |
|
|
|
|
item.ActiveTimePeriodEnd = null; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return ResultOutput.Ok(rtn); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -143,12 +149,12 @@ namespace ATS.NonCustodial.Application.Impl.Business
|
|
|
|
|
var grudlist = express |
|
|
|
|
.WhereIf(input.supname.NotNull(), q => q.SupervisedPersonName.Contains(input.supname)) |
|
|
|
|
.GroupBy(q => new { q.CaseId, q.SupervisedPersonId, q.SupervisedPersonName }).Select(q => new { q.Key.SupervisedPersonName, q.Key.CaseId, Count = q.ToList().Count }).ToList(); |
|
|
|
|
var grulist =from a in grudlist.ToList() |
|
|
|
|
var grulist = from a in grudlist.ToList() |
|
|
|
|
join b in spList.Select(q => q.AppCaseManagement).ToList() on a.CaseId equals b.Id |
|
|
|
|
select new { a.SupervisedPersonName, a.Count, a.CaseId, b.Name }; |
|
|
|
|
var resultList = grulist.Distinct().Where(p => caseIds.Contains(p.CaseId)); |
|
|
|
|
var pagegrulist = resultList.Skip((input.PageIndex - 1) * input.PageSize).Take(input.PageSize).ToList(); |
|
|
|
|
return ResultOutput.Ok(new { TotalCount = resultList.Count(), grudlist= pagegrulist }); |
|
|
|
|
return ResultOutput.Ok(new { TotalCount = resultList.Count(), grudlist = pagegrulist }); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
@ -352,7 +358,7 @@ namespace ATS.NonCustodial.Application.Impl.Business
|
|
|
|
|
//根据当前登录人查看其手里的案件被监管人 |
|
|
|
|
var spList = await base.GetCurrentUserCaseListAsync(); |
|
|
|
|
|
|
|
|
|
var spIds = await spList.Where(q=>q.AppCaseSupervisedPerson!=null).Select(w => w.AppCaseSupervisedPerson!.SupervisedPersonId).ToListAsync(); |
|
|
|
|
var spIds = await spList.Where(q => q.AppCaseSupervisedPerson != null).Select(w => w.AppCaseSupervisedPerson!.SupervisedPersonId).ToListAsync(); |
|
|
|
|
|
|
|
|
|
query = query |
|
|
|
|
.Where(w => spIds.Contains(w.SupervisedPersonId)) |
|
|
|
|
|