From d5538af4a0bbc5511990aceb3431fb1caa9bbc65 Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期一, 16 三月 2026 14:27:22 +0800
Subject: [PATCH] 1
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 108 insertions(+), 2 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index 0e9a46c..259a30f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -20,20 +20,31 @@
using Microsoft.AspNetCore.SignalR;
using Newtonsoft.Json;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Database;
+using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using Org.BouncyCastle.Asn1.Tsp;
+using Spire.Pdf;
using SqlSugar;
+using System;
+using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;
+using System.Drawing.Printing;
+using System.IO;
using System.Linq;
+using System.Net.Http;
using System.Reflection;
using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
+using System.Threading.Tasks;
using WIDESEA_BasicRepository;
using WIDESEA_Common;
+using WIDESEA_Common.Log;
+using WIDESEA_Common.OrderEnum;
using WIDESEA_Common.TaskEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
@@ -41,12 +52,16 @@
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_Core.TaskEnum;
+using WIDESEA_DTO.Basic;
+using WIDESEA_DTO.ERP;
using WIDESEA_DTO.Inbound;
using WIDESEA_DTO.Stock;
using WIDESEA_DTO.Task;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
+using WIDESEA_IInboundRepository;
using WIDESEA_IInboundService;
+using WIDESEA_InboundRepository;
using WIDESEA_IOutboundRepository;
using WIDESEA_IOutboundService;
using WIDESEA_IRecordService;
@@ -55,9 +70,34 @@
using WIDESEA_ITaskInfoRepository;
using WIDESEA_ITaskInfoService;
using WIDESEA_Model.Models;
+using WIDESEA_Model.Models.Inbound;
+using WIDESEA_OutboundRepository;
using WIDESEA_StockRepository;
using WIDESEA_TaskInfoRepository;
+using static WIDESEA_Common.Authentication;
+using static WIDESEA_Common.HouseBackboundPassBack;
+using static WIDESEA_Common.HouseInboundPassBack;
+using static WIDESEA_Common.HouseInboundPassBack.data.data1;
+using static WIDESEA_Common.HouseoutboundPassBack;
+using static WIDESEA_Common.InventoryAllocate;
+using static WIDESEA_Common.NewHouseInboundPassBack;
+using static WIDESEA_Common.NewHouseInboundPassBack.Parame.Syncretism;
using static WIDESEA_ITaskInfoService.ITaskService;
+using Parameter = WIDESEA_Common.Parameter;
+using WIDESEA_DTO.ERP;
+using WIDESEA_OutboundRepository;
+using System.ComponentModel.DataAnnotations;
+using System;
+using System.IO;
+using System.Net.Http;
+using System.Threading.Tasks;
+using Spire.Pdf;
+using WIDESEA_InboundRepository;
+using System.Drawing.Printing;
+using System;
+using WIDESEA_Common.Log;
+using static WIDESEA_Common.HouseInboundPassBack.data.data1;
+using System.Diagnostics;
namespace WIDESEA_TaskInfoService
{
@@ -84,9 +124,15 @@
private readonly IPalletTypeInfoRepository _palletTypeInfoRepository;
private readonly IOutboundOrderDetailRepository _outboundOrderDetailRepository;
private readonly IStockInfoDetailRepository _stockInfoDetailRepository;
+ private readonly IStockInfoDetailCPRepository _stockInfoDetailCPRepository;
+ private readonly IReturnOrderRepository _returnOrderRepository;
+ private readonly IProductionRepository _productionRepository;
+ private readonly IInboundRepository _inboundRepository;
+ private readonly ITakeStockOrderCPRepository _takeStockOrderCPRepository;
+ private readonly ITakeStockOrderDetailCPRepository _takeStockOrderDetailCPRepository;
public ITaskRepository Repository => BaseDal;
- public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IMaterielInfoService materielInfoService, IInboundOrderDetail_HtyService inboundOrderDetail_HtyService, IOutboundOrder_HtyService outboundOrder_HtyService, IOutboundOrderDetail_HtyService outboundOrderDetail_HtyService, IInboundOrder_HtyService inboundOrder_HtyService, IStockRepository stockRepository, IInboundOrderDetailService inboundOrderDetailService, IBasicService basicService, IOutboundService outboundService, IInboundService inboundService, IRecordService recordService, IStockService stockService, ITask_HtyService taskHtyService, ILocationInfoService locationInfoService, IOutboundOrderDetailRepository outboundOrderDetailRepository, IBasicRepository basicRepository, IStockInfoDetailRepository stockInfoDetailRepository, IPalletTypeInfoRepository palletTypeInfoRepository) : base(BaseDal)
+ public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IMaterielInfoService materielInfoService, IInboundOrderDetail_HtyService inboundOrderDetail_HtyService, IOutboundOrder_HtyService outboundOrder_HtyService, IOutboundOrderDetail_HtyService outboundOrderDetail_HtyService, IInboundOrder_HtyService inboundOrder_HtyService, IStockRepository stockRepository, IInboundOrderDetailService inboundOrderDetailService, IBasicService basicService, IOutboundService outboundService, IInboundService inboundService, IRecordService recordService, IStockService stockService, ITask_HtyService taskHtyService, ILocationInfoService locationInfoService, IOutboundOrderDetailRepository outboundOrderDetailRepository, IBasicRepository basicRepository, IStockInfoDetailRepository stockInfoDetailRepository, IPalletTypeInfoRepository palletTypeInfoRepository, IReturnOrderRepository returnOrderRepository, IProductionRepository productionRepository, IInboundRepository inboundRepository, ITakeStockOrderCPRepository takeStockOrderCPRepository, ITakeStockOrderDetailCPRepository takeStockOrderDetailCPRepository, IStockInfoDetailCPRepository stockInfoDetailCPRepository) : base(BaseDal)
{
_mapper = mapper;
_stockRepository = stockRepository;
@@ -108,12 +154,21 @@
_basicRepository = basicRepository;
_stockInfoDetailRepository = stockInfoDetailRepository;
_palletTypeInfoRepository = palletTypeInfoRepository;
+ _returnOrderRepository = returnOrderRepository;
+ _productionRepository = productionRepository;
+ _inboundRepository = inboundRepository;
+ _takeStockOrderCPRepository = takeStockOrderCPRepository;
+ _takeStockOrderDetailCPRepository = takeStockOrderDetailCPRepository;
+ _stockInfoDetailCPRepository = stockInfoDetailCPRepository;
}
public string ReceiveWMSTaskin = WIDESEA_Core.Helper.AppSettings.Configuration["ReceiveWMSTaskin"];
+ public string ReceiveWMSTaskreturn = WIDESEA_Core.Helper.AppSettings.Configuration["ReceiveWMSTaskreturn"];
public string ReceiveWMSTaskout = WIDESEA_Core.Helper.AppSettings.Configuration["ReceiveWMSTaskout"];
public string ReceiveWMSTaskAUT = WIDESEA_Core.Helper.AppSettings.Configuration["ReceiveWMSTaskAUT"];
public string ReceiveWMSTaskAllocatein = WIDESEA_Core.Helper.AppSettings.Configuration["ReceiveWMSTaskAllocatein"];
+ public string ReceiveERPTaskout = WIDESEA_Core.Helper.AppSettings.Configuration["ReceiveERPTaskout"];
+ public string InMaterialWarehousingCallback = WIDESEA_Core.Helper.AppSettings.Configuration["InMaterialWarehousingCallback"];
/// <summary>
@@ -135,6 +190,54 @@
return WebResponseContent.Instance.Error($"鏈壘鍒癢CSApi鍦板潃,璇锋鏌ラ厤缃枃浠�");
}
string response = HttpHelper.Post($"{url}/api/Task/ReceiveTask", taskDTOs.Serialize());
+
+ return JsonConvert.DeserializeObject<WebResponseContent>(response) ?? WebResponseContent.Instance.Error("杩斿洖閿欒");
+ }
+ catch (Exception ex)
+ {
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
+ }
+
+ public WebResponseContent PushTasksWCS(List<Dt_Task> tasks, string agvDescription = "")
+ {
+ try
+ {
+ List<WMSTaskDTO> taskDTOs = _mapper.Map<List<WMSTaskDTO>>(tasks);
+ taskDTOs.ForEach(x =>
+ {
+ x.AGVArea = agvDescription;
+ });
+ string url = AppSettings.app("WCS");
+ if (string.IsNullOrEmpty(url))
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒癢CSApi鍦板潃,璇锋鏌ラ厤缃枃浠�");
+ }
+ string response = HttpHelper.Post($"{url}/api/Task/ReceiveCPTask", taskDTOs.Serialize());
+
+ return JsonConvert.DeserializeObject<WebResponseContent>(response) ?? WebResponseContent.Instance.Error("杩斿洖閿欒");
+ }
+ catch (Exception ex)
+ {
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
+ }
+
+ public WebResponseContent FeedBackWCSTaskCompleted(int taskNum)
+ {
+ try
+ {
+ Dt_Task task = BaseDal.QueryFirst(x => x.TaskNum == taskNum);
+ if (task == null)
+ {
+ return WebResponseContent.Instance.Error("鏈壘鍒拌浠诲姟淇℃伅");
+ }
+ string url = AppSettings.app("WCS");
+ if (string.IsNullOrEmpty(url))
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒癢CSApi鍦板潃,璇锋鏌ラ厤缃枃浠�");
+ }
+ string response = HttpHelper.Post($"{url}/api/Task/RecWMSTaskCompleted?taskNum=" + taskNum);
return JsonConvert.DeserializeObject<WebResponseContent>(response) ?? WebResponseContent.Instance.Error("杩斿洖閿欒");
}
@@ -365,13 +468,16 @@
return (true, "鎴愬姛");
}
- #region 鍏ュ簱浠诲姟瀹屾垚
+ #region 鍏ュ簱浠诲姟瀹屾垚
public WebResponseContent InboundTaskCompleted(int taskNum)
{
return null;
}
#endregion
+
+
+
#region//鍑哄簱浠诲姟瀹屾垚
public WebResponseContent OutboundTaskCompleted(int taskNum)
{
--
Gitblit v1.9.3