添加自定义费用字段

master
he 2026-01-21 10:03:24 +08:00
parent 7d1dabc1f1
commit 53cb7e302c
12 changed files with 310 additions and 17 deletions

View File

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using IRaCIS.Core.Application.Contracts.RequestAndResponse; using IRaCIS.Core.Application.Contracts.RequestAndResponse;
using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Domain.Share;
@ -174,7 +174,10 @@ namespace IRaCIS.Application.ViewModels
public decimal? Downtime { get; set; } public decimal? Downtime { get; set; }
public decimal? AdditionalCharge1 { get; set; }
public decimal? AdditionalCharge2 { get; set; }
public decimal? AdditionalCharge3 { get; set; }
public string Note { get; set; }
} }
public class EnrollViewModel public class EnrollViewModel
@ -218,6 +221,11 @@ namespace IRaCIS.Application.ViewModels
public decimal? Downtime { get; set; } public decimal? Downtime { get; set; }
public decimal? AdditionalCharge1 { get; set; }
public decimal? AdditionalCharge2 { get; set; }
public decimal? AdditionalCharge3 { get; set; }
public string Note { get; set; }
public string ReviewerCode { get; set; } = string.Empty; public string ReviewerCode { get; set; } = string.Empty;
public string Code { get; set; } public string Code { get; set; }

View File

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
@ -67,6 +67,10 @@ namespace IRaCIS.Application.ViewModels
public bool IsNewTrial { 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; }
public decimal AdditionalCharge1Price { get; set; }
public decimal AdditionalCharge2Price { get; set; }
public decimal AdditionalCharge3Price { get; set; }
} }
/// <summary> /// <summary>
@ -103,6 +107,10 @@ namespace IRaCIS.Application.ViewModels
public int Global { get; set; } public int Global { get; set; }
public decimal RefresherTraining { get; set; } public decimal RefresherTraining { get; set; }
public decimal AdditionalCharge1 { get; set; }
public decimal AdditionalCharge2 { get; set; }
public decimal AdditionalCharge3 { get; set; }
public string Note { get; set; }
} }
@ -215,6 +223,10 @@ namespace IRaCIS.Application.ViewModels
public decimal RefresherTraining { get; set; } public decimal RefresherTraining { get; set; }
public decimal AdditionalCharge1 { get; set; }
public decimal AdditionalCharge2 { get; set; }
public decimal AdditionalCharge3 { get; set; }
} }

View File

@ -1,4 +1,4 @@
using System; using System;
using IRaCIS.Core.Application.Contracts.RequestAndResponse; using IRaCIS.Core.Application.Contracts.RequestAndResponse;
namespace IRaCIS.Application.ViewModels namespace IRaCIS.Application.ViewModels
@ -18,6 +18,10 @@ namespace IRaCIS.Application.ViewModels
public decimal Global { get; set; } public decimal Global { get; set; }
public decimal Training { get; set; } public decimal Training { get; set; }
public decimal Downtime { get; set; } public decimal Downtime { get; set; }
public decimal AdditionalCharge1 { get; set; }
public decimal AdditionalCharge2 { get; set; }
public decimal AdditionalCharge3 { get; set; }
public string Note { get; set; }
} }
public class TrialRevenuesPriceDetialDTO : TrialRevenuesPriceDTO public class TrialRevenuesPriceDetialDTO : TrialRevenuesPriceDTO

View File

@ -1,4 +1,4 @@
using AutoMapper; using AutoMapper;
using AutoMapper.QueryableExtensions; using AutoMapper.QueryableExtensions;
using IRaCIS.Application.ExpressionExtend; using IRaCIS.Application.ExpressionExtend;
using IRaCIS.Application.Interfaces; using IRaCIS.Application.Interfaces;
@ -186,6 +186,10 @@ namespace IRaCIS.Application.Services
Code = dociorc.Code, Code = dociorc.Code,
ReviewerCode = dociorc.Code, ReviewerCode = dociorc.Code,
Downtime = enroll.Downtime, Downtime = enroll.Downtime,
AdditionalCharge1 = enroll.AdditionalCharge1,
AdditionalCharge2 = enroll.AdditionalCharge2,
AdditionalCharge3 = enroll.AdditionalCharge3,
Note = enroll.Note,
}; };

