修复bug

This commit is contained in:
18942506660
2024-03-20 14:58:23 +08:00
parent b2f16c97db
commit ed42cc20f8
2 changed files with 7 additions and 7 deletions

View File

@@ -149,9 +149,9 @@ namespace WMS.Web.Repositories
query = query.Where(w => EF.Functions.Like(w.srcBox.BoxBillNo, "%" + dto.SrcBox + "%"));
if (!string.IsNullOrEmpty(dto.DestBox))
query = query.Where(w => EF.Functions.Like(w.destBox.BoxBillNo, "%" + dto.DestBox + "%"));
if (dto.SrcSubStockCode != null)
if (!string.IsNullOrEmpty(dto.SrcSubStockCode))
query = query.Where(w => w.changeBox.SrcSubStockCode == dto.SrcSubStockCode);
if (dto.DestSubStockCode != null)
if (!string.IsNullOrEmpty(dto.DestSubStockCode))
query = query.Where(w => w.changeBox.DestSubStockCode == dto.DestSubStockCode);
if (dto.CreateBeginDate != null)
query = query.Where(w => w.changeBox.CreateTime >= dto.CreateBeginDate);
@@ -170,8 +170,8 @@ namespace WMS.Web.Repositories
SerialNumbers = string.Join(",", s.changeBox.SerialNumbers),
SrcBox = s.srcBox.BoxBillNo,
DestBox = s.destBox.BoxBillNo,
Qty=s.changeBox.Qty,
DestBoxOrg= _singleDataService.GetSingleData(SingleAction.Orgs, companyId, s.changeBox.DestBoxOrgCode),
Qty = s.changeBox.Qty,
DestBoxOrg = _singleDataService.GetSingleData(SingleAction.Orgs, companyId, s.changeBox.DestBoxOrgCode),
SrcSubStock = _singleDataService.GetSingleData(SingleAction.SubStocksJoinOrgCode, companyId, s.changeBox.SrcSubStockCode + s.changeBox.SrcStockCode + s.changeBox.SrcBoxOrgCode),
DestSubStock = _singleDataService.GetSingleData(SingleAction.SubStocksJoinOrgCode, companyId, s.changeBox.DestSubStockCode + s.changeBox.DestStockCode + s.changeBox.DestBoxOrgCode),
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.changeBox.CreatorId),

View File

@@ -101,7 +101,7 @@ namespace WMS.Web.Repositories
_transaction.Commit();
return true;
}
catch(Exception ex)
catch (Exception ex)
{
if (_transaction != null)
_transaction.Rollback();
@@ -160,9 +160,9 @@ namespace WMS.Web.Repositories
.OrderByDescending(o => o.moveBox.Id)
.Where(adv => 1 == 1);
if (dto.SrcSubStockCode != null)
if (!string.IsNullOrEmpty(dto.SrcSubStockCode))
query = query.Where(w => w.moveBox.SrcSubStockCode == dto.SrcSubStockCode);
if (dto.DestSubStockCode != null)
if (!string.IsNullOrEmpty(dto.DestSubStockCode))
query = query.Where(w => w.moveBox.DestSubStockCode == dto.DestSubStockCode);
if (!string.IsNullOrEmpty(dto.Creator))
query = query.Where(w => ids.Contains(w.moveBox.CreatorId));