diff --git a/IRaCIS.Core.API/appsettings.json b/IRaCIS.Core.API/appsettings.json index 67d9544..a39018b 100644 --- a/IRaCIS.Core.API/appsettings.json +++ b/IRaCIS.Core.API/appsettings.json @@ -1,6 +1,6 @@ { "ConnectionStrings": { - "RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_B;User ID=sa;Password=dev123456DEV;", + "RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_P;User ID=sa;Password=dev123456DEV;", "hang": "Server=ZHOU;Database=IRaCIS;User ID=sa;Password=sa123456;" //"RemoteTest": "Server=123.56.181.144,14333\\MSSQLExpress14;Database=IRaCIS_B;User ID=sa;Password=dev123456DEV;" }, diff --git a/IRaCIS.Core.API/wwwroot/Template/Payment Summary.xlsx b/IRaCIS.Core.API/wwwroot/Template/Payment Summary.xlsx index 821b38d..81ca59d 100644 Binary files a/IRaCIS.Core.API/wwwroot/Template/Payment Summary.xlsx and b/IRaCIS.Core.API/wwwroot/Template/Payment Summary.xlsx differ diff --git a/IRaCIS.Core.Application.Contracts/Doctor/DTO/AttachmentViewModel.cs b/IRaCIS.Core.Application.Contracts/Doctor/DTO/AttachmentViewModel.cs index 954244a..0af6d7a 100644 --- a/IRaCIS.Core.Application.Contracts/Doctor/DTO/AttachmentViewModel.cs +++ b/IRaCIS.Core.Application.Contracts/Doctor/DTO/AttachmentViewModel.cs @@ -13,7 +13,7 @@ namespace IRaCIS.Application.ViewModels public string FullPath => SystemConfig.RootUrl + Path; public string FileName { get; set; } = string.Empty; public DateTime? CreateTime { get; set; } - + public int Language { get; set; } } public class ReviewerAckDTO diff --git a/IRaCIS.Core.Application.Contracts/Financial/DTO/PaymentDetailViewModel.cs b/IRaCIS.Core.Application.Contracts/Financial/DTO/PaymentDetailViewModel.cs index 3db74b4..927d412 100644 --- a/IRaCIS.Core.Application.Contracts/Financial/DTO/PaymentDetailViewModel.cs +++ b/IRaCIS.Core.Application.Contracts/Financial/DTO/PaymentDetailViewModel.cs @@ -25,7 +25,7 @@ namespace IRaCIS.Application.ViewModels.Pay public decimal PaymentUSD { get; set; } public decimal PaymentCNY { get; set; } - public bool? IsNewTrial { get; set; } + //public bool? IsNewTrial { get; set; } //public decimal? NewPersonalAdditional { get; set; } diff --git a/IRaCIS.Core.Application.Contracts/Financial/DTO/PaymentViewModel.cs b/IRaCIS.Core.Application.Contracts/Financial/DTO/PaymentViewModel.cs index 21f34e9..9efd049 100644 --- a/IRaCIS.Core.Application.Contracts/Financial/DTO/PaymentViewModel.cs +++ b/IRaCIS.Core.Application.Contracts/Financial/DTO/PaymentViewModel.cs @@ -101,14 +101,14 @@ namespace IRaCIS.Application.ViewModels { get { - return this.Row.Sum(x => x.PaymentUSD); + return this.Row.Sum(x => x.TotalPaymentUSD); } } public decimal SumPaymentCNY { get { - return this.Row.Sum(x => x.PaymentCNY); + return this.Row.Sum(x => x.TotalPaymentCNY); } } } diff --git a/IRaCIS.Core.Application/Financial/CalculateService.cs b/IRaCIS.Core.Application/Financial/CalculateService.cs index b6d8850..e2084e6 100644 --- a/IRaCIS.Core.Application/Financial/CalculateService.cs +++ b/IRaCIS.Core.Application/Financial/CalculateService.cs @@ -814,6 +814,10 @@ namespace IRaCIS.Application.Services //payment.BankTransferCNY = bankTransferCNY; payment.YearMonthDate = DateTime.Parse(payment.YearMonth); + var lastpayment = _paymentRepository.GetAll().Where(x => x.DoctorId == addOrUpdateModel.DoctorId && x.YearMonthDate == payment.YearMonthDate.AddMonths(-1)).FirstOrDefault(); + payment.PaymentMethod = lastpayment == null ? PaymentMethod.CloudPayment : lastpayment.PaymentMethod; + + payment = _paymentRepository.Add(payment); success = _paymentRepository.SaveChanges(); return ResponseOutput.Result(success, payment.Id); diff --git a/IRaCIS.Core.Application/Financial/FinancialService.cs b/IRaCIS.Core.Application/Financial/FinancialService.cs index 3f16399..536db5a 100644 --- a/IRaCIS.Core.Application/Financial/FinancialService.cs +++ b/IRaCIS.Core.Application/Financial/FinancialService.cs @@ -239,9 +239,9 @@ namespace IRaCIS.Application.Services //费用调整 //_payAdjustmentRepository.Where(t => t.YearMonth == yearMonthStr && t.ReviewerId == reviewerId) var adjList = - (from costAdjustment in _payAdjustmentRepository.GetAll().Where(t => t.YearMonth == yearMonthStr && t.ReviewerId == paymentId) - join enroll in _enrollRepository.GetAll()on new { costAdjustment.ReviewerId, costAdjustment.TrialId } equals new { ReviewerId = enroll.DoctorId, enroll.TrialId } - join price in _TrialPaymentPriceRepository.GetAll() on costAdjustment.TrialId equals price.TrialId + (from costAdjustment in _payAdjustmentRepository.GetAll().Where(t => t.YearMonth == yearMonthStr && t.ReviewerId == reviewerId) + //join enroll in _enrollRepository.GetAll()on new { costAdjustment.ReviewerId, costAdjustment.TrialId } equals new { ReviewerId = enroll.DoctorId, enroll.TrialId } + //join price in _TrialPaymentPriceRepository.GetAll() on costAdjustment.TrialId equals price.TrialId select new PaymentDetailDTO() @@ -258,7 +258,7 @@ namespace IRaCIS.Application.Services AdjustPaymentCNY = costAdjustment.AdjustmentCNY, Note = costAdjustment.Note }, - IsNewTrial = price.IsNewTrial, + //IsNewTrial = price.IsNewTrial, //NewPersonalAdditional = enroll.AdjustmentMultiple, }).ToList(); @@ -1348,7 +1348,7 @@ namespace IRaCIS.Application.Services var summaryPaymentPath = Path.Combine(Directory.GetCurrentDirectory(), @"wwwroot\Template\Payment Summary.xlsx"); - + var sumData = GetMonthlyPaymentList(new MonthlyPaymentQueryDTO() { PageIndex = 1, diff --git a/IRaCIS.Core.Domain/Dcotor/Attachment.cs b/IRaCIS.Core.Domain/Dcotor/Attachment.cs index b28fa4f..620b81d 100644 --- a/IRaCIS.Core.Domain/Dcotor/Attachment.cs +++ b/IRaCIS.Core.Domain/Dcotor/Attachment.cs @@ -26,6 +26,7 @@ namespace IRaCIS.Core.Domain.Models public DateTime CreateTime { get; set; } public Guid CreateUserId { get; set; } = Guid.Empty; + public int Language { get; set; } //public Guid CreateUserId { get; set; } = Guid.Empty; //public DateTime? CreateTime { get; set; } }