diff --git a/IRaCIS.Core.API/Controllers/Financial/FinancialController.cs b/IRaCIS.Core.API/Controllers/Financial/FinancialController.cs index 276f9bc..0ceaede 100644 --- a/IRaCIS.Core.API/Controllers/Financial/FinancialController.cs +++ b/IRaCIS.Core.API/Controllers/Financial/FinancialController.cs @@ -104,7 +104,7 @@ namespace IRaCIS.Api.Controllers } [HttpPost, Route("ExportLaborPayment")] - + [AllowAnonymous] public FileResult ExportLaborPayment(List paymentIds) { diff --git a/IRaCIS.Core.API/Zip/Payroll.zip b/IRaCIS.Core.API/Zip/Payroll.zip deleted file mode 100644 index c89d3bf..0000000 Binary files a/IRaCIS.Core.API/Zip/Payroll.zip and /dev/null differ diff --git a/IRaCIS.Core.API/Zip/text.txt b/IRaCIS.Core.API/Zip/text.txt deleted file mode 100644 index e69de29..0000000 diff --git a/IRaCIS.Core.Application.Contracts/Financial/DTO/PaymentViewModel.cs b/IRaCIS.Core.Application.Contracts/Financial/DTO/PaymentViewModel.cs index 7633b5e..ac03b33 100644 --- a/IRaCIS.Core.Application.Contracts/Financial/DTO/PaymentViewModel.cs +++ b/IRaCIS.Core.Application.Contracts/Financial/DTO/PaymentViewModel.cs @@ -45,6 +45,8 @@ namespace IRaCIS.Application.ViewModels public decimal AdjustPaymentUSD { get; set; } public decimal TotalPaymentUSD { get; set; } + + public PaymentMethod PaymentMethod { get; set; } } public class PaymentCommand diff --git a/IRaCIS.Core.Application/Financial/FinancialService.cs b/IRaCIS.Core.Application/Financial/FinancialService.cs index fc98b95..473a2c0 100644 --- a/IRaCIS.Core.Application/Financial/FinancialService.cs +++ b/IRaCIS.Core.Application/Financial/FinancialService.cs @@ -123,7 +123,7 @@ namespace IRaCIS.Application.Services TotalPaymentCNY = monthlyPayment.AdjustmentCNY + monthlyPayment.PaymentCNY, TotalPaymentUSD = monthlyPayment.AdjustmentUSD + monthlyPayment.PaymentUSD, - + PaymentMethod= monthlyPayment.PaymentMethod, Code = doctor.Code, FirstName = doctor.FirstName, @@ -1207,6 +1207,17 @@ namespace IRaCIS.Application.Services public Stream ExportLaborPayment(List paymentIds) { + + if (!System.IO.Directory.Exists("./file")) + { + System.IO.Directory.CreateDirectory("./file"); + } + + if (!System.IO.Directory.Exists("./Zip")) + { + System.IO.Directory.CreateDirectory("./Zip"); + } + List laborPaymentList = GetLaborPaymentList(paymentIds); //报酬