Merge branch 'master' of https://codeup.aliyun.com/62ce7bca487c500c27f70a79/OPS/WMS-Api
This commit is contained in:
@@ -1291,26 +1291,11 @@
|
|||||||
仓位ID
|
仓位ID
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:WMS.Web.Core.Dto.Erp.TakeStock.ErpTakeStockDetailsSaveDto.BeforeQty">
|
|
||||||
<summary>
|
|
||||||
盘点前数量(wms系统数量)
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:WMS.Web.Core.Dto.Erp.TakeStock.ErpTakeStockDetailsSaveDto.AfterQty">
|
<member name="P:WMS.Web.Core.Dto.Erp.TakeStock.ErpTakeStockDetailsSaveDto.AfterQty">
|
||||||
<summary>
|
<summary>
|
||||||
盘点实际数量(实际仓库数量)
|
盘点实际数量(实际仓库数量)
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:WMS.Web.Core.Dto.Erp.TakeStock.ErpTakeStockDetailsSaveDto.FinalQty">
|
|
||||||
<summary>
|
|
||||||
盘盈数量
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:WMS.Web.Core.Dto.Erp.TakeStock.ErpTakeStockDetailsSaveDto.LossQty">
|
|
||||||
<summary>
|
|
||||||
盘亏数量
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:WMS.Web.Core.Dto.Erp.TakeStock.ErpTakeStockDetailsSaveDto.Fnote">
|
<member name="P:WMS.Web.Core.Dto.Erp.TakeStock.ErpTakeStockDetailsSaveDto.Fnote">
|
||||||
<summary>
|
<summary>
|
||||||
备注
|
备注
|
||||||
|
|||||||
@@ -109,26 +109,26 @@ namespace WMS.Web.Core.Dto.Erp.TakeStock
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("FStockLocId")]
|
[JsonProperty("FStockLocId")]
|
||||||
public ErpSubStockDto SubStockId { get; set; }
|
public ErpSubStockDto SubStockId { get; set; }
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// 盘点前数量(wms系统数量)
|
///// 盘点前数量(wms系统数量)
|
||||||
/// </summary>
|
///// </summary>
|
||||||
[JsonProperty("FAcctQty")]
|
//[JsonProperty("FAcctQty")]
|
||||||
public decimal BeforeQty { get; set; }
|
//public decimal BeforeQty { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 盘点实际数量(实际仓库数量)
|
/// 盘点实际数量(实际仓库数量)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("FCountQty")]
|
[JsonProperty("FCountQty")]
|
||||||
public decimal AfterQty { get; set; }
|
public decimal AfterQty { get; set; }
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// 盘盈数量
|
///// 盘盈数量
|
||||||
/// </summary>
|
///// </summary>
|
||||||
[JsonProperty("FGainQty")]
|
//[JsonProperty("FGainQty")]
|
||||||
public decimal FinalQty { get; set; }
|
//public decimal FinalQty { get; set; }
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// 盘亏数量
|
///// 盘亏数量
|
||||||
/// </summary>
|
///// </summary>
|
||||||
[JsonProperty("FLossQty")]
|
//[JsonProperty("FLossQty")]
|
||||||
public decimal LossQty { get; set; }
|
//public decimal LossQty { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 备注
|
/// 备注
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -247,13 +247,22 @@ namespace WMS.Web.Domain.Services
|
|||||||
{
|
{
|
||||||
_logger.LogInformation($"移箱:{JsonConvert.SerializeObject(dto)} 是否上架:{IsUp} 操作人:{loginInfo.UserInfo.StaffId}");
|
_logger.LogInformation($"移箱:{JsonConvert.SerializeObject(dto)} 是否上架:{IsUp} 操作人:{loginInfo.UserInfo.StaffId}");
|
||||||
//1.下架时 需要验证箱是否在库存里
|
//1.下架时 需要验证箱是否在库存里
|
||||||
|
var boxIds = dto.Select(s => s.BoxId).ToList();
|
||||||
|
var boxList = await _boxInventoryRepositories.GetList(boxIds);
|
||||||
if (!IsUp)
|
if (!IsUp)
|
||||||
{
|
{
|
||||||
var boxIds = dto.Select(s => s.BoxId).ToList();
|
|
||||||
var boxList = await _boxInventoryRepositories.GetList(boxIds);
|
|
||||||
if (boxIds.Count() != boxList.Count())
|
if (boxIds.Count() != boxList.Count())
|
||||||
return Result.ReFailure(ResultCodes.BoxInventoryNoDataError);
|
return Result.ReFailure(ResultCodes.BoxInventoryNoDataError);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//上架时 箱子不能在库存里
|
||||||
|
if (boxList.Count() > 0)
|
||||||
|
{
|
||||||
|
var boxs = await _boxRepositories.GetEntityList(boxList.Select(s => s.BoxId).ToList());
|
||||||
|
return Result.ReFailure($"箱号{ string.Join(",", boxs.Select(s => s.BoxBillNo))} 已上架", 343433);
|
||||||
|
}
|
||||||
|
}
|
||||||
List<MoveBoxRecord> entityList = new List<MoveBoxRecord>();
|
List<MoveBoxRecord> entityList = new List<MoveBoxRecord>();
|
||||||
foreach (var d in dto)
|
foreach (var d in dto)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -218,10 +218,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
UnitId = new ErpNumberDto(unitNumber), //物料带出来
|
UnitId = new ErpNumberDto(unitNumber), //物料带出来
|
||||||
StockId = new ErpNumberDto(d.StockCode),
|
StockId = new ErpNumberDto(d.StockCode),
|
||||||
SubStockId = new ErpSubStockDto(d.StockCode, d.Erp_SubStockCode),
|
SubStockId = new ErpSubStockDto(d.StockCode, d.Erp_SubStockCode),
|
||||||
BeforeQty = d.BeforeQty,
|
|
||||||
AfterQty = d.AfterQty,
|
AfterQty = d.AfterQty,
|
||||||
FinalQty = entity.ResultType == TakeStockType.Profit ? d.FinalQty : 0,
|
|
||||||
LossQty = entity.ResultType == TakeStockType.Loss ? d.FinalQty : 0,
|
|
||||||
Fnote = d.Remark
|
Fnote = d.Remark
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ namespace WMS.Web.Domain.Values
|
|||||||
public static ValueTuple<int, string> BoxInventoryHaveInventoryError = (800013, "箱号已上架入库");
|
public static ValueTuple<int, string> BoxInventoryHaveInventoryError = (800013, "箱号已上架入库");
|
||||||
public static ValueTuple<int, string> InventoryInOutDetailsWriteError = (800014, "写入物料收发明细失败!");
|
public static ValueTuple<int, string> InventoryInOutDetailsWriteError = (800014, "写入物料收发明细失败!");
|
||||||
public static ValueTuple<int, string> InventoryDetailsWriteError = (800014, "写入即时库存明细失败!");
|
public static ValueTuple<int, string> InventoryDetailsWriteError = (800014, "写入即时库存明细失败!");
|
||||||
|
public static ValueTuple<int, string> MoveInventoryError = (800015, "箱已经上架,不能重复上架");
|
||||||
|
|
||||||
public static ValueTuple<int, string> SerialNumbersNoData = (610000, "序列号不存在");
|
public static ValueTuple<int, string> SerialNumbersNoData = (610000, "序列号不存在");
|
||||||
public static ValueTuple<int, string> SerialNumbersBoxError = (610002, "序列号已经绑定箱");
|
public static ValueTuple<int, string> SerialNumbersBoxError = (610002, "序列号已经绑定箱");
|
||||||
|
|||||||
@@ -49,6 +49,11 @@ namespace WMS.Web.Repositories.Configuration
|
|||||||
{
|
{
|
||||||
ent.ToTable("t_wms_movebox_record");
|
ent.ToTable("t_wms_movebox_record");
|
||||||
ent.HasKey(x => x.Id);
|
ent.HasKey(x => x.Id);
|
||||||
|
|
||||||
|
ent.HasMany(p => p.Details)
|
||||||
|
.WithOne()
|
||||||
|
.HasForeignKey(p => p.Fid)
|
||||||
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
//移箱明细
|
//移箱明细
|
||||||
builder.Entity<MoveBoxRecordDetails>(ent =>
|
builder.Entity<MoveBoxRecordDetails>(ent =>
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ namespace WMS.Web.Repositories
|
|||||||
_transaction.Commit();
|
_transaction.Commit();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
if (_transaction != null)
|
if (_transaction != null)
|
||||||
_transaction.Rollback();
|
_transaction.Rollback();
|
||||||
|
|||||||
Reference in New Issue
Block a user