diff --git a/CompanyManagment.App.Contracts/Contract/GetContractListForClientResponse.cs b/CompanyManagment.App.Contracts/Contract/GetContractListForClientResponse.cs
index d7efa472..58e21ad9 100644
--- a/CompanyManagment.App.Contracts/Contract/GetContractListForClientResponse.cs
+++ b/CompanyManagment.App.Contracts/Contract/GetContractListForClientResponse.cs
@@ -9,4 +9,7 @@ public class GetContractListForClientResponse
public string ContractStart { get; set; }
public string ContractEnd { get; set; }
public bool IsSigned { get; set; }
+ public string DailyWage { get; set; }
+ public string AvgWorkingHour { get; set; }
+ public string FamilyAllowance { get; set; }
}
\ No newline at end of file
diff --git a/CompanyManagment.App.Contracts/Contract/IContractApplication.cs b/CompanyManagment.App.Contracts/Contract/IContractApplication.cs
index 8e17f094..b6038104 100644
--- a/CompanyManagment.App.Contracts/Contract/IContractApplication.cs
+++ b/CompanyManagment.App.Contracts/Contract/IContractApplication.cs
@@ -56,16 +56,22 @@ public interface IContractApplication
///
Task>
GetContractListForClient(GetContractListForClientRequest searchModel);
-
- #endregion
+ Task PrintOneAsync(long id);
+ Task> PrintAllAsync(List ids);
- #region NewChangeByHeydari
+ #endregion
- OperationResult DeleteAllContarcts(List ids);
+ #region NewChangeByHeydari
+
+ OperationResult DeleteAllContarcts(List ids);
OperationResult DeleteContarcts(long id);
List CheckHasCheckout(List ids);
List CheckHasSignature(List ids);
List SearchForMainContract(ContractSearchModel searchModel);
#endregion
+}
+
+public class ContractPrintViewModel
+{
}
\ No newline at end of file
diff --git a/CompanyManagment.Application/ContractApplication.cs b/CompanyManagment.Application/ContractApplication.cs
index b5936feb..48acc0bf 100644
--- a/CompanyManagment.Application/ContractApplication.cs
+++ b/CompanyManagment.Application/ContractApplication.cs
@@ -3112,6 +3112,16 @@ public class ContractApplication : IContractApplication
return await _contractRepository.GetContractListForClient(searchModel);
}
+ public Task PrintOneAsync(long id)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Task> PrintAllAsync(List ids)
+ {
+ throw new NotImplementedException();
+ }
+
#endregion
#region NewChangeByHeydari
diff --git a/CompanyManagment.EFCore/Repository/ContractRepository.cs b/CompanyManagment.EFCore/Repository/ContractRepository.cs
index 0a563b28..a998860b 100644
--- a/CompanyManagment.EFCore/Repository/ContractRepository.cs
+++ b/CompanyManagment.EFCore/Repository/ContractRepository.cs
@@ -1082,30 +1082,7 @@ public class ContractRepository : RepositoryBase, IContractRepos
var weeklyDouble = 0.0;
var weekly = c.WorkingHoursWeekly;
- if (!string.IsNullOrWhiteSpace(weekly) &&
- weekly != "24 - 12" && weekly != "24 - 24" && weekly != "36 - 12" && weekly != "48 - 24")
- {
- if (weekly.Contains("/"))
- {
- weeklyDouble = double.Parse(weekly);
- var minute = (int)((weeklyDouble % 1) * 60);
- var hour = (int)(weeklyDouble);
- c.WorkingHoursWeekly = hour + " " + "ساعت و" + " " + minute + " " + "دقیقه";
- }
- else if (weekly.Contains("."))
- {
- weeklyDouble = double.Parse(weekly, CultureInfo.InvariantCulture);
- var minute = (int)((weeklyDouble % 1) * 60);
- var hour = (int)(weeklyDouble);
- c.WorkingHoursWeekly = hour + " " + "ساعت و" + " " + minute + " " + "دقیقه";
- }
- else
- {
- c.WorkingHoursWeekly = c.WorkingHoursWeekly + " " + "ساعت";
- }
-
-
- }
+ c.WorkingHoursWeekly = WeeklyHourConvertor(weekly);
var emp = workshopEmpList.Where(x => x.WorkshopId == c.WorkshopIds)
.Select(x => x.EmployerId).ToList();
c.Employers = _employerRepository.GetEmployers(emp);
@@ -1162,6 +1139,37 @@ public class ContractRepository : RepositoryBase, IContractRepos
return query;
}
+ private static string WeeklyHourConvertor(string weekly)
+ {
+ double weeklyDouble;
+ if (!string.IsNullOrWhiteSpace(weekly) &&
+ weekly != "24 - 12" && weekly != "24 - 24" && weekly != "36 - 12" && weekly != "48 - 24")
+ {
+ if (weekly.Contains("/"))
+ {
+ weeklyDouble = double.Parse(weekly);
+ var minute = (int)((weeklyDouble % 1) * 60);
+ var hour = (int)(weeklyDouble);
+ return hour + " " + "ساعت و" + " " + minute + " " + "دقیقه";
+ }
+ else if (weekly.Contains("."))
+ {
+ weeklyDouble = double.Parse(weekly, CultureInfo.InvariantCulture);
+ var minute = (int)((weeklyDouble % 1) * 60);
+ var hour = (int)(weeklyDouble);
+ return hour + " " + "ساعت و" + " " + minute + " " + "دقیقه";
+ }
+ else
+ {
+ return weekly + " " + "ساعت";
+ }
+
+
+ }
+
+ return "";
+ }
+
public IQueryable GetWorkshopEmployer()
{
return _context.WorkshopEmployers.Select(x => new WorkshopEmployerViewModel
@@ -1602,7 +1610,10 @@ public class ContractRepository : RepositoryBase, IContractRepos
ContractEnd = c.ContractEnd.ToFarsi(),
ContractNo = c.ContractNo,
IsSigned = c.Signature == "1",
- EmployeeFullName = employeeFullName
+ EmployeeFullName = employeeFullName,
+ AvgWorkingHour = WeeklyHourConvertor(c.WorkingHoursWeekly),
+ DailyWage = c.DayliWage,
+ FamilyAllowance = c.FamilyAllowance
};
}).ToList()
};