去除日志分割线,看着眼花
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Threading.Channels;
|
||||
using Aop.Api.Domain;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Dtos.VisualDev;
|
||||
using JNPF.Common.Enums;
|
||||
@@ -12,6 +13,8 @@ using JNPF.VisualDev.Entitys;
|
||||
using JNPF.VisualDev.Interfaces;
|
||||
using Mapster;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using NPOI.SS.Formula.PTG;
|
||||
using SqlSugar;
|
||||
using Tnb.BasicData.Entities;
|
||||
using Tnb.WarehouseMgr.Entities;
|
||||
@@ -79,6 +82,7 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
WmsCarryH carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.id == input.data[nameof(WmsCarryD.carry_id)].ToString());
|
||||
BasLocation loc = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == endLocations[0].id);
|
||||
Logger.Information($"loc.location_code={loc?.location_code}");
|
||||
bool isMatch = await IsCarryAndLocationMatchByCarryStd(carry, loc);
|
||||
if (!isMatch)
|
||||
{
|
||||
@@ -92,8 +96,10 @@ namespace Tnb.WarehouseMgr
|
||||
VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModuleConsts.MODULE_WMSEMPTYINSTOCK_ID, true);
|
||||
await _runService.Create(templateEntity, input);
|
||||
|
||||
|
||||
if (sPoint != null && ePoint != null)
|
||||
{
|
||||
Logger.Information($"sPoint.id={sPoint.id},ePoint.id={ePoint.id}");
|
||||
List<WmsPointH> points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
|
||||
if (points.Count <= 2)
|
||||
{
|
||||
@@ -123,21 +129,24 @@ namespace Tnb.WarehouseMgr
|
||||
bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_PRETASK_H_ENCODE).GetAwaiter().GetResult(),
|
||||
status = WmsWareHouseConst.PRETASK_BILL_STATUS_DXF_ID,
|
||||
biz_type = WmsWareHouseConst.BIZTYPE_WMSEMPTYINSTOCK_ID,
|
||||
task_type = WmsWareHouseConst.WMS_PRETASK_INSTOCK_TYPE_ID
|
||||
task_type = WmsWareHouseConst.WMS_PRETASK_INSTOCK_TYPE_ID,
|
||||
carry_id = input.data[nameof(preTask.carry_id)]?.ToString()!,
|
||||
carry_code = input.data[nameof(preTask.carry_code)]?.ToString()!,
|
||||
area_id = sPoint?.area_id!,
|
||||
area_code = it.Key,
|
||||
require_id = input.data["ReturnIdentity"].ToString(),
|
||||
require_code = input.data[nameof(preTask.bill_code)]?.ToString()!,
|
||||
create_id = _userManager.UserId,
|
||||
create_time = DateTime.Now,
|
||||
};
|
||||
preTask.carry_id = input.data[nameof(preTask.carry_id)]?.ToString()!;
|
||||
preTask.carry_code = input.data[nameof(preTask.carry_code)]?.ToString()!;
|
||||
preTask.area_id = sPoint?.area_id!;
|
||||
preTask.area_code = it.Key;
|
||||
preTask.require_id = input.data["ReturnIdentity"].ToString();
|
||||
preTask.require_code = input.data[nameof(preTask.bill_code)]?.ToString()!;
|
||||
preTask.create_id = _userManager.UserId;
|
||||
preTask.create_time = DateTime.Now;
|
||||
|
||||
return preTask;
|
||||
}).ToList();
|
||||
|
||||
bool isOk = await _wareHouseService.GenPreTask(preTasks, null!);
|
||||
if (isOk)
|
||||
{
|
||||
|
||||
GenPreTaskUpInput preTaskUpInput = new()
|
||||
{
|
||||
RquireId = input.data["ReturnIdentity"].ToString()!,
|
||||
@@ -167,6 +176,7 @@ namespace Tnb.WarehouseMgr
|
||||
//根据空载具入库Id,回更单据状态
|
||||
_ = await _db.Updateable<WmsEmptyInstock>().SetColumns(it => new WmsEmptyInstock { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == preTaskUpInput.RquireId).ExecuteCommandAsync();
|
||||
|
||||
|
||||
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput,
|
||||
it => new WmsCarryH { is_lock = 1, location_id = preTaskUpInput.CarryStartLocationId, location_code = preTaskUpInput.CarryStartLocationCode },
|
||||
it => new BasLocation { is_lock = 1 });
|
||||
@@ -186,8 +196,9 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
await _db.Ado.CommitTranAsync();
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error("空载具入库失败", ex);
|
||||
await _db.Ado.RollbackTranAsync();
|
||||
throw;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user