68 lines
2.3 KiB
C#
68 lines
2.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using _0_Framework.Application;
|
|
using CompanyManagment.App.Contracts.Contract;
|
|
using CompanyManagment.EFCore;
|
|
|
|
namespace backService
|
|
{
|
|
public class WorkingTest : IWorkingTest
|
|
|
|
{
|
|
private readonly CompanyContext _context;
|
|
|
|
public WorkingTest(CompanyContext context)
|
|
{
|
|
_context = context;
|
|
}
|
|
|
|
public List<EditContract> Correct()
|
|
{
|
|
var autoExNewTime = new DateTime(2023, 09, 01);
|
|
#region correctContractsAndChekouts
|
|
|
|
var a = new List<EditContract>();
|
|
|
|
var b = new EditContract()
|
|
{
|
|
ContractEnd = "14010101",
|
|
};
|
|
a.Add(b);
|
|
return a;
|
|
//var contracts = _context.Contracts.Where(x => x.WorkingHoursWeekly != "44" &&
|
|
// x.WorkingHoursWeekly != "48 - 24"
|
|
// && x.WorkingHoursWeekly != "36 - 12" &&
|
|
// x.WorkingHoursWeekly != "24 - 24" &&
|
|
// x.WorkingHoursWeekly != "24 - 12")
|
|
// .Where(x => x.CreationDate >= autoExNewTime && x.IsActiveString == "true").Select(x => new EditContract()
|
|
// {
|
|
// Id = x.id,
|
|
// EmployeeId = x.EmployeeId,
|
|
// WorkshopIds = x.WorkshopIds,
|
|
// DayliWage = x.DayliWage,
|
|
// ConsumableItems = x.ConsumableItems,
|
|
// FamilyAllowance = x.FamilyAllowance,
|
|
// HousingAllowance = x.HousingAllowance,
|
|
// AgreementSalary = x.AgreementSalary,
|
|
// WeeklyWorkingTime = x.WorkingHoursWeekly,
|
|
// ContractNo = x.ContractNo,
|
|
// ContarctStart = x.ContarctStart.ToFarsi(),
|
|
// ContractEnd = x.ContractEnd.ToFarsi(),
|
|
// GetWorkDate = x.GetWorkDate.ToFarsi(),
|
|
// GetWorkDateHide = x.GetWorkDate.ToFarsi()
|
|
|
|
|
|
// });
|
|
//return contracts.ToList();
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
}
|
|
}
|
|
}
|