View File

@ -1,4 +1,4 @@
using AutoMapper; using AutoMapper;
using AutoMapper.QueryableExtensions; using AutoMapper.QueryableExtensions;
using IRaCIS.Application.Interfaces; using IRaCIS.Application.Interfaces;
using IRaCIS.Application.ViewModels; using IRaCIS.Application.ViewModels;
@ -106,6 +106,10 @@ namespace IRaCIS.Application.Services
Training = workLoad.Training, Training = workLoad.Training,
RefresherTraining = workLoad.RefresherTraining, RefresherTraining = workLoad.RefresherTraining,
Downtime = workLoad.Downtime, Downtime = workLoad.Downtime,
AdditionalCharge1 = workLoad.AdditionalCharge1,
AdditionalCharge2 = workLoad.AdditionalCharge2,
AdditionalCharge3 = workLoad.AdditionalCharge3,
Note = workLoad.Note,
TrialAdditional = trialPay.TrialAdditional, TrialAdditional = trialPay.TrialAdditional,
PersonalAdditional = doctorPayInfo.Additional, PersonalAdditional = doctorPayInfo.Additional,
@ -121,7 +125,10 @@ namespace IRaCIS.Application.Services
DowntimePrice = rankPrice.Downtime, DowntimePrice = rankPrice.Downtime,
GlobalPrice = rankPrice.Global, GlobalPrice = rankPrice.Global,
TrainingPrice = rankPrice.Training, TrainingPrice = rankPrice.Training,
RefresherTrainingPrice = rankPrice.RefresherTraining RefresherTrainingPrice = rankPrice.RefresherTraining,
AdditionalCharge1Price = 0,
AdditionalCharge2Price = 0,
AdditionalCharge3Price = 0
}; };
return workLoadQueryable.ToList(); return workLoadQueryable.ToList();
@ -200,6 +207,9 @@ namespace IRaCIS.Application.Services
item.TimepointPrice = newPrice.Timepoint ?? 0; item.TimepointPrice = newPrice.Timepoint ?? 0;
item.TimepointIn24HPrice = newPrice.Timepoint24H ?? 0; item.TimepointIn24HPrice = newPrice.Timepoint24H ?? 0;
item.TimepointIn48HPrice = newPrice.Timepoint48H ?? 0; item.TimepointIn48HPrice = newPrice.Timepoint48H ?? 0;
item.AdditionalCharge1Price = newPrice.AdditionalCharge1 ?? 0;
item.AdditionalCharge2Price = newPrice.AdditionalCharge2 ?? 0;
item.AdditionalCharge3Price = newPrice.AdditionalCharge3 ?? 0;
} }
@ -210,6 +220,9 @@ namespace IRaCIS.Application.Services
decimal trainingTotal = item.Training * item.TrainingPrice; decimal trainingTotal = item.Training * item.TrainingPrice;
decimal refresherTrainingTotal = item.RefresherTraining * item.RefresherTrainingPrice; decimal refresherTrainingTotal = item.RefresherTraining * item.RefresherTrainingPrice;
decimal downtimeTotal = item.Downtime * item.DowntimePrice; decimal downtimeTotal = item.Downtime * item.DowntimePrice;
decimal ac1Total = item.AdditionalCharge1 * item.AdditionalCharge1Price;
decimal ac2Total = item.AdditionalCharge2 * item.AdditionalCharge2Price;
decimal ac3Total = item.AdditionalCharge3 * item.AdditionalCharge3Price;
decimal globalTotal = item.Global * (item.GlobalPrice); decimal globalTotal = item.Global * (item.GlobalPrice);
//项目如果没有添加附加数据 默认为0 //项目如果没有添加附加数据 默认为0
@ -222,7 +235,7 @@ namespace IRaCIS.Application.Services
decimal adjudicationIn48HTotal = item.AdjudicationIn48H * item.AdjudicationIn48HPrice; decimal adjudicationIn48HTotal = item.AdjudicationIn48H * item.AdjudicationIn48HPrice;
totalNormal += (trainingTotal + refresherTrainingTotal + downtimeTotal + globalTotal + timePointTotal + timePointIn24HTotal totalNormal += (trainingTotal + refresherTrainingTotal + downtimeTotal + globalTotal + timePointTotal + timePointIn24HTotal
+ timePointIn48HTotal + adjudicationTotal + adjudicationIn24HTotal + adjudicationIn48HTotal); + timePointIn48HTotal + adjudicationTotal + adjudicationIn24HTotal + adjudicationIn48HTotal + ac1Total + ac2Total + ac3Total);
#region 统计明细信息 #region 统计明细信息
@ -281,6 +294,61 @@ namespace IRaCIS.Application.Services
PaymentCNY = item.Downtime * item.DowntimePrice * exchangeRate PaymentCNY = item.Downtime * item.DowntimePrice * exchangeRate
}); });
paymentDetailList.Add(new PaymentDetailCommand
{
TrialCode = item.TrialCode,
PaymentType = "Additional Charge 1",
Count = item.AdditionalCharge1,
BasePrice = item.AdditionalCharge1Price,
PersonalAdditional = 0,
TrialAdditional = 0,
PaymentId = Guid.Empty,
DoctorId = item.DoctorId,
TrialId = item.TrialId,
ShowTypeOrder = 11,
ShowCodeOrder = codeOrder,
ExchangeRate = exchangeRate,
YearMonth = yearMonth,
PaymentUSD = item.AdditionalCharge1 * item.AdditionalCharge1Price,
PaymentCNY = item.AdditionalCharge1 * item.AdditionalCharge1Price * exchangeRate
});
paymentDetailList.Add(new PaymentDetailCommand
{
TrialCode = item.TrialCode,
PaymentType = "Additional Charge 2",
Count = item.AdditionalCharge2,
BasePrice = item.AdditionalCharge2Price,
PersonalAdditional = 0,
TrialAdditional = 0,
PaymentId = Guid.Empty,
DoctorId = item.DoctorId,
TrialId = item.TrialId,
ShowTypeOrder = 12,
ShowCodeOrder = codeOrder,
ExchangeRate = exchangeRate,
YearMonth = yearMonth,
PaymentUSD = item.AdditionalCharge2 * item.AdditionalCharge2Price,
PaymentCNY = item.AdditionalCharge2 * item.AdditionalCharge2Price * exchangeRate
});
paymentDetailList.Add(new PaymentDetailCommand
{
TrialCode = item.TrialCode,
PaymentType = "Additional Charge 3",
Count = item.AdditionalCharge3,
BasePrice = item.AdditionalCharge3Price,
PersonalAdditional = 0,
TrialAdditional = 0,
PaymentId = Guid.Empty,
DoctorId = item.DoctorId,
TrialId = item.TrialId,
ShowTypeOrder = 13,
ShowCodeOrder = codeOrder,
ExchangeRate = exchangeRate,
YearMonth = yearMonth,
PaymentUSD = item.AdditionalCharge3 * item.AdditionalCharge3Price,
PaymentCNY = item.AdditionalCharge3 * item.AdditionalCharge3Price * exchangeRate
});
paymentDetailList.Add(new PaymentDetailCommand paymentDetailList.Add(new PaymentDetailCommand
{ {
TrialCode = item.TrialCode, TrialCode = item.TrialCode,
@ -420,6 +488,9 @@ namespace IRaCIS.Application.Services
decimal trainingTotal = item.Training * item.TrainingPrice; decimal trainingTotal = item.Training * item.TrainingPrice;
decimal refresherTrainingTotal = item.RefresherTraining * item.RefresherTrainingPrice; decimal refresherTrainingTotal = item.RefresherTraining * item.RefresherTrainingPrice;
decimal downtimeTotal = item.Downtime * item.DowntimePrice; decimal downtimeTotal = item.Downtime * item.DowntimePrice;
decimal ac1Total = item.AdditionalCharge1 * item.AdditionalCharge1Price;
decimal ac2Total = item.AdditionalCharge2 * item.AdditionalCharge2Price;
decimal ac3Total = item.AdditionalCharge3 * item.AdditionalCharge3Price;
//规则定义 global 的价格是Tp和个人附加的一半 //规则定义 global 的价格是Tp和个人附加的一半
decimal globalTotal = item.Global * (item.TimepointPrice / 2 + item.PersonalAdditional / 2); decimal globalTotal = item.Global * (item.TimepointPrice / 2 + item.PersonalAdditional / 2);
@ -433,7 +504,7 @@ namespace IRaCIS.Application.Services
decimal adjudicationIn48HTotal = item.AdjudicationIn48H * (item.AdjudicationIn48HPrice * item.AdjustmentMultiple + item.PersonalAdditional); decimal adjudicationIn48HTotal = item.AdjudicationIn48H * (item.AdjudicationIn48HPrice * item.AdjustmentMultiple + item.PersonalAdditional);
totalNormal += (trainingTotal + refresherTrainingTotal + downtimeTotal + globalTotal + timePointTotal + timePointIn24HTotal totalNormal += (trainingTotal + refresherTrainingTotal + downtimeTotal + globalTotal + timePointTotal + timePointIn24HTotal
+ timePointIn48HTotal + adjudicationTotal + adjudicationIn24HTotal + adjudicationIn48HTotal); + timePointIn48HTotal + adjudicationTotal + adjudicationIn24HTotal + adjudicationIn48HTotal + ac1Total + ac2Total + ac3Total);
#region 统计明细信息 #region 统计明细信息
@ -491,6 +562,60 @@ namespace IRaCIS.Application.Services
PaymentUSD = item.Downtime * item.DowntimePrice, PaymentUSD = item.Downtime * item.DowntimePrice,
PaymentCNY = item.Downtime * item.DowntimePrice * exchangeRate PaymentCNY = item.Downtime * item.DowntimePrice * exchangeRate
}); });
paymentDetailList.Add(new PaymentDetailCommand
{
TrialCode = item.TrialCode,
PaymentType = "Additional Charge 1",
Count = item.AdditionalCharge1,
BasePrice = item.AdditionalCharge1Price,
PersonalAdditional = 0,
TrialAdditional = 0,
PaymentId = Guid.Empty,
DoctorId = item.DoctorId,
TrialId = item.TrialId,
ShowTypeOrder = 11,
ShowCodeOrder = codeOrder,
ExchangeRate = exchangeRate,
YearMonth = yearMonth,
PaymentUSD = item.AdditionalCharge1 * item.AdditionalCharge1Price,
PaymentCNY = item.AdditionalCharge1 * item.AdditionalCharge1Price * exchangeRate
});
paymentDetailList.Add(new PaymentDetailCommand
{
TrialCode = item.TrialCode,
PaymentType = "Additional Charge 2",
Count = item.AdditionalCharge2,
BasePrice = item.AdditionalCharge2Price,
PersonalAdditional = 0,
TrialAdditional = 0,
PaymentId = Guid.Empty,
DoctorId = item.DoctorId,
TrialId = item.TrialId,
ShowTypeOrder = 12,
ShowCodeOrder = codeOrder,
ExchangeRate = exchangeRate,
YearMonth = yearMonth,
PaymentUSD = item.AdditionalCharge2 * item.AdditionalCharge2Price,
PaymentCNY = item.AdditionalCharge2 * item.AdditionalCharge2Price * exchangeRate
});
paymentDetailList.Add(new PaymentDetailCommand
{
TrialCode = item.TrialCode,
PaymentType = "Additional Charge 3",
Count = item.AdditionalCharge3,
BasePrice = item.AdditionalCharge3Price,
PersonalAdditional = 0,
TrialAdditional = 0,
PaymentId = Guid.Empty,
DoctorId = item.DoctorId,
TrialId = item.TrialId,
ShowTypeOrder = 13,
ShowCodeOrder = codeOrder,
ExchangeRate = exchangeRate,
YearMonth = yearMonth,
PaymentUSD = item.AdditionalCharge3 * item.AdditionalCharge3Price,
PaymentCNY = item.AdditionalCharge3 * item.AdditionalCharge3Price * exchangeRate
});
paymentDetailList.Add(new PaymentDetailCommand paymentDetailList.Add(new PaymentDetailCommand
{ {

View File

@ -1,4 +1,4 @@
using AutoMapper; using AutoMapper;
using IRaCIS.Application.ExpressionExtend; using IRaCIS.Application.ExpressionExtend;
using IRaCIS.Application.Interfaces; using IRaCIS.Application.Interfaces;
using IRaCIS.Application.ViewModels; using IRaCIS.Application.ViewModels;
@ -40,7 +40,10 @@ namespace IRaCIS.Application.Services
model.AdjudicationIn48H + model.AdjudicationIn48H +
model.Downtime + model.Downtime +
model.Global + model.Global +
model.Training; model.Training +
model.AdditionalCharge1 +
model.AdditionalCharge2 +
model.AdditionalCharge3;
if (count <= 0) if (count <= 0)
{ {
@ -137,6 +140,10 @@ namespace IRaCIS.Application.Services
Global = trialCostItem == null ? 0 : trialCostItem.Global, Global = trialCostItem == null ? 0 : trialCostItem.Global,
Training = trialCostItem == null ? 0 : trialCostItem.Training, Training = trialCostItem == null ? 0 : trialCostItem.Training,
RefresherTraining= trialCostItem == null ? 0 : trialCostItem.RefresherTraining, RefresherTraining= trialCostItem == null ? 0 : trialCostItem.RefresherTraining,
AdditionalCharge1 = trialCostItem == null ? 0 : trialCostItem.AdditionalCharge1,
AdditionalCharge2 = trialCostItem == null ? 0 : trialCostItem.AdditionalCharge2,
AdditionalCharge3 = trialCostItem == null ? 0 : trialCostItem.AdditionalCharge3,
Note = trialCostItem == null ? "" : trialCostItem.Note,
Expedited = trial.Expedited Expedited = trial.Expedited
}; };

View File

@ -1,4 +1,4 @@
using AutoMapper; using AutoMapper;
using AutoMapper.QueryableExtensions; using AutoMapper.QueryableExtensions;
using IRaCIS.Application.ExpressionExtend; using IRaCIS.Application.ExpressionExtend;
using IRaCIS.Application.Interfaces; using IRaCIS.Application.Interfaces;
@ -140,7 +140,10 @@ namespace IRaCIS.Application.Services
Adjudication = g.Sum(t => t.Adjudication), Adjudication = g.Sum(t => t.Adjudication),
AdjudicationIn24H = g.Sum(t => t.AdjudicationIn24H), AdjudicationIn24H = g.Sum(t => t.AdjudicationIn24H),
AdjudicationIn48H = g.Sum(t => t.AdjudicationIn48H), AdjudicationIn48H = g.Sum(t => t.AdjudicationIn48H),
RefresherTraining= g.Sum(t => t.RefresherTraining) RefresherTraining= g.Sum(t => t.RefresherTraining),
AdditionalCharge1 = g.Sum(t => t.AdditionalCharge1),
AdditionalCharge2 = g.Sum(t => t.AdditionalCharge2),
AdditionalCharge3 = g.Sum(t => t.AdditionalCharge3)
} }
) on intoGroup.DoctorId equals doctorWorkLoad.DoctorId into tt //连接为了得到入组时间 ) on intoGroup.DoctorId equals doctorWorkLoad.DoctorId into tt //连接为了得到入组时间
@ -172,7 +175,10 @@ namespace IRaCIS.Application.Services
RefresherTraining= doctorWorkLoad.RefresherTraining, RefresherTraining= doctorWorkLoad.RefresherTraining,
TrainingTimes = doctorWorkLoad.Training, TrainingTimes = doctorWorkLoad.Training,
Downtime = doctorWorkLoad.Downtime Downtime = doctorWorkLoad.Downtime,
AdditionalCharge1 = doctorWorkLoad.AdditionalCharge1,
AdditionalCharge2 = doctorWorkLoad.AdditionalCharge2,
AdditionalCharge3 = doctorWorkLoad.AdditionalCharge3
}; };
@ -282,6 +288,10 @@ namespace IRaCIS.Application.Services
Training = workLoad.Training, Training = workLoad.Training,
Downtime = workLoad.Downtime, Downtime = workLoad.Downtime,
AdditionalCharge1 = workLoad.AdditionalCharge1,
AdditionalCharge2 = workLoad.AdditionalCharge2,
AdditionalCharge3 = workLoad.AdditionalCharge3,
Note = workLoad.Note,
IsLock = workLoad.IsLock IsLock = workLoad.IsLock
}; };
tempWorkload.AddRange(workLoadQueryable.ToList()); tempWorkload.AddRange(workLoadQueryable.ToList());
@ -322,6 +332,10 @@ namespace IRaCIS.Application.Services
Training = workLoad.Training, Training = workLoad.Training,
Downtime = workLoad.Downtime, Downtime = workLoad.Downtime,
AdditionalCharge1 = workLoad.AdditionalCharge1,
AdditionalCharge2 = workLoad.AdditionalCharge2,
AdditionalCharge3 = workLoad.AdditionalCharge3,
Note = workLoad.Note,
IsLock = workLoad.IsLock IsLock = workLoad.IsLock
}; };
tempWorkload.AddRange(workLoadQueryable.ToList()); tempWorkload.AddRange(workLoadQueryable.ToList());
@ -444,6 +458,10 @@ namespace IRaCIS.Application.Services
Training = workLoad.Training, Training = workLoad.Training,
Downtime = workLoad.Downtime, Downtime = workLoad.Downtime,
AdditionalCharge1 = workLoad.AdditionalCharge1,
AdditionalCharge2 = workLoad.AdditionalCharge2,
AdditionalCharge3 = workLoad.AdditionalCharge3,
Note = workLoad.Note,
IsLock = workLoad.IsLock IsLock = workLoad.IsLock
}; };
@ -653,6 +671,10 @@ namespace IRaCIS.Application.Services
Downtime = workLoadAddOrUpdateModel.Downtime, Downtime = workLoadAddOrUpdateModel.Downtime,
Training = workLoadAddOrUpdateModel.Training, Training = workLoadAddOrUpdateModel.Training,
Global = workLoadAddOrUpdateModel.Global, Global = workLoadAddOrUpdateModel.Global,
AdditionalCharge1 = workLoadAddOrUpdateModel.AdditionalCharge1,
AdditionalCharge2 = workLoadAddOrUpdateModel.AdditionalCharge2,
AdditionalCharge3 = workLoadAddOrUpdateModel.AdditionalCharge3,
Note = workLoadAddOrUpdateModel.Note,
UpdateTime = DateTime.Now, UpdateTime = DateTime.Now,
UpdateUserId = userId, UpdateUserId = userId,

