Administrator
12 小时以前 95f6d7483ccb5466a9ad6b8b6cb51138bbb4a030
Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
@@ -23,6 +23,7 @@
using System.Threading.Tasks;
using Utility;
using WMS.BLL.Logic;
using System.Web;
namespace WMS.BLL.BllPdaServer
{
@@ -2093,6 +2094,49 @@
            return list;
        }
        /// <summary>
        /// 出库拣货获取扫描标签数量
        /// </summary>
        /// <param name="palletNo"></param>
        /// <param name="boxNo"></param>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public decimal CheckBoxForPick(string palletNo ,string boxNo)
        {
            try
            {
                decimal boxNum = 0;
                if (string.IsNullOrEmpty(palletNo))
                {
                    throw new Exception("托盘条码不可为空!");
                }
                if (string.IsNullOrEmpty(boxNo))
                {
                    throw new Exception("标签条码不可为空!");
                }
                var boxInfo = Db.Queryable<DataBoxInfo>().Where(w => w.IsDel == "0" && w.BoxNo == boxNo && w.PalletNo == palletNo).ToList();
                if (boxInfo.Count <= 0)
                {
                    boxInfo = Db.Queryable<DataBoxInfo>().Where(w => w.IsDel == "0" && w.BoxNo2 == boxNo && w.PalletNo == palletNo).ToList();
                    if (boxInfo.Count <= 0)
                    {
                        boxInfo = Db.Queryable<DataBoxInfo>().Where(w => w.IsDel == "0" && w.BoxNo3 == boxNo && w.PalletNo == palletNo).ToList();
                    }
                }
                if (boxInfo == null || boxInfo.Count <= 0)
                {
                    throw new Exception("标签条码未在该托盘内!");
                }
                boxNum = boxInfo.Sum(s => s.Qty);
                return boxNum;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
        //获取库内无箱码的托盘分配信息
        public async Task<List<BoxInfo>> GetAllotPlnInfo(string soDetailId, string palletNo)
        {
@@ -2830,6 +2874,11 @@
                        throw Oops.Bah("追溯条码和拣货数量不能同时输入");
                    }
                    boxInfos = await boxInfo.ToListAsync();
                    if (boxInfos[0].SkuNo != allot.SkuNo || boxInfos[0].LotNo != allot.LotNo)
                    {
                        throw Oops.Bah("箱码物料批次和选择物料批次不一致!");
                    }
                    var comDetailList = Db.Queryable<BllCompleteDetail>().Where(m => m.IsDel == "0" && m.ExportAllotId == allot.Id && m.PalletNo == palletNo).ToList();
                    if (biaoShi == "2") //散支拣货
@@ -3669,7 +3718,7 @@
            {
                throw Oops.Bah("未获取到对应储位信息,请检查!");
            }
            if (locat.Status != "3")
            if (locat.Status != "1")
            {
                throw Oops.Bah("当前储位不是有物品,请检查!");
            }
@@ -3752,7 +3801,7 @@
                #region 添加出库操作日志记录信息
                //添加操作日志记录
                var k = new OperationSOServer().AddLogOperationSo("出库作业", "拣货明细", soNo, "完成", $"用PDA完成了单据号为{soNo}的平库出库", userId);
                var k = new OperationSOServer().AddLogOperationSo("出库作业", "拣货明细", palletNo, "完成", $"用PDA完成了托盘号为{palletNo}的平库出库", userId);
                #endregion