新增物料签收记录、调拨出库、电梯优化等
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Aop.Api.Domain;
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.DependencyInjection;
|
||||
@@ -979,6 +980,13 @@ namespace Tnb.WarehouseMgr
|
||||
throw new AppFriendlyException($@"表体存在物料和批号重复的明细!", 500);
|
||||
}
|
||||
|
||||
BasWarehouse warehouse_outstock = await db.Queryable<BasWarehouse>().Where(r => r.whcode == input.warehouse_outstock).FirstAsync();
|
||||
if (warehouse_outstock == null)
|
||||
{
|
||||
_LoggerErp2Mes.LogWarning($"【MaterialTransfer】无法查询到出库仓库{input.warehouse_outstock}的档案记录!");
|
||||
return await ToApiResult(HttpStatusCode.InternalServerError, $"无法查询到出库仓库{input.warehouse_outstock}的档案记录!");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
await db.Ado.BeginTranAsync();
|
||||
@@ -1036,6 +1044,27 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
await db.Insertable(wmsTransferOrderDs).ExecuteCommandAsync();
|
||||
|
||||
if (warehouse_outstock.id == WmsWareHouseConst.WAREHOUSE_YCL_ID)
|
||||
{
|
||||
WmsRawmatTransferoutstockH wmsRawmatTransferoutstockH = new WmsRawmatTransferoutstockH();
|
||||
|
||||
|
||||
List<WmsRawmatTransferoutstockD> wmsRawmatTransferoutstockD = new List <WmsRawmatTransferoutstockD>();
|
||||
|
||||
|
||||
await db.Insertable(wmsRawmatTransferoutstockH).ExecuteCommandAsync();
|
||||
await db.Insertable(wmsRawmatTransferoutstockD).ExecuteCommandAsync();
|
||||
}
|
||||
else if(warehouse_outstock.id == WmsWareHouseConst.WAREHOUSE_CP_ID)
|
||||
{
|
||||
WmsTransferInstockH wmsTransferInstockH = new WmsTransferInstockH();
|
||||
|
||||
List<WmsTransferInstockD> wmsTransferInstockD = new List<WmsTransferInstockD>();
|
||||
|
||||
await db.Insertable(wmsTransferInstockH).ExecuteCommandAsync();
|
||||
await db.Insertable(wmsTransferInstockD).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
await db.Ado.CommitTranAsync();
|
||||
|
||||
LoggerErp2Mes.LogInformation($"【TransferOrder】成功生成单据:{Code}");
|
||||
|
||||
Reference in New Issue
Block a user