From 06ee55af0ea2943129c27d7b85110fa264764521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Thu, 5 Dec 2024 10:04:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/TestAppService.cs | 32 +++++-------------- .../AssembleIssueJobAppService.cs | 4 +-- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/test/TestAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/test/TestAppService.cs index a31ae087b..658d43ca0 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/test/TestAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/test/TestAppService.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; +using Castle.Core.Logging; using DocumentFormat.OpenXml.Office2010.Drawing; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; @@ -31,10 +33,12 @@ public class TestService:ApplicationService { private readonly IServiceProvider _serviceProvider; private readonly IOptions _options; - public TestService(IServiceProvider serviceProvider, IOptions options) + private readonly ILogger _logger; + public TestService(IServiceProvider serviceProvider, IOptions options, ILogger logger) { _serviceProvider = serviceProvider; _options = options; + _logger = logger; } /* /// @@ -110,33 +114,13 @@ public class TestService:ApplicationService [HttpPost("pushOutTask4FW")] public async Task pushOutTask4FW(AgvRequest1 request) { - - - AgvResultObject1 reusltObject = new AgvResultObject1(); + var json=System.Text.Json.JsonSerializer.Serialize(request); + _logger.LogInformation(json); + AgvResultObject1 reusltObject = new AgvResultObject1(); reusltObject.Code = "0"; reusltObject.Message = "OK"; reusltObject.ReqCode = "T6000001970"; return reusltObject; - - - - //List result = new List(); - - //result.Add(new ResponCargoItem() { AreaID = "1", CargoID = "PTXB1", PartCode = "TMDLYA0A071AB", Flag = 0 }); - //result.Add(new ResponCargoItem() { AreaID = "1", CargoID = "PTXB2", PartCode = "TMDLYA0A061AB", Flag = 0 }); - //result.Add(new ResponCargoItem() { AreaID = "2", CargoID = "ZSXB2", PartCode = "TMDLYD0ABM5A", Flag = 0 }); - - //result = result.Where(p => p.AreaID == AreaID).ToList(); - - - - //var t = new ResponCargos(); - //t.Code = 200; - //t.Msg = "Success"; - //t.Datalist = result; - - - //return t; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs index 70246183b..b792e6bee 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs @@ -996,7 +996,7 @@ public class AssembleIssueJobAppService dto.HandledFromLocationArea = fromlocation.AreaCode; dto.HandledFromLocationErpCode = fromlocation.ErpLocationCode; dto.HandledFromQty = detail.MatQty; - dto.HandledFromLot = string.Empty; + dto.HandledFromLot = !string.IsNullOrEmpty(detail.BatchAttr07) ? detail.BatchAttr07 : string.Empty; dto.HandledFromPackingCode = string.Empty; details.Add(dto); @@ -1031,7 +1031,7 @@ public class AssembleIssueJobAppService { Code = "-1", ReqCode = job.AssembleRequestNumber, - Message = ex.Message, + Message = ex.Message }; await unitOfWork.RollbackAsync().ConfigureAwait(false); return ret;