admin
2 天以前 49bb2841cc45fea723667672e56c8c7510165ba8
格式化代码
7个文件已修改
463 ■■■■ 已修改文件
HTML/.vscode/settings.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/js/public.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pda/js/public.js 248 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs 187 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Wms/Controllers/BllSoController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Wms/Controllers/PdaAsnController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Wms/appsettings.json 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/.vscode/settings.json
@@ -1,3 +1,4 @@
{
    "liveServer.settings.port": 5503
    "liveServer.settings.port": 5503,
    "editor.wordWrap": "on"
}
HTML/js/public.js
@@ -8,6 +8,8 @@
//var IP = "http://192.168.62.200:8888/api";//bkl服务器
//运行
var IP = "https://localhost:44363/api";
//本地发布
//var IP = "http://localhost:8034/api";
@@ -72,7 +74,7 @@
    timeout: 45000,
    async: true,
    cache: false,
    beforeSend: function (xhr, settings) {},
    beforeSend: function (xhr, settings) { },
    success: function (res, status, xhr) {
      // console.log(res);
      // console.log(status);
@@ -125,7 +127,7 @@
    timeout: 45000,
    async: false,
    cache: false,
    beforeSend: function (xhr, settings) {},
    beforeSend: function (xhr, settings) { },
    success: function (res, status, xhr) {
      callbackFun(res);
    },
@@ -204,7 +206,7 @@
    timeout: 45000,
    async: false,
    cache: false,
    beforeSend: function (xhr, settings) {},
    beforeSend: function (xhr, settings) { },
    success: function (res, status, xhr) {
      callbackFun(res);
    },
Pda/js/public.js
@@ -8,148 +8,150 @@
//var IP = "http://192.168.62.200:8888/api";
//运行
var IP = "https://localhost:44363/api";
//本地发布
//var IP = "http://localhost:8034/api";
jQuery.support.cors = true;
function sendData(url, data, type, callbackFun) {
  // callbackFun("{}");
  // return;
  var deferred = $.Deferred();
  if (type != "get") {
    data = JSON.stringify(data);
  }
  if (url != IP + "/WeatherForecast/Login") {
    if (!$.cookie("token")) {
      callbackFun("登录人信息已失效");
      try {
        parent.window.location.href = "/View/login.html";
      } catch (error) {
        window.location.href = "/View/login.html";
      }
      return;
    }
    if (isTokenExpired($.cookie("token"))) {
      try {
        parent.window.location.href = "/View/login.html";
      } catch (error) {
        window.location.href = "/View/login.html";
      }
      return;
    }
  }
  $.ajax({
    url: url,
    data: data,
    type: type,
    headers: {
      "Content-Type": "application/json",
      ToKen: $.cookie("token"),
    },
    timeout: 45000,
    async: true,
    cache: false,
    beforeSend: function (xhr, settings) {},
    success: function (res, status, xhr) {
      callbackFun(res);
    },
    error: function (xhr, status, error) {
      callbackFun(xhr, status, error);
      // layer.msg(xhr.statusText, {
      //   icon: 2,
      //   time: 2000 //2秒关闭(如果不配置,默认是3秒)
      // }, function() {});
    },
  });
    // callbackFun("{}");
    // return;
    var deferred = $.Deferred();
    if (type != "get") {
        data = JSON.stringify(data);
    }
    if (url != IP + "/WeatherForecast/Login") {
        if (!$.cookie("token")) {
            callbackFun("登录人信息已失效");
            try {
                parent.window.location.href = "/View/login.html";
            } catch (error) {
                window.location.href = "/View/login.html";
            }
            return;
        }
        if (isTokenExpired($.cookie("token"))) {
            try {
                parent.window.location.href = "/View/login.html";
            } catch (error) {
                window.location.href = "/View/login.html";
            }
            return;
        }
    }
    $.ajax({
        url: url,
        data: data,
        type: type,
        headers: {
            "Content-Type": "application/json",
            ToKen: $.cookie("token"),
        },
        timeout: 45000,
        async: true,
        cache: false,
        beforeSend: function (xhr, settings) { },
        success: function (res, status, xhr) {
            callbackFun(res);
        },
        error: function (xhr, status, error) {
            callbackFun(xhr, status, error);
            // layer.msg(xhr.statusText, {
            //   icon: 2,
            //   time: 2000 //2秒关闭(如果不配置,默认是3秒)
            // }, function() {});
        },
    });
}
function synData(url, data, type, callbackFun) {
  var deferred = $.Deferred();
  if (type != "get") {
    data = JSON.stringify(data);
  }
  if (url != IP + "/WeatherForecast/Login") {
    if (!$.cookie("token")) {
      callbackFun("登录人信息已失效");
      try {
        parent.window.location.href = "/View/login.html";
      } catch (error) {
        window.location.href = "/View/login.html";
      }
      return;
    }
    if (isTokenExpired($.cookie("token"))) {
      try {
        parent.window.location.href = "/View/login.html";
      } catch (error) {
        window.location.href = "/View/login.html";
      }
      return;
    }
  }
  $.ajax({
    url: url,
    data: data,
    type: type,
    headers: {
      "Content-Type": "application/json",
      ToKen: $.cookie("token"),
    },
    timeout: 45000,
    async: false,
    cache: false,
    beforeSend: function (xhr, settings) {},
    success: function (res, status, xhr) {
      callbackFun(res);
    },
    error: function (xhr, status, error) {
      console.log("失败了");
      console.log(xhr);
      callbackFun(xhr, status, error);
    },
  });
    var deferred = $.Deferred();
    if (type != "get") {
        data = JSON.stringify(data);
    }
    if (url != IP + "/WeatherForecast/Login") {
        if (!$.cookie("token")) {
            callbackFun("登录人信息已失效");
            try {
                parent.window.location.href = "/View/login.html";
            } catch (error) {
                window.location.href = "/View/login.html";
            }
            return;
        }
        if (isTokenExpired($.cookie("token"))) {
            try {
                parent.window.location.href = "/View/login.html";
            } catch (error) {
                window.location.href = "/View/login.html";
            }
            return;
        }
    }
    $.ajax({
        url: url,
        data: data,
        type: type,
        headers: {
            "Content-Type": "application/json",
            ToKen: $.cookie("token"),
        },
        timeout: 45000,
        async: false,
        cache: false,
        beforeSend: function (xhr, settings) { },
        success: function (res, status, xhr) {
            callbackFun(res);
        },
        error: function (xhr, status, error) {
            console.log("失败了");
            console.log(xhr);
            callbackFun(xhr, status, error);
        },
    });
}
$("#navIcon").click(function () {
  if ($(".nav_list").css("display") == "none") {
    $(".nav_list").show();
  } else {
    $(".nav_list").hide();
  }
    if ($(".nav_list").css("display") == "none") {
        $(".nav_list").show();
    } else {
        $(".nav_list").hide();
    }
});
//深拷贝
function deepCopy(obj) {
  let newobj = null; // 接受拷贝的新对象
  if (typeof obj == "object" && typeof obj !== null) {
    // 判断是否是引用类型
    newobj = obj instanceof Array ? [] : {}; // 判断是数组还是对象
    for (var i in obj) {
      newobj[i] = deepCopy(obj[i]); // 判断下一级是否还是引用类型
    }
  } else {
    newobj = obj;
  }
    let newobj = null; // 接受拷贝的新对象
    if (typeof obj == "object" && typeof obj !== null) {
        // 判断是否是引用类型
        newobj = obj instanceof Array ? [] : {}; // 判断是数组还是对象
        for (var i in obj) {
            newobj[i] = deepCopy(obj[i]); // 判断下一级是否还是引用类型
        }
    } else {
        newobj = obj;
    }
  return newobj;
    return newobj;
}
function isTokenExpired(token) {
  if (token == undefined || token == "") {
    return true;
  }
  const tokenParts = token.split(".");
  if (tokenParts.length !== 3) {
    return true; // JWT 格式不正确
  }
  const payloadBase64 = tokenParts[1];
  const payload = JSON.parse(atob(payloadBase64));
    if (token == undefined || token == "") {
        return true;
    }
    const tokenParts = token.split(".");
    if (tokenParts.length !== 3) {
        return true; // JWT 格式不正确
    }
    const payloadBase64 = tokenParts[1];
    const payload = JSON.parse(atob(payloadBase64));
  if (!payload || !payload.exp) {
    return true; // 没有有效载荷或者没有过期时间
  }
    if (!payload || !payload.exp) {
        return true; // 没有有效载荷或者没有过期时间
    }
  const now = Date.now() / 1000; // 当前时间戳(秒)
  const expiration = payload.exp;
    const now = Date.now() / 1000; // 当前时间戳(秒)
    const expiration = payload.exp;
  return now >= expiration;
    return now >= expiration;
}
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -23,7 +23,7 @@
using ZXing.OneD;
using System.Threading.Tasks;
using System.Security.Policy;
using Newtonsoft.Json;
using Newtonsoft.Json;
using Utility.Tools;
using Model.ModelDto.SysDto;
using Model.ModelVm.SysVm;
@@ -52,7 +52,7 @@
            {
                #region 判断
                //0:成品入库 1:采购入库 3:退货入库 4:车间余料入库 8:生产退料入库
                if (string.IsNullOrEmpty(model.AsnNo))
                {
@@ -145,7 +145,7 @@
                if (sku == null)
                {
                    throw new Exception("当前物料信息不存在,请核实!");
                }
                }
                var pack = Db.Queryable<SysPackag>().First(m => m.IsDel == "0" && m.PackagNo == sku.PackagNo);
                if (pack == null)
                {
@@ -250,7 +250,7 @@
                        bindId = bind.Id;
                        bind.Qty += model.SkuQty;
                    }
                    #endregion
                    #region 库存明细和质检信息
@@ -512,7 +512,7 @@
                    #endregion
                    #region 库存明细
                    // 库存已存在 更新数据
                    sd1.Qty += bind.Qty;
                    sd1.CompleteTime = comTime;
@@ -587,7 +587,7 @@
                    }
                    #endregion
                }
                //拼箱
                if (notBoxInfoList.Count > 0)
                {
@@ -1136,7 +1136,7 @@
                #region 判断
                //0:成品入库 1:采购入库 3:退货入库 4:车间余料入库 8:生产退料入库
                if (string.IsNullOrEmpty(model.AsnNo))
                {
@@ -1230,7 +1230,7 @@
                var bNum = 0m;//箱码物品数量 
                //公共方法获取包装数量
                new Common().GetPackQtyInfo(sku.PackagNo, ref pNum, ref bNum);
                #endregion
@@ -1329,7 +1329,7 @@
                //验证库存托盘是否有贴标物料
                var skuStr = Db.Queryable<SysMaterials>().Where(m => m.IsDel == "0" && m.IsPasteCode == "1").Select(m => m.SkuNo).ToList();
                var sdHave = Db.Queryable<DataStockDetail>().Count(m => m.IsDel == "0" && m.PalletNo == model.PalletNo && skuStr.Contains(m.SkuNo));
                if (sdHave>0)
                if (sdHave > 0)
                {
                    throw new Exception("当前托盘含有贴标物料信息,不能组托");
                }
@@ -1610,10 +1610,10 @@
        {
            try
            {
                var modelList = Db.Queryable<BllArrivalNoticeDetail>()
                    .LeftJoin<BllArrivalNotice>((tb1, tb2) => tb1.ASNNo == tb2.ASNNo )
                    .LeftJoin<SysMaterials>((tb1, tb2, tb3) => tb1.SkuNo == tb3.SkuNo )
                    .LeftJoin<BllArrivalNotice>((tb1, tb2) => tb1.ASNNo == tb2.ASNNo)
                    .LeftJoin<SysMaterials>((tb1, tb2, tb3) => tb1.SkuNo == tb3.SkuNo)
                    .Where((tb1, tb2, tb3) => tb1.IsDel == "0" && tb2.IsDel == "0" && (tb2.Status == "0" || tb2.Status == "1") && tb3.IsDel == "0" && tb3.IsPasteCode == "1")
                    .Select((tb1, tb2, tb3) => tb1.ASNNo).Distinct().ToList();
@@ -1634,8 +1634,8 @@
            {
                var modelList = Db.Queryable<BllArrivalNoticeDetail>()
                     .LeftJoin<BllArrivalNotice>((tb1, tb2) => tb1.ASNNo == tb2.ASNNo )
                     .LeftJoin<SysMaterials>((tb1, tb2, tb3) => tb1.SkuNo == tb3.SkuNo )
                     .LeftJoin<BllArrivalNotice>((tb1, tb2) => tb1.ASNNo == tb2.ASNNo)
                     .LeftJoin<SysMaterials>((tb1, tb2, tb3) => tb1.SkuNo == tb3.SkuNo)
                     .Where((tb1, tb2, tb3) => tb1.IsDel == "0" && tb2.IsDel == "0" && (tb2.Status == "0" || tb2.Status == "1") && tb3.IsDel == "0" && tb3.IsPasteCode == "0")
                     .Select((tb1, tb2, tb3) => tb1.ASNNo).Distinct().ToList();
@@ -1646,7 +1646,7 @@
                throw new Exception(e.Message);
            }
        }
        /// <summary>
        /// 根据单据号获取单据明细列表
        /// </summary>
@@ -1792,7 +1792,7 @@
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public List<BoxInfoDto> GetBindBoxInfos(BoxInfoVm model,string url)
        public List<BoxInfoDto> GetBindBoxInfos(BoxInfoVm model, string url)
        {
            try
            {
@@ -2237,7 +2237,7 @@
                    throw new Exception("请求失败" + obj.Message);
                }
                #endregion
                if (string.IsNullOrEmpty(obj.Data.SkuNo))
                {
                    //测试用,发布正式前删除此段代码
@@ -2297,7 +2297,8 @@
                            CreateUser = 0
                        };
                        boxList.Add(boxInfo);
                    };
                    }
                    ;
                }
                try
                {
@@ -2315,7 +2316,7 @@
                    Db.RollbackTran();
                    throw new Exception("插入箱码失败:" + ex.Message);
                }
                string sqlString = $@"SELECT 
                                        ASNNo,
                                        BoxNo, 
@@ -2330,7 +2331,7 @@
                                        AND BoxNo = '{boxno}'
                                      GROUP BY ASNNo,BoxNo,SkuNo,SkuName,LotNo,BitBoxMark; ";
                var models = Db.Ado.SqlQuery<BoxInfoDto>(sqlString);
                var models = Db.Ado.SqlQuery<BoxInfoDto>(sqlString);
                if (models.Count == 0)
                {
@@ -2367,9 +2368,9 @@
                {
                    if (models[0].Status == "1")
                    {
                        var detail = Db.Queryable<DataStockDetail>().First(m=>m.PalletNo == palletNo );
                        if (detail!= null && !string.IsNullOrWhiteSpace(detail.LocatNo))
                        var detail = Db.Queryable<DataStockDetail>().First(m => m.PalletNo == palletNo);
                        if (detail != null && !string.IsNullOrWhiteSpace(detail.LocatNo))
                        {
                            var pingAreaStr = Db.Queryable<SysStorageArea>().Where(m => m.IsDel == "0" && m.WareHouseNo == "W04" && m.AreaNo != "B06" && m.AreaNo != "B07").Select(m => m.AreaNo).ToList();
                            var pingLocateInfo = Db.Queryable<SysStorageLocat>().First(m => m.LocatNo == detail.LocatNo && pingAreaStr.Contains(m.AreaNo) && m.IsDel == "0");
@@ -2399,11 +2400,11 @@
        /// <param name="asnNo">入库单</param>
        /// <param name="asnDetailId">入库单明细号</param>
        /// <returns></returns>
        public BoxListInfoDto GetBoxCountByAsn(string asnNo,int? asnDetailId)
        public BoxListInfoDto GetBoxCountByAsn(string asnNo, int? asnDetailId)
        {
            try
            {
                var detail = Db.Queryable<BllArrivalNoticeDetail>().First(m => m.IsDel == "0" && m.Id == asnDetailId);
                if (detail == null)
                {
@@ -2418,8 +2419,8 @@
                };
                //获取状态是未组托的标签信息
                var models = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.ASNNo == asnNo && m.ASNDetailNo == asnDetailId && m.Status == "0")
                    .GroupBy(m=> new { m.ProductionTime,m.ExpirationTime })
                    .Select(m=>new { m.ProductionTime ,m.ExpirationTime}).OrderBy(m=>m.ProductionTime).ToList();//&& m.Status == "0"
                    .GroupBy(m => new { m.ProductionTime, m.ExpirationTime })
                    .Select(m => new { m.ProductionTime, m.ExpirationTime }).OrderBy(m => m.ProductionTime).ToList();//&& m.Status == "0"
                foreach (var item in models)
                {
                    var boxNoList = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.Status == "0" && m.ASNNo == asnNo && m.ASNDetailNo == asnDetailId && m.ProductionTime == item.ProductionTime).Select(m => m.BoxNo).ToList();
@@ -2453,7 +2454,7 @@
            {
                //托盘库存信息
                var stockDetailList = Db.Queryable<DataStockDetail>().Where(m => m.IsDel == "0" && m.PalletNo == palletNo).ToList();
                if (stockDetailList.Count(m=> string.IsNullOrWhiteSpace(m.LocatNo)) > 0)
                if (stockDetailList.Count(m => string.IsNullOrWhiteSpace(m.LocatNo)) > 0)
                {
                    throw new Exception("托盘没有在平库储位上");
                }
@@ -2498,8 +2499,8 @@
                {
                    var time = DateTime.Now;
                    //判断当前托盘是否存在绑定信息
                    var task = Db.Queryable<LogTask>().First(m=> m.IsDel == "0" && m.PalletNo == palletNo && (m.Status == "0" || m.Status == "1") && m.OrderType == "0" && m.Type == "0");
                    var task = Db.Queryable<LogTask>().First(m => m.IsDel == "0" && m.PalletNo == palletNo && (m.Status == "0" || m.Status == "1") && m.OrderType == "0" && m.Type == "0");
                    var upShelf = Db.Queryable<BllPalletUpShelf>().First(m => m.IsDel == "0" && m.PalletNo == palletNo && (m.Status == "0" || m.Status == "1"));
                    if (task != null)
                    {
@@ -2619,7 +2620,7 @@
                {
                    throw new Exception("请扫描外箱条码!");
                }
                string sqlString = $@"SELECT BoxNo, SkuNo, SkuName, LotNo, BitBoxMark, SUM(Qty) as Qty  FROM BllBoxInfo 
                                        WHERE IsDel = '0' and Status='0' and BoxNo = '{boxNo}'
                                        GROUP BY BoxNo,SkuNo,SkuName,LotNo,BitBoxMark; ";
@@ -2633,7 +2634,7 @@
                {
                    throw new Exception("没有查询到箱码信息");
                }
            }
            catch (Exception ex)
            {
@@ -2642,7 +2643,7 @@
        }
        // 车间绑定托盘-贴标
        public void ChejianIn(string palletNo,string boxNo,decimal qty,string areaNo,int userId)
        public void ChejianIn(string palletNo, string boxNo, decimal qty, string areaNo, int userId)
        {
            try
            {
@@ -2656,7 +2657,7 @@
                {
                    throw new Exception("箱号不能为空");
                }
                if (qty<=0)
                if (qty <= 0)
                {
                    throw new Exception("数量不能小等0");
                }
@@ -2694,7 +2695,7 @@
                var msgStr = $"箱号为{boxNo}";
                var boxInfoList = new List<BllBoxInfo>();
                boxInfoList.AddRange(boxInfo);
                #region 库存明细
@@ -2704,15 +2705,15 @@
                {
                    throw new Exception("入库区域不能为空");
                }
                var tags = "0";
                // 判断库存明细是否已有此托盘信息  
                var sd1 = Db.Queryable<DataStockDetail>().First(m => m.IsDel == "0" && m.SkuNo== boxInfoOne.SkuNo && m.LotNo == boxInfoOne.LotNo && m.PalletNo == palletNo);
                var sd1 = Db.Queryable<DataStockDetail>().First(m => m.IsDel == "0" && m.SkuNo == boxInfoOne.SkuNo && m.LotNo == boxInfoOne.LotNo && m.PalletNo == palletNo);
                var sdId1 = 0;
                if (sd1 != null)
                {
                    if (sd1.AreaNo!= areaNo)
                    if (sd1.AreaNo != areaNo)
                    {
                        throw new Exception("选择的区域与库存不同");
                    }
@@ -2728,7 +2729,7 @@
                else
                {
                    var sd2 = Db.Queryable<DataStockDetail>().Where(m => m.PalletNo == palletNo && m.IsDel == "0" && !string.IsNullOrWhiteSpace(m.AreaNo));
                    if (sd2.Count(m=>m.AreaNo!= areaNo) > 0)
                    if (sd2.Count(m => m.AreaNo != areaNo) > 0)
                    {
                        throw new Exception("当前托盘位置与选择的不同,请核实");
                    }
@@ -2773,7 +2774,7 @@
                // 更改箱支关系表
                decimal factQty = 0.00m;//托盘总数量
                //标签组托
                var boxGroup = boxInfo.GroupBy(m => m.BoxNo).ToList();
@@ -2786,11 +2787,11 @@
                        {
                            continue;
                        }
                        box.PalletNo = palletNo;
                        box.Status = "2";
                        box.CompleteTime = comTime;
                        box.UpdateTime = comTime;
                        box.UpdateUser = userId;
@@ -2800,7 +2801,7 @@
                        factQty += box.Qty;
                        boxFullQty += box.Qty;
                        #region 库存箱码明细
                        var box2 = new DataBoxInfo()
                        {
@@ -2839,11 +2840,11 @@
                        {
                            Type = "0",//类型,0:入库 1:出库
                            PalletNo = palletNo,
                            BoxNo=box.BoxNo,
                            LotNo=box.LotNo,
                            SkuNo=box.SkuNo,
                            SkuName=box.SkuName,
                            Qty=box.Qty
                            BoxNo = box.BoxNo,
                            LotNo = box.LotNo,
                            SkuNo = box.SkuNo,
                            SkuName = box.SkuName,
                            Qty = box.Qty
                        };
                        //添加库存箱码明细
                        Db.Insertable(_log).ExecuteCommand();
@@ -2885,7 +2886,7 @@
                }
                #endregion
                // 更改托盘使用状态
                var sqlStr = $"update SysPallets set Status = '1' where PalletNo = '{palletNo}';";
                ////添加托盘记录表数据
@@ -2932,7 +2933,7 @@
                if (skuInfo == null)
                {
                    throw new Exception("未查询到物料信息");
                }
                }
                var pall = Db.Queryable<SysPallets>().First(m => m.IsDel == "0" && m.PalletNo == palletNo);
                if (pall == null)
                {
@@ -2946,7 +2947,7 @@
                var comTime = DateTime.Now;
                #region 包装 
                var pack = Db.Queryable<SysPackag>().First(m => m.IsDel == "0" && m.PackagNo == skuInfo.PackagNo);
                var pNum = 0m;//托盘物品数量 
@@ -3014,7 +3015,7 @@
                        Status = "0",
                        InspectMark = "0",
                        InspectStatus = "1",
                        BitPalletMark = qty >= pNum ?"0" :"1",
                        BitPalletMark = qty >= pNum ? "0" : "1",
                        PackagNo = skuInfo.PackagNo,
                        IsDel = "0",
@@ -4846,9 +4847,9 @@
        }
        #region 产品组托
        //根据物料获取是否存在包装信息
        public string BySkuNoGetPackInfo(string skuNo)
        {
@@ -6191,7 +6192,7 @@
                #endregion
                #region 质检请验
                if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1"  && sku.IsControlled != "1")
                if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1" && sku.IsControlled != "1")
                {
                    var qualityRequest = Db.Queryable<BllQualityInspectionRequest>().First(m => m.IsDel == "0" && m.SkuNo == sku.SkuNo && m.LotNo == bind.LotNo && m.SupplierLot == bind.SupplierLot);
                    if (qualityRequest == null)
@@ -6231,7 +6232,7 @@
            }
        }
        #endregion
@@ -6272,7 +6273,7 @@
                    {
                        if (!string.IsNullOrEmpty(item.WareHouseNo) && !string.IsNullOrEmpty(item.AreaNo))
                        {
                            if (item.AreaNo != "B06" && item.AreaNo != "B07" && item.AreaNo != "B09")
                            if (item.AreaNo != "B06" && item.AreaNo != "B07" && item.AreaNo != "B09")
                            {
                                throw new Exception("该托盘未在库外,请核查!");
                            }
@@ -6293,8 +6294,8 @@
                    throw new Exception("该储位不是平库储位,请检查!");
                }
                if (storageLocat.Status != "0")
                {
                    var detailInfo=Db.Queryable<DataStockDetail>().First(w => w.IsDel == "0" && w.LocatNo == storageLocat.LocatNo);
                {
                    var detailInfo = Db.Queryable<DataStockDetail>().First(w => w.IsDel == "0" && w.LocatNo == storageLocat.LocatNo);
                    if (detailInfo != null)
                    {
                        throw new Exception("储位不是空闲状态,请核查!");
@@ -6554,26 +6555,26 @@
                    Db.Updateable(bindInfo).ExecuteCommand();
                    #endregion
                   /* #region 添加托盘上架记录
                    var upShelf = new BllPalletUpShelf()
                    {
                        TaskNo = exTask.TaskNo,
                        TraceNo = bindInfo.ASNNo,
                        PalletNo = bindInfo.PalletNo,
                        SkuNo = stockModel.SkuNo,
                        SkuName = stockModel.SkuName,
                        LotNo = stockModel.LotNo,
                        Status = "1",
                    /* #region 添加托盘上架记录
                     var upShelf = new BllPalletUpShelf()
                     {
                         TaskNo = exTask.TaskNo,
                         TraceNo = bindInfo.ASNNo,
                         PalletNo = bindInfo.PalletNo,
                         SkuNo = stockModel.SkuNo,
                         SkuName = stockModel.SkuName,
                         LotNo = stockModel.LotNo,
                         Status = "1",
                        WareHouseNo = bindInfo.WareHouseNo,
                        RoadwayNo = bindInfo.RoadwayNo,
                        AreaNo = "",
                        LocatNo = "",
                         WareHouseNo = bindInfo.WareHouseNo,
                         RoadwayNo = bindInfo.RoadwayNo,
                         AreaNo = "",
                         LocatNo = "",
                        CreateUser = 0,
                    };
                    Db.Insertable(upShelf).ExecuteCommand();
                    #endregion*/
                         CreateUser = 0,
                     };
                     Db.Insertable(upShelf).ExecuteCommand();
                     #endregion*/
                    #region 库存箱支明细表
                    // 插入新组的箱支信息
@@ -6650,7 +6651,7 @@
                        //修改库存明细信息                                           
                        Db.Updateable(item).ExecuteCommand();
                    }
                    #region 任务及组托信息
                    //创建任务信息
                    var taskNo = new Common().GetMaxNo("TK");
@@ -6675,7 +6676,7 @@
                    };
                    Db.Insertable(exTask).ExecuteCommand();
                    //托盘绑定信息
                    var bindInfo = Db.Queryable<BllPalletBind>().First(w => w.IsDel == "0" && w.PalletNo == model.PalletNo
                    var bindInfo = Db.Queryable<BllPalletBind>().First(w => w.IsDel == "0" && w.PalletNo == model.PalletNo
                    && w.Status == "2" && string.IsNullOrEmpty(w.LocatNo));
                    if (bindInfo != null)
                    {
@@ -6695,7 +6696,7 @@
                    var upShelf = new BllPalletUpShelf()
                    {
                        TaskNo = exTask.TaskNo,
                        TraceNo = bindInfo== null? "": bindInfo.ASNNo,
                        TraceNo = bindInfo == null ? "" : bindInfo.ASNNo,
                        PalletNo = model.PalletNo,
                        SkuNo = palletupinfo.SkuNo,
                        SkuName = palletupinfo.SkuName,
@@ -6717,7 +6718,7 @@
                //修改储位信息                                        
                Db.Updateable(storageLocat).ExecuteCommand();
                new OperationASNServer().AddLogOperationAsn("PDA模块", "平库入库", model.PalletNo, "完成",
                new OperationASNServer().AddLogOperationAsn("PDA模块", "平库入库", model.PalletNo, "完成",
                    $"在PDA上完成单据号为:{model.ASNNo}的托盘码为:{model.PalletNo}的平库入库操作", (int)model.CreateUser);
                Db.CommitTran();
            }
@@ -6734,7 +6735,7 @@
        /// 仓库确认收货
        /// </summary>
        /// <param name="model"></param>
        public void ConfirmTakeOf(string palletNo,int userId)
        public void ConfirmTakeOf(string palletNo, int userId)
        {
            try
            {
@@ -6760,7 +6761,7 @@
                //获取库存明细信息
                var stockDetailList = Db.Queryable<DataStockDetail>().Where(s => s.IsDel == "0" && s.PalletNo == palletNo).ToList();
                //验证库存明细信息是否存在
                if (stockDetailList.Count<=0)
                if (stockDetailList.Count <= 0)
                {
                    throw new Exception("库存明细不存在,请检查库存信息!");
                }
@@ -6799,7 +6800,7 @@
                        //删除库存箱码信息
                        Db.Deleteable(boxInfoList).ExecuteCommand();
                    }
                    //删除或修改库存
                    stock.Qty -= (decimal)item.Qty;
                    if (stock.Qty <= 0)
@@ -7166,7 +7167,7 @@
        /// </summary>
        /// <param name="model">编码 名称</param>
        /// <returns>物料详细信息</returns>
        public MaterialsDto GetSkuInfo(GetMaterialsVm model)
        public MaterialsDto GetSkuInfo(GetMaterialsVm model)
        {
            try
            {
@@ -7175,8 +7176,8 @@
                    throw new Exception("请输入物料编码或物料名称!");
                }
                var skuModels = Db.Queryable<SysMaterials>().Where(m => (m.SkuNo == model.SkuNo || m.SkuName == model.SkuName) && m.IsDel == "0").Select< MaterialsDto>().ToList();
                if (skuModels.Count <= 0)
                var skuModels = Db.Queryable<SysMaterials>().Where(m => (m.SkuNo == model.SkuNo || m.SkuName == model.SkuName) && m.IsDel == "0").Select<MaterialsDto>().ToList();
                if (skuModels.Count <= 0)
                {
                    throw new Exception("物料不存在!");
                }
@@ -7195,18 +7196,18 @@
        /// <param name="model"></param>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public List<BllBoxInfo> AddLabels(LabelsVm model)
        public List<BllBoxInfo> AddLabels(LabelsVm model)
        {
            try
            {
                if (decimal.TryParse(model.SkuNum, out decimal skuQty))
                {
                    if (skuQty <= 0)
                    if (skuQty <= 0)
                    {
                        throw new Exception("箱内数量不能小于等于0");
                    }
                }
                else
                else
                {
                    throw new Exception("箱内数量请输入数字!");
                }
@@ -7291,7 +7292,7 @@
                if (packLevel == 1)
                {
                    #region 一级包装
                    int labelNum = 1;
                    int labelNum = 1;
                    labelNum = int.Parse(Math.Ceiling(skuQty / bNum).ToString());//标签数量
Wms/Wms/Controllers/BllSoController.cs
@@ -22,7 +22,7 @@
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    [Authorize]
    //[Authorize]
    public class BllSoController : ControllerBase
    {
        /// <summary>
Wms/Wms/Controllers/PdaAsnController.cs
@@ -27,7 +27,7 @@
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    [Authorize]
    //[Authorize]
    public class PdaAsnController : ControllerBase
    {
        private readonly ApiUrlConfig _config; //接口交互路径
Wms/Wms/appsettings.json
@@ -15,7 +15,11 @@
    //"ConnectionString": "Server=192.168.62.200;Database=WMS_JC34;User ID=sa;Password=sql2019;Integrated Security=False;"
    //"ConnectionString": "Server=.;Database=WMS_JC09;User ID=sa;Password=sql2019;Integrated Security=False;"
    //"ConnectionString": "Data Source=DESKTOP-0EJDG95\\MSSQLSERVER1;Initial Catalog=WMS_V01;Integrated Security=True;"
    "ConnectionString": "Server=.\\MSSQLSERVER2019;Database=WMS_JC34;User ID=sa;Password=admin2023@;Integrated Security=False;"
    //"ConnectionString": "Server=.\\MSSQLSERVER2019;Database=WMS_JC34;User ID=sa;Password=admin2023@;Integrated Security=False;"
    //本地地址
    //"ConnectionString": "Server=localhost;Database=wmsjc34;User ID=sa;Password=root1234;Integrated Security=False;"
    "ConnectionString": "Server=localhost;Database=WMS_JC34;User ID=sa;Password=root1234;Integrated Security=False;"
  },
  "JWTConfig": {
    "Issuer": "WYY", //Token      
@@ -25,7 +29,8 @@
  },
  "ApiUrlConfig": {
    "ErpHost": "http://172.16.68.156:50000", //erpIP
    "WcsHost": "http://10.26.254.34:5005", //wcsIPhttp://localhost:57061/
    //"WcsHost": "http://10.26.254.34:5005", //wcsIPhttp://localhost:57061/
    "WcsHost": "http://localhost:9034",
    "BoxHost": "http://10.110.24.30:8081", //boxIP
    "LimesHost": "http://10.110.24.30:8081", //LimesIP
@@ -51,7 +56,9 @@
  },
  "Quartz": {
    "dbProviderName": "SqlServer",
    "ConnectionString": "Server=.\\MSSQLSERVER2019;Database=QRTZ;User ID=sa;Password=admin2023@;Integrated Security=False;"
    //"ConnectionString": "Server=.\\MSSQLSERVER2019;Database=QRTZ;User ID=sa;Password=admin2023@;Integrated Security=False;"
    //本地地址
    "ConnectionString": "Server=localhost;Database=wmsjc34qrtz;User ID=sa;Password=root1234;Integrated Security=False;"
    //"connectionString": "Server=192.168.62.200;Database=WMS_JC34QRTZ;User ID=sa;Password=sql2019;Integrated Security=False;"
    //"connectionString": "Server=10.26.200.29;Database=WMS_JC34QRTZ;User ID=sa;Password=boxline@2016;Integrated Security=False;"
  }