fix 显示当前factory,排序

This commit is contained in:
2024-03-24 21:34:51 +08:00
parent fc1db456ba
commit f76d9212bc
4 changed files with 20 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ namespace Dlhis.Basic.Organization.Controllers;
[Authorize]
[Route("api/[controller]")]
[ApiController]
[Obsolete]
public class WerksController : ControllerBase
{
private readonly IWerkService _werkService;

View File

@@ -45,6 +45,11 @@ public class GainfoCurrentResponse
/// </summary>
public DateTime Birthday { get; set; }
/// <summary>
/// 厂区
/// </summary>
public string Factory { get; set; }
/// <summary>
/// 就餐信息
/// </summary>

View File

@@ -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;
}

View File

@@ -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()
};
}