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