库存报表,日志完善

This commit is contained in:
2024-07-09 14:06:59 +08:00
parent d333b62dfa
commit d39859c105
12 changed files with 549 additions and 13 deletions

View File

@@ -494,6 +494,7 @@ namespace Tnb.WarehouseMgr
}
#region 60 59 60 6018060 60 60
var itemsASC = await cyDb.Queryable<WmsCarryH>().LeftJoin<WmsCarryCode>((a, b) => a.id == b.carry_id)
.LeftJoin<BasLocation>((a, b, c) => a.location_id == c.id)
.Where(whereExpr)
@@ -527,6 +528,7 @@ namespace Tnb.WarehouseMgr
WmsCarryCode _wmsCarryCode = itemsASC[j].wmsCarryCode;
if (_wmsCarryCode.codeqty == input.needOut)
{
input.needOut -= _wmsCarryCode.codeqty;
WmsCarryH _wmsCarryH = itemsASC[j].wmsCarryH;
BasLocation _endlocation_ssx = await _db.Queryable<BasLocation>().Where(r => new string[2] { "32609229889045", "32609238573589" }.Contains(r.id)).OrderBy("is_lock, task_nums, location_code").FirstAsync();
@@ -2125,7 +2127,8 @@ namespace Tnb.WarehouseMgr
id = multiList[i].carry_id,
is_lock = 0,
location_id = multiList[i].endlocation_id,
location_code = multiList[i].endlocation_code
location_code = multiList[i].endlocation_code,
instock_time = DateTime.Now
};
string endLocId = multiList[i].endlocation_id;
@@ -2172,7 +2175,7 @@ namespace Tnb.WarehouseMgr
locIts.Add(loc);
}
_ = await _db.Updateable(carryIts).UpdateColumns(it => new { it.is_lock, it.location_id, it.location_code }).ExecuteCommandAsync();
_ = await _db.Updateable(carryIts).UpdateColumns(it => new { it.is_lock, it.location_id, it.location_code, it.instock_time }).ExecuteCommandAsync();
Logger.Information($"【TaskComplate】 更新载具 {JsonConvert.SerializeObject(carryIts)}");
//更新条码的库位和仓库信息
_ = await _db.Updateable(carryCodeIts).UpdateColumns(it => new { it.warehouse_id, it.location_id, it.location_code }).Where(it => multiList.Select(x => x.carry_id).Contains(it.carry_id)).ExecuteCommandAsync();