分拣任务变更 现场问题处理

This commit is contained in:
2024-10-15 14:30:59 +08:00
parent da3db7aee6
commit ca45839b2a
15 changed files with 262 additions and 35 deletions

View File

@@ -440,7 +440,18 @@ namespace Tnb.WarehouseMgr
wmsPurchaseOrderD.material_specification = material.material_specification;
wmsPurchaseOrderD.material_standard = material.material_standard;
}
wmsPurchaseOrderD.auxprop_gys = detail.auxprop_gys;
var gys_erpExtendField = await db.Queryable<ErpExtendField>().Where(a => a.supplier_id == detail.auxprop_gys).FirstAsync();
if (gys_erpExtendField != null)
{
wmsPurchaseOrderD.auxprop_gys = gys_erpExtendField.table_id;
}
else
{
_LoggerErp2Mes.LogWarning($@"【PurchaseOrder】表体明细中组织{detail.auxprop_gys}在wms系统中未找到");
throw new AppFriendlyException($@"表体明细中组织{detail.auxprop_gys}在wms系统中未找到", 500);
}
wmsPurchaseOrderDs.Add(wmsPurchaseOrderD);
}
@@ -650,7 +661,18 @@ namespace Tnb.WarehouseMgr
wmsOutsourceOrderD.matcode_id = material.id;
wmsOutsourceOrderD.matspecification = material.material_specification;
}
wmsOutsourceOrderD.auxprop_gys = detail.auxprop_gys;
var gys_erpExtendField = await db.Queryable<ErpExtendField>().Where(a => a.supplier_id == detail.auxprop_gys).FirstAsync();
if (gys_erpExtendField != null)
{
wmsOutsourceOrderD.auxprop_gys = gys_erpExtendField.table_id;
}
else
{
_LoggerErp2Mes.LogWarning($@"【OutsourceOrder】表体明细中组织{detail.auxprop_gys}在wms系统中未找到");
throw new AppFriendlyException($@"表体明细中组织{detail.auxprop_gys}在wms系统中未找到", 500);
}
wmsOutsourceOrderDs.Add(wmsOutsourceOrderD);
}
@@ -1351,7 +1373,18 @@ namespace Tnb.WarehouseMgr
wmsSaleD.material_specification = material.material_specification;
}
wmsSaleD.auxprop = detail.auxprop;
wmsSaleD.auxprop_gys = detail.auxprop_gys;
var gys_erpExtendField = await db.Queryable<ErpExtendField>().Where(a => a.supplier_id == detail.auxprop_gys).FirstAsync();
if (gys_erpExtendField != null)
{
wmsSaleD.auxprop_gys = gys_erpExtendField.table_id;
}
else
{
_LoggerErp2Mes.LogWarning($@"【MaterialTransfer】表体明细中组织{detail.auxprop_gys}在wms系统中未找到");
throw new AppFriendlyException($@"表体明细中组织{detail.auxprop_gys}在wms系统中未找到", 500);
}
wmsSaleD.auxprop_xph = detail.auxprop_xph;
wmsSaleDs.Add(wmsSaleD);
}
@@ -1557,7 +1590,17 @@ namespace Tnb.WarehouseMgr
msRawmatTransferinstockD.matspecification = material.material_specification;
}
msRawmatTransferinstockD.auxprop = detail.auxprop;
msRawmatTransferinstockD.auxprop_gys = detail.auxprop_gys;
var gys_erpExtendField = await db.Queryable<ErpExtendField>().Where(a => a.supplier_id == detail.auxprop_gys).FirstAsync();
if (gys_erpExtendField != null)
{
msRawmatTransferinstockD.auxprop_gys = gys_erpExtendField.table_id;
}
else
{
_LoggerErp2Mes.LogWarning($@"【TransferOutstock】表体明细中组织{detail.auxprop_gys}在wms系统中未找到");
throw new AppFriendlyException($@"表体明细中组织{detail.auxprop_gys}在wms系统中未找到", 500);
}
msRawmatTransferinstockD.auxprop_xph = detail.auxprop_xph;
wmsRawmatTransferinstockDs.Add(msRawmatTransferinstockD);
}
@@ -1630,7 +1673,17 @@ namespace Tnb.WarehouseMgr
wmsTransferInstockD.material_desc = material.material_specification;
}
wmsTransferInstockD.auxprop = detail.auxprop;
wmsTransferInstockD.auxprop_gys = detail.auxprop_gys;
var gys_erpExtendField = await db.Queryable<ErpExtendField>().Where(a => a.supplier_id == detail.auxprop_gys).FirstAsync();
if (gys_erpExtendField != null)
{
wmsTransferInstockD.auxprop_gys = gys_erpExtendField.table_id;
}
else
{
_LoggerErp2Mes.LogWarning($@"【TransferOutstock】表体明细中组织{detail.auxprop_gys}在wms系统中未找到");
throw new AppFriendlyException($@"表体明细中组织{detail.auxprop_gys}在wms系统中未找到", 500);
}
wmsTransferInstockD.auxprop_xph = detail.auxprop_xph;
wmsTransferInstockDs.Add(wmsTransferInstockD);
@@ -1840,7 +1893,18 @@ namespace Tnb.WarehouseMgr
wmsPackInstockD.material_code = material.code;
wmsPackInstockD.material_desc = material.material_specification;
}
wmsPackInstockD.auxprop_gys = detail.auxprop_gys;
var gys_erpExtendField = await db.Queryable<ErpExtendField>().Where(a => a.supplier_id == detail.auxprop_gys).FirstAsync();
if (gys_erpExtendField != null)
{
wmsPackInstockD.auxprop_gys = gys_erpExtendField.table_id;
}
else
{
_LoggerErp2Mes.LogWarning($@"【TransferOutstock】表体明细中组织{detail.auxprop_gys}在wms系统中未找到");
throw new AppFriendlyException($@"表体明细中组织{detail.auxprop_gys}在wms系统中未找到", 500);
}
wmsPackInstockD.auxprop_xph = detail.auxprop_xph;
wmsPackInstockDs.Add(wmsPackInstockD);
@@ -2305,7 +2369,17 @@ namespace Tnb.WarehouseMgr
wmsRawmatOutstockD.material_specification = material.material_specification;
}
wmsRawmatOutstockD.auxprop = detail.auxprop;
wmsRawmatOutstockD.auxprop_gys = detail.auxprop_gys;
var gys_erpExtendField = await db.Queryable<ErpExtendField>().Where(a => a.supplier_id == detail.auxprop_gys).FirstAsync();
if (gys_erpExtendField != null)
{
wmsRawmatOutstockD.auxprop_gys = gys_erpExtendField.table_id;
}
else
{
_LoggerErp2Mes.LogWarning($@"【TransferOrder】表体明细中组织{detail.auxprop_gys}在wms系统中未找到");
throw new AppFriendlyException($@"表体明细中组织{detail.auxprop_gys}在wms系统中未找到", 500);
}
wmsRawmatOutstockD.auxprop_xph = detail.auxprop_xph;
wmsRawmatOutstockDs.Add(wmsRawmatOutstockD);
}
@@ -2438,7 +2512,18 @@ namespace Tnb.WarehouseMgr
}
wmsRawmatOutstockD.auxprop = detail.auxprop;
wmsRawmatOutstockD.auxprop_gys = detail.auxprop_gys;
var gys_erpExtendField = await db.Queryable<ErpExtendField>().Where(a => a.supplier_id == detail.auxprop_gys).FirstAsync();
if (gys_erpExtendField != null)
{
wmsRawmatOutstockD.auxprop_gys = gys_erpExtendField.table_id;
}
else
{
_LoggerErp2Mes.LogWarning($@"【TransferOrder】表体明细中组织{detail.auxprop_gys}在wms系统中未找到");
throw new AppFriendlyException($@"表体明细中组织{detail.auxprop_gys}在wms系统中未找到", 500);
}
wmsRawmatOutstockD.auxprop_xph = detail.auxprop_xph;
wmsRawmatOutstockDs.Add(wmsRawmatOutstockD);
}
@@ -2600,7 +2685,17 @@ namespace Tnb.WarehouseMgr
throw new AppFriendlyException($@"表体明细中单位{detail.unit_code}在wms系统中未找到", 500);
}
wmsInventorycheckD.auxprop = detail.auxprop;
wmsInventorycheckD.auxprop_gys = detail.auxprop_gys;
var gys_erpExtendField = await db.Queryable<ErpExtendField>().Where(a => a.supplier_id == detail.auxprop_gys).FirstAsync();
if (gys_erpExtendField != null)
{
wmsInventorycheckD.auxprop_gys = gys_erpExtendField.table_id;
}
else
{
_LoggerErp2Mes.LogWarning($@"【Inventorycheck】表体明细中组织{detail.auxprop_gys}在wms系统中未找到");
throw new AppFriendlyException($@"表体明细中组织{detail.auxprop_gys}在wms系统中未找到", 500);
}
wmsInventorycheckD.auxprop_xph = detail.auxprop_xph;
wmsInventorycheckDs.Add(wmsInventorycheckD);
}