修复bug
This commit is contained in:
@@ -217,7 +217,7 @@ namespace WMS.Web.Api.Controllers
|
|||||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||||
return Result<OutStockTaskInfoResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
return Result<OutStockTaskInfoResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||||
|
|
||||||
return await _outStockTaskService.GetInfo(id);
|
return await _outStockTaskService.GetInfo(id, loginInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4588,11 +4588,6 @@
|
|||||||
序列号
|
序列号
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.SubStockCode">
|
|
||||||
<summary>
|
|
||||||
仓位
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.Qty">
|
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.Qty">
|
||||||
<summary>
|
<summary>
|
||||||
出库数量
|
出库数量
|
||||||
|
|||||||
@@ -3849,7 +3849,7 @@
|
|||||||
<param name="begin"></param>
|
<param name="begin"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</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>
|
||||||
查询出库任务单详情
|
查询出库任务单详情
|
||||||
</summary>
|
</summary>
|
||||||
@@ -4966,7 +4966,7 @@
|
|||||||
<param name="sourceBillNos"></param>
|
<param name="sourceBillNos"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</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>
|
||||||
获取出库任务单详情
|
获取出库任务单详情
|
||||||
</summary>
|
</summary>
|
||||||
|
|||||||
@@ -26,10 +26,6 @@ namespace WMS.Web.Core.Dto.OutStockTask
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string SerialNumbers { get; set; }
|
public string SerialNumbers { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仓位
|
|
||||||
/// </summary>
|
|
||||||
public string SubStockCode { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 出库数量
|
/// 出库数量
|
||||||
///</summary>
|
///</summary>
|
||||||
public decimal Qty { get; set; }
|
public decimal Qty { get; set; }
|
||||||
@@ -48,6 +44,6 @@ namespace WMS.Web.Core.Dto.OutStockTask
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 出库时间
|
/// 出库时间
|
||||||
/// </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>
|
/// </summary>
|
||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <returns></returns>
|
/// <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 System.Threading.Tasks;
|
||||||
using WMS.Web.Core;
|
using WMS.Web.Core;
|
||||||
using WMS.Web.Core.Dto;
|
using WMS.Web.Core.Dto;
|
||||||
|
using WMS.Web.Core.Dto.Erp;
|
||||||
using WMS.Web.Core.Dto.Erp.Customer;
|
using WMS.Web.Core.Dto.Erp.Customer;
|
||||||
using WMS.Web.Core.Dto.Erp.Org;
|
using WMS.Web.Core.Dto.Erp.Org;
|
||||||
using WMS.Web.Core.Dto.Erp.OutStock;
|
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.IService.Public;
|
||||||
using WMS.Web.Domain.Services.Public;
|
using WMS.Web.Domain.Services.Public;
|
||||||
using WMS.Web.Domain.Values;
|
using WMS.Web.Domain.Values;
|
||||||
|
using WMS.Web.Domain.Values.Single;
|
||||||
|
|
||||||
namespace WMS.Web.Domain.Services
|
namespace WMS.Web.Domain.Services
|
||||||
{
|
{
|
||||||
@@ -37,10 +39,12 @@ namespace WMS.Web.Domain.Services
|
|||||||
private readonly IErpOpsSyncDateRepositories _erpOpsSyncDateRepositories;
|
private readonly IErpOpsSyncDateRepositories _erpOpsSyncDateRepositories;
|
||||||
private readonly RedisClientService _redisClientService;
|
private readonly RedisClientService _redisClientService;
|
||||||
private readonly IErpBasicDataExtendService _erpBasicDataExtendService;
|
private readonly IErpBasicDataExtendService _erpBasicDataExtendService;
|
||||||
|
private readonly ISingleDataService _singleDataService;
|
||||||
public OutStockTaskService(IMapper mapper, IErpService erpService, ILoginService loginService,
|
public OutStockTaskService(IMapper mapper, IErpService erpService, ILoginService loginService,
|
||||||
IBasicsRepositories transactionRepositories,
|
IBasicsRepositories transactionRepositories,
|
||||||
IOutStockRepositories outStockRepositories, IOutStockTaskRepositories outStockTaskRepositories, IErpOpsSyncDateRepositories erpOpsSyncDateRepositories,
|
IOutStockRepositories outStockRepositories, IOutStockTaskRepositories outStockTaskRepositories, IErpOpsSyncDateRepositories erpOpsSyncDateRepositories,
|
||||||
RedisClientService redisClientService, IErpBasicDataExtendService erpBasicDataExtendService)
|
RedisClientService redisClientService, IErpBasicDataExtendService erpBasicDataExtendService,
|
||||||
|
ISingleDataService singleDataService)
|
||||||
{
|
{
|
||||||
_mapper = mapper;
|
_mapper = mapper;
|
||||||
_erpService = erpService;
|
_erpService = erpService;
|
||||||
@@ -51,6 +55,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
_erpOpsSyncDateRepositories = erpOpsSyncDateRepositories;
|
_erpOpsSyncDateRepositories = erpOpsSyncDateRepositories;
|
||||||
_redisClientService = redisClientService;
|
_redisClientService = redisClientService;
|
||||||
_erpBasicDataExtendService = erpBasicDataExtendService;
|
_erpBasicDataExtendService = erpBasicDataExtendService;
|
||||||
|
_singleDataService = singleDataService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -446,7 +451,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <returns></returns>
|
/// <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);
|
var entity = await _outStockTaskRepositories.Get(id);
|
||||||
if (entity == null)
|
if (entity == null)
|
||||||
@@ -466,6 +471,11 @@ namespace WMS.Web.Domain.Services
|
|||||||
if (customer_result.IsSuccess)
|
if (customer_result.IsSuccess)
|
||||||
customers = customer_result.Data.ToList();
|
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()
|
OutStockTaskInfoResponse response = new OutStockTaskInfoResponse()
|
||||||
{
|
{
|
||||||
Id = entity.Id,
|
Id = entity.Id,
|
||||||
@@ -490,8 +500,12 @@ namespace WMS.Web.Domain.Services
|
|||||||
BoxBillNo = b.BoxId.ToString(),
|
BoxBillNo = b.BoxId.ToString(),
|
||||||
Qty = b.Qty,
|
Qty = b.Qty,
|
||||||
SerialNumbers = string.Join(",", b.SerialNumbers),
|
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