bug处理

This commit is contained in:
2024-04-23 10:16:16 +08:00
parent c8e2f1eafd
commit 579f2d3a39
197 changed files with 2509 additions and 1363 deletions

View File

@@ -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);