hwh
2024-07-15 9c247fc802c8a9b48dae041bf5de53defaa68a39
Merge branch 'master' of http://47.95.120.53:8083/r/JC26WMS
15个文件已修改
479 ■■■■■ 已修改文件
HTML/views/ASNSetting/ArrivalNotice.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/SOSetting/ExportAllot.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs 186 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllSoServer/CompleteDetailServer.cs 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllSoServer/ExportAllotServer.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllSoServer/ExportNoticeDetailServer.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllSoServer/WaveMageServer.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.IBLL/IBllAsnServer/IArrivalNoticeServer.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.IBLL/IBllSoServer/ICompleteDetailServer.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.IBLL/IBllSoServer/IExportAllotServer.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.IBLL/IBllSoServer/IExportNoticeServer.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.IBLL/IBllSoServer/IWaveMageServer.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Wms/Controllers/BllAsnController.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Wms/Controllers/BllSoController.cs 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/ASNSetting/ArrivalNotice.html
@@ -486,7 +486,6 @@
                        height: h1,
                        id: 'LAY-app-content-list',
                        where: param,
                        contentType: 'application/json',
                        headers: { ToKen: $.cookie('token') },
                        page: true,
HTML/views/SOSetting/ExportAllot.html
@@ -329,7 +329,7 @@
            var mxId = "0";
            var yemianid = 0;
            refreshTable();
            refreshTablemx(mxId)
            //refreshTablemx(mxId)
            //渲染出库分配table
            //#region 自定义表头
            var TotalColsArr = [[
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
@@ -19,6 +19,7 @@
using WMS.IBLL.IBllAsnServer;
using WMS.Entity.BllSoEntity;
using WMS.Entity.DataEntity;
using System.Threading.Tasks;
namespace WMS.BLL.BllAsnServer
{
@@ -34,114 +35,105 @@
        #endregion
        #region 事件方法
        public List<ArrivalNoticeDto> GetArrivalNoticeList(ArrivalNoticeVm model, out int count)
        public async Task<List<ArrivalNoticeDto>> GetArrivalNoticeList(ArrivalNoticeVm model, RefAsync<int> count)
        {
            string sqlString = string.Empty;
            string sqlCount = string.Empty;
            string sqlPub = string.Empty;
            try
            var modelList = await Db.Queryable<BllArrivalNotice,BllArrivalNoticeDetail, SysUserInfor, SysUserInfor,
                SysUserInfor>((tb1, tb2, tb3, tb4,tb5)  => new JoinQueryInfos(
                    JoinType.Left, tb1.ASNNo == tb2.ASNNo,
                    JoinType.Left, tb1.CreateUser == tb3.Id,
                    JoinType.Left, tb1.UpdateUser == tb4.Id,
                    JoinType.Left, tb1.CheckUser == tb5.Id))
                .WhereIF(!string.IsNullOrWhiteSpace(model.ASNNo), tb1 => tb1.ASNNo.Contains(model.ASNNo))
                .WhereIF(!string.IsNullOrWhiteSpace(model.LotNo), (tb1,tb2) => tb2.LotNo.Contains(model.LotNo))
                .WhereIF(!string.IsNullOrWhiteSpace(model.SkuNo), (tb1,tb2) => tb2.SkuNo.Contains(model.SkuNo))
                .WhereIF(!string.IsNullOrWhiteSpace(model.SkuName), (tb1,tb2) => tb2.SkuName.Contains(model.SkuName))
                .WhereIF(!string.IsNullOrWhiteSpace(model.CustomerName), tb1 => tb1.CustomerName.Contains(model.CustomerName))
                .WhereIF(!string.IsNullOrWhiteSpace(model.OrderCode), tb1 => tb1.OrderCode.Contains(model.OrderCode))
                .WhereIF(!string.IsNullOrWhiteSpace(model.Status), tb1 => tb1.Status == model.Status)
                .WhereIF(!string.IsNullOrWhiteSpace(model.Type), tb1 => tb1.Type == model.Type)
                .WhereIF(!string.IsNullOrWhiteSpace(model.StartTime), tb1 => tb1.CreateTime >= Convert.ToDateTime(model.StartTime))
                .WhereIF(!string.IsNullOrWhiteSpace(model.EndTime), tb1 => tb1.CreateTime <= Convert.ToDateTime(model.EndTime).AddDays(1))
                .WhereIF(!string.IsNullOrWhiteSpace(model.CustomerName), tb1 => tb1.CustomerName.Contains(model.CustomerName))
                .Where(tb1 => tb1.IsDel == "0")
                .OrderByDescending(tb1 => tb1.ASNNo)
                .Distinct()
                .Select((tb1, tb2, tb3, tb4, tb5) => new ArrivalNoticeDto()
            {
                sqlCount += "SELECT DISTINCT COUNT(tb1.ID) FROM BllArrivalNotice AS tb1 ";
                sqlString += "SELECT DISTINCT tb1.*,tb3.RealName as CreateUserName,tb4.RealName as UpdateUserName,tb5.RealName as CheckUserName FROM BllArrivalNotice AS tb1 ";
                sqlPub += "LEFT JOIN BllArrivalNoticeDetail AS tb2 ON tb1.ASNNo = tb2.ASNNo ";
                sqlPub += "LEFT JOIN SysUserInfor AS tb3 ON tb1.CreateUser = tb3.Id ";
                sqlPub += "LEFT JOIN SysUserInfor AS tb4 ON tb1.UpdateUser = tb4.Id ";
                sqlPub += "LEFT JOIN SysUserInfor AS tb5 ON tb1.CheckUser = tb5.Id ";
                sqlPub += $"WHERE tb1.ASNNo LIKE '%{model.ASNNo}%' AND tb2.LotNo LIKE '%{model.LotNo}%' ";
                sqlPub += $"AND tb2.SkuNo  LIKE '%{model.SkuNo}%' AND tb2.SkuName  LIKE '%{model.SkuName}%' ";
                sqlPub += $"AND tb1.CustomerName  LIKE '%{model.CustomerName}%' ";
                if (!string.IsNullOrEmpty(model.OrderCode))
                {
                    sqlPub += $"AND tb1.OrderCode LIKE '%{model.OrderCode}%' ";
                }
                if (!string.IsNullOrEmpty(model.Status))
                {
                    sqlPub += $"AND tb1.Status = '{model.Status}' ";
                }
                if (!string.IsNullOrEmpty(model.Type))
                {
                    if (model.Type == "3")
                    {
                        sqlPub += $"AND tb1.Type = '{model.Type}' ";
                    }
                    else
                    {
                        sqlPub += $"AND tb1.Type = '{model.Type}' AND tb1.Type != '3' ";
                    }
                }
                else
                {
                    sqlPub += " AND tb1.Type != '3'";
                    Id = tb1.Id,
                    ASNNo = tb1.ASNNo,
                    Type = tb1.Type,
                    Status = tb1.Status,
                    Origin = tb1.Origin,
                    CustomerNo = tb1.CustomerNo,
                    CustomerName = tb1.CustomerName,
                    LotNo = tb1.LotNo,
                    LotText = tb1.LotText,
                    CheckTime = tb1.CheckTime.ToString(),
                    CheckUserName = tb5.RealName,
                    SupplierLot = tb1.SupplierLot,
                    Demo = tb1.Demo,
                    OrderCode = tb1.OrderCode,
                    CompleteTime = tb1.CompleteTime,
                    CreateTime = tb1.CreateTime,
                    CreateUserName = tb3.RealName,
                    UpdateTime = tb1.UpdateTime.ToString(),
                    UpdateUserName = tb4.RealName
                }
                if (!string.IsNullOrEmpty(model.StartTime))
                {
                    sqlPub += $"AND tb1.CreateTime >= '{model.StartTime}' ";
                }
                if (!string.IsNullOrEmpty(model.EndTime))
                {
                    sqlPub += $"AND tb1.CreateTime <= '{model.EndTime}' ";
                }
                sqlCount += sqlPub + "AND tb1.IsDel = '0' ";
                sqlPub += "AND tb1.IsDel = '0' order by tb1.ASNNo desc ";
                if (model.Page == 0)
                {
                    model.Page = 1;
                }
                sqlString += sqlPub + $" offset {((model.Page - 1) * model.Limit)} rows fetch next {model.Limit} rows only;";
                var com = new Common();
                count = com.GetRowCount(sqlCount);
                var modelList = Db.Ado.SqlQuery<ArrivalNoticeDto>(sqlString);
                }).ToPageListAsync(model.Page, model.Limit, count);
                return modelList;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public List<ArrivalNoticeDetailDto> GetArrivalNoticeDetailList(ArrivalNoticeDetailVm model, out int count)
        public async Task<List<ArrivalNoticeDetailDto>> GetArrivalNoticeDetailList(ArrivalNoticeDetailVm model, RefAsync<int> count)
        {
            string sqlString = string.Empty;
            string sqlCount = string.Empty;
            int rowCount = 1;
            try
            {
                if (model.Page == 0)
                {
                    model.Page = 1;
                }
                sqlCount += $"SELECT COUNT(ID) FROM BllArrivalNoticeDetail where ASNNo = '{model.ASNNo}' and isdel = '0';";
                var com = new Common();
                count = com.GetRowCount(sqlCount);
                if (count != 0)
                {
                    rowCount = count;
                }
            var item = Expressionable.Create<BllArrivalNoticeDetail>()
                .AndIF(!string.IsNullOrWhiteSpace(model.ASNNo), it => it.ASNNo == model.ASNNo)
                .AndIF(true, it => it.IsDel == "0")
                .ToExpression();//注意 这一句 不能少
                sqlString += "SELECT DISTINCT tb1.*,tb2.Type as AsnType,tb2.Status as AsnStatus,tb3.RealName as CreateUserName, ";
                sqlString += "tb4.RealName as UpdateUserName,isnull(tb6.UnitName,tb5.UnitNo) as UnitName,tb7.PackagName,tb5.IsPasteCode ";
                sqlString += "FROM BllArrivalNoticeDetail AS tb1 ";
                sqlString += "LEFT JOIN BllArrivalNotice AS tb2 ON tb1.ASNNo = tb2.ASNNo ";
                sqlString += "LEFT JOIN SysUserInfor AS tb3 ON tb1.CreateUser = tb3.Id ";
                sqlString += "LEFT JOIN SysUserInfor AS tb4 ON tb1.UpdateUser = tb4.Id ";
                sqlString += "LEFT JOIN SysMaterials AS tb5 on tb1.SkuNo = tb5.SkuNo ";
                sqlString += "LEFT JOIN SysUnit AS tb6 on tb5.UnitNo = tb6.UnitNo ";
                sqlString += "LEFT JOIN SysPackag AS tb7 on tb1.PackagNo = tb7.PackagNo ";
                sqlString += $"WHERE tb1.ASNNo = '{model.ASNNo}' AND tb1.IsDel = '0' order by tb1.SkuNo desc ";
                sqlString += $"offset {((model.Page - 1) * model.Limit)} rows fetch next {rowCount} rows only;";
                var modelList = Db.Ado.SqlQuery<ArrivalNoticeDetailDto>(sqlString);
            var modelList = await Db.Queryable<BllArrivalNoticeDetail>().Where(item)
                .LeftJoin<BllArrivalNotice>((tb1, tb2) => tb1.ASNNo == tb2.ASNNo)
                .LeftJoin<SysUserInfor>((tb1, tb2,tb3) => tb1.CreateUser == tb3.Id)
                .LeftJoin<SysUserInfor>((tb1,tb2,tb3,tb4) => tb1.UpdateUser == tb4.Id)
                .LeftJoin<SysMaterials>((tb1, tb2, tb3, tb4,tb5) => tb1.SkuNo == tb5.SkuNo)
                .LeftJoin<SysUnit>((tb1, tb2, tb3, tb4, tb5,tb6) => tb5.UnitNo == tb6.UnitNo)
                .LeftJoin<SysPackag>((tb1, tb2, tb3, tb4, tb5, tb6,tb7) => tb1.PackagNo == tb7.PackagNo)
                .Select((tb1, tb2, tb3, tb4, tb5,tb6, tb7) => new ArrivalNoticeDetailDto()
                 {
                     Id = tb1.Id,
                     ASNNo = tb1.ASNNo,
                     SkuNo = tb1.SkuNo,
                     SkuName = tb1.SkuName,
                     Standard = tb1.Standard,
                     LotNo = tb1.LotNo,
                     LotText = tb1.LotText,
                     Qty = tb1.Qty,
                     FactQty = tb1.FactQty,
                     CompleteQty = tb1.CompleteQty,
                     IsSampling = tb1.IsSampling,
                     InspectStatus = tb1.InspectStatus,
                     PackagNo = tb1.PackagNo,
                     PackagName = tb7.PackagName,
                     UnitName = tb6.UnitName,
                     IsBale = tb1.IsBale,
                     IsBelt = tb1.IsBelt,
                     SupplierLot = tb1.SupplierLot,
                     Status = tb1.Status,
                     AsnType = tb2.Type,
                     AsnStatus = tb2.Status,
                     UDF1 = tb1.UDF1,
                     UDF2 = tb1.UDF2,
                     UDF3 = tb1.UDF3,
                     UDF4 = tb1.UDF4,
                     UDF5 = tb1.UDF5,
                     CompleteTime = tb1.CompleteTime,
                     CreateTime = tb1.CreateTime,
                     CreateUserName = tb3.RealName,
                     UpdateTime = tb1.UpdateTime.ToString(),
                     UpdateUserName = tb4.RealName
                 }).ToPageListAsync(model.Page, model.Limit, count);
                return modelList;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        //获取入库单明细剩余打印数量
Wms/WMS.BLL/BllSoServer/CompleteDetailServer.cs
@@ -3,7 +3,9 @@
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Model.ModelDto.BllSoDto;
using Model.ModelVm.BllSoVm;
using SqlSugar;
using WMS.DAL;
using WMS.Entity.BllSoEntity;
@@ -21,19 +23,13 @@
        }
        //查询拣货明细箱码信息(分组后)
        public List<CompleteDetailDto> GetCompleteDetailList(int id, int page, int limit, out int count)
        {
            try
            {
                var total = 0;
                var detailInfo = Db.Queryable<BllCompleteDetail>().First(w => string.IsNullOrEmpty(w.BoxNo) || string.IsNullOrEmpty(w.BoxNo3));
                if (detailInfo == null)
        public async Task<List<CompleteDetailDto>> GetCompleteDetailList(GetCompleteDetailVm model, RefAsync<int> count)
                {
                    Expression<Func<BllCompleteDetail, bool>> item = Expressionable.Create<BllCompleteDetail>()
                    .And(it => it.ExportAllotId == id)
                .And(it => it.ExportAllotId == model.Id)
                    .And(it => it.IsDel == "0")
                    .ToExpression();//注意 这一句 不能少
                    var data = GetAllWhereAsync(item)
            var data = await GetAllWhereAsync(item)
                        .GroupBy(m => new
                        {
                            m.SONo,
@@ -49,7 +45,7 @@
                            m.SkuName,
                            m.Standard,
                            m.PalletNo,
                            m.NowPalletNo,
                    m.NowPalletNo
                        })
                        .Select(a => new CompleteDetailDto()
                        {
@@ -68,63 +64,9 @@
                            PalletNo = a.PalletNo,
                            CompleteQty = SqlFunc.AggregateSum(a.CompleteQty),
                            NowPalletNo = a.NowPalletNo,
                            //CreateTime = a.CreateTime
                        }).ToOffsetPage(page, limit, ref total);
                    count = total;
                    return data;
                }
                else //箱码或支码为空说明是按数量拣货,增加 CreateTime 分组条件
                {
                    Expression<Func<BllCompleteDetail, bool>> item = Expressionable.Create<BllCompleteDetail>()
                    .And(it => it.ExportAllotId == id)
                    .And(it => it.IsDel == "0")
                    .ToExpression();//注意 这一句 不能少
                    var data = GetAllWhereAsync(item)
                        .GroupBy(m => new
                        {
                            m.SONo,
                            m.SODetailNo,
                            m.StockId,
                            m.ExportAllotId,
                }).ToPageListAsync(model.Page, model.Limit, count);
                            m.BoxNo,
                            m.LotNo,
                            m.LotText,
                            m.SupplierLot,
                            m.SkuNo,
                            m.SkuName,
                            m.Standard,
                            m.PalletNo,
                            m.NowPalletNo,
                            m.CreateTime
                        })
                        .Select(a => new CompleteDetailDto()
                        {
                            SONo = a.SONo,
                            SODetailNo = a.SODetailNo,
                            StockId = a.StockId,
                            ExportAllotId = a.ExportAllotId,
                            BoxNo = a.BoxNo,
                            LotNo = a.LotNo,
                            LotText = a.LotText,
                            SupplierLot = a.SupplierLot,
                            SkuNo = a.SkuNo,
                            SkuName = a.SkuName,
                            Standard = a.Standard,
                            PalletNo = a.PalletNo,
                            CompleteQty = SqlFunc.AggregateSum(a.CompleteQty),
                            NowPalletNo = a.NowPalletNo,
                        //CreateTime = a.CreateTime
                    }).ToOffsetPage(page, limit, ref total);
                    count = total;
                    return data;
                }
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
        //查询拣货明细支码详细信息
Wms/WMS.BLL/BllSoServer/ExportAllotServer.cs
@@ -3,7 +3,9 @@
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Model.ModelDto.BllSoDto;
using Model.ModelVm.BllSoVm;
using SqlSugar;
using WMS.BLL.LogServer;
using WMS.DAL;
@@ -24,29 +26,27 @@
        }
        //查询出库分配表信息
        public List<ExportAllotDto> GetExportAllotList(string no, string waveNo, string palletNo, string skuNo, string skuName, string lotNo, string status, string boxNo, int page, int limit, out int count)
        {
            try
        public async Task<List<ExportAllotDto>> GetExportAllotList(GetExportAllotVm model, RefAsync<int> count)
            {
                var strList = new List<int>();
                if (!string.IsNullOrWhiteSpace(boxNo))
            if (!string.IsNullOrWhiteSpace(model.BoxNo))
                {
                    var detailList = Db.Queryable<BllCompleteDetail>().Where(m => m.IsDel == "0" && m.BoxNo.Contains(boxNo.Trim())).Select(m => m.ExportAllotId).Distinct().ToList();
                var detailList = Db.Queryable<BllCompleteDetail>().Where(m => m.IsDel == "0" && m.BoxNo.Contains(model.BoxNo.Trim())).Select(m => m.ExportAllotId).Distinct().ToList();
                    strList = detailList;
                }
                Expression<Func<BllExportAllot, bool>> item = Expressionable.Create<BllExportAllot>()
                    .AndIF(!string.IsNullOrWhiteSpace(no), it => it.SONo.Contains(no.Trim()))
                    .AndIF(!string.IsNullOrWhiteSpace(waveNo), it => it.WaveNo.Contains(waveNo.Trim()))
                    .AndIF(!string.IsNullOrWhiteSpace(palletNo), it => it.PalletNo.Contains(palletNo.Trim()))
                    .AndIF(!string.IsNullOrWhiteSpace(skuNo), it => it.SkuNo.Contains(skuNo.Trim()))
                    .AndIF(!string.IsNullOrWhiteSpace(skuName), it => it.SkuName.Contains(skuName.Trim()))
                    .AndIF(!string.IsNullOrWhiteSpace(lotNo), it => it.LotNo.Contains(lotNo.Trim()))
                    .AndIF(!string.IsNullOrWhiteSpace(status), it => it.Status == status)
                    .AndIF(!string.IsNullOrWhiteSpace(boxNo), m => strList.Contains(m.Id))
                .AndIF(!string.IsNullOrWhiteSpace(model.SoNo), it => it.SONo.Contains(model.SoNo.Trim()))
                .AndIF(!string.IsNullOrWhiteSpace(model.WaveNo), it => it.WaveNo.Contains(model.WaveNo.Trim()))
                .AndIF(!string.IsNullOrWhiteSpace(model.PalletNo), it => it.PalletNo.Contains(model.PalletNo.Trim()))
                .AndIF(!string.IsNullOrWhiteSpace(model.SkuNo), it => it.SkuNo.Contains(model.SkuNo.Trim()))
                .AndIF(!string.IsNullOrWhiteSpace(model.SkuName), it => it.SkuName.Contains(model.SkuName.Trim()))
                .AndIF(!string.IsNullOrWhiteSpace(model.LotNo), it => it.LotNo.Contains(model.LotNo.Trim()))
                .AndIF(!string.IsNullOrWhiteSpace(model.Status), it => it.Status == model.Status)
                .AndIF(!string.IsNullOrWhiteSpace(model.BoxNo), m => strList.Contains(m.Id))
                    .ToExpression();//注意 这一句 不能少
                var total = 0;
                var data = GetAllWhereAsync(item)
            var data = await GetAllWhereAsync(item)
                    .LeftJoin<SysLogisticsInfo>((a, b) => a.LogisticsId == b.Id)
                    .LeftJoin<SysUserInfor>((a, b, c) => a.CreateUser == c.Id)
                    .LeftJoin<SysUserInfor>((a, b, c, d) => a.CreateUser == d.Id)
@@ -82,14 +82,10 @@
                        UpdateUserName = d.RealName,
                        CreateTime = a.CreateTime,
                        UpdateTime = a.UpdateTime
                    }).OrderByDescending(a => a.CreateTime).OrderBy(a => a.Status).OrderBy(a => a.SkuNo).ToOffsetPage(page, limit, ref total);
                }).OrderByDescending(a => a.CreateTime).OrderBy(a => a.Status).OrderBy(a => a.SkuNo)
                .ToPageListAsync(model.Page, model.Limit, count);
                count = total;
                return data;
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
        //撤销分配(删除)
Wms/WMS.BLL/BllSoServer/ExportNoticeDetailServer.cs
@@ -26,8 +26,6 @@
        }
        public async Task<List<ExportNoticeDetailDto>> GetExportNoticeDetailList(GetExportNoticeDetailVm model, RefAsync<int> count)
        {
            try
            {
                if (string.IsNullOrWhiteSpace(model.SoNo))
                {
                    throw new Exception("出库单号为空");
@@ -74,11 +72,6 @@
                    }).ToPageListAsync(model.Page, model.Limit, count);
                return data;
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
        public bool DelExportNoticeDetail(int id, int userId)
Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -814,8 +814,6 @@
        public async Task<List<ExportNoticeDto>> GetExportNoticeList(GetExportNoticeVm model, RefAsync<int> count)
        {
            try
            {
                var strList = new List<string>();
                if (!string.IsNullOrWhiteSpace(model.LotNo))
@@ -870,11 +868,6 @@
                    .ToPageListAsync(model.Page, model.Limit, count);
                return data;
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
        //获取添加/编辑出库单时选择物料明细信息
@@ -1907,33 +1900,23 @@
        /// <param name="limit">零托标记</param> 
        /// <param name="count">零托标记</param> 
        /// <returns></returns>
        public List<DataStockDetail> GetPalletNoOutList(string skuNo, string skuName, string palletNo, string lotNo, string inspectMark, string bitPalletMark, int page, int limit, out int count)
        {
            try
        public async Task<List<DataStockDetail>> GetPalletNoOutList(GetPalletNoOutVm model, RefAsync<int> count)
            {
                Expression<Func<DataStockDetail, bool>> item = Expressionable.Create<DataStockDetail>()
                    .AndIF(!string.IsNullOrWhiteSpace(skuNo), m => m.SkuNo.Contains(skuNo.Trim()))
                    .AndIF(!string.IsNullOrWhiteSpace(skuName), m => m.SkuName.Contains(skuName.Trim()))
                    .AndIF(!string.IsNullOrWhiteSpace(palletNo), m => m.PalletNo.Contains(palletNo.Trim()))
                    .AndIF(!string.IsNullOrWhiteSpace(lotNo), m => m.LotNo.Contains(lotNo.Trim()))
                    .AndIF(!string.IsNullOrWhiteSpace(inspectMark), m => m.InspectMark == inspectMark)
                    .AndIF(!string.IsNullOrWhiteSpace(bitPalletMark), m => m.BitPalletMark == bitPalletMark)
                   .AndIF(!string.IsNullOrWhiteSpace(model.SkuNo), m => m.SkuNo.Contains(model.SkuNo.Trim()))
                   .AndIF(!string.IsNullOrWhiteSpace(model.SkuName), m => m.SkuName.Contains(model.SkuName.Trim()))
                   .AndIF(!string.IsNullOrWhiteSpace(model.PalletNo), m => m.PalletNo.Contains(model.PalletNo.Trim()))
                   .AndIF(!string.IsNullOrWhiteSpace(model.LotNo), m => m.LotNo.Contains(model.LotNo.Trim()))
                   .AndIF(!string.IsNullOrWhiteSpace(model.InspectMark), m => m.InspectMark == model.InspectMark)
                   .AndIF(!string.IsNullOrWhiteSpace(model.BitPalletMark), m => m.BitPalletMark == model.BitPalletMark)
                    .And(m => !string.IsNullOrWhiteSpace(m.WareHouseNo))
                    .And(a => a.Status == "0")
                    .And(a => a.WareHouseNo == "W01")
                    .ToExpression();
                var total = 0;
                var data = Db.Queryable<DataStockDetail>().Where(item).OrderBy(m => m.LocatNo).ToOffsetPage(page, limit, ref total);
            var data = await Db.Queryable<DataStockDetail>().Where(item).OrderBy(m => m.LocatNo).ToPageListAsync(model.Page, model.Limit, count);
                //data.Select(m => m.Status == "0" && m.IsDel == "0");
                count = total;
                return data;
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
        //托盘出库
Wms/WMS.BLL/BllSoServer/WaveMageServer.cs
@@ -3,8 +3,10 @@
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Model.InterFaceModel;
using Model.ModelDto.BllSoDto;
using Model.ModelVm.BllSoVm;
using Newtonsoft.Json;
using SqlSugar;
using WMS.BLL.Logic;
@@ -27,18 +29,16 @@
        }
        //获取波次单信息
        public List<WaveMageDto> GetWaveMageList(string waveNo, string status, string lotNo, int? logisticsId, int page, int limit, out int count)
        {
            try
        public async Task<List<WaveMageDto>> GetWaveMageList(GetWaveMageVm model, RefAsync<int> count)
            {
                Expression<Func<BllWaveMage, bool>> item = Expressionable.Create<BllWaveMage>()
                    .AndIF(!string.IsNullOrWhiteSpace(waveNo), it => it.WaveNo.Contains(waveNo.Trim()))
                    .AndIF(!string.IsNullOrWhiteSpace(status), it => it.Status == status)
                    .AndIF(logisticsId != null, it => it.LogisticsId == logisticsId)
                    .AndIF(!string.IsNullOrWhiteSpace(lotNo), it => it.LotNo.Contains(lotNo))
                    .AndIF(!string.IsNullOrWhiteSpace(model.WaveNo), it => it.WaveNo.Contains(model.WaveNo.Trim()))
                    .AndIF(!string.IsNullOrWhiteSpace(model.Status), it => it.Status == model.Status)
                    .AndIF(model.LogisticsId != null, it => it.LogisticsId == model.LogisticsId)
                    .AndIF(!string.IsNullOrWhiteSpace(model.LotNo), it => it.LotNo.Contains(model.LotNo))
                    .ToExpression();//注意 这一句 不能少
                var total = 0;
                var data = GetAllWhereAsync(item)
            var data = await GetAllWhereAsync(item)
                    .LeftJoin<SysLogisticsInfo>((a, b) => a.LogisticsId == b.Id)
                    .LeftJoin<SysUserInfor>((a, b, c) => a.CreateUser == c.Id)
                    .LeftJoin<SysUserInfor>((a, b, c, d) => a.CreateUser == d.Id)
@@ -64,15 +64,9 @@
                    })
                    .OrderByDescending(a => a.CreateTime)
                    .ToOffsetPage(page, limit, ref total);
                count = total;
                .ToPageListAsync(model.Page, model.Limit, count);
                return data;
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
        //获取添加波次单的出库单信息
Wms/WMS.IBLL/IBllAsnServer/IArrivalNoticeServer.cs
@@ -3,7 +3,9 @@
using Model.ModelDto.SysDto;
using Model.ModelVm;
using Model.ModelVm.SysVm;
using SqlSugar;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace WMS.IBLL.IBllAsnServer
{
@@ -17,7 +19,7 @@
        /// <param name="model">查询条件</param>
        /// <param name="count">数量</param>
        /// <returns>入库单信息</returns>
        List<ArrivalNoticeDto> GetArrivalNoticeList(ArrivalNoticeVm model, out int count);
        Task<List<ArrivalNoticeDto>> GetArrivalNoticeList(ArrivalNoticeVm model, RefAsync<int> count);
        /// <summary>
        /// 入库单明细数量
@@ -25,7 +27,7 @@
        /// <param name="model">查询条件</param>
        /// <param name="count"></param>
        /// <returns></returns>
        List<ArrivalNoticeDetailDto> GetArrivalNoticeDetailList(ArrivalNoticeDetailVm model, out int count);
        Task<List<ArrivalNoticeDetailDto>> GetArrivalNoticeDetailList(ArrivalNoticeDetailVm model, RefAsync<int> count);
        /// <summary>
        /// 获取入库单明细剩余打印数量
Wms/WMS.IBLL/IBllSoServer/ICompleteDetailServer.cs
@@ -1,7 +1,10 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Model.ModelDto.BllSoDto;
using Model.ModelVm.BllSoVm;
using SqlSugar;
namespace WMS.IBLL.IBllSoServer
{
@@ -15,7 +18,7 @@
        /// <param name="limit"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        List<CompleteDetailDto> GetCompleteDetailList(int id, int page, int limit, out int count);
        Task<List<CompleteDetailDto>> GetCompleteDetailList(GetCompleteDetailVm model, RefAsync<int> count);
        /// <summary>
        /// 获取拣货明细中详细箱支信息 根据箱码\支码
Wms/WMS.IBLL/IBllSoServer/IExportAllotServer.cs
@@ -1,7 +1,10 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Model.ModelDto.BllSoDto;
using Model.ModelVm.BllSoVm;
using SqlSugar;
namespace WMS.IBLL.IBllSoServer
{
@@ -22,7 +25,7 @@
        /// <param name="limit"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        List<ExportAllotDto> GetExportAllotList(string no, string waveNo, string palletNo, string skuNo, string skuName, string lotNo, string status, string boxNo, int page, int limit, out int count);
        Task<List<ExportAllotDto>> GetExportAllotList(GetExportAllotVm model, RefAsync<int> count);
        /// <summary>
        /// 撤销分配(删除)
Wms/WMS.IBLL/IBllSoServer/IExportNoticeServer.cs
@@ -110,8 +110,7 @@
        /// <param name="limit"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        List<DataStockDetail> GetPalletNoOutList(string skuNo, string skuName, string palletNo, string lotNo,
            string inspectMark, string bitPalletMark, int page, int limit, out int count);
        Task<List<DataStockDetail>> GetPalletNoOutList(GetPalletNoOutVm model, RefAsync<int> count);
        /// <summary>
        /// 托盘下发出库
Wms/WMS.IBLL/IBllSoServer/IWaveMageServer.cs
@@ -1,8 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Model.InterFaceModel;
using Model.ModelDto.BllSoDto;
using Model.ModelVm.BllSoVm;
using SqlSugar;
namespace WMS.IBLL.IBllSoServer
{
@@ -19,7 +22,7 @@
        /// <param name="limit">数量</param>
        /// <param name="count">中数量</param>
        /// <returns></returns>
        List<WaveMageDto> GetWaveMageList(string waveNo, string status, string lotNo, int? logisticsId, int page, int limit, out int count);
        Task<List<WaveMageDto>> GetWaveMageList(GetWaveMageVm model, RefAsync<int> count);
        /// <summary>
        /// 获取添加波次单的出库单信息
Wms/Wms/Controllers/BllAsnController.cs
@@ -57,33 +57,23 @@
        /// <param name="model">查询条件</param>
        /// <returns>入库单信息</returns>
        [HttpPost]
        public IActionResult GetArrivalNoticeList(ArrivalNoticeVm model)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<SqlSugarPagedList> GetArrivalNoticeList(ArrivalNoticeVm model)
        {
            try
            {
                var models = _arrivalNoticeSvc.GetArrivalNoticeList(model, out int count);
                return Ok(new { code = 0, count, msg = "入库单信息", data = models });
            RefAsync<int> count = new RefAsync<int>();
            var bolls = await _arrivalNoticeSvc.GetArrivalNoticeList(model, count);
            return new SqlSugarPagedList() { Items = bolls, Total = count };
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        [HttpPost]
        public IActionResult GetArrivalNoticeDetailList(ArrivalNoticeDetailVm model)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<SqlSugarPagedList> GetArrivalNoticeDetailList(ArrivalNoticeDetailVm model)
        {
            try
            {
                var models = _arrivalNoticeSvc.GetArrivalNoticeDetailList(model, out int count);
                return Ok(new { code = 0, count, msg = "入库单明细信息", data = models });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            RefAsync<int> count = new RefAsync<int>();
            var bolls = await _arrivalNoticeSvc.GetArrivalNoticeDetailList(model, count);
            return new SqlSugarPagedList() { Items = bolls, Total = count };
        }
        /// <summary>
Wms/Wms/Controllers/BllSoController.cs
@@ -522,18 +522,13 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetExportAllotList(GetExportAllotVm model)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<SqlSugarPagedList> GetExportAllotList(GetExportAllotVm model)
        {
            try
            {
                var bolls = _exAllotSvc.GetExportAllotList(model.SoNo, model.WaveNo, model.PalletNo, model.SkuNo, model.SkuName, model.LotNo, model.Status,model.BoxNo, model.Page, model.Limit, out int count);
            RefAsync<int> count = new RefAsync<int>();
            var bolls = await _exAllotSvc.GetExportAllotList(model, count);
                return Ok(new { code = 0, count, msg = "出库分配信息", data = bolls });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            return new SqlSugarPagedList() { Items = bolls, Total = count };
        }
        /// <summary>
@@ -577,18 +572,13 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetCompleteDetailList(GetCompleteDetailVm model)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<SqlSugarPagedList> GetCompleteDetailList(GetCompleteDetailVm model)
        {
            try
            {
                var bolls = _comDetailSvc.GetCompleteDetailList(model.Id,model.Page, model.Limit, out int count);
            RefAsync<int> count = new RefAsync<int>();
            var bolls = await _comDetailSvc.GetCompleteDetailList(model, count);
                return Ok(new { code = 0, count, msg = "拣货明细信息", data = bolls });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            return new SqlSugarPagedList() { Items = bolls, Total = count };
        }
        [HttpGet]
@@ -616,18 +606,13 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost] 
        public IActionResult GetPalletNoOutList(GetPalletNoOutVm model)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<SqlSugarPagedList> GetPalletNoOutList(GetPalletNoOutVm model)
        {
            try
            {
                var bolls = _exNoticeSvc.GetPalletNoOutList(model.SkuNo,model.SkuName,model.PalletNo,model.LotNo,model.InspectMark,model.BitPalletMark,model.Page,model.Limit,out int count);
            RefAsync<int> count = new RefAsync<int>();
            var bolls = await _exNoticeSvc.GetPalletNoOutList(model, count);
                return Ok(new { code = 0, count, msg = "获取托盘出库数据异常", data = bolls});
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = "托盘出库数据" + e.Message });
            }
            return new SqlSugarPagedList() { Items = bolls, Total = count };
        }
        /// <summary>
@@ -910,18 +895,13 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetWaveMageList(GetWaveMageVm model)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<SqlSugarPagedList> GetWaveMageList(GetWaveMageVm model)
        {
            try
            {
                var bolls = _waveSvc.GetWaveMageList(model.WaveNo, model.Status, model.LotNo, model.LogisticsId, model.Page, model.Limit, out int count);
            RefAsync<int> count = new RefAsync<int>();
            var bolls = await _waveSvc.GetWaveMageList(model, count);
                return Ok(new { code = 0, count, msg = "出库单信息", data = bolls });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            return new SqlSugarPagedList() { Items = bolls, Total = count };
        }
        /// <summary>