修改一版
parent
0157ecde51
commit
5bf8004298
|
@ -63,6 +63,8 @@ namespace IRaCIS.Application.ViewModels
|
||||||
public decimal AdjudicationIn48HPrice { get; set; }
|
public decimal AdjudicationIn48HPrice { get; set; }
|
||||||
public decimal GlobalPrice { get; set; }
|
public decimal GlobalPrice { get; set; }
|
||||||
public decimal TrainingPrice { get; set; }
|
public decimal TrainingPrice { get; set; }
|
||||||
|
|
||||||
|
public bool IsNewTrial { get; set; }
|
||||||
public decimal DowntimePrice { get; set; }
|
public decimal DowntimePrice { get; set; }
|
||||||
public decimal RefresherTrainingPrice { get; set; }
|
public decimal RefresherTrainingPrice { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,10 +127,10 @@ namespace IRaCIS.Application.Services
|
||||||
public IResponseOutput CalculateMonthlyPayment(CalculateDoctorAndMonthDTO param, string token)
|
public IResponseOutput CalculateMonthlyPayment(CalculateDoctorAndMonthDTO param, string token)
|
||||||
{
|
{
|
||||||
var yearMonth = param.CalculateMonth.ToString("yyyy-MM");
|
var yearMonth = param.CalculateMonth.ToString("yyyy-MM");
|
||||||
var rate = _exchangeRateRepository.FindSingleOrDefault(u => u.YearMonth == yearMonth);
|
var rate = _exchangeRateRepository.FindSingleOrDefault(u => u.YearMonth == yearMonth);
|
||||||
|
|
||||||
decimal exchangeRate = rate?.Rate ?? 0;
|
decimal exchangeRate = rate?.Rate ?? 0;
|
||||||
|
IResponseOutput<Guid> result = null;
|
||||||
var workLoadAndPayPriceList = GetFinalConfirmedWorkloadAndPayPriceList(param);
|
var workLoadAndPayPriceList = GetFinalConfirmedWorkloadAndPayPriceList(param);
|
||||||
var volumeRewardPriceList = _volumeRewardPriceService.GetVolumeRewardPriceList();
|
var volumeRewardPriceList = _volumeRewardPriceService.GetVolumeRewardPriceList();
|
||||||
|
|
||||||
|
@ -155,34 +155,6 @@ namespace IRaCIS.Application.Services
|
||||||
List<PaymentViewModel> paymentList = new List<PaymentViewModel>();
|
List<PaymentViewModel> paymentList = new List<PaymentViewModel>();
|
||||||
List<ReviewerPaymentUSD> reviewerPaymentUSDList = new List<ReviewerPaymentUSD>();
|
List<ReviewerPaymentUSD> reviewerPaymentUSDList = new List<ReviewerPaymentUSD>();
|
||||||
|
|
||||||
// 获取所有医生费用 一次从数据库里面全部取出来
|
|
||||||
|
|
||||||
var allDoctorList = workLoadAndPayPriceList.Where(x => param.NeedCalculateReviewers.Contains(x.DoctorId)).ToList();
|
|
||||||
var allDoctorIds = allDoctorList.Select(x => x.DoctorId).Distinct().ToList();
|
|
||||||
var listTrialId = allDoctorList.Select(x => x.TrialId).Distinct().ToList();
|
|
||||||
|
|
||||||
var trialDoctorlist = (from enroll in _enrollRepository.GetAll().Where(x => listTrialId.Contains(x.TrialId) || allDoctorIds.Contains(x.DoctorId))
|
|
||||||
join price in _trialPaymentRepository.GetAll() on enroll.TrialId equals price.TrialId
|
|
||||||
select new DoctorPrice()
|
|
||||||
{
|
|
||||||
IsNewTrial = price.IsNewTrial,
|
|
||||||
AdjustmentMultiple = enroll.AdjustmentMultiple,
|
|
||||||
TrialId = enroll.TrialId,
|
|
||||||
DoctorId = enroll.DoctorId,
|
|
||||||
Training = enroll.Training,
|
|
||||||
Adjudication = enroll.Adjudication,
|
|
||||||
Adjudication24H = enroll.Adjudication24H,
|
|
||||||
Adjudication48H = enroll.Adjudication48H,
|
|
||||||
Downtime = enroll.Downtime,
|
|
||||||
Global = enroll.Global,
|
|
||||||
RefresherTraining = enroll.RefresherTraining,
|
|
||||||
Timepoint = enroll.Timepoint,
|
|
||||||
Timepoint24H = enroll.Timepoint24H,
|
|
||||||
Timepoint48H = enroll.Timepoint48H,
|
|
||||||
}).ToList();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach (var doctor in param.NeedCalculateReviewers)
|
foreach (var doctor in param.NeedCalculateReviewers)
|
||||||
{
|
{
|
||||||
if (_paymentRepository.GetAll().Any(u => u.DoctorId == doctor && u.YearMonth == yearMonth && u.IsLock))
|
if (_paymentRepository.GetAll().Any(u => u.DoctorId == doctor && u.YearMonth == yearMonth && u.IsLock))
|
||||||
|
@ -200,233 +172,449 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
int codeOrder = 0;
|
int codeOrder = 0;
|
||||||
|
|
||||||
//这里需要改
|
|
||||||
|
|
||||||
foreach (var item in doctorWorkloadAndPayPriceList)
|
foreach (var item in doctorWorkloadAndPayPriceList)
|
||||||
{
|
{
|
||||||
var doctordata = trialDoctorlist.Where(x => x.IsNewTrial ?? false && x.Training == item.Training && x.DoctorId == item.DoctorId).FirstOrDefault();
|
|
||||||
|
|
||||||
if (doctordata != null)
|
if (item.IsNewTrial)
|
||||||
{
|
{
|
||||||
item.Training = doctordata.Training ?? 0;
|
|
||||||
item.Adjudication = doctordata.Adjudication ?? 0;
|
var newPrice = _enrollRepository.GetAll().Where(x => x.TrialId == item.TrialId && x.DoctorId == item.DoctorId).FirstOrDefault();
|
||||||
item.AdjudicationIn24H = doctordata.Adjudication24H ?? 0;
|
|
||||||
item.AdjudicationIn48H = doctordata.Adjudication48H ?? 0;
|
if (newPrice != null)
|
||||||
item.Downtime = doctordata.Downtime ?? 0;
|
{
|
||||||
item.Global = doctordata.Global ?? 0;
|
item.TrainingPrice = newPrice.Training ?? 0;
|
||||||
item.RefresherTraining = doctordata.RefresherTraining ?? 0;
|
item.AdjudicationPrice = newPrice.Adjudication ?? 0;
|
||||||
item.Timepoint = doctordata.Timepoint ?? 0;
|
item.AdjudicationIn24HPrice = newPrice.Adjudication24H ?? 0;
|
||||||
item.TimepointIn24H = doctordata.Timepoint24H ?? 0;
|
item.AdjudicationIn48HPrice = newPrice.Adjudication48H ?? 0;
|
||||||
item.TimepointIn48H = doctordata.Timepoint48H ?? 0;
|
item.DowntimePrice = newPrice.Downtime ?? 0;
|
||||||
item.PersonalAdditional = 0;
|
item.GlobalPrice = newPrice.Global ?? 0;
|
||||||
|
item.RefresherTrainingPrice = newPrice.RefresherTraining ?? 0;
|
||||||
|
item.TimepointPrice = newPrice.Timepoint ?? 0;
|
||||||
|
item.TimepointIn24HPrice = newPrice.Timepoint24H ?? 0;
|
||||||
|
item.TimepointIn48HPrice = newPrice.Timepoint48H ?? 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
++codeOrder;
|
||||||
|
readCount += (item.Timepoint + item.TimepointIn24H + item.TimepointIn48H
|
||||||
|
+ item.Adjudication + item.AdjudicationIn24H + item.AdjudicationIn48H);
|
||||||
|
|
||||||
|
decimal trainingTotal = item.Training * item.TrainingPrice;
|
||||||
|
decimal refresherTrainingTotal = item.RefresherTraining * item.RefresherTrainingPrice;
|
||||||
|
decimal downtimeTotal = item.Downtime * item.DowntimePrice;
|
||||||
|
decimal globalTotal = item.Global * (item.GlobalPrice);
|
||||||
|
|
||||||
|
//项目如果没有添加附加数据 默认为0
|
||||||
|
decimal timePointTotal = item.Timepoint * item.TimepointPrice;
|
||||||
|
|
||||||
|
decimal timePointIn24HTotal = item.TimepointIn24H * item.TimepointIn24HPrice;
|
||||||
|
decimal timePointIn48HTotal = item.TimepointIn48H * item.TimepointIn48HPrice;
|
||||||
|
decimal adjudicationTotal = item.Adjudication * item.AdjudicationPrice;
|
||||||
|
decimal adjudicationIn24HTotal = item.AdjudicationIn24H * item.AdjudicationIn24HPrice;
|
||||||
|
decimal adjudicationIn48HTotal = item.AdjudicationIn48H * item.AdjudicationIn48HPrice;
|
||||||
|
|
||||||
|
totalNormal += (trainingTotal + refresherTrainingTotal + downtimeTotal + globalTotal + timePointTotal + timePointIn24HTotal
|
||||||
|
+ timePointIn48HTotal + adjudicationTotal + adjudicationIn24HTotal + adjudicationIn48HTotal);
|
||||||
|
|
||||||
|
#region 统计明细信息
|
||||||
|
|
||||||
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
|
{
|
||||||
|
TrialCode = item.TrialCode,
|
||||||
|
PaymentType = "Training",
|
||||||
|
Count = item.Training,
|
||||||
|
BasePrice = item.TrainingPrice,
|
||||||
|
PersonalAdditional = 0,
|
||||||
|
TrialAdditional = 0,
|
||||||
|
PaymentId = Guid.Empty,
|
||||||
|
DoctorId = item.DoctorId,
|
||||||
|
TrialId = item.TrialId,
|
||||||
|
ShowTypeOrder = 1,
|
||||||
|
ShowCodeOrder = codeOrder,
|
||||||
|
ExchangeRate = exchangeRate,
|
||||||
|
YearMonth = yearMonth,
|
||||||
|
PaymentUSD = item.Training * item.TrainingPrice,
|
||||||
|
PaymentCNY = item.Training * item.TrainingPrice * exchangeRate
|
||||||
|
});
|
||||||
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
|
{
|
||||||
|
TrialCode = item.TrialCode,
|
||||||
|
PaymentType = "Refresher Training",
|
||||||
|
Count = item.RefresherTraining,
|
||||||
|
BasePrice = item.RefresherTrainingPrice,
|
||||||
|
PersonalAdditional = 0,
|
||||||
|
TrialAdditional = 0,
|
||||||
|
PaymentId = Guid.Empty,
|
||||||
|
DoctorId = item.DoctorId,
|
||||||
|
TrialId = item.TrialId,
|
||||||
|
ShowTypeOrder = 2,
|
||||||
|
ShowCodeOrder = codeOrder,
|
||||||
|
ExchangeRate = exchangeRate,
|
||||||
|
YearMonth = yearMonth,
|
||||||
|
PaymentUSD = item.RefresherTraining * item.RefresherTrainingPrice,
|
||||||
|
PaymentCNY = item.RefresherTraining * item.RefresherTrainingPrice * exchangeRate
|
||||||
|
});
|
||||||
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
|
{
|
||||||
|
TrialCode = item.TrialCode,
|
||||||
|
PaymentType = "Downtime",
|
||||||
|
Count = item.Downtime,
|
||||||
|
BasePrice = item.DowntimePrice,
|
||||||
|
PersonalAdditional = 0,
|
||||||
|
TrialAdditional = 0,
|
||||||
|
PaymentId = Guid.Empty,
|
||||||
|
DoctorId = item.DoctorId,
|
||||||
|
TrialId = item.TrialId,
|
||||||
|
ShowTypeOrder = 3,
|
||||||
|
ShowCodeOrder = codeOrder,
|
||||||
|
ExchangeRate = exchangeRate,
|
||||||
|
YearMonth = yearMonth,
|
||||||
|
PaymentUSD = item.Downtime * item.DowntimePrice,
|
||||||
|
PaymentCNY = item.Downtime * item.DowntimePrice * exchangeRate
|
||||||
|
});
|
||||||
|
|
||||||
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
|
{
|
||||||
|
TrialCode = item.TrialCode,
|
||||||
|
PaymentType = "Timepoint Regular",
|
||||||
|
Count = item.Timepoint,
|
||||||
|
BasePrice = item.TimepointPrice,
|
||||||
|
PersonalAdditional = item.PersonalAdditional,
|
||||||
|
TrialAdditional = item.TimepointPrice * (item.AdjustmentMultiple - 1) + (item.TrialAdditional == null ? 0 : (decimal)item.TrialAdditional),
|
||||||
|
PaymentId = Guid.Empty,
|
||||||
|
DoctorId = item.DoctorId,
|
||||||
|
TrialId = item.TrialId,
|
||||||
|
ShowTypeOrder = 4,
|
||||||
|
ShowCodeOrder = codeOrder,
|
||||||
|
ExchangeRate = exchangeRate,
|
||||||
|
YearMonth = yearMonth,
|
||||||
|
PaymentUSD = item.Timepoint * item.TimepointPrice,
|
||||||
|
PaymentCNY = item.Timepoint * item.TimepointPrice * exchangeRate
|
||||||
|
});
|
||||||
|
|
||||||
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
|
{
|
||||||
|
TrialCode = item.TrialCode,
|
||||||
|
PaymentType = "Timepoint 48-Hour",
|
||||||
|
Count = item.TimepointIn48H,
|
||||||
|
BasePrice = item.TimepointIn48HPrice,
|
||||||
|
PersonalAdditional = item.PersonalAdditional,
|
||||||
|
TrialAdditional = item.TimepointIn48HPrice * (item.AdjustmentMultiple - 1) + 0,//48小时不加项目附加
|
||||||
|
PaymentId = Guid.Empty,
|
||||||
|
DoctorId = item.DoctorId,
|
||||||
|
TrialId = item.TrialId,
|
||||||
|
ShowTypeOrder = 5,
|
||||||
|
ShowCodeOrder = codeOrder,
|
||||||
|
ExchangeRate = exchangeRate,
|
||||||
|
YearMonth = yearMonth,
|
||||||
|
PaymentUSD = item.TimepointIn48H * item.TimepointIn48HPrice,
|
||||||
|
PaymentCNY = item.TimepointIn48H * item.TimepointIn48HPrice * exchangeRate
|
||||||
|
});
|
||||||
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
|
{
|
||||||
|
TrialCode = item.TrialCode,
|
||||||
|
PaymentType = "Timepoint 24-Hour",
|
||||||
|
Count = item.TimepointIn24H,
|
||||||
|
BasePrice = item.TimepointIn24HPrice,
|
||||||
|
PersonalAdditional = item.PersonalAdditional,
|
||||||
|
TrialAdditional = item.TimepointIn24HPrice * (item.AdjustmentMultiple - 1) + 0,
|
||||||
|
PaymentId = Guid.Empty,
|
||||||
|
DoctorId = item.DoctorId,
|
||||||
|
TrialId = item.TrialId,
|
||||||
|
ShowTypeOrder = 6,
|
||||||
|
ShowCodeOrder = codeOrder,
|
||||||
|
ExchangeRate = exchangeRate,
|
||||||
|
YearMonth = yearMonth,
|
||||||
|
PaymentUSD = item.TimepointIn24H * item.TimepointIn24HPrice,
|
||||||
|
PaymentCNY = item.TimepointIn24H * item.TimepointIn24HPrice * exchangeRate
|
||||||
|
});
|
||||||
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
|
{
|
||||||
|
TrialCode = item.TrialCode,
|
||||||
|
PaymentType = "Adjudication Regular",
|
||||||
|
Count = item.Adjudication,
|
||||||
|
BasePrice = item.AdjudicationPrice,
|
||||||
|
PersonalAdditional = item.PersonalAdditional,
|
||||||
|
TrialAdditional = item.AdjudicationPrice * (item.AdjustmentMultiple - 1) + (item.TrialAdditional == null ? 0 : (decimal)item.TrialAdditional),
|
||||||
|
PaymentId = Guid.Empty,
|
||||||
|
DoctorId = item.DoctorId,
|
||||||
|
TrialId = item.TrialId,
|
||||||
|
ShowTypeOrder = 7,
|
||||||
|
ShowCodeOrder = codeOrder,
|
||||||
|
ExchangeRate = exchangeRate,
|
||||||
|
YearMonth = yearMonth,
|
||||||
|
PaymentUSD = item.Adjudication * item.AdjudicationPrice,
|
||||||
|
PaymentCNY = item.Adjudication * item.AdjudicationPrice * exchangeRate
|
||||||
|
});
|
||||||
|
|
||||||
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
|
{
|
||||||
|
TrialCode = item.TrialCode,
|
||||||
|
PaymentType = "Adjudication 48-Hour",
|
||||||
|
Count = item.AdjudicationIn48H,
|
||||||
|
BasePrice = item.AdjudicationIn48HPrice,
|
||||||
|
PersonalAdditional = item.PersonalAdditional,
|
||||||
|
TrialAdditional = item.AdjudicationIn48HPrice * (item.AdjustmentMultiple - 1) + 0,
|
||||||
|
PaymentId = Guid.Empty,
|
||||||
|
DoctorId = item.DoctorId,
|
||||||
|
TrialId = item.TrialId,
|
||||||
|
ShowTypeOrder = 8,
|
||||||
|
ShowCodeOrder = codeOrder,
|
||||||
|
ExchangeRate = exchangeRate,
|
||||||
|
YearMonth = yearMonth,
|
||||||
|
PaymentUSD = item.AdjudicationIn48H * item.AdjudicationIn48HPrice,
|
||||||
|
PaymentCNY = item.AdjudicationIn48H * item.AdjudicationIn48HPrice * exchangeRate
|
||||||
|
});
|
||||||
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
|
{
|
||||||
|
TrialCode = item.TrialCode,
|
||||||
|
PaymentType = "Adjudication 24-Hour",
|
||||||
|
Count = item.AdjudicationIn24H,
|
||||||
|
BasePrice = item.AdjudicationIn24HPrice,
|
||||||
|
PersonalAdditional = item.PersonalAdditional,
|
||||||
|
TrialAdditional = item.AdjudicationIn24HPrice * (item.AdjustmentMultiple - 1) + 0,
|
||||||
|
PaymentId = Guid.Empty,
|
||||||
|
DoctorId = item.DoctorId,
|
||||||
|
TrialId = item.TrialId,
|
||||||
|
ShowTypeOrder = 9,
|
||||||
|
ShowCodeOrder = codeOrder,
|
||||||
|
ExchangeRate = exchangeRate,
|
||||||
|
YearMonth = yearMonth,
|
||||||
|
PaymentUSD = item.AdjudicationIn24H * item.AdjudicationIn24HPrice,
|
||||||
|
PaymentCNY = item.AdjudicationIn24H * item.AdjudicationIn24HPrice * exchangeRate
|
||||||
|
});
|
||||||
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
|
{
|
||||||
|
TrialCode = item.TrialCode,
|
||||||
|
PaymentType = "Global",
|
||||||
|
Count = item.Global,
|
||||||
|
BasePrice = item.TimepointPrice / 2,//item.GlobalPrice,
|
||||||
|
PersonalAdditional = item.PersonalAdditional / 2,
|
||||||
|
TrialAdditional = 0,
|
||||||
|
PaymentId = Guid.Empty,
|
||||||
|
DoctorId = item.DoctorId,
|
||||||
|
TrialId = item.TrialId,
|
||||||
|
ShowTypeOrder = 10,
|
||||||
|
ShowCodeOrder = codeOrder,
|
||||||
|
ExchangeRate = exchangeRate,
|
||||||
|
YearMonth = yearMonth,
|
||||||
|
PaymentUSD = item.Global * item.GlobalPrice,
|
||||||
|
PaymentCNY = item.Global * item.GlobalPrice * exchangeRate
|
||||||
|
});
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
++codeOrder;
|
else
|
||||||
readCount += (item.Timepoint + item.TimepointIn24H + item.TimepointIn48H
|
{
|
||||||
+ item.Adjudication + item.AdjudicationIn24H + item.AdjudicationIn48H);
|
|
||||||
decimal trainingTotal = item.Training * item.TrainingPrice;
|
|
||||||
decimal refresherTrainingTotal = item.RefresherTraining * item.RefresherTrainingPrice;
|
|
||||||
decimal downtimeTotal = item.Downtime * item.DowntimePrice;
|
|
||||||
//规则定义 global 的价格是Tp和个人附加的一半
|
|
||||||
decimal globalTotal = item.Global * (item.TimepointPrice / 2 + item.PersonalAdditional / 2);
|
|
||||||
|
|
||||||
//项目如果没有添加附加数据 默认为0
|
++codeOrder;
|
||||||
decimal timePointTotal = item.Timepoint * (item.TimepointPrice * item.AdjustmentMultiple + item.PersonalAdditional + (item.TrialAdditional == null ? 0 : (decimal)item.TrialAdditional));
|
readCount += (item.Timepoint + item.TimepointIn24H + item.TimepointIn48H
|
||||||
|
+ item.Adjudication + item.AdjudicationIn24H + item.AdjudicationIn48H);
|
||||||
|
decimal trainingTotal = item.Training * item.TrainingPrice;
|
||||||
|
decimal refresherTrainingTotal = item.RefresherTraining * item.RefresherTrainingPrice;
|
||||||
|
decimal downtimeTotal = item.Downtime * item.DowntimePrice;
|
||||||
|
//规则定义 global 的价格是Tp和个人附加的一半
|
||||||
|
decimal globalTotal = item.Global * (item.TimepointPrice / 2 + item.PersonalAdditional / 2);
|
||||||
|
|
||||||
decimal timePointIn24HTotal = item.TimepointIn24H * (item.TimepointIn24HPrice * item.AdjustmentMultiple + item.PersonalAdditional);
|
//项目如果没有添加附加数据 默认为0
|
||||||
decimal timePointIn48HTotal = item.TimepointIn48H * (item.TimepointIn48HPrice * item.AdjustmentMultiple + item.PersonalAdditional);
|
decimal timePointTotal = item.Timepoint * (item.TimepointPrice * item.AdjustmentMultiple + item.PersonalAdditional + (item.TrialAdditional == null ? 0 : (decimal)item.TrialAdditional));
|
||||||
decimal adjudicationTotal = item.Adjudication * (item.AdjudicationPrice * item.AdjustmentMultiple + item.PersonalAdditional + (item.TrialAdditional == null ? 0 : (decimal)item.TrialAdditional));
|
|
||||||
decimal adjudicationIn24HTotal = item.AdjudicationIn24H * (item.AdjudicationIn24HPrice * item.AdjustmentMultiple + item.PersonalAdditional);
|
|
||||||
decimal adjudicationIn48HTotal = item.AdjudicationIn48H * (item.AdjudicationIn48HPrice * item.AdjustmentMultiple + item.PersonalAdditional);
|
|
||||||
|
|
||||||
totalNormal += (trainingTotal + refresherTrainingTotal + downtimeTotal + globalTotal + timePointTotal + timePointIn24HTotal
|
decimal timePointIn24HTotal = item.TimepointIn24H * (item.TimepointIn24HPrice * item.AdjustmentMultiple + item.PersonalAdditional);
|
||||||
+ timePointIn48HTotal + adjudicationTotal + adjudicationIn24HTotal + adjudicationIn48HTotal);
|
decimal timePointIn48HTotal = item.TimepointIn48H * (item.TimepointIn48HPrice * item.AdjustmentMultiple + item.PersonalAdditional);
|
||||||
|
decimal adjudicationTotal = item.Adjudication * (item.AdjudicationPrice * item.AdjustmentMultiple + item.PersonalAdditional + (item.TrialAdditional == null ? 0 : (decimal)item.TrialAdditional));
|
||||||
|
decimal adjudicationIn24HTotal = item.AdjudicationIn24H * (item.AdjudicationIn24HPrice * item.AdjustmentMultiple + item.PersonalAdditional);
|
||||||
|
decimal adjudicationIn48HTotal = item.AdjudicationIn48H * (item.AdjudicationIn48HPrice * item.AdjustmentMultiple + item.PersonalAdditional);
|
||||||
|
|
||||||
#region 统计明细信息
|
totalNormal += (trainingTotal + refresherTrainingTotal + downtimeTotal + globalTotal + timePointTotal + timePointIn24HTotal
|
||||||
|
+ timePointIn48HTotal + adjudicationTotal + adjudicationIn24HTotal + adjudicationIn48HTotal);
|
||||||
|
|
||||||
paymentDetailList.Add(new PaymentDetailCommand
|
#region 统计明细信息
|
||||||
{
|
|
||||||
TrialCode = item.TrialCode,
|
|
||||||
PaymentType = "Training",
|
|
||||||
Count = item.Training,
|
|
||||||
BasePrice = item.TrainingPrice,
|
|
||||||
PersonalAdditional = 0,
|
|
||||||
TrialAdditional = 0,
|
|
||||||
PaymentId = Guid.Empty,
|
|
||||||
DoctorId = item.DoctorId,
|
|
||||||
TrialId = item.TrialId,
|
|
||||||
ShowTypeOrder = 1,
|
|
||||||
ShowCodeOrder = codeOrder,
|
|
||||||
ExchangeRate = exchangeRate,
|
|
||||||
YearMonth = yearMonth,
|
|
||||||
PaymentUSD = item.Training * item.TrainingPrice,
|
|
||||||
PaymentCNY = item.Training * item.TrainingPrice * exchangeRate
|
|
||||||
});
|
|
||||||
paymentDetailList.Add(new PaymentDetailCommand
|
|
||||||
{
|
|
||||||
TrialCode = item.TrialCode,
|
|
||||||
PaymentType = "Refresher Training",
|
|
||||||
Count = item.RefresherTraining,
|
|
||||||
BasePrice = item.RefresherTrainingPrice,
|
|
||||||
PersonalAdditional = 0,
|
|
||||||
TrialAdditional = 0,
|
|
||||||
PaymentId = Guid.Empty,
|
|
||||||
DoctorId = item.DoctorId,
|
|
||||||
TrialId = item.TrialId,
|
|
||||||
ShowTypeOrder = 2,
|
|
||||||
ShowCodeOrder = codeOrder,
|
|
||||||
ExchangeRate = exchangeRate,
|
|
||||||
YearMonth = yearMonth,
|
|
||||||
PaymentUSD = item.RefresherTraining * item.RefresherTrainingPrice,
|
|
||||||
PaymentCNY = item.RefresherTraining * item.RefresherTrainingPrice * exchangeRate
|
|
||||||
});
|
|
||||||
paymentDetailList.Add(new PaymentDetailCommand
|
|
||||||
{
|
|
||||||
TrialCode = item.TrialCode,
|
|
||||||
PaymentType = "Downtime",
|
|
||||||
Count = item.Downtime,
|
|
||||||
BasePrice = item.DowntimePrice,
|
|
||||||
PersonalAdditional = 0,
|
|
||||||
TrialAdditional = 0,
|
|
||||||
PaymentId = Guid.Empty,
|
|
||||||
DoctorId = item.DoctorId,
|
|
||||||
TrialId = item.TrialId,
|
|
||||||
ShowTypeOrder = 3,
|
|
||||||
ShowCodeOrder = codeOrder,
|
|
||||||
ExchangeRate = exchangeRate,
|
|
||||||
YearMonth = yearMonth,
|
|
||||||
PaymentUSD = item.Downtime * item.DowntimePrice,
|
|
||||||
PaymentCNY = item.Downtime * item.DowntimePrice * exchangeRate
|
|
||||||
});
|
|
||||||
|
|
||||||
paymentDetailList.Add(new PaymentDetailCommand
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
{
|
{
|
||||||
TrialCode = item.TrialCode,
|
TrialCode = item.TrialCode,
|
||||||
PaymentType = "Timepoint Regular",
|
PaymentType = "Training",
|
||||||
Count = item.Timepoint,
|
Count = item.Training,
|
||||||
BasePrice = item.TimepointPrice,
|
BasePrice = item.TrainingPrice,
|
||||||
PersonalAdditional = doctordata != null ? 0 : item.PersonalAdditional,
|
PersonalAdditional = 0,
|
||||||
TrialAdditional = doctordata != null ? 0 : item.TimepointPrice * (item.AdjustmentMultiple - 1) + (item.TrialAdditional == null ? 0 : (decimal)item.TrialAdditional),
|
TrialAdditional = 0,
|
||||||
PaymentId = Guid.Empty,
|
PaymentId = Guid.Empty,
|
||||||
DoctorId = item.DoctorId,
|
DoctorId = item.DoctorId,
|
||||||
TrialId = item.TrialId,
|
TrialId = item.TrialId,
|
||||||
ShowTypeOrder = 4,
|
ShowTypeOrder = 1,
|
||||||
ShowCodeOrder = codeOrder,
|
ShowCodeOrder = codeOrder,
|
||||||
ExchangeRate = exchangeRate,
|
ExchangeRate = exchangeRate,
|
||||||
YearMonth = yearMonth,
|
YearMonth = yearMonth,
|
||||||
PaymentUSD = item.Timepoint * (item.TimepointPrice * item.AdjustmentMultiple + item.PersonalAdditional + (item.TrialAdditional == null ? 0 : (decimal)item.TrialAdditional)),
|
PaymentUSD = item.Training * item.TrainingPrice,
|
||||||
PaymentCNY = item.Timepoint * (item.TimepointPrice * item.AdjustmentMultiple + item.PersonalAdditional + (item.TrialAdditional == null ? 0 : (decimal)item.TrialAdditional)) * exchangeRate
|
PaymentCNY = item.Training * item.TrainingPrice * exchangeRate
|
||||||
});
|
});
|
||||||
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
|
{
|
||||||
|
TrialCode = item.TrialCode,
|
||||||
|
PaymentType = "Refresher Training",
|
||||||
|
Count = item.RefresherTraining,
|
||||||
|
BasePrice = item.RefresherTrainingPrice,
|
||||||
|
PersonalAdditional = 0,
|
||||||
|
TrialAdditional = 0,
|
||||||
|
PaymentId = Guid.Empty,
|
||||||
|
DoctorId = item.DoctorId,
|
||||||
|
TrialId = item.TrialId,
|
||||||
|
ShowTypeOrder = 2,
|
||||||
|
ShowCodeOrder = codeOrder,
|
||||||
|
ExchangeRate = exchangeRate,
|
||||||
|
YearMonth = yearMonth,
|
||||||
|
PaymentUSD = item.RefresherTraining * item.RefresherTrainingPrice,
|
||||||
|
PaymentCNY = item.RefresherTraining * item.RefresherTrainingPrice * exchangeRate
|
||||||
|
});
|
||||||
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
|
{
|
||||||
|
TrialCode = item.TrialCode,
|
||||||
|
PaymentType = "Downtime",
|
||||||
|
Count = item.Downtime,
|
||||||
|
BasePrice = item.DowntimePrice,
|
||||||
|
PersonalAdditional = 0,
|
||||||
|
TrialAdditional = 0,
|
||||||
|
PaymentId = Guid.Empty,
|
||||||
|
DoctorId = item.DoctorId,
|
||||||
|
TrialId = item.TrialId,
|
||||||
|
ShowTypeOrder = 3,
|
||||||
|
ShowCodeOrder = codeOrder,
|
||||||
|
ExchangeRate = exchangeRate,
|
||||||
|
YearMonth = yearMonth,
|
||||||
|
PaymentUSD = item.Downtime * item.DowntimePrice,
|
||||||
|
PaymentCNY = item.Downtime * item.DowntimePrice * exchangeRate
|
||||||
|
});
|
||||||
|
|
||||||
paymentDetailList.Add(new PaymentDetailCommand
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
{
|
{
|
||||||
TrialCode = item.TrialCode,
|
TrialCode = item.TrialCode,
|
||||||
PaymentType = "Timepoint 48-Hour",
|
PaymentType = "Timepoint Regular",
|
||||||
Count = item.TimepointIn48H,
|
Count = item.Timepoint,
|
||||||
BasePrice = item.TimepointIn48HPrice,
|
BasePrice = item.TimepointPrice,
|
||||||
PersonalAdditional = doctordata != null ? 0 : item.PersonalAdditional,
|
PersonalAdditional = item.PersonalAdditional,
|
||||||
TrialAdditional = doctordata != null ? 0 : item.TimepointIn48HPrice * (item.AdjustmentMultiple - 1) + 0,//48小时不加项目附加
|
TrialAdditional = item.TimepointPrice * (item.AdjustmentMultiple - 1) + (item.TrialAdditional == null ? 0 : (decimal)item.TrialAdditional),
|
||||||
PaymentId = Guid.Empty,
|
PaymentId = Guid.Empty,
|
||||||
DoctorId = item.DoctorId,
|
DoctorId = item.DoctorId,
|
||||||
TrialId = item.TrialId,
|
TrialId = item.TrialId,
|
||||||
ShowTypeOrder = 5,
|
ShowTypeOrder = 4,
|
||||||
ShowCodeOrder = codeOrder,
|
ShowCodeOrder = codeOrder,
|
||||||
ExchangeRate = exchangeRate,
|
ExchangeRate = exchangeRate,
|
||||||
YearMonth = yearMonth,
|
YearMonth = yearMonth,
|
||||||
PaymentUSD = item.TimepointIn48H * (item.TimepointIn48HPrice * item.AdjustmentMultiple + 0 + item.PersonalAdditional),
|
PaymentUSD = item.Timepoint * (item.TimepointPrice * item.AdjustmentMultiple + item.PersonalAdditional + (item.TrialAdditional == null ? 0 : (decimal)item.TrialAdditional)),
|
||||||
PaymentCNY = item.TimepointIn48H * (item.TimepointIn48HPrice * item.AdjustmentMultiple + 0 + item.PersonalAdditional) * exchangeRate
|
PaymentCNY = item.Timepoint * (item.TimepointPrice * item.AdjustmentMultiple + item.PersonalAdditional + (item.TrialAdditional == null ? 0 : (decimal)item.TrialAdditional)) * exchangeRate
|
||||||
});
|
});
|
||||||
paymentDetailList.Add(new PaymentDetailCommand
|
|
||||||
{
|
|
||||||
TrialCode = item.TrialCode,
|
|
||||||
PaymentType = "Timepoint 24-Hour",
|
|
||||||
Count = item.TimepointIn24H,
|
|
||||||
BasePrice = item.TimepointIn24HPrice,
|
|
||||||
PersonalAdditional = doctordata != null ? 0 : item.PersonalAdditional,
|
|
||||||
TrialAdditional = doctordata != null ? 0 : item.TimepointIn24HPrice * (item.AdjustmentMultiple - 1) + 0,
|
|
||||||
PaymentId = Guid.Empty,
|
|
||||||
DoctorId = item.DoctorId,
|
|
||||||
TrialId = item.TrialId,
|
|
||||||
ShowTypeOrder = 6,
|
|
||||||
ShowCodeOrder = codeOrder,
|
|
||||||
ExchangeRate = exchangeRate,
|
|
||||||
YearMonth = yearMonth,
|
|
||||||
PaymentUSD = item.TimepointIn24H * (item.TimepointIn24HPrice * item.AdjustmentMultiple + 0 + item.PersonalAdditional),
|
|
||||||
PaymentCNY = item.TimepointIn24H * (item.TimepointIn24HPrice * item.AdjustmentMultiple + 0 + item.PersonalAdditional) * exchangeRate
|
|
||||||
});
|
|
||||||
paymentDetailList.Add(new PaymentDetailCommand
|
|
||||||
{
|
|
||||||
TrialCode = item.TrialCode,
|
|
||||||
PaymentType = "Adjudication Regular",
|
|
||||||
Count = item.Adjudication,
|
|
||||||
BasePrice = item.AdjudicationPrice,
|
|
||||||
PersonalAdditional = doctordata != null ? 0 : item.PersonalAdditional,
|
|
||||||
TrialAdditional = doctordata != null ? 0 : item.AdjudicationPrice * (item.AdjustmentMultiple - 1) + (item.TrialAdditional == null ? 0 : (decimal)item.TrialAdditional),
|
|
||||||
PaymentId = Guid.Empty,
|
|
||||||
DoctorId = item.DoctorId,
|
|
||||||
TrialId = item.TrialId,
|
|
||||||
ShowTypeOrder = 7,
|
|
||||||
ShowCodeOrder = codeOrder,
|
|
||||||
ExchangeRate = exchangeRate,
|
|
||||||
YearMonth = yearMonth,
|
|
||||||
PaymentUSD = item.Adjudication * (item.AdjudicationPrice * item.AdjustmentMultiple + item.PersonalAdditional + (item.TrialAdditional == null ? 0 : (decimal)item.TrialAdditional)),
|
|
||||||
PaymentCNY = item.Adjudication * (item.AdjudicationPrice * item.AdjustmentMultiple + item.PersonalAdditional + (item.TrialAdditional == null ? 0 : (decimal)item.TrialAdditional)) * exchangeRate
|
|
||||||
});
|
|
||||||
|
|
||||||
paymentDetailList.Add(new PaymentDetailCommand
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
{
|
{
|
||||||
TrialCode = item.TrialCode,
|
TrialCode = item.TrialCode,
|
||||||
PaymentType = "Adjudication 48-Hour",
|
PaymentType = "Timepoint 48-Hour",
|
||||||
Count = item.AdjudicationIn48H,
|
Count = item.TimepointIn48H,
|
||||||
BasePrice = item.AdjudicationIn48HPrice,
|
BasePrice = item.TimepointIn48HPrice,
|
||||||
PersonalAdditional = doctordata != null ? 0 : item.PersonalAdditional,
|
PersonalAdditional = item.PersonalAdditional,
|
||||||
TrialAdditional = doctordata != null ? 0 : item.AdjudicationIn48HPrice * (item.AdjustmentMultiple - 1) + 0,
|
TrialAdditional = item.TimepointIn48HPrice * (item.AdjustmentMultiple - 1) + 0,//48小时不加项目附加
|
||||||
PaymentId = Guid.Empty,
|
PaymentId = Guid.Empty,
|
||||||
DoctorId = item.DoctorId,
|
DoctorId = item.DoctorId,
|
||||||
TrialId = item.TrialId,
|
TrialId = item.TrialId,
|
||||||
ShowTypeOrder = 8,
|
ShowTypeOrder = 5,
|
||||||
ShowCodeOrder = codeOrder,
|
ShowCodeOrder = codeOrder,
|
||||||
ExchangeRate = exchangeRate,
|
ExchangeRate = exchangeRate,
|
||||||
YearMonth = yearMonth,
|
YearMonth = yearMonth,
|
||||||
PaymentUSD = item.AdjudicationIn48H * (item.AdjudicationIn48HPrice * item.AdjustmentMultiple + item.PersonalAdditional + 0),
|
PaymentUSD = item.TimepointIn48H * (item.TimepointIn48HPrice * item.AdjustmentMultiple + 0 + item.PersonalAdditional),
|
||||||
PaymentCNY = item.AdjudicationIn48H * (item.AdjudicationIn48HPrice * item.AdjustmentMultiple + item.PersonalAdditional + 0) * exchangeRate
|
PaymentCNY = item.TimepointIn48H * (item.TimepointIn48HPrice * item.AdjustmentMultiple + 0 + item.PersonalAdditional) * exchangeRate
|
||||||
});
|
});
|
||||||
paymentDetailList.Add(new PaymentDetailCommand
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
{
|
{
|
||||||
TrialCode = item.TrialCode,
|
TrialCode = item.TrialCode,
|
||||||
PaymentType = "Adjudication 24-Hour",
|
PaymentType = "Timepoint 24-Hour",
|
||||||
Count = item.AdjudicationIn24H,
|
Count = item.TimepointIn24H,
|
||||||
BasePrice = item.AdjudicationIn24HPrice,
|
BasePrice = item.TimepointIn24HPrice,
|
||||||
PersonalAdditional = doctordata != null ? 0 : item.PersonalAdditional,
|
PersonalAdditional = item.PersonalAdditional,
|
||||||
TrialAdditional = doctordata != null ? 0 : item.AdjudicationIn24HPrice * (item.AdjustmentMultiple - 1) + 0,
|
TrialAdditional = item.TimepointIn24HPrice * (item.AdjustmentMultiple - 1) + 0,
|
||||||
PaymentId = Guid.Empty,
|
PaymentId = Guid.Empty,
|
||||||
DoctorId = item.DoctorId,
|
DoctorId = item.DoctorId,
|
||||||
TrialId = item.TrialId,
|
TrialId = item.TrialId,
|
||||||
ShowTypeOrder = 9,
|
ShowTypeOrder = 6,
|
||||||
ShowCodeOrder = codeOrder,
|
ShowCodeOrder = codeOrder,
|
||||||
ExchangeRate = exchangeRate,
|
ExchangeRate = exchangeRate,
|
||||||
YearMonth = yearMonth,
|
YearMonth = yearMonth,
|
||||||
PaymentUSD = item.AdjudicationIn24H * (item.AdjudicationIn24HPrice * item.AdjustmentMultiple + 0 + item.PersonalAdditional),
|
PaymentUSD = item.TimepointIn24H * (item.TimepointIn24HPrice * item.AdjustmentMultiple + 0 + item.PersonalAdditional),
|
||||||
PaymentCNY = item.AdjudicationIn24H * (item.AdjudicationIn24HPrice * item.AdjustmentMultiple + 0 + item.PersonalAdditional) * exchangeRate
|
PaymentCNY = item.TimepointIn24H * (item.TimepointIn24HPrice * item.AdjustmentMultiple + 0 + item.PersonalAdditional) * exchangeRate
|
||||||
});
|
});
|
||||||
paymentDetailList.Add(new PaymentDetailCommand
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
{
|
{
|
||||||
TrialCode = item.TrialCode,
|
TrialCode = item.TrialCode,
|
||||||
PaymentType = "Global",
|
PaymentType = "Adjudication Regular",
|
||||||
Count = item.Global,
|
Count = item.Adjudication,
|
||||||
BasePrice = item.TimepointPrice / 2,//item.GlobalPrice,
|
BasePrice = item.AdjudicationPrice,
|
||||||
PersonalAdditional = doctordata != null ? 0 : item.PersonalAdditional / 2,
|
PersonalAdditional = item.PersonalAdditional,
|
||||||
TrialAdditional = 0,
|
TrialAdditional = item.AdjudicationPrice * (item.AdjustmentMultiple - 1) + (item.TrialAdditional == null ? 0 : (decimal)item.TrialAdditional),
|
||||||
PaymentId = Guid.Empty,
|
PaymentId = Guid.Empty,
|
||||||
DoctorId = item.DoctorId,
|
DoctorId = item.DoctorId,
|
||||||
TrialId = item.TrialId,
|
TrialId = item.TrialId,
|
||||||
ShowTypeOrder = 10,
|
ShowTypeOrder = 7,
|
||||||
ShowCodeOrder = codeOrder,
|
ShowCodeOrder = codeOrder,
|
||||||
ExchangeRate = exchangeRate,
|
ExchangeRate = exchangeRate,
|
||||||
YearMonth = yearMonth,
|
YearMonth = yearMonth,
|
||||||
PaymentUSD = item.Global * (item.TimepointPrice / 2 + item.PersonalAdditional / 2),
|
PaymentUSD = item.Adjudication * (item.AdjudicationPrice * item.AdjustmentMultiple + item.PersonalAdditional + (item.TrialAdditional == null ? 0 : (decimal)item.TrialAdditional)),
|
||||||
PaymentCNY = item.Global * (item.TimepointPrice / 2 + item.PersonalAdditional / 2) * exchangeRate
|
PaymentCNY = item.Adjudication * (item.AdjudicationPrice * item.AdjustmentMultiple + item.PersonalAdditional + (item.TrialAdditional == null ? 0 : (decimal)item.TrialAdditional)) * exchangeRate
|
||||||
});
|
});
|
||||||
#endregion
|
|
||||||
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
|
{
|
||||||
|
TrialCode = item.TrialCode,
|
||||||
|
PaymentType = "Adjudication 48-Hour",
|
||||||
|
Count = item.AdjudicationIn48H,
|
||||||
|
BasePrice = item.AdjudicationIn48HPrice,
|
||||||
|
PersonalAdditional = item.PersonalAdditional,
|
||||||
|
TrialAdditional = item.AdjudicationIn48HPrice * (item.AdjustmentMultiple - 1) + 0,
|
||||||
|
PaymentId = Guid.Empty,
|
||||||
|
DoctorId = item.DoctorId,
|
||||||
|
TrialId = item.TrialId,
|
||||||
|
ShowTypeOrder = 8,
|
||||||
|
ShowCodeOrder = codeOrder,
|
||||||
|
ExchangeRate = exchangeRate,
|
||||||
|
YearMonth = yearMonth,
|
||||||
|
PaymentUSD = item.AdjudicationIn48H * (item.AdjudicationIn48HPrice * item.AdjustmentMultiple + item.PersonalAdditional + 0),
|
||||||
|
PaymentCNY = item.AdjudicationIn48H * (item.AdjudicationIn48HPrice * item.AdjustmentMultiple + item.PersonalAdditional + 0) * exchangeRate
|
||||||
|
});
|
||||||
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
|
{
|
||||||
|
TrialCode = item.TrialCode,
|
||||||
|
PaymentType = "Adjudication 24-Hour",
|
||||||
|
Count = item.AdjudicationIn24H,
|
||||||
|
BasePrice = item.AdjudicationIn24HPrice,
|
||||||
|
PersonalAdditional = item.PersonalAdditional,
|
||||||
|
TrialAdditional = item.AdjudicationIn24HPrice * (item.AdjustmentMultiple - 1) + 0,
|
||||||
|
PaymentId = Guid.Empty,
|
||||||
|
DoctorId = item.DoctorId,
|
||||||
|
TrialId = item.TrialId,
|
||||||
|
ShowTypeOrder = 9,
|
||||||
|
ShowCodeOrder = codeOrder,
|
||||||
|
ExchangeRate = exchangeRate,
|
||||||
|
YearMonth = yearMonth,
|
||||||
|
PaymentUSD = item.AdjudicationIn24H * (item.AdjudicationIn24HPrice * item.AdjustmentMultiple + 0 + item.PersonalAdditional),
|
||||||
|
PaymentCNY = item.AdjudicationIn24H * (item.AdjudicationIn24HPrice * item.AdjustmentMultiple + 0 + item.PersonalAdditional) * exchangeRate
|
||||||
|
});
|
||||||
|
paymentDetailList.Add(new PaymentDetailCommand
|
||||||
|
{
|
||||||
|
TrialCode = item.TrialCode,
|
||||||
|
PaymentType = "Global",
|
||||||
|
Count = item.Global,
|
||||||
|
BasePrice = item.TimepointPrice / 2,//item.GlobalPrice,
|
||||||
|
PersonalAdditional = item.PersonalAdditional / 2,
|
||||||
|
TrialAdditional = 0,
|
||||||
|
PaymentId = Guid.Empty,
|
||||||
|
DoctorId = item.DoctorId,
|
||||||
|
TrialId = item.TrialId,
|
||||||
|
ShowTypeOrder = 10,
|
||||||
|
ShowCodeOrder = codeOrder,
|
||||||
|
ExchangeRate = exchangeRate,
|
||||||
|
YearMonth = yearMonth,
|
||||||
|
PaymentUSD = item.Global * (item.TimepointPrice / 2 + item.PersonalAdditional / 2),
|
||||||
|
PaymentCNY = item.Global * (item.TimepointPrice / 2 + item.PersonalAdditional / 2) * exchangeRate
|
||||||
|
});
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int typeOrder = 0;
|
int typeOrder = 0;
|
||||||
|
@ -493,7 +681,7 @@ namespace IRaCIS.Application.Services
|
||||||
BasePrice = awardItem.Price,
|
BasePrice = awardItem.Price,
|
||||||
PersonalAdditional = 0,
|
PersonalAdditional = 0,
|
||||||
TrialAdditional = 0,
|
TrialAdditional = 0,
|
||||||
PaymentId = Guid.Empty,
|
PaymentId = Guid.Empty,//result.Data,
|
||||||
DoctorId = doctor,
|
DoctorId = doctor,
|
||||||
TrialId = Guid.Empty,
|
TrialId = Guid.Empty,
|
||||||
ShowTypeOrder = typeOrder,
|
ShowTypeOrder = typeOrder,
|
||||||
|
@ -546,7 +734,7 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
decimal totalUSD = award + totalNormal;//总费用
|
decimal totalUSD = award + totalNormal;//总费用
|
||||||
|
|
||||||
var result = AddOrUpdateMonthlyPayment(new PaymentCommand
|
result = AddOrUpdateMonthlyPayment(new PaymentCommand
|
||||||
{
|
{
|
||||||
DoctorId = doctor,
|
DoctorId = doctor,
|
||||||
Year = param.CalculateMonth.Year,
|
Year = param.CalculateMonth.Year,
|
||||||
|
@ -562,14 +750,6 @@ namespace IRaCIS.Application.Services
|
||||||
reviewerPaymentUSDList.Add(new ReviewerPaymentUSD { DoctorId = doctor, PaymentUSD = totalUSD, RecordId = result.Data });
|
reviewerPaymentUSDList.Add(new ReviewerPaymentUSD { DoctorId = doctor, PaymentUSD = totalUSD, RecordId = result.Data });
|
||||||
foreach (var detail in paymentDetailList)
|
foreach (var detail in paymentDetailList)
|
||||||
{
|
{
|
||||||
//var data = trialDoctorlist.FirstOrDefault(x => x.DoctorId == detail.DoctorId && x.TrialId == detail.TrialId && x.IsNewTrial == true && (x.AdjustmentMultiple??0) != 0);
|
|
||||||
//if (data != null)
|
|
||||||
//{
|
|
||||||
// detail.BasePrice = data.AdjustmentMultiple??0;
|
|
||||||
// detail.PersonalAdditional = 0;
|
|
||||||
// detail.TrialAdditional = 0;
|
|
||||||
//}
|
|
||||||
|
|
||||||
detail.PaymentId = result.Data;
|
detail.PaymentId = result.Data;
|
||||||
}
|
}
|
||||||
AddOrUpdateMonthlyPaymentDetail(paymentDetailList, result.Data);
|
AddOrUpdateMonthlyPaymentDetail(paymentDetailList, result.Data);
|
||||||
|
|
|
@ -106,7 +106,7 @@ namespace IRaCIS.Application.Services.Pay
|
||||||
var trialinfo = this._trialRepository.GetAll().Select(x => new
|
var trialinfo = this._trialRepository.GetAll().Select(x => new
|
||||||
{
|
{
|
||||||
TrialId = x.Id,
|
TrialId = x.Id,
|
||||||
Names = x.EnrollList.Select(y => y.Doctor).Select(y => y.ChineseName).ToList()
|
Names = x.EnrollList.Select(y => y.Doctor).Select(x=>x.ChineseName).ToList()
|
||||||
|
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ namespace IRaCIS.Application.Services.Pay
|
||||||
|
|
||||||
var list = data.Skip((queryParam.PageIndex - 1) * queryParam.PageSize).Take(queryParam.PageSize).ToList();
|
var list = data.Skip((queryParam.PageIndex - 1) * queryParam.PageSize).Take(queryParam.PageSize).ToList();
|
||||||
list.ForEach(x => {
|
list.ForEach(x => {
|
||||||
x.DoctorsNames = string.Join(",", trialinfo.Where(y => y.TrialId == x.TrialId).Select(y => y.Names).ToList());
|
x.DoctorsNames = string.Join(",", trialinfo.Where(y => y.TrialId == x.TrialId).SelectMany(y => y.Names).ToList());
|
||||||
});
|
});
|
||||||
|
|
||||||
return new PageOutput<TrialPaymentPriceDTO>(queryParam.PageIndex,
|
return new PageOutput<TrialPaymentPriceDTO>(queryParam.PageIndex,
|
||||||
|
|
Loading…
Reference in New Issue