diff --git a/CompanyManagment.App.Contracts/SmsResult/ISmsSettingApplication.cs b/CompanyManagment.App.Contracts/SmsResult/ISmsSettingApplication.cs index c1341a54..49fdc4e8 100644 --- a/CompanyManagment.App.Contracts/SmsResult/ISmsSettingApplication.cs +++ b/CompanyManagment.App.Contracts/SmsResult/ISmsSettingApplication.cs @@ -68,4 +68,11 @@ public interface ISmsSettingApplication /// /// Task InstantSendReminderSms(List command); + + /// + /// ارسال پیامک مسدودس + /// + /// + /// + Task InstantSendBlockSms(List command); } \ No newline at end of file diff --git a/CompanyManagment.Application/SmsSettingApplication.cs b/CompanyManagment.Application/SmsSettingApplication.cs index 97414be5..5888d331 100644 --- a/CompanyManagment.Application/SmsSettingApplication.cs +++ b/CompanyManagment.Application/SmsSettingApplication.cs @@ -144,4 +144,22 @@ public class SmsSettingApplication : ISmsSettingApplication } + + public async Task InstantSendBlockSms(List command) + { + var op = new OperationResult(); + string typeOfSms = "اعلام مسدودی طرف حساب"; + string sendMessStart = "شروع مسدودی آنی"; + string sendMessEnd = "پایان مسدودی آنی "; + if (command.Any()) + { + await _institutionContractRepository.SendBlockSmsToContractingParties(command, typeOfSms, sendMessStart, + sendMessEnd); + return op.Succcedded(); + } + else + { + return op.Failed("موردی انتخاب نشده است"); + } + } } \ No newline at end of file diff --git a/CompanyManagment.EFCore/Repository/InstitutionContractRepository.cs b/CompanyManagment.EFCore/Repository/InstitutionContractRepository.cs index fd385123..2d1c5426 100644 --- a/CompanyManagment.EFCore/Repository/InstitutionContractRepository.cs +++ b/CompanyManagment.EFCore/Repository/InstitutionContractRepository.cs @@ -3585,6 +3585,8 @@ public class InstitutionContractRepository : RepositoryBase - /// لود مودال ارسال پیامک مسدودس + /// لود مودال ارسال پیامک مسدودی /// /// /// - public async Task OnGetInstantBlockSendSms(TypeOfSmsSetting typeOfSmsSetting) + public async Task OnGetInstantBlockSms(TypeOfSmsSetting typeOfSmsSetting) { - return Partial("_SmsSettingPartials/InstantSms"); + return Partial("_SmsSettingPartials/InstantBlockSms"); + } + + /// + /// لود دیتای ارسال پیامک مسدودس آنی + /// + /// + public async Task OnGetInstantBlockSendSms() + { + var dataModel = await _smsSettingApplication.GetBlockSmsListData(TypeOfSmsSetting.InstitutionContractDebtReminder); + return Partial("_SmsSettingPartials/_InstantSendBlockSms", dataModel); + } + + /// + /// ارسال پیامک مسدودی آنی + /// + /// + public async Task OnPostInstantBlockSendSms([FromBody] List command) + { + + var result = await _smsSettingApplication.InstantSendBlockSms(command); + return new JsonResult(new + { + isSuccess = result.IsSuccedded, + message = result.Message + }); } //=================================== تب ها ========================================// diff --git a/ServiceHost/Areas/Admin/Pages/Company/SmsResult/_SmsSettingPartials/BlockSmsListData.cshtml b/ServiceHost/Areas/Admin/Pages/Company/SmsResult/_SmsSettingPartials/BlockSmsListData.cshtml index da5f1314..c66afe51 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/SmsResult/_SmsSettingPartials/BlockSmsListData.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/SmsResult/_SmsSettingPartials/BlockSmsListData.cshtml @@ -72,7 +72,7 @@ + style="border-radius:5px;" href="#showmodal=@Url.Page("./SmsSettings", "InstantBlockSms")"> diff --git a/ServiceHost/Areas/Admin/Pages/Company/SmsResult/_SmsSettingPartials/InstantBlockSms.cshtml b/ServiceHost/Areas/Admin/Pages/Company/SmsResult/_SmsSettingPartials/InstantBlockSms.cshtml new file mode 100644 index 00000000..189bbaf4 --- /dev/null +++ b/ServiceHost/Areas/Admin/Pages/Company/SmsResult/_SmsSettingPartials/InstantBlockSms.cshtml @@ -0,0 +1,232 @@ +@Html.AntiForgeryToken() +@{ + +} + + ارسال آنی پیامک یادآور + + × + + + + + + + + + ردیف + نام طرف حساب + شماره تماس + مبلغ بدهی + + تیک ارسال + + + + + + + + + + + + + درصد ارسال پیامک ها + + + + + + + + + + + + + + + + + + + @for (var j = 0; j < 16; j++) + { + + } + + + + + + + + + diff --git a/ServiceHost/Areas/Admin/Pages/Company/SmsResult/_SmsSettingPartials/_InstantSendBlockSms.cshtml b/ServiceHost/Areas/Admin/Pages/Company/SmsResult/_SmsSettingPartials/_InstantSendBlockSms.cshtml new file mode 100644 index 00000000..a83da408 --- /dev/null +++ b/ServiceHost/Areas/Admin/Pages/Company/SmsResult/_SmsSettingPartials/_InstantSendBlockSms.cshtml @@ -0,0 +1,100 @@ +@model List +@{ + int countIndex = 1; + + +} + + + +@foreach (var item in Model) +{ + + + + + @countIndex + @item.PartyName + @item.PhoneNumber + @item.Amount + + + + + + + + + + + @{ + countIndex++; + } + + + + + + + + + + +} \ No newline at end of file