修复bug
This commit is contained in:
@@ -217,7 +217,7 @@ namespace WMS.Web.Api.Controllers
|
||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||
return Result<OutStockTaskInfoResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||
|
||||
return await _outStockTaskService.GetInfo(id);
|
||||
return await _outStockTaskService.GetInfo(id, loginInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4588,11 +4588,6 @@
|
||||
序列号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.SubStockCode">
|
||||
<summary>
|
||||
仓位
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.Qty">
|
||||
<summary>
|
||||
出库数量
|
||||
|
||||
@@ -3849,7 +3849,7 @@
|
||||
<param name="begin"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Domain.IService.Public.IOutStockTaskService.GetInfo(System.Int32)">
|
||||
<member name="M:WMS.Web.Domain.IService.Public.IOutStockTaskService.GetInfo(System.Int32,WMS.Web.Core.Dto.Login.LoginInDto)">
|
||||
<summary>
|
||||
查询出库任务单详情
|
||||
</summary>
|
||||
@@ -4966,7 +4966,7 @@
|
||||
<param name="sourceBillNos"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Domain.Services.OutStockTaskService.GetInfo(System.Int32)">
|
||||
<member name="M:WMS.Web.Domain.Services.OutStockTaskService.GetInfo(System.Int32,WMS.Web.Core.Dto.Login.LoginInDto)">
|
||||
<summary>
|
||||
获取出库任务单详情
|
||||
</summary>
|
||||
|
||||
@@ -26,10 +26,6 @@ namespace WMS.Web.Core.Dto.OutStockTask
|
||||
/// </summary>
|
||||
public string SerialNumbers { get; set; }
|
||||
/// <summary>
|
||||
/// 仓位
|
||||
/// </summary>
|
||||
public string SubStockCode { get; set; }
|
||||
/// <summary>
|
||||
/// 出库数量
|
||||
///</summary>
|
||||
public decimal Qty { get; set; }
|
||||
@@ -48,6 +44,6 @@ namespace WMS.Web.Core.Dto.OutStockTask
|
||||
/// <summary>
|
||||
/// 出库时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||
public string CreateTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,6 @@ namespace WMS.Web.Domain.IService.Public
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<Result<OutStockTaskInfoResponse>> GetInfo(int id);
|
||||
Task<Result<OutStockTaskInfoResponse>> GetInfo(int id, LoginInDto loginInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WMS.Web.Core;
|
||||
using WMS.Web.Core.Dto;
|
||||
using WMS.Web.Core.Dto.Erp;
|
||||
using WMS.Web.Core.Dto.Erp.Customer;
|
||||
using WMS.Web.Core.Dto.Erp.Org;
|
||||
using WMS.Web.Core.Dto.Erp.OutStock;
|
||||
@@ -20,6 +21,7 @@ using WMS.Web.Domain.IService;
|
||||
using WMS.Web.Domain.IService.Public;
|
||||
using WMS.Web.Domain.Services.Public;
|
||||
using WMS.Web.Domain.Values;
|
||||
using WMS.Web.Domain.Values.Single;
|
||||
|
||||
namespace WMS.Web.Domain.Services
|
||||
{
|
||||
@@ -37,10 +39,12 @@ namespace WMS.Web.Domain.Services
|
||||
private readonly IErpOpsSyncDateRepositories _erpOpsSyncDateRepositories;
|
||||
private readonly RedisClientService _redisClientService;
|
||||
private readonly IErpBasicDataExtendService _erpBasicDataExtendService;
|
||||
private readonly ISingleDataService _singleDataService;
|
||||
public OutStockTaskService(IMapper mapper, IErpService erpService, ILoginService loginService,
|
||||
IBasicsRepositories transactionRepositories,
|
||||
IOutStockRepositories outStockRepositories, IOutStockTaskRepositories outStockTaskRepositories, IErpOpsSyncDateRepositories erpOpsSyncDateRepositories,
|
||||
RedisClientService redisClientService, IErpBasicDataExtendService erpBasicDataExtendService)
|
||||
RedisClientService redisClientService, IErpBasicDataExtendService erpBasicDataExtendService,
|
||||
ISingleDataService singleDataService)
|
||||
{
|
||||
_mapper = mapper;
|
||||
_erpService = erpService;
|
||||
@@ -51,6 +55,7 @@ namespace WMS.Web.Domain.Services
|
||||
_erpOpsSyncDateRepositories = erpOpsSyncDateRepositories;
|
||||
_redisClientService = redisClientService;
|
||||
_erpBasicDataExtendService = erpBasicDataExtendService;
|
||||
_singleDataService = singleDataService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -446,7 +451,7 @@ namespace WMS.Web.Domain.Services
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<Result<OutStockTaskInfoResponse>> GetInfo(int id)
|
||||
public async Task<Result<OutStockTaskInfoResponse>> GetInfo(int id, LoginInDto loginInfo)
|
||||
{
|
||||
var entity = await _outStockTaskRepositories.Get(id);
|
||||
if (entity == null)
|
||||
@@ -466,6 +471,11 @@ namespace WMS.Web.Domain.Services
|
||||
if (customer_result.IsSuccess)
|
||||
customers = customer_result.Data.ToList();
|
||||
|
||||
var materials_result = await _erpService.BillQueryForMaterial();
|
||||
List<ErpMaterialDto> materials = new List<ErpMaterialDto>();
|
||||
if (materials_result.IsSuccess)
|
||||
materials = materials_result.Data.ToList();
|
||||
|
||||
OutStockTaskInfoResponse response = new OutStockTaskInfoResponse()
|
||||
{
|
||||
Id = entity.Id,
|
||||
@@ -490,8 +500,12 @@ namespace WMS.Web.Domain.Services
|
||||
BoxBillNo = b.BoxId.ToString(),
|
||||
Qty = b.Qty,
|
||||
SerialNumbers = string.Join(",", b.SerialNumbers),
|
||||
Method = outStock.Method.GetRemark()
|
||||
|
||||
Method = outStock.Method.GetRemark(),
|
||||
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, loginInfo.UserInfo.CompanyId, outStock.CreatorId),
|
||||
CreateTime = outStock.CreateTime.DateToStringSeconds(),
|
||||
MaterialNumber = detail.MaterialNumber,
|
||||
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, detail.MaterialNumber),
|
||||
AccruedQty = entity.Details.FirstOrDefault(f => f.MaterialNumber == detail.MaterialNumber)?.AccruedQty ?? 0
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user