From 53cb7e302cbafb3b568585e518d31d9674b184e1 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 21 Jan 2026 10:03:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E8=B4=B9=E7=94=A8=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Doctor/DTO/DoctorViewModel.cs | 12 +- .../Trial/DTO/DoctorWorkLoadViewModel.cs | 14 +- .../Trial/DTO/TrialRevenuesPriceViewModel.cs | 6 +- .../Doctor/DoctorListQueryService.cs | 6 +- .../Financial/CalculateService.cs | 133 +++++++++++++++++- .../Financial/TrialRevenuesPriceService.cs | 11 +- .../Trial/Workload/TrialWorkloadService.cs | 28 +++- IRaCIS.Core.Domain/Dcotor/DoctorWorkload.cs | 5 + .../Financial/TrialRevenuesPrice.cs | 7 +- .../TrialRevenuesPriceVerification.cs | 5 +- IRaCIS.Core.Domain/Trial/Enroll.cs | 7 +- Sql脚本/20260121添加字段.sql | 93 ++++++++++++ 12 files changed, 310 insertions(+), 17 deletions(-) create mode 100644 Sql脚本/20260121添加字段.sql diff --git a/IRaCIS.Core.Application.Contracts/Doctor/DTO/DoctorViewModel.cs b/IRaCIS.Core.Application.Contracts/Doctor/DTO/DoctorViewModel.cs index 8d166e9..bf29803 100644 --- a/IRaCIS.Core.Application.Contracts/Doctor/DTO/DoctorViewModel.cs +++ b/IRaCIS.Core.Application.Contracts/Doctor/DTO/DoctorViewModel.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using IRaCIS.Core.Application.Contracts.RequestAndResponse; using IRaCIS.Core.Domain.Share; @@ -174,7 +174,10 @@ namespace IRaCIS.Application.ViewModels 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 @@ -218,6 +221,11 @@ namespace IRaCIS.Application.ViewModels 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 Code { get; set; } diff --git a/IRaCIS.Core.Application.Contracts/Trial/DTO/DoctorWorkLoadViewModel.cs b/IRaCIS.Core.Application.Contracts/Trial/DTO/DoctorWorkLoadViewModel.cs index faec414..d4044c8 100644 --- a/IRaCIS.Core.Application.Contracts/Trial/DTO/DoctorWorkLoadViewModel.cs +++ b/IRaCIS.Core.Application.Contracts/Trial/DTO/DoctorWorkLoadViewModel.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; @@ -67,6 +67,10 @@ namespace IRaCIS.Application.ViewModels public bool IsNewTrial { get; set; } public decimal DowntimePrice { get; set; } public decimal RefresherTrainingPrice { get; set; } + + public decimal AdditionalCharge1Price { get; set; } + public decimal AdditionalCharge2Price { get; set; } + public decimal AdditionalCharge3Price { get; set; } } /// @@ -103,6 +107,10 @@ namespace IRaCIS.Application.ViewModels public int Global { 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 AdditionalCharge1 { get; set; } + public decimal AdditionalCharge2 { get; set; } + public decimal AdditionalCharge3 { get; set; } + } diff --git a/IRaCIS.Core.Application.Contracts/Trial/DTO/TrialRevenuesPriceViewModel.cs b/IRaCIS.Core.Application.Contracts/Trial/DTO/TrialRevenuesPriceViewModel.cs index 87c9969..173deb0 100644 --- a/IRaCIS.Core.Application.Contracts/Trial/DTO/TrialRevenuesPriceViewModel.cs +++ b/IRaCIS.Core.Application.Contracts/Trial/DTO/TrialRevenuesPriceViewModel.cs @@ -1,4 +1,4 @@ -using System; +using System; using IRaCIS.Core.Application.Contracts.RequestAndResponse; namespace IRaCIS.Application.ViewModels @@ -18,6 +18,10 @@ namespace IRaCIS.Application.ViewModels public decimal Global { get; set; } public decimal Training { 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 diff --git a/IRaCIS.Core.Application/Doctor/DoctorListQueryService.cs b/IRaCIS.Core.Application/Doctor/DoctorListQueryService.cs index be8735d..7c1b50f 100644 --- a/IRaCIS.Core.Application/Doctor/DoctorListQueryService.cs +++ b/IRaCIS.Core.Application/Doctor/DoctorListQueryService.cs @@ -1,4 +1,4 @@ -using AutoMapper; +using AutoMapper; using AutoMapper.QueryableExtensions; using IRaCIS.Application.ExpressionExtend; using IRaCIS.Application.Interfaces; @@ -186,6 +186,10 @@ namespace IRaCIS.Application.Services Code = dociorc.Code, ReviewerCode = dociorc.Code, Downtime = enroll.Downtime, + AdditionalCharge1 = enroll.AdditionalCharge1, + AdditionalCharge2 = enroll.AdditionalCharge2, + AdditionalCharge3 = enroll.AdditionalCharge3, + Note = enroll.Note, }; diff --git a/IRaCIS.Core.Application/Financial/CalculateService.cs b/IRaCIS.Core.Application/Financial/CalculateService.cs index c369708..87d9f29 100644 --- a/IRaCIS.Core.Application/Financial/CalculateService.cs +++ b/IRaCIS.Core.Application/Financial/CalculateService.cs @@ -1,4 +1,4 @@ -using AutoMapper; +using AutoMapper; using AutoMapper.QueryableExtensions; using IRaCIS.Application.Interfaces; using IRaCIS.Application.ViewModels; @@ -106,6 +106,10 @@ namespace IRaCIS.Application.Services Training = workLoad.Training, RefresherTraining = workLoad.RefresherTraining, Downtime = workLoad.Downtime, + AdditionalCharge1 = workLoad.AdditionalCharge1, + AdditionalCharge2 = workLoad.AdditionalCharge2, + AdditionalCharge3 = workLoad.AdditionalCharge3, + Note = workLoad.Note, TrialAdditional = trialPay.TrialAdditional, PersonalAdditional = doctorPayInfo.Additional, @@ -121,7 +125,10 @@ namespace IRaCIS.Application.Services DowntimePrice = rankPrice.Downtime, GlobalPrice = rankPrice.Global, TrainingPrice = rankPrice.Training, - RefresherTrainingPrice = rankPrice.RefresherTraining + RefresherTrainingPrice = rankPrice.RefresherTraining, + AdditionalCharge1Price = 0, + AdditionalCharge2Price = 0, + AdditionalCharge3Price = 0 }; return workLoadQueryable.ToList(); @@ -200,6 +207,9 @@ namespace IRaCIS.Application.Services item.TimepointPrice = newPrice.Timepoint ?? 0; item.TimepointIn24HPrice = newPrice.Timepoint24H ?? 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 refresherTrainingTotal = item.RefresherTraining * item.RefresherTrainingPrice; 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); //项目如果没有添加附加数据 默认为0 @@ -222,7 +235,7 @@ namespace IRaCIS.Application.Services decimal adjudicationIn48HTotal = item.AdjudicationIn48H * item.AdjudicationIn48HPrice; totalNormal += (trainingTotal + refresherTrainingTotal + downtimeTotal + globalTotal + timePointTotal + timePointIn24HTotal - + timePointIn48HTotal + adjudicationTotal + adjudicationIn24HTotal + adjudicationIn48HTotal); + + timePointIn48HTotal + adjudicationTotal + adjudicationIn24HTotal + adjudicationIn48HTotal + ac1Total + ac2Total + ac3Total); #region 统计明细信息 @@ -281,6 +294,61 @@ namespace IRaCIS.Application.Services 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 { TrialCode = item.TrialCode, @@ -420,6 +488,9 @@ namespace IRaCIS.Application.Services decimal trainingTotal = item.Training * item.TrainingPrice; decimal refresherTrainingTotal = item.RefresherTraining * item.RefresherTrainingPrice; 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和个人附加的一半 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); totalNormal += (trainingTotal + refresherTrainingTotal + downtimeTotal + globalTotal + timePointTotal + timePointIn24HTotal - + timePointIn48HTotal + adjudicationTotal + adjudicationIn24HTotal + adjudicationIn48HTotal); + + timePointIn48HTotal + adjudicationTotal + adjudicationIn24HTotal + adjudicationIn48HTotal + ac1Total + ac2Total + ac3Total); #region 统计明细信息 @@ -491,6 +562,60 @@ namespace IRaCIS.Application.Services PaymentUSD = item.Downtime * item.DowntimePrice, 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 { diff --git a/IRaCIS.Core.Application/Financial/TrialRevenuesPriceService.cs b/IRaCIS.Core.Application/Financial/TrialRevenuesPriceService.cs index ea4fb18..4782c51 100644 --- a/IRaCIS.Core.Application/Financial/TrialRevenuesPriceService.cs +++ b/IRaCIS.Core.Application/Financial/TrialRevenuesPriceService.cs @@ -1,4 +1,4 @@ -using AutoMapper; +using AutoMapper; using IRaCIS.Application.ExpressionExtend; using IRaCIS.Application.Interfaces; using IRaCIS.Application.ViewModels; @@ -40,7 +40,10 @@ namespace IRaCIS.Application.Services model.AdjudicationIn48H + model.Downtime + model.Global + - model.Training; + model.Training + + model.AdditionalCharge1 + + model.AdditionalCharge2 + + model.AdditionalCharge3; if (count <= 0) { @@ -137,6 +140,10 @@ namespace IRaCIS.Application.Services Global = trialCostItem == null ? 0 : trialCostItem.Global, Training = trialCostItem == null ? 0 : trialCostItem.Training, 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 }; diff --git a/IRaCIS.Core.Application/Trial/Workload/TrialWorkloadService.cs b/IRaCIS.Core.Application/Trial/Workload/TrialWorkloadService.cs index bd3b8f0..135b20a 100644 --- a/IRaCIS.Core.Application/Trial/Workload/TrialWorkloadService.cs +++ b/IRaCIS.Core.Application/Trial/Workload/TrialWorkloadService.cs @@ -1,4 +1,4 @@ -using AutoMapper; +using AutoMapper; using AutoMapper.QueryableExtensions; using IRaCIS.Application.ExpressionExtend; using IRaCIS.Application.Interfaces; @@ -140,7 +140,10 @@ namespace IRaCIS.Application.Services Adjudication = g.Sum(t => t.Adjudication), AdjudicationIn24H = g.Sum(t => t.AdjudicationIn24H), 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 //连接为了得到入组时间 @@ -172,7 +175,10 @@ namespace IRaCIS.Application.Services RefresherTraining= doctorWorkLoad.RefresherTraining, 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, Downtime = workLoad.Downtime, + AdditionalCharge1 = workLoad.AdditionalCharge1, + AdditionalCharge2 = workLoad.AdditionalCharge2, + AdditionalCharge3 = workLoad.AdditionalCharge3, + Note = workLoad.Note, IsLock = workLoad.IsLock }; tempWorkload.AddRange(workLoadQueryable.ToList()); @@ -322,6 +332,10 @@ namespace IRaCIS.Application.Services Training = workLoad.Training, Downtime = workLoad.Downtime, + AdditionalCharge1 = workLoad.AdditionalCharge1, + AdditionalCharge2 = workLoad.AdditionalCharge2, + AdditionalCharge3 = workLoad.AdditionalCharge3, + Note = workLoad.Note, IsLock = workLoad.IsLock }; tempWorkload.AddRange(workLoadQueryable.ToList()); @@ -444,6 +458,10 @@ namespace IRaCIS.Application.Services Training = workLoad.Training, Downtime = workLoad.Downtime, + AdditionalCharge1 = workLoad.AdditionalCharge1, + AdditionalCharge2 = workLoad.AdditionalCharge2, + AdditionalCharge3 = workLoad.AdditionalCharge3, + Note = workLoad.Note, IsLock = workLoad.IsLock }; @@ -653,6 +671,10 @@ namespace IRaCIS.Application.Services Downtime = workLoadAddOrUpdateModel.Downtime, Training = workLoadAddOrUpdateModel.Training, Global = workLoadAddOrUpdateModel.Global, + AdditionalCharge1 = workLoadAddOrUpdateModel.AdditionalCharge1, + AdditionalCharge2 = workLoadAddOrUpdateModel.AdditionalCharge2, + AdditionalCharge3 = workLoadAddOrUpdateModel.AdditionalCharge3, + Note = workLoadAddOrUpdateModel.Note, UpdateTime = DateTime.Now, UpdateUserId = userId, diff --git a/IRaCIS.Core.Domain/Dcotor/DoctorWorkload.cs b/IRaCIS.Core.Domain/Dcotor/DoctorWorkload.cs index 6785935..cd5a61a 100644 --- a/IRaCIS.Core.Domain/Dcotor/DoctorWorkload.cs +++ b/IRaCIS.Core.Domain/Dcotor/DoctorWorkload.cs @@ -35,6 +35,11 @@ namespace IRaCIS.Core.Domain.Models public int Global { 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; } [Required] diff --git a/IRaCIS.Core.Domain/Financial/TrialRevenuesPrice.cs b/IRaCIS.Core.Domain/Financial/TrialRevenuesPrice.cs index dc1c6ba..bebb5fb 100644 --- a/IRaCIS.Core.Domain/Financial/TrialRevenuesPrice.cs +++ b/IRaCIS.Core.Domain/Financial/TrialRevenuesPrice.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations.Schema; namespace IRaCIS.Core.Domain.Models @@ -18,6 +18,11 @@ namespace IRaCIS.Core.Domain.Models public decimal Downtime { 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 DateTime UpdateTime { get; set; } public Guid CreateUserId { get; set; } diff --git a/IRaCIS.Core.Domain/Financial/TrialRevenuesPriceVerification.cs b/IRaCIS.Core.Domain/Financial/TrialRevenuesPriceVerification.cs index 822c312..4784721 100644 --- a/IRaCIS.Core.Domain/Financial/TrialRevenuesPriceVerification.cs +++ b/IRaCIS.Core.Domain/Financial/TrialRevenuesPriceVerification.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace IRaCIS.Core.Domain.Models { @@ -28,6 +28,9 @@ namespace IRaCIS.Core.Domain.Models public bool AdjudicationIn48H { 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; } } } \ No newline at end of file diff --git a/IRaCIS.Core.Domain/Trial/Enroll.cs b/IRaCIS.Core.Domain/Trial/Enroll.cs index 2b0efa5..761d42f 100644 --- a/IRaCIS.Core.Domain/Trial/Enroll.cs +++ b/IRaCIS.Core.Domain/Trial/Enroll.cs @@ -32,7 +32,7 @@ namespace IRaCIS.Core.Domain.Models public Guid CreateUserId { get; set; } public DateTime CreateTime { get; set; } - #region µļƷѼ۸ + #region 新的计费价格 public decimal? Training { get; set; } public decimal? RefresherTraining { get; set; } @@ -53,6 +53,11 @@ namespace IRaCIS.Core.Domain.Models 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 diff --git a/Sql脚本/20260121添加字段.sql b/Sql脚本/20260121添加字段.sql new file mode 100644 index 0000000..6f273b6 --- /dev/null +++ b/Sql脚本/20260121添加字段.sql @@ -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 \ No newline at end of file