Compare commits

..

17 Commits

Author SHA1 Message Date
517f2d06ca Add CountController to manage task, ticket, and workflow counts 2025-12-06 17:44:00 +03:30
343f830d0d Fix calculation of discounted payment amount in institution contract repository 2025-12-06 16:46:02 +03:30
87ff7976fb Add menu item for bank account information
Added a new menu item with `permission="307"` to `_Menu.cshtml`
for accessing the `account-number-database` page. The link
is dynamically constructed using `AppSetting.Value.Domain`
and styled with `class="clik10"` and inline styles. Included
an SVG icon and the text "اطلاعات بانکی طرف حساب"
("Bank account information of the counterparty"). Maintained
the hierarchical structure of the menu.
2025-12-06 10:41:03 +03:30
a533850f24 Enhance contract removal logic and handle financial statement updates 2025-12-04 10:36:59 +03:30
b5c1a4c29d Refactor legal party handling logic
Replaced `realPersonalContractingParty` with `legalPersonalContractingParty` to ensure correct variable usage in legal party operations. Updated the authentication logic to handle both authenticated and unauthenticated states, introducing a new `else` block for `LegalAuthentication`. Adjusted method calls (`UnAuthenticateLegalEdit` and `EditLegalPartyFromInstitution`) to use the updated variable and ensure consistent updates to legal party details.
2025-12-03 20:21:08 +03:30
28607dec66 Merge branch 'master' of https://github.com/syntax24/OriginalGozareshgir 2025-12-03 12:10:52 +03:30
4a041ca8e2 add condition for null rollcall employee in IfEmloyeeHasNewLeftWorkDateAddEndDateToRollCallStatus 2025-12-03 12:10:48 +03:30
SamSys
de0de6fde8 Merge branch 'master' of https://github.com/samsyntax24/OriginalGozareshgir 2025-12-02 15:01:41 +03:30
SamSys
70447a74ef change lunchSettings 2025-12-02 15:01:25 +03:30
90aa6058f0 Handle "*" in NationalCode assignment gracefully
Updated the `NationalCode` assignment in the `CreateInstitutionContractLegalPartyRequest` object to replace `"*"` with an empty string (`string.Empty`). This ensures compliance with business rules where `"*"` is not considered a valid value for `NationalCode`. Retains the original value otherwise.
2025-12-02 14:40:54 +03:30
3df296f205 Merge branch 'master' of https://github.com/syntax24/OriginalGozareshgir 2025-12-02 14:23:39 +03:30
6a2e4405de add check for gender if is empty 2025-12-02 14:00:01 +03:30
88c10ac141 Add phone and ID number series fields to temporary client registration result 2025-12-02 13:44:25 +03:30
SamSys
8de3939675 change lunch setting adddress 2025-12-02 13:06:22 +03:30
e78c838cab Add method to edit legal party details from institution in contracting party 2025-12-02 13:00:34 +03:30
SamSys
5e4b8a3a80 change static file permiission 2025-12-02 11:51:13 +03:30
SamSys
a18984fec1 add account to static list 2025-12-02 11:37:29 +03:30
11 changed files with 603 additions and 412 deletions

View File

@@ -32,7 +32,7 @@ public static class StaticWorkshopAccounts
/// 392 - عمار حسن دوست
/// 20 - سمیرا الهی نیا
/// </summary>
public static List<long> StaticAccountIds = [2, 3, 380, 381, 392, 20];
public static List<long> StaticAccountIds = [2, 3, 380, 381, 392, 20, 476];
/// <summary>
/// این تاریخ در جدول اکانت لفت ورک به این معنیست

View File

@@ -290,4 +290,13 @@ public class PersonalContractingParty : EntityBase
this.Gender = gender;
this.IsAuthenticated = true;
}
public void EditLegalPartyFromInstitution(string legalPosition, string companyName,
string registerId,string nationalId)
{
LegalPosition = legalPosition;
LName = companyName;
RegisterId = registerId;
NationalId = nationalId;
}
}

View File

@@ -37,7 +37,7 @@ namespace Company.Domain.EmployeeDocumentsAgg
{
WorkshopId = workshopId;
EmployeeId = employeeId;
Gender = gender;
Gender = gender??string.Empty;
}
private EmployeeDocuments()

