fix 显示当前factory,排序
This commit is contained in:
@@ -11,6 +11,7 @@ namespace Dlhis.Basic.Organization.Controllers;
|
||||
[Authorize]
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
[Obsolete]
|
||||
public class WerksController : ControllerBase
|
||||
{
|
||||
private readonly IWerkService _werkService;
|
||||
|
||||
@@ -45,6 +45,11 @@ public class GainfoCurrentResponse
|
||||
/// </summary>
|
||||
public DateTime Birthday { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 厂区
|
||||
/// </summary>
|
||||
public string Factory { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 就餐信息
|
||||
/// </summary>
|
||||
|
||||
@@ -203,6 +203,7 @@ public class GainfoService : IGainfoService
|
||||
Gender = ga.Gender,
|
||||
UserCode = ga.Code,
|
||||
UserName = ga.Name,
|
||||
Factory = ga.Factory,
|
||||
MealInfo = new GainfoCurrentMealInfoResponse
|
||||
{
|
||||
Balance = mealUser.Balance
|
||||
@@ -210,6 +211,12 @@ public class GainfoService : IGainfoService
|
||||
})
|
||||
.FirstAsync();
|
||||
|
||||
if (info != null)
|
||||
{
|
||||
var tenantResult = await _tenantApi.GetTenantByCodeAsync(info.Factory);
|
||||
info.Factory = tenantResult.Data.Name;
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,9 @@ public class EnumsController : ControllerBase
|
||||
Key = fd,
|
||||
Value = (int)item.GetValue(null)
|
||||
};
|
||||
}).ToList()
|
||||
})
|
||||
.OrderBy(x => x.Value)
|
||||
.ToList()
|
||||
};
|
||||
})
|
||||
.ToList();
|
||||
@@ -66,9 +68,10 @@ public class EnumsController : ControllerBase
|
||||
Name = type,
|
||||
Data = g.AsEnumerable().Select(x => new KeyValueDto
|
||||
{
|
||||
Key = x.Code,
|
||||
Value = x.Display
|
||||
Key = x.Display,
|
||||
Value = x.Code
|
||||
})
|
||||
.OrderBy(x => x.Value)
|
||||
.ToList()
|
||||
};
|
||||
});
|
||||
@@ -97,6 +100,7 @@ public class EnumsController : ControllerBase
|
||||
Value = (int)item.GetValue(null)
|
||||
};
|
||||
})
|
||||
.OrderBy(x => x.Value)
|
||||
.ToList()
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user