出库增加箱信息填写
This commit is contained in:
Binary file not shown.
@@ -131,5 +131,21 @@ namespace WMS.Web.Api.Controllers
|
|||||||
//return await _outStockService.Sync(dto, loginInfo);
|
//return await _outStockService.Sync(dto, loginInfo);
|
||||||
return Task.FromResult(Result.ReSuccess());
|
return Task.FromResult(Result.ReSuccess());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 修改出库箱信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
[Route("EditBoxInfo")]
|
||||||
|
public async Task<Result> EditBoxInfo(List<EditBoxInfoRequest> dto)
|
||||||
|
{
|
||||||
|
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||||
|
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||||
|
return Result.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||||
|
|
||||||
|
return await _outStockService.EditBoxInfo(dto, loginInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -478,6 +478,13 @@
|
|||||||
<param name="dto"></param>
|
<param name="dto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Api.Controllers.OutStockController.EditBoxInfo(System.Collections.Generic.List{WMS.Web.Core.Dto.OutStock.EditBoxInfoRequest})">
|
||||||
|
<summary>
|
||||||
|
修改出库箱信息
|
||||||
|
</summary>
|
||||||
|
<param name="dto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Api.Controllers.OutStockTaskController">
|
<member name="T:WMS.Web.Api.Controllers.OutStockTaskController">
|
||||||
<summary>
|
<summary>
|
||||||
出库计划单
|
出库计划单
|
||||||
|
|||||||
@@ -5039,6 +5039,41 @@
|
|||||||
出库时间
|
出库时间
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.BoxLength">
|
||||||
|
<summary>
|
||||||
|
箱长
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.BoxWide">
|
||||||
|
<summary>
|
||||||
|
箱宽
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.BoxHigh">
|
||||||
|
<summary>
|
||||||
|
箱高
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.BoxWeight">
|
||||||
|
<summary>
|
||||||
|
箱重
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.IndexNumber">
|
||||||
|
<summary>
|
||||||
|
序号
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.OutStockId">
|
||||||
|
<summary>
|
||||||
|
出库单Id
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.OutStockBoxDetailsId">
|
||||||
|
<summary>
|
||||||
|
出库单对应箱明细Id
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoResponse">
|
<member name="T:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoResponse">
|
||||||
<summary>
|
<summary>
|
||||||
出库任务单详情
|
出库任务单详情
|
||||||
@@ -5299,6 +5334,41 @@
|
|||||||
序列号
|
序列号
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:WMS.Web.Core.Dto.OutStock.EditBoxInfoRequest">
|
||||||
|
<summary>
|
||||||
|
修改出库箱信息
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.OutStock.EditBoxInfoRequest.BoxLength">
|
||||||
|
<summary>
|
||||||
|
箱长
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.OutStock.EditBoxInfoRequest.BoxWide">
|
||||||
|
<summary>
|
||||||
|
箱宽
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.OutStock.EditBoxInfoRequest.BoxHigh">
|
||||||
|
<summary>
|
||||||
|
箱高
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.OutStock.EditBoxInfoRequest.BoxWeight">
|
||||||
|
<summary>
|
||||||
|
箱重
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.OutStock.EditBoxInfoRequest.OutStockId">
|
||||||
|
<summary>
|
||||||
|
出库单Id
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.OutStock.EditBoxInfoRequest.OutStockBoxDetailsId">
|
||||||
|
<summary>
|
||||||
|
出库单对应箱明细Id
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Core.Dto.OutStock.OutStockInfoResponse">
|
<member name="T:WMS.Web.Core.Dto.OutStock.OutStockInfoResponse">
|
||||||
<summary>
|
<summary>
|
||||||
出库单详情
|
出库单详情
|
||||||
@@ -5519,6 +5589,26 @@
|
|||||||
序列号集
|
序列号集
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.OutStock.SaveOutStockDetailsRequest.BoxLength">
|
||||||
|
<summary>
|
||||||
|
箱长
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.OutStock.SaveOutStockDetailsRequest.BoxWide">
|
||||||
|
<summary>
|
||||||
|
箱宽
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.OutStock.SaveOutStockDetailsRequest.BoxHigh">
|
||||||
|
<summary>
|
||||||
|
箱高
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.OutStock.SaveOutStockDetailsRequest.BoxWeight">
|
||||||
|
<summary>
|
||||||
|
箱重
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:WMS.Web.Core.Dto.PaginationRequestDto.OrgId">
|
<member name="P:WMS.Web.Core.Dto.PaginationRequestDto.OrgId">
|
||||||
<summary>
|
<summary>
|
||||||
组织Id(所有列表页都需要 全局)
|
组织Id(所有列表页都需要 全局)
|
||||||
|
|||||||
@@ -1739,6 +1739,18 @@
|
|||||||
生成单据号
|
生成单据号
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Entitys.OutStock.EditBoxInfo(System.Int32,System.Nullable{System.Decimal},System.Nullable{System.Decimal},System.Nullable{System.Decimal},System.Nullable{System.Decimal},System.Int32)">
|
||||||
|
<summary>
|
||||||
|
修改箱信息
|
||||||
|
</summary>
|
||||||
|
<param name="boxDetailsId"></param>
|
||||||
|
<param name="boxLength"></param>
|
||||||
|
<param name="boxWide"></param>
|
||||||
|
<param name="boxHigh"></param>
|
||||||
|
<param name="boxWeight"></param>
|
||||||
|
<param name="userId"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Domain.Entitys.OutStockBoxsDetails">
|
<member name="T:WMS.Web.Domain.Entitys.OutStockBoxsDetails">
|
||||||
<summary>
|
<summary>
|
||||||
对应金蝶的明细
|
对应金蝶的明细
|
||||||
@@ -1774,6 +1786,36 @@
|
|||||||
出库数量
|
出库数量
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:WMS.Web.Domain.Entitys.OutStockBoxsDetails.BoxLength">
|
||||||
|
<summary>
|
||||||
|
箱长
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Domain.Entitys.OutStockBoxsDetails.BoxWide">
|
||||||
|
<summary>
|
||||||
|
箱宽
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Domain.Entitys.OutStockBoxsDetails.BoxHigh">
|
||||||
|
<summary>
|
||||||
|
箱高
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Domain.Entitys.OutStockBoxsDetails.BoxWeight">
|
||||||
|
<summary>
|
||||||
|
箱重
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Domain.Entitys.OutStockBoxsDetails.UpdateId">
|
||||||
|
<summary>
|
||||||
|
修改人
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Domain.Entitys.OutStockBoxsDetails.UpdateDate">
|
||||||
|
<summary>
|
||||||
|
修改时间
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Domain.Entitys.OutStockDetails">
|
<member name="T:WMS.Web.Domain.Entitys.OutStockDetails">
|
||||||
<summary>
|
<summary>
|
||||||
wms出库单明细
|
wms出库单明细
|
||||||
@@ -3821,6 +3863,13 @@
|
|||||||
出库服务
|
出库服务
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.IService.IOutStockService.EditBoxInfo(System.Collections.Generic.List{WMS.Web.Core.Dto.OutStock.EditBoxInfoRequest},WMS.Web.Core.Dto.Login.LoginInDto)">
|
||||||
|
<summary>
|
||||||
|
修改出库箱信息
|
||||||
|
</summary>
|
||||||
|
<param name="dto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:WMS.Web.Domain.IService.IQiniuUploadService.Upload(System.String,System.IO.Stream,System.Boolean)">
|
<member name="M:WMS.Web.Domain.IService.IQiniuUploadService.Upload(System.String,System.IO.Stream,System.Boolean)">
|
||||||
<summary>
|
<summary>
|
||||||
上传文件
|
上传文件
|
||||||
@@ -5583,6 +5632,15 @@
|
|||||||
<param name="dto"></param>
|
<param name="dto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Services.OutStockService.EditBoxInfo(System.Collections.Generic.List{WMS.Web.Core.Dto.OutStock.EditBoxInfoRequest},WMS.Web.Core.Dto.Login.LoginInDto)">
|
||||||
|
<summary>
|
||||||
|
修改出库箱信息
|
||||||
|
</summary>
|
||||||
|
<param name="dto"></param>
|
||||||
|
<param name="loginInfo"></param>
|
||||||
|
<returns></returns>
|
||||||
|
<exception cref="T:System.NotImplementedException"></exception>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Domain.Services.OutStockTaskService">
|
<member name="T:WMS.Web.Domain.Services.OutStockTaskService">
|
||||||
<summary>
|
<summary>
|
||||||
出库任务
|
出库任务
|
||||||
|
|||||||
37
src/WMS.Web.Core/Dto/OutStock/EditBoxInfoRequest.cs
Normal file
37
src/WMS.Web.Core/Dto/OutStock/EditBoxInfoRequest.cs
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WMS.Web.Core.Dto.OutStock
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 修改出库箱信息
|
||||||
|
/// </summary>
|
||||||
|
public class EditBoxInfoRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 箱长
|
||||||
|
///</summary>
|
||||||
|
public decimal? BoxLength { get; set; } = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 箱宽
|
||||||
|
///</summary>
|
||||||
|
public decimal? BoxWide { get; set; } = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 箱高
|
||||||
|
///</summary>
|
||||||
|
public decimal? BoxHigh { get; set; } = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 箱重
|
||||||
|
///</summary>
|
||||||
|
public decimal? BoxWeight { get; set; } = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 出库单Id
|
||||||
|
/// </summary>
|
||||||
|
public int OutStockId { get; set; } = 0;
|
||||||
|
/// <summary>
|
||||||
|
/// 出库单对应箱明细Id
|
||||||
|
/// </summary>
|
||||||
|
public int OutStockBoxDetailsId { get; set; } = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -51,5 +51,21 @@ namespace WMS.Web.Core.Dto.OutStock
|
|||||||
/// 序列号集
|
/// 序列号集
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<string> SerialNumbers { get; set; } = new List<string>();
|
public List<string> SerialNumbers { get; set; } = new List<string>();
|
||||||
|
/// <summary>
|
||||||
|
/// 箱长
|
||||||
|
///</summary>
|
||||||
|
public decimal? BoxLength { get; set; } = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 箱宽
|
||||||
|
///</summary>
|
||||||
|
public decimal? BoxWide { get; set; } = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 箱高
|
||||||
|
///</summary>
|
||||||
|
public decimal? BoxHigh { get; set; } = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 箱重
|
||||||
|
///</summary>
|
||||||
|
public decimal? BoxWeight { get; set; } = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,5 +57,33 @@ namespace WMS.Web.Core.Dto.OutStockTask
|
|||||||
/// 出库时间
|
/// 出库时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string CreateTime { get; set; }
|
public string CreateTime { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 箱长
|
||||||
|
///</summary>
|
||||||
|
public decimal? BoxLength { get; set; } = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 箱宽
|
||||||
|
///</summary>
|
||||||
|
public decimal? BoxWide { get; set; } = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 箱高
|
||||||
|
///</summary>
|
||||||
|
public decimal? BoxHigh { get; set; } = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 箱重
|
||||||
|
///</summary>
|
||||||
|
public decimal? BoxWeight { get; set; } = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 序号
|
||||||
|
/// </summary>
|
||||||
|
public int IndexNumber { get; set; } = 0;
|
||||||
|
/// <summary>
|
||||||
|
/// 出库单Id
|
||||||
|
/// </summary>
|
||||||
|
public int OutStockId { get; set; } = 0;
|
||||||
|
/// <summary>
|
||||||
|
/// 出库单对应箱明细Id
|
||||||
|
/// </summary>
|
||||||
|
public int OutStockBoxDetailsId { get; set; } = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
using System;
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using WMS.Web.Core;
|
using WMS.Web.Core;
|
||||||
|
using WMS.Web.Core.Internal.Results;
|
||||||
using WMS.Web.Domain.Values;
|
using WMS.Web.Domain.Values;
|
||||||
|
|
||||||
namespace WMS.Web.Domain.Entitys
|
namespace WMS.Web.Domain.Entitys
|
||||||
@@ -207,5 +209,31 @@ namespace WMS.Web.Domain.Entitys
|
|||||||
}
|
}
|
||||||
this.BillNo = "CK" + idStr;
|
this.BillNo = "CK" + idStr;
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 修改箱信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="boxDetailsId"></param>
|
||||||
|
/// <param name="boxLength"></param>
|
||||||
|
/// <param name="boxWide"></param>
|
||||||
|
/// <param name="boxHigh"></param>
|
||||||
|
/// <param name="boxWeight"></param>
|
||||||
|
/// <param name="userId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Result EditBoxInfo(int boxDetailsId, decimal? boxLength, decimal? boxWide, decimal? boxHigh, decimal? boxWeight, int userId)
|
||||||
|
{
|
||||||
|
var boxDetail = this.Details.SelectMany(s => s.BoxsDetails).FirstOrDefault(f => f.Id == boxDetailsId);
|
||||||
|
if (boxDetail == null) return Result.ReFailure(ResultCodes.NoDateError);
|
||||||
|
if (boxDetail.BoxLength != boxLength || boxDetail.BoxWide != boxWide ||
|
||||||
|
boxDetail.BoxHigh != boxHigh || boxDetail.BoxWeight != boxWeight)
|
||||||
|
{
|
||||||
|
boxDetail.BoxLength = boxLength;
|
||||||
|
boxDetail.BoxWide = boxWide;
|
||||||
|
boxDetail.BoxHigh = boxHigh;
|
||||||
|
boxDetail.BoxWeight = boxWeight;
|
||||||
|
boxDetail.UpdateId = userId;
|
||||||
|
boxDetail.UpdateDate = DateTime.Now;
|
||||||
|
}
|
||||||
|
return Result.ReSuccess();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,5 +49,35 @@ namespace WMS.Web.Domain.Entitys
|
|||||||
///</summary>
|
///</summary>
|
||||||
[Column("Qty")]
|
[Column("Qty")]
|
||||||
public decimal Qty { get; set; }
|
public decimal Qty { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 箱长
|
||||||
|
///</summary>
|
||||||
|
[Column("BoxLength")]
|
||||||
|
public decimal? BoxLength { get; set; } = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 箱宽
|
||||||
|
///</summary>
|
||||||
|
[Column("BoxWide")]
|
||||||
|
public decimal? BoxWide { get; set; } = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 箱高
|
||||||
|
///</summary>
|
||||||
|
[Column("BoxHigh")]
|
||||||
|
public decimal? BoxHigh { get; set; } = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 箱重
|
||||||
|
///</summary>
|
||||||
|
[Column("BoxWeight")]
|
||||||
|
public decimal? BoxWeight { get; set; } = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 修改人
|
||||||
|
/// </summary>
|
||||||
|
[Column("UpdateId")]
|
||||||
|
public int? UpdateId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 修改时间
|
||||||
|
/// </summary>
|
||||||
|
[Column("UpdateDate")]
|
||||||
|
public DateTime? UpdateDate { get; set; } = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,11 @@ namespace WMS.Web.Domain.IService
|
|||||||
Task<Result> Save(SaveOutStockRequest dto, LoginInDto loginInfo);
|
Task<Result> Save(SaveOutStockRequest dto, LoginInDto loginInfo);
|
||||||
// 同步金蝶
|
// 同步金蝶
|
||||||
Task<Result> Sync(OperateRequest dto, LoginInDto loginInfo, bool isRepeatSync = true);
|
Task<Result> Sync(OperateRequest dto, LoginInDto loginInfo, bool isRepeatSync = true);
|
||||||
|
/// <summary>
|
||||||
|
/// 修改出库箱信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<Result> EditBoxInfo(List<EditBoxInfoRequest> dto, LoginInDto loginInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -359,5 +359,27 @@ namespace WMS.Web.Domain.Services
|
|||||||
_logger.LogInformation($"同步金蝶成功");
|
_logger.LogInformation($"同步金蝶成功");
|
||||||
return (Result.ReSuccess(), SyncStatus.Success, o_dto.Numbers.First());
|
return (Result.ReSuccess(), SyncStatus.Success, o_dto.Numbers.First());
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 修改出库箱信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <param name="loginInfo"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
|
public async Task<Result> EditBoxInfo(List<EditBoxInfoRequest> dto, LoginInDto loginInfo)
|
||||||
|
{
|
||||||
|
var ids = dto.Select(s => s.OutStockId).ToList();
|
||||||
|
var entityList = await _outStockRepositories.GetEntityList(ids);
|
||||||
|
foreach (var d in dto)
|
||||||
|
{
|
||||||
|
var entity = entityList.FirstOrDefault(f => f.Id == d.OutStockId);
|
||||||
|
if (entity == null) return Result.ReFailure(ResultCodes.NoDateError);
|
||||||
|
var res = entity.EditBoxInfo(d.OutStockBoxDetailsId, d.BoxLength, d.BoxWide, d.BoxHigh, d.BoxWeight, loginInfo.UserInfo.StaffId);
|
||||||
|
if (!res.IsSuccess) return res;
|
||||||
|
}
|
||||||
|
var isSuccess = await _outStockRepositories.EditEntityList(entityList);
|
||||||
|
if (!isSuccess) return Result.ReFailure(ResultCodes.DateWriteError);
|
||||||
|
return Result.ReSuccess();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -574,6 +574,12 @@ namespace WMS.Web.Domain.Services
|
|||||||
OutStockTaskInfoDetailsResponse infoDetail = new OutStockTaskInfoDetailsResponse()
|
OutStockTaskInfoDetailsResponse infoDetail = new OutStockTaskInfoDetailsResponse()
|
||||||
{
|
{
|
||||||
BoxBillNo = boxList.FirstOrDefault(f => f.Id == b.BoxId)?.BoxBillNo ?? "",
|
BoxBillNo = boxList.FirstOrDefault(f => f.Id == b.BoxId)?.BoxBillNo ?? "",
|
||||||
|
OutStockId= outStock.Id,
|
||||||
|
OutStockBoxDetailsId=b.Id,
|
||||||
|
BoxLength =b.BoxHigh,
|
||||||
|
BoxWide=b.BoxWide,
|
||||||
|
BoxHigh=b.BoxHigh,
|
||||||
|
BoxWeight=b.BoxWeight,
|
||||||
Qty = b.Qty,
|
Qty = b.Qty,
|
||||||
SerialNumbers = string.Join(",", b.SerialNumbers),
|
SerialNumbers = string.Join(",", b.SerialNumbers),
|
||||||
SerialNumberList = b.SerialNumbers,
|
SerialNumberList = b.SerialNumbers,
|
||||||
@@ -589,6 +595,10 @@ namespace WMS.Web.Domain.Services
|
|||||||
};
|
};
|
||||||
response.Details.Add(infoDetail);
|
response.Details.Add(infoDetail);
|
||||||
}
|
}
|
||||||
|
//排序和加序号值
|
||||||
|
response.Details = response.Details.OrderByDescending(s => s.Specifications)
|
||||||
|
.ThenByDescending(s => s.Method).ThenByDescending(s => s.Qty).ToList();
|
||||||
|
response.Details.ForEach(f => f.IndexNumber = response.Details.IndexOf(f) + 1);
|
||||||
|
|
||||||
return Result<OutStockTaskInfoResponse>.ReSuccess(response);
|
return Result<OutStockTaskInfoResponse>.ReSuccess(response);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user