View File

@ -35,6 +35,11 @@ namespace IRaCIS.Core.Domain.Models
public int Global { get; set; } public int Global { get; set; }
public decimal RefresherTraining { get; set; } public decimal RefresherTraining { get; set; }
public decimal AdditionalCharge1 { get; set; }
public decimal AdditionalCharge2 { get; set; }
public decimal AdditionalCharge3 { get; set; }
public string Note { get; set; }
public int CreateUserType { get; set; } public int CreateUserType { get; set; }
[Required] [Required]

View File

@ -1,4 +1,4 @@
using System; using System;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models namespace IRaCIS.Core.Domain.Models
@ -18,6 +18,11 @@ namespace IRaCIS.Core.Domain.Models
public decimal Downtime { get; set; } public decimal Downtime { get; set; }
public decimal RefresherTraining { get; set; } public decimal RefresherTraining { get; set; }
public decimal AdditionalCharge1 { get; set; }
public decimal AdditionalCharge2 { get; set; }
public decimal AdditionalCharge3 { get; set; }
public string Note { get; set; }
public Guid UpdateUserId { get; set; } public Guid UpdateUserId { get; set; }
public DateTime UpdateTime { get; set; } public DateTime UpdateTime { get; set; }
public Guid CreateUserId { get; set; } public Guid CreateUserId { get; set; }

