From 6fed1f731b16c1820a43fc34130a70b21465e2bb Mon Sep 17 00:00:00 2001
From: 刘磊 <1161824510@qq.com>
Date: 星期二, 11 十一月 2025 14:53:18 +0800
Subject: [PATCH] 同步
---
项目代码/WMS/WMSServer/WIDESEA_IStorageTaskService/BDCManager/IBDCManager.cs | 18 ++--
项目代码/WMS/WMSServer/WIDESEA_StorageTaskServices/BDCManager/BDCManager.cs | 51 ++++++++++++
项目代码/WMS/WMSServer/WIDESEA_Common/MES/Request/pushOrderInfo.cs | 7 +
项目代码/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/pushOrderInfo.cs | 91 ++++++++++++----------
项目代码/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/removeWorkOrderInfo.cs | 33 ++++++++
5 files changed, 147 insertions(+), 53 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_Common/MES/Request/pushOrderInfo.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_Common/MES/Request/pushOrderInfo.cs"
index 459e69a..0abb4dd 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_Common/MES/Request/pushOrderInfo.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_Common/MES/Request/pushOrderInfo.cs"
@@ -21,8 +21,11 @@
/// </summary>
public string splitStrategy { get; set; }
- public string data { get; set; }
+ public List<orderInfoDetail> data { get; set; }
+ }
+ public class orderInfoDetail
+ {
/// <summary>
/// 璁㈠崟鍙�
/// </summary>
@@ -56,7 +59,7 @@
/// <summary>
/// 鏁磋溅鐗╂枡鍙�
/// </summary>
- public string vehicleCode { get;set; }
+ public string vehicleCode { get; set; }
/// <summary>
/// 鐧借溅韬墿鏂欏彿
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_IStorageTaskService/BDCManager/IBDCManager.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_IStorageTaskService/BDCManager/IBDCManager.cs"
index 9547184..7dea932 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_IStorageTaskService/BDCManager/IBDCManager.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_IStorageTaskService/BDCManager/IBDCManager.cs"
@@ -6,15 +6,15 @@
namespace WIDESEA_IStorageTaskServices
{
- internal class IBDCManager
+ public interface IBDCManager
{
- //int TotalCapacity { get; }
- //int CurrentOccupancy { get; }
- //List<CarBody> GetInventory();
- //bool AddToBDC(CarBody body);
- //CarBody RetrieveFromBDC(string bodyId);
- //List<CarBody> RetrieveByModel(string model);
- //List<CarBody> RetrieveByColor(BodyColor color);
- //void GenerateReport();
+ int TotalCapacity { get; }
+ int CurrentOccupancy { get; }
+ List<Dt_CarBody> GetInventory();
+ bool AddToBDC(Dt_CarBody body);
+ Dt_CarBody RetrieveFromBDC(string bodyId);
+ List<Dt_CarBody> RetrieveByModel(string model);
+ List<Dt_CarBody> RetrieveByColor(int color);
+ void GenerateReport();
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/pushOrderInfo.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/pushOrderInfo.cs"
index 6c090c6..e7e9b59 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/pushOrderInfo.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/pushOrderInfo.cs"
@@ -33,54 +33,60 @@
if (result.plantCode != "1052") throw new Exception("闈炴湰宸ュ巶璁㈠崟,璇烽噸璇�");
- var palletStockInfos = _palletStockInfoRepository.QueryData(x => x.OrderID == result.workOrderNo);
var ListTaskDto = new List<WMSTaskDTO>();
var ListTask = new List<Dt_Task>();
-
- //濡傚瓨鍦ㄩ缁戝畾宸ュ崟鐨勫簱瀛�,鍒欎紭鍏堝嚭搴撻缁戝畾鐨勫伐鍗�
- if (palletStockInfos != null || palletStockInfos.Count != 0)
+ foreach (var item in result.data)
{
- foreach (var item in palletStockInfos)
+ var palletStockInfos = _palletStockInfoRepository.QueryData(x => x.OrderID == item.workOrderNo);
+
+
+ //濡傚瓨鍦ㄩ缁戝畾宸ュ崟鐨勫簱瀛�,鍒欎紭鍏堝嚭搴撻缁戝畾鐨勫伐鍗�
+ if (palletStockInfos != null || palletStockInfos.Count != 0)
{
- Dt_Task task = new Dt_Task()
+ foreach (var item1 in palletStockInfos)
{
- CurrentAddress = item.LocationCode,
- Grade = 2,
- NextAddress = item.LocationCode,
- PalletCode = item.PalletCode,
- OrderNo = item.OrderID,
- PVI = item.PVI,
- Modifier = item.Modifier,
- Roadway = item.RoadwayNo,
- SourceAddress = item.LocationCode,
- TaskNum = _taskRepository.GetTaskNo().Result,
- TaskState = (int)TaskOutStatusEnum.OutNew,
- TaskType = (int)TaskOutboundTypeEnum.Outbound,
- TargetAddress = "",
- Creater = "System",
- CreateDate = DateTime.Now
- };
- ListTask.Add(task);
+ Dt_Task task = new Dt_Task()
+ {
+ CurrentAddress = item1.LocationCode,
+ Grade = 2,
+ NextAddress = item1.LocationCode,
+ PalletCode = item1.PalletCode,
+ OrderNo = item1.OrderID,
+ PVI = item1.PVI,
+ Modifier = item1.Modifier,
+ Roadway = item1.RoadwayNo,
+ SourceAddress = item1.LocationCode,
+ TaskNum = _taskRepository.GetTaskNo().Result,
+ TaskState = (int)TaskOutStatusEnum.OutNew,
+ TaskType = (int)TaskOutboundTypeEnum.Outbound,
+ TargetAddress = "",
+ Creater = "System",
+ CreateDate = DateTime.Now
+ };
+ ListTask.Add(task);
- WMSTaskDTO taskDTO = new WMSTaskDTO()
- {
- Grade = task.Grade.Value,
- PalletCode = task.PalletCode,
- SourceAddress = task.SourceAddress,
- TargetAddress = task.TargetAddress,
- RoadWay = task.Roadway,
- TaskState = task.TaskState.Value,
- TaskType = task.TaskType,
- TaskNum = task.TaskNum.Value
- };
- ListTaskDto.Add(taskDTO);
+ WMSTaskDTO taskDTO = new WMSTaskDTO()
+ {
+ Grade = task.Grade.Value,
+ PalletCode = task.PalletCode,
+ SourceAddress = task.SourceAddress,
+ TargetAddress = task.TargetAddress,
+ RoadWay = task.Roadway,
+ TaskState = task.TaskState.Value,
+ TaskType = task.TaskType,
+ TaskNum = task.TaskNum.Value
+ };
+ ListTaskDto.Add(taskDTO);
+ }
}
- }
- else
- {
- //濡備笉瀛樺湪棰勭粦瀹氬伐鍗曡溅杈�,鍒欐寜鐓у伐鍗曚俊鎭尮閰嶅簱瀛樿溅杈�
- //todo 鐗瑰緛淇℃伅鍖归厤
- _palletStockInfoRepository.QueryData(x => x.PVI == result.pvi);
+ else
+ {
+ //濡備笉瀛樺湪棰勭粦瀹氬伐鍗曡溅杈�,鍒欐寜鐓у伐鍗曚俊鎭尮閰嶅簱瀛樿溅杈�
+ //todo 鐗瑰緛淇℃伅鍖归厤
+ _palletStockInfoRepository.QueryData(x => x.PVI == item.pvi);
+
+ }
+
}
@@ -95,7 +101,7 @@
Creater = "System",
Status = 1,
//UpperOutOrderId = result.workOrderNo,
- OrderNumber = result.workOrderNo,
+ OrderNumber = result.data[0].workOrderNo,
WarehouseId = 1,
OrderDate = DateTime.Now,
UpperOutOrderId = 1,
@@ -103,6 +109,7 @@
};
+
var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
var wmsBase = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.WCSIPAddress)?.ConfigValue;
var ipAddress = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.ReceiveTask)?.ConfigValue;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/removeWorkOrderInfo.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/removeWorkOrderInfo.cs"
new file mode 100644
index 0000000..fbd7dda
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/removeWorkOrderInfo.cs"
@@ -0,0 +1,33 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core;
+
+namespace WIDESEA_StoragIntegrationServices
+{
+ /// <summary>
+ /// BDC璇锋眰鐒婅鐗瑰緛涓嬪彂
+ /// 鎺ュ彛鎻忚堪: 杞﹁韩杩涘叆BDC鏃讹紝BDC璇诲彇杞﹁韩涓婄殑涓�缁存潯鐮佸悜MES璇锋眰鐒婅鐗瑰緛淇℃伅
+ /// </summary>
+ public partial class MESService
+ {
+ public WebResponseContent removeWorkOrderInfo(string jsonData)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+
+
+ return content.OK();
+ }
+ catch (Exception ex)
+ {
+
+ return content.OK(ex.Message);
+ }
+
+ }
+ }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageTaskServices/BDCManager/BDCManager.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageTaskServices/BDCManager/BDCManager.cs"
new file mode 100644
index 0000000..8b0a749
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageTaskServices/BDCManager/BDCManager.cs"
@@ -0,0 +1,51 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Security.Cryptography.X509Certificates;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_StorageTaskServices
+{
+ public class BDCManager : IBDCManager
+ {
+ private readonly List<Dt_PalletStockInfo> _storageLocations;
+ private readonly List<DtLocationInfo> _locationInfos;
+ private readonly object _lock = new object();
+
+
+ public int TotalCapacity => _locationInfos.Count;
+
+ public int CurrentOccupancy => _storageLocations.Count;
+
+ public bool AddToBDC(Dt_CarBody body)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void GenerateReport()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<Dt_CarBody> GetInventory()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<Dt_CarBody> RetrieveByColor(int color)
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<Dt_CarBody> RetrieveByModel(string model)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Dt_CarBody RetrieveFromBDC(string bodyId)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
--
Gitblit v1.9.3