调整接口优化
This commit is contained in:
@@ -1398,6 +1398,11 @@
|
|||||||
改箱
|
改箱
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:WMS.Web.Domain.Mappers.InStockMapper">
|
||||||
|
<summary>
|
||||||
|
入库相关-映射
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Domain.Mappers.MapperList">
|
<member name="T:WMS.Web.Domain.Mappers.MapperList">
|
||||||
<summary>
|
<summary>
|
||||||
集合映射
|
集合映射
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ namespace WMS.Web.Core.Dto.InStockTask
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 修改-入库任务单-明细对象
|
/// 修改-入库任务单-明细对象
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class UpdateInStockTaskDetailsRequest
|
public class UpdateInStockTaskDetailsRequest : EntityBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 明细ID
|
/// 明细ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Id { get; set; }
|
public override int Id { get; set; } = 0;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 单据头ID
|
/// 单据头ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using WMS.Web.Core;
|
||||||
|
|
||||||
namespace WMS.Web.Domain.Entitys
|
namespace WMS.Web.Domain.Entitys
|
||||||
{
|
{
|
||||||
@@ -10,12 +11,12 @@ namespace WMS.Web.Domain.Entitys
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable]
|
[Serializable]
|
||||||
[Table("t_erp_instock_task_details")]
|
[Table("t_erp_instock_task_details")]
|
||||||
public class InStockTaskDetails
|
public class InStockTaskDetails: EntityBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ID
|
/// ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Id { get; set; }
|
public override int Id { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 单据头ID
|
/// 单据头ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
28
src/WMS.Web.Domain/Mappers/InStockMapper.cs
Normal file
28
src/WMS.Web.Domain/Mappers/InStockMapper.cs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using WMS.Web.Core.Dto.InStock;
|
||||||
|
using WMS.Web.Core.Dto.InStockTask;
|
||||||
|
using WMS.Web.Domain.Entitys;
|
||||||
|
|
||||||
|
namespace WMS.Web.Domain.Mappers
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 入库相关-映射
|
||||||
|
/// </summary>
|
||||||
|
public class InStockMapper: Profile
|
||||||
|
{
|
||||||
|
public InStockMapper()
|
||||||
|
{
|
||||||
|
CreateMap<UpdateInStockTaskRequest, InStockTask>()
|
||||||
|
.ForMember(x => x.Details, opt => opt.Ignore())
|
||||||
|
.ReverseMap();
|
||||||
|
CreateMap<UpdateInStockTaskDetailsRequest, InStockTaskDetails>().ReverseMap();
|
||||||
|
|
||||||
|
CreateMap<SaveInStockDetailsRequest, InStockDetails>().ReverseMap();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,6 +14,7 @@ using WMS.Web.Domain.Entitys;
|
|||||||
using WMS.Web.Domain.Infrastructure;
|
using WMS.Web.Domain.Infrastructure;
|
||||||
using WMS.Web.Domain.IService;
|
using WMS.Web.Domain.IService;
|
||||||
using WMS.Web.Domain.IService.Public;
|
using WMS.Web.Domain.IService.Public;
|
||||||
|
using WMS.Web.Domain.Mappers;
|
||||||
using WMS.Web.Domain.Values;
|
using WMS.Web.Domain.Values;
|
||||||
|
|
||||||
namespace WMS.Web.Domain.Services
|
namespace WMS.Web.Domain.Services
|
||||||
@@ -148,6 +149,8 @@ namespace WMS.Web.Domain.Services
|
|||||||
return Result.ReFailure(ResultCodes.DateWriteError);
|
return Result.ReFailure(ResultCodes.DateWriteError);
|
||||||
|
|
||||||
entity = _mapper.Map(dto, entity);
|
entity = _mapper.Map(dto, entity);
|
||||||
|
//子集单独映射
|
||||||
|
entity.Details = _mapper.ToMapList(dto.Details, entity.Details);
|
||||||
if (isReceive)
|
if (isReceive)
|
||||||
entity.Receive(staffId);
|
entity.Receive(staffId);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user