1
hwh
2024-06-14 0a379b1772ea76fe6a7a53396a3c9a614b29df1b
Wms_09/WMS.BLL/SysServer/PalletsServer.cs
@@ -101,7 +101,7 @@
                        codeId = int.Parse("00001");
                    }
                    int liuShuiId = codeId;
                    var pallet = "T"+time2 + Convert.ToString(liuShuiId).PadLeft(5, '0');
                    var pallet = "T" + time2 + Convert.ToString(liuShuiId).PadLeft(5, '0');
                    return pallet;
                }
            }
@@ -125,17 +125,26 @@
                var str = pallNo.Substring(3, 5);
                string remove = pallNo.Substring(0, 3);
                int sibelius = Convert.ToInt16(str);
                int sibelius = 0;
                var num = 0;
                if (remove != "T" + DateTime.Now.ToString("yy"))
                {
                    remove = "T" + DateTime.Now.ToString("yy");
                    sibelius = 0;
                }
                else
                {
                    sibelius = Convert.ToInt16(str);
                }
                for (int i = 0; i < groupCount; i++)
                {
                    sibelius += 1;
                    if (sibelius>99999)
                    if (sibelius > 99999)
                    {
                        throw new Exception("托盘码位数已达上线");
                    }
                    string code = remove + Convert.ToString(sibelius).PadLeft(5, '0');
                    if (db.Queryable<SysPallets>().Count(m=>m.PalletNo == code)>=1)
                    if (db.Queryable<SysPallets>().Count(m => m.PalletNo == code) >= 1)
                    {
                        continue;
                    }
@@ -158,7 +167,7 @@
                        {
                            await _operation.InsertOperation("仓库设置", "条码管理", item.PalletNo, "添加", "添加托盘信息 托盘号:" + item.PalletNo, userId);
                        }
                    }
                }