优化详情
This commit is contained in:
@@ -1100,6 +1100,11 @@
|
||||
收货人
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Domain.Entitys.InStockTaskBox.UnBind">
|
||||
<summary>
|
||||
是否解绑
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Domain.Entitys.InStockTaskBox.Details">
|
||||
<summary>
|
||||
明细
|
||||
@@ -2874,13 +2879,6 @@
|
||||
箱与任务单绑定(收货)关系表-仓储接口
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Domain.Infrastructure.IInStockTaskBoxRepositories.GetListBy(System.Int32)">
|
||||
<summary>
|
||||
集合:任务单ID
|
||||
</summary>
|
||||
<param name="taskId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Domain.Infrastructure.IInStockTaskBoxRepositories.GetListBy(System.Collections.Generic.List{System.Int32})">
|
||||
<summary>
|
||||
集合:根据boxIDS
|
||||
@@ -2926,6 +2924,14 @@
|
||||
<param name="isTransaction"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Domain.Infrastructure.IInStockTaskBoxRepositories.UpdateRange(System.Collections.Generic.List{WMS.Web.Domain.Entitys.InStockTaskBox},System.Boolean)">
|
||||
<summary>
|
||||
修改
|
||||
</summary>
|
||||
<param name="entitys"></param>
|
||||
<param name="isTransaction"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:WMS.Web.Domain.Infrastructure.IInStockTaskRepositories">
|
||||
<summary>
|
||||
入库任务-仓储接口
|
||||
|
||||
@@ -49,6 +49,11 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// </summary>
|
||||
public int? ReceiverId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否解绑
|
||||
/// </summary>
|
||||
public bool? UnBind { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 明细
|
||||
/// </summary>
|
||||
|
||||
@@ -11,12 +11,6 @@ namespace WMS.Web.Domain.Infrastructure
|
||||
/// </summary>
|
||||
public interface IInStockTaskBoxRepositories
|
||||
{
|
||||
/// <summary>
|
||||
/// 集合:任务单ID
|
||||
/// </summary>
|
||||
/// <param name="taskId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<InStockTaskBox>> GetListBy(int taskId);
|
||||
|
||||
/// <summary>
|
||||
/// 集合:根据boxIDS
|
||||
@@ -62,5 +56,13 @@ namespace WMS.Web.Domain.Infrastructure
|
||||
/// <param name="isTransaction"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> DeleteRange(List<int> ids, bool isTransaction = true);
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="entitys"></param>
|
||||
/// <param name="isTransaction"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> UpdateRange(List<InStockTaskBox> entitys, bool isTransaction = true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace WMS.Web.Domain.Services
|
||||
var t_boxIds = boxIds.Distinct().ToList();
|
||||
var list= await _inStockTaskBoxRepositories.GetListBy(t_boxIds);
|
||||
|
||||
delete_ids= list.Select(x => x.Id).ToList();
|
||||
//delete_ids= list.Select(x => x.Id).ToList();
|
||||
//var boxInvetList = await _boxInventoryRepositories.GetList(t_boxIds);
|
||||
//foreach (var item in list)
|
||||
//{
|
||||
@@ -47,9 +47,16 @@ namespace WMS.Web.Domain.Services
|
||||
// delete_ids.Add(item.Id);
|
||||
//}
|
||||
|
||||
if (delete_ids.Count != 0)
|
||||
//if (delete_ids.Count != 0)
|
||||
//{
|
||||
// var isSuccess= await _inStockTaskBoxRepositories.DeleteRange(delete_ids, isTransaction);
|
||||
// if (!isSuccess)
|
||||
// return Result.ReFailure(ResultCodes.DateWriteError);
|
||||
//}
|
||||
|
||||
if (list.Count != 0)
|
||||
{
|
||||
var isSuccess= await _inStockTaskBoxRepositories.DeleteRange(delete_ids, isTransaction);
|
||||
var isSuccess = await _inStockTaskBoxRepositories.UpdateRange(list, isTransaction);
|
||||
if (!isSuccess)
|
||||
return Result.ReFailure(ResultCodes.DateWriteError);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ using System.Threading.Tasks;
|
||||
using WMS.Web.Domain.Entitys;
|
||||
using WMS.Web.Domain.Infrastructure;
|
||||
using WMS.Web.Domain.IService.Public;
|
||||
using WMS.Web.Domain.Mappers;
|
||||
using WMS.Web.Repositories.Configuration;
|
||||
|
||||
namespace WMS.Web.Repositories
|
||||
@@ -47,18 +48,6 @@ namespace WMS.Web.Repositories
|
||||
_erpBasicDataExtendService = erpBasicDataExtendService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 集合:根据任务ID
|
||||
/// </summary>
|
||||
/// <param name="taskId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<InStockTaskBox>> GetListBy(int taskId)
|
||||
{
|
||||
var entitys = await _context.InstockTaskBox
|
||||
.Include(s => s.Details).Where(x => x.TaskId == taskId).ToListAsync();
|
||||
return entitys;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 集合:根据boxIDS
|
||||
/// </summary>
|
||||
@@ -67,7 +56,7 @@ namespace WMS.Web.Repositories
|
||||
public async Task<List<InStockTaskBox>> GetListBy(List<int> boxIds)
|
||||
{
|
||||
var entitys = await _context.InstockTaskBox
|
||||
.Include(s => s.Details).Where(x => boxIds.Contains(x.BoxId)).ToListAsync();
|
||||
.Include(s => s.Details).Where(x => boxIds.Contains(x.BoxId) && (x.UnBind==null || x.UnBind==false)).ToListAsync();
|
||||
return entitys;
|
||||
}
|
||||
|
||||
@@ -79,7 +68,7 @@ namespace WMS.Web.Repositories
|
||||
public async Task<List<InStockTaskBox>> GetListBy(List<string> boxBillNos)
|
||||
{
|
||||
var entitys = await _context.InstockTaskBox
|
||||
.Include(s => s.Details).Where(x => boxBillNos.Contains(x.BoxBillNo)).ToListAsync();
|
||||
.Include(s => s.Details).Where(x => boxBillNos.Contains(x.BoxBillNo) && (x.UnBind == null || x.UnBind == false)).ToListAsync();
|
||||
return entitys;
|
||||
}
|
||||
|
||||
@@ -91,7 +80,7 @@ namespace WMS.Web.Repositories
|
||||
public async Task<InStockTaskBox> GetBy(string boxBillNo)
|
||||
{
|
||||
var entity = await _context.InstockTaskBox
|
||||
.Include(s => s.Details).Where(x => x.BoxBillNo == boxBillNo).FirstOrDefaultAsync();
|
||||
.Include(s => s.Details).Where(x => x.BoxBillNo == boxBillNo && (x.UnBind == null || x.UnBind == false)).FirstOrDefaultAsync();
|
||||
return entity;
|
||||
}
|
||||
|
||||
@@ -103,7 +92,7 @@ namespace WMS.Web.Repositories
|
||||
public async Task<InStockTaskBox> GetBy(string boxBillNo, int? taskId)
|
||||
{
|
||||
var query = _context.InstockTaskBox
|
||||
.Include(s => s.Details).Where(x => x.BoxBillNo == boxBillNo);
|
||||
.Include(s => s.Details).Where(x => x.BoxBillNo == boxBillNo && (x.UnBind == null || x.UnBind == false));
|
||||
|
||||
if (taskId.HasValue)
|
||||
query = query.Where(x => x.TaskId == taskId.Value);
|
||||
@@ -169,5 +158,35 @@ namespace WMS.Web.Repositories
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量修改
|
||||
/// </summary>
|
||||
/// <param name="entitys"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> UpdateRange(List<InStockTaskBox> entitys, bool isTransaction = true)
|
||||
{
|
||||
IDbContextTransaction _transaction = null;
|
||||
if (isTransaction)
|
||||
_transaction = _context.Database.BeginTransaction();
|
||||
{
|
||||
try
|
||||
{
|
||||
List<int> list = entitys.Select(s => s.Id).ToList();
|
||||
var res = await _context.InstockTaskBox.Include(x => x.Details).Where(f => list.Contains(f.Id)).ToListAsync();
|
||||
_mapper.Map(entitys, res);
|
||||
var tt = await _context.SaveChangesAsync();
|
||||
if (_transaction != null)
|
||||
_transaction.Commit();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (_transaction != null)
|
||||
_transaction.Rollback();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,195 +157,49 @@ namespace WMS.Web.Repositories
|
||||
|
||||
var entity = await _context.InStockTask.Include(x => x.Details).Where(x => x.Id == id).FirstOrDefaultAsync();
|
||||
|
||||
if (entity != null)
|
||||
if (entity == null)
|
||||
return null;
|
||||
|
||||
var response = new InStockTaskInfoDto()
|
||||
{
|
||||
var response = new InStockTaskInfoDto()
|
||||
{
|
||||
Id = entity.Id,
|
||||
BillNo = entity.BillNo,
|
||||
SaleBillNo = (string.Join(",", entity.Details.Select(x => x.SaleBillNo).ToList()).TrimEnd(',')),
|
||||
SourceBillNo = entity.SourceBillNo,
|
||||
Status = entity.Status.GetRemark(),
|
||||
Type = entity.Type.GetRemark(),
|
||||
Supplier = _erpBasicDataExtendService.GetSupplierName(suppliers, entity.SupplierId ?? 0),
|
||||
Org = _erpBasicDataExtendService.GetOrgName(orgs, entity.OrgCode),
|
||||
CreateTime = entity.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")
|
||||
};
|
||||
if (entity.Type == InstockType.Purchase)
|
||||
{
|
||||
//采购任务的箱明细
|
||||
var boxList = await _context.InStockTaskBoxDetails
|
||||
.GroupJoin(_context.InstockTaskBox, boxde => boxde.Fid, ts => ts.Id, (detail, ts) => new { detail, ts })
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, box) => new { p.detail, box })
|
||||
.GroupJoin(_context.InStockTaskDetails, p => p.box.TaskDetailId, ts => ts.Id, (p, ts) => new { p.detail, p.box, ts })
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, taskDet) => new { p.detail, p.box, taskDet })
|
||||
.Where(x => x.box.TaskId == entity.Id).Select(x => new InStockTaskBoxInfoDto()
|
||||
{
|
||||
BoxId = x.box.BoxId,
|
||||
BoxBillNo = x.box.BoxBillNo,
|
||||
SaleBillNo = x.taskDet.SaleBillNo,
|
||||
Method = InventoryInOutMethod.Box.GetRemark(),
|
||||
MaterialNumber = x.detail.MaterialNumber,
|
||||
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, x.detail.MaterialNumber),
|
||||
ReceiveTime = x.box.CreateTime.HasValue ? x.box.CreateTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : "",
|
||||
Receiver = x.box.ReceiverId.HasValue ? _singleDataService.GetSingleData(SingleAction.Staffs, companyId, x.box.ReceiverId.Value) : "",
|
||||
Qty = x.detail.ReceiveQty,
|
||||
ReceiveQty = x.detail.ReceiveQty,
|
||||
SerialNumbers = x.detail.SerialNumbers != null && x.detail.SerialNumbers.Count() > 0 ? (string.Join(",", x.detail.SerialNumbers).TrimEnd(',')) : "",
|
||||
}).ToListAsync();
|
||||
Id = entity.Id,
|
||||
BillNo = entity.BillNo,
|
||||
SaleBillNo = (string.Join(",", entity.Details.Select(x => x.SaleBillNo).ToList()).TrimEnd(',')),
|
||||
SourceBillNo = entity.SourceBillNo,
|
||||
Status = entity.Status.GetRemark(),
|
||||
Type = entity.Type.GetRemark(),
|
||||
Supplier = _erpBasicDataExtendService.GetSupplierName(suppliers, entity.SupplierId ?? 0),
|
||||
Org = _erpBasicDataExtendService.GetOrgName(orgs, entity.OrgCode),
|
||||
CreateTime = entity.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")
|
||||
};
|
||||
var boxList = await _context.InStockDetails
|
||||
.GroupJoin(_context.Instock, det => det.Fid, ts => ts.Id, (detail, ts) => new { detail, ts })
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, order) => new { p.detail, order })
|
||||
.GroupJoin(_context.Box, p => p.detail.BoxId, ts => ts.Id, (p, ts) => new { p.detail, p.order, ts })
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, box) => new { p.detail, p.order, box })
|
||||
.GroupJoin(_context.InStockTaskDetails, p => p.detail.TaskDetailId, ts => ts.Id, (p, ts) => new { p.detail, p.order, p.box, ts })
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, taskDet) => new { p.detail, p.order, p.box, taskDet })
|
||||
.Where(x => x.detail.TaskId == entity.Id).Select(x => new InStockTaskBoxInfoDto()
|
||||
{
|
||||
BoxId = x.box.Id,
|
||||
BoxBillNo = x.box.BoxBillNo,
|
||||
Method = x.order.Method.GetRemark(),
|
||||
MethodForInt = (int)x.order.Method,
|
||||
MaterialNumber = x.detail.MaterialNumber,
|
||||
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, x.detail.MaterialNumber),
|
||||
SaleBillNo = x.taskDet.SaleBillNo,
|
||||
Qty = x.detail.Qty,
|
||||
RealityQty = x.detail.Qty,
|
||||
ReceiveQty = x.detail.Qty,
|
||||
ShelfTime = x.order.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
Shelfer = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, x.order.CreatorId),
|
||||
Receiver = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, x.order.CreatorId),
|
||||
ReceiveTime = x.order.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
SerialNumbers = (string.Join(",", x.detail.SerialNumbers).TrimEnd(','))
|
||||
|
||||
if (boxList != null && boxList.Count != 0)
|
||||
{
|
||||
//采购入库明细
|
||||
var boxInstockList_details = await _context.InStockDetails.Where(x => x.TaskId == entity.Id).ToListAsync();
|
||||
|
||||
if (boxInstockList_details != null && boxInstockList_details.Count != 0)
|
||||
{
|
||||
var instockOrder_ids = boxInstockList_details.GroupBy(x => x.Fid).Select(x => x.Key).ToList();
|
||||
var instockOrder = await _context.Instock.Where(x => instockOrder_ids.Contains(x.Id)).ToListAsync();
|
||||
boxList.ForEach(x =>
|
||||
{
|
||||
var currentInstock = boxInstockList_details.Where(t => t.BoxId == x.BoxId && t.MaterialNumber == x.MaterialNumber).FirstOrDefault();
|
||||
if (currentInstock != null)
|
||||
{
|
||||
var order = instockOrder.Where(o => o.Id == currentInstock.Fid).FirstOrDefault();
|
||||
x.RealityQty = currentInstock.Qty;
|
||||
x.Shelfer = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, (order == null ? 0 : order.CreatorId));
|
||||
x.ShelfTime = order == null ? "" : order.CreateTime.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
boxList = await _context.InStockDetails
|
||||
.GroupJoin(_context.Instock, det => det.Fid, ts => ts.Id, (detail, ts) => new { detail, ts })
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, order) => new { p.detail, order })
|
||||
.GroupJoin(_context.Box, p => p.detail.BoxId, ts => ts.Id, (p, ts) => new { p.detail, p.order, ts })
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, box) => new { p.detail, p.order, box })
|
||||
.GroupJoin(_context.InStockTaskDetails, p => p.detail.TaskDetailId, ts => ts.Id, (p, ts) => new { p.detail, p.order, p.box, ts })
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, taskDet) => new { p.detail, p.order, p.box, taskDet })
|
||||
.Where(x => x.detail.TaskId == entity.Id).Select(x => new InStockTaskBoxInfoDto()
|
||||
{
|
||||
BoxId = x.box.Id,
|
||||
BoxBillNo = x.box.BoxBillNo,
|
||||
Method = x.order.Method.GetRemark(),
|
||||
MethodForInt = (int)x.order.Method,
|
||||
MaterialNumber = x.detail.MaterialNumber,
|
||||
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, x.detail.MaterialNumber),
|
||||
SaleBillNo = x.taskDet.SaleBillNo,
|
||||
Qty = 0,
|
||||
RealityQty = x.detail.Qty,
|
||||
ShelfTime = x.order.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
Shelfer = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, x.order.CreatorId),
|
||||
ReceiveQty = x.detail.Qty,
|
||||
Receiver = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, x.order.CreatorId),
|
||||
ReceiveTime = x.order.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
SerialNumbers = (string.Join(",", x.detail.SerialNumbers).TrimEnd(','))
|
||||
|
||||
}).ToListAsync();
|
||||
if (boxList != null && boxList.Count != 0)
|
||||
{
|
||||
var boxIds = boxList.GroupBy(x => x.BoxId).Select(x => x.Key).ToList();
|
||||
|
||||
var boxdetails = await _context.BoxDetails
|
||||
.GroupJoin(_context.Box, det => det.Fid, ts => ts.Id, (detail, ts) => new { detail, ts })
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, box) => new { p.detail, box })
|
||||
.Where(x => boxIds.Contains(x.box.Id)).Select(x => new
|
||||
{
|
||||
BoxId = x.box.Id,
|
||||
MaterialNumber = x.detail.MaterialNumber,
|
||||
Qty = x.detail.Qty
|
||||
}).ToListAsync();
|
||||
|
||||
if (boxdetails != null && boxdetails.Count != 0)
|
||||
{
|
||||
boxList.ForEach(x =>
|
||||
{
|
||||
var method = (InventoryInOutMethod)x.MethodForInt;
|
||||
if (method == InventoryInOutMethod.Box)
|
||||
{
|
||||
var currentBoxDet = boxdetails.Where(t => t.BoxId == x.BoxId && t.MaterialNumber == x.MaterialNumber).FirstOrDefault();
|
||||
if (currentBoxDet != null)
|
||||
{
|
||||
x.Qty = currentBoxDet.Qty;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
response.Boxs = boxList;
|
||||
}
|
||||
else
|
||||
{
|
||||
var boxList = await _context.InStockDetails
|
||||
.GroupJoin(_context.Instock, det => det.Fid, ts => ts.Id, (detail, ts) => new { detail, ts })
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, order) => new { p.detail, order })
|
||||
.GroupJoin(_context.Box, p => p.detail.BoxId, ts => ts.Id, (p, ts) => new { p.detail, p.order, ts })
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, box) => new { p.detail, p.order, box })
|
||||
.GroupJoin(_context.InStockTaskDetails, p => p.detail.TaskDetailId, ts => ts.Id, (p, ts) => new { p.detail, p.order, p.box, ts })
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, taskDet) => new { p.detail, p.order, p.box, taskDet })
|
||||
.Where(x => x.detail.TaskId == entity.Id).Select(x => new InStockTaskBoxInfoDto()
|
||||
{
|
||||
BoxId = x.box.Id,
|
||||
BoxBillNo = x.box.BoxBillNo,
|
||||
Method = x.order.Method.GetRemark(),
|
||||
MethodForInt = (int)x.order.Method,
|
||||
MaterialNumber = x.detail.MaterialNumber,
|
||||
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, x.detail.MaterialNumber),
|
||||
SaleBillNo = x.taskDet.SaleBillNo,
|
||||
Qty = 0,
|
||||
RealityQty = x.detail.Qty,
|
||||
ShelfTime = x.order.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
Shelfer = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, x.order.CreatorId),
|
||||
|
||||
ReceiveQty = x.detail.Qty,
|
||||
Receiver = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, x.order.CreatorId),
|
||||
ReceiveTime = x.order.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
|
||||
SerialNumbers = (string.Join(",", x.detail.SerialNumbers).TrimEnd(','))
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
if (boxList != null && boxList.Count != 0)
|
||||
{
|
||||
var boxIds = boxList.GroupBy(x => x.BoxId).Select(x => x.Key).ToList();
|
||||
|
||||
var boxdetails = await _context.BoxDetails
|
||||
.GroupJoin(_context.Box, det => det.Fid, ts => ts.Id, (detail, ts) => new { detail, ts })
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, box) => new { p.detail, box })
|
||||
.Where(x => boxIds.Contains(x.box.Id)).Select(x => new
|
||||
{
|
||||
BoxId = x.box.Id,
|
||||
MaterialNumber = x.detail.MaterialNumber,
|
||||
Qty = x.detail.Qty
|
||||
}).ToListAsync();
|
||||
|
||||
if (boxdetails != null && boxdetails.Count != 0)
|
||||
{
|
||||
boxList.ForEach(x =>
|
||||
{
|
||||
var method = (InventoryInOutMethod)x.MethodForInt;
|
||||
if (method == InventoryInOutMethod.Box)
|
||||
{
|
||||
var currentBoxDet = boxdetails.Where(t => t.BoxId == x.BoxId && t.MaterialNumber == x.MaterialNumber).FirstOrDefault();
|
||||
if (currentBoxDet != null)
|
||||
{
|
||||
x.Qty = currentBoxDet.Qty;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
response.Boxs = boxList;
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
return null;
|
||||
}).ToListAsync();
|
||||
response.Boxs = boxList;
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user