修复bug
This commit is contained in:
@@ -7,6 +7,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WMS.Web.Core;
|
||||
using WMS.Web.Core.Dto.Erp;
|
||||
using WMS.Web.Core.Dto.OutStockTask;
|
||||
using WMS.Web.Core.Help;
|
||||
using WMS.Web.Domain.Entitys;
|
||||
@@ -38,6 +39,7 @@ namespace WMS.Web.Repositories
|
||||
_singleDataService = singleDataService;
|
||||
_loginRepositories = loginRepositories;
|
||||
_erpService = erpService;
|
||||
_erpBasicDataExtendService = erpBasicDataExtendService;
|
||||
}
|
||||
/// <summary>
|
||||
/// 新增
|
||||
@@ -342,10 +344,13 @@ namespace WMS.Web.Repositories
|
||||
return new GetOutStockTaskByNoResponse();
|
||||
var materials = materials_result.Data.ToList();
|
||||
|
||||
var list = await _context.OutStockTask.Include(x => x.Details)
|
||||
.Where(f => f.BillNo.Equals(billNo) &&
|
||||
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait)).ToListAsync();
|
||||
var response = _mapper.Map<GetOutStockTaskByNoResponse>(list);
|
||||
var entity = await _context.OutStockTask.Include(x => x.Details)
|
||||
.FirstOrDefaultAsync(f => f.BillNo.Equals(billNo) &&
|
||||
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait));
|
||||
|
||||
if (entity == null) return new GetOutStockTaskByNoResponse();
|
||||
|
||||
var response = _mapper.Map<GetOutStockTaskByNoResponse>(entity);
|
||||
//获取物料信息 显示物料三件套
|
||||
foreach (var r in response.details)
|
||||
{
|
||||
@@ -357,15 +362,15 @@ namespace WMS.Web.Repositories
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据来源单号搜索
|
||||
/// 单号搜索
|
||||
/// </summary>
|
||||
/// <param name="sourceBillNos"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<OutStockTask>> GetListBySourceBillNo(List<string> sourceBillNos)
|
||||
public async Task<List<OutStockTask>> GetListBySourceBillNo(List<string> billNos)
|
||||
{
|
||||
var entitys = await _context.OutStockTask
|
||||
.Include(s => s.Details)
|
||||
.Where(w => sourceBillNos.Contains(w.SourceBillNo))
|
||||
.Where(w => billNos.Contains(w.BillNo))
|
||||
.ToListAsync();
|
||||
|
||||
return entitys.Clone();
|
||||
|
||||
Reference in New Issue
Block a user