| | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | |
| | | 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; |
| | | } |
| | |
| | | { |
| | | await _operation.InsertOperation("仓库设置", "条码管理", item.PalletNo, "添加", "添加托盘信息 托盘号:" + item.PalletNo, userId); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | |