This commit is contained in:
2024-04-11 17:31:32 +08:00
parent f6eaa2f481
commit 4fbc6c0267
200 changed files with 1252 additions and 1860 deletions

View File

@@ -35,7 +35,7 @@ namespace Tnb.WarehouseMgr
/// </summary>
[OverideVisualDev(ModuleConsts.MODULE_WMSOUTSTOCK_ID)]
[ServiceModule(BizTypeId)]
public class WmsOutStockService : DevServBase<WmsOutStockService>, IWmsOutStockService
public class WmsOutStockService : ServiceLoggerBase<WmsOutStockService>, IWmsOutStockService
{
private const string BizTypeId = "26191522660645";
private readonly ISqlSugarClient _db;
@@ -59,7 +59,7 @@ namespace Tnb.WarehouseMgr
IBillRullService billRullService,
IWmsCarryMoveInStockService wmsCarryMoveInStockService,
IWmsCarryService wareCarryService,
IEventPublisher eventPublisher) : base(repository.AsSugarClient())
IEventPublisher eventPublisher)
{
_db = repository.AsSugarClient();
_dictionaryDataService = dictionaryDataService;
@@ -72,6 +72,7 @@ namespace Tnb.WarehouseMgr
_wareCarryService = wareCarryService;
OverideFuncs.CreateAsync = OutStockApplyFor;
_ = InitializationTask;
}
public async Task<dynamic> OutStockApplyFor(VisualDevModelDataCrInput input)
@@ -114,7 +115,7 @@ namespace Tnb.WarehouseMgr
List<string?> freeLocIds = fLocIds.Except(minTaskNumLocs.Select(x => x.endlocation_id)).ToList();
if (freeLocIds?.Count > 0)
{
int rIdx = Random.Shared.Next(0, freeLocIds.Count);
int rIdx = Random.Shared.Next(0, freeLocIds.Count);
loc = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == freeLocIds[rIdx]);
}
else
@@ -711,7 +712,6 @@ namespace Tnb.WarehouseMgr
List<WmsPointH> points = new List<WmsPointH>();
if (sPoint.area_code != ePoint.area_code)
{
points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
if (points.Count <= 2)
{
throw new AppFriendlyException("该路径不存在", 500);
@@ -739,11 +739,6 @@ namespace Tnb.WarehouseMgr
startlocation_code = sPoint?.location_code ?? string.Empty,
endlocation_id = ePoint?.location_id ?? string.Empty,
endlocation_code = ePoint?.location_code ?? string.Empty,
startpoint_id = sPoint.id,
startpoint_code = sPoint.point_code,
endpoint_id = ePoint.id,
endpoint_code = ePoint.point_code,
start_floor = sPoint?.floor.ToString(),
end_floor = ePoint?.floor.ToString(),
bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_PRETASK_H_ENCODE).GetAwaiter().GetResult(),