From ea4adbde9c64181369161e851925e06d52260eba Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期一, 02 三月 2026 15:31:49 +0800
Subject: [PATCH] 1
---
WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.995.13737/SemanticSymbols.db | 0
WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/MaterielInfoService.cs | 31 +++
WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.995.13737/CodeChunks.db | 0
WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockInfoDetailService.cs | 20 ++
WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs | 6
WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ffce1fd0-6b15-4738-a382-7e44a845b9d0.vsidx | 0
WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/PalletTypeInfoService.cs | 65 ++++++++
WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/InvokeAGVService.cs | 201 +++++++++++++++++++++++++
WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/RoadwayInfoService.cs | 17 ++
WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/PalletTypeInfoController.cs | 13 +
WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/20194aff-9d01-46d2-ad60-af03b9035583.vsidx | 0
WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs | 2
WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockInfoService.cs | 21 ++
WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/WarehouseService.cs | 10 +
WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.995.13737/CodeChunks.db | 0
WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/7d9392ca-5da5-4063-bee8-983d1160b98f.vsidx | 0
WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs | 49 ++++++
WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IPalletTypeInfoService.cs | 4
WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs | 9 +
WCS/WIDESEAWCS_Server1.zip | 0
WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/0e7fcfa6-fcfe-44bc-b8b3-ecd0545580d1.vsidx | 0
WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e506a528-96f7-4a87-b416-83e9919cea96.vsidx | 0
WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs | 6
WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/2b655b38-fd49-4700-920d-8258b96f8dc5.vsidx | 0
WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.995.13737/SemanticSymbols.db | 0
25 files changed, 444 insertions(+), 10 deletions(-)
diff --git a/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.995.13737/CodeChunks.db b/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.995.13737/CodeChunks.db
new file mode 100644
index 0000000..edc031d
--- /dev/null
+++ b/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.995.13737/CodeChunks.db
Binary files differ
diff --git a/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.995.13737/SemanticSymbols.db b/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.995.13737/SemanticSymbols.db
new file mode 100644
index 0000000..bb2a0dc
--- /dev/null
+++ b/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.995.13737/SemanticSymbols.db
Binary files differ
diff --git a/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/0e7fcfa6-fcfe-44bc-b8b3-ecd0545580d1.vsidx b/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/0e7fcfa6-fcfe-44bc-b8b3-ecd0545580d1.vsidx
new file mode 100644
index 0000000..2755620
--- /dev/null
+++ b/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/0e7fcfa6-fcfe-44bc-b8b3-ecd0545580d1.vsidx
Binary files differ
diff --git a/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/20194aff-9d01-46d2-ad60-af03b9035583.vsidx b/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/20194aff-9d01-46d2-ad60-af03b9035583.vsidx
new file mode 100644
index 0000000..70aef67
--- /dev/null
+++ b/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/20194aff-9d01-46d2-ad60-af03b9035583.vsidx
Binary files differ
diff --git a/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/2b655b38-fd49-4700-920d-8258b96f8dc5.vsidx b/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/2b655b38-fd49-4700-920d-8258b96f8dc5.vsidx
new file mode 100644
index 0000000..70aef67
--- /dev/null
+++ b/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/2b655b38-fd49-4700-920d-8258b96f8dc5.vsidx
Binary files differ
diff --git a/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e506a528-96f7-4a87-b416-83e9919cea96.vsidx b/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e506a528-96f7-4a87-b416-83e9919cea96.vsidx
new file mode 100644
index 0000000..d84c85b
--- /dev/null
+++ b/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e506a528-96f7-4a87-b416-83e9919cea96.vsidx
Binary files differ
diff --git a/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ffce1fd0-6b15-4738-a382-7e44a845b9d0.vsidx b/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ffce1fd0-6b15-4738-a382-7e44a845b9d0.vsidx
new file mode 100644
index 0000000..14ba7a4
--- /dev/null
+++ b/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ffce1fd0-6b15-4738-a382-7e44a845b9d0.vsidx
Binary files differ
diff --git a/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/InvokeAGVService.cs b/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/InvokeAGVService.cs
new file mode 100644
index 0000000..a8e082b
--- /dev/null
+++ b/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/InvokeAGVService.cs
@@ -0,0 +1,201 @@
+锘縰sing Autofac.Core;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_DTO.Agv;
+using WIDESEAWCS_Common.APIEnum;
+using WIDESEAWCS_Common.TaskEnum;
+using WIDESEAWCS_Core;
+using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_DTO.Agv;
+
+namespace WIDESEAWCS_TaskInfoService
+{
+ public partial class TaskService
+ {
+ /// <summary>
+ /// 鍙戦�丄GV浠诲姟
+ /// </summary>
+ /// <param name="taskModel"></param>
+ /// <returns></returns>
+ public WebResponseContent AgvSendTask(AgvTaskDTO taskModel, APIEnum SendTask = APIEnum.Agv_CSJSendTask)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ string? apiAddress = apiInfos.FirstOrDefault(x => x.ApiCode == SendTask.ToString())?.ApiAddress;
+ if (string.IsNullOrEmpty(apiAddress))
+ return WebResponseContent.Instance.Error($"鏈壘鍒板彂閫丄GV浠诲姟鎺ュ彛,璇锋鏌ユ帴鍙i厤缃�");
+ string response = HttpHelper.Post(apiAddress, taskModel.Serialize());
+ AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>();
+ if (agvContent.Code == "0")
+ {
+ content.OK(data: agvContent.Data);
+ }
+ else
+ {
+ content.Error(agvContent.Message);
+ }
+ }
+ catch (Exception ex)
+ {
+ content.Error(ex.Message);
+ }
+ return content;
+ }
+ /// <summary>
+ /// 瀹夊叏淇″彿鐢宠 AGV-WCS
+ /// </summary>
+ public AgvResponseContent AgvSecureApply(AgvSecureApplyDTO secureApplyModel)
+ {
+ return new AgvResponseContent();
+ }
+ /// <summary>
+ /// 瀹夊叏淇″彿鍥炲 WCS-AGV //AGV浠诲姟缁х画鎵ц
+ /// </summary>
+ /// <param name="secureModel"></param>
+ /// <returns></returns>
+ public WebResponseContent AgvSecureReply(AgvSecureReplyDTO secureReplyModel, APIEnum SecureReply = APIEnum.Agv_CSJSecureReply)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ string? apiAddress = apiInfos.FirstOrDefault(x => x.ApiCode == SecureReply.ToString())?.ApiAddress;
+ if (string.IsNullOrEmpty(apiAddress))
+ return WebResponseContent.Instance.Error($"鏈壘鍒板彂閫丄GV浠诲姟鎺ュ彛,璇锋鏌ユ帴鍙i厤缃�");
+ string response = HttpHelper.Post(apiAddress, secureReplyModel.Serialize());
+ AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>();
+ if (agvContent.Code == "0")
+ {
+ content.OK(agvContent.Message);
+ }
+ else
+ {
+ content.Error(agvContent.Message);
+ }
+ }
+ catch (Exception ex)
+ {
+ content.Error(ex.Message);
+ }
+ return content;
+ }
+ /// <summary>
+ /// CTU鍙栨秷浠诲姟
+ /// </summary>
+ public WebResponseContent AgvBoxApplyPass(AgvCTUCancelDTO applyPassDTO, APIEnum SecureReply = APIEnum.AGV_CTUCancelTask)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ string? apiAddress = apiInfos.FirstOrDefault(x => x.ApiCode == SecureReply.ToString())?.ApiAddress;
+ if (string.IsNullOrEmpty(apiAddress))
+ return WebResponseContent.Instance.Error($"鏈壘鍒癆GV鍙栨秷浠诲姟鎺ュ彛,璇锋鏌ユ帴鍙i厤缃�");
+ string response = HttpHelper.Post(apiAddress, applyPassDTO.Serialize());
+ AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>();
+ if (agvContent.Code == "0")
+ {
+ content.OK(agvContent.Message);
+ }
+ else
+ {
+ content.Error(agvContent.Message);
+ }
+ }
+ catch (Exception ex)
+ {
+ content.Error(ex.Message);
+ }
+ return content;
+ }
+ /// <summary>
+ /// AGV鎴愬搧鍙栨斁璐ч�氱煡
+ /// </summary>
+ public WebResponseContent AgvBoxApplyPass(AGVBoxApplyPassDTO applyPassDTO, APIEnum SecureReply = APIEnum.AGV_CPBoxApplyPass)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ string? apiAddress = apiInfos.FirstOrDefault(x => x.ApiCode == SecureReply.ToString())?.ApiAddress;
+ if (string.IsNullOrEmpty(apiAddress))
+ return WebResponseContent.Instance.Error($"鏈壘鍒板彂閫丄GV浠诲姟鎺ュ彛,璇锋鏌ユ帴鍙i厤缃�");
+ string response = HttpHelper.Post(apiAddress, applyPassDTO.Serialize());
+ AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>();
+ if (agvContent.Code == "0")
+ {
+ content.OK(agvContent.Message);
+ }
+ else
+ {
+ content.Error(agvContent.Message);
+ }
+ }
+ catch (Exception ex)
+ {
+ content.Error(ex.Message);
+ }
+ return content;
+ }
+ public WebResponseContent AgvPreScheduleTask(AgvScheduleTaskDTO scheduleTaskDTO, APIEnum ScheduleTask = APIEnum.AGV_CTUScheduleTaskTask)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ string? apiAddress = apiInfos.FirstOrDefault(x => x.ApiCode == ScheduleTask.ToString())?.ApiAddress;
+ if (string.IsNullOrEmpty(apiAddress))
+ return WebResponseContent.Instance.Error($"鏈壘鍒板彂閫丄GV浠诲姟鎺ュ彛,璇锋鏌ユ帴鍙i厤缃�");
+ string response = HttpHelper.Post(apiAddress, scheduleTaskDTO.Serialize());
+ AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>();
+ if (agvContent.Code == "0")
+ {
+ content.OK(agvContent.Message);
+ }
+ else
+ {
+ content.Error(agvContent.Message);
+ }
+ }
+ catch (Exception ex)
+ {
+ content.Error(ex.Message);
+ }
+ return content;
+ }
+ /// <summary>
+ /// AGV浠诲姟鐘舵�佸埛鏂�/AGV浠诲姟瀹屾垚
+ /// </summary>
+ /// <param name="agvUpdateModel"></param>
+ /// <returns></returns>
+ public AgvResponseContent AgvUpdateTask(AgvUpdateDTO agvUpdateModel)
+ {
+ return new AgvResponseContent();
+ }
+ public WebResponseContent AgvPodBerthAndMat(AgvPodBerthAndMatDTO agvPodModel, APIEnum PodBerthAndMat = APIEnum.Agv_CSJPodBerthAndMat)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ string? apiAddress = apiInfos.FirstOrDefault(x => x.ApiCode == PodBerthAndMat.ToString())?.ApiAddress;
+ if (string.IsNullOrEmpty(apiAddress))
+ return WebResponseContent.Instance.Error($"鏈壘鍒板彂閫丄GV浠诲姟鎺ュ彛,璇锋鏌ユ帴鍙i厤缃�");
+ string response = HttpHelper.Post(apiAddress, agvPodModel.Serialize());
+ AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>();
+ if (agvContent.Code == "1")
+ {
+ content.OK(agvContent.Message);
+ }
+ else
+ {
+ content.Error(agvContent.Message);
+ }
+ }
+ catch (Exception ex)
+ {
+ content.Error(ex.Message);
+ }
+ return content;
+ }
+ }
+}
diff --git a/WCS/WIDESEAWCS_Server1.zip b/WCS/WIDESEAWCS_Server1.zip
new file mode 100644
index 0000000..c325117
--- /dev/null
+++ b/WCS/WIDESEAWCS_Server1.zip
Binary files differ
diff --git a/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.995.13737/CodeChunks.db b/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.995.13737/CodeChunks.db
index e08dcbb..c777c55 100644
--- a/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.995.13737/CodeChunks.db
+++ b/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.995.13737/CodeChunks.db
Binary files differ
diff --git a/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.995.13737/SemanticSymbols.db b/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.995.13737/SemanticSymbols.db
index 35d506b..ba04fab 100644
--- a/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.995.13737/SemanticSymbols.db
+++ b/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.995.13737/SemanticSymbols.db
Binary files differ
diff --git a/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/7d9392ca-5da5-4063-bee8-983d1160b98f.vsidx b/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/7d9392ca-5da5-4063-bee8-983d1160b98f.vsidx
new file mode 100644
index 0000000..ec8ba85
--- /dev/null
+++ b/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/7d9392ca-5da5-4063-bee8-983d1160b98f.vsidx
Binary files differ
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs
index 73ff410..1b5d3d8 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs
@@ -42,7 +42,11 @@
public override WebResponseContent UpdateData(SaveModel saveModel)
{
- return base.UpdateData(saveModel);
+ var id = saveModel.MainData["id"].ObjToInt();
+ var locationStatus = saveModel.MainData["locationStatus"].ObjToInt();
+ Dt_LocationInfo locationInfo = BaseDal.QueryFirst(x => x.Id == id);
+ locationInfo.LocationStatus = locationStatus;
+ return base.UpdateData(locationInfo);
}
public override WebResponseContent DeleteData(object[] keys)
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/MaterielInfoService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/MaterielInfoService.cs
index 170abbe..8c51f8b 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/MaterielInfoService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/MaterielInfoService.cs
@@ -1,10 +1,12 @@
-锘縰sing System;
+锘縰sing SqlSugar.Extensions;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
+using WIDESEA_Core.Enums;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
@@ -26,8 +28,31 @@
public override WebResponseContent UpdateData(SaveModel saveModel)
{
- return base.UpdateData(saveModel);
- }
+ var id = saveModel.MainData["id"].ObjToInt();
+ var materielId = saveModel.MainData["materielId"].ObjToInt();
+ var materielCode = saveModel.MainData["materielCode"].ToString();
+ var materielName = saveModel.MainData["materielName"].ToString();
+ var materielSpec = saveModel.MainData["materielSpec"].ToString();
+ var materielType = saveModel.MainData["materielType"].ToString();
+ var materielSourceType = saveModel.MainData["materielSourceType"].ToString();
+ var materielUnit = saveModel.MainData["materielUnit"].ToString();
+ var materielState = saveModel.MainData["materielState"].ToString();
+ var state = 0;
+ if (materielState.Equals("Enable"))
+ {
+ state = 1;
+ }
+
+ Dt_MaterielInfo materielInfo = BaseDal.QueryFirst(x => x.Id == id);
+ materielInfo.MaterielId = materielId;
+ materielInfo.MaterielCode = materielCode;
+ materielInfo.MaterielName = materielName;
+ materielInfo.MaterielSpec = materielSpec;
+ materielInfo.MaterielSourceType = materielSourceType;
+ materielInfo.MaterielUnit = materielUnit;
+ materielInfo.MaterielState = (EnableEnum)state;
+ return base.UpdateData(materielInfo);
+ }
public override WebResponseContent DeleteData(object[] keys)
{
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/PalletTypeInfoService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/PalletTypeInfoService.cs
index dc46441..9fceff8 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/PalletTypeInfoService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/PalletTypeInfoService.cs
@@ -34,7 +34,7 @@
List<string> PalletCodes = new List<string>();
for (int i = 0; i < num; i++)
{
- PalletCodes.Add(GetOrderPintCode($"{palletCodeType}PalletCodes",palletCodeType));
+ PalletCodes.Add(GetOrderPintCode($"PalletCodes",palletCodeType));
}
content= PrintPallet(PalletCodes);
foreach (var PalletCode in PalletCodes)
@@ -86,5 +86,68 @@
HttpHelper.Post(url, palletCodes.Serialize());
return WebResponseContent.Instance.OK();
}
+
+ /// <summary>
+ /// 鑾峰彇鎵樼洏鏍囪瘑
+ /// </summary>
+ /// <returns></returns>
+ /// <exception cref="NotImplementedException"></exception>
+ public WebResponseContent GetPalletTypeInfos(int WarehouseId)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ List<Dt_PalletTypeInfo> dt_PalletTypeInfos = BaseDal.QueryData(x => x.WarehouseId == WarehouseId);
+ return content.OK(data: dt_PalletTypeInfos);
+ }
+ catch(Exception ex)
+ {
+ return content.Error();
+ }
+ }
+
+ public WebResponseContent GetWarehouses()
+ {
+ WebResponseContent content = new WebResponseContent();
+
+ try
+ {
+ List<Dt_PalletTypeInfo> dt_PalletTypeInfos = BaseDal.QueryData(x => x);
+ List<Dt_Warehouse> dt_Warehouses = new List<Dt_Warehouse>();
+ foreach (var item in dt_PalletTypeInfos)
+ {
+ Dt_Warehouse dt_Warehouse = Db.Queryable<Dt_Warehouse>().First(x => x.WarehouseId == item.WarehouseId);
+ dt_Warehouses.Add(dt_Warehouse);
+ }
+ List<Dt_Warehouse> NewDt_Warehouses = new List<Dt_Warehouse>();
+ NewDt_Warehouses.AddRange(dt_Warehouses.DistinctBy(x => x.WarehouseId));
+ return content.OK(data: NewDt_Warehouses);
+ }
+ catch(Exception ex)
+ {
+ return content.Error();
+ }
+
+ }
+
+ public override WebResponseContent UpdateData(SaveModel saveModel)
+ {
+ var id = saveModel.MainData["id"].ObjToInt();
+ var palletType = saveModel.MainData["palletType"].ObjToInt();
+ var typeName = saveModel.MainData["typeName"].ToString();
+ var length = saveModel.MainData["length"].ObjToInt();
+ var width = saveModel.MainData["width"].ObjToInt();
+ var height = saveModel.MainData["height"].ObjToInt();
+ var locationCount = saveModel.MainData["locaitonCount"].ObjToInt();
+ Dt_PalletTypeInfo palletTypeInfo = BaseDal.QueryFirst(x => x.Id == id);
+ palletTypeInfo.PalletType = palletType;
+ palletTypeInfo.TypeName = typeName;
+ palletTypeInfo.Length = length;
+ palletTypeInfo.Width = width;
+ palletTypeInfo.Height = height;
+ palletTypeInfo.LocaitonCount = locationCount;
+
+ return base.UpdateData(palletTypeInfo);
+ }
}
}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/RoadwayInfoService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/RoadwayInfoService.cs
index d946f3d..667191a 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/RoadwayInfoService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/RoadwayInfoService.cs
@@ -29,7 +29,22 @@
public override WebResponseContent UpdateData(SaveModel saveModel)
{
- return base.UpdateData(saveModel);
+ var id = saveModel.MainData["id"].ObjToInt();
+ var areaId = saveModel.MainData["areaId"].ObjToInt();
+ var roadwayNo = saveModel.MainData["roadwayNo"].ToString();
+ var deviceNo = saveModel.MainData["deviceNo"].ToString();
+ var inStationCode = saveModel.MainData["inStationCode"].ToString();
+ var inSCStationCode = saveModel.MainData["inSCStationCode"].ToString();
+ var outStationCode = saveModel.MainData["outStationCode"].ToString();
+ var outSCStationCode = saveModel.MainData["outSCStationCode"].ToString();
+ Dt_RoadwayInfo roadwayInfo = BaseDal.QueryFirst(x => x.Id == id);
+ roadwayInfo.AreaId = areaId;
+ roadwayInfo.RoadwayNo = roadwayNo;
+ roadwayInfo.DeviceNo = deviceNo;
+ roadwayInfo.InSCStationCode = inSCStationCode;
+ roadwayInfo.OutStationCode = outStationCode;
+ roadwayInfo.OutSCStationCode = outSCStationCode;
+ return base.UpdateData(roadwayInfo);
}
public override WebResponseContent DeleteData(object[] keys)
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/WarehouseService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/WarehouseService.cs
index e47d98e..a720e2b 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/WarehouseService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/WarehouseService.cs
@@ -29,7 +29,15 @@
public override WebResponseContent UpdateData(SaveModel saveModel)
{
- return base.UpdateData(saveModel);
+ var warehouseId = saveModel.MainData["warehouseId"].ObjToInt();
+ var warehouseCode = saveModel.MainData["warehouseCode"].ToString();
+ var warehouseName = saveModel.MainData["warehouseName"].ToString();
+ var warehouseDes = saveModel.MainData["warehouseDes"].ToString();
+ Dt_Warehouse warehouse = BaseDal.QueryFirst(x => x.WarehouseId == warehouseId);
+ warehouse.WarehouseCode = warehouseCode;
+ warehouse.WarehouseName = warehouseName;
+ warehouse.WarehouseDes = warehouseDes;
+ return base.UpdateData(warehouse);
}
public override WebResponseContent DeleteData(object[] keys)
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs
index a15eb27..68e0fdc 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs
@@ -1,6 +1,8 @@
锘縰sing AutoMapper;
+using Microsoft.AspNetCore.Http.Metadata;
using SqlSugar;
using System;
+using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -13,8 +15,8 @@
using WIDESEA_Core.Utilities;
using WIDESEA_DTO.Basic;
using WIDESEA_IBasicRepository;
-using WIDESEA_IRecordService;
using WIDESEA_IBasicService;
+using WIDESEA_IRecordService;
using WIDESEA_Model.Models;
namespace WIDESEA_BasicService
@@ -275,5 +277,50 @@
_recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locations, beforeEndStatus, StockChangeType.Relocation.ObjToInt(), "", TaskNum);
}
+
+ /// <summary>
+ /// 璐т綅璀﹀憡
+ /// </summary>
+ /// <returns></returns>
+ /// <exception cref="NotImplementedException"></exception>
+ public WebResponseContent LocationWarning()
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ List<Dt_Warehouse> warehouses = BaseDal.Db.Queryable<Dt_Warehouse>().ToList();
+ List<string> locationWarning = new List<string>();
+ foreach (var item in warehouses)
+ {
+
+ for(var i = 1; i < 3; i++)
+ {
+ int inStockNum = 0;
+ List<Dt_LocationInfo> locationInfos = BaseDal.QueryData(x => x.WarehouseId == item.WarehouseId && x.Row == i);
+ if(locationInfos != null && locationInfos.Count() != 0)
+ {
+ foreach (var item1 in locationInfos)
+ {
+ if (item1.LocationStatus == 2)
+ {
+ inStockNum++;
+ }
+ }
+ if (inStockNum != 0 && (double)inStockNum/locationInfos.Count() >= 0.8)
+ {
+ var locationName = $"{item.WarehouseName},绗瑊i}鎺�";
+ locationWarning.Add(locationName);
+ }
+ }
+ }
+ }
+ return content.OK(data: locationWarning);
+ }
+ catch (Exception ex)
+ {
+ return content.Error();
+ }
+
+ }
}
}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs b/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs
index a9b763f..4e2aabb 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs
@@ -252,7 +252,7 @@
/// <param name="saveModel"></param>
/// <returns></returns>
public virtual WebResponseContent UpdateData(SaveModel saveModel)
- {
+ {
try
{
List<string>? list = UpdateIgnoreColOnExecute?.Invoke(saveModel);
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs
index c9fc087..2d2f8ea 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs
@@ -60,5 +60,11 @@
//void UpdateLocationStatus(Dt_LocationInfo location, int palletType, LocationStatusEnum locationStatus, int warehousId);
WebResponseContent LocationRelease(List<string> locationCodes);
+
+ /// <summary>
+ /// 璐т綅璀﹀憡
+ /// </summary>
+ /// <returns></returns>
+ WebResponseContent LocationWarning();
}
}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IPalletTypeInfoService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IPalletTypeInfoService.cs
index 357bd6a..dd90659 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IPalletTypeInfoService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IPalletTypeInfoService.cs
@@ -14,5 +14,9 @@
WebResponseContent PrintPalletCode(int num, string palletCodeType);
string GetOrderPintCode(string printCode,string palletCodeType);
+
+ WebResponseContent GetPalletTypeInfos(int WarehouseId);
+
+ WebResponseContent GetWarehouses();
}
}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockInfoDetailService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockInfoDetailService.cs
index 555e3a5..d38c152 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockInfoDetailService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockInfoDetailService.cs
@@ -1,8 +1,10 @@
-锘縰sing System;
+锘縰sing SqlSugar.Extensions;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_IStockRepository;
using WIDESEA_IStockService;
@@ -18,5 +20,21 @@
public IStockInfoDetailRepository Repository => BaseDal;
+ public override WebResponseContent UpdateData(SaveModel saveModel)
+ {
+ var id = saveModel.MainData["id"].ObjToInt();
+ var materielCode = saveModel.MainData["materielCode"].ToString();
+ var materielName = saveModel.MainData["materielName"].ToString();
+ var orderNo = saveModel.MainData["orderNo"].ToString();
+ var serialNumber = saveModel.MainData["serialNumber"].ToString();
+
+ Dt_StockInfoDetail stockInfoDetail = BaseDal.QueryFirst(x => x.Id == id);
+ stockInfoDetail.MaterielCode = materielCode;
+ stockInfoDetail.MaterielName = materielName;
+ stockInfoDetail.OrderNo = orderNo;
+ stockInfoDetail.SerialNumber = serialNumber;
+ return base.UpdateData(stockInfoDetail);
+ }
+
}
}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockInfoService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockInfoService.cs
index ee46857..9c2ac43 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockInfoService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockInfoService.cs
@@ -3,6 +3,7 @@
using SqlSugar;
using System;
using System.Collections.Generic;
+using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -40,6 +41,26 @@
_stockInfoDetail = stockInfoDetail;
}
+ public override WebResponseContent UpdateData(SaveModel saveModel)
+ {
+ var id = saveModel.MainData["id"].ObjToInt();
+ var palletCode = saveModel.MainData["palletCode"].ToString();
+ var materialType = saveModel.MainData["materialType"].ObjToInt();
+ var locationCode = saveModel.MainData["locationCode"].ToString();
+ var stockStatus = saveModel.MainData["stockStatus"].ObjToInt();
+ var materialweight = saveModel.MainData["materialweight"].ObjToInt();
+ var wlstatus = saveModel.MainData["wlstatus"].ObjToInt();
+ var remark = saveModel.MainData["remark"].ToString();
+ Dt_StockInfo stockInfo = BaseDal.QueryFirst(x => x.Id == id);
+ stockInfo.PalletCode = palletCode;
+ stockInfo.MaterialType = materialType;
+ stockInfo.LocationCode = locationCode;
+ stockInfo.StockStatus = stockStatus;
+ stockInfo.Materialweight = materialweight;
+ stockInfo.Wlstatus = wlstatus;
+ stockInfo.Remark = remark;
+ return base.UpdateData(stockInfo);
+ }
}
}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs b/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs
index 99915e6..73bb590 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs
@@ -64,5 +64,14 @@
return Service.LocationRelease(locationCodes);
}
+ /// <summary>
+ /// 璐т綅棰勮
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost, Route("LocationWarning"), AllowAnonymous]
+ public WebResponseContent LocationWarning()
+ {
+ return Service.LocationWarning();
+ }
}
}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/PalletTypeInfoController.cs b/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/PalletTypeInfoController.cs
index cd93383..872ffb0 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/PalletTypeInfoController.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/PalletTypeInfoController.cs
@@ -21,5 +21,18 @@
return Service.PrintPalletCode(num, palletCodeType);
}
+ [HttpGet, HttpPost, Route("GetWarehouses"), AllowAnonymous]
+ public WebResponseContent GetWarehouses()
+ {
+ return Service.GetWarehouses();
+ }
+
+
+ [HttpGet, HttpPost, Route("GetPalletTypeInfos"), AllowAnonymous]
+ public WebResponseContent GetPalletTypeInfos(int WarehouseId)
+ {
+ return Service.GetPalletTypeInfos(WarehouseId);
+ }
+
}
}
--
Gitblit v1.9.3