计算包括没有工作量的
parent
cbe70f5b4a
commit
c259dea6b2
|
@ -8,6 +8,8 @@ namespace IRaCIS.Application.ViewModels
|
||||||
public Guid DoctorId { get; set; }
|
public Guid DoctorId { get; set; }
|
||||||
public string YearMonth { get; set; }
|
public string YearMonth { get; set; }
|
||||||
public bool IsLock { get; set; }
|
public bool IsLock { get; set; }
|
||||||
|
|
||||||
|
public int DataFrom { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DoctorPrice
|
public class DoctorPrice
|
||||||
|
|
|
@ -12,6 +12,7 @@ using System.Linq;
|
||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using IRaCIS.Core.Domain.Interfaces;
|
using IRaCIS.Core.Domain.Interfaces;
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
|
using System.Data;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -36,6 +37,7 @@ namespace IRaCIS.Application.Services
|
||||||
ITrialRepository trialRepository,
|
ITrialRepository trialRepository,
|
||||||
IDoctorRepository doctorRepository,
|
IDoctorRepository doctorRepository,
|
||||||
IWorkloadRepository workloadRepository,
|
IWorkloadRepository workloadRepository,
|
||||||
|
IDoctorRepository doctorRepository,
|
||||||
IRankPriceRepository rankPriceRepository,
|
IRankPriceRepository rankPriceRepository,
|
||||||
IPaymentDetailRepository paymentDetailRepository,
|
IPaymentDetailRepository paymentDetailRepository,
|
||||||
IVolumeRewardService volumeRewardService,
|
IVolumeRewardService volumeRewardService,
|
||||||
|
@ -893,7 +895,8 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
Expression<Func<Payment, bool>> calculateLambda = u => !u.IsLock;
|
Expression<Func<Payment, bool>> calculateLambda = u => !u.IsLock;
|
||||||
|
|
||||||
Expression<Func<Workload, bool>> workloadLambda = u => u.IsLock==false && u.DataFrom==(int)WorkLoadFromStatus.FinalConfirm;
|
// u => u.IsLock==false && u.DataFrom==(int)WorkLoadFromStatus.FinalConfirm;
|
||||||
|
Expression<Func<Workload, bool>> workloadLambda = x=>true;
|
||||||
if (reviewerId != Guid.Empty)
|
if (reviewerId != Guid.Empty)
|
||||||
{
|
{
|
||||||
calculateLambda = calculateLambda.And(u => u.DoctorId == reviewerId);
|
calculateLambda = calculateLambda.And(u => u.DoctorId == reviewerId);
|
||||||
|
@ -910,8 +913,29 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
DoctorId = x.DoctorId,
|
DoctorId = x.DoctorId,
|
||||||
YearMonth = x.YearMonth,
|
YearMonth = x.YearMonth,
|
||||||
IsLock = x.IsLock
|
IsLock = x.IsLock,
|
||||||
|
DataFrom=x.DataFrom,
|
||||||
}).Distinct().ToList();
|
}).Distinct().ToList();
|
||||||
|
var doctor = _doctorRepository.GetAll().Select(x => x.Id).ToList();
|
||||||
|
|
||||||
|
doctor.ForEach(x =>
|
||||||
|
{
|
||||||
|
|
||||||
|
if (!workloadlist.Any(y => y.DoctorId == x))
|
||||||
|
{
|
||||||
|
workloadlist.Add(new CalculateNeededDTO()
|
||||||
|
{
|
||||||
|
DoctorId = x,
|
||||||
|
IsLock = false,
|
||||||
|
YearMonth = yearMonth,
|
||||||
|
|
||||||
|
DataFrom= (int)WorkLoadFromStatus.FinalConfirm
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
workloadlist= workloadlist.Where(u=>u.IsLock == false && u.DataFrom == (int)WorkLoadFromStatus.FinalConfirm).Distinct().ToList();
|
||||||
|
|
||||||
return workloadlist;
|
return workloadlist;
|
||||||
// return _paymentRepository.Find(calculateLambda).ProjectTo<CalculateNeededDTO>(_mapper.ConfigurationProvider).ToList();
|
// return _paymentRepository.Find(calculateLambda).ProjectTo<CalculateNeededDTO>(_mapper.ConfigurationProvider).ToList();
|
||||||
|
|
Loading…
Reference in New Issue