电梯控制bug处理 包材出库逻辑变更
This commit is contained in:
@@ -332,7 +332,7 @@ namespace Tnb.WarehouseMgr
|
||||
int count = input.details.Where(r => string.IsNullOrEmpty(r.station_code)).Count();
|
||||
if (count > 0)
|
||||
{
|
||||
_LoggerErp2Mes.LogWarning($@"表体存在未填写工位的明细!");
|
||||
_LoggerErp2Mes.LogWarning($@"【MaterialTransfer】表体存在未填写工位的明细!");
|
||||
throw new AppFriendlyException($@"表体存在未填写工位的明细!", 500);
|
||||
}
|
||||
|
||||
@@ -352,13 +352,25 @@ namespace Tnb.WarehouseMgr
|
||||
int count = input.details.Where(r => string.IsNullOrEmpty(r.station_code)).Count();
|
||||
if (count > 0)
|
||||
{
|
||||
_LoggerErp2Mes.LogWarning($@"表体存在未填写工位的明细!");
|
||||
_LoggerErp2Mes.LogWarning($@"【MaterialTransfer】表体存在未填写工位的明细!");
|
||||
throw new AppFriendlyException($@"表体存在未填写工位的明细!", 500);
|
||||
}
|
||||
|
||||
transfer_type = WmsWareHouseConst.MATERIALTRANSFER_QTCRK_CODE;
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
await db.Ado.BeginTranAsync();
|
||||
|
||||
Reference in New Issue
Block a user