|
|
|
@ -32,14 +32,42 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
|
/// 获取任务分配列表
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="carrierId">船公司Id(可选)</param>
|
|
|
|
|
public async Task<DataResult<List<TaskAllocationtSet>>> GetList(long? carrierId)
|
|
|
|
|
public async Task<DataResult<TaskAllocationtSetQueryListDto>> GetList(long? carrierId)
|
|
|
|
|
{
|
|
|
|
|
var tenantDb = saasDbService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
|
|
|
|
|
var list = await tenantDb.Queryable<TaskAllocationtSet>()
|
|
|
|
|
.Where(x => x.CarrierId == carrierId)
|
|
|
|
|
.Where(x => x.CarrierId == carrierId &&
|
|
|
|
|
(x.IsAllotCustom
|
|
|
|
|
|| x.IsAllotCustomerService
|
|
|
|
|
|| x.IsAllotDispatcher
|
|
|
|
|
|| x.IsAllotOperator
|
|
|
|
|
|| x.IsAllotSale
|
|
|
|
|
|| x.IsAllotVouchingClerk
|
|
|
|
|
|| x.IsAllotFinancialStaff
|
|
|
|
|
|| x.IsAllotDriver))
|
|
|
|
|
.ToListAsync();
|
|
|
|
|
return DataResult<List<TaskAllocationtSet>>.Success(list);
|
|
|
|
|
|
|
|
|
|
Func<TaskAllocationtSet, TaskTypeInfoDto> selector = x => new TaskTypeInfoDto() { TaskTypeCode = x.TaskTypeCode, TaskTypeName = x.TaskTypeName };
|
|
|
|
|
TaskAllocationtSetQueryListDto result = new()
|
|
|
|
|
{
|
|
|
|
|
OperatorTaskTypeList = list.Where(x => x.IsAllotOperator).Select(selector).ToList(),
|
|
|
|
|
VouchingClerkTaskTypeList = list.Where(x => x.IsAllotVouchingClerk).Select(selector).ToList(),
|
|
|
|
|
SaleTaskTypeList = list.Where(x => x.IsAllotSale).Select(selector).ToList(),
|
|
|
|
|
CustomTaskTypeList = list.Where(x => x.IsAllotCustom).Select(selector).ToList(),
|
|
|
|
|
FinancialStaffTaskTypeList = list.Where(x => x.IsAllotFinancialStaff).Select(selector).ToList(),
|
|
|
|
|
CustomerServiceTaskTypeList = list.Where(x => x.IsAllotCustomerService).Select(selector).ToList(),
|
|
|
|
|
DriverTaskTypeList = list.Where(x => x.IsAllotDriver).Select(selector).ToList(),
|
|
|
|
|
DispatcherTaskTypeList = list.Where(x => x.IsAllotDispatcher).Select(selector).ToList(),
|
|
|
|
|
};
|
|
|
|
|
//if (carrierId != null && list.Count != 0)
|
|
|
|
|
//{
|
|
|
|
|
// result.CarrierId = list.First().CarrierId;
|
|
|
|
|
// result.Carrier = list.First().Carrier;
|
|
|
|
|
// result.CarrierCode = list.First().CarrierCode;
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
return DataResult<TaskAllocationtSetQueryListDto>.Success(result);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|