View File

@@ -888,6 +888,7 @@ public class InstitutionContractApplication : IInstitutionContractApplication
public void RemoveContract(long id)
{
_institutionContractRepository.RemoveContract(id);
}
@@ -981,6 +982,12 @@ public class InstitutionContractApplication : IInstitutionContractApplication
existingContractingParty.UnAuthenticateLegalEdit(legalCommand.FName,legalCommand.LName,legalCommand.FatherName,legalCommand.IdNumber,existingContractingParty.IdNumberSeri,existingContractingParty.IdNumberSerial,
legalCommand.BirthDateFa,legalCommand.Gender,legalCommand.PhoneNumber);
}
if (existingContractingParty != null)
{
existingContractingParty.EditLegalPartyFromInstitution(command.LegalParty.Position,command.LegalParty.CompanyName,
command.LegalParty.RegisterId,command.LegalParty.NationalId);
}
}
else if (command.ContractingPartyLegalType == LegalType.Real)
{

View File

@@ -290,8 +290,34 @@ public class LeftWorkTempApplication : ILeftWorkTempApplication
//get rollCallEmployee associated with those leftworks which have a higher end date than leftworkDate
var rollCallsEmployee = _rollCallEmployeeRepository.GetBy(employeeId, workshopId);
if (rollCallsEmployee != null)
{
var status = rollCallsEmployee.EmployeesStatus.OrderByDescending(z => z.StartDate)
.FirstOrDefault(rollCallEmployeeStatus => rollCallEmployeeStatus.StartDate.Date < maxLeftWork.LeftWorkDateGr
&& rollCallEmployeeStatus.EndDate.Date >
maxLeftWork.LeftWorkDateGr);
if (status != null)
{
var adjust = new AdjustRollCallEmployeesWithEmployeeLeftWork()
{
LeaveDate = maxLeftWork.LeftWorkDateGr,
RollCallStatusId = status.id
};
_rollCallEmployeeStatusRepository.AdjustRollCallStatusEndDates([adjust]);
}
var rollCallEmployeeStatusList = rollCallsEmployee.EmployeesStatus
.Where(x => x.StartDate >= maxLeftWork.LeftWorkDateGr).ToList();
if (rollCallEmployeeStatusList.Any())
{
_rollCallEmployeeStatusRepository.RemoveRange(rollCallEmployeeStatusList);
_rollCallEmployeeStatusRepository.SaveChanges();
}
}
// var joinedList = rollCallsEmployee.Join(leftWorks, x => x.WorkshopId, y => y.WorkshopId, (x, y) => new
// {
// x.WorkshopId,
@@ -301,27 +327,6 @@ public class LeftWorkTempApplication : ILeftWorkTempApplication
// });
var status = rollCallsEmployee.EmployeesStatus.OrderByDescending(z => z.StartDate)
.FirstOrDefault(rollCallEmployeeStatus => rollCallEmployeeStatus.StartDate.Date < maxLeftWork.LeftWorkDateGr
&& rollCallEmployeeStatus.EndDate.Date >
maxLeftWork.LeftWorkDateGr);
if (status != null)
{
var adjust = new AdjustRollCallEmployeesWithEmployeeLeftWork()
{
LeaveDate = maxLeftWork.LeftWorkDateGr,
RollCallStatusId = status.id
};
_rollCallEmployeeStatusRepository.AdjustRollCallStatusEndDates([adjust]);
}
var rollCallEmployeeStatusList = rollCallsEmployee.EmployeesStatus
.Where(x => x.StartDate >= maxLeftWork.LeftWorkDateGr).ToList();
if (rollCallEmployeeStatusList.Any())
{
_rollCallEmployeeStatusRepository.RemoveRange(rollCallEmployeeStatusList);
_rollCallEmployeeStatusRepository.SaveChanges();
}
}
}

View File

@@ -240,6 +240,8 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
result.IdNumberSerial = createTemp.IdNumberSerial;
result.IdNumber = idNumber;
result.NationalCode = createTemp.NationalCode;
result.Phone = createTemp.Phone;
result.IdNumberSeri = createTemp.IdNumberSeri;
return op.Succcedded(result);

View File

@@ -0,0 +1,88 @@
using _0_Framework.Application;
using AccountManagement.Application.Contracts.Task;
using AccountManagement.Application.Contracts.Ticket;
using Company.Domain.WorkshopAccountAgg;
using Microsoft.AspNetCore.Mvc;
using ServiceHost.BaseControllers;
using WorkFlow.Application.Contracts.AdminWorkFlow;
namespace ServiceHost.Areas.Admin.Controllers;
public class CountController : AdminBaseController
{
private readonly IAuthHelper _authHelper;
private readonly IWorkshopAccountRepository _workshopAccountRepository;
private readonly IAdminWorkFlowApplication _adminWorkFlowApplication;
private readonly ITicketApplication _ticketApplication;
private readonly ITaskApplication _taskApplication;
private long _roleId;
public CountController(
IAuthHelper authHelper,
IWorkshopAccountRepository workshopAccountRepository,
IAdminWorkFlowApplication adminWorkFlowApplication,
ITicketApplication ticketApplication,
ITaskApplication taskApplication)
{
_authHelper = authHelper;
_workshopAccountRepository = workshopAccountRepository;
_ticketApplication = ticketApplication;
_taskApplication = taskApplication;
_adminWorkFlowApplication = adminWorkFlowApplication;
_roleId = authHelper.CurrentAccountInfo().RoleId;
}
[HttpGet("task")]
public async Task<IActionResult> GetTaskCount()
{
var currentAccountId = _authHelper.CurrentAccountId();
int taskCount = await _taskApplication.RequestedAndOverdueTasksCount(currentAccountId);
return Ok(new
{
success = true,
data = taskCount
});
}
[HttpGet("ticket")]
public IActionResult GetTicketCount()
{
int ticketCount = _ticketApplication.GetAdminTicketsCount();
return Ok(new
{
success = true,
data = ticketCount
});
}
[HttpGet("workflow")]
public async Task<IActionResult> GetWorkFlowCount()
{
var currentAccountId = _authHelper.CurrentAccountId();
var accountWorkshops = _workshopAccountRepository.GetList(currentAccountId).Select(x => x.WorkshopId).ToList();
var permissions = _authHelper.GetPermissions();
int workFlowCount = await _adminWorkFlowApplication.GetWorkFlowCountsForAdmin(accountWorkshops, currentAccountId, _roleId, permissions);
return Ok(new
{
success = true,
data = workFlowCount
});
}
[HttpGet("checker")]
public async Task<IActionResult> GetCheckerCount()
{
int checkerCount = await _adminWorkFlowApplication.GetWorkFlowCountForChecker();
return Ok(new
{
success = true,
data = checkerCount
});
}
}

View File

@@ -507,6 +507,13 @@
</svg>
لیست تراکنش های درگاه پرداخت
</a></li>
<li permission="307" style=";white-space: nowrap">
<a class="clik10 " href="https://admin@(AppSetting.Value.Domain)/account-number-database" style="width: 7px;margin: 0 6px;">
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="6.5" cy="6.5" r="6.5" fill="white"/>
</svg>
اطلاعات بانکی طرف حساب
</a></li>
</ul>

View File

@@ -655,6 +655,13 @@
</svg>
لیست تراکنش های درگاه پرداخت
</a></li>
<li permission="307" style=";white-space: nowrap">
<a class="clik10 " href="https://admin@(AppSetting.Value.Domain)/account-number-database" style="width: 7px;margin: 0 6px;">
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="6.5" cy="6.5" r="6.5" fill="white"/>
</svg>
اطلاعات بانکی طرف حساب
</a></li>
</ul>

View File

@@ -19,7 +19,7 @@
"sqlDebugging": true,
"dotnetRunMessages": "true",
"nativeDebugging": true,
"applicationUrl": "https://localhost:5004;http://localhost:5003;https://192.168.0.117:5005",
"applicationUrl": "https://localhost:5004;http://localhost:5003;",
"jsWebView2Debugging": false,
"hotReloadEnabled": true
},