TemporaryClientRegister -ReviewAndPayment
This commit is contained in:
@@ -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<EmployeeComputeOptionsViewModel> GetAllByWorkshopId(long workshopId);
|
||||
|
||||
List<WorkshopViewModel> TestBonusesBugWorkshops();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,4 +46,14 @@ public interface ITemporaryClientRegistrationApplication
|
||||
/// <param name="workshop"></param>
|
||||
/// <returns></returns>
|
||||
InstitutionPlanViewModel GetInstitutionPlanForWorkshop(WorkshopTempViewModel workshop);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت مبالغ بررسی و پرداخت
|
||||
/// </summary>
|
||||
/// <param name="contractingPartyTempId"></param>
|
||||
/// <param name="periodModel"></param>
|
||||
/// <param name="paymentModel"></param>
|
||||
/// <returns></returns>
|
||||
Task<ReviewAndPaymentViewModel> GetTotalPaymentAndWorkshopList(long contractingPartyTempId,
|
||||
string periodModel = "12", string paymentModel = "OneTime");
|
||||
}
|
||||
@@ -5,63 +5,19 @@ namespace CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||
public class ReviewAndPaymentViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// جمع کل برای یک ماه
|
||||
/// جمع کل
|
||||
/// double
|
||||
/// </summary>
|
||||
public double TotalPayment1MonthDouble { get; set; }
|
||||
public double SumOfWorkshopsPaymentDouble { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جمع کل برای یک ماه
|
||||
/// جمع کل
|
||||
/// string
|
||||
/// </summary>
|
||||
public string TotalPayment1MonthStr { get; set; }
|
||||
public string SumOfWorkshopsPaymentPaymentStr { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// جمع کل برای 3 ماه
|
||||
/// double
|
||||
/// </summary>
|
||||
public double TotalPayment3MonthsDouble { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جمع کل برای 3 ماه
|
||||
/// string
|
||||
/// </summary>
|
||||
public string TotalPayment3MonthsStr { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// جمع کل برای 6 ماه
|
||||
/// double
|
||||
/// </summary>
|
||||
public double TotalPayment6MonthsDouble { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جمع کل برای 6 ماه
|
||||
/// string
|
||||
/// </summary>
|
||||
public string TotalPayment6MonthsStr { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// جمع کل برای 12 ماه
|
||||
/// double
|
||||
/// </summary>
|
||||
public double TotalPayment12MonthsDouble { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جمع کل برای 12 ماه
|
||||
/// string
|
||||
/// </summary>
|
||||
public string TotalPayment12MonthsStr { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -70,28 +26,16 @@ public class ReviewAndPaymentViewModel
|
||||
/// مبلغ پرداخت یکجا
|
||||
/// Double
|
||||
/// </summary>
|
||||
public double OneTimePaymentDouble { get; set; }
|
||||
public double TotalPaymentDouble { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت یکجا
|
||||
/// string
|
||||
/// </summary>
|
||||
public string OneTimePaymentStr { get; set; }
|
||||
public string TotalPaymentStr { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت مرحله ای
|
||||
/// Double
|
||||
/// </summary>
|
||||
public double MonthlyPaymentDouble { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت مرحله ای
|
||||
/// string
|
||||
/// </summary>
|
||||
public string MonthlyPaymentStr { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// بازه قرداد
|
||||
@@ -101,9 +45,9 @@ public class ReviewAndPaymentViewModel
|
||||
public string PeriodModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مدل پرداخت
|
||||
/// پر میشود OneTime پرداخت یکجا با کلمه
|
||||
/// پر میشود Monthly پرداخت مرحله ای با کلمه
|
||||
/// OneTime پرداخت یکجا
|
||||
/// -
|
||||
/// Monthly پرداخت ماهانه
|
||||
/// </summary>
|
||||
public string PaymentModel { get; set; }
|
||||
|
||||
@@ -111,4 +55,9 @@ public class ReviewAndPaymentViewModel
|
||||
/// لیست کارگاه های ایجاد شده
|
||||
/// </summary>
|
||||
public List<WorkshopTempViewModel> WorkshopTempViewList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی طرف حساب
|
||||
/// </summary>
|
||||
public long ContractingPartTempId { get; set; }
|
||||
}
|
||||
@@ -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
|
||||
/// </summary>
|
||||
/// <param name="contractingPartyTempId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<ReviewAndPaymentViewModel> GetTotalPaymentAndWorkshopList(long contractingPartyTempId)
|
||||
public async Task<ReviewAndPaymentViewModel> 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;
|
||||
|
||||
|
||||
@@ -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<long, EmployeeCom
|
||||
|
||||
public List<EmployeeComputeOptionsViewModel> GetAllByWorkshopId(long workshopId)
|
||||
{
|
||||
|
||||
|
||||
|
||||
return _context.EmployeeComputeOptionsSet.Select(x => new EmployeeComputeOptionsViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
@@ -63,4 +71,86 @@ public class EmployeeComputeOptionsRepository : RepositoryBase<long, EmployeeCom
|
||||
|
||||
}).Where(x => x.WorkshopId == workshopId).ToList();
|
||||
}
|
||||
|
||||
public List<WorkshopViewModel> 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<long> ids)
|
||||
{
|
||||
string idList = "";
|
||||
int counter = 1;
|
||||
foreach (var item in ids)
|
||||
{
|
||||
if (counter == 1)
|
||||
{
|
||||
idList = $"{item}";
|
||||
}
|
||||
else
|
||||
{
|
||||
idList = $"{idList}+{item}";
|
||||
}
|
||||
|
||||
counter++;
|
||||
|
||||
}
|
||||
return idList;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -602,7 +602,7 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, 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<long, YearlySalary>, 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<long, YearlySalary>, IYearl
|
||||
}
|
||||
|
||||
//Console.WriteLine($"{item.Year} defualtFa : {currentDayliFee.ToMoney()} dailFeeFa : {BaseResult.ToMoney()} ");
|
||||
firstDayliSalary = GetRoundValue(currentDayliFee);
|
||||
firstDayliSalary = currentDayliFee;
|
||||
|
||||
}
|
||||
|
||||
@@ -645,6 +645,35 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, 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
|
||||
|
||||
@@ -212,6 +212,22 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card p-0">
|
||||
<div class="card-section-btn">
|
||||
<a class="btn loadingButton @(authHelper.GetPermissions().Any(x => x == 2) || authHelper.CurrentAccountId() == 14 ? "" : "disable")" asp-area="AdminNew" asp-page="/Company/Test/Index">
|
||||
<svg width="50" height="50" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M42.75 7.875H11.25C10.0125 7.875 9 8.8875 9 10.125V16.875C9 18.1125 10.0125 19.125 11.25 19.125H42.75C43.9875 19.125 45 18.1125 45 16.875V10.125C45 8.8875 43.9875 7.875 42.75 7.875ZM42.75 21.375H11.25C10.0125 21.375 9 22.3875 9 23.625V30.375C9 31.6125 10.0125 32.625 11.25 32.625H42.75C43.9875 32.625 45 31.6125 45 30.375V23.625C45 22.3875 43.9875 21.375 42.75 21.375ZM42.75 34.875H11.25C10.0125 34.875 9 35.8875 9 37.125V43.875C9 45.1125 10.0125 46.125 11.25 46.125H42.75C43.9875 46.125 45 45.1125 45 43.875V37.125C45 35.8875 43.9875 34.875 42.75 34.875Z" fill="#C4E8E8"/>
|
||||
<path d="M34.875 33.7492L42.75 40.0492V27.4492L34.875 33.7492Z" fill="#23A8A8"/>
|
||||
<path d="M42.75 31.5C42.4125 31.5 41.9625 31.5 41.625 31.6125V36.1125C41.9625 36 42.4125 36 42.75 36C46.4625 36 49.5 39.0375 49.5 42.75C49.5 46.4625 46.4625 49.5 42.75 49.5C39.0375 49.5 36 46.4625 36 42.75C36 42.4125 36 42.075 36.1125 41.7375L32.2875 38.7C31.8375 39.9375 31.5 41.2875 31.5 42.75C31.5 48.9375 36.5625 54 42.75 54C48.9375 54 54 48.9375 54 42.75C54 36.5625 48.9375 31.5 42.75 31.5Z" fill="#23A8A8"/>
|
||||
</svg>
|
||||
<p class="btn-title text-nowrap" style="margin: 0 5px 0 0">تست باگ</p>
|
||||
<div class="spinner-loading loading rounded-0" style="display: none;">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
37
ServiceHost/Areas/AdminNew/Pages/Company/Test/Index.cshtml
Normal file
37
ServiceHost/Areas/AdminNew/Pages/Company/Test/Index.cshtml
Normal file
@@ -0,0 +1,37 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.Test.IndexModel
|
||||
@{
|
||||
int index = 1;
|
||||
}
|
||||
|
||||
<div class="row">
|
||||
<div>
|
||||
<a asp-area="Admin" asp-page="/Index" class="back-btn" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
|
||||
@foreach (var item in @Model.WorkshopList)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-1">@index</div>
|
||||
<div class="col-6">
|
||||
<h5>@item.WorkshopFullName</h5>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<p>@item.Id</p>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<a asp-area="Admin" asp-page="/Company/Checkouts/CheckoutPrintAll" asp-route-idlist="@item.IsActiveString">پرینت</a>
|
||||
</div>
|
||||
@{
|
||||
index = index + 1;
|
||||
}
|
||||
</div>
|
||||
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -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<WorkshopViewModel> WorkshopList { get; set; }
|
||||
public IndexModel(IEmployeeComputeOptionsRepository employeeComputeOptionsRepository)
|
||||
{
|
||||
_employeeComputeOptionsRepository = employeeComputeOptionsRepository;
|
||||
}
|
||||
|
||||
public void OnGet()
|
||||
{
|
||||
WorkshopList = _employeeComputeOptionsRepository.TestBonusesBugWorkshops();
|
||||
Console.WriteLine("d");
|
||||
}
|
||||
}
|
||||
@@ -268,6 +268,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
_customizeWorkshopSettingsApplication.GetByEmployeeIdAndWorkshopIdIncludeGroupSettings(_workshopId,
|
||||
employeeId);
|
||||
|
||||
|
||||
var employeeClientTemp = _employeeClientTemp.GetDetails(employeeId, _workshopId);
|
||||
if (employeeClientTemp != null)
|
||||
{
|
||||
|
||||
BIN
ServiceHost/Faces/170/5349/1.jpg
Normal file
BIN
ServiceHost/Faces/170/5349/1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 250 KiB |
BIN
ServiceHost/Faces/170/5349/2.jpg
Normal file
BIN
ServiceHost/Faces/170/5349/2.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 253 KiB |
BIN
ServiceHost/Faces/170/5349/Thumbnail.jpg
Normal file
BIN
ServiceHost/Faces/170/5349/Thumbnail.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.6 KiB |
BIN
ServiceHost/InsuranceList/294/1403_11/DSKKAR00.dbf
Normal file
BIN
ServiceHost/InsuranceList/294/1403_11/DSKKAR00.dbf
Normal file
Binary file not shown.
BIN
ServiceHost/InsuranceList/294/1403_11/DSKWOR00.dbf
Normal file
BIN
ServiceHost/InsuranceList/294/1403_11/DSKWOR00.dbf
Normal file
Binary file not shown.
@@ -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<IndexModel> 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,10 +72,12 @@ namespace ServiceHost.Pages
|
||||
_androidApkVersionApplication = androidApkVersionApplication;
|
||||
_clientRegistrationApplication = clientRegistrationApplication;
|
||||
_yearlySalaryRepository = yearlySalaryRepository;
|
||||
_computeOptions = computeOptions;
|
||||
}
|
||||
|
||||
public IActionResult OnGet()
|
||||
{
|
||||
// _computeOptions.GetAllByWorkshopId(170);
|
||||
//_yearlySalaryRepository.TestDayliFeeCompute();
|
||||
bool ex = false;
|
||||
//while (!ex)
|
||||
@@ -85,6 +89,57 @@ namespace ServiceHost.Pages
|
||||
// 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<WorkshopTempViewModel>();
|
||||
// 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")
|
||||
|
||||
@@ -1327,11 +1327,12 @@ 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 = '<option value="0">انتخاب گروه ...</option>';
|
||||
responseData.groupSettings.forEach(function (item) {
|
||||
groupOptionsHtml += `<option value="${item.id}" data-name-group="${item.groupName}" ${workshopSettingEmployeeSelecting.name === item.groupName ? 'selected' : ''}>${item.groupName}</option>`;
|
||||
groupOptionsHtml += `<option value="${item.id}" data-name-group="${item.groupName}" ${workshopSettingEmployeeSelecting?.name === item.groupName ? 'selected' : ''}>${item.groupName}</option>`;
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user