1
This commit is contained in:
@@ -102,7 +102,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
.And((a, b, c) => !string.IsNullOrEmpty(a.location_id))
|
.And((a, b, c) => !string.IsNullOrEmpty(a.location_id))
|
||||||
.And((a, b, c) => a.status == (int)EnumCarryStatus.占用)
|
.And((a, b, c) => a.status == (int)EnumCarryStatus.占用)
|
||||||
.And((a, b, c) => c.is_type == ((int)EnumLocationType.存储库位).ToString())
|
.And((a, b, c) => c.is_type == ((int)EnumLocationType.存储库位).ToString())
|
||||||
.And((a, b, c) => a.out_status=="0")
|
.And((a, b, c) => a.out_status == "0")
|
||||||
.And((a, b, c) => c.wh_id == input.data[nameof(WmsOutstockH.warehouse_id)].ToString())
|
.And((a, b, c) => c.wh_id == input.data[nameof(WmsOutstockH.warehouse_id)].ToString())
|
||||||
.AndIF(!string.IsNullOrEmpty(os.code_batch), (a, b, c) => b.code_batch == os.code_batch)
|
.AndIF(!string.IsNullOrEmpty(os.code_batch), (a, b, c) => b.code_batch == os.code_batch)
|
||||||
.ToExpression();
|
.ToExpression();
|
||||||
@@ -255,11 +255,13 @@ namespace Tnb.WarehouseMgr
|
|||||||
pretaskCodes.AddRange(curPreTaskCodes);
|
pretaskCodes.AddRange(curPreTaskCodes);
|
||||||
}
|
}
|
||||||
var isOk = await _wareHouseService.GenPreTask(preTasks, pretaskCodes);
|
var isOk = await _wareHouseService.GenPreTask(preTasks, pretaskCodes);
|
||||||
|
if (isOk)
|
||||||
GenPreTaskUpInput genPreTaskAfterUpInput = new();
|
{
|
||||||
genPreTaskAfterUpInput.CarryIds = preTasks.Select(x => x.carry_id).ToList();
|
GenPreTaskUpInput genPreTaskAfterUpInput = new();
|
||||||
genPreTaskAfterUpInput.LocationIds = new HashSet<string>(locIds).ToList();
|
genPreTaskAfterUpInput.CarryIds = preTasks.Select(x => x.carry_id).ToList();
|
||||||
await _wareHouseService.GenInStockTaskHandleAfter(genPreTaskAfterUpInput, it => new WmsCarryH { is_lock = 1 }, it => new BasLocation { is_lock = 1 });
|
genPreTaskAfterUpInput.LocationIds = new HashSet<string>(locIds).ToList();
|
||||||
|
await _wareHouseService.GenInStockTaskHandleAfter(genPreTaskAfterUpInput, it => new WmsCarryH { is_lock = 1 }, it => new BasLocation { is_lock = 1 });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else throw new AppFriendlyException("库存不足", 500);
|
else throw new AppFriendlyException("库存不足", 500);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user