Merge branch 'master' of https://github.com/samsyntax24/OriginalGozareshgir
This commit is contained in:
@@ -266,7 +266,8 @@ public class InstitutionContractPrintViewModel
|
||||
public string TaxPrice { get; set; }
|
||||
public string PaymentPrice { get; set; }
|
||||
public string VerifyCode { get; set; }
|
||||
public string VerifyDateTime { get; set; }
|
||||
public string VerifyDate { get; set; }
|
||||
public string VerifyTime { get; set; }
|
||||
public string VerifierFullName { get; set; }
|
||||
public string VerifierPhoneNumber { get; set; }
|
||||
public LawViewModel LawViewModel { get; set; }
|
||||
|
||||
@@ -2740,7 +2740,8 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
VerifierFullName = institution.VerifierFullName,
|
||||
VerifierPhoneNumber = institution.VerifierPhoneNumber,
|
||||
VerifyCode = institution.VerifyCode,
|
||||
VerifyDateTime = institution.VerifyCodeCreation.ToFarsi(),
|
||||
VerifyDate = institution.VerifyCodeCreation.ToFarsi(),
|
||||
VerifyTime = institution.VerifyCodeCreation.ToString("HH:mm:ss"),
|
||||
Workshops = institution.WorkshopGroup.CurrentWorkshops
|
||||
.Select(x => new GetInstitutionVerificationDetailsWorkshopsViewModel()
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||
using Company.Domain.RollCallAgg.DomainService;
|
||||
using Company.Domain.WorkshopAgg;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
using WorkFlow.Application.Contracts.RollCallConfirmedAbsence;
|
||||
using WorkFlow.Application.Contracts.RollCallConfirmedWithoutLunchBreak;
|
||||
@@ -23,7 +24,9 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
private readonly IRollCallDomainService _rollCallDomainService;
|
||||
private readonly IRollCallConfirmedWithoutLunchBreakRepository _rollCallConfirmedWithoutLunchBreakRepository;
|
||||
private readonly IEmployeeDocumentsApplication _employeeDocumentsApplication;
|
||||
public WorkFlowApplication(IRollCallConfirmedAbsenceRepository absenceRepository, IWorkFlowRollCallACL rollCallACL, IWorkFlowCheckoutACL checkoutACL, IWorkFlowCustomizedWorkshopSettingsACL customizedWorkshopSettingsACL, IRollCallConfirmedWithoutLunchBreakRepository rollCallConfirmedWithoutLunchBreakRepository, IRollCallDomainService rollCallDomainService, IEmployeeDocumentsApplication employeeDocumentsApplication)
|
||||
private readonly IWorkshopRepository _workshopRepository;
|
||||
|
||||
public WorkFlowApplication(IRollCallConfirmedAbsenceRepository absenceRepository, IWorkFlowRollCallACL rollCallACL, IWorkFlowCheckoutACL checkoutACL, IWorkFlowCustomizedWorkshopSettingsACL customizedWorkshopSettingsACL, IRollCallConfirmedWithoutLunchBreakRepository rollCallConfirmedWithoutLunchBreakRepository, IRollCallDomainService rollCallDomainService, IEmployeeDocumentsApplication employeeDocumentsApplication, IWorkshopRepository workshopRepository)
|
||||
{
|
||||
_absenceRepository = absenceRepository;
|
||||
_rollCallACL = rollCallACL;
|
||||
@@ -32,6 +35,7 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
_rollCallConfirmedWithoutLunchBreakRepository = rollCallConfirmedWithoutLunchBreakRepository;
|
||||
_rollCallDomainService = rollCallDomainService;
|
||||
_employeeDocumentsApplication = employeeDocumentsApplication;
|
||||
_workshopRepository = workshopRepository;
|
||||
}
|
||||
|
||||
public async Task<OperationResult> CreateRollCallConfirmedAbsence(CreateRollCallConfirmedAbsence command)
|
||||
@@ -416,10 +420,17 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
/// </summary>
|
||||
public async Task<List<DailyRollCallWorkFlowViewModel>> GetUndefinedRollCalls(long workshopId)
|
||||
{
|
||||
|
||||
var now = DateTime.Now;
|
||||
|
||||
DateTime.Now.Date.AddMonthsFa(-2, out var twoMonthsAgo);
|
||||
|
||||
//استثنا برای کارگاه پیتزا امیر برای برای نمایش ندادن کارپوشه قبل از 1 آبان 1404
|
||||
if(workshopId == 367 && twoMonthsAgo< new DateTime(2025,10,23))
|
||||
{
|
||||
twoMonthsAgo = new DateTime(2025,10,23);
|
||||
}
|
||||
|
||||
var lastCheckouts = _checkoutACL.GetLastCheckoutsByWorkshopIdForWorkFlow(workshopId, twoMonthsAgo, now);
|
||||
List<DailyRollCallWorkFlowViewModel> rollCalls = _rollCallACL.GetUndefinedRollCalls(workshopId, twoMonthsAgo, now.AddDays(-1).Date);
|
||||
var activeEmployees = _rollCallACL.GetActiveWorkshopRollCallEmployees(workshopId, twoMonthsAgo, now);
|
||||
@@ -443,10 +454,17 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
/// </summary>
|
||||
public async Task<List<DailyRollCallWorkFlowViewModel>> GetRollCallWorkFlowsCutByBgService(long workshopId)
|
||||
{
|
||||
|
||||
var now = DateTime.Now;
|
||||
|
||||
DateTime.Now.Date.AddMonthsFa(-2, out var twoMonthsAgo);
|
||||
|
||||
//استثنا برای کارگاه پیتزا امیر برای برای نمایش ندادن کارپوشه قبل از 1 آبان 1404
|
||||
if(workshopId == 367 && twoMonthsAgo< new DateTime(2025,10,23))
|
||||
{
|
||||
twoMonthsAgo = new DateTime(2025,10,23);
|
||||
}
|
||||
|
||||
var lastCheckouts = _checkoutACL.GetLastCheckoutsByWorkshopIdForWorkFlow(workshopId, twoMonthsAgo, now);
|
||||
var rollCalls = _rollCallACL.GetRollCallWorkFlowsCutByBgService(workshopId, twoMonthsAgo, now.AddDays(-1).Date);
|
||||
var activeEmployees = _rollCallACL.GetActiveWorkshopRollCallEmployees(workshopId, twoMonthsAgo, now);
|
||||
@@ -468,6 +486,11 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
|
||||
public async Task<int> CountCutByBgServiceLastMonth(long workshopId)
|
||||
{
|
||||
var workshop = _workshopRepository.Get(workshopId);
|
||||
|
||||
if (workshop == null || workshop.IsStaticCheckout)
|
||||
return 0;
|
||||
|
||||
DateTime lastMonthEnd = ($"{DateTime.Now.ToFarsi().Substring(0, 8)}01").ToGeorgianDateTime().AddDays(-1);
|
||||
var now = lastMonthEnd;
|
||||
var twoMonthsAgo = ($"{lastMonthEnd.ToFarsi().Substring(0, 8)}01").ToGeorgianDateTime();
|
||||
@@ -496,7 +519,11 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
/// </summary>
|
||||
public async Task<int> CountAbsentRollCallLastMonth(long workshopId)
|
||||
{
|
||||
|
||||
var workshop = _workshopRepository.Get(workshopId);
|
||||
|
||||
if (workshop == null || workshop.IsStaticCheckout)
|
||||
return 0;
|
||||
|
||||
DateTime lastMonthEnd = ($"{DateTime.Now.ToFarsi().Substring(0, 8)}01").ToGeorgianDateTime().AddDays(-1);
|
||||
var now = lastMonthEnd;
|
||||
var twoMonthsAgo = ($"{lastMonthEnd.ToFarsi().Substring(0, 8)}01").ToGeorgianDateTime();
|
||||
@@ -558,6 +585,11 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
|
||||
public async Task<int> CountEmployeesWithoutLunchBreakLastMonth(long workshopId)
|
||||
{
|
||||
var workshop = _workshopRepository.Get(workshopId);
|
||||
|
||||
if (workshop == null || workshop.IsStaticCheckout)
|
||||
return 0;
|
||||
|
||||
DateTime lastMonthEnd = ($"{DateTime.Now.ToFarsi().Substring(0, 8)}01").ToGeorgianDateTime().AddDays(-1);
|
||||
var now = lastMonthEnd;
|
||||
var twoMonthsAgo = ($"{lastMonthEnd.ToFarsi().Substring(0, 8)}01").ToGeorgianDateTime();
|
||||
@@ -596,6 +628,11 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
|
||||
public async Task<int> CountUndefinedLastMonth(long workshopId)
|
||||
{
|
||||
var workshop = _workshopRepository.Get(workshopId);
|
||||
|
||||
if (workshop == null || workshop.IsStaticCheckout)
|
||||
return 0;
|
||||
|
||||
DateTime lastMonthEnd = ($"{DateTime.Now.ToFarsi().Substring(0, 8)}01").ToGeorgianDateTime().AddDays(-1);
|
||||
var now = lastMonthEnd;
|
||||
var twoMonthsAgo = ($"{lastMonthEnd.ToFarsi().Substring(0, 8)}01").ToGeorgianDateTime();
|
||||
@@ -625,11 +662,17 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
/// </summary>
|
||||
public async Task<List<DailyRollCallWorkFlowViewModel>> GetAbsentRollCallWorkFlows(long workshopId)
|
||||
{
|
||||
|
||||
|
||||
var now = DateTime.Now;
|
||||
|
||||
|
||||
DateTime.Now.Date.AddMonthsFa(-2, out var twoMonthsAgo);
|
||||
|
||||
//استثنا برای کارگاه پیتزا امیر برای برای نمایش ندادن کارپوشه قبل از 1 آبان 1404
|
||||
if(workshopId == 367 && twoMonthsAgo< new DateTime(2025,10,23))
|
||||
{
|
||||
twoMonthsAgo = new DateTime(2025,10,23);
|
||||
}
|
||||
|
||||
var lastCheckouts = _checkoutACL.GetLastCheckoutsByWorkshopIdForWorkFlow(workshopId, twoMonthsAgo, now);
|
||||
|
||||
@@ -689,10 +732,16 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
/// </summary>
|
||||
public async Task<List<DailyRollCallConfirmedWithoutLunchBreakViewModel>> GetEmployeesWithoutLunchBreak(long workshopId)
|
||||
{
|
||||
|
||||
var now = DateTime.Now.Date;
|
||||
|
||||
now.AddMonthsFa(-2, out var twoMonthsAgo);
|
||||
|
||||
//استثنا برای کارگاه پیتزا امیر برای برای نمایش ندادن کارپوشه قبل از 1 آبان 1404
|
||||
if(workshopId == 367 && twoMonthsAgo< new DateTime(2025,10,23))
|
||||
{
|
||||
twoMonthsAgo = new DateTime(2025,10,23);
|
||||
}
|
||||
var lastCheckouts = _checkoutACL.GetLastCheckoutsByWorkshopIdForWorkFlow(workshopId, twoMonthsAgo, now);
|
||||
var notSlicedRollCalls = _rollCallACL.GetNotSlicedRollCallsByWorkshopId(workshopId, twoMonthsAgo, now.AddDays(-1).Date);
|
||||
var employeesWithoutBreakTime = _customizedWorkshopSettingsACL.GetEmployeesWithoutBreakTime(workshopId);
|
||||
|
||||
Reference in New Issue
Block a user