View File

@ -1,4 +1,4 @@
using System; using System;
namespace IRaCIS.Core.Domain.Models namespace IRaCIS.Core.Domain.Models
{ {
@ -28,6 +28,9 @@ namespace IRaCIS.Core.Domain.Models
public bool AdjudicationIn48H { get; set; } = false; public bool AdjudicationIn48H { get; set; } = false;
public bool RefresherTraining { get; set; } = false; public bool RefresherTraining { get; set; } = false;
public bool AdditionalCharge1 { get; set; } = false;
public bool AdditionalCharge2 { get; set; } = false;
public bool AdditionalCharge3 { get; set; } = false;
public DateTime WorkLoadDate { get; set; } public DateTime WorkLoadDate { get; set; }
} }
} }

View File

@ -32,7 +32,7 @@ namespace IRaCIS.Core.Domain.Models
public Guid CreateUserId { get; set; } public Guid CreateUserId { get; set; }
public DateTime CreateTime { get; set; } public DateTime CreateTime { get; set; }
#region 新的计费价格 #region 新的计费价格
public decimal? Training { get; set; } public decimal? Training { get; set; }
public decimal? RefresherTraining { get; set; } public decimal? RefresherTraining { get; set; }
@ -53,6 +53,11 @@ namespace IRaCIS.Core.Domain.Models
public decimal? Downtime { get; set; } public decimal? Downtime { get; set; }
public decimal? AdditionalCharge1 { get; set; }
public decimal? AdditionalCharge2 { get; set; }
public decimal? AdditionalCharge3 { get; set; }
public string Note { get; set; } = string.Empty;
#endregion #endregion

