优化详情
This commit is contained in:
@@ -139,21 +139,21 @@ namespace WMS.Web.Repositories
|
||||
|
||||
//1.获取物料集合和组织集合和供应商的集合
|
||||
var materials = new List<ErpMaterialDto>();
|
||||
//var materials_result = await _erpService.BillQueryForMaterial();
|
||||
//if (materials_result.IsSuccess)
|
||||
// materials = materials_result.Data.ToList();
|
||||
var materials_result = await _erpService.BillQueryForMaterial();
|
||||
if (materials_result.IsSuccess)
|
||||
materials = materials_result.Data.ToList();
|
||||
|
||||
//组织集合
|
||||
var orgs = new List<ErpOrgDto>();
|
||||
//var orgs_result = await _erpService.BillQueryForOrg();
|
||||
//if (orgs_result.IsSuccess)
|
||||
// orgs = orgs_result.Data.ToList();
|
||||
var orgs_result = await _erpService.BillQueryForOrg();
|
||||
if (orgs_result.IsSuccess)
|
||||
orgs = orgs_result.Data.ToList();
|
||||
|
||||
//供应商集合
|
||||
var suppliers = new List<ErpSupplierDto>();
|
||||
//var suppliers_result = await _erpService.BillQueryForSupplier();
|
||||
//if (suppliers_result.IsSuccess)
|
||||
// suppliers = suppliers_result.Data.ToList();
|
||||
var suppliers_result = await _erpService.BillQueryForSupplier();
|
||||
if (suppliers_result.IsSuccess)
|
||||
suppliers = suppliers_result.Data.ToList();
|
||||
|
||||
var entity = await _context.InStockTask.Include(x => x.Details).Where(x => x.Id == id).FirstOrDefaultAsync();
|
||||
|
||||
@@ -179,6 +179,9 @@ namespace WMS.Web.Repositories
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, box) => new { p.detail, p.order, box })
|
||||
.GroupJoin(_context.InStockTaskDetails, p => p.detail.TaskDetailId, ts => ts.Id, (p, ts) => new { p.detail, p.order, p.box, ts })
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, taskDet) => new { p.detail, p.order, p.box, taskDet })
|
||||
|
||||
.GroupJoin(_context.InstockTaskBox, p => p.detail.BoxId, ts => ts.BoxId, (p, ts) => new { p.detail, p.order, p.box,p.taskDet, ts })
|
||||
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, taskBox) => new { p.detail, p.order, p.box, p.taskDet, taskBox })
|
||||
.Where(x => x.detail.TaskId == entity.Id).Select(x => new InStockTaskBoxInfoDto()
|
||||
{
|
||||
BoxId = x.box.Id,
|
||||
@@ -194,8 +197,8 @@ namespace WMS.Web.Repositories
|
||||
ReceiveQty = x.detail.Qty,
|
||||
ShelfTime = x.order.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
Shelfer = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, x.order.CreatorId),
|
||||
Receiver = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, x.order.CreatorId),
|
||||
ReceiveTime = x.order.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
Receiver = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, x.taskBox.ReceiverId??0),
|
||||
ReceiveTime =x.taskBox.CreateTime.HasValue? x.taskBox.CreateTime.Value.ToString("yyyy-MM-dd HH:mm:ss"):"",
|
||||
SerialNumbers = (string.Join(",", x.detail.SerialNumbers).TrimEnd(','))
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
Reference in New Issue
Block a user