WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.995.13737/CodeChunks.dbBinary files differ
WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.995.13737/SemanticSymbols.dbBinary files differ
WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/0e7fcfa6-fcfe-44bc-b8b3-ecd0545580d1.vsidxBinary files differ
WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/20194aff-9d01-46d2-ad60-af03b9035583.vsidxBinary files differ
WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/2b655b38-fd49-4700-920d-8258b96f8dc5.vsidxBinary files differ
WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e506a528-96f7-4a87-b416-83e9919cea96.vsidxBinary files differ
WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ffce1fd0-6b15-4738-a382-7e44a845b9d0.vsidxBinary files differ
WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/InvokeAGVService.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,201 @@ using 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> /// åéAGVä»»å¡ /// </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($"æªæ¾å°åéAGV任塿¥å£,è¯·æ£æ¥æ¥å£é ç½®"); 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($"æªæ¾å°åéAGV任塿¥å£,è¯·æ£æ¥æ¥å£é ç½®"); 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($"æªæ¾å°AGV忶任塿¥å£,è¯·æ£æ¥æ¥å£é ç½®"); 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($"æªæ¾å°åéAGV任塿¥å£,è¯·æ£æ¥æ¥å£é ç½®"); 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($"æªæ¾å°åéAGV任塿¥å£,è¯·æ£æ¥æ¥å£é ç½®"); 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($"æªæ¾å°åéAGV任塿¥å£,è¯·æ£æ¥æ¥å£é ç½®"); 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; } } } WCS/WIDESEAWCS_Server1.zipBinary files differ
WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.995.13737/CodeChunks.dbBinary files differ
WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.995.13737/SemanticSymbols.dbBinary files differ
WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/7d9392ca-5da5-4063-bee8-983d1160b98f.vsidxBinary files differ
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) WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/MaterielInfoService.cs
@@ -1,10 +1,12 @@ using System; using 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) { 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); } } } 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) 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) WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs
@@ -1,6 +1,8 @@ using 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(); } } } } 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); 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(); } } 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(); } } WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockInfoDetailService.cs
@@ -1,8 +1,10 @@ using System; using 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); } } } 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); } } } 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(); } } } 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); } } }