bug处理
This commit is contained in:
@@ -8,6 +8,8 @@ using JNPF.Systems.Interfaces.System;
|
||||
using JNPF.VisualDev;
|
||||
using Mapster;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Newtonsoft.Json;
|
||||
using SqlSugar;
|
||||
using Tnb.BasicData.Entities;
|
||||
using Tnb.ProductionMgr.Interfaces;
|
||||
@@ -348,6 +350,7 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
public async Task<dynamic> ScanInStockByRedis(VisualDevModelDataCrInput input)
|
||||
{
|
||||
Logger.LogInformation($"【ScanInStockByRedis】执行入库 {JsonConvert.SerializeObject(input)}");
|
||||
try
|
||||
{
|
||||
await _db.Ado.BeginTranAsync();
|
||||
@@ -470,10 +473,13 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
|
||||
_ = await _db.Insertable(instock).ExecuteCommandAsync();
|
||||
Logger.LogInformation($"【ScanInStockByRedis】插入WmsInstockH {JsonConvert.SerializeObject(instock)}");
|
||||
_ = await _db.Insertable(instockDs).ExecuteCommandAsync();
|
||||
Logger.LogInformation($"【ScanInStockByRedis】插入WmsInstockD {JsonConvert.SerializeObject(instockDs)}");
|
||||
if (instockCode != null)
|
||||
{
|
||||
_ = await _db.Insertable(instockCode).ExecuteCommandAsync();
|
||||
Logger.LogInformation($"【ScanInStockByRedis】插入WmsInstockCode {JsonConvert.SerializeObject(instockCode)}");
|
||||
}
|
||||
|
||||
InStockStrategyQuery inStockStrategyInput = new() { warehouse_id = "1", Size = 1 };
|
||||
@@ -492,13 +498,15 @@ namespace Tnb.WarehouseMgr
|
||||
ePoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == endLocations[0].id);
|
||||
}
|
||||
sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == loc.id);
|
||||
|
||||
|
||||
Logger.LogInformation($"【ScanInStockByRedis】sPoint:{JsonConvert.SerializeObject(sPoint)} ePoint:{JsonConvert.SerializeObject(ePoint)}");
|
||||
if (sPoint != null && ePoint != null)
|
||||
{
|
||||
List<WmsPointH> points = new List<WmsPointH>();
|
||||
if (sPoint.area_code != ePoint.area_code)
|
||||
{
|
||||
points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
|
||||
Logger.LogInformation($"【ScanInStockByRedis】 路径点数量为:{points.Count}");
|
||||
if (points.Count <= 2)
|
||||
{
|
||||
throw new AppFriendlyException("该路径不存在", 500);
|
||||
|
||||
Reference in New Issue
Block a user