+1
This commit is contained in:
@@ -129,7 +129,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
WmsPointH sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == carry.location_id);
|
WmsPointH sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == carry.location_id);
|
||||||
WmsPointH ePoint = null!;
|
WmsPointH ePoint = null!;
|
||||||
|
|
||||||
ePoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == input.data[nameof(WmsPointH.location_id)].ToString());
|
//ePoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == input.data[nameof(WmsPointH.location_id)].ToString());
|
||||||
|
|
||||||
if (sPoint != null && ePoint != null)
|
if (sPoint != null && ePoint != null)
|
||||||
{
|
{
|
||||||
@@ -182,64 +182,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
await _wareHouseService.GenInStockTaskHandleAfter(genPreTaskAfterUpInput, it => new WmsCarryH { is_lock = 1 }, it => new BasLocation { is_lock = 1 });
|
await _wareHouseService.GenInStockTaskHandleAfter(genPreTaskAfterUpInput, it => new WmsCarryH { is_lock = 1 }, it => new BasLocation { is_lock = 1 });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region MyRegion
|
|
||||||
//foreach (var ss in setSortings)
|
|
||||||
//{
|
|
||||||
// var carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.id == ss.carry_id);
|
|
||||||
// if (carry != null)
|
|
||||||
// {
|
|
||||||
// WmsPointH sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == carry.location_id);
|
|
||||||
// WmsPointH ePoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == ss.location_id);
|
|
||||||
// if (sPoint != null && ePoint != null)
|
|
||||||
// {
|
|
||||||
// var points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
|
|
||||||
// if (points?.Count > 0)
|
|
||||||
// {
|
|
||||||
// if (points.Count <= 2) throw new AppFriendlyException("该路径不存在", 500);
|
|
||||||
// var preTasks = points.Where(it => !it.location_id.IsNullOrEmpty()).GroupBy(g => g.area_code).Select(it =>
|
|
||||||
// {
|
|
||||||
// var sPoint = it.FirstOrDefault();
|
|
||||||
// var ePoint = it.LastOrDefault();
|
|
||||||
|
|
||||||
// WmsPretaskH preTask = new();
|
|
||||||
// preTask.org_id = _userManager.User.OrganizeId;
|
|
||||||
// preTask.startlocation_id = sPoint?.location_id;
|
|
||||||
// preTask.startlocation_code = sPoint?.location_code;
|
|
||||||
// preTask.endlocation_id = ePoint?.location_id;
|
|
||||||
// preTask.endlocation_code = ePoint?.location_code;
|
|
||||||
// preTask.start_floor = sPoint?.floor.ToString();
|
|
||||||
// preTask.end_floor = ePoint?.floor.ToString();
|
|
||||||
// preTask.bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_PRETASK_H_ENCODE).GetAwaiter().GetResult();
|
|
||||||
// preTask.status = WmsWareHouseConst.PRETASK_BILL_STATUS_DXF_ID;
|
|
||||||
// preTask.biz_type = ss.biz_type;
|
|
||||||
// preTask.task_type = WmsWareHouseConst.WMS_PRETASK_INSTOCK_TYPE_ID;
|
|
||||||
// preTask.carry_id = ss.carry_id;
|
|
||||||
// preTask.carry_code = ss.carry_code;
|
|
||||||
// preTask.area_id = sPoint?.area_id;
|
|
||||||
// preTask.area_code = it.Key;
|
|
||||||
// preTask.require_id = ss.id;
|
|
||||||
// preTask.require_code = ss.bill_code;
|
|
||||||
// preTask.create_id = _userManager.UserId;
|
|
||||||
// preTask.create_time = DateTime.Now;
|
|
||||||
// return preTask;
|
|
||||||
// }).ToList();
|
|
||||||
// await _wareHouseService.GenPreTask(preTasks, null!);
|
|
||||||
// var subCarrys = await _db.Queryable<WmsCarryD>().Where(it => it.carry_id == ss.carry_id).ToListAsync();
|
|
||||||
// var carryIds = subCarrys.Select(x => x.carry_id).Concat(new[] { ss.carry_id }).Distinct().ToList();
|
|
||||||
// GenPreTaskUpInput genPreTaskInput = new() { CarryIds = carryIds, LocationIds = new List<string> { carry.location_id, ss.location_id } };
|
|
||||||
// await _wareHouseService.GenInStockTaskHandleAfter(genPreTaskInput, it => new WmsCarryH { is_lock = 1, carry_status = ((int)EnumCarryStatus.齐套分拣).ToString() }, it => new BasLocation { is_lock = 1 });
|
|
||||||
// ss.status = WmsWareHouseConst.BILLSTATUS_ON_ID;
|
|
||||||
// await _db.Updateable(ss).UpdateColumns(it => it.status).ExecuteCommandAsync();
|
|
||||||
// onFlag = true;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user