TemoraryClientRegister - Creat WorkshopTemp
This commit is contained in:
@@ -27,7 +27,7 @@ public class CreateWorkshopTemp
|
||||
/// جمع کل مبالغ سرویس ها برای کارگاه
|
||||
/// فارسی
|
||||
/// </summary>
|
||||
public double WorkshopServicesAmountStr { get; set; }
|
||||
public string WorkshopServicesAmountStr { get; set; }
|
||||
|
||||
|
||||
#region ServiceSelection
|
||||
@@ -35,22 +35,22 @@ public class CreateWorkshopTemp
|
||||
/// <summary>
|
||||
/// قرارداد و تصفیه
|
||||
/// </summary>
|
||||
public bool ContractAndCheckoutPercent { get; set; }
|
||||
public bool ContractAndCheckout { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// بیمه
|
||||
/// </summary>
|
||||
public bool InsurancePercent { get; set; }
|
||||
public bool Insurance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// حضورغباب
|
||||
/// </summary>
|
||||
public bool RollCallPercent { get; set; }
|
||||
public bool RollCall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// فیش غیر رسمی
|
||||
/// </summary>
|
||||
public bool CustomizeCheckoutPercent { get; set; }
|
||||
public bool CustomizeCheckout { get; set; }
|
||||
|
||||
///// <summary>
|
||||
///// خدمات حضوری قرداد و تصفیه
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.TemporaryClientRegistrationAgg;
|
||||
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||
@@ -18,16 +19,23 @@ public class WorkshopTempRepository : RepositoryBase<long, WorkshopTemp>, IWorks
|
||||
|
||||
public async Task<List<WorkshopTempViewModel>> GetWorkshopTemp(long contractingPartyTemp)
|
||||
{
|
||||
var result =_context.WorkshopTemps
|
||||
var result = await _context.WorkshopTemps
|
||||
.Where(x => x.ContractingPartyTempId == contractingPartyTemp)
|
||||
.Include(x => x.WorkshopServicesTemps)
|
||||
.Select(x => new WorkshopTempViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
WorkshopName = x.WorkshopName
|
||||
WorkshopName = x.WorkshopName,
|
||||
WorkshopServicesAmountStr = x.WorkshopServicesAmount.ToMoney(),
|
||||
WorkshopServicesAmount = x.WorkshopServicesAmount,
|
||||
ContractingPartyTempId = x.ContractingPartyTempId,
|
||||
CountPerson = x.CountPerson,
|
||||
ContractAndCheckout = x.WorkshopServicesTemps.Any(s=>s.ServiceName == "ContractAndCheckout"),
|
||||
CustomizeCheckout = x.WorkshopServicesTemps.Any(s => s.ServiceName == "CustomizeCheckout"),
|
||||
Insurance = x.WorkshopServicesTemps.Any(s=> s.ServiceName == "Insurance"),
|
||||
RollCall = x.WorkshopServicesTemps.Any(s => s.ServiceName == "RollCall"),
|
||||
}).ToListAsync();
|
||||
|
||||
});
|
||||
|
||||
return new List<WorkshopTempViewModel>();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user