同步料架的载具位置,bug处理,日志完善
This commit is contained in:
@@ -20,6 +20,8 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
public async Task Do(WareHouseUpInput input)
|
||||
{
|
||||
if (string.IsNullOrEmpty(input.bizTypeId))
|
||||
return;
|
||||
if (_serviceMap.ContainsKey(input.bizTypeId))
|
||||
{
|
||||
await _serviceMap[input.bizTypeId].ModifyAsync(input);
|
||||
|
||||
@@ -2068,6 +2068,20 @@ namespace Tnb.WarehouseMgr
|
||||
location_code = multiList[i].endlocation_code
|
||||
};
|
||||
string endLocId = multiList[i].endlocation_id;
|
||||
|
||||
// 同步料架下的载具位置
|
||||
if (carry.carrystd_id == WmsWareHouseConst.CARRY_LJSTD_ID)
|
||||
{
|
||||
List<WmsCarryH> carrys = _db.Queryable<WmsCarryD>().Where(r => r.carry_id == carry.id)
|
||||
.InnerJoin<WmsCarryH>((a, b) => a.membercarry_id == b.id).Select((a, b) => b).ToList();
|
||||
carrys.ForEach(r =>
|
||||
{
|
||||
r.location_id = carry.location_id;
|
||||
r.location_code = carry.location_code;
|
||||
carryIts.Add(r);
|
||||
});
|
||||
}
|
||||
|
||||
WmsCarryCode carryCode = new()
|
||||
{
|
||||
warehouse_id = locWhIdMap.ContainsKey(endLocId) ? locWhIdMap[endLocId].ToString() : "",
|
||||
@@ -2796,7 +2810,10 @@ namespace Tnb.WarehouseMgr
|
||||
var db = _db;
|
||||
if (dbConn != null)
|
||||
db = dbConn;
|
||||
|
||||
else
|
||||
db = _db.CopyNew();
|
||||
|
||||
|
||||
{
|
||||
await s_taskCommonCreatePretask.WaitAsync();
|
||||
Logger.LogInformation($"【createPretask】 接收到请求 参数:{JsonConvert.SerializeObject(input)}");
|
||||
@@ -2885,7 +2902,6 @@ namespace Tnb.WarehouseMgr
|
||||
WmsPointH? sPoint = it.FirstOrDefault();
|
||||
WmsPointH? ePoint = it.LastOrDefault();
|
||||
|
||||
|
||||
preTask = new()
|
||||
{
|
||||
org_id = _userManager.User?.OrganizeId,
|
||||
|
||||
@@ -245,6 +245,7 @@ namespace Tnb.WarehouseMgr
|
||||
await _runService.Create(templateEntity, visualDevModelCrInput);
|
||||
|
||||
await _db.Ado.CommitTranAsync();
|
||||
Logger.LogError($"【CarryBind】 {input.membercarry_code}成功绑定到{input.carry_code}");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -256,6 +257,8 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError($"【CarryBind】 {ex.Message}");
|
||||
Logger.LogError($"【CarryBind】 {ex.StackTrace}");
|
||||
await _db.Ado.RollbackTranAsync();
|
||||
return await ToApiResult(JNPF.Common.Enums.HttpStatusCode.InternalServerError, ex.Message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user