Administrator
2024-07-16 8ec3d69f02da17b688a50b9a5db81ed24e3c0f7d
Wms/WMS.BLL/LogServer/OperationSOServer.cs
@@ -3,6 +3,7 @@
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Model.ModelDto.LogDto;
using SqlSugar;
using WMS.BLL.SysServer;
@@ -21,9 +22,7 @@
        public OperationSOServer() : base(Db)
        {
        }
        public List<OperationDto> GetLogOperationSoList(string menuName, string type, string msg, string startTime, string endTime, int page, int limit, out int count)
        {
            try
        public async Task<List<OperationDto>> GetLogOperationSoList(string menuName, string type, string msg, string startTime, string endTime, int page, int limit, RefAsync<int> count)
            {
                var item = Expressionable.Create<LogOperationSO>()
                    .AndIF(!string.IsNullOrWhiteSpace(menuName), it => it.MenuName.Contains(menuName.Trim()))
@@ -32,8 +31,8 @@
                    .AndIF(!string.IsNullOrWhiteSpace(startTime), it => it.CreateTime >= Convert.ToDateTime(startTime))
                    .AndIF(!string.IsNullOrWhiteSpace(endTime), it => it.CreateTime <= Convert.ToDateTime(endTime).AddDays(1))
                    .ToExpression();//注意 这一句 不能少
                var total = 0;
                var list = GetAllWhereAsync(item)
            var list = await GetAllWhereAsync(item)
                    .LeftJoin<SysDictionary>((it, dic) => it.Type == dic.Id.ToString())
                    .LeftJoin<SysUserInfor>((it, dic, users) => it.CreateUser == users.Id)
                    .Select((it, dic, users) => new OperationDto()
@@ -49,15 +48,9 @@
                        CreateUserName =  users.RealName,
                    })
                    .OrderByDescending(it => it.CreateTime)
                    .ToOffsetPage(page, limit, ref total);
                .ToPageListAsync(page, limit, count);
                count = total;
                return list.OrderByDescending(m => m.CreateTime).ToList();
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
        public bool AddLogOperationSo(string parentNo, string menuName, string fkNo, string type, string msg, int userId)
        {