增加接口

This commit is contained in:
18942506660
2023-12-29 10:37:44 +08:00
parent 6c7dfa8ef9
commit 1554afbbf5
11 changed files with 219 additions and 2 deletions

View File

@@ -70,6 +70,10 @@ namespace WMS.Web.Domain.Entitys
/// </summary>
[Column("CreateTime")]
public DateTime CreateTime { get; set; } = DateTime.Now;
/// <summary>
/// 明细信息
/// </summary>
public List<MoveBoxRecordDetails> Details { get; set; } = new List<MoveBoxRecordDetails>();
/// <summary>
/// 创建

View File

@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using WMS.Web.Core;
namespace WMS.Web.Domain.Entitys
{
/// <summary>
/// 移箱明细信息
/// </summary>
[Serializable]
[Table("t_wms_movebox_record_details")]
public class MoveBoxRecordDetails: EntityBase
{
public MoveBoxRecordDetails() { }
/// <summary>
/// 主键 订单编号
/// </summary>
[Column("Id")]
public override int Id { get; set; }
/// <summary>
/// 单据头Id
/// </summary>
[Column("Fid")]
public int Fid { get; set; }
/// <summary>
/// 物料Id
///</summary>
[Column("MaterialId")]
public int MaterialId { get; set; }
/// <summary>
/// 数量
/// </summary>
[Column("Qty")]
public decimal Qty { get; set; }
/// <summary>
/// 序列号
/// </summary>
[Column("SerialNumbers")]
public List<string> SerialNumbers { get; set; } = new List<string>();
}
}

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using WMS.Web.Core.Dto;
using WMS.Web.Core.Dto.MoveBoxRecord;
using WMS.Web.Domain.Entitys;
@@ -15,5 +16,7 @@ namespace WMS.Web.Domain.Infrastructure
Task<bool> AddRange(List<MoveBoxRecord> entitys, bool isTransaction = true);
// 获取列表
Task<(List<MoveBoxRecordQueryInfoResponse> list, int total)> GetListAsync(MoveBoxRecordQueryRequest dto, int companyId = 0);
//获取出库单明细
Task<List<BoxDetailResponse>> GetDetailsByBoxId(int boxId);
}
}

View File

@@ -260,6 +260,13 @@ namespace WMS.Web.Domain.Services
var subStock = await _basbicsRepositories.GetSubUcStockAsync(d.SubStockId, loginInfo.UserInfo.CompanyId);
var entity = new MoveBoxRecord();
entity.Create(IsUp == true ? MoveBoxType.Up : MoveBoxType.Down, d.BoxId, d.Qty, subStock?.ErpOrgCode, subStock?.StockCode, d.SubStockId, loginInfo.UserInfo.StaffId);
entity.Details = d.Details.Select(s => new MoveBoxRecordDetails()
{
MaterialId = s.MaterialId,
Qty = s.Qty,
SerialNumbers = s.SerialNumbers
}).ToList();
entityList.Add(entity);
}