Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -319,7 +319,7 @@ namespace Tnb.WarehouseMgr
|
||||
//报错, 提示数据不全。
|
||||
throw new AppFriendlyException("数据不全!", 500);
|
||||
}
|
||||
// 生成入库申请数据,添加其他数据 主表
|
||||
// 生成出库申请数据,添加其他数据 主表
|
||||
outstock.id = SnowflakeIdHelper.NextId();
|
||||
outstock.location_id = location.id;
|
||||
outstock.biz_type = WmsWareHouseConst.BIZTYPE_WMSOUTSTOCK_ID;
|
||||
@@ -496,10 +496,16 @@ namespace Tnb.WarehouseMgr
|
||||
pretaskCodes.AddRange(curPreTaskCodes);
|
||||
}
|
||||
var isOk = await _wareHouseService.GenPreTask(preTasks, pretaskCodes);
|
||||
GenPreTaskUpInput genPreTaskAfterUpInput = new();
|
||||
genPreTaskAfterUpInput.CarryIds = preTasks.Select(x => x.carry_id).ToList();
|
||||
genPreTaskAfterUpInput.LocationIds = new HashSet<string>(locIds).ToList();
|
||||
await _wareHouseService.GenInStockTaskHandleAfter(genPreTaskAfterUpInput, it => new WmsCarryH { is_lock = 1 }, it => new BasLocation { is_lock = 1 });
|
||||
if(isOk)
|
||||
{
|
||||
await _db.Updateable(outstockDs).SetColumns(it => new WmsOutstockD{line_status = WmsWareHouseConst.BILLSTATUS_ON_ID }).ExecuteCommandAsync();
|
||||
await _db.Updateable(outstock).SetColumns(it => new WmsOutstockH { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).ExecuteCommandAsync();
|
||||
GenPreTaskUpInput genPreTaskAfterUpInput = new();
|
||||
genPreTaskAfterUpInput.CarryIds = preTasks.Select(x => x.carry_id).ToList();
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user