Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
@@ -777,10 +777,10 @@ return "-1:入库单状态已变更,不可删除!"; } if (asnModel.Origin != "录入" && asnModel.Origin != "采购单") { return "-1:上游系统下发的单据,不可删除;"; } //if (asnModel.Origin != "录入" && asnModel.Origin != "采购单") //{ // return "-1:上游系统下发的单据,不可删除;"; //} // 删除总单 var editDateTime = DateTime.Now; Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs
@@ -534,8 +534,17 @@ { throw new Exception("未查询到单据明细信息,请核实"); } var skuInfo = Db.Queryable<SysMaterials>().First(w => w.IsDel == "0" && w.SkuNo == asnDetail.SkuNo); if (skuInfo == null) { throw new Exception("未查询到物料信息,请核实"); } if (string.IsNullOrEmpty(skuInfo.PackagNo)) { throw new Exception("未查询到物料的包装信息,请核实"); } var packInfo = Db.Queryable<SysPackag>().First(m => m.IsDel == "0" && m.PackagNo == asnDetail.PackagNo); var packInfo = Db.Queryable<SysPackag>().First(m => m.IsDel == "0" && m.PackagNo == skuInfo.PackagNo); if (packInfo == null) { throw new Exception("未查询到单据明细中的物料包装信息"); @@ -781,7 +790,6 @@ maxBoxCode = maxBoxCode.Substring(0, maxBoxCode.Length-6) + (int.Parse(maxBoxCode.Substring(maxBoxCode.Length - 6, 6)) + 1).ToString().PadLeft(6, '0'); } DateTime? storeTime2 = null; // 将条码保存到原料条码表 var labelModel = new BllBoxInfo() { @@ -801,14 +809,26 @@ BitBoxMark = bNum > boxQty ? "1" : "0", InspectStatus = "0", ProductionTime = DateTime.Parse(productionTime), StoreTime = string.IsNullOrWhiteSpace(storeTime) ? storeTime2 : DateTime.Parse(storeTime ), ExpirationTime = DateTime.Parse(expirationTime), ProductionTime = null, StoreTime = null, ExpirationTime = null, Origin = "WMS生成", CreateUser = userId, CreateTime = DateTime.Now, }; if (!string.IsNullOrEmpty(productionTime)) { labelModel.ProductionTime = DateTime.Parse(productionTime); } if (!string.IsNullOrEmpty(storeTime)) { labelModel.StoreTime = DateTime.Parse(storeTime); } if (!string.IsNullOrEmpty(expirationTime)) { labelModel.ExpirationTime = DateTime.Parse(expirationTime); } Db.Insertable(labelModel).ExecuteCommand(); modelList.Add(labelModel); @@ -953,14 +973,26 @@ BitBoxMark = bNum > boxQty ? "1" : "0", InspectStatus = "0", ProductionTime = DateTime.Parse(productionTime), StoreTime = DateTime.Parse(storeTime), ExpirationTime = DateTime.Parse(expirationTime), ProductionTime = null, StoreTime = null, ExpirationTime = null, Origin = "WMS生成", CreateUser = userId, CreateTime = DateTime.Now, }; if (!string.IsNullOrEmpty(productionTime)) { labelModel.ProductionTime = DateTime.Parse(productionTime); } if (!string.IsNullOrEmpty(storeTime)) { labelModel.StoreTime = DateTime.Parse(storeTime); } if (!string.IsNullOrEmpty(expirationTime)) { labelModel.ExpirationTime = DateTime.Parse(expirationTime); } Db.Insertable(labelModel).ExecuteCommand(); modelList.Add(labelModel); Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs
@@ -1408,7 +1408,7 @@ Db.BeginTran(); //库存箱支明细信息 var boxList = Db.Queryable<DataBoxInfo>().Where(w => w.IsDel == "0" && w.BoxNo == boxNo).ToList(); var boxList = Db.Queryable<DataBoxInfo>().Where(w => w.IsDel == "0" && w.BoxNo == boxNo && w.Status == "2").ToList(); if (boxList.Count != 1) { throw new Exception("该箱码信息错误,存在多个此箱码信息"); Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
@@ -92,7 +92,7 @@ } //出库分配信息 var allot = await Db.Queryable<BllExportAllot>().FirstAsync(m => m.IsDel == "0" && (m.Status == "2" || m.Status == "3") && m.SONo == soNo && m.IsDel == "0" && (m.Status == "2" || m.Status == "3" || m.Status == "5") && m.SONo == soNo && m.SODetailNo == int.Parse(soDetailId) && m.PalletNo == palletNo); if (allot == null) { @@ -322,7 +322,7 @@ else { List<DataBoxInfo> boxInfos; var boxInfo = Db.Queryable<DataBoxInfo>().Where(m => m.IsDel == "0" && m.BoxNo == boxNo); var boxInfo = Db.Queryable<DataBoxInfo>().Where(m => m.IsDel == "0" && m.BoxNo == boxNo && m.Status == "2"); if (await boxInfo.CountAsync() == 0) { throw Oops.Bah("未查询到该箱码的信息"); @@ -1852,7 +1852,7 @@ return allotList; } //获取状态为待拣货或者部分拣货的出库单 var allotList2 = await Db.Queryable<BllExportAllot>().Where(m => m.IsDel == "0" && (m.Status == "2" || m.Status == "3") && m.PalletNo == palletNo).Select(m => m.SONo).Distinct().Where(m => !string.IsNullOrWhiteSpace(m)).ToListAsync(); var allotList2 = await Db.Queryable<BllExportAllot>().Where(m => m.IsDel == "0" && (m.Status == "2" || m.Status == "3" || m.Status == "5") && m.PalletNo == palletNo).Select(m => m.SONo).Distinct().Where(m => !string.IsNullOrWhiteSpace(m)).ToListAsync(); //var allotList = Db.Queryable<BllExportAllot>().Where(m => m.IsDel == "0" && m.PalletNo == palletNo).Select(m => m.SONo).Distinct().Where(m => !string.IsNullOrWhiteSpace(m)).ToList(); //获取出库单据不为待拣货 执行完毕 订单关闭 等待执行的单据 @@ -1927,7 +1927,7 @@ throw Oops.Bah("托盘码为空,请输入托盘码"); } //获取状态为待拣货或者部分拣货的出库单 var allotList = Db.Queryable<BllExportAllot>().Where(m => m.IsDel == "0" && (m.Status == "2" || m.Status == "3") && m.PalletNo == palletNo); var allotList = Db.Queryable<BllExportAllot>().Where(m => m.IsDel == "0" && (m.Status == "2" || m.Status == "3" || m.Status == "5") && m.PalletNo == palletNo); //var allotList = Db.Queryable<BllExportAllot>().Where(m => m.IsDel == "0" && m.SONo == soNo && m.Status != "4" && m.Status != "5"); if (!string.IsNullOrWhiteSpace(soNo)) { @@ -1949,7 +1949,7 @@ //获取出库口、规格、待拣及已拣数量(根据出库单明细ID、托盘号) public async Task<OutPdaInfo> GetOutlets(string soDetailId, string palletNo) { var allotInfo = await Db.Queryable<BllExportAllot>().Where(m => m.IsDel == "0" && m.SODetailNo == int.Parse(soDetailId) && m.PalletNo == palletNo && (m.Status == "2" || m.Status == "3")).ToListAsync(); var allotInfo = await Db.Queryable<BllExportAllot>().Where(m => m.IsDel == "0" && m.SODetailNo == int.Parse(soDetailId) && m.PalletNo == palletNo && (m.Status == "2" || m.Status == "3" || m.Status == "5")).ToListAsync(); if (allotInfo.Count == 0) { throw Oops.Bah($"{palletNo}托盘上未查询到分配信息,请核实"); @@ -2033,7 +2033,7 @@ } if (!string.IsNullOrWhiteSpace(soDetailId)) { var allotInfos = await Db.Queryable<BllExportAllot>().Where(m => m.IsDel == "0" && m.SODetailNo == int.Parse(soDetailId) && m.PalletNo == palletNo && (m.Status == "2" || m.Status == "3")).ToListAsync(); var allotInfos = await Db.Queryable<BllExportAllot>().Where(m => m.IsDel == "0" && m.SODetailNo == int.Parse(soDetailId) && m.PalletNo == palletNo && (m.Status == "2" || m.Status == "3" || m.Status == "5")).ToListAsync(); if (allotInfos.Count == 0) { throw Oops.Bah($"{palletNo}托盘上未查询到分配信息,请核实");