feat: add unit filtering and improve unit info handling in charge cycles
- Add optional UnitId parameter to CostCyclsList method for filtering cycles by specific unit - Replace UnitIds/UnitNames lists with structured UnitInfoDto containing Id and Name - Clean unit names by removing "GUID#" prefix when present - Update CostCycleDto to use UnitInfoDto list instead of separate Id and Name lists - Fix unit assignment logic in Add and Edit methods to use new DTO structure
This commit is contained in:
@@ -149,7 +149,7 @@ namespace Complex.Application.Complex
|
||||
//وقتی واحد تازه ثبت شده پس در مدیریت شارژ قابلیت ثبت اختصاصی برای خودش نداشته پس باید شارژ عمومی برایش تعریف شود
|
||||
// اگر خواست میتواند برایش به صورت اختصاصی هم ثبت کند که اون موقع برایش محاسبه مجدد خواهد شد
|
||||
var costCycleDto = _costService.CostCyclsList(unit.ComplexId, nowDate, nowDate, null).Data
|
||||
.FirstOrDefault(c => c.UnitIds == null);
|
||||
.FirstOrDefault(c => c.Units == null);
|
||||
if (costCycleDto != null)
|
||||
{
|
||||
//var costCycle = new CostCycle
|
||||
|
||||
Reference in New Issue
Block a user