接口优化
This commit is contained in:
@@ -169,7 +169,8 @@ namespace WMS.Web.Repositories
|
||||
MaterialName = _erpBasicDataExtendService.GetMaterialName(materials, s.detail.MaterialId),
|
||||
MaterialNumber = _erpBasicDataExtendService.GetMaterialNumber(materials, s.detail.MaterialId),
|
||||
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, s.detail.MaterialId),
|
||||
Qty = s.detail.Qty
|
||||
Qty = s.detail.Qty,
|
||||
Remark = s.order.Remark
|
||||
#endregion
|
||||
|
||||
}).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
|
||||
@@ -272,5 +273,24 @@ namespace WMS.Web.Repositories
|
||||
|
||||
return res.Clone();
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<OutStockInfoResponse> GetInfo(int id)
|
||||
{
|
||||
var res = await _context.OutStock
|
||||
.FirstOrDefaultAsync(f => id == f.Id);
|
||||
if (res == null) return null;
|
||||
OutStockInfoResponse response = new OutStockInfoResponse()
|
||||
{
|
||||
CreateTime = res.CreateTime.DateToStringSeconds(),
|
||||
SyncTime = res.SyncTime.DateToStringSeconds(),
|
||||
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, _loginRepositories.CompanyId, res.CreatorId),
|
||||
Operate = _singleDataService.GetSingleData(SingleAction.Staffs, _loginRepositories.CompanyId, res.OperateId)
|
||||
};
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace WMS.Web.Repositories
|
||||
_transaction.Commit();
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (_transaction != null)
|
||||
_transaction.Rollback();
|
||||
|
||||
@@ -166,6 +166,11 @@ namespace WMS.Web.Repositories
|
||||
if (!materials_result.IsSuccess)
|
||||
return (new List<TakeStockQueryInfoResponse>(), 0);
|
||||
var materials = materials_result.Data.ToList();
|
||||
//金蝶子仓库
|
||||
var subStock_result = await _erpService.BillQueryForSubStock();
|
||||
if (!subStock_result.IsSuccess)
|
||||
return (new List<TakeStockQueryInfoResponse>(), 0);
|
||||
var subStocks = subStock_result.Data.ToList();
|
||||
|
||||
var query = _context.TakeStock
|
||||
//.GroupJoin(_context.TakeStock, detail => detail.Fid, order => order.Id, (detail, orders) => new { detail, orders })
|
||||
@@ -193,6 +198,7 @@ namespace WMS.Web.Repositories
|
||||
Unit = _erpBasicDataExtendService.GetMaterialUnitName(materials, s.MaterialId),
|
||||
Stock = _singleDataService.GetSingleData(SingleAction.Stocks, _loginRepositories.CompanyId, s.StockCode),
|
||||
SubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, _loginRepositories.CompanyId, s.SubStockCode),
|
||||
Erp_SubStockCode= _erpBasicDataExtendService.GetStockName(subStocks, s.Erp_SubStockCode),
|
||||
BeforeQty = s.BeforeQty,
|
||||
AfterQty = s.AfterQty,
|
||||
FinalQty = s.FinalQty,
|
||||
|
||||
Reference in New Issue
Block a user