fix 字段优化

This commit is contained in:
cheche
2024-03-12 09:24:53 +08:00
parent 5684078071
commit 15f89a82a2
5 changed files with 17 additions and 1 deletions

View File

@@ -5,7 +5,6 @@ using Kurisu.AspNetCore.DataAccess.SqlSugar.Aop;
using Kurisu.Core.DataAccess.Dto;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Org.BouncyCastle.Asn1.Ocsp;
namespace Dlhis.Canteen.Order.Controllers;

View File

@@ -9,6 +9,11 @@ namespace Dlhis.Canteen.Order.Response
/// </summary>
public string DepartmentNo { get; set; }
/// <summary>
/// 部门名称
/// </summary>
public string DepartmentName { get; set; }
/// <summary>
/// 成本中心
/// </summary>

View File

@@ -298,6 +298,12 @@ public class BalanceService : IBalanceService
lst.Add(obj);
}
var departments = await _dbContext.Queryable<DepartmentEntity>().ToListAsync();
lst.ForEach(x =>
{
x.DepartmentName = departments.Where(d => d.No == x.DepartmentNo).Select(d => d.Name).First();
});
// 分页操作
var startIndex = (request.PageIndex - 1) * request.PageSize;
var pagedData = lst.Skip(startIndex).Take(request.PageSize).ToList();

View File

@@ -16,6 +16,11 @@ public class DeviceUploadLogResponse
/// </summary>
public string Supplier { get; set; }
/// <summary>
/// 设备部署点
/// </summary>
public string DeployPlace { get; set; }
/// <summary>
/// 用户档案号
/// </summary>

View File

@@ -46,6 +46,7 @@ public class DeviceUploadLogService : IDeviceUploadLogService
UserNo = ga.No,
UserCode = ga.Code,
UserName = ga.Name,
DeployPlace = device.DeployPlace
})
.ToPageListAsync(request);