收货接口优化
This commit is contained in:
32
src/WMS.Web.Domain/Entitys/InStockTaskBox.cs
Normal file
32
src/WMS.Web.Domain/Entitys/InStockTaskBox.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
using WMS.Web.Core;
|
||||
|
||||
namespace WMS.Web.Domain.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// erp入库任务单的对应box箱信息表
|
||||
/// 比例是:1:N ,一个任务单对应多个box箱号
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[Table("t_erp_instock_task_box")]
|
||||
public class InStockTaskBox:EntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Id
|
||||
/// </summary>
|
||||
public override int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库任务单ID
|
||||
/// </summary>
|
||||
public int TaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 箱号ID
|
||||
/// </summary>
|
||||
public int BoxId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -50,6 +50,11 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// </summary>
|
||||
public DateTime? ShelfTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 箱信息集合
|
||||
/// </summary>
|
||||
public List<InStockTaskBox> Boxs = new List<InStockTaskBox>();
|
||||
|
||||
/// <summary>
|
||||
/// 明细
|
||||
/// </summary>
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace WMS.Web.Domain.Mappers
|
||||
.ForMember(x => x.Details, opt => opt.Ignore())
|
||||
.ReverseMap();
|
||||
CreateMap<UpdateInStockTaskDetailsRequest, InStockTaskDetails>().ReverseMap();
|
||||
CreateMap<UpdateInStockTaskBoxRequest, InStockTaskBox>().ReverseMap();
|
||||
|
||||
CreateMap<SaveInStockDetailsRequest, InStockDetails>().ReverseMap();
|
||||
|
||||
|
||||
@@ -150,6 +150,8 @@ namespace WMS.Web.Domain.Services
|
||||
|
||||
entity = _mapper.Map(dto, entity);
|
||||
//子集单独映射
|
||||
entity.Boxs = _mapper.ToMapList(dto.Boxs, entity.Boxs);
|
||||
//子集单独映射
|
||||
entity.Details = _mapper.ToMapList(dto.Details, entity.Details);
|
||||
if (isReceive)
|
||||
entity.Receive(staffId);
|
||||
|
||||
Reference in New Issue
Block a user