销售发货、调拨出库到人工出货区
This commit is contained in:
@@ -555,16 +555,16 @@ namespace Tnb.WarehouseMgr
|
||||
throw new AppFriendlyException($@"子表主键不能为空!", 500);
|
||||
}
|
||||
|
||||
var wmsPurchaseOrdersDistinct = input.details.Select(r => new
|
||||
{
|
||||
material_id = r.material_code,
|
||||
code_batch = r.code_batch,
|
||||
}).Distinct();
|
||||
if (wmsPurchaseOrdersDistinct.Count() < input.details.Count)
|
||||
{
|
||||
_LoggerErp2Mes.LogWarning($@"【OutsourceOrderInput】表体存在物料和批号重复的明细!");
|
||||
throw new AppFriendlyException($@"表体存在物料和批号重复的明细!", 500);
|
||||
}
|
||||
//var wmsPurchaseOrdersDistinct = input.details.Select(r => new
|
||||
//{
|
||||
// material_id = r.material_code,
|
||||
// code_batch = r.code_batch,
|
||||
//}).Distinct();
|
||||
//if (wmsPurchaseOrdersDistinct.Count() < input.details.Count)
|
||||
//{
|
||||
// _LoggerErp2Mes.LogWarning($@"【OutsourceOrderInput】表体存在物料和批号重复的明细!");
|
||||
// throw new AppFriendlyException($@"表体存在物料和批号重复的明细!", 500);
|
||||
//}
|
||||
|
||||
await db.Ado.BeginTranAsync();
|
||||
|
||||
@@ -757,16 +757,16 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
|
||||
|
||||
var wmsMaterialTransferdsDistinct = input.details.Select(r => new
|
||||
{
|
||||
material_id = r.material_code,
|
||||
code_batch = r.code_batch,
|
||||
}).Distinct();
|
||||
if (wmsMaterialTransferdsDistinct.Count() < input.details.Count)
|
||||
{
|
||||
_LoggerErp2Mes.LogWarning($@"【MaterialTransfer】表体存在物料和批号重复的明细!");
|
||||
throw new AppFriendlyException($@"表体存在物料和批号重复的明细!", 500);
|
||||
}
|
||||
//var wmsMaterialTransferdsDistinct = input.details.Select(r => new
|
||||
//{
|
||||
// material_id = r.material_code,
|
||||
// code_batch = r.code_batch,
|
||||
//}).Distinct();
|
||||
//if (wmsMaterialTransferdsDistinct.Count() < input.details.Count)
|
||||
//{
|
||||
// _LoggerErp2Mes.LogWarning($@"【MaterialTransfer】表体存在物料和批号重复的明细!");
|
||||
// throw new AppFriendlyException($@"表体存在物料和批号重复的明细!", 500);
|
||||
//}
|
||||
|
||||
await db.Ado.BeginTranAsync();
|
||||
|
||||
@@ -1125,16 +1125,16 @@ namespace Tnb.WarehouseMgr
|
||||
throw new AppFriendlyException($@"子表主键不能为空!", 500);
|
||||
}
|
||||
|
||||
var wmsPurchaseOrdersDistinct = input.details.Select(r => new
|
||||
{
|
||||
material_id = r.material_code,
|
||||
code_batch = r.code_batch,
|
||||
}).Distinct();
|
||||
if (wmsPurchaseOrdersDistinct.Count() < input.details.Count)
|
||||
{
|
||||
_LoggerErp2Mes.LogWarning($@"【TransferOutstock】表体存在物料和批号重复的明细!");
|
||||
throw new AppFriendlyException($@"表体存在物料和批号重复的明细!", 500);
|
||||
}
|
||||
//var wmsPurchaseOrdersDistinct = input.details.Select(r => new
|
||||
//{
|
||||
// material_id = r.material_code,
|
||||
// code_batch = r.code_batch,
|
||||
//}).Distinct();
|
||||
//if (wmsPurchaseOrdersDistinct.Count() < input.details.Count)
|
||||
//{
|
||||
// _LoggerErp2Mes.LogWarning($@"【TransferOutstock】表体存在物料和批号重复的明细!");
|
||||
// throw new AppFriendlyException($@"表体存在物料和批号重复的明细!", 500);
|
||||
//}
|
||||
await db.Ado.BeginTranAsync();
|
||||
string Code = "";
|
||||
switch (warehouse_instock.id)
|
||||
@@ -1454,16 +1454,16 @@ namespace Tnb.WarehouseMgr
|
||||
throw new AppFriendlyException($@"子表主键不能为空!", 500);
|
||||
}
|
||||
|
||||
var wmsTransferOrdersDistinct = input.details.Select(r => new
|
||||
{
|
||||
material_id = r.material_code,
|
||||
code_batch = r.code_batch,
|
||||
}).Distinct();
|
||||
if (wmsTransferOrdersDistinct.Count() < input.details.Count)
|
||||
{
|
||||
_LoggerErp2Mes.LogWarning($@"【TransferOrder】表体存在物料和批号重复的明细!");
|
||||
throw new AppFriendlyException($@"表体存在物料和批号重复的明细!", 500);
|
||||
}
|
||||
//var wmsTransferOrdersDistinct = input.details.Select(r => new
|
||||
//{
|
||||
// material_id = r.material_code,
|
||||
// code_batch = r.code_batch,
|
||||
//}).Distinct();
|
||||
//if (wmsTransferOrdersDistinct.Count() < input.details.Count)
|
||||
//{
|
||||
// _LoggerErp2Mes.LogWarning($@"【TransferOrder】表体存在物料和批号重复的明细!");
|
||||
// throw new AppFriendlyException($@"表体存在物料和批号重复的明细!", 500);
|
||||
//}
|
||||
|
||||
|
||||
await db.Ado.BeginTranAsync();
|
||||
@@ -1489,9 +1489,8 @@ namespace Tnb.WarehouseMgr
|
||||
_LoggerErp2Mes.LogWarning($@"【TransferOutstock】表头明细中组织{input.instockorg_id}在wms系统中未找到!");
|
||||
throw new AppFriendlyException($@"表头明细中组织{input.instockorg_id}在wms系统中未找到!", 500);
|
||||
}
|
||||
|
||||
var _erpExtendField = await db.Queryable<ErpExtendField>().InnerJoin<DictionaryDataEntity>((a, b) => a.table_id == b.Id)
|
||||
.Where((a, b) => a.transaction_type_id == input.transaction_type).Select((a, b) => b).FirstAsync();
|
||||
.Where((a, b) => b.EnCode == input.transaction_type).Select((a, b) => b).FirstAsync();
|
||||
if (_erpExtendField != null)
|
||||
{
|
||||
wmsTransferOrderH.transaction_type = _erpExtendField.EnCode;
|
||||
@@ -1774,16 +1773,16 @@ namespace Tnb.WarehouseMgr
|
||||
throw new AppFriendlyException($@"子表主键不能为空!", 500);
|
||||
}
|
||||
|
||||
var wmsRawmatOutstocksDistinct = input.details.Select(r => new
|
||||
{
|
||||
material_id = r.material_code,
|
||||
code_batch = r.code_batch,
|
||||
}).Distinct();
|
||||
if (wmsRawmatOutstocksDistinct.Count() < input.details.Count)
|
||||
{
|
||||
_LoggerErp2Mes.LogWarning($@"【RawmatOutstock】表体存在物料和批号重复的明细!");
|
||||
throw new AppFriendlyException($@"表体存在物料和批号重复的明细!", 500);
|
||||
}
|
||||
//var wmsRawmatOutstocksDistinct = input.details.Select(r => new
|
||||
//{
|
||||
// material_id = r.material_code,
|
||||
// code_batch = r.code_batch,
|
||||
//}).Distinct();
|
||||
//if (wmsRawmatOutstocksDistinct.Count() < input.details.Count)
|
||||
//{
|
||||
// _LoggerErp2Mes.LogWarning($@"【RawmatOutstock】表体存在物料和批号重复的明细!");
|
||||
// throw new AppFriendlyException($@"表体存在物料和批号重复的明细!", 500);
|
||||
//}
|
||||
|
||||
await db.Ado.BeginTranAsync();
|
||||
// 判断是否重复传输
|
||||
|
||||
Reference in New Issue
Block a user