修复bug
This commit is contained in:
Binary file not shown.
@@ -88,6 +88,9 @@ namespace WMS.Web.Api.Controllers
|
||||
[Route("hj")]
|
||||
public async Task<string> TestHJ()
|
||||
{
|
||||
// List<int> boxIds = new List<int>();
|
||||
// boxIds.Add(5324);
|
||||
//var b= await _inStockService.UnBind(boxIds, true);
|
||||
//var b= await _boxService.Sync(null);
|
||||
//var list = await _outStockTaskRepositories.GetEntityList(new List<int> { 14321 });
|
||||
|
||||
|
||||
@@ -134,6 +134,6 @@ namespace WMS.Web.Domain.Infrastructure
|
||||
/// </summary>
|
||||
/// <param name="boxIds"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<InStockDetails>> GetListBy(List<int> boxIds);
|
||||
Task<List<InStock>> GetListBy(List<int> boxIds);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Newtonsoft.Json;
|
||||
using Npoi.Mapper;
|
||||
using StackExchange.Redis;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
@@ -1135,7 +1136,9 @@ namespace WMS.Web.Domain.Services
|
||||
var list = await _inStockRepositories.GetListBy(t_boxIds);
|
||||
|
||||
//解绑
|
||||
list.ForEach(x => { x.UnBind = true; });
|
||||
list.SelectMany(s => s.Details)
|
||||
.Where(w => t_boxIds.Contains(w.BoxId))
|
||||
.ForEach(f => f.UnBind = true);
|
||||
|
||||
if (list.Count != 0)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using AutoMapper;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Org.BouncyCastle.Crypto;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -113,7 +114,7 @@ namespace WMS.Web.Repositories
|
||||
/// <returns></returns>
|
||||
public async Task<(object obj, int total)> GetListField(InStockQueryRequest dto, int companyId)
|
||||
{
|
||||
var res= await GetPagedList(dto, companyId);
|
||||
var res = await GetPagedList(dto, companyId);
|
||||
return (res.list, res.total);
|
||||
}
|
||||
|
||||
@@ -502,12 +503,15 @@ namespace WMS.Web.Repositories
|
||||
.Where(x => boxIds.Contains(x.detail.BoxId) && x.order.Type != InstockType.Purchase && (x.detail.UnBind == null || x.detail.UnBind == false)).Select(s => s.detail.BoxId).ToListAsync();
|
||||
}
|
||||
|
||||
public async Task<List<InStockDetails>> GetListBy(List<int> boxIds)
|
||||
public async Task<List<InStock>> GetListBy(List<int> boxIds)
|
||||
{
|
||||
var entitys = await _context.InStockDetails.AsNoTracking()
|
||||
.Where(x => boxIds.Contains(x.BoxId) && (x.UnBind == null || x.UnBind == false))
|
||||
var res = await _context.Instock
|
||||
.Include(s => s.Details)
|
||||
.Include(s => s.ErpDetails)
|
||||
.Where(f => f.Details.Where(w => boxIds.Contains(w.BoxId)).Count() > 0)
|
||||
.ToListAsync();
|
||||
return entitys;
|
||||
|
||||
return res.Clone();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user