Merge branch 'master' of https://codeup.aliyun.com/62ce7bca487c500c27f70a79/OPS/WMS-Api
This commit is contained in:
Binary file not shown.
@@ -120,6 +120,19 @@ namespace WMS.Web.Api.Controllers
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 手动同步老ops箱信息
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
[Route("RefreshOpsBox")]
|
||||||
|
public async Task<string> RefreshOpsBox()
|
||||||
|
{
|
||||||
|
if (!_env.IsDevelopment()) return "";
|
||||||
|
var result = await _boxService.Sync();
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[Route("tf")]
|
[Route("tf")]
|
||||||
public async Task<string> TestTF()
|
public async Task<string> TestTF()
|
||||||
|
|||||||
@@ -579,6 +579,12 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Api.Controllers.TestController.RefreshOpsBox">
|
||||||
|
<summary>
|
||||||
|
手动同步老ops箱信息
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:WMS.Web.Api.Controllers.TestController.GetMaterial(System.Collections.Generic.List{System.Int32})">
|
<member name="M:WMS.Web.Api.Controllers.TestController.GetMaterial(System.Collections.Generic.List{System.Int32})">
|
||||||
<summary>
|
<summary>
|
||||||
根据物料Id获取物料编码
|
根据物料Id获取物料编码
|
||||||
|
|||||||
@@ -339,13 +339,23 @@ namespace WMS.Web.Repositories
|
|||||||
var materials = materials_result.Data.ToList();
|
var materials = materials_result.Data.ToList();
|
||||||
List<int> ids = new List<int>();
|
List<int> ids = new List<int>();
|
||||||
|
|
||||||
|
List<OutStockTask> list = new List<OutStockTask>();
|
||||||
var list = await _context.OutStockTask.Include(x => x.Details).ThenInclude(s => s.ErpDetails)
|
var list1 = await _context.OutStockTask.Include(x => x.Details).ThenInclude(s => s.ErpDetails)
|
||||||
.Where(f => (EF.Functions.Like(f.BillNo, "%" + billNo + "%") ||
|
.Where(f => EF.Functions.Like(f.BillNo, "%" + billNo + "%") &&
|
||||||
f.Details.SelectMany(s => s.ErpDetails).Where(w => EF.Functions.Like(w.SourceBillNo, "%" + billNo + "%")).Any()) &&
|
|
||||||
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait))
|
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait))
|
||||||
.OrderByDescending(o => o.Id)
|
.OrderByDescending(o => o.Id)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
if (list1 != null && list1.Count() > 0)
|
||||||
|
list.AddRange(list1);
|
||||||
|
|
||||||
|
var list2 = await _context.OutStockTask.Include(x => x.Details).ThenInclude(s => s.ErpDetails)
|
||||||
|
.Where(f => (f.Details.SelectMany(s => s.ErpDetails).Where(w => EF.Functions.Like(w.SourceBillNo, "%" + billNo + "%")).Any()) &&
|
||||||
|
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait))
|
||||||
|
.OrderByDescending(o => o.Id)
|
||||||
|
.ToListAsync();
|
||||||
|
if (list2 != null && list2.Count() > 0)
|
||||||
|
list.AddRange(list2);
|
||||||
|
|
||||||
var response = _mapper.Map<List<GetOutStockTaskByNoResponse>>(list);
|
var response = _mapper.Map<List<GetOutStockTaskByNoResponse>>(list);
|
||||||
foreach (var r in response)
|
foreach (var r in response)
|
||||||
{
|
{
|
||||||
@@ -448,13 +458,21 @@ namespace WMS.Web.Repositories
|
|||||||
|
|
||||||
public async Task<List<string>> GetOutStockTaskNosByNo(string billNo)
|
public async Task<List<string>> GetOutStockTaskNosByNo(string billNo)
|
||||||
{
|
{
|
||||||
return await _context.OutStockTask.Include(x => x.Details).ThenInclude(s => s.ErpDetails)
|
var res = await _context.OutStockTask.Include(x => x.Details).ThenInclude(s => s.ErpDetails)
|
||||||
.Where(f => (EF.Functions.Like(f.BillNo, "%" + billNo + "%") ||
|
.Where(f => EF.Functions.Like(f.BillNo, "%" + billNo + "%") &&
|
||||||
f.Details.SelectMany(s => s.ErpDetails).Where(w => EF.Functions.Like(w.SourceBillNo, "%" + billNo + "%")).Any()) &&
|
|
||||||
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait))
|
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait))
|
||||||
.OrderByDescending(o => o.Id)
|
.OrderByDescending(o => o.Id)
|
||||||
.Select(s => s.BillNo)
|
.Select(s => s.BillNo)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
|
var ress = await _context.OutStockTask.Include(x => x.Details).ThenInclude(s => s.ErpDetails)
|
||||||
|
.Where(f => (f.Details.SelectMany(s => s.ErpDetails).Where(w => EF.Functions.Like(w.SourceBillNo, "%" + billNo + "%")).Any()) &&
|
||||||
|
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait))
|
||||||
|
.OrderByDescending(o => o.Id)
|
||||||
|
.Select(s => s.BillNo)
|
||||||
|
.ToListAsync();
|
||||||
|
res.AddRange(ress);
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user