Administrator
2024-07-15 970d5c1800587d3a634a716a13a3092f59785b11
波次管理页面和拣货明细页面接口方法更改
11个文件已修改
254 ■■■■ 已修改文件
HTML/views/SOSetting/ExportAllot.html 2 ●●● 补丁 | 查看 | 原始文档 | 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/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/BllSoController.cs 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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/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/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/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>
@@ -909,18 +894,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>