View File

@ -0,0 +1,93 @@
-- 1. Enroll 表
IF not exists(select * from sys.columns where name='AdditionalCharge1' and [object_id]=object_id(N'Enroll'))
BEGIN
alter table Enroll add AdditionalCharge1 money NULL
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'扩展付费项1', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'Enroll', @level2type = N'COLUMN', @level2name = 'AdditionalCharge1';
END
IF not exists(select * from sys.columns where name='AdditionalCharge2' and [object_id]=object_id(N'Enroll'))
BEGIN
alter table Enroll add AdditionalCharge2 money NULL
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'扩展付费项2', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'Enroll', @level2type = N'COLUMN', @level2name = 'AdditionalCharge2';
END
IF not exists(select * from sys.columns where name='AdditionalCharge3' and [object_id]=object_id(N'Enroll'))
BEGIN
alter table Enroll add AdditionalCharge3 money NULL
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'扩展付费项3', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'Enroll', @level2type = N'COLUMN', @level2name = 'AdditionalCharge3';
END
IF not exists(select * from sys.columns where name='Note' and [object_id]=object_id(N'Enroll'))
BEGIN
alter table Enroll add Note nvarchar(1000) NULL
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'扩展付费项说明', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'Enroll', @level2type = N'COLUMN', @level2name = 'Note';
END
-- 2. TrialRevenuesPrice 表
IF not exists(select * from sys.columns where name='AdditionalCharge1' and [object_id]=object_id(N'TrialRevenuesPrice'))
BEGIN
alter table TrialRevenuesPrice add AdditionalCharge1 money NOT NULL DEFAULT 0
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'扩展付费项1', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'TrialRevenuesPrice', @level2type = N'COLUMN', @level2name = 'AdditionalCharge1';
END
IF not exists(select * from sys.columns where name='AdditionalCharge2' and [object_id]=object_id(N'TrialRevenuesPrice'))
BEGIN
alter table TrialRevenuesPrice add AdditionalCharge2 money NOT NULL DEFAULT 0
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'扩展付费项2', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'TrialRevenuesPrice', @level2type = N'COLUMN', @level2name = 'AdditionalCharge2';
END
IF not exists(select * from sys.columns where name='AdditionalCharge3' and [object_id]=object_id(N'TrialRevenuesPrice'))
BEGIN
alter table TrialRevenuesPrice add AdditionalCharge3 money NOT NULL DEFAULT 0
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'扩展付费项3', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'TrialRevenuesPrice', @level2type = N'COLUMN', @level2name = 'AdditionalCharge3';
END
IF not exists(select * from sys.columns where name='Note' and [object_id]=object_id(N'TrialRevenuesPrice'))
BEGIN
alter table TrialRevenuesPrice add Note nvarchar(1000) NULL
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'扩展付费项说明', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'TrialRevenuesPrice', @level2type = N'COLUMN', @level2name = 'Note';
END
-- 3. DoctorWorkload 表
IF not exists(select * from sys.columns where name='AdditionalCharge1' and [object_id]=object_id(N'DoctorWorkload'))
BEGIN
alter table DoctorWorkload add AdditionalCharge1 money NOT NULL DEFAULT 0
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'扩展付费项1', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'DoctorWorkload', @level2type = N'COLUMN', @level2name = 'AdditionalCharge1';
END
IF not exists(select * from sys.columns where name='AdditionalCharge2' and [object_id]=object_id(N'DoctorWorkload'))
BEGIN
alter table DoctorWorkload add AdditionalCharge2 money NOT NULL DEFAULT 0
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'扩展付费项2', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'DoctorWorkload', @level2type = N'COLUMN', @level2name = 'AdditionalCharge2';
END
IF not exists(select * from sys.columns where name='AdditionalCharge3' and [object_id]=object_id(N'DoctorWorkload'))
BEGIN
alter table DoctorWorkload add AdditionalCharge3 money NOT NULL DEFAULT 0
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'扩展付费项3', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'DoctorWorkload', @level2type = N'COLUMN', @level2name = 'AdditionalCharge3';
END
IF not exists(select * from sys.columns where name='Note' and [object_id]=object_id(N'DoctorWorkload'))
BEGIN
alter table DoctorWorkload add Note nvarchar(1000) NULL
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'扩展付费项说明', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'DoctorWorkload', @level2type = N'COLUMN', @level2name = 'Note';
END
-- 4. TrialRevenuesPriceVerification 表 (类型保持为 bit)
IF not exists(select * from sys.columns where name='AdditionalCharge1' and [object_id]=object_id(N'TrialRevenuesPriceVerification'))
BEGIN
alter table TrialRevenuesPriceVerification add AdditionalCharge1 bit NOT NULL DEFAULT 0
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'扩展付费项1是否配置', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'TrialRevenuesPriceVerification', @level2type = N'COLUMN', @level2name = 'AdditionalCharge1';
END
IF not exists(select * from sys.columns where name='AdditionalCharge2' and [object_id]=object_id(N'TrialRevenuesPriceVerification'))
BEGIN
alter table TrialRevenuesPriceVerification add AdditionalCharge2 bit NOT NULL DEFAULT 0
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'扩展付费项2是否配置', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'TrialRevenuesPriceVerification', @level2type = N'COLUMN', @level2name = 'AdditionalCharge2';
END
IF not exists(select * from sys.columns where name='AdditionalCharge3' and [object_id]=object_id(N'TrialRevenuesPriceVerification'))
BEGIN
alter table TrialRevenuesPriceVerification add AdditionalCharge3 bit NOT NULL DEFAULT 0
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'扩展付费项3是否配置', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'TrialRevenuesPriceVerification', @level2type = N'COLUMN', @level2name = 'AdditionalCharge3';
END