修复bug
This commit is contained in:
@@ -72,7 +72,22 @@ namespace WMS.Web.Api.Controllers
|
||||
[Route("hj")]
|
||||
public async Task<string> TestHJ()
|
||||
{
|
||||
var st= await _erpService.BillQueryForDeliveryNoticeOutStock();
|
||||
//var list = await _outStockTaskRepositories.GetEntityList(new List<int> { 14321 });
|
||||
|
||||
//list[0].Details[0].ErpDetails[0].AccruedQty = 2;
|
||||
//list[0].Details[0].ErpDetails.Add(new OutStockTaskErpDetails()
|
||||
//{
|
||||
// Erp_DetailId = 1
|
||||
//});
|
||||
//list[0].Details.Add(new OutStockTaskDetails()
|
||||
//{
|
||||
// AccruedQty = 2
|
||||
//});
|
||||
//var b = await _outStockTaskRepositories.EditEntityList(list);
|
||||
|
||||
//List<string> s = new List<string>();
|
||||
//s.Add("XSCKD10629693");
|
||||
//var st = await _outStockTaskService.BillQueryForSalOutStock(true, s);
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -160,11 +175,13 @@ namespace WMS.Web.Api.Controllers
|
||||
var materials = materials_result.Data.ToList();
|
||||
|
||||
var mL = materials.Where(f => f.MaterialNumber.Contains(number))
|
||||
.Select(s=>new {
|
||||
Id=s.MaterialId,
|
||||
Number=s.MaterialNumber,
|
||||
name=s.MaterialName }).ToList();
|
||||
foreach(var m in mL)
|
||||
.Select(s => new
|
||||
{
|
||||
Id = s.MaterialId,
|
||||
Number = s.MaterialNumber,
|
||||
name = s.MaterialName
|
||||
}).ToList();
|
||||
foreach (var m in mL)
|
||||
{
|
||||
mList.Add((m.Id, m.Number, m.name));
|
||||
}
|
||||
@@ -196,7 +213,7 @@ namespace WMS.Web.Api.Controllers
|
||||
List<int> mIds = materials.Where(w => materialNumbers.Contains(w.MaterialNumber)).Select(s => s.MaterialId).ToList();
|
||||
int jn = 3;
|
||||
if (mIds.Count() <= 0)
|
||||
mIds= materials.Skip((new Random()).Next(1000, 10000)).Take(4).Select(s => s.MaterialId).ToList();
|
||||
mIds = materials.Skip((new Random()).Next(1000, 10000)).Take(4).Select(s => s.MaterialId).ToList();
|
||||
jn = mIds.Count() - 1;
|
||||
List<OpsBoxResponse> list = new List<OpsBoxResponse>();
|
||||
for (int i = 0; i < number; i++)
|
||||
@@ -280,7 +297,7 @@ namespace WMS.Web.Api.Controllers
|
||||
[Route("lst")]
|
||||
public string Lst()
|
||||
{
|
||||
var successStr = "tongfei test lst->数据库链接地址:" + _options.DBConnectionString+",单点项目链接地址:"+_options.SingleBaseUrl;
|
||||
var successStr = "tongfei test lst->数据库链接地址:" + _options.DBConnectionString + ",单点项目链接地址:" + _options.SingleBaseUrl;
|
||||
return successStr;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ namespace WMS.Web.Domain.Mappers
|
||||
{
|
||||
public OutStockMapper()
|
||||
{
|
||||
CreateMap<OutStockTask, OutStockTask>()
|
||||
.ForMember(x => x.Details, opt => opt.Ignore());
|
||||
CreateMap<OutStockTaskDetails, OutStockTaskDetails>()
|
||||
.ForMember(x => x.ErpDetails, opt => opt.Ignore());
|
||||
CreateMap<OutStockTask, OutStockTask>();
|
||||
//.ForMember(x => x.Details, opt => opt.Ignore());
|
||||
CreateMap<OutStockTaskDetails, OutStockTaskDetails>();
|
||||
//.ForMember(x => x.ErpDetails, opt => opt.Ignore());
|
||||
CreateMap<OutStockTaskErpDetails, OutStockTaskErpDetails>();
|
||||
|
||||
CreateMap<OutStock, OutStock>()
|
||||
|
||||
@@ -131,8 +131,8 @@ namespace WMS.Web.Repositories
|
||||
.Where(f => list.Contains(f.Id)).ToListAsync();
|
||||
|
||||
_mapper.ToMapList(entitys, res);
|
||||
_mapper.ToMapList(entitys.SelectMany(s => s.Details).ToList(), res.SelectMany(s => s.Details).ToList());
|
||||
_mapper.ToMapList(entitys.SelectMany(s => s.Details).SelectMany(s => s.ErpDetails).ToList(), res.SelectMany(s => s.Details).SelectMany(s => s.ErpDetails).ToList());
|
||||
//_mapper.ToMapList(entitys.SelectMany(s => s.Details).ToList(), res.SelectMany(s => s.Details).ToList());
|
||||
// _mapper.ToMapList(entitys.SelectMany(s => s.Details).SelectMany(s => s.ErpDetails).ToList(), res.SelectMany(s => s.Details).SelectMany(s => s.ErpDetails).ToList());
|
||||
await _context.SaveChangesAsync();
|
||||
if (_transaction != null)
|
||||
_transaction.Commit();
|
||||
@@ -195,8 +195,8 @@ namespace WMS.Web.Repositories
|
||||
if (res == null) return null;
|
||||
|
||||
_mapper.Map(entity, res);
|
||||
_mapper.ToMapList(entity.Details, res.Details);
|
||||
_mapper.ToMapList(entity.Details.SelectMany(s => s.ErpDetails).ToList(), res.Details.SelectMany(s => s.ErpDetails).ToList());
|
||||
//_mapper.ToMapList(entity.Details, res.Details);
|
||||
//_mapper.ToMapList(entity.Details.SelectMany(s => s.ErpDetails).ToList(), res.Details.SelectMany(s => s.ErpDetails).ToList());
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
if (_transaction != null)
|
||||
|
||||
Reference in New Issue
Block a user