diff --git a/Company.Domain/EmployeeComputeOptionsAgg/IEmployeeComputeOptionsRepository.cs b/Company.Domain/EmployeeComputeOptionsAgg/IEmployeeComputeOptionsRepository.cs index 6318b1d6..26146b9f 100644 --- a/Company.Domain/EmployeeComputeOptionsAgg/IEmployeeComputeOptionsRepository.cs +++ b/Company.Domain/EmployeeComputeOptionsAgg/IEmployeeComputeOptionsRepository.cs @@ -5,6 +5,7 @@ using System.Text; using System.Threading.Tasks; using _0_Framework.Domain; using CompanyManagment.App.Contracts.EmployeeComputeOptions; +using CompanyManagment.App.Contracts.Workshop; namespace Company.Domain.EmployeeComputeOptionsAgg { @@ -14,5 +15,7 @@ namespace Company.Domain.EmployeeComputeOptionsAgg EmployeeComputeOptionsViewModel GetEmployeeOptions(long workshopId, long employeeId); List GetAllByWorkshopId(long workshopId); + + List TestBonusesBugWorkshops(); } } diff --git a/CompanyManagment.App.Contracts/TemporaryClientRegistration/ITemporaryClientRegistrationApplication.cs b/CompanyManagment.App.Contracts/TemporaryClientRegistration/ITemporaryClientRegistrationApplication.cs index d749485a..600cc0b3 100644 --- a/CompanyManagment.App.Contracts/TemporaryClientRegistration/ITemporaryClientRegistrationApplication.cs +++ b/CompanyManagment.App.Contracts/TemporaryClientRegistration/ITemporaryClientRegistrationApplication.cs @@ -46,4 +46,14 @@ public interface ITemporaryClientRegistrationApplication /// /// InstitutionPlanViewModel GetInstitutionPlanForWorkshop(WorkshopTempViewModel workshop); + + /// + /// دریافت مبالغ بررسی و پرداخت + /// + /// + /// + /// + /// + Task GetTotalPaymentAndWorkshopList(long contractingPartyTempId, + string periodModel = "12", string paymentModel = "OneTime"); } \ No newline at end of file diff --git a/CompanyManagment.App.Contracts/TemporaryClientRegistration/ReviewAndPaymentViewModel.cs b/CompanyManagment.App.Contracts/TemporaryClientRegistration/ReviewAndPaymentViewModel.cs index c2c2ea70..979feced 100644 --- a/CompanyManagment.App.Contracts/TemporaryClientRegistration/ReviewAndPaymentViewModel.cs +++ b/CompanyManagment.App.Contracts/TemporaryClientRegistration/ReviewAndPaymentViewModel.cs @@ -5,63 +5,19 @@ namespace CompanyManagment.App.Contracts.TemporaryClientRegistration; public class ReviewAndPaymentViewModel { /// - /// جمع کل برای یک ماه + /// جمع کل /// double /// - public double TotalPayment1MonthDouble { get; set; } + public double SumOfWorkshopsPaymentDouble { get; set; } /// - /// جمع کل برای یک ماه + /// جمع کل /// string /// - public string TotalPayment1MonthStr { get; set; } + public string SumOfWorkshopsPaymentPaymentStr { get; set; } - /// - /// جمع کل برای 3 ماه - /// double - /// - public double TotalPayment3MonthsDouble { get; set; } - - /// - /// جمع کل برای 3 ماه - /// string - /// - public string TotalPayment3MonthsStr { get; set; } - - - - - /// - /// جمع کل برای 6 ماه - /// double - /// - public double TotalPayment6MonthsDouble { get; set; } - - /// - /// جمع کل برای 6 ماه - /// string - /// - public string TotalPayment6MonthsStr { get; set; } - - - - - - - /// - /// جمع کل برای 12 ماه - /// double - /// - public double TotalPayment12MonthsDouble { get; set; } - - /// - /// جمع کل برای 12 ماه - /// string - /// - public string TotalPayment12MonthsStr { get; set; } - @@ -70,28 +26,16 @@ public class ReviewAndPaymentViewModel /// مبلغ پرداخت یکجا /// Double /// - public double OneTimePaymentDouble { get; set; } + public double TotalPaymentDouble { get; set; } /// /// مبلغ پرداخت یکجا /// string /// - public string OneTimePaymentStr { get; set; } + public string TotalPaymentStr { get; set; } - /// - /// مبلغ پرداخت مرحله ای - /// Double - /// - public double MonthlyPaymentDouble { get; set; } - - /// - /// مبلغ پرداخت مرحله ای - /// string - /// - public string MonthlyPaymentStr { get; set; } - /// /// بازه قرداد @@ -101,9 +45,9 @@ public class ReviewAndPaymentViewModel public string PeriodModel { get; set; } /// - /// مدل پرداخت - /// پر میشود OneTime پرداخت یکجا با کلمه - /// پر میشود Monthly پرداخت مرحله ای با کلمه + /// OneTime پرداخت یکجا + /// - + /// Monthly پرداخت ماهانه /// public string PaymentModel { get; set; } @@ -111,4 +55,9 @@ public class ReviewAndPaymentViewModel /// لیست کارگاه های ایجاد شده /// public List WorkshopTempViewList { get; set; } + + /// + /// آی دی طرف حساب + /// + public long ContractingPartTempId { get; set; } } \ No newline at end of file diff --git a/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs b/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs index 66bd63b3..b3c12dbe 100644 --- a/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs +++ b/CompanyManagment.Application/TemporaryClientRegistrationApplication.cs @@ -186,7 +186,7 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati foreach (var workshop in updateWorkshopList) { - if (!string.IsNullOrWhiteSpace(workshop.WorkshopName)) + if (string.IsNullOrWhiteSpace(workshop.WorkshopName)) return op.Failed("نام مجموعه نمی تواند خالی باشد"); if (workshop.CountPerson == 0) op.Failed($"تعداد پرسنل مجوعه {workshop.WorkshopName} صفر است"); @@ -254,7 +254,7 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati foreach (var workshop in createNewWorkshopList) { - if (!string.IsNullOrWhiteSpace(workshop.WorkshopName)) + if (string.IsNullOrWhiteSpace(workshop.WorkshopName)) return op.Failed("نام مجموعه نمی تواند خالی باشد"); if (workshop.CountPerson == 0) op.Failed($"تعداد پرسنل مجوعه {workshop.WorkshopName} صفر است"); @@ -334,7 +334,7 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati /// /// /// - public async Task GetTotalPaymentAndWorkshopList(long contractingPartyTempId) + public async Task GetTotalPaymentAndWorkshopList(long contractingPartyTempId, string periodModel = "12", string paymentModel = "OneTime") { //دریافت کارگاه ها var workshops = await _workshopTempRepository.GetWorkshopTemp(contractingPartyTempId); @@ -347,30 +347,44 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati totalPayment1MonthDouble += workshop.WorkshopServicesAmount; } + if(totalPayment1MonthDouble == 0) + return new ReviewAndPaymentViewModel(); var result = new ReviewAndPaymentViewModel(); - result.TotalPayment1MonthDouble = totalPayment1MonthDouble; - result.TotalPayment1MonthStr = totalPayment1MonthDouble.ToMoney(); - - result.TotalPayment3MonthsDouble = totalPayment1MonthDouble * 3; - result.TotalPayment3MonthsStr = result.TotalPayment3MonthsDouble.ToMoney(); - - result.TotalPayment6MonthsDouble = totalPayment1MonthDouble * 6; - result.TotalPayment6MonthsStr = result.TotalPayment6MonthsDouble.ToMoney(); - - result.TotalPayment12MonthsDouble = totalPayment1MonthDouble * 12; - result.TotalPayment12MonthsStr = result.TotalPayment12MonthsDouble.ToMoney(); + int months = 0; + months = periodModel switch + { + "1" => 1, + "3" => 3, + "6" => 6, + "12" => 12, + _ => 12, + }; + //رند کردن مبالغ کارگاه ها + var roundAmount = (int)(totalPayment1MonthDouble / 1000000) * 1000000; + //بدست آوردن جمع کل مبالغ کارگاه بر اساس مدت قراداد + result.SumOfWorkshopsPaymentDouble = roundAmount * months; + result.SumOfWorkshopsPaymentPaymentStr = result.SumOfWorkshopsPaymentDouble.ToMoney(); - result.PeriodModel = "1"; - result.PaymentModel = "OneTime"; + result.PeriodModel = periodModel; + result.PaymentModel = paymentModel; - result.OneTimePaymentDouble = totalPayment1MonthDouble; - result.OneTimePaymentStr = totalPayment1MonthDouble.ToMoney(); + if (paymentModel == "OneTime")//تخفیف 10 درصدی درصورت پرداخت یکجا + { + var tenPercent = result.SumOfWorkshopsPaymentDouble * 10 / 100; + double discountOneTimePeyment = result.SumOfWorkshopsPaymentDouble - tenPercent; + result.TotalPaymentDouble = discountOneTimePeyment; + result.TotalPaymentStr = discountOneTimePeyment.ToMoney(); + } + else + { + result.TotalPaymentDouble = result.SumOfWorkshopsPaymentDouble; + result.TotalPaymentStr = result.SumOfWorkshopsPaymentPaymentStr; + } - result.MonthlyPaymentDouble = totalPayment1MonthDouble; - result.MonthlyPaymentStr = totalPayment1MonthDouble.ToMoney(); + result.ContractingPartTempId = contractingPartyTempId; return result; diff --git a/CompanyManagment.EFCore/Repository/EmployeeComputeOptionsRepository.cs b/CompanyManagment.EFCore/Repository/EmployeeComputeOptionsRepository.cs index 74a9c979..759b4dc7 100644 --- a/CompanyManagment.EFCore/Repository/EmployeeComputeOptionsRepository.cs +++ b/CompanyManagment.EFCore/Repository/EmployeeComputeOptionsRepository.cs @@ -1,8 +1,13 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; +using _0_Framework.Application; using _0_Framework.InfraStructure; using Company.Domain.EmployeeComputeOptionsAgg; +using CompanyManagment.App.Contracts.Checkout; using CompanyManagment.App.Contracts.EmployeeComputeOptions; +using CompanyManagment.App.Contracts.Workshop; +using Microsoft.EntityFrameworkCore; namespace CompanyManagment.EFCore.Repository; @@ -52,6 +57,9 @@ public class EmployeeComputeOptionsRepository : RepositoryBase GetAllByWorkshopId(long workshopId) { + + + return _context.EmployeeComputeOptionsSet.Select(x => new EmployeeComputeOptionsViewModel { Id = x.id, @@ -63,4 +71,86 @@ public class EmployeeComputeOptionsRepository : RepositoryBase x.WorkshopId == workshopId).ToList(); } -} \ No newline at end of file + + public List TestBonusesBugWorkshops() + { + var beforDate = new DateTime(2025, 04, 10, 16, 15, 0); + var options = _context.Workshops.Where(x => x.BonusesOptions == "OnEndOfYear") + .Join( + _context.CheckoutSet.Where(c => + c.BaseYearsPay > 0 && c.Year == "1403" && c.Month == "اسفند" && c.BonusesPay > 0 && c.CreationDate < beforDate), + option => option.id, + checkout => checkout.WorkshopId, (option, checkout) => new { option, checkout }).Select(ch => + new CheckoutViewModel() + { + Id = ch.checkout.id, + EmployeeId = ch.checkout.EmployeeId, + WorkshopId = ch.checkout.WorkshopId, + WorkshopName = ch.checkout.WorkshopName, + EmployeeFullName = ch.checkout.EmployeeFullName, + + Year = ch.checkout.Year, + Month = ch.checkout.Month, + + MonthlySalary = ch.checkout.MonthlySalary.ToMoney(), + BaseYearsPay = ch.checkout.BaseYearsPay.ToMoney(), + BonusesPay = ch.checkout.BonusesPay.ToMoney(), + Signature = ch.checkout.Signature, + + }); + var workshopIds = options.GroupBy(x => x.WorkshopId).Select(x => x.Key); + + + var res = _context.Workshops.Where(x => workshopIds.Contains(x.id)).Select(x => new WorkshopViewModel() + { + Id = x.id, + WorkshopFullName = x.WorkshopFullName, + IsActiveString = "", + //foreach (var item in workshops) + //{ + + // Console.WriteLine(" workshopId : " + item.id + " workshopName : " + item.WorkshopFullName); + //} + //Console.WriteLine(" Count All : " + workshopIds.Count()); + //Console.WriteLine(" Count Signed : " + options.Count(x => x.Signature == "1")); + //Console.WriteLine(" Count NotSigned: " + options.Count(x => x.Signature == "0")); + }).ToList(); + var result = res.Select(n => + { + var idList = options.Where(o => o.WorkshopId == n.Id).Select(o => o.Id).ToList(); + var checkoutIds = GetCheckoutIds(idList); + return new WorkshopViewModel() + { + Id = n.Id, + WorkshopFullName = n.WorkshopFullName, + IsActiveString = checkoutIds, + + }; + + + }).OrderBy(n=>n.Id).ToList(); + return result; + } + private string GetCheckoutIds(List ids) + { + string idList = ""; + int counter = 1; + foreach (var item in ids) + { + if (counter == 1) + { + idList = $"{item}"; + } + else + { + idList = $"{idList}+{item}"; + } + + counter++; + + } + return idList; + } +} + + diff --git a/CompanyManagment.EFCore/Repository/YearlySalaryRepository.cs b/CompanyManagment.EFCore/Repository/YearlySalaryRepository.cs index 15a84047..6c357eab 100644 --- a/CompanyManagment.EFCore/Repository/YearlySalaryRepository.cs +++ b/CompanyManagment.EFCore/Repository/YearlySalaryRepository.cs @@ -602,7 +602,7 @@ public class YearlySalaryRepository : RepositoryBase, IYearl var DayliSalaryStep1 = salary.FirstOrDefault(x => x.Year == "1370")! .YearlySalaryItemsList.Where(x => x.ItemName == "مزد روزانه").Select(x => x.ItemValue).FirstOrDefault(); var DayliSalaryStep1Fa = DayliSalaryStep1.ToMoney(); - double firstDayliSalary = DayliSalaryStep1Fa.MoneyToDouble(); + double firstDayliSalary = DayliSalaryStep1; int counter = 0; foreach (var item in salary) { @@ -623,7 +623,7 @@ public class YearlySalaryRepository : RepositoryBase, IYearl //مزد پایه var BaseResult = Sum + fixFeePrice; var baseResultFa = BaseResult.ToMoney(); - var res = GetRoundValue(BaseResult); + var res = BaseResult; if (currentDayliFee != res) { Console.BackgroundColor = ConsoleColor.DarkRed; @@ -636,7 +636,7 @@ public class YearlySalaryRepository : RepositoryBase, IYearl } //Console.WriteLine($"{item.Year} defualtFa : {currentDayliFee.ToMoney()} dailFeeFa : {BaseResult.ToMoney()} "); - firstDayliSalary = GetRoundValue(currentDayliFee); + firstDayliSalary = currentDayliFee; } @@ -645,6 +645,35 @@ public class YearlySalaryRepository : RepositoryBase, IYearl //مقدار اولیه مزد روزانه + } + + private double CurrectFirstDailyFee(double value,string year) + { + double currcted = 0; + switch (year) + { + case "1370": currcted = value; + break; + case "1371": currcted = value; + break; + case "1372": + currcted = Math.Round(value, MidpointRounding.ToPositiveInfinity); + break; + case "1373": + currcted = value; + break; + case "1374": + currcted = value; + break; + case "1375": + currcted = value; + break; + + + } + + return currcted; + } //محاسبه حقوق روزانه #region DayliSalary diff --git a/ServiceHost/Areas/Admin/Pages/Index.cshtml b/ServiceHost/Areas/Admin/Pages/Index.cshtml index 22c53614..73372ae5 100644 --- a/ServiceHost/Areas/Admin/Pages/Index.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Index.cshtml @@ -211,6 +211,22 @@ + + diff --git a/ServiceHost/Areas/AdminNew/Pages/Company/Test/Index.cshtml b/ServiceHost/Areas/AdminNew/Pages/Company/Test/Index.cshtml new file mode 100644 index 00000000..16dfb585 --- /dev/null +++ b/ServiceHost/Areas/AdminNew/Pages/Company/Test/Index.cshtml @@ -0,0 +1,37 @@ +@page +@model ServiceHost.Areas.AdminNew.Pages.Company.Test.IndexModel +@{ + int index = 1; +} + + +
+
+ + @foreach (var item in @Model.WorkshopList) + { +
+
@index
+
+
@item.WorkshopFullName
+
+
+

@item.Id

+
+ + @{ + index = index + 1; + } +
+ + } +
+ diff --git a/ServiceHost/Areas/AdminNew/Pages/Company/Test/Index.cshtml.cs b/ServiceHost/Areas/AdminNew/Pages/Company/Test/Index.cshtml.cs new file mode 100644 index 00000000..b68c3fcd --- /dev/null +++ b/ServiceHost/Areas/AdminNew/Pages/Company/Test/Index.cshtml.cs @@ -0,0 +1,23 @@ +using Company.Domain.EmployeeComputeOptionsAgg; +using CompanyManagment.App.Contracts.Workshop; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace ServiceHost.Areas.AdminNew.Pages.Company.Test; + +public class IndexModel : PageModel +{ + private readonly IEmployeeComputeOptionsRepository _employeeComputeOptionsRepository; + + public List WorkshopList { get; set; } + public IndexModel(IEmployeeComputeOptionsRepository employeeComputeOptionsRepository) + { + _employeeComputeOptionsRepository = employeeComputeOptionsRepository; + } + + public void OnGet() + { + WorkshopList = _employeeComputeOptionsRepository.TestBonusesBugWorkshops(); + Console.WriteLine("d"); + } +} \ No newline at end of file diff --git a/ServiceHost/Areas/Client/Pages/Company/RollCall/EmployeeUploadPicture.cshtml.cs b/ServiceHost/Areas/Client/Pages/Company/RollCall/EmployeeUploadPicture.cshtml.cs index 8ff189ae..2a707653 100644 --- a/ServiceHost/Areas/Client/Pages/Company/RollCall/EmployeeUploadPicture.cshtml.cs +++ b/ServiceHost/Areas/Client/Pages/Company/RollCall/EmployeeUploadPicture.cshtml.cs @@ -267,6 +267,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall var employeeSettings = _customizeWorkshopSettingsApplication.GetByEmployeeIdAndWorkshopIdIncludeGroupSettings(_workshopId, employeeId); + var employeeClientTemp = _employeeClientTemp.GetDetails(employeeId, _workshopId); if (employeeClientTemp != null) diff --git a/ServiceHost/Faces/170/5349/1.jpg b/ServiceHost/Faces/170/5349/1.jpg new file mode 100644 index 00000000..faff4ab9 Binary files /dev/null and b/ServiceHost/Faces/170/5349/1.jpg differ diff --git a/ServiceHost/Faces/170/5349/2.jpg b/ServiceHost/Faces/170/5349/2.jpg new file mode 100644 index 00000000..2f0fcee5 Binary files /dev/null and b/ServiceHost/Faces/170/5349/2.jpg differ diff --git a/ServiceHost/Faces/170/5349/Thumbnail.jpg b/ServiceHost/Faces/170/5349/Thumbnail.jpg new file mode 100644 index 00000000..7d818089 Binary files /dev/null and b/ServiceHost/Faces/170/5349/Thumbnail.jpg differ diff --git a/ServiceHost/InsuranceList/294/1403_11/DSKKAR00.dbf b/ServiceHost/InsuranceList/294/1403_11/DSKKAR00.dbf new file mode 100644 index 00000000..7a4bf8c9 Binary files /dev/null and b/ServiceHost/InsuranceList/294/1403_11/DSKKAR00.dbf differ diff --git a/ServiceHost/InsuranceList/294/1403_11/DSKWOR00.dbf b/ServiceHost/InsuranceList/294/1403_11/DSKWOR00.dbf new file mode 100644 index 00000000..d14396d2 Binary files /dev/null and b/ServiceHost/InsuranceList/294/1403_11/DSKWOR00.dbf differ diff --git a/ServiceHost/Pages/Index.cshtml.cs b/ServiceHost/Pages/Index.cshtml.cs index e59ead35..de27019a 100644 --- a/ServiceHost/Pages/Index.cshtml.cs +++ b/ServiceHost/Pages/Index.cshtml.cs @@ -11,6 +11,7 @@ using _0_Framework.Application.UID; using AccountManagement.Application.Contracts.CameraAccount; using CompanyManagment.EFCore; using Company.Domain.EmployeeAgg; +using Company.Domain.EmployeeComputeOptionsAgg; using Company.Domain.ReportAgg; using Company.Domain.RollCallAgg; using Company.Domain.RollCallAgg.DomainService; @@ -51,13 +52,14 @@ namespace ServiceHost.Pages private readonly IAndroidApkVersionApplication _androidApkVersionApplication; private readonly ITemporaryClientRegistrationApplication _clientRegistrationApplication; private readonly IYearlySalaryRepository _yearlySalaryRepository; + private readonly IEmployeeComputeOptionsRepository _computeOptions; public IndexModel(ILogger logger, IAccountApplication accountApplication, IGoogleRecaptcha googleRecaptcha, ISmsService smsService, IWorker worker, IAuthHelper authHelper, ICameraAccountApplication cameraAccountApplication, IWebHostEnvironment webHostEnvironment, - IAndroidApkVersionApplication androidApkVersionApplication, ITemporaryClientRegistrationApplication clientRegistrationApplication, IYearlySalaryRepository yearlySalaryRepository) + IAndroidApkVersionApplication androidApkVersionApplication, ITemporaryClientRegistrationApplication clientRegistrationApplication, IYearlySalaryRepository yearlySalaryRepository, IEmployeeComputeOptionsRepository computeOptions) { _logger = logger; _accountApplication = accountApplication; @@ -70,66 +72,119 @@ namespace ServiceHost.Pages _androidApkVersionApplication = androidApkVersionApplication; _clientRegistrationApplication = clientRegistrationApplication; _yearlySalaryRepository = yearlySalaryRepository; + _computeOptions = computeOptions; } public IActionResult OnGet() { - //_yearlySalaryRepository.TestDayliFeeCompute(); + // _computeOptions.GetAllByWorkshopId(170); + //_yearlySalaryRepository.TestDayliFeeCompute(); bool ex = false; //while (!ex) //{ - // Console.WriteLine("enter National code ... "); - // var nationalCode = Console.ReadLine(); - // Console.WriteLine("enter DateOfBirth ... "); - // var dateOfBirth = Console.ReadLine(); - // Console.WriteLine("enter phoneNumber ... "); - // var phone = Console.ReadLine(); - // var res =_clientRegistrationApplication.CreateContractingPartyTemp(nationalCode, dateOfBirth, phone).GetAwaiter().GetResult(); - // Console.WriteLine("do you want to exit ... "); - // var exitCheck = Console.ReadLine(); - // if (exitCheck == "yes") - // ex = true; + // Console.WriteLine("enter National code ... "); + // var nationalCode = Console.ReadLine(); + // Console.WriteLine("enter DateOfBirth ... "); + // var dateOfBirth = Console.ReadLine(); + // Console.WriteLine("enter phoneNumber ... "); + // var phone = Console.ReadLine(); + // var res = _clientRegistrationApplication.CreateContractingPartyTemp(nationalCode, dateOfBirth, phone).GetAwaiter().GetResult(); + // if (res.IsSuccedded) + // { + // var updateAddress = + // _clientRegistrationApplication.UpdateAddress(res.Data.Id, "gilan", "rasht", "hajiabad").GetAwaiter().GetResult(); + // if (updateAddress.IsSuccedded) + // { + // var workshopSelected = _clientRegistrationApplication.GetWorkshopTemp(res.Data.Id).GetAwaiter().GetResult(); + // if (workshopSelected.Count > 0) + // { + // var result = _clientRegistrationApplication.GetTotalPaymentAndWorkshopList(res.Data.Id).GetAwaiter().GetResult(); + // Console.WriteLine("sumOfWorkshopPayment : " + result.SumOfWorkshopsPaymentDouble); + // Console.WriteLine("sumOfWorkshopPayment : " + result.TotalPaymentDouble); + // } + // else + // { + // var workshops = new List(); + // workshops.Add(new WorkshopTempViewModel + // { + // ContractAndCheckout = true, + // ContractingPartyTempId = res.Data.Id, + // CountPerson = 10, + // CustomizeCheckout = true, + // Insurance = true, + // RollCall = true, + // WorkshopName = "dadmehr", + + // }); + // workshops.Add(new WorkshopTempViewModel + // { + // ContractAndCheckout = true, + // ContractingPartyTempId = res.Data.Id, + // CountPerson = 20, + // CustomizeCheckout = true, + // Insurance = true, + // RollCall = true, + // WorkshopName = "kababMahdi", + + // }); + // var creteWorkshops = _clientRegistrationApplication.CreateOrUpdateWorkshopTemp(workshops) + // .GetAwaiter().GetResult(); + + // if (creteWorkshops.IsSuccedded) + // { + // var result = _clientRegistrationApplication.GetTotalPaymentAndWorkshopList(res.Data.Id).GetAwaiter().GetResult(); + // Console.WriteLine("sumOfWorkshopPayment : " + result.SumOfWorkshopsPaymentDouble); + // Console.WriteLine("sumOfWorkshopPayment : " + result.TotalPaymentDouble); + // } + // } + + // } + // } + // Console.WriteLine("do you want to exit ... "); + // var exitCheck = Console.ReadLine(); + // if (exitCheck == "yes") + // ex = true; //} - // while (!ex) - // { - // var onGet = _institutionPlanApplication.GetByFirst(); - // Console.WriteLine("enter ContractAndCheckoutInPersonPercent ... " + onGet.ContractAndCheckoutInPersonPercent); + // while (!ex) + // { + // var onGet = _institutionPlanApplication.GetByFirst(); + // Console.WriteLine("enter ContractAndCheckoutInPersonPercent ... " + onGet.ContractAndCheckoutInPersonPercent); // var ContractAndCheckoutInPersonPercent = Console.ReadLine(); // Console.WriteLine("enter ContractAndCheckoutPercent ... " + onGet.ContractAndCheckoutPercent); // var ContractAndCheckoutPercent = Console.ReadLine(); - // Console.WriteLine("enter InsurancePercent ... " + onGet.InsurancePercent); - // var InsurancePercent = Console.ReadLine(); - // Console.WriteLine("enter InsuranceInPersonPercent ... " + onGet.InsuranceInPersonPercent); - // var InsuranceInPersonPercent = Console.ReadLine(); + // Console.WriteLine("enter InsurancePercent ... " + onGet.InsurancePercent); + // var InsurancePercent = Console.ReadLine(); + // Console.WriteLine("enter InsuranceInPersonPercent ... " + onGet.InsuranceInPersonPercent); + // var InsuranceInPersonPercent = Console.ReadLine(); - // Console.WriteLine("enter CustomizeCheckoutPercent ... " + onGet.CustomizeCheckoutPercent); - // var CustomizeCheckoutPercent = Console.ReadLine(); - // Console.WriteLine("enter RollCallPercent ... " + onGet.RollCallPercent); - // var RollCallPercent = Console.ReadLine(); - // //var res = _institutionPlanApplication.GetInstitutionPlanList(Convert.ToInt32(pageIndex), - // // Convert.ToInt32(countPerson)); + // Console.WriteLine("enter CustomizeCheckoutPercent ... " + onGet.CustomizeCheckoutPercent); + // var CustomizeCheckoutPercent = Console.ReadLine(); + // Console.WriteLine("enter RollCallPercent ... " + onGet.RollCallPercent); + // var RollCallPercent = Console.ReadLine(); + // //var res = _institutionPlanApplication.GetInstitutionPlanList(Convert.ToInt32(pageIndex), + // // Convert.ToInt32(countPerson)); - // var res = _institutionPlanApplication.CreateInstitutionPlanPercentage(new CreateInstitutionPlanPercentage() - // { - // ContractAndCheckoutInPersonPercentStr = ContractAndCheckoutInPersonPercent, - // ContractAndCheckoutPercentStr = ContractAndCheckoutPercent, - // InsurancePercentStr = InsurancePercent, - // InsuranceInPersonPercentStr = InsuranceInPersonPercent, - // CustomizeCheckoutPercentStr = CustomizeCheckoutPercent, - // RollCallPercentStr = RollCallPercent - // }); + // var res = _institutionPlanApplication.CreateInstitutionPlanPercentage(new CreateInstitutionPlanPercentage() + // { + // ContractAndCheckoutInPersonPercentStr = ContractAndCheckoutInPersonPercent, + // ContractAndCheckoutPercentStr = ContractAndCheckoutPercent, + // InsurancePercentStr = InsurancePercent, + // InsuranceInPersonPercentStr = InsuranceInPersonPercent, + // CustomizeCheckoutPercentStr = CustomizeCheckoutPercent, + // RollCallPercentStr = RollCallPercent + // }); - // Console.WriteLine("do you want to exit ... "); + // Console.WriteLine("do you want to exit ... "); // var exitCheck = Console.ReadLine(); // if (exitCheck == "y") // ex = true; //} - // _reportRepository.GetAllActiveWorkshopsNew("1403", "12"); + // _reportRepository.GetAllActiveWorkshopsNew("1403", "12"); - //var test = _uidService.GetPersonalInfo("2669318622", "1363/02/25"); - HasApkToDownload = _androidApkVersionApplication.HasAndroidApkToDownload(); + //var test = _uidService.GetPersonalInfo("2669318622", "1363/02/25"); + HasApkToDownload = _androidApkVersionApplication.HasAndroidApkToDownload(); if (User.Identity is { IsAuthenticated: true }) { if (User.FindFirstValue("IsCamera") == "true") diff --git a/ServiceHost/wwwroot/AssetsClient/pages/RollCall/js/ModalTakeImages.js b/ServiceHost/wwwroot/AssetsClient/pages/RollCall/js/ModalTakeImages.js index 53fd6bb5..0acded60 100644 --- a/ServiceHost/wwwroot/AssetsClient/pages/RollCall/js/ModalTakeImages.js +++ b/ServiceHost/wwwroot/AssetsClient/pages/RollCall/js/ModalTakeImages.js @@ -1327,13 +1327,14 @@ function loadWorkshopSettingList() { success: function (response) { $('#footer-section').hide(); var responseData = response.data; - + console.log(workshopSettingEmployeeSelecting); + /* ${ workshopSettingEmployeeSelecting.name === item.groupName ? 'selected' : '' }*/ if (response.success) { var groupOptionsHtml = ''; responseData.groupSettings.forEach(function (item) { - groupOptionsHtml += ``; - + groupOptionsHtml += ``; +