From f1bd65a40104bdb65c93bea3b50381ab6d2c3837 Mon Sep 17 00:00:00 2001
From: yangpeixing <yangpeixing@hnkhzn.com>
Date: 星期二, 21 四月 2026 13:46:00 +0800
Subject: [PATCH] 1
---
WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs | 59 +++++++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 43 insertions(+), 16 deletions(-)
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
index 016126a..6409743 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
@@ -1,25 +1,28 @@
-锘縰sing System;
+锘縰sing MailKit.Search;
+using Microsoft.Extensions.Logging;
+using System;
using System.Collections.Generic;
using System.Linq;
+using System.Net.WebSockets;
using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
-using WIDESEA_Core.Enums;
-using WIDESEA_Core;
-using WIDESEA_Model.Models;
-using WIDESEA_Core.Helper;
-using Microsoft.Extensions.Logging;
-using MailKit.Search;
using System.Reflection.Metadata;
-using static WIDESEA_ITaskInfoService.ITaskService;
-using static WIDESEA_Common.HouseInventoryIn;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
using WIDESEA_Common;
-using Parameter = WIDESEA_Common.Parameter;
-using WIDESEA_Core.LogHelper;
-using WIDESEA_DTO.Task;
-using WIDESEA_Core.TaskEnum;
-using WIDESEA_Model.Models.Inbound;
+using WIDESEA_Common.Log;
using WIDESEA_Common.OrderEnum;
+using WIDESEA_Core;
+using WIDESEA_Core.Enums;
+using WIDESEA_Core.Helper;
+using WIDESEA_Core.LogHelper;
+using WIDESEA_Core.TaskEnum;
+using WIDESEA_DTO.Task;
+using WIDESEA_Model.Models;
+using WIDESEA_Model.Models.Inbound;
+using static WIDESEA_Common.HouseInventoryIn;
+using static WIDESEA_ITaskInfoService.ITaskService;
+using Parameter = WIDESEA_Common.Parameter;
namespace WIDESEA_TaskInfoService
{
@@ -353,6 +356,30 @@
_unitOfWorkManage.BeginTran();
int taskId = BaseDal.AddData(newTask);
newTask.TaskId = taskId;
+ List<Dt_StockInfoDetail> stockInfoDetails = stockInfo.Details;
+ foreach (var stockInfoDetail in stockInfoDetails)
+ {
+ WriteLog.Write_Log("API", "鍏ュ簱鈥旇姹侺ED", "璇锋眰鎴愬姛", new { 璇锋眰鎶ユ枃 = 1 });
+ var postData = new
+ {
+ DeviceCode = newTask.CurrentAddress, // 灞忓箷缂栧彿
+ MaterialCode = stockInfoDetail.MaterielCode,//鐗╂枡绫诲瀷
+ SendNum = stockInfoDetail.OutboundQuantity,//鍙戞枡鏁�
+ BackNum = stockInfoDetail.StockQuantity - stockInfoDetail.OutboundQuantity//鍥炲簱鏁�
+ };
+ WriteLog.Write_Log("API", "鍏ュ簱鈥旇姹侺ED", "璇锋眰鎴愬姛", new { 璇锋眰鎶ユ枃2 = postData });
+ string json = Newtonsoft.Json.JsonConvert.SerializeObject(postData);
+ WriteLog.Write_Log("API", "鍏ュ簱鈥旇姹侺ED", "璇锋眰鎴愬姛", new { 璇锋眰鎶ユ枃3 = json });
+ using (var client = new HttpClient())
+ {
+ var content = new StringContent(json, Encoding.UTF8, "application/json");
+ var response = client.PostAsync(LEDAPI, content).Result;
+ string result = response.Content.ReadAsStringAsync().Result;
+ WriteLog.Write_Log("API", "鍏ュ簱鈥旇姹侺ED", "璇锋眰鎴愬姛", new { 璇锋眰鎶ユ枃 = response, 鎺ユ敹鎶ユ枃 = result });
+ }
+ WriteLog.Write_Log("API", "鍏ュ簱鈥旇姹侺ED", "璇锋眰鎴愬姛", new { 璇锋眰鎶ユ枃 = 4 });
+ }
+
if (returnOrder != null)
{
returnOrder.OrderStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt();
--
Gitblit v1.9.3