电梯控制bug处理 包材出库逻辑变更

This commit is contained in:
2024-07-12 15:11:11 +08:00
parent a75fc548cb
commit f4cf422a83
15 changed files with 283 additions and 156 deletions

View File

@@ -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();