admin
11 小时以前 ace83e08bedac4362423e7a38369baf35d2468c1
Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
@@ -1,29 +1,30 @@
using System;
using System.Collections.Generic;
using SqlSugar;
using System.Linq;
using System.Linq.Expressions;
using Model.InterFaceModel;
using Model.InterFaceModel;
using Model.ModelDto;
using SqlSugar.Extensions;
using WMS.Entity.BllSoEntity;
using WMS.Entity.Context;
using WMS.Entity.DataEntity;
using WMS.Entity.SysEntity;
using WMS.IBLL.IPdaServer;
using Model.ModelVm;
using Model.ModelVm.PdaVm;
using Newtonsoft.Json;
using SqlSugar;
using SqlSugar.Extensions;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
using System.Web;
using Utility;
using Utility.Tools;
using WMS.BLL.Logic;
using WMS.BLL.LogServer;
using WMS.DAL;
using WMS.Entity.LogEntity;
using WMS.Entity.BllQualityEntity;
using WMS.Entity.BllAsnEntity;
using System.Threading.Tasks;
using Utility;
using WMS.BLL.Logic;
using System.Web;
using WMS.Entity.BllQualityEntity;
using WMS.Entity.BllSoEntity;
using WMS.Entity.Context;
using WMS.Entity.DataEntity;
using WMS.Entity.LogEntity;
using WMS.Entity.SysEntity;
using WMS.IBLL.IPdaServer;
namespace WMS.BLL.BllPdaServer
{
@@ -125,7 +126,6 @@
                bool isNew = false;
                var pinStockDetail = Db.Queryable<DataStockDetail>().First(m => m.IsDel == "0" && m.PalletNo == palletNoNew && m.SkuNo == stockDetail.SkuNo && m.LotNo == stockDetail.LotNo);
                //var pinStockDetail = Db.Queryable<DataStockDetail>().First(m => m.IsDel == "0" && m.PalletNo == palletNoNew);
                if (pinStockDetail != null)
                {
@@ -136,13 +136,12 @@
                    if (palletNo != palletNoNew)//非整托拣货                                                
                    {
                        //var pinStockDetails = Db.Queryable<DataStockDetail>().Where(m => m.IsDel == "0" && m.PalletNo == palletNoNew && m.Id != pinStockDetail.Id).ToList();
                        var pinStockDetails = Db.Queryable<DataStockDetail>().Where(m => m.IsDel == "0" && m.PalletNo == palletNoNew).ToList();
                        //只允许绑定同一个出库单下的物料
                        if (pinStockDetails.Count(m => m.SONo != notice.SONo) > 0)
                        {
                            throw Oops.Bah("拼托托盘上只能放同一个出库单下的物料!");
                        }
                        ////只允许绑定同一个出库单下的物料
                        //if (pinStockDetails.Count(m => m.SONo != notice.SONo) > 0)
                        //{
                        //    throw Oops.Bah("拼托托盘上只能放同一个出库单下的物料!");
                        //}
                    }
                    sdId = pinStockDetail.Id;
@@ -159,11 +158,11 @@
                    if (newPalletInfo.Status == "0")
                    {
                        var pinStockDetails = Db.Queryable<DataStockDetail>().Where(m => m.IsDel == "0" && m.PalletNo == palletNoNew && (m.SkuNo != stockDetail.SkuNo || m.LotNo != stockDetail.LotNo)).ToList();
                        //只允许绑定同一个出库单下的物料
                        if (pinStockDetails.Count(m => m.SONo != notice.SONo) > 0)
                        {
                            throw Oops.Bah("一个托盘只能接受一个出库单拼托!");
                        }
                        ////只允许绑定同一个出库单下的物料
                        //if (pinStockDetails.Count(m => m.SONo != notice.SONo) > 0)
                        //{
                        //    throw Oops.Bah("一个托盘只能接受一个出库单拼托!");
                        //}
                    }
                    else
                    {
@@ -1567,9 +1566,12 @@
                string skuNo = boxInfos.First().SkuNo;
                string skuName = boxInfos.First().SkuName;
                // 验证是否车间线边仓库
                var areaList = new List<string>() { "B06", "B07", "B09", "B24" };
                if (!areaList.Contains(stockDetail.AreaNo))
                //验证是否车间线边仓库
                string areaNoSql = $@"select AreaNo from SysStorageArea where IsDel='0' and AreaType='1'";
                DataTable areaNoDt = Db.Ado.GetDataTable(areaNoSql);
                List<string> areaNoList = areaNoDt.Rows.Cast<DataRow>().Select(e => e["AreaNo"] + "").ToList();
                if (!areaNoList.Contains(stockDetail.AreaNo))
                {
                    throw Oops.Bah("托盘不是车间托盘!");
                }
@@ -1725,9 +1727,12 @@
                    throw Oops.Bah("未查询到该托盘上货物的库存明细信息!");
                }
                // 验证是否车间线边仓库
                var areaList = new List<string>() { "B06", "B07", "B09", "B24" };
                if (!areaList.Contains(stockDetail.AreaNo))
                //验证是否车间线边仓库
                string areaNoSql = $@"select AreaNo from SysStorageArea where IsDel='0' and AreaType='1'";
                DataTable areaNoDt = Db.Ado.GetDataTable(areaNoSql);
                List<string> areaNoList = areaNoDt.Rows.Cast<DataRow>().Select(e => e["AreaNo"] + "").ToList();
                if (!areaNoList.Contains(stockDetail.AreaNo))
                {
                    throw Oops.Bah("托盘不是车间托盘